*{box-sizing:border-box} :root{font-family:Arial,Helvetica,sans-serif;color:#f7f2e8;background:#123c35;color-scheme:light}body{margin:0}button,select{font:inherit;cursor:pointer}button{color:inherit;border:0;background:none;min-height:44px}button:focus-visible,select:focus-visible{outline:3px solid #e7b866;outline-offset:3px}button:disabled{opacity:.4;cursor:default}#app{max-width:1000px;margin:auto;min-height:100dvh;display:flex;flex-direction:column;background:radial-gradient(ellipse at 50% 25%,#246458,#174d43 65%)}header{display:flex;align-items:center;justify-content:space-between;padding:16px 24px}.brand{font-size:29px;letter-spacing:-1px}.practice{font-size:12px;letter-spacing:2px;color:#c7d6cc}header button{border:1px solid #ffffff50;border-radius:50%;width:44px}.opponents{display:flex;justify-content:space-evenly;padding:8px 16px}.opponent{text-align:center;font-size:14px;position:relative}.avatar{width:44px;height:44px;border-radius:50%;background:#d6a76b;color:#283d32;display:grid;place-items:center;margin:0 auto 8px;font-weight:700;border:3px solid transparent}.opponent.active .avatar{border-color:#fff3c8;box-shadow:0 0 0 4px #ffffff18}.opponent small{display:block;color:#c7d6cc;margin-top:4px;font-size:12px}.table{position:relative;display:flex;flex:1;min-height:285px;align-items:center;flex-direction:column;justify-content:center;padding:10px 16px 16px}.table-mark{position:absolute;top:20%;font-weight:900;font-size:110px;letter-spacing:-7px;color:#ffffff04;pointer-events:none}#status{font-size:16px;margin:8px 0 16px;z-index:1}.piles{display:flex;align-items:center;justify-content:center;gap:30px;z-index:1}.pile{width:clamp(100px,26vw,142px);padding:0;position:relative}.pile img{width:100%;display:block;filter:drop-shadow(0 7px 8px #09292150);border-radius:10px}.pile span{display:block;font-size:12px;letter-spacing:1.4px;text-align:center;padding-top:12px;color:#dce3d6}#draw{transform:rotate(-5deg)}#discard{transform:rotate(5deg)}#discard.drop{outline:3px dashed #f4cb7a;outline-offset:12px;border-radius:15px}#notice{min-height:32px;margin-top:15px;text-align:center;font-size:14px;color:#ffe1a5}.hand-area{background:#eee7dc;color:#293c32;border-radius:26px 26px 0 0;padding:0 0 12px;position:relative;z-index:2;box-shadow:0 -8px 35px #092c3920}.handle{text-align:center}.handle button{min-height:38px;font-size:12px;color:#536458}.hand-heading{padding:0 22px 8px;display:flex;justify-content:space-between;align-items:center;font-size:14px}.hand-heading select{background:none;border:0;color:#344c3f;font-size:14px;min-height:44px;max-width:150px}#handcount{color:#617264;margin-left:6px}#hand{display:flex;overflow-x:auto;overflow-y:hidden;padding:27px 22px 14px;min-height:207px;scrollbar-width:thin;align-items:flex-end;touch-action:pan-x;user-select:none;scroll-behavior:smooth}.card{padding:0;flex:0 0 116px;width:116px;margin-right:-53px;position:relative;border-radius:10px;transition:transform .16s;touch-action:pan-x}.card:last-child{margin-right:0}.card img{width:100%;display:block;pointer-events:none;border-radius:10px;box-shadow:-3px 3px 6px #233a3225}.card.selected{transform:translateY(-23px);z-index:3;outline:3px solid #b9802c;outline-offset:2px}.card.groupstart{margin-left:12px}.hand-area.expanded #hand{display:grid;grid-template-columns:repeat(auto-fill,minmax(95px,1fr));gap:14px;padding-top:25px;max-height:58dvh;overflow-y:auto;touch-action:pan-y}.hand-area.expanded .card{width:100%;margin:0;touch-action:pan-y}.hand-area.expanded .card.selected{transform:translateY(-10px)}.actions{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 22px}.actions>span{font-size:13px;line-height:1.4;flex:1}.actions button{border-radius:30px;padding:0 24px;background:#174d43;color:#f7f2e8}.actions #pass{background:#ddd6c9;color:#293c32}footer{background:#eee7dc;display:flex;justify-content:space-between;gap:10px;padding:0 18px max(7px,env(safe-area-inset-bottom));color:#667567}footer button{font-size:12px}#snap{margin:0 22px;color:#8c3b23;font-size:14px;font-weight:700}progress{display:block;width:100%;height:5px;margin-top:7px;accent-color:#b53c37}dialog{border:0;background:#f7f2e8;color:#293c32;border-radius:24px;padding:28px;width:min(90vw,430px);max-height:85dvh}dialog::backdrop{background:#092c35b0;backdrop-filter:blur(4px)}dialog h2{font-size:25px;letter-spacing:-.6px}dialog p{line-height:1.55;font-size:16px}dialog button{background:#174d43;color:#f7f2e8;border-radius:22px;padding:0 18px;margin:4px}.rankchoices{display:flex;flex-wrap:wrap;gap:6px}#ghost{position:fixed;width:116px;pointer-events:none;z-index:100;transform:translate(-50%,-60%);filter:drop-shadow(0 15px 10px #0005)}[hidden]{display:none!important}@media(min-width:700px){#app{min-height:100dvh}.opponents{max-width:600px;width:100%;margin:auto}.hand-area,footer{width:100%}#hand{justify-content:center}.card{flex-basis:140px;width:140px;margin-right:-45px}.table{min-height:330px}.hand-heading,.actions{max-width:780px;width:100%;margin:auto}}@media(max-height:740px) and (max-width:699px){header{padding:8px 20px}.avatar{width:35px;height:35px}.table{min-height:230px;padding-bottom:0}.pile{width:96px}#hand{min-height:170px;padding-top:23px}.card{flex-basis:98px;width:98px;margin-right:-43px}#notice{margin-top:10px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

header #players{width:auto;border:0;font-size:14px;margin-left:auto;margin-right:10px}.players-panel{margin:0 0 0 auto;height:100dvh;max-height:100dvh;border-radius:26px 0 0 26px;width:min(92vw,440px);padding-top:40px}.player-row{display:flex;align-items:center;gap:10px;border-top:1px solid #d9d3c5;padding:20px 0;flex-wrap:wrap}.player-row .avatar{margin:0}.player-row p{font-size:14px;margin:5px 0}.player-row button{font-size:14px;margin-left:auto}.panel-note{font-size:14px!important}.table{touch-action:pan-y}

@media(max-width:500px){header .practice{display:none}}
.entry{min-height:100dvh;background:radial-gradient(ellipse at 50% 20%,#286858,#123c35);max-width:1000px;margin:auto;padding-bottom:30px}.entry header span{font-size:12px;letter-spacing:3px}.entry-form{max-width:390px;margin:0 auto;padding:10px 24px}.entry h1{font-size:35px;letter-spacing:-1px;margin:16px 0 24px}.entry label{display:block;font-size:14px;margin-bottom:8px}.entry input{font:inherit;font-size:16px;border:1px solid #819b8c;border-radius:12px;background:#f7f2e8;color:#293c32;padding:14px;min-width:0;width:100%;margin-bottom:14px}.entry button.primary,.entry button.secondary{display:block;width:100%;border-radius:30px;padding:15px 20px;min-height:50px;margin:10px 0;font-weight:700}.entry .primary{background:#f7f2e8;color:#174d43}.entry .secondary{border:1px solid #b7cbb8;background:#ffffff0b}.join-row{display:flex;gap:10px;align-items:baseline}.join-row input{width:65%;margin:0}.join-row button{flex:1!important;width:auto!important}.entry-note{font-size:14px;text-align:center;line-height:1.6;color:#c4d3c5}.entry-cards{display:flex;height:210px;justify-content:center;align-items:center;padding-top:12px}.entry-cards img{width:125px;margin:0 -20px;box-shadow:0 10px 20px #092e3550;border-radius:11px}.entry-cards img:first-child{transform:rotate(-16deg) translateY(8px)}.entry-cards img:nth-child(2){transform:translateY(-4px);z-index:1}.entry-cards img:last-child{transform:rotate(16deg) translateY(8px)}#entryerror{font-size:14px;line-height:1.5;color:#ffe0a8;min-height:20px}.room-person{display:flex;justify-content:space-between;padding:20px 0;border-bottom:1px solid #ffffff30}.room-person small{font-size:14px;color:#d4dccb}#room-label{font-size:20px;letter-spacing:2px}#lobby-note{font-size:14px;line-height:1.5;overflow-wrap:anywhere}.wine#app{background:radial-gradient(ellipse at 50% 25%,#70283e,#381320 70%)}#results{background:#f7f2e8;color:#293c32;margin:0 16px 16px;padding:20px;border-radius:20px;text-align:center}#results h2{font-size:26px;margin:0 0 10px}#results p{line-height:1.5;margin:8px 0;font-size:14px}.result-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}.result-actions button{background:#174d43;color:#f7f2e8;border-radius:25px;padding:0 18px}.wine .result-actions button{background:#70283e}.confetti{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:1000}.confetti i{position:absolute;top:-25px;width:9px;height:16px;animation:confetti-fall 2.8s ease-in forwards}@keyframes confetti-fall{to{transform:translate(var(--drift),110vh) rotate(var(--spin));opacity:.3}}@media(prefers-reduced-motion:reduce){.confetti{display:none}}.opponents{gap:12px;overflow-x:auto;justify-content:space-evenly}.opponent{min-width:64px;max-width:120px;overflow-wrap:anywhere}

#qr-preview img{display:block;width:100%;max-width:320px;margin:0 auto 16px;border-radius:14px}.invite-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.invite-actions button,.invite-actions a{margin:0;min-height:46px;display:flex;align-items:center;justify-content:center;padding:10px;border-radius:22px;background:#174d43;color:#f7f2e8;font:inherit;font-size:14px;text-decoration:none;text-align:center}.invite-actions a:focus-visible{outline:3px solid #b9802c;outline-offset:2px}#share-status{font-size:14px;line-height:1.5}#share-status input{width:100%;font:inherit;padding:10px;margin-top:8px}#modal:has(#qr-preview){width:min(94vw,440px);padding:22px}

.hand-area.my-turn .hand-heading .me-label>b{color:#7b5119}.my-turn-label{color:#ffe1a5!important}dialog.players-panel::backdrop{animation:panel-dim-in 280ms ease-out}dialog.players-panel.panel-closing::backdrop{animation:panel-dim-out 220ms ease-in forwards}@keyframes panel-dim-in{from{background:#092c3500;backdrop-filter:blur(0)}to{background:#092c35b0;backdrop-filter:blur(4px)}}@keyframes panel-dim-out{to{background:#092c3500;backdrop-filter:blur(0)}}@media(prefers-reduced-motion:reduce){dialog.players-panel::backdrop{animation:none!important}}

.invite-actions{grid-template-columns:repeat(3,1fr);gap:10px;max-width:290px;margin:auto}.invite-actions button,.invite-actions a{min-height:52px;padding:12px;border-radius:16px}.invite-actions svg{flex-shrink:0;width:24px;height:24px}.invite-actions #share-qr{background:#b78437;color:#fff}.invite-actions button:hover,.invite-actions a:hover{filter:brightness(1.12)}

.placement-medal{display:inline-block;width:23px;height:28px;flex:none;vertical-align:middle}.medal-1{--medal-fill:#edc65d;--medal-edge:#95621a;--medal-ink:#543610;--medal-ribbon:#b57e2b}.medal-2{--medal-fill:#dae0e5;--medal-edge:#778690;--medal-ink:#334651;--medal-ribbon:#92a2ad}.medal-3{--medal-fill:#cd9166;--medal-edge:#874d2b;--medal-ink:#492713;--medal-ribbon:#ac6742}.placed-name{display:inline-flex;align-items:center;justify-content:center;gap:5px;vertical-align:middle}.result-name{margin:4px 8px}.result-name .placement-medal{width:28px;height:34px}.place-number{font-weight:700;font-size:14px}.player-row .placed-name{justify-content:flex-start}

.invitation-entry .join-row{flex-direction:column;gap:4px}.invitation-entry .join-row input{width:100%;background:transparent;border-color:#ffffff35;color:#f7f2e8;text-align:center;letter-spacing:2px}.invitation-entry .join-row button{width:100%!important;background:#f7f2e8;color:#174d43}.invitation-entry .entry-cards{margin-bottom:20px}

#selection{min-width:0}#selection .selection-count,#selection .selection-effect{display:block;font-weight:700;line-height:1.35}#selection .selection-count{font-size:18px}#selection .selection-effect{font-size:17px;margin-top:3px;color:#174d43}.actions{align-items:center;min-height:65px}@media(max-width:360px){.actions{flex-wrap:wrap}.actions:has(.selection-count)>#selection{flex-basis:100%}}

/* A full-height card spotlight, with the play controls above the dimmed table. */
#card-preview{position:fixed;inset:0;width:100%;max-width:none;height:100dvh;max-height:none;margin:0;padding:max(16px,env(safe-area-inset-top)) 20px max(20px,env(safe-area-inset-bottom));border:0;border-radius:0;background:transparent;color:#fff6e6;overflow:hidden;grid-template-rows:minmax(0,1fr) auto;gap:16px}
#card-preview[open]{display:grid}#card-preview::backdrop{background:#061d19bb;backdrop-filter:blur(3px)}
#card-preview .preview-close{position:absolute;top:max(12px,env(safe-area-inset-top));right:16px;z-index:2;width:44px;height:44px;padding:0;margin:0;border:1px solid #ffffff50;border-radius:50%;background:#153c34cc;color:white;font-size:30px;line-height:1}
.preview-art{display:flex;align-items:center;justify-content:center;min-height:0;padding:32px 0 0}.preview-art img{display:block;width:min(84vw,440px);height:calc(100dvh - 240px);object-fit:contain;min-height:0;max-height:100%;filter:drop-shadow(0 22px 32px #0008);animation:card-spotlight .24s cubic-bezier(.2,.8,.2,1)}
.preview-bottom{width:min(100%,560px);justify-self:center}#preview-matches{display:flex;justify-content:center;gap:12px;margin-bottom:14px}#preview-matches button{position:relative;width:42px;min-height:0;padding:0;margin:0;background:none;border-radius:5px}#preview-matches img{display:block;width:100%;border-radius:5px}#preview-matches button[aria-pressed=true]{outline:2px solid #edc476;outline-offset:3px}#preview-matches span{position:absolute;right:-6px;bottom:-5px;width:21px;height:21px;display:grid;place-items:center;border-radius:50%;background:#edc476;color:#173c32;font-weight:700;font-size:14px}
.preview-actions{display:flex;align-items:center;gap:16px;background:#f4eee3;color:#173c32;border:1px solid #ffffff66;border-radius:22px;padding:16px 18px;box-shadow:0 12px 40px #0004}#preview-description{flex:1;min-width:0}#preview-description strong{display:block;font-size:18px;line-height:1.35}#preview-description .selection-effect{font-size:17px;margin-top:3px}#card-preview #preview-play{flex-shrink:0;min-height:52px;min-width:98px;margin:0;border-radius:28px;background:#174d43;font-weight:700;font-size:18px}
@keyframes card-spotlight{from{opacity:0;transform:translateY(35px) scale(.88)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-height:500px) and (min-width:600px){#card-preview{grid-template-columns:1fr 1fr;grid-template-rows:minmax(0,1fr);align-items:center}.preview-art{height:100%;padding:0}.preview-bottom{padding-right:30px}}
@media(prefers-reduced-motion:reduce){.preview-art img{animation:none}}

.avatar.character{display:inline-flex;align-items:center;justify-content:center;background:none;border:0;border-radius:0;color:inherit;width:48px;height:48px;vertical-align:middle;flex-shrink:0;margin:0}.character svg{display:block;width:100%;height:100%;overflow:visible;filter:drop-shadow(0 3px 2px #0002)}.opponent>.character{display:flex;margin:0 auto 5px}.opponent.active .character{border:0;box-shadow:none;filter:drop-shadow(0 0 5px #f5ce7b88)}.avatar-picker{border:0;padding:0;margin:14px 0 20px}.avatar-picker legend{font-size:14px;margin-bottom:10px}.avatar-picker>div{display:flex;gap:6px;justify-content:space-between}.avatar-picker button{padding:3px;margin:0;border:2px solid transparent;border-radius:15px;background:#ffffff0d;min-width:0}.avatar-picker button[aria-pressed=true]{border-color:#edc476;background:#edc47620}.avatar-picker .character{width:42px;height:42px}.room-identity{display:flex;align-items:center;gap:12px}.room-identity .character{width:40px;height:40px}.hand-heading>span{display:flex;align-items:center;flex-wrap:wrap}#own-avatar{margin-right:7px}#own-avatar .character{width:34px;height:34px}.player-row>.character{width:48px;height:48px}.mood-thinking svg{animation:head-think 2.8s ease-in-out infinite}.mood-penalty svg{animation:head-startle .38s ease-in-out 2}.mood-win svg{animation:head-cheer 1.8s ease-in-out infinite}.head-eyes{transform-origin:40px 36px;transition:transform 60ms ease}@keyframes head-think{0%,100%{transform:rotate(-5deg)}50%{transform:rotate(5deg) translateY(-2px)}}@keyframes head-startle{0%,100%{transform:rotate(0)}25%{transform:rotate(-10deg)}75%{transform:rotate(10deg)}}@keyframes head-cheer{0%,100%{transform:translateY(0)}35%{transform:translateY(-4px) rotate(-5deg)}65%{transform:translateY(-2px) rotate(5deg)}}.blink-closed .head-eyes{transform:scaleY(.1)}@media(max-width:370px){.avatar-picker>div{gap:2px}.avatar-picker .character{width:35px;height:35px}.opponent>.character{width:40px;height:40px}}@media(prefers-reduced-motion:reduce){.character svg,.head-eyes{animation:none!important}.blink-closed .head-eyes{transform:none}}

#table-chat{border-top:1px solid #29473725;margin-top:22px;padding-top:8px}#modal:not(.players-panel) #table-chat{display:none}#table-chat h2{font-size:21px;margin:12px 0}#chat-feed{max-height:240px;overflow:auto;overscroll-behavior:contain;padding:4px 3px;scrollbar-width:thin}.chat-message{padding:10px 12px;margin:8px 0;background:#e7e4d9;border-radius:12px}.chat-message.private-message{background:#e1e8e2;border-left:3px solid #377766}.chat-message b{font-size:13px;color:#36564a}.chat-message p{font-size:16px;line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere;margin:5px 0 0}.chat-empty{font-size:14px!important;color:#637468}#chat-form label{display:block;font-size:14px;font-weight:700;margin:12px 0 8px}#chat-input{width:100%;resize:vertical;max-height:140px;min-height:70px;border:1px solid #8da397;border-radius:12px;padding:12px;font:inherit;font-size:16px;color:#293c32;background:#fffaf2}#chat-people{display:flex;flex-wrap:wrap}#chat-people button{font-size:14px;margin:5px 4px 0 0}.chat-compose-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}#chat-error{font-size:13px;color:#8c3b23}header .players-control{position:relative;display:inline-flex;flex-shrink:0;margin-left:auto;margin-right:10px}header .players-control #players{margin:0;border-radius:22px}header #dm-alert{position:absolute;right:-9px;top:-9px;min-height:24px;height:24px;min-width:24px;width:auto;max-width:40px;border:2px solid #174d43;background:#e8c886;color:#193e34;border-radius:20px;padding:0 5px;font-size:12px;font-weight:700;line-height:20px;margin:0;z-index:2}#chat-send{flex-shrink:0}

#modal{padding:0;overflow-y:auto;scroll-padding-top:64px}.modal-closebar{position:sticky;top:0;z-index:10;display:flex;justify-content:flex-end;padding:max(12px,env(safe-area-inset-top)) 14px 4px;background:#f7f2e8}.modal-closebar:has(#close[hidden]){display:none}#modal #close{display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;margin:0;border-radius:50%;border:1px solid #29473730;background:#e8eade;color:#174d43}#modal #close:hover{background:#dce3d7}#modalcontent{padding:0 28px 24px}#modalcontent>h2:first-child{margin-top:0;padding-right:12px}#modal>#table-chat{padding:8px 28px 28px;margin-top:0}#modal:has(#close[hidden]) #modalcontent{padding-top:28px}
#chat-suggestions{display:flex;flex-wrap:wrap;gap:5px;margin:10px 0}#chat-suggestions button{font-size:13px;min-height:36px;padding:0 12px;margin:0;background:#e2e8de;color:#284c3b;border:1px solid #b8c7b6}
#modal:not(.players-panel) #play-history{display:none}#play-history{border-top:1px solid #29473725;padding:20px 28px 28px}#play-history h2{font-size:21px;margin:0 0 8px}.history-note{font-size:13px!important;color:#637468;margin:0 0 12px}#history-feed{list-style:none;padding:0;margin:0;max-height:320px;overflow-y:auto;overscroll-behavior:contain}#history-feed li{display:flex;align-items:baseline;gap:12px;padding:12px 0;border-bottom:1px solid #29473715;font-size:14px;line-height:1.5;overflow-wrap:anywhere}#history-feed time{font-size:12px;color:#637468;flex-shrink:0;font-variant-numeric:tabular-nums}

.avatar-dm{display:inline-flex;align-items:center;justify-content:center;padding:0!important;margin:0!important;min-height:44px;min-width:44px;border:0;background:transparent!important;border-radius:50%;cursor:pointer}.opponent>.avatar-dm{display:flex;margin:0 auto 5px!important}.avatar-dm:hover{filter:brightness(1.12)}.avatar-dm .character{pointer-events:none}

.last-card-check{display:inline-block;color:#f2ce7e;font-weight:700;margin-left:3px}.player-row .last-card-check{color:#86621b}
.character.mood-tap{position:relative;overflow:visible}.character.mood-tap svg{animation:last-card-nod .65s ease-in-out}.character.mood-tap::after{content:"";position:absolute;inset:-5px;border:2px solid #f2ce7e;border-radius:50%;pointer-events:none;animation:last-card-ring 1.1s ease-out both}
@keyframes last-card-nod{0%,100%{transform:rotate(0) translateY(0)}35%{transform:rotate(-9deg) translateY(4px)}65%{transform:rotate(4deg) translateY(-2px)}}
@keyframes last-card-ring{0%{transform:scale(.85);opacity:0}20%{opacity:1}100%{transform:scale(1.6);opacity:0}}
@media(prefers-reduced-motion:reduce){.character.mood-tap svg,.character.mood-tap::after{animation:none}.character.mood-tap::after{opacity:1}}

.settings-open{display:grid;place-items:center;flex:0 0 44px;width:44px;padding:0!important}.settings-field{display:grid;gap:10px;font-weight:700}.settings-field select{width:100%;font:inherit;padding:12px;border:1px solid #174d4360;border-radius:12px;background:#fffaf0;color:#174d43}.settings-check{display:flex;gap:12px;align-items:center;margin-top:24px;font-weight:700}.settings-check input{width:22px;height:22px;accent-color:#174d43}.card.assist-blocked{filter:grayscale(1);opacity:.38;cursor:not-allowed}.assist-draw{animation:assist-shake 1.7s ease-in-out infinite}.assist-choice{animation:assist-glow 1.8s ease-in-out infinite;outline:2px solid #e6b85f;outline-offset:3px}@keyframes assist-shake{0%,65%,100%{transform:rotate(-5deg)}72%{transform:rotate(-9deg)}80%{transform:rotate(-1deg)}88%{transform:rotate(-7deg)}}@keyframes assist-glow{0%,100%{box-shadow:0 0 0 0 #e6b85f10}50%{box-shadow:0 0 0 5px #e6b85f60}}@media(prefers-reduced-motion:reduce){.assist-draw,.assist-choice{animation:none;outline:3px solid #e6b85f;outline-offset:3px}}@media(max-width:430px){#app>header{gap:7px;padding-left:12px;padding-right:12px}#app>header .practice{font-size:9px;letter-spacing:.8px}#app>header .brand{font-size:25px}}

#hand .card{transition:transform .16s ease,margin-right .18s ease}#hand.hand-browsing .card.browse-card{margin-right:10px;transform:translateY(-12px);z-index:5}#hand.hand-browsing .card.browse-card:last-child{margin-right:0}#hand.hand-browsing .card.browse-card img{box-shadow:0 8px 18px #123c3545}@media(prefers-reduced-motion:reduce){#hand .card{transition:none}}

#preview-group-hint{margin:0 0 8px;text-align:center;font-size:14px;line-height:1.35;color:#fff3cc}#card-preview #preview-select-group{display:block;margin:0 auto 12px;min-height:44px;background:#e8c886;color:#173c32;font-weight:700}#preview-matches button:not(:disabled){opacity:1}

.opening-cards-field{margin-top:24px}

.invite-language{border:0;margin:0 0 16px;padding:0}.invite-language legend{font-size:14px;font-weight:700;margin-bottom:10px}.invite-language>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.invite-language label{position:relative;display:flex;align-items:center;gap:7px;min-height:44px;padding:8px 10px;border:1px solid #174d4330;border-radius:12px;cursor:pointer;font-size:14px}.invite-language label:has(:checked){background:#174d43;color:#fff6e7;border-color:#174d43}.invite-language input{accent-color:#d9ad61;margin:0}.invite-language label:has(:focus-visible){outline:3px solid #b58229;outline-offset:2px}

/* The QR form scrolls inside a clipped card; its close control lives on the overlay. */
#modal.qr-share-panel{position:fixed;inset:0;margin:0;width:100%;max-width:none;height:100dvh;max-height:none;padding:calc(env(safe-area-inset-top) + 72px) 16px calc(env(safe-area-inset-bottom) + 20px);background:transparent;border-radius:0;overflow:hidden;scroll-padding-top:0}
#modal.qr-share-panel[open]{display:grid;place-items:center}
#modal.qr-share-panel .modal-closebar{position:absolute;top:max(12px,env(safe-area-inset-top));right:max(16px,env(safe-area-inset-right));padding:0;background:transparent}
#modal.qr-share-panel #close{width:48px;height:48px;color:#fff6e7;background:#153c34;border:1px solid #ffffff70;box-shadow:0 3px 12px #0003}
#modal.qr-share-panel #close:hover{background:#246458}
#modal.qr-share-panel #modalcontent{width:min(100%,430px);max-height:100%;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:28px;border-radius:24px;background:#f7f2e8;box-shadow:0 18px 48px #0004;scroll-padding-top:20px}

/* Reserve QR space across language changes; swap the rendered canvas without a blank frame. */
#qr-preview{width:min(100%,320px);aspect-ratio:900/1090;margin:0 auto 16px}#qr-preview canvas,#qr-preview img{display:block;width:100%;height:100%;object-fit:contain;margin:0;border-radius:14px}

.chat-input-wrap{position:relative}#chat-input{display:block;border-radius:22px;padding:14px 64px 14px 14px;min-height:84px;resize:none;line-height:1.45}#modal #chat-send{position:absolute;right:8px;bottom:8px;display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;margin:0;border:0;border-radius:50%;background:#174d43;color:#fffaf0}#modal #chat-send:hover:not(:disabled){background:#246458}#modal #chat-send:disabled{opacity:.45}#chat-error{display:block}#chat-error:not(:empty){margin-top:8px}

#own-avatar{position:relative;display:inline-flex}#avatar-dm-alert{position:absolute;right:-8px;top:-9px;z-index:4;min-height:24px;height:24px;min-width:24px;padding:0 5px;margin:0;border:2px solid #eee7dc;border-radius:20px;background:#b53c37;color:#fff;font-size:12px;font-weight:700;line-height:20px}#avatar-dm-alert::before{content:'';position:absolute;inset:-7px}#public-chat-toast{position:fixed;z-index:30;top:max(12px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:min(90vw,420px);display:flex;flex-direction:column;gap:4px;align-items:flex-start;text-align:left;padding:13px 18px;border:1px solid #ffffff60;border-radius:18px;background:#f7f2e8f5;color:#173c32;box-shadow:0 8px 30px #0004;backdrop-filter:blur(12px)}#public-chat-toast strong{font-size:13px}#public-chat-toast span{font-size:15px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}

/* Saved-game controls sit over the table without pushing the hand down. */
.table{position:relative}
#saved-pause{position:absolute;inset:0;z-index:12;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1.25rem;text-align:center;background:rgba(12,48,41,.96);border-radius:inherit;color:#fff;gap:.6rem}
#saved-pause strong{font-size:1.5rem}#saved-pause p{font-size:1rem;line-height:1.4;margin:0;max-width:28rem}#saved-pause button{min-height:44px;padding:.7rem 1rem;background:#f5d487;color:#123d34;border:0;border-radius:99px;font-weight:700}
.game-suspended #hand-area{opacity:.5;pointer-events:none}
.session-settings{margin-top:1.25rem;border-top:1px solid #ffffff25;padding-top:1rem}.session-settings p{font-size:1rem;line-height:1.5}.session-settings input,.recovery-form input{display:block;width:100%;box-sizing:border-box;padding:.8rem;margin:.5rem 0 1rem;font-size:1rem}.session-settings button,.recovery-form button{min-height:44px;padding:.6rem 1rem}.recovery-form label{display:block}#resume-saved,#recover-seat{margin-top:.5rem}

#public-chat-toast{padding:0;background:rgba(247,242,232,.72);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}#public-chat-toast .toast-open{display:flex;flex-direction:column;gap:4px;width:100%;border:0;border-radius:18px;background:transparent;color:inherit;text-align:left;padding:14px 48px 14px 18px;min-height:62px}#public-chat-toast .toast-close{position:absolute;right:2px;top:2px;border:0;background:transparent;color:inherit;font-size:26px;width:44px;height:44px;min-height:44px;padding:0;border-radius:50%;line-height:1}
.personal-head{background:transparent!important;border:0!important;overflow:visible;filter:drop-shadow(0 2px 2px #0003)}.personal-head img{display:block;width:100%;height:100%;object-fit:contain}.personal-head.mood-penalty{animation:face-surprise .45s ease-out}.personal-head.mood-cheeky{animation:face-grin .45s ease-out}.personal-head.mood-win{animation:face-grin .65s ease-out}
@keyframes face-surprise{0%{transform:scale(.85)}55%{transform:scale(1.18) rotate(-6deg)}100%{transform:scale(1)}}@keyframes face-grin{0%{transform:rotate(-8deg) scale(.92)}55%{transform:rotate(6deg) scale(1.08)}100%{transform:rotate(0) scale(1)}}
.my-face-entry{display:flex;align-items:center;justify-content:center;gap:.5rem;min-height:44px;width:100%;margin:.5rem 0;font-size:1rem}.my-face-entry img{width:40px;height:40px;object-fit:contain}
#face-studio{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:#123f36;color:#f8f2e7;overflow:hidden;border-radius:0}#face-studio::backdrop{background:#092b26ed}.face-studio-body{height:100%;overflow-y:auto;box-sizing:border-box;padding:calc(24px + env(safe-area-inset-top)) 22px calc(32px + env(safe-area-inset-bottom));max-width:560px;margin:auto;font-size:1rem;line-height:1.5}.face-close{position:fixed;z-index:4;top:max(10px,env(safe-area-inset-top));right:max(10px,env(safe-area-inset-right));width:46px;height:46px;border:1px solid #ffffff50;border-radius:50%;background:#123f36ed;color:white;font-size:30px;line-height:1}.face-kicker{font-size:.85rem;letter-spacing:.14em;color:#e5c681;margin:0 50px .35rem 0}.face-studio-body h2{font-size:1.8rem;line-height:1.15;margin:.5rem 48px 1.1rem 0}.face-studio-body h3{font-size:1.2rem;margin:.75rem 0 .25rem}.face-instruction{margin:.25rem 0 1rem;min-height:3rem;color:#f7f2e8d9}.face-steps{display:flex;gap:.6rem;margin:1rem 0}.face-steps button{height:42px;min-width:42px;border:1px solid #ffffff50;background:transparent;color:white;border-radius:50%;font-size:1rem}.face-steps button[aria-current=true]{background:#efcf88;color:#153e34;border-color:#efcf88;font-weight:800}.face-frame{position:relative;aspect-ratio:1;width:min(100%,320px);margin:0 auto;background:#082e27;border:1px solid #ffffff30;border-radius:22px;overflow:hidden}.face-frame video,.face-frame canvas{width:100%;height:100%;object-fit:cover;display:block}.face-frame video{transform:scaleX(-1)}.face-guide{pointer-events:none;position:absolute;inset:7% 14% 9%;border:2px dashed #f4d89eb0;border-radius:48% 48% 44% 44%;box-shadow:0 0 0 90px #0002}.cutout-ready{background:repeating-conic-gradient(#315b50 0% 25%,#254e43 0% 50%) 50%/22px 22px}.cutout-ready .face-guide{display:none}.face-source-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0}.face-studio-body button,.face-upload{min-height:44px;padding:.55rem .8rem;border:1px solid #ffffff50;border-radius:12px;background:#ffffff0c;color:#fff;font:inherit;cursor:pointer}.face-upload{display:inline-flex;align-items:center;box-sizing:border-box}.face-studio-body button:disabled{opacity:.4;cursor:default}.face-studio-body .face-primary{width:100%;background:#efcf88;border-color:#efcf88;color:#123f36;font-weight:750;margin:.5rem 0}.face-adjust label{display:grid;grid-template-columns:100px 1fr;align-items:center;gap:.7rem;font-size:.9rem;margin:.4rem 0}.face-adjust input{width:100%;accent-color:#efcf88;min-height:36px}.face-status{font-size:.9rem;line-height:1.5;color:#f2e4c7;min-height:2.5rem}.face-review{width:100%}.face-test-stage{display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:1rem;background:#0c332a;border-radius:24px;margin:1rem 0}.face-test-stage img{width:160px;height:160px;object-fit:contain;filter:drop-shadow(0 4px 3px #0004)}.face-review-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.6rem}.face-review-grid>div{display:flex;flex-direction:column;gap:.3rem}.face-review-grid button{font-size:.85rem;padding:.4rem;line-height:1.3}.face-review-grid img{width:100%;aspect-ratio:1;object-fit:contain}.face-review-grid span{display:block}.face-review-panel p{font-size:1rem;line-height:1.5}
@media(prefers-reduced-motion:reduce){.personal-head{animation:none!important}}
/* Personal photo heads are three times their original 44px size. */
.avatar.personal-head{width:132px;height:132px;flex-shrink:0}
.opponents:has(.personal-head){justify-content:safe center;gap:18px;overflow-x:auto}
.opponents:has(.personal-head)>.opponent{flex:0 0 auto}
.room-identity:has(.personal-head){min-width:0;overflow-wrap:anywhere}

.avatar-picker .personal-avatar-create{display:inline-flex;align-items:center;justify-content:center;color:#f1d5a0;flex-shrink:0}
.face-review-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.face-review-heading h3{margin:0}.face-review-heading .face-edit{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;padding:0;border-radius:50%;margin:0}
#welcome .entry-cards{height:115px;padding-top:4px}#welcome .entry-cards img{width:78px;margin:0 -12px}#welcome h1{font-size:30px;margin:12px 0 18px}
.home-main-options{margin-top:18px}#room-options{margin:10px 0;border:1px solid #b7cbb8;border-radius:25px;background:#ffffff0b}#room-toggle{position:relative;list-style:none;display:flex;align-items:center;justify-content:center;text-align:center;gap:12px;min-height:52px;padding:14px 48px;font-weight:700;cursor:pointer}#room-toggle::-webkit-details-marker{display:none}#room-toggle:focus-visible{outline:3px solid #e7b866;outline-offset:3px;border-radius:25px}#room-toggle svg{position:absolute;right:20px;transition:transform .2s}#room-options[open]>#room-toggle svg{transform:rotate(180deg)}.room-options-content{padding:0 14px 12px}#room-options[open]>.room-options-content{animation:room-unfold .2s ease-out}.join-heading{font-size:14px;margin:20px 0 10px;color:#d8e3d9}
.room-code-input{display:flex;align-items:center;gap:3px;background:#f7f2e8;border-radius:12px;color:#174d43}.entry .room-code-input input{flex:1;min-width:0;width:100%;margin:0;border:0;background:transparent;padding:14px 8px 14px 12px}.room-code-input>button{width:42px;min-width:42px;height:46px;padding:0;display:inline-flex;align-items:center;justify-content:center}.room-code-display{display:flex;align-items:center;justify-content:center;gap:10px;overflow-wrap:anywhere}.room-code-display button{display:inline-flex;align-items:center;justify-content:center;min-width:44px;width:44px;height:44px;padding:0}.room-code-display strong{font-size:18px;letter-spacing:.08em}
#home-return-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:32px;padding-top:20px;border-top:1px solid #ffffff25}.entry #home-return-actions button{margin:0;min-height:48px;padding:10px 12px;font-size:14px;border-radius:16px}.invitation-entry #room-options{background:none;border:0}.invitation-entry .room-options-content{padding:0}.invitation-entry .join-heading{display:none}.invitation-entry #home-return-actions{margin-top:24px}
@keyframes room-unfold{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){#room-options[open]>.room-options-content{animation:none}#room-toggle svg{transition:none}}
/* Keep the phone hand's identity, cards and actions together. */
@media(max-width:699px){
 .hand-area{padding-bottom:0}
 .hand-area .handle{position:absolute;top:4px;right:14px;z-index:1}
 .hand-area .handle button{min-height:36px;padding:0 4px}
 .hand-heading{min-height:90px;padding:8px 16px;gap:8px;align-items:center}
 .hand-heading>span{display:grid;grid-template-columns:auto auto;column-gap:8px;align-items:center;min-width:0}
 #own-avatar{grid-column:1;grid-row:1/3;margin:0}
 #own-avatar .avatar{width:64px;height:64px;margin:0}
 .hand-heading .me-label>b{grid-column:2;align-self:end}
 .hand-heading #handcount{grid-column:2;margin:2px 0 0;align-self:start}
 .hand-heading select{align-self:flex-end;max-width:125px;min-width:0;padding:0;font-size:13px}
 .hand-area:not(.expanded) #hand{min-height:0;padding:25px 16px 12px}
 .hand-area:not(.expanded) .card{width:clamp(86px,16dvh,116px);flex-basis:clamp(86px,16dvh,116px);margin-right:-42px}
 .hand-area:not(.expanded) .card:last-child{margin-right:0}
 .hand-area .actions{position:sticky;bottom:0;z-index:6;display:flex;flex-wrap:nowrap;padding:8px 16px max(8px,env(safe-area-inset-bottom));background:#eee7dc;gap:8px}
 .hand-area .actions>span{flex:1 1 0;min-width:0;overflow-wrap:anywhere}
 .hand-area .actions button{flex:0 0 auto;min-width:64px;padding:0 16px;min-height:44px}
}

.nickname-settings{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;margin:18px 0}.nickname-settings label,.nickname-settings p{grid-column:1/-1}.nickname-settings input{width:100%;min-width:0;min-height:44px;font:inherit;font-size:16px;padding:10px;border:1px solid #8da397;border-radius:12px;background:#fffaf2;color:#293c32}.nickname-settings button{margin:0;padding:0 14px}.nickname-settings p{font-size:14px;margin:0}
#inter-tour{width:min(92vw,440px);max-height:calc(100dvh - 32px);padding:20px;overflow-y:auto;overscroll-behavior:contain}#inter-tour .tour-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.tour-progress{font-size:13px;color:#637468;font-weight:700}#inter-tour .tour-skip,#inter-tour .tour-rules{background:none;color:#36564a;margin:0;padding:0 8px;font-size:14px}.tour-reading{text-align:center;outline:none}.tour-reading img{width:80px;height:116px;object-fit:contain;margin:12px auto 4px;filter:drop-shadow(0 5px 8px #173c3230)}#inter-tour h2{margin:12px 0;font-size:26px}.tour-copy{min-height:140px;text-align:left}.tour-nav{display:flex;gap:12px;justify-content:space-between;position:sticky;bottom:-20px;background:#f7f2e8;padding:12px 0}#inter-tour .tour-nav button{margin:0;min-width:100px;min-height:48px}.tour-next{font-weight:700}.tour-back{background:#e3e7dc!important;color:#173c32!important}.tour-live{font-size:12px!important;color:#637468}.tour-live:empty{display:none}@media(max-height:650px){.tour-reading img{width:48px;height:70px}.tour-copy{min-height:0}#inter-tour h2{font-size:22px}}
/* Diagram-led tour: actual deck artwork, gesture drawings, short captions. */
#inter-tour .tour-copy{min-height:0;text-align:center;font-size:15px;line-height:1.45;margin:12px 0}#inter-tour .tour-visual{height:260px;position:relative;margin:16px 0 8px;padding:20px 12px;border:1px solid #173c3222;border-radius:20px;background:#e9e8dd;display:flex;align-items:center;justify-content:center;flex-direction:column;overflow:hidden;color:#174d43}#inter-tour .tour-card{width:72px;height:auto;max-height:none;margin:0;display:block;border-radius:6px;filter:drop-shadow(0 4px 3px #173c3225)}#inter-tour .tour-big{width:106px}.tour-scene{display:flex;align-items:center;justify-content:center;gap:18px;width:100%}.tour-scene>div{display:flex;flex-direction:column;align-items:center;gap:10px}.tour-arrow{font-size:32px;font-weight:400}.tour-pill{display:inline-flex;align-items:center;justify-content:center;min-height:30px;border-radius:10px;padding:4px 10px;background:#174d43;color:#fff;font-weight:700;font-size:15px;white-space:nowrap}.tour-touch{position:relative}.tour-finger{position:absolute;width:54px;height:60px;right:-14px;bottom:-26px;z-index:2;filter:drop-shadow(0 2px 1px #173c3220);animation:tour-tap 2.2s ease-in-out infinite}.tour-person{width:66px;height:66px}.tour-options{display:flex;gap:50px;margin-bottom:20px}.tour-options>div{display:flex;flex-direction:column;align-items:center;gap:8px}#inter-tour .tour-start-card{width:48px;transform:rotate(-8deg)}#inter-tour .tour-match-source .tour-card{width:65px}.tour-match-branches{display:flex;gap:60px;margin-top:18px}.tour-match-branches>div{display:flex;gap:6px;align-items:center}#inter-tour .tour-match-branches .tour-card{width:48px}.tour-match-branches .tour-pill{background:none;color:#174d43;padding:0;font-size:16px}.tour-fan{display:flex;position:relative;padding:0 20px}.tour-fan .tour-card{margin-right:-40px!important;transform:rotate(-5deg)}.tour-fan .tour-card:nth-child(2){margin-right:10px!important;transform:translateY(-16px)}.tour-fan .tour-card:last-of-type{margin-right:0!important;transform:rotate(5deg)}.tour-fan .tour-finger{left:35%;right:auto;bottom:-36px;animation:tour-swipe 3s ease-in-out infinite}.tour-swipe-arrow{font-size:23px;margin-top:48px;letter-spacing:4px}.tour-choice{display:block!important;text-align:center}.tour-choice .tour-card{margin:0 auto 14px!important}.tour-small-note{font-size:13px;margin-top:22px}.tour-penalties{display:flex;gap:20px}.tour-penalties>div{display:flex;flex-direction:column;align-items:center;gap:12px}.tour-penalties .tour-pill{font-size:23px;background:#8c3b23;min-width:52px}.tour-skip-symbol{display:flex;gap:12px;align-items:center;margin-top:18px}.tour-skip-symbol .tour-person{width:28px;height:28px}.tour-skip-symbol>span{font-size:32px}.tour-timer{font-size:40px;font-weight:800}.tour-timer span{font-size:40px;border:2px solid;border-radius:50%;width:56px;height:56px;line-height:50px}.tour-message{border:2px solid;border-radius:14px;padding:16px;width:88px}.tour-message b{font-size:28px}.tour-message span:last-child{border-radius:50%;background:#174d43;color:white;width:25px}.tour-settings-symbol{margin-top:30px;font-size:36px}@keyframes tour-tap{0%,55%,100%{transform:translateY(5px)}25%{transform:translateY(-3px)}}@keyframes tour-swipe{0%,100%{transform:translateX(-22px)}50%{transform:translateX(30px)}}@media(max-height:650px){#inter-tour .tour-visual{height:210px;margin:8px 0;padding:12px}#inter-tour .tour-card{width:58px}#inter-tour .tour-big{width:82px}#inter-tour h2{margin:8px 0}.tour-options{margin-bottom:10px}}@media(prefers-reduced-motion:reduce){.tour-finger{animation:none!important}}
.brand-lockup{display:flex;flex-direction:column;align-items:flex-start;gap:3px;flex-shrink:0}.brand-lockup .brand{line-height:1}.brand-lockup .practice,.entry header .brand-lockup>span{font-size:10px;letter-spacing:1.6px;line-height:1.4;white-space:nowrap}.tour-multiple{display:flex;gap:12px}.tour-multiple>div{position:relative;border:2px solid #b9802c;border-radius:8px;padding:3px}.tour-multiple>div>span{position:absolute;right:-7px;top:-12px;background:#174d43;color:white;width:24px;height:24px;line-height:24px;border-radius:50%;font-weight:700}.tour-group-play{display:flex;align-items:center;gap:20px;margin-top:20px}.tour-reorder{display:flex;align-items:center;gap:20px}.tour-reorder .tour-touch{transform:translateY(-16px)}.tour-reorder-arrow{font-size:25px;margin-top:30px}.tour-sort-hint{font-size:15px;letter-spacing:2px;margin-top:8px}.tour-ace-route{display:flex;align-items:center;gap:12px;margin-top:14px}.tour-ace-route>div{display:flex;align-items:center;flex-direction:column}.tour-ace-route .tour-person{width:45px;height:45px}.tour-ace-route>div>span{font-weight:700;font-size:16px}.tour-ace-route .tour-skipped{color:#9b4934}.tour-ace-route .tour-skipped>span{font-size:22px}#inter-tour .tour-ace-card .tour-card{width:60px}
.tour-drop-table{display:flex;align-items:center;justify-content:center;gap:14px;width:170px;padding:8px;background:#174d43;border-radius:18px;color:#fff}.tour-drop-table>span{font-size:30px;border:2px dashed #ffffff70;border-radius:6px;padding:4px}#inter-tour .tour-drop-table .tour-card{width:38px}.tour-drag-path{font-size:28px;line-height:32px}.tour-drag-row{display:flex;gap:4px;align-items:flex-end}#inter-tour .tour-drag-row .tour-card{width:48px}.tour-drag-row>.tour-touch{animation:tour-drag 2.8s ease-in-out infinite}.tour-drag-row .tour-finger{width:38px;height:44px;bottom:-18px;animation:none}@keyframes tour-drag{0%,100%{transform:translateY(0)}55%,75%{transform:translateY(-48px)}}@media(prefers-reduced-motion:reduce){.tour-drag-row>.tour-touch{animation:none;transform:translateY(-12px)}}
#discard-stage{position:relative;isolation:isolate;touch-action:pan-y;cursor:grab;border-radius:10px}#discard-stage:focus-visible{outline:3px solid #f4cb7a;outline-offset:5px}#discard-stage img{user-select:none;pointer-events:none}#discard #top{position:relative;z-index:2;transition:transform 220ms ease;transform-origin:50% 75%}#discard #discard-under{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;z-index:1;transition:transform 220ms ease;transform:translate(-3px,3px) rotate(-3deg)}#discard-stage.browsing #top{transform:translate(25%,-13%) rotate(7deg)}#discard-stage.browsing #discard-under{transform:translate(-28%,7%) rotate(-7deg)}#discard #discard-history-badge{position:absolute;z-index:3;bottom:4px;left:50%;transform:translateX(-50%);background:#123c35ed;color:#fff3d7;border:1px solid #ffffff60;border-radius:14px;padding:3px 8px;line-height:1.2;font-size:11px;letter-spacing:0;white-space:nowrap;pointer-events:none}#discard-stage.browsing #discard-history-badge{bottom:-16px}@media(prefers-reduced-motion:reduce){#discard-stage img{transition:none!important}}

/* Type: Instrument Sans for reading, Bricolage Grotesque for headings, brand and main actions. Self-hosted, OFL. */
@font-face{font-family:"Bricolage Grotesque";src:url(fonts/bricolage-grotesque.woff2?v=e2890cf2eaba46b3) format("woff2-variations"),url(fonts/bricolage-grotesque.woff2?v=e2890cf2eaba46b3) format("woff2");font-weight:200 800;font-stretch:75% 100%;font-display:swap}
@font-face{font-family:"Instrument Sans";src:url(fonts/instrument-sans.woff2?v=e2890cf2eaba46b3) format("woff2-variations"),url(fonts/instrument-sans.woff2?v=e2890cf2eaba46b3) format("woff2");font-weight:400 700;font-display:swap}
:root{--font-display:"Bricolage Grotesque","Arial Narrow",Arial,sans-serif;--font-body:"Instrument Sans",Arial,Helvetica,sans-serif;font-family:var(--font-body)}
h1,h2,.brand,.table-mark,#status,.selection-count,.rankchoices button,#play,#solo,#inter-tour .tour-next{font-family:var(--font-display)}
h1,h2{font-weight:800;font-stretch:86%;letter-spacing:-.01em;text-wrap:balance}
.brand{font-weight:800;font-stretch:78%;letter-spacing:-.01em}
.table-mark{font-weight:800;font-stretch:75%}
#status{font-weight:700;font-size:18px}
#play,#solo{font-weight:700;letter-spacing:.01em}
.tour-power{flex-wrap:wrap;justify-content:center;gap:10px 12px}
#inter-tour .tour-power .tour-card{width:52px}
.tour-power .tour-pill{font-size:15px!important;min-width:0!important;white-space:nowrap}
.settings-field+.settings-field{margin-top:16px}
.flying-card{position:fixed;z-index:40;pointer-events:none;border-radius:8px;filter:drop-shadow(0 6px 10px #0005);will-change:transform}

/* Last-card moment: the table dims and the last card waits in a five-second ring. */
#last-card{position:fixed;inset:0;z-index:45;display:grid;place-items:center;align-content:center;gap:16px;padding:24px;text-align:center;color:#F7F2E8;background:radial-gradient(circle at 50% 45%,rgba(12,44,37,.62),rgba(4,14,11,.9));-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
#last-card[hidden]{display:none}
.lc-secs{margin:0}.lc-secs b{display:block;font-family:var(--font-display);font-size:64px;font-weight:800;font-stretch:78%;line-height:1;font-variant-numeric:tabular-nums}
.lc-secs span,.lc-title small{display:block;font:600 12px/1.4 var(--font-body);letter-spacing:.14em;text-transform:uppercase;opacity:.75}
.lc-card{position:relative;width:min(62vw,250px);aspect-ratio:1;border:0;background:none;padding:0;min-height:0;display:grid;place-items:center;cursor:pointer;touch-action:manipulation}
.lc-card img{width:60%;border-radius:12px;transform:rotate(-4deg);filter:drop-shadow(0 16px 30px #000a)}
.lc-ring{position:absolute;inset:0;width:100%;height:100%;transform:rotate(-90deg)}
.lc-track{fill:none;stroke:#ffffff24;stroke-width:8}
.lc-fill{fill:none;stroke:#F7F2E8;stroke-width:8;stroke-linecap:round}
.lc-title{margin:0;font-family:var(--font-display);font-size:30px;font-weight:800;font-stretch:86%}
#last-card.safe .lc-fill{stroke:#7FD6A5}#last-card.safe .lc-title{color:#7FD6A5}
@media (prefers-reduced-motion:no-preference){.lc-card img{animation:lc-breathe 1.1s ease-in-out infinite}#last-card.safe .lc-card img{animation:lc-pop .45s ease-out}#last-card:not([hidden]){animation:lc-in .22s ease-out}.catch-now{animation:catch-pulse 1s ease-in-out infinite}}
@keyframes lc-breathe{50%{transform:scale(1.04) rotate(-4deg)}}@keyframes lc-pop{50%{transform:scale(1.1) rotate(-4deg)}}@keyframes lc-in{from{opacity:0}}
.catch-now{display:block;margin:6px auto 0;min-height:34px;padding:0 14px;border:0;border-radius:99px;background:#FFB020;color:#242923;font:800 14px/1 var(--font-display);box-shadow:0 4px 12px #0005}
@keyframes catch-pulse{50%{transform:scale(1.07)}}
.lc-card:focus-visible{outline:none}.lc-card:focus-visible .lc-track{stroke:#e7b866;stroke-width:10}

/* Chat sheet: slides up from the bottom and keeps the table in view. */
#chat-sheet{position:fixed;left:0;right:0;bottom:0;z-index:35;height:min(62dvh,560px);max-width:720px;margin:0 auto;display:flex;flex-direction:column;background:#F4EEE3;color:#293c32;border-radius:22px 22px 0 0;box-shadow:0 -12px 40px #0006;padding-bottom:env(safe-area-inset-bottom)}
#chat-sheet[hidden]{display:none}#chat-sheet.full{height:92dvh}
.sheet-grip{display:block;width:100%;min-height:22px;padding:8px 0 4px;border:0;background:none;cursor:grab}
.sheet-grip::before{content:"";display:block;width:44px;height:5px;margin:0 auto;border-radius:3px;background:#29473740}
.sheet-head{display:flex;align-items:center;gap:8px;padding:0 12px 8px 16px;touch-action:none}
#chat-threads{display:flex;gap:6px;overflow-x:auto;flex:1;scrollbar-width:none}
#chat-threads button{position:relative;flex:none;min-height:36px;padding:0 14px;border-radius:99px;border:1px solid #29473730;background:transparent;color:#293c32;font-weight:600;font-size:14px;white-space:nowrap}
#chat-threads button[aria-selected=true]{background:#174d43;border-color:#174d43;color:#F7F2E8}
.thread-dot{position:absolute;top:4px;right:6px;width:8px;height:8px;border-radius:50%;background:#C8322C}
#chat-close{width:40px;min-height:40px;border-radius:50%;background:#29473712;color:#293c32;font-size:22px;line-height:1;flex:none}
#chat-sheet #table-chat{flex:1;display:flex;flex-direction:column;min-height:0;margin:0;padding:0 14px 12px;border:0}
#chat-sheet #table-chat>h2,#chat-sheet #chat-audience{display:none}
#chat-sheet #chat-feed{flex:1;max-height:none;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:6px;padding:6px 2px}
#chat-sheet .chat-message{max-width:78%;margin:0;padding:9px 13px;border-radius:18px;background:#fff}
#chat-sheet .chat-message.theirs{align-self:flex-start;border-bottom-left-radius:6px}
#chat-sheet .chat-message.mine{align-self:flex-end;background:#174d43;color:#F7F2E8;border-bottom-right-radius:6px}
#chat-sheet .chat-message.private-message{border-left:0}
#chat-sheet .chat-message b{font-size:12px}#chat-sheet .chat-message p{margin:2px 0 0;font-size:15px}
#chat-sheet .chat-empty{margin:auto;text-align:center;color:#637468}
#chat-sheet #chat-suggestions{margin:6px 0;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
#chat-sheet #chat-suggestions button{flex:none}
#chat-sheet .chat-input-wrap{position:relative}
#chat-sheet #chat-input{min-height:48px;max-height:110px;border-radius:24px;padding:12px 56px 12px 16px;resize:none}
#chat-sheet #chat-send{position:absolute;right:5px;bottom:5px;width:40px;height:40px;min-height:40px;padding:0;border:0;border-radius:50%;background:#174d43;color:#fffaf0;display:grid;place-items:center}
#chat-open{border:1px solid #ffffff50;border-radius:50%;width:44px;display:grid;place-items:center;color:inherit}
/* Speech bubbles pop from the sender's portrait. */
.opponent{position:relative}
.chat-bubble{position:fixed;transform:translate(-50%,0);z-index:30;width:max-content;max-width:min(190px,44vw);min-height:0;padding:7px 11px;border:0;border-radius:14px;background:#F7F2E8;color:#242923;font-size:13px;line-height:1.3;text-align:left;box-shadow:0 6px 16px #0005;white-space:normal}
.chat-bubble::after{content:"";position:absolute;left:calc(50% + var(--tail,0px));top:-6px;margin-left:-6px;border:6px solid transparent;border-top:0;border-bottom-color:#F7F2E8}
/* Player sheet: a short card for one player. */
#player-sheet{position:fixed;inset:0;z-index:36;display:flex;align-items:flex-end;justify-content:center;background:#0005}
#player-sheet[hidden]{display:none}
#player-sheet .sheet-card{position:relative;width:min(100%,480px);display:grid;justify-items:center;gap:10px;padding:26px 20px calc(22px + env(safe-area-inset-bottom));background:#F4EEE3;color:#293c32;border-radius:22px 22px 0 0;box-shadow:0 -12px 40px #0006}
#player-sheet h2{margin:0;font-size:24px}.sheet-status{margin:0;color:#637468}
#player-sheet .sheet-hero .avatar{width:96px;height:96px;margin:0}
#player-sheet button:not(.sheet-x){width:100%;min-height:50px;border-radius:14px;font-weight:700}
.sheet-message{background:#174d43;color:#F7F2E8}.sheet-quiet{background:transparent;color:#293c32;border:1px solid #29473740!important}
#player-sheet .sheet-catch{margin:0;animation:none}
.sheet-x{position:absolute;right:12px;top:10px;width:40px;min-height:40px;border-radius:50%;background:#29473712;color:#293c32;font-size:22px}
.players-control+.players-control{margin-left:0}
#chat-sheet #chat-input{height:48px;min-height:48px;line-height:1.4}

/* Fanned hand: whole cards in a gentle arc, above a compact heading, clear of the Play bar. */
.hand-heading{min-height:0;padding:6px 16px 0}
#own-avatar .avatar{width:40px;height:40px}
.hand-heading .me-label>b{align-self:end}
.hand-heading select{align-self:center;min-height:36px;padding:0 10px;border:1px solid #29473730;border-radius:99px;font-size:13px}
.hand-area:not(.expanded) #hand{padding:24px 44px 26px}
.hand-heading{padding-right:150px}
.hand-area .handle{top:10px}
.hand-area:not(.expanded) #hand .card{transform:translateY(var(--y,0px)) rotate(var(--r,0deg));transform-origin:50% 92%}
.hand-area:not(.expanded) #hand .card.selected{transform:translateY(calc(var(--y,0px) - 24px)) rotate(var(--r,0deg))}
.hand-area:not(.expanded) #hand.hand-browsing .card.browse-card{transform:translateY(-14px) rotate(0deg)}
@media (max-height:880px){
 .table{min-height:0;padding:4px 16px 6px}
 .pile{width:clamp(90px,24vw,116px)}
 #status{margin:4px 0 10px}
 .pile span{padding-top:7px}
 #notice{margin-top:6px;min-height:22px}
 .hand-area:not(.expanded) #hand .card{flex-basis:104px;width:104px;margin-right:-46px}
 .hand-area:not(.expanded) #hand .card:last-child{margin-right:0}
}

/* Cards that can be played together glow gold; nothing covers the corner rank and suit. */
.card.assist-multiple{box-shadow:0 0 0 3px #E3B45A,0 0 16px #E3B45A99}

/* ---- Table layout after the Late Table mockup: the hand on the felt, big piles, a two-button bar. */
.hand-area{background:transparent;box-shadow:none;color:#F7F2E8}
.hand-heading{color:#F7F2E8}.hand-area.my-turn .hand-heading .me-label>b{color:#E3B45A}
.hand-heading #handcount{color:#cfdcd4}
.hand-heading select{color:#F7F2E8;border-color:#ffffff40;background:transparent}
.hand-heading select option{color:#14201C}
.hand-area .handle button{color:#cfdcd4}
.hand-area.expanded{background:rgba(6,24,20,.72);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);border-radius:22px 22px 0 0}
.hand-area:not(.expanded) #hand .card{flex-basis:128px;width:128px;margin-right:-62px}
.hand-area:not(.expanded) #hand .card:last-child{margin-right:0}
.hand-area:not(.expanded) #hand .card img{box-shadow:0 8px 18px #0006}
.piles{gap:22px}
.pile{width:clamp(118px,35vw,152px)}
#discard{display:flex;flex-direction:column;align-items:center}
#request{margin-top:10px;padding:7px 12px!important;border-radius:99px;background:#F7F2E8;color:#14201C!important;font:700 12px/1 var(--font-body);letter-spacing:.12em!important;text-transform:uppercase;white-space:nowrap}
.pile>span{letter-spacing:.14em}
#notice{display:inline-block;align-self:center;padding:7px 14px;border-radius:99px;background:rgba(0,0,0,.28);color:#F7F2E8;font-weight:600}
#notice:empty{display:none}
.opponent{padding-top:2px}
.opponent .avatar.portrait{width:62px;height:62px}
.opp-count{position:absolute;left:calc(50% + 14px);top:40px;z-index:3;min-width:24px;width:max-content;white-space:nowrap;height:24px;padding:0 6px;border-radius:8px;background:#F7F2E8;color:#14201C;font:800 13px/24px var(--font-display);text-align:center;box-shadow:0 2px 6px #0005}
.opp-count.last{background:#fff;box-shadow:0 0 0 2px #0B231E,0 0 0 4px #fff}
.opponent small{color:#cfdcd4;min-height:16px}
.hand-area .actions{background:linear-gradient(transparent,rgba(8,30,25,.92) 30%);color:#F7F2E8;flex-wrap:wrap;gap:8px 10px;padding-top:6px}
.hand-area .actions>#selection{flex:1 1 100%;order:-1;text-align:center;font-size:12px;color:#cfdcd4}
#selection .selection-count{font-size:14px}#selection .selection-effect{font-size:13px;color:#E3B45A}
.hand-area .actions button{min-height:56px;border-radius:16px;font:800 18px/1 var(--font-display)}
.hand-area .actions #draw-now,.hand-area .actions #pass{flex:0 0 96px;background:rgba(0,0,0,.32);color:#F7F2E8;border:1px solid #ffffff2a}
.hand-area .actions #play{flex:1 1 auto;background:#F7F2E8;color:#14201C}
.hand-area .actions #play b{font-weight:800;margin-left:4px}
.hand-area .actions #play:disabled{opacity:.45}
#draw-now.assist-draw{box-shadow:0 0 0 3px #E3B45A}
footer{background:transparent;color:#cfdcd4}footer button{color:#cfdcd4}
/* Sized by viewport height so the whole hand and the button bar fit on a phone without scrolling. */
.hand-area:not(.expanded) #hand .card{--w:clamp(96px,16.5vh,132px);flex-basis:var(--w);width:var(--w);margin-right:calc(var(--w) * -.48)}
.pile{width:min(35vw,clamp(96px,17vh,152px))}
@media (max-height:860px){
  #opponents{padding-top:2px;padding-bottom:2px}
  .opponent .avatar.portrait{width:54px;height:54px}.opp-count{top:32px}
  .table{padding-top:0;padding-bottom:2px}
  #status{margin:0 0 4px}
  .opponent .avatar{margin-bottom:3px}.opponent small{margin-top:1px}
  #request{margin-top:6px;padding:5px 10px!important;font-size:11px}
  .pile>span{padding-top:6px}
  #notice{min-height:0;margin-top:4px;padding:4px 12px;font-size:12px;white-space:nowrap;max-width:calc(100% - 32px);overflow:hidden;text-overflow:ellipsis}
  .hand-heading{padding-top:0}.hand-heading select,.hand-area .handle button{min-height:34px}
  #hand{padding-top:30px!important;margin-top:-18px;padding-bottom:2px!important;min-height:0}
  .hand-area .actions{padding-top:2px;padding-bottom:max(8px,env(safe-area-inset-bottom))}
  .hand-area .actions button{min-height:52px}
}
/* ---- Exit door in the top bar, and emotes. */
#app>header #exit-table{display:grid;place-items:center;order:10;margin-left:6px}
.visually-hidden{position:absolute!important;top:0;left:0;margin:0;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
#emote-toggle{position:absolute;right:12px;bottom:6px;z-index:5;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:rgba(0,0,0,.28);border:1px solid #ffffff2a;color:#F7F2E8}
#emote-toggle[aria-expanded="true"]{background:#F7F2E8;color:#14201C}
#emote-tray{position:absolute;right:12px;bottom:56px;z-index:6;display:flex;flex-direction:column;gap:8px;padding:8px;border-radius:30px;background:rgba(6,24,20,.86);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);box-shadow:0 10px 26px #0007}
#emote-tray[hidden]{display:none}
#emote-tray button{width:44px;height:44px;border-radius:50%;background:#ffffff14;color:#F7F2E8;font:800 16px/1 var(--font-display);display:grid;place-items:center}
#emote-tray button:hover,#emote-tray button:focus-visible{background:#ffffff2e}
#emote-tray [data-emote="eyes"],#emote-tray [data-emote="fire"]{font-size:22px}
.emote-pop{position:fixed;z-index:60;pointer-events:none;transform:translate(-50%,-120%);min-width:44px;height:44px;padding:0 10px;border-radius:22px;display:grid;place-items:center;background:#F7F2E8;color:#14201C;font:800 20px/1 var(--font-display);box-shadow:0 8px 20px #0006}
.emote-pop.emote-eyes,.emote-pop.emote-fire{background:transparent;box-shadow:none;font-size:38px;filter:drop-shadow(0 4px 6px #0007)}
.emote-pop.emote-wow{background:#E5226E;color:#fff}
/* ---- Shareable result card. */
#results .share-result{display:inline-flex;align-items:center;justify-content:center;gap:8px;margin:10px auto 0;padding:0 20px;min-height:48px;border-radius:24px;background:#E3B45A;color:#14201C;font:800 16px/1 var(--font-display)}
.result-card-preview{display:block;width:100%;max-width:340px;margin:8px auto 14px;border-radius:18px;box-shadow:0 12px 30px #0004}
.result-card-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
/* ---- Round history as the Moves tab of the chat sheet. */
#chat-sheet.moves #table-chat{display:none}
#chat-sheet:not(.moves) #play-history{display:none}
#chat-sheet #play-history{flex:1;min-height:0;overflow-y:auto;border:0;padding:4px 18px 18px}
#chat-sheet #play-history>h2{display:none}
/* The top bar holds only icons, evenly spaced after the wordmark. */
#app>header{justify-content:flex-start;gap:8px}
#app>header>.brand-lockup{margin-right:auto}
#app>header>:not(.brand-lockup){margin-left:0!important;margin-right:0!important}
/* ---- Card backs: picker in Settings and the unlock toast. */
.back-picker h3{margin:18px 0 8px;font:700 16px/1.2 var(--font-display)}
.back-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:10px}
.back-grid button{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;margin:0;padding:8px 6px 10px;border-radius:14px;background:#fff;color:#293c32;border:2px solid transparent;min-height:0}
.back-grid button img{width:64px;border-radius:6px;box-shadow:0 3px 8px #0003}
.back-grid button b{font-size:13px}
.back-grid button small{font-size:11px;line-height:1.25;text-align:center;color:#637468}
.back-grid button[aria-checked="true"]{border-color:#174d43;box-shadow:0 0 0 2px #E3B45A inset}
.back-grid button[aria-disabled="true"]{cursor:default}
.back-grid button[aria-disabled="true"] img{filter:grayscale(1) brightness(1.15);opacity:.45}
.back-lock{position:absolute;top:2px;right:calc(50% - 44px);width:24px;height:24px;padding:3px;border-radius:50%;background:#fff;color:#293c32;box-shadow:0 2px 6px #0003}
.back-progress{display:block;width:70%;height:4px;border-radius:2px;background:#e3ddd2;overflow:hidden}
.back-progress i{display:block;height:100%;background:#174d43}
.back-unlocked{position:fixed;top:max(12px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:70;display:flex;align-items:center;gap:12px;width:min(92vw,380px);padding:10px 12px;border-radius:18px;background:#F7F2E8;color:#14201C;box-shadow:0 12px 30px #0006}
.back-unlocked img{width:40px;border-radius:5px}
.back-unlocked div{flex:1;display:flex;flex-direction:column}
.back-unlocked b{font:800 15px/1.2 var(--font-display)}.back-unlocked span{font-size:13px;color:#4c5d52}
.back-unlocked button{min-height:40px;padding:0 14px;border-radius:20px;background:#174d43;color:#F7F2E8;font-weight:700}
.back-unlocked .back-unlocked-x{background:none;color:#4c5d52;padding:0 6px;font-size:20px}
.hand-area{padding-bottom:0}
.result-card-apps{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:14px}
.result-card-apps p{flex:1 1 100%;margin:0;text-align:center;font-size:13px;color:#637468}
.result-card-apps a{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;border-radius:22px;border:1px solid #29473740;color:#174d43;font-weight:700;text-decoration:none}
/* ---- Lobby: a room code big enough to read out across the table. */
#room-label{display:flex;flex-direction:column;align-items:center;gap:2px;margin:0}
#room-label small{font:600 12px/1 var(--font-body);letter-spacing:.14em;text-transform:uppercase;color:#cfdcd4}
#room-label b{font:800 44px/1.1 var(--font-display);letter-spacing:.18em;margin-right:-.18em;color:#F7F2E8;font-variant-numeric:tabular-nums}
#lobby>header #leave-lobby{display:grid;place-items:center;width:44px;padding:0}
#lobby>header{justify-content:flex-start;gap:8px}#lobby>header .brand{margin-right:auto}
/* ---- Landing: one screen, three steps. */
.landing .landing-hero{display:flex;flex-direction:column;align-items:center;text-align:center;padding:0 24px}
.landing .entry-cards{height:118px;padding-top:0;margin-bottom:6px}
.landing .entry-cards img{width:74px}
.landing h1{font:800 clamp(34px,9vw,46px)/1 var(--font-display);letter-spacing:-.02em;margin:4px 0 6px;text-wrap:balance}
.landing-lede{margin:0;color:#cfdcd4;font-size:15px;max-width:30ch}
.landing .entry-form{max-width:440px;padding:14px 16px 24px}
.landing-steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.landing-step{display:grid;grid-template-columns:30px 1fr;gap:12px;padding:14px 14px 16px 12px;border-radius:22px;background:#00000026;border:1px solid #ffffff14}
.step-num{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#F7F2E8;color:#14201C;font:800 15px/1 var(--font-display)}
.step-body{min-width:0;display:flex;flex-direction:column;gap:8px}
.step-title{margin:4px 0 0;font:800 19px/1 var(--font-display);color:#F7F2E8}
.landing #step-you label{font-size:13px;color:#cfdcd4;margin:0}
.landing #nickname{margin:0}
.landing .avatar-picker{margin:4px 0 0;border:0;padding:0}
.landing .avatar-picker legend{font-size:13px;color:#cfdcd4;padding:0;margin-bottom:6px}
.mode-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.mode-picker button{display:flex;flex-direction:column;align-items:center;gap:3px;min-height:96px;padding:12px 6px 10px;border-radius:18px;background:#ffffff0d;border:1.5px solid #ffffff26;color:#F7F2E8;text-align:center}
.mode-picker button[hidden]{display:none}
.mode-picker button b{font:800 15px/1.1 var(--font-display)}
.mode-picker button small{font-size:11.5px;color:#cfdcd4;line-height:1.2}
.mode-picker button[aria-checked="true"]{background:#F7F2E8;color:#14201C;border-color:#F7F2E8;box-shadow:0 0 0 3px #E3B45A66}
.mode-picker button[aria-checked="true"] small{color:#4c5d52}
.join-panel{display:flex;flex-direction:column;gap:6px;margin-top:4px}
.join-panel[hidden]{display:none}
.join-panel .join-heading{font-size:13px;color:#cfdcd4;margin:0}
.landing .room-code-input{display:flex;gap:8px;align-items:center}
.landing #roomcode{flex:1;min-width:0;height:60px;margin:0;border-radius:16px;text-align:center;font:800 30px/1 var(--font-display);letter-spacing:.32em;text-indent:.32em;text-transform:uppercase}
.landing #roomcode::placeholder{color:#14201C33}
.landing #go{width:100%;min-height:58px;margin:0;border-radius:29px;font:800 19px/1 var(--font-display);background:#F7F2E8;color:#14201C}
.landing #go.waiting{opacity:.55}
.landing #entryerror{margin:0;min-height:0;text-align:center}
.landing #entryerror:empty{display:none}
.landing-actions{display:none!important}
.landing #home-return-actions{margin-top:12px}
.landing .entry-note{margin:14px 0 0;font-size:13px}
.landing .pilot-links{margin-top:10px;display:flex;flex-wrap:wrap;justify-content:center;gap:4px 14px}
.landing .pilot-links button{min-height:36px;padding:0;background:none;border:0;color:#cfdcd4;font-size:13px;text-decoration:underline;text-underline-offset:3px}
@media (min-width:700px){.landing .entry-cards{height:150px}.landing .entry-cards img{width:96px}}
.landing #room-options{border:0;background:none;padding:0;border-radius:0}
.landing #step-go{align-items:center}
.landing .entry-form>.pilot-settings{display:none}
/* A selected card rises 24px; the hand keeps that much headroom and tucks under the heading row,
   whose empty space lets taps through to the cards. */
.hand-heading{position:relative;z-index:4;pointer-events:none}
.hand-heading>*,.hand-heading select,.hand-heading button,#own-avatar{pointer-events:auto}
.hand-area .actions>#selection{display:flex;justify-content:center;align-items:baseline;gap:8px;white-space:nowrap;line-height:17px}.hand-area .actions>#selection>*{display:inline}
.hand-area .actions>#selection,.hand-area .actions>#selection *{line-height:17px;height:17px}
/* Heroes on the landing share the step's width: seven equal columns that shrink with the screen. */
.landing .avatar-picker>div{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.landing .avatar-picker>div>button{width:100%;aspect-ratio:1;padding:2px;border-radius:50%;display:grid;place-items:center}
.landing .avatar-picker>div>button .portrait,.landing .avatar-picker>div>button .avatar{width:100%;height:100%;margin:0}
.landing .avatar-picker .personal-avatar-create svg{width:26px;height:26px}
.landing .avatar-picker .personal-avatar-create{font-size:26px;line-height:1;color:#f1d5a0}
/* ---- Tutorial coach card, pinned under the top bar. */
#coach{position:fixed;top:calc(64px + env(safe-area-inset-top,0px));left:12px;right:12px;z-index:30;max-width:460px;margin:0 auto;padding:12px 14px 14px;border-radius:20px;background:#F7F2E8;color:#14201C;box-shadow:0 14px 34px #0007}
#coach[hidden]{display:none}
.coach-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.coach-step{font:700 11px/1 var(--font-body);letter-spacing:.12em;text-transform:uppercase;color:#637468}
.coach-skip{min-height:32px;padding:0 4px;background:none;border:0;color:#4c5d52;font-size:13px;text-decoration:underline;text-underline-offset:3px}
.coach-title{margin:4px 0 4px;font:800 19px/1.15 var(--font-display)}
.coach-body{margin:0;font-size:14.5px;line-height:1.4}
.coach-note{margin:0 0 6px;padding:6px 10px;border-radius:10px;background:#E3B45A40;font-size:13.5px;font-weight:600}
.coach-note[hidden]{display:none}
.coach-ok{margin-top:10px;width:100%;min-height:46px;border-radius:23px;background:#174d43;color:#F7F2E8;font:800 16px/1 var(--font-display)}
.coach-ok[hidden]{display:none}
.tour-tutorial{display:block;width:100%;margin:6px 0 10px;min-height:46px;border-radius:23px;background:#174d43;color:#F7F2E8;font-weight:700}
/* ---- Landing carousel: who's playing → how → room code. */
.landing-carousel{overflow:hidden;margin:4px 0 0;padding:4px 0}
.landing-dots{display:flex;justify-content:center;gap:6px;margin:0 0 10px}
.landing-dots[hidden]{display:none}
.landing-dots i{width:7px;height:7px;border-radius:4px;background:#ffffff40;transition:width .25s,background .25s}
.landing-dots i.on{width:22px;background:#F7F2E8}
.landing-track{display:flex;align-items:flex-start;transform:translateX(calc(var(--slide,0) * -100%));transition:transform .34s cubic-bezier(.22,1,.36,1)}
.landing-slide{flex:0 0 100%;min-width:0;position:relative;display:flex;flex-direction:column;gap:10px;padding:16px 16px 18px;border-radius:24px;background:#00000026;border:1px solid #ffffff14}
.slide-title{display:flex;align-items:center;gap:10px;margin:2px 0 4px;font:800 21px/1.15 var(--font-display);color:#F7F2E8}
.slide-back{position:absolute;top:10px;right:10px;width:40px;height:40px;min-height:40px;padding:0;border-radius:50%;display:grid;place-items:center;background:#ffffff14;color:#F7F2E8;border:0}
#slide-play .slide-title,#slide-join .slide-title{padding-right:46px}
.landing-slide label{font-size:13px;color:#cfdcd4;margin:0}
.landing #landing-next,.landing #go{width:100%;min-height:56px;margin:6px 0 0;border-radius:28px;font:800 19px/1 var(--font-display);background:#F7F2E8;color:#14201C}
.mode-options{display:flex;flex-direction:column;gap:10px}
.mode-option{display:flex;align-items:center;gap:14px;width:100%;min-height:84px;margin:0;padding:10px 14px;border-radius:20px;background:#ffffff0f;border:1.5px solid #ffffff22;color:#F7F2E8;text-align:left}
.mode-option:active{transform:scale(.98)}
.mode-option:focus-visible{outline:3px solid #E3B45A;outline-offset:2px}
.mode-icon{flex:none;width:62px;height:62px;border-radius:18px;display:grid;place-items:center;box-shadow:0 6px 14px #0004}
.mode-icon.small{width:40px;height:40px;border-radius:12px}.mode-icon.small svg{width:26px;height:26px}
[data-mode="bots"] .mode-icon{background:#FFB020;color:#14201C}
[data-mode="create"] .mode-icon{background:#3DBE8B;color:#0E2A22}
[data-mode="join"] .mode-icon,#slide-join .mode-icon{background:#7A4DFF;color:#fff}
.mode-text{display:flex;flex-direction:column;gap:3px;min-width:0}
.mode-text b{font:800 19px/1.1 var(--font-display)}
.mode-text small{font-size:13px;color:#cfdcd4}
.landing #entryerror{margin:10px 0 0;text-align:center}
@media (prefers-reduced-motion:reduce){.landing-track,.landing-dots i{transition:none}}
.landing-track{transition:transform .34s cubic-bezier(.22,1,.36,1),height .3s ease}
/* ---- Pilot: the one-time consent card and the after-round rating. */
#pilot-ask{position:fixed;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px));z-index:60;max-width:460px;margin:0 auto;padding:16px 16px 14px;border-radius:22px;background:#F7F2E8;color:#14201C;box-shadow:0 16px 40px #0008}
#pilot-ask h2{margin:0 0 6px;font:800 20px/1.15 var(--font-display)}
#pilot-ask p{margin:0 0 12px;font-size:14px;line-height:1.45;color:#3d4d43}
#pilot-ask div{display:flex;gap:8px}
#pilot-ask button{flex:1;min-height:48px;margin:0;border-radius:24px;font-weight:700}
#pilot-ask .pilot-yes{background:#174d43;color:#F7F2E8}
#pilot-ask .pilot-no{background:transparent;color:#174d43;border:1.5px solid #174d4355}
.round-rating{margin-top:12px;padding-top:12px;border-top:1px solid #29473725;text-align:center}
.round-rating>p{margin:0 0 6px;font-weight:700}
.round-stars{display:flex;justify-content:center;gap:4px}
.round-stars button{width:44px;height:44px;min-height:44px;margin:0;padding:0;border-radius:50%;background:none;border:0;color:#c9c1b2;font-size:28px;line-height:1}
.round-stars button.on{color:#E3B45A}
.round-comment{display:flex;gap:8px;margin-top:8px}
.round-comment[hidden]{display:none}
.round-comment textarea{flex:1;min-height:44px;max-height:110px;border-radius:14px;padding:10px 12px;font:inherit;resize:vertical}
.round-comment button{margin:0;border-radius:22px}
.round-thanks{margin:6px 0 0;font-size:13px;color:#4c5d52;min-height:0}
.round-thanks:empty{display:none}
#pilot-ask p a,.pilot-note a{color:inherit;font-weight:700;text-underline-offset:3px}
.round-comment{flex-direction:column;align-items:stretch;text-align:left}
.round-comment label{display:flex;flex-direction:column;gap:4px;font-size:13.5px;font-weight:600}
.round-comment textarea{min-height:52px}
.round-comment fieldset{border:0;margin:0;padding:0}
.round-comment legend{font-size:13.5px;font-weight:600;margin-bottom:6px}
.round-invite{display:flex;gap:8px}
.round-invite button{flex:1;min-height:42px;margin:0;border-radius:21px;background:#fff;color:#174d43;border:1.5px solid #174d4340;font-weight:700}
.round-invite button[aria-pressed="true"]{background:#174d43;color:#F7F2E8;border-color:#174d43}
.round-send{align-self:stretch;min-height:46px}
#results .round-rating .round-send{background:#174d43;color:#F7F2E8;font-weight:700;border:0}
/* ---- Lobby, styled like the landing carousel. */
.lobby .entry-form{padding-top:18px}
.lobby-slide{gap:12px}
.lobby .table-icon{background:#3DBE8B;color:#0E2A22}
.lobby .bot-icon{background:#FFB020;color:#14201C}
.lobby .room-code-display{display:flex;align-items:center;justify-content:center;gap:8px;margin:4px 0 2px}
.lobby #invite.lobby-share{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:56px;margin:0;border-radius:28px;font:800 19px/1 var(--font-display);background:#F7F2E8;color:#14201C;border:0}
.lobby-sub{margin:8px 0 0;font:700 12px/1 var(--font-body);letter-spacing:.14em;text-transform:uppercase;color:#cfdcd4}
.lobby #room-players{display:flex;flex-direction:column;gap:6px}
.lobby .room-person{display:flex;align-items:center;justify-content:space-between;padding:8px 12px 8px 8px;border-radius:16px;background:#ffffff0d;border:0}
.lobby .room-identity{display:flex;align-items:center;gap:10px;font-weight:700}
.lobby .room-person .avatar{width:40px;height:40px;margin:0}
.lobby .room-person small{color:#cfdcd4}
.lobby #host-actions{display:flex;flex-direction:column;gap:10px;margin-top:4px}
.lobby #host-actions[hidden]{display:none}
.lobby .lobby-bot{min-height:76px}
.lobby .lobby-bot:disabled{opacity:.45}
.lobby #start.lobby-deal{width:100%;min-height:56px;margin:0;border-radius:28px;font:800 19px/1 var(--font-display);background:#E3B45A;color:#14201C;border:0}
.lobby #start.lobby-deal:disabled{background:#ffffff1f;color:#cfdcd4}
.lobby #lobby-note{margin:0;text-align:center;font-size:13px;color:#cfdcd4}
/* Coach card: see-through, a close button, progress dots, and a line that says how to reach the next tip. */
#coach{background:rgba(247,242,232,.86);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding-top:8px;touch-action:none}
.coach-grip{width:36px;height:4px;border-radius:2px;background:#14201C33;margin:0 auto 6px}
.coach-top{gap:8px}
.coach-dots{display:flex;gap:4px;margin-right:auto}
.coach-dots i{width:6px;height:6px;border-radius:3px;background:#14201C2e}
.coach-dots i.on{width:16px;background:#174d43}
.coach-skip{width:36px;height:36px;min-height:36px;padding:0;border-radius:50%;display:grid;place-items:center;background:#14201C12;color:#14201C;text-decoration:none}
.coach-act{display:flex;align-items:center;gap:8px;margin:10px 0 0;padding:8px 12px;border-radius:12px;background:#174d43;color:#F7F2E8;font-size:14px}
.coach-act[hidden]{display:none}
.coach-act span{font-size:18px;line-height:1;animation:coach-nudge 1.2s ease-in-out infinite}
@keyframes coach-nudge{50%{transform:translateY(3px)}}
#hand .card.coach-target img{box-shadow:0 0 0 3px #E3B45A,0 0 22px 4px #E3B45Acc;animation:coach-glow 1.4s ease-in-out infinite}
@keyframes coach-glow{50%{box-shadow:0 0 0 3px #E3B45A,0 0 8px 1px #E3B45A88}}
@media (prefers-reduced-motion:reduce){.coach-act span,#hand .card.coach-target img{animation:none}}
.hand-area .handle button#expand{display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;border-radius:50%;background:#ffffff14;color:#F7F2E8}
.name-ask{display:flex;flex-direction:column;gap:8px}
.name-ask label{font-size:14px;font-weight:600}
.name-ask input{min-height:52px;border-radius:16px;font-size:18px;padding:0 14px}
.name-ask #name-ask-error{margin:0;min-height:0;color:#b53c37;font-size:14px}
.name-ask #name-ask-error:empty{display:none}
.name-ask button{min-height:52px;margin:6px 0 0;border-radius:26px;background:#174d43;color:#F7F2E8;font-weight:800;font-size:17px}
.card.assist-dim{opacity:.45;filter:saturate(.55) brightness(.9);transition:opacity .15s,filter .15s}
/* Hand heading: "Me · 5 cards" and a one-tap sort button; the hand spreads to the width it has. */
.hand-heading select#arrange{display:none}
.sort-pill{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 14px;border-radius:18px;background:#ffffff14;border:1px solid #ffffff26;color:#F7F2E8;font:700 13px/1 var(--font-body);white-space:nowrap}
.hand-area:not(.expanded) #hand .card{margin-right:var(--overlap,calc(var(--w,116px) * -.48))}
.hand-area:not(.expanded) #hand .card:last-child{margin-right:0}
/* "Me" matches the opponents: same portrait size and the same card-count badge (which replaces the "5 cards" line). */
.hand-heading #own-avatar .avatar{width:62px;height:62px;margin:0}
.hand-heading #own-avatar .own-count{left:auto;right:-6px;top:auto;bottom:-2px}
.hand-area:not(.expanded) #handcount{display:none}
.hand-heading>span{display:flex;align-items:center;gap:10px}
@media (max-height:860px){.hand-heading #own-avatar .avatar{width:54px;height:54px}}
/* Whose turn: a soft gold ring that slowly pulses around the active player's portrait, you included. */
.opponent.active .avatar,.hand-area.my-turn #own-avatar .avatar{border-color:#E3B45A;box-shadow:0 0 0 3px #E3B45A,0 0 14px 4px #E3B45A8c;animation:turn-pulse 1.8s ease-in-out infinite}
@keyframes turn-pulse{50%{box-shadow:0 0 0 3px #E3B45A,0 0 26px 9px #E3B45A40}}
@media (prefers-reduced-motion:reduce){.opponent.active .avatar,.hand-area.my-turn #own-avatar .avatar{animation:none}}
.hand-heading #own-avatar{margin:-18px 0 -2px}
/* "Me" with the player's nickname underneath, like the opponents' name and status lines. */
.me-label{display:flex;flex-direction:column;line-height:1.15}
.me-label small{font-size:12px;color:#cfdcd4;max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.me-label small:empty{display:none}
.hand-area.expanded .me-label small{display:none}
/* A fixed width keeps the sort button (and everything beside it) still as its label changes. */
.sort-pill{width:132px;justify-content:center}
/* "Your move" floats on a soft cloud on your turn, to catch the eye without shouting. */
#status.my-turn-label{position:relative;display:inline-block;padding:4px 16px;animation:status-float 3.2s ease-in-out infinite;will-change:transform}
#status.my-turn-label::before,#status.my-turn-label::after{content:'';position:absolute;z-index:-1;border-radius:999px;pointer-events:none}
#status.my-turn-label::before{inset:-4px -22px;background:radial-gradient(closest-side,#ffffff38,#ffffff12 60%,#ffffff00);filter:blur(5px);animation:cloud-breathe 4.8s ease-in-out infinite}
#status.my-turn-label::after{inset:6px 18% -8px;background:radial-gradient(closest-side,#E3B45A33,#E3B45A00);filter:blur(8px);animation:cloud-drift 6.4s ease-in-out infinite}
@keyframes status-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@keyframes cloud-breathe{0%,100%{transform:scale(1);opacity:.75}50%{transform:scale(1.08,1.15);opacity:1}}
@keyframes cloud-drift{0%,100%{transform:translateX(-10px)}50%{transform:translateX(10px)}}
@media (prefers-reduced-motion:reduce){#status.my-turn-label,#status.my-turn-label::before,#status.my-turn-label::after{animation:none}}
#status.my-turn-label{padding:0 16px}#status.my-turn-label::before{inset:-8px -26px;background:radial-gradient(closest-side,#ffffff55,#ffffff1c 62%,#ffffff00)}
