/* Shared lobby, forms, scores and dialogs. The table is exclusively 3D. */
:root{font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; color: rgb(244, 243, 223); background: rgb(9, 30, 25); --gold: #edcc7c; --muted: #aac1b5; --edge: #456b58;}
*{box-sizing: border-box;}
body{margin: 0px; min-height: 100vh; background: radial-gradient(circle at 52% 10%, rgb(33, 75, 60), rgb(8, 29, 25) 75%);}
button,input,select{font: inherit;}
button{cursor: pointer; border: 1px solid rgb(104, 141, 119); color: rgb(254, 249, 233); background: rgb(49, 91, 72); padding: 11px 16px; border-radius: 10px; transition: 0.15s;}
button:hover{filter: brightness(1.16);}
button:disabled{cursor: not-allowed; opacity: 0.36;}
button.primary{background: rgb(232, 203, 121); color: rgb(20, 51, 38); border-color: rgb(255, 226, 161); font-weight: 800;}
button.danger{background: rgb(117, 67, 50);}
.topbar{height: 70px; border-bottom: 1px solid rgb(68, 102, 86); background: rgba(9, 34, 29, 0.8); padding: 0px max(24px, 4vw); display: flex; justify-content: space-between; align-items: center;}
.brand{font-size: 23px; display: flex; align-items: center; gap: 10px; letter-spacing: 2px;}
.brand span{font-size: 10px; letter-spacing: 3px; color: rgb(156, 186, 169);}
.pill{font-size: 12px; border: 1px solid rgb(83, 121, 100); padding: 6px 12px; border-radius: 30px; color: rgb(182, 217, 187);}
.container{max-width: 1140px; margin: 35px auto; padding: 0px 22px;}
.heading{font-size: 31px; letter-spacing: 2px; margin: 15px 0px;}
.sub{color: var(--muted);}
.panel{border: 1px solid rgb(74, 112, 93); background: rgba(20, 55, 44, 0.867); border-radius: 18px; padding: 22px; box-shadow: rgba(0, 0, 0, 0.133) 0px 16px 35px;}
.grid2{display: grid; grid-template-columns: 1fr 1fr; gap: 20px;}
.row{display: flex; gap: 10px; align-items: center; flex-wrap: wrap;}
.space{justify-content: space-between;}
.stack{display: flex; flex-direction: column; gap: 12px;}
.fields{display: grid; grid-template-columns: 1fr 1fr; gap: 12px;}
input,select{width: 100%; padding: 12px; border-radius: 9px; border: 1px solid rgb(84, 119, 100); color: rgb(255, 255, 255); background: rgb(9, 40, 31);}
label{font-size: 13px; color: rgb(196, 213, 200); display: block; margin: 0px 0px 7px;}
.muted{color: rgb(180, 201, 186);}
.roomRow{display: flex; justify-content: space-between; align-items: center; padding: 13px 3px; border-bottom: 1px solid rgb(68, 105, 84);}
.roomRow small{color: rgb(166, 192, 173);}
.seat{border: 1px solid rgb(98, 131, 114); border-radius: 12px; padding: 22px; text-align: center; background: rgb(20, 57, 44);}
.seat b{font-size: 23px;}
.seat.active{border-color: rgb(255, 226, 155);}
.seat .small{font-size: 13px; color: rgb(198, 216, 206);}
.tinyTile{background: rgb(244, 237, 216); color: rgb(24, 63, 44); border: 1px solid rgb(170, 181, 162); border-radius: 3px; width: 26px; height: 35px; display: grid; place-items: center; font-family: serif; font-weight: bold; font-size: 15px;}
.tinyTile.highlight{border: 2px solid rgb(255, 225, 121); box-shadow: rgb(250, 218, 62) 0px 0px 11px;}
.controlBar{max-width: 1320px; margin: 12px auto; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;}
.controlBar button{min-width: 95px;}
.status{margin: 4px auto 8px; text-align: center; color: rgb(235, 212, 148); font-size: 16px;}
.scores{display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px auto; max-width: 1300px;}
.score{background: rgb(23, 61, 48); border: 1px solid rgb(66, 108, 86); border-radius: 9px; padding: 10px; text-align: center;}
.score b{font-size: 22px;}
.modalShade{position: fixed; inset: 0px; background: rgba(0, 0, 0, 0.6); display: grid; place-items: center; z-index: 20;}
.modal{max-width: 560px; width: calc(100% - 30px); background: rgb(22, 60, 46); border: 1px solid rgb(241, 215, 133); border-radius: 20px; padding: 26px; text-align: center; box-shadow: rgba(0, 0, 0, 0.6) 0px 22px 70px;}
.modal h2{color: rgb(255, 227, 151);}
.markerRow{display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 20px;}
.markerCard{background: rgb(255, 248, 223); border-radius: 7px; width: 48px; height: 65px; display: grid; place-items: center; font: 24px serif; color: rgb(23, 54, 39);}
.markerCard.back{background: rgb(76, 158, 128); color: white;}
.journal{font-size: 13px; color: rgb(188, 206, 190); border-left: 2px solid rgb(167, 200, 182); padding-left: 12px; max-height: 150px; overflow: auto;}
.journal div{padding: 3px 0px;}
.notice{color: rgb(255, 228, 155); font-size: 12px;}
.loading{padding: 70px; text-align: center;}
#toast{position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); z-index: 100; background: rgb(113, 60, 49); color: rgb(255, 255, 255); border-radius: 12px; padding: 12px 20px; display: none;}
@media (max-width: 950px) {.grid2{grid-template-columns: 1fr;}
.brand span{display: none;}}
:root{--cream: #fbf5e2; --gold: #d5b873; --ink: #122f26; --glow: #f7d574; --wood: #472b1d; --felt: #0e5942; color: rgb(245, 234, 208); background: rgb(9, 25, 19);}
html,body{min-width: 1024px;}
body{font-family: "Noto Sans CJK SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; background: radial-gradient(at 45% -30%, rgb(36, 81, 61) 0%, rgb(9, 27, 22) 68%); color: rgb(241, 233, 210);}
.topbar{height: 69px; background: linear-gradient(rgb(16, 45, 34), rgb(8, 23, 17)); border-bottom: 1px solid rgba(174, 145, 84, 0.42); padding: 0px 3vw; box-shadow: rgba(6, 17, 13, 0.733) 0px 4px 18px;}
.brand{font-family: Georgia, "Noto Serif CJK SC", serif; color: rgb(240, 213, 160); letter-spacing: 3px; font-weight: 700;}
.brand b{font-size: 23px;}
.brand span{color: rgb(182, 165, 133); font-family: Georgia, serif; font-size: 10px;}
.pill{border: 1px solid rgba(158, 144, 98, 0.31); background: rgb(25, 59, 45); color: rgb(239, 223, 176); border-radius: 9px; padding: 8px 16px;}
button{background: linear-gradient(rgb(35, 74, 57), rgb(23, 58, 45)); border: 1px solid rgb(146, 127, 82); color: rgb(248, 232, 194); border-radius: 10px; padding: 11px 18px; font-weight: 600; box-shadow: rgba(0, 0, 0, 0.133) 0px 3px 8px;}
button:hover:not(:disabled){background: linear-gradient(rgb(49, 92, 73), rgb(32, 68, 52)); filter: none; border-color: rgb(228, 197, 122);}
button.primary{background: linear-gradient(rgb(238, 212, 156), rgb(204, 168, 102)); border-color: rgb(249, 228, 179); color: rgb(31, 57, 41); box-shadow: rgba(255, 255, 255, 0.533) 0px 1px inset, rgba(0, 0, 0, 0.333) 0px 3px 10px;}
button.danger{background: linear-gradient(rgb(154, 78, 66), rgb(108, 52, 46)); border-color: rgb(197, 138, 117);}
.container{max-width: 1160px;}
.heading{font-family: Georgia, "Noto Serif CJK SC", serif; font-size: 38px; color: rgb(244, 221, 175);}
.panel{background: linear-gradient(155deg, rgba(23, 67, 52, 0.98), rgba(11, 44, 34, 0.98)); border: 1px solid rgba(154, 135, 85, 0.427); box-shadow: rgba(176, 198, 164, 0.133) 0px 1px inset, rgba(0, 0, 0, 0.267) 0px 18px 50px;}
.roomRow{border-color: rgba(174, 155, 108, 0.267);}
.seat{background: rgb(12, 50, 38); border-color: rgba(161, 141, 98, 0.43);}
.seat.active{border-color: rgb(242, 212, 152);}
.status{font-size: 14px; letter-spacing: 1px; color: rgb(232, 210, 154); margin: 2px 0px 9px;}
.tinyTile,.markerCard{display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid rgb(233, 223, 198); background: linear-gradient(140deg, rgb(255, 253, 243), rgb(231, 222, 202)); box-shadow: rgba(255, 255, 255, 0.6) 0px 1px 1px inset, rgb(95, 149, 128) 0px 4px 0px, rgba(0, 29, 18, 0.373) 0px 6px 8px; border-radius: 4px;}
.tinyTile{width: 32px; height: 42px;}
.tileFace{object-fit: contain; width: 94%; height: 94%; display: block; user-select: none; pointer-events: none;}
.tinyTile.highlight{border: 2px solid rgb(255, 220, 101); box-shadow: rgb(214, 169, 71) 0px 0px 0px 2px, rgb(250, 218, 62) 0px 0px 22px, rgb(95, 149, 128) 0px 4px 0px;}
.controlBar{position: relative; margin: 14px auto; gap: 12px;}
.controlBar button{min-width: 116px; min-height: 47px;}
.scores{margin: 12px auto; grid-template-columns: repeat(4, 1fr); gap: 10px;}
.score{background: rgb(17, 44, 35); border: 1px solid rgba(117, 109, 70, 0.47); box-shadow: rgba(232, 204, 157, 0.086) 0px 1px inset; border-radius: 10px; padding: 10px 16px;}
.score b{font-family: Georgia, serif; font-size: 22px; color: rgb(241, 216, 163);}
.journal{color: rgb(167, 195, 175); border-left: 2px solid rgb(182, 155, 96);}
.markerCard{width: 62px; height: 86px; padding: 4px;}
.markerCard.back{background: rgb(24, 88, 63);}
.markerCard .tileFace{width: 100%; height: 100%;}
.modal{background: linear-gradient(135deg, rgb(21, 61, 48), rgb(12, 41, 33)); border-color: rgb(213, 184, 118); box-shadow: rgb(9, 38, 26) 0px 0px 0px 3px, rgba(0, 0, 0, 0.733) 0px 30px 75px;}
.modal h2{font-family: Georgia, "Noto Serif CJK SC", serif;}
.modalShade{background: rgba(0, 0, 0, 0.733);}

.tinyTile,.markerCard{background: linear-gradient(135deg, rgb(255, 254, 246) 0%, rgb(243, 232, 208) 100%); border: 1px solid rgb(239, 227, 201); box-shadow: rgb(255, 255, 255) 1px 1px 1px inset, rgb(66, 126, 98) 0px 4px 0px, rgba(0, 29, 18, 0.45) 0px 6px 6px;}
.tinyTile .tileFace,.markerCard .tileFace{width: 100%; height: 100%;}
:root{--felt: #084c38; --cream: #faf3df; --gold: #dfc17e;}
html,body{min-width: 900px;}
body{background: radial-gradient(at 50% -7%, rgb(23, 75, 55) 0%, rgb(6, 25, 17) 72%);}
.topbar{height: 72px; background: linear-gradient(90deg, rgb(8, 37, 27), rgb(11, 43, 29) 48%, rgb(8, 31, 23)); padding: 0px clamp(22px, 3.6vw, 68px); border-bottom: 1px solid rgba(198, 160, 97, 0.447);}
.brand{gap: 12px; letter-spacing: 1px;}
.brand b{font-family: "Noto Serif CJK SC", "Songti SC", SimSun, serif; color: rgb(238, 207, 144); letter-spacing: 4px; font-size: 27px; text-shadow: rgba(0, 0, 0, 0.467) 0px 2px 7px;}
.brand span{font-size: 10px; letter-spacing: 3px;}
.brandIcon{display: block; width: 27px; height: 34px; object-fit: fill; border-radius: 3px; box-shadow: rgb(25, 98, 67) 0px 3px 0px, rgba(0, 0, 0, 0.6) 0px 4px 7px;}
.status{margin: 0px auto 6px; font-size: 13px;}
.tinyTile,.markerCard{padding: 0px; border: 1px solid rgb(221, 206, 171); background: linear-gradient(165deg, rgb(255, 249, 228), rgb(222, 205, 166)); box-shadow: rgb(15, 104, 63) 0px 4px 0px, rgba(0, 30, 23, 0.37) 0px 6px 8px; border-radius: 4px; overflow: hidden;}
.tinyTile{width: 42px; height: 56px;}
.tinyTile.highlight{border-color: rgb(244, 210, 112); box-shadow: rgb(248, 210, 124) 0px 0px 0px 2px, rgb(233, 199, 78) 0px 0px 20px, rgb(15, 104, 63) 0px 4px 0px;}
.tinyTile .tileFace{width: 100%; height: 100%; object-fit: fill;}
.controlBar{margin: 13px auto; gap: 10px;}
.controlBar button{min-width: 134px; min-height: 47px; font-size: 15px;}
.controlBar .primary{color: rgb(25, 57, 43); border: 1px solid rgb(232, 204, 141); background: linear-gradient(rgb(250, 232, 183), rgb(204, 170, 99)); box-shadow: rgba(255, 255, 255, 0.6) 0px 1px inset, rgba(0, 0, 0, 0.267) 0px 6px 10px;}
.score{padding: 9px; border-color: rgba(127, 116, 81, 0.49); background: rgb(16, 51, 41);}
.score b{color: rgb(243, 211, 148);}
.markerCard{width: 68px; height: 92px;}
.markerCard .tileFace{object-fit: fill;}
@media (max-width: 1350px) {.tinyTile{width: 34px; height: 45px;}}
.controlBar .picked{font-size: 13px; color: rgb(228, 201, 141); min-width: 100px; text-align: center; padding: 10px 0px;}
.tileFallback{display: grid; place-items: center; width: 100%; height: 100%; color: rgb(21, 60, 43); font-size: clamp(10px, 1.3vw, 22px); font-weight: 700;}
.joinSeats{display: grid; grid-template-columns: repeat(2, minmax(0px, 1fr)); gap: 12px; margin-top: 18px;}
.seatChoice{display: flex; flex-direction: column; gap: 6px; align-items: center; min-height: 112px; min-width: 0px;}
.seatChoice strong{font-size: 23px; color: rgb(240, 213, 160);}
.seatChoice span{max-width: 100%; overflow-wrap: anywhere;}
.seatChoice small{font-size: 12px; color: rgb(183, 217, 189);}
.seatChoice.occupied:disabled{opacity: 0.8; background: rgb(19, 42, 35); border-color: rgb(88, 97, 75);}
.seatChoice.occupied small{color: rgb(214, 181, 163);}
.seatChoice.chosen{border: 2px solid rgb(244, 212, 132); box-shadow: rgba(232, 205, 118, 0.267) 0px 0px 0px 2px; background: rgb(41, 88, 62);}
.joinSeatActions{justify-content: center;}
.journalPanel{margin: 16px 0px 24px; min-width: 0px; border: 1px solid rgba(133, 115, 73, 0.4); border-radius: 14px; background: linear-gradient(145deg, rgb(18, 55, 43), rgb(10, 37, 29)); box-shadow: rgba(213, 193, 140, 0.07) 0px 1px inset; overflow: hidden;}
.journalHeader{display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid rgba(155, 139, 90, 0.19);}
.journalHeader h3{margin: 0px; font-size: 15px; font-weight: 600; letter-spacing: 2px; color: rgb(236, 211, 160);}
.journalHeader > span{font-size: 11px; color: rgb(160, 180, 164);}
.journalPanel .journal{border: 0px; padding: 8px 12px; max-height: 184px; overflow: hidden auto; scrollbar-width: thin; scrollbar-color: rgb(106, 128, 100) rgb(13, 43, 33); scrollbar-gutter: stable; font-size: 13px; color: rgb(198, 213, 200);}
.journalPanel .journal::-webkit-scrollbar{width: 6px;}
.journalPanel .journal::-webkit-scrollbar-track{background: rgb(13, 43, 33);}
.journalPanel .journal::-webkit-scrollbar-thumb{background: rgb(106, 128, 100); border-radius: 8px;}
.journalEntries{list-style: none; margin: 0px; padding: 0px;}
.journalEntry{display: flex; align-items: baseline; gap: 12px; padding: 9px 12px; line-height: 1.6; border-radius: 7px;}
.journalEntry::before{content: ""; flex: 0 0 5px; width: 5px; height: 5px; align-self: center; border-radius: 50%; background: rgb(108, 141, 118);}
.journalText{flex: 1 1 0%; min-width: 0px; overflow-wrap: anywhere;}
.journalEntry.isLatest{background: rgba(216, 191, 112, 0.07); color: rgb(240, 214, 163);}
.journalEntry.isLatest::before{background: rgb(228, 196, 125); box-shadow: rgba(211, 184, 103, 0.314) 0px 0px 7px;}
.journalLatest{flex: 0 0 auto; font-size: 10px; letter-spacing: 1px; color: rgb(232, 204, 138); border: 1px solid rgba(187, 157, 77, 0.4); border-radius: 4px; padding: 1px 6px;}
.journalNote{margin: 0px; padding: 10px 20px; border-top: 1px solid rgba(155, 139, 90, 0.15); font-size: 11px; color: rgb(144, 165, 149);}
.journalEmpty{margin: 8px 12px; color: rgb(160, 180, 164); line-height: 1.8;}
.tinyTile,.markerCard{border: 1px solid rgb(206, 189, 152); background: linear-gradient(125deg, rgb(255, 253, 240), rgb(246, 238, 217) 50%, rgb(233, 221, 192)); border-radius: 4px; padding: 2px; box-shadow: rgb(255, 255, 255) 0px 1px 1px inset, rgb(210, 195, 160) 0px 2px 0px, rgb(32, 107, 76) 0px 4px 0px, rgba(0, 27, 18, 0.25) 0px 6px 6px;}
.tinyTile .tileFace,.markerCard .tileFace{width: 100%; height: 100%; object-fit: contain;}
.markerCard{padding: 5px;}
.brandIcon{padding: 2px; background: linear-gradient(125deg, rgb(255, 253, 240), rgb(233, 221, 192)); object-fit: contain;}
.tinyTile,.markerCard{padding: 0px; border: 0px; background: transparent; box-shadow: none; border-radius: 10% 10% 7% 7%; filter: drop-shadow(rgba(0, 27, 18, 0.5) 0px 3px 3px);}
.tinyTile .tileFace,.markerCard .tileFace{display: block; width: 100%; height: 100%; border-radius: 10% 10% 7% 7%; overflow: hidden; filter: none;}
.controlBar{min-height: 48px; margin: 8px auto; gap: 8px;}
.controlBar button{min-height: 44px;}
@media (max-height: 800px) {.topbar{height: 58px;}}
.mobileOnly{display: none;}
.discardSheetHeader{display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: -16px; background: rgb(16, 53, 41); z-index: 1; padding: 8px 0px;}
.discardSheetHeader h2{margin: 0px; font-size: 18px;}
.discardSheetHeader .row{gap: 5px;}
.discardSheet h3{font-size: 14px; text-align: left; margin: 18px 0px 8px;}
.discardSheetGrid{display: grid; grid-template-columns: repeat(8, minmax(0px, 1fr)); gap: 4px;}
.discardSheetGrid .tinyTile{width: 100%; height: auto; aspect-ratio: 2 / 3;}
@media (max-width: 1023px) {html,body{min-width: 0px; width: 100%;}
body{overflow-x: hidden;}
button,input,select{touch-action: manipulation;}
input,select{font-size: 16px;}
.topbar{height: calc(42px + env(safe-area-inset-top,0px)); padding: env(safe-area-inset-top,0px) max(10px,env(safe-area-inset-right,0px)) 0 max(10px,env(safe-area-inset-left,0px));}
.brand{gap: 7px; min-width: 0px;}
.brand b{font-size: 18px; letter-spacing: 2px;}
.brand span{display: none;}
.brandIcon{width: 20px; height: 27px;}
.pill{font-size: 10px; padding: 4px 7px; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.container{margin: 16px auto; padding: 0px 12px;}
.heading{font-size: 23px;}
.sub{font-size: 13px; line-height: 1.6;}
.panel{padding: 16px;}
.grid2{grid-template-columns: minmax(0px, 1fr);}
.fields{grid-template-columns: repeat(2, minmax(0px, 1fr));}
.fields > div,.row > div{min-width: 0px;}
.seat{padding: 14px 8px;}
.seat b{font-size: 18px;}
.seatChoice{min-height: 88px; padding: 8px;}
.roomRow{gap: 8px;}
.roomRow button{white-space: nowrap; min-height: 44px;}
.controlBar{position: sticky; bottom: 0px; z-index: 10; display: grid; grid-template-columns: repeat(3, minmax(0px, 1fr)); gap: 5px; margin: 4px 0px 0px; padding: 4px 4px calc(6px + env(safe-area-inset-bottom,0px)); background: rgba(8, 41, 31, 0.96); border-radius: 10px;}
.controlBar .picked{grid-column: 1 / -1; min-width: 0px; padding: 0px; min-height: 16px; font-size: 11px; line-height: 16px;}
.controlBar button{min-width: 0px; min-height: 44px; padding: 8px 4px; font-size: 13px;}
.mobileOnly{display: block;}
.scores{gap: 4px; margin: 8px 0px;}
.score{min-width: 0px; padding: 6px 3px; font-size: 10px;}
.score b{font-size: 16px;}
.journalPanel{margin: 8px 0px 12px;}
.journalHeader{padding: 10px 12px;}
.journalHeader h3{font-size: 13px;}
.journalNote{padding: 8px 12px;}
.journalPanel .journal{max-height: 128px; font-size: 12px;}
.modalShade{padding: 12px 0px; overflow-y: auto;}
.modal{width: calc(100% - 24px); max-height: calc(100dvh - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)); overflow-y: auto; overscroll-behavior: contain; padding: 16px; border-radius: 14px;}
.modal h2{font-size: 20px;}
.modal h3{font-size: 16px;}
.modal .grid2{grid-template-columns: repeat(2, minmax(0px, 1fr)); gap: 12px;}
.modal button{min-height: 44px;}
.markerRow{padding: 12px 0px; gap: 4px;}
.markerCard{width: 42px; height: 64px; flex: 0 0 auto;}
#toast{bottom: calc(12px + env(safe-area-inset-bottom,0px)); max-width: calc(100% - 24px); width: max-content; font-size: 13px; padding: 10px 14px;}}
@media (max-width: 1023px) and (orientation: portrait) and (max-height: 700px) {.topbar{height: calc(36px + env(safe-area-inset-top,0px));}
.brand b{font-size: 16px;}}
@media (max-width: 1023px) and (orientation: landscape) {.topbar{height: calc(32px + env(safe-area-inset-top,0px));}
.brand b{font-size: 15px;}
.brandIcon{width: 17px; height: 23px;}
.controlBar{grid-template-columns: minmax(0px, 1fr) repeat(3, minmax(60px, 90px)); align-items: center; gap: 4px; margin-top: 2px; padding: 2px 4px calc(2px + env(safe-area-inset-bottom,0px));}
.controlBar .picked{grid-column: auto; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.controlBar button{min-height: 44px; padding: 5px; font-size: 12px;}}
@media (max-width: 1023px) {.spectating .controlBar{grid-template-columns: minmax(0px, 1fr) 100px; align-items: center;}
.spectating .controlBar .picked{grid-column: auto;}
.roomRow{flex-wrap: wrap;}
.roomRow > div{flex: 1 0 40%;}}
