/* App-owned entry overlays use the existing Scene3D engine and HUD slots. */
:root{--entry-paper:#fff4dc;--entry-muted:#d3c7ae;--entry-gold:#efc56e;--entry-line:#eee0bd33;--field-line:#7a8f7c}
.entry-shell{position:relative;isolation:isolate;min-height:100dvh;background:#292c25;color:var(--entry-paper);font-family:"DM Sans",system-ui,sans-serif;overflow:hidden}
.entry-table{position:absolute;inset:0;z-index:-3}
.entry-table>[data-gosx-engine]{width:100%;height:100%}
.entry-table canvas{width:100%;height:100%}
.entry-table svg{width:100%;height:100%;object-fit:cover}
.entry-vignette{position:absolute;inset:0;background:linear-gradient(90deg,#161d19f0 0%,#161d19cb 30%,#161d1922 68%,#161d190d),linear-gradient(0deg,#121a19a0,transparent 20%);z-index:-1;pointer-events:none}
.entry-brand{position:absolute;left:clamp(24px,5vw,80px);top:32px;letter-spacing:.18em;font-size:11px;font-weight:700;color:var(--entry-paper);text-decoration:none}
.entry-overlay{width:min(510px,44vw);margin:0 0 0 clamp(24px,5vw,80px);padding:112px 0 64px;position:relative;max-height:100dvh;overflow:auto;scrollbar-width:thin;scrollbar-color:#e0bb6d55 transparent}
.entry-overlay h1{font-family:Georgia,"Times New Roman",serif;font-weight:400;font-size:clamp(38px,4vw,60px);line-height:1.05;letter-spacing:-.04em;margin:18px 0 22px}
.entry-overlay h1 em{font-weight:400;color:var(--entry-gold)}
.entry-overlay p{margin:12px 0;line-height:1.6}
.entry-kicker{color:var(--entry-gold);letter-spacing:.17em;font-size:10px;font-weight:700}
.entry-intro{color:var(--entry-muted);font-size:17px;max-width:450px}
.entry-overlay form{margin:0}
.entry-overlay a{color:var(--entry-paper);text-underline-offset:5px;font-size:13px}
.entry-overlay button,.entry-overlay input{font:inherit}
.entry-overlay button{cursor:pointer;border-radius:10px;min-height:48px;padding:14px 18px;transition:background .15s,transform .15s;line-height:1.25}
.entry-overlay button:hover{transform:translateY(-1px)}
.entry-overlay :is(button,a,input,summary):focus-visible,.entry-share :is(button,a,input):focus-visible,.entry-practice button:focus-visible{outline:3px solid #fff3ba;outline-offset:4px}
.entry-primary{width:100%;display:flex;justify-content:space-between;align-items:center;background:var(--entry-gold);color:#242d23;border:1px solid #ffe4a7;font-weight:700!important;margin-top:22px;box-shadow:0 8px 24px #1118}
.entry-primary:hover{background:#ffda84}
.entry-note{font-size:11px;color:var(--entry-muted);line-height:1.6}
.entry-two{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:22px 0}
.entry-secondary{width:100%;color:var(--entry-paper);border:1px solid var(--entry-line);background:#192b2485}
.entry-secondary:hover,.entry-choice:hover{background:#405448bb}
.entry-join{border-top:1px solid var(--entry-line);border-bottom:1px solid var(--entry-line);padding:16px 0;margin:20px 0}
.entry-overlay summary{cursor:pointer;font-size:14px;padding:8px 0}
.entry-join form{display:flex;align-items:end;gap:10px;margin-top:14px}
.entry-join label{display:grid;gap:8px;font-size:11px;color:var(--entry-muted);flex:1}
.entry-join input{width:100%;box-sizing:border-box;padding:14px;color:#fff5df;background:#183025;border:1px solid var(--field-line);border-radius:8px;text-transform:uppercase;letter-spacing:.15em}
.entry-join button{width:auto;white-space:nowrap}
.entry-links{display:flex;gap:14px;flex-wrap:wrap;line-height:1.8}
.entry-links a{color:var(--entry-muted)}
.entry-caption{position:absolute;bottom:18px;right:28px;color:#ffefcfbb;letter-spacing:.05em;font-size:11px;pointer-events:none}
.entry-notice{background:#506846aa;border:1px solid #d7ca9555;color:#fff2cd;padding:10px 14px;border-radius:8px;font-size:13px}
.entry-options{margin:24px 0}
.entry-options fieldset{border:0;padding:12px 0;margin:0}
.entry-options legend{font-size:12px;font-weight:700;color:var(--entry-muted)}
.entry-chips{display:flex;gap:6px;flex-wrap:wrap}
.entry-presets{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px 0}
.entry-choice{border:1px solid var(--entry-line);background:#172b23c9;color:var(--entry-paper);text-align:left;min-height:40px!important;font-size:12px!important;padding:10px 12px!important;width:100%}
.entry-choice small{display:block;color:var(--entry-muted);font-size:10px;line-height:1.5;margin-top:6px}
.entry-choice small:empty{display:none}
.entry-choice[aria-pressed=true]{border-color:var(--entry-gold);background:#65552dce;box-shadow:inset 0 0 0 1px var(--entry-gold)}
.entry-share{border-top:1px solid #e7c17433;padding-top:12px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:13px}
.entry-share p{width:100%;margin:0}.entry-share strong{letter-spacing:.15em;color:#edc36d}.entry-share input{min-width:0;flex:1;padding:8px;background:#0d2117;border:1px solid var(--field-line);border-radius:6px;color:#e9e1d0;font-size:11px}.entry-share a{color:#efc56e;display:block;width:100%;margin-top:8px}
.entry-practice{position:absolute;z-index:4;left:50%;top:82px;transform:translateX(-50%);background:#142b23ee;border:1px solid #e9c77b66;border-radius:12px;padding:10px 14px;display:flex;gap:8px;flex-wrap:wrap;align-items:center;max-width:440px;box-shadow:0 8px 24px #0004;color:#faeed7;font:12px system-ui,sans-serif}
.entry-practice strong{font-size:10px;letter-spacing:.1em;width:100%;color:#e9c77b}.entry-practice button,.entry-context button{background:#334b38;color:#fff1d2;border:1px solid #e7c17455;padding:8px 10px;border-radius:8px;cursor:pointer}.entry-practice p{width:100%;margin:0;line-height:1.4}.entry-practice p:empty{display:none}
.entry-context{position:absolute;z-index:4;left:50%;bottom:190px;transform:translateX(-50%);display:flex;gap:12px;align-items:center;border:1px solid #f6cf7a66;background:#17392cee;border-radius:10px;color:#f3eddc;padding:10px 14px;max-width:470px;font:12px/1.5 system-ui,sans-serif;box-shadow:0 4px 16px #0004;pointer-events:auto}
.entry-learn-nudge{position:absolute;z-index:4;left:20px;top:85px;font:11px system-ui,sans-serif}.entry-learn-nudge a{color:#ffe3a4}
.entry-lesson-actions{display:flex;gap:10px;flex-wrap:wrap;margin:24px 0}
.entry-lesson-choice{background:#fff2d8;color:#182d21;border:2px solid transparent;font:600 20px Georgia,serif!important;min-width:100px}
.entry-lesson-choice[data-legal=true]{border-color:#d8e8a5;box-shadow:0 0 24px #b5e58b55}
.entry-lesson-tile{min-width:64px;padding:6px;display:grid;place-items:center}
.entry-lesson-tile svg{display:block;width:44px;height:96px}
.entry-knock-pad{background:#72553b;color:#fff0d7;border:2px solid #c99d64;min-height:80px!important;min-width:240px;margin-bottom:10px;touch-action:manipulation}
.entry-text-button{background:transparent;border:0;color:var(--entry-muted);padding:8px 0!important;min-height:36px!important;font-size:12px!important}
.entry-overlay progress{width:100%;height:4px;accent-color:var(--entry-gold)}
/* The lesson board sits in the top third of the desktop view; start the copy below it. */
@media(min-width:701px) and (min-height:700px){.entry-overlay:has(>progress){padding-top:max(112px,38dvh)}}
/* At 700px and below the copy covers the 3D table, so the lesson shows a close-up of the line above its title instead
   (lessonBoard in tutorial.go). The slots and their labels get a dark fill and a cream edge that read on every theme's
   felt. Both slots look alike: the board never says which tile fits. */
.entry-lesson-board{display:none;margin:0}
@media(max-width:700px){
 .entry-overlay:has(>progress){padding-top:56px}
 .entry-overlay:has(>progress) h1{font-size:32px;margin:8px 0 10px}
 .entry-overlay:has(>progress) .entry-lesson-actions{margin:16px 0}
 .entry-lesson-board{display:block;max-width:520px;margin:14px 0 2px;overflow:hidden;border-radius:12px;box-shadow:0 0 0 1px #e7c17455,0 8px 24px #1118}
 .entry-lesson-board svg{display:block;width:100%;height:auto}
 .entry-lesson-board svg rect[stroke]{fill:#0000004d;stroke:#fff4dc;stroke-width:.04}
 .entry-lesson-board svg text[font-family]{fill:#fff4dc;font-size:.2px;font-weight:700;paint-order:stroke;stroke:#000000b3;stroke-width:.05px;stroke-linejoin:round}
}
@media(max-width:700px) and (max-height:520px){.entry-lesson-board{width:min(100%,300px)}}
@media(max-width:700px){.entry-vignette{background:linear-gradient(90deg,#15201cee,#15201ccc 70%,#15201c88)}.entry-overlay{width:auto;margin:0 24px;max-height:100dvh;padding:88px 0 44px}.entry-brand{top:24px;left:24px}.entry-overlay h1{font-size:44px}.entry-intro{font-size:15px}.entry-caption{display:none}.entry-two{gap:8px}.entry-secondary{font-size:12px!important}.entry-practice{top:78px;width:230px;left:50%}.entry-context{bottom:195px;width:calc(100% - 62px);font-size:11px}.entry-learn-nudge{top:150px;left:15px}.entry-presets{grid-template-columns:1fr 1fr}.entry-share input{flex-basis:60%}}
@media(prefers-reduced-motion:reduce){.entry-overlay button{transition:none}.entry-overlay button:hover{transform:none}}
.entry-skip{position:absolute;left:24px;top:-80px;z-index:20;color:#172c21;background:#ffedb6;padding:12px;border-radius:8px}.entry-skip:focus{top:10px}
.entry-shell{max-width:none;margin:0;padding:0;width:100%}.entry-shell .table-seat-label,.entry-shell .table-end-label{display:none}
/* Hints sit above the line and yield to every HUD dialog. */
.entry-context{top:190px;bottom:auto}.entry-practice{left:24px;transform:none;top:90px;width:260px}
.hud-shell:has(.hud-overlays:not([data-panel=""])) :is(.entry-context,.entry-practice,.entry-learn-nudge){display:none}
@media(max-width:700px){.entry-context{top:220px;bottom:auto}.entry-practice{left:12px;top:78px;width:230px}}
.hud-shell:has(#onboarding-preferences[data-practice="true"]) .entry-learn-nudge{top:290px}
.entry-share input{flex-basis:100%;width:100%;box-sizing:border-box}

/* Entry has one primary action. Game chrome stays in the HUD. */
.dropin-landing{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;padding:max(24px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right));box-sizing:border-box;background:#122b22;color:#f1ead9;font:16px/1.4 system-ui,sans-serif}
.dropin-landing h1{font:600 clamp(44px,7vw,68px)/1.1 system-ui,sans-serif;letter-spacing:-.04em;margin:0 0 14px}
.dropin-landing form{margin:0;width:min(280px,100%)}
.dropin-landing .entry-primary{width:100%;display:block;padding:16px 24px;font:600 18px/1.4 system-ui,sans-serif}
.dropin-landing a{color:#d3c7ae;text-underline-offset:4px}
.dropin-entry{min-height:100dvh;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:16px;background:#122b22;color:#f1ead9;font:16px system-ui}
.dropin-entry[data-auto-entry=true][data-onboarding-mounted=true] form,.dropin-entry[data-auto-entry=true][data-onboarding-mounted=true]>a{visibility:hidden}
.dropin-tables{list-style:none;padding:0;margin:0;display:grid;gap:12px;width:100%}
.dropin-table{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px;border:1px solid var(--hud-line);border-radius:12px}
.dropin-table p{margin:4px 0;overflow-wrap:anywhere;font-size:12px}
.dropin-table small{color:var(--hud-muted)}
.dropin-table form{margin:0}
.dropin-name{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.dropin-name label{flex:1;min-width:150px}
.dropin-name input{margin-top:6px}
.hud-shell .hud-tools>button:not(.hud-icon){padding:8px 12px;min-height:36px}
@media(min-width:601px){
 .hud-shell .hud-bottom{bottom:calc(var(--hud-bottom) + 52px)!important}
 .hud-shell .hud-turn-banner{bottom:calc(var(--hud-bottom) + 185px)}
}
@media(min-width:601px) and (max-height:500px){.hud-shell .hud-turn-banner{bottom:calc(var(--hud-bottom) + 150px)}}
@media(max-width:600px){.hud-shell .hud-tools{gap:5px}.hud-shell .hud-tools>button:not(.hud-icon){padding:7px 10px;font-size:12px}.entry-context{top:185px;width:auto;max-width:calc(100% - 32px);white-space:nowrap;font-size:10px;padding:6px 8px}.entry-context button{padding:2px 5px}}
@media(max-width:600px) and (orientation:portrait){
 .hud-shell .hud-tools{top:calc(var(--hud-top) + 55px)!important;bottom:auto!important}
 .hud-shell .hud-player[data-seat="0"]{max-width:190px!important}
 .hud-shell .hud-tools>button:not(.hud-icon){padding:7px 7px}
 .hud-brand>div{display:block;font-size:11px}.hud-brand .hud-mark{font-size:18px}
}

/* The guide shares the top perimeter with the seats, never the played line. */
.hud-shell .entry-learn-nudge {display:none}
.hud-shell .entry-context {top:var(--hud-top);bottom:auto;left:calc(50% + 150px);transform:none;width:max-content;max-width:calc(25% - 100px);gap:6px;padding:4px 8px;font-size:10px;white-space:nowrap;box-shadow:none}
.hud-shell:has(.hud-moment:not(:empty)) .entry-context {visibility:hidden}
.hud-shell .entry-context span {overflow:hidden;text-overflow:ellipsis}
.hud-shell .entry-context button {padding:2px 5px;min-height:24px;flex-shrink:0}
.hud-shell .entry-practice {top:auto;bottom:calc(var(--hud-bottom) + 52px);left:var(--hud-left);width:210px;padding:6px 8px}
@media (max-height:500px) and (min-width:481px) {
 .hud-shell .entry-context {left:calc(50% + 100px);max-width:calc(25% - 90px);padding:2px 6px}
}
@media (max-width:600px) and (orientation:portrait) {
 .hud-shell .entry-context {top:calc(var(--hud-top) + 44px);left:126px;transform:none;max-width:calc(100% - 134px);padding:2px 6px}
}
@media (max-width:480px) and (max-height:360px) {
 .hud-shell .entry-context,.hud-shell .entry-practice {display:none}
 .hud-shell .hud-tools {bottom:calc(var(--hud-bottom) + 68px)!important}
}

/* Match entry shares the table's paper, green and brass palette. */
.play-screen{--entry-paper:#f1ead9;--entry-gold:#ebc77c;--entry-muted:#bdc9bd;--entry-line:#496153;--hud-line:#496153;--hud-muted:#bdc9bd;min-height:100dvh;box-sizing:border-box;background:radial-gradient(ellipse at 80% 0%,#284438 0%,#122b22 65%);color:var(--entry-paper);font:15px/1.45 "DM Sans",system-ui,sans-serif;padding:28px clamp(20px,5vw,72px) 40px}
.play-header{display:flex;justify-content:space-between;align-items:center;max-width:1040px;margin:0 auto 80px}
.play-header>a:first-child{font-size:20px;font-weight:700;letter-spacing:-.03em;text-decoration:none}.play-nav{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px 22px}.play-nav a[aria-current=page]{color:var(--entry-gold)}
.play-nav a{font-size:13px;color:var(--entry-muted)}.play-nav a:hover{color:var(--entry-paper)}
.play-screen a{color:var(--entry-paper);text-underline-offset:4px}
.play-content{max-width:1040px;margin:0 auto}
.play-content h1{font:500 clamp(32px,4vw,50px)/1.1 Georgia,serif;letter-spacing:-.025em;margin:14px 0 30px}
.play-content h2{font-size:20px;letter-spacing:-.02em;margin:0 0 12px}
.play-choices{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px}
.play-choice{min-width:0;background:#1b352bcc;border:1px solid var(--entry-line);border-radius:16px;padding:26px;display:flex;flex-direction:column;align-items:stretch}
.play-choice:first-child{border-color:#b69754;background:#29402b}
.play-choice p{color:var(--entry-muted);font-size:14px;margin:0 0 24px;min-height:42px}
.play-choice form{margin:0}
.play-choice .site-button{box-sizing:border-box;width:100%;justify-content:center;min-height:48px;white-space:nowrap;border-radius:9px;padding:12px 16px;font-size:14px}
.play-choice .site-button.secondary{border:1px solid #748672;background:#213c2e;color:#f1ead9}
.play-choice .site-button.primary{background:var(--entry-gold);color:#1b3023;border-color:var(--entry-gold)}
.play-saved{margin-top:15px;font-size:11px;line-height:1.65;color:#cdd2bc}
.play-footer{margin-top:28px;font-size:13px}
.play-footer a{color:var(--entry-muted)}
.play-lesson{margin:-10px 0 22px}.play-lesson a{display:inline-flex;align-items:center;gap:10px;padding:12px 18px;border:1px solid #b69754;border-radius:10px;background:#29402b;text-decoration:none;font-size:15px}.play-lesson strong{color:var(--entry-gold)}.play-lesson.done{margin:-14px 0 18px}.play-lesson.done a{display:inline;padding:0;border:0;background:none;font-size:13px;color:var(--entry-muted);text-decoration:underline}
.play-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,440px);gap:12px 40px;align-items:center;margin-bottom:30px}.play-hero .play-lesson{margin:0}.play-hero h1{margin-bottom:22px}.play-table{margin:0;min-height:250px;display:flex;align-items:center;justify-content:center;border-radius:150px 150px 14px 14px;background:radial-gradient(ellipse at 50% 40%,#3d5a43,#22372b 75%);box-shadow:inset 0 0 0 1px #e7c17433}.play-bone{display:flex;transform:rotate(-8deg)}.play-bone+.play-bone{margin-left:3px}.play-bone .site-tile{width:116px;height:58px}.play-double .site-tile{width:58px;height:116px;flex-direction:column}.play-double .site-tile>svg{width:100%;height:50%}.play-double .site-tile>svg+svg{border-left:0;border-top:1px solid #c6bba3}
@media(max-width:700px){.play-hero{grid-template-columns:1fr;margin-bottom:20px}.play-hero h1{margin-bottom:14px}.play-table{display:none}.play-lesson a{display:block;line-height:1.5}.play-lesson a svg{vertical-align:middle;margin-left:4px}}@media(max-height:500px){.play-table{display:none}.play-hero{display:block}}
.play-note{color:var(--entry-muted);font-size:13px;margin:0 0 22px}
/* After the lesson: one line and the two ways to a first hand. Below the cards, the practice choice is the same
   button for everyone else. Both show only their buttons in the 480x360 Activity window. */
.play-learned{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px 24px;margin:0 0 18px;padding:18px 22px;border:1px solid #b69754;border-radius:16px;background:#29402b}
.play-learned h2{margin:0}
.play-learned-actions{display:flex;flex-wrap:wrap;gap:10px}
.play-practice{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 20px;margin:16px 0 0;padding:14px 18px;border:1px solid var(--entry-line);border-radius:14px}
.play-practice p{margin:0;max-width:60ch;color:var(--entry-muted);font-size:13px}
.play-learned form,.play-practice form{margin:0}
.play-learned .site-button,.play-practice .site-button{box-sizing:border-box;justify-content:center;min-height:48px;white-space:nowrap;border-radius:9px;padding:12px 18px;font-size:14px}
.play-learned .site-button.primary{background:var(--entry-gold);color:#1b3023;border-color:var(--entry-gold)}
.play-learned .site-button.primary:hover{background:#ffda84}
.play-learned .site-button.secondary,.play-practice .site-button.secondary{border:1px solid #748672;background:#213c2e;color:#f1ead9}
@media(max-width:700px){.play-learned{padding:14px 16px}.play-learned h2{font-size:18px}.play-learned-actions,.play-learned-actions form,.play-learned .site-button,.play-practice form,.play-practice .site-button{width:100%}.play-practice{padding:12px 14px}}
@media(max-width:480px) and (max-height:360px){.play-learned h2,.play-practice p{display:none}.play-learned,.play-practice{margin:5px 0 0;padding:0;border:0;background:none}.play-learned .site-button,.play-practice .site-button{min-height:28px;font-size:11px;padding:5px 12px;border-radius:5px}.play-learned .site-button svg,.play-practice .site-button svg{width:12px;height:12px}}
.match-form{max-width:800px}
.match-form form{margin:0}
.match-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 20px;margin:0 0 16px}
.match-core{grid-template-columns:repeat(3,minmax(0,1fr))}
.match-form label,.match-join label,.match-invite label{display:grid;gap:6px;font:500 12px/1.4 system-ui,sans-serif;color:var(--entry-muted,#c6ccbf)}
.match-form :is(select,input),.match-join input,.match-invite input{box-sizing:border-box;width:100%;min-width:0;min-height:44px;border:1px solid var(--field-line);background:#193225;color:#f1ead9;border-radius:8px;padding:10px 12px;font:14px/1.25 system-ui,sans-serif;accent-color:#ebc77c}
.match-form input:disabled{opacity:.4}
.match-form :is(summary,button,a,input,select):focus-visible,.play-screen :is(a,button,input,summary):focus-visible{outline:3px solid #ffe4a5;outline-offset:3px}
.match-form details{border-top:1px solid #496153;padding:12px 0}
.match-form summary{cursor:pointer;font-size:13px;min-height:24px}
.match-form details[open] .match-grid{margin-top:14px}
.match-submit{display:flex;justify-content:flex-end;margin-top:12px}
.match-submit .entry-primary{margin:0;max-width:180px;min-height:46px;justify-content:center;border-radius:8px;padding:12px 24px;cursor:pointer}
.match-grid{align-items:start}.match-form label{align-content:start}
@media(max-width:700px){.play-nav{gap:4px 14px}.play-nav a{font-size:12px}}
.match-summary{margin:0 0 16px}.match-summary .match-rule-summary{background:#1b352bcc;border-color:var(--entry-line)}
.play-screen .match-secondary{box-sizing:border-box;min-height:40px;padding:8px 16px;border:1px solid #748672;border-radius:8px;background:#213c2e;color:#f1ead9;font:600 13px/1.25 system-ui,sans-serif;cursor:pointer}.play-screen .match-secondary:hover{background:#2d4c3a}
.match-form-compact .match-submit{margin:14px 0 10px;justify-content:stretch}.match-form-compact .match-submit .entry-primary{max-width:none;width:100%}.match-options-body{padding-top:14px}
.match-your-view{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:14px 0 4px}.match-your-view small{color:#bdc9bd;font:12px/1.4 system-ui,sans-serif}
@media(max-width:700px){.play-screen .match-rule-summary{padding:14px}.play-screen .match-rule-summary h2{font-size:20px;margin-bottom:8px}.play-screen .match-rule-summary dl{font-size:13px;gap:2px;margin-bottom:12px}.play-screen .match-rule-summary dd{margin-bottom:6px}.match-summary{margin-bottom:8px}}
.match-join{margin:20px 0 30px}
.match-join form{display:flex;align-items:end;gap:12px}
.match-join label{flex:1}
.match-join .entry-secondary{width:auto;min-height:44px;padding:10px 22px;border-radius:8px;cursor:pointer}
.match-list-title{display:flex;align-items:baseline;justify-content:space-between;margin:30px 0 16px}
.match-list-title h2{margin:0}
.match-list-title a{font-size:12px}
.match-status{font-size:11px;color:#c6d4b8;margin-left:12px;white-space:nowrap}
.play-screen .dropin-table{padding:18px 20px;background:#1b352baa}
.play-screen .dropin-table strong{font-size:15px}
.dropin-table form{flex:0 0 auto}
.dropin-table .entry-secondary{min-height:42px;padding:8px 18px;border-radius:8px;cursor:pointer}
.match-empty{padding:24px;border:1px dashed #496153;border-radius:10px;color:#bdc9bd}
.match-table-actions{display:flex;flex-wrap:wrap;gap:16px;font-size:13px;margin-bottom:18px}
.hud-shell .match-form label{font-size:12px}
.hud-shell .match-core{grid-template-columns:repeat(2,minmax(0,1fr))}
.hud-shell .match-form{margin-top:18px}
.hud-shell .match-grid{gap:12px}
.hud-shell .match-form :is(select,input){min-height:42px;padding:8px;font-size:13px}
.hud-shell .match-waiting .entry-primary{margin:12px 0 8px}
.hud-shell .match-invite{display:flex;align-items:end;gap:10px}
.hud-shell .match-invite label{flex:1;min-width:0}
.hud-shell .match-invite button{flex-shrink:0}
.hud-shell .match-invite:has(button+button){flex-wrap:wrap}
.hud-shell .match-invite:has(button+button) label{flex-basis:100%}
.hud-shell [data-screen=seats]:has([data-hosted=true])>[data-intent=start]{display:none}
.match-settings-line{position:absolute;z-index:3;left:var(--hud-left,20px);top:calc(var(--hud-top,20px) + 100px);max-width:calc(100% - 40px);margin:0;padding:5px 9px;border-radius:6px;background:#122b22d9;color:#ddd9c4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:11px/1.35 system-ui,sans-serif;pointer-events:auto}
.hud-shell:has(.hud-overlays:not([data-panel=""])) .match-settings-line{display:none}
.match-readonly{display:grid;grid-template-columns:1fr 1fr;gap:6px 18px;font-size:13px;margin:20px 0}
.match-readonly dt{color:#aebfab}.match-readonly dd{margin:0}
@media(max-width:700px){
 .play-screen{padding:24px 20px 32px}.play-header{margin-bottom:34px}.play-content h1{margin-bottom:24px;font-size:36px}
 .play-choices{grid-template-columns:1fr;gap:12px}.play-choice{padding:20px}.play-choice h2{font-size:19px;margin-bottom:6px}.play-choice p{min-height:0;margin:0 0 16px;font-size:13px}.play-saved{margin-top:10px}.play-footer{margin-top:24px}
 .match-core{grid-template-columns:1fr 1fr}.match-rules{grid-column:1/-1}.match-grid{gap:12px}.match-form :is(select,input){font-size:13px;padding:10px 8px}.match-status{display:block;margin:4px 0 0}.play-screen .dropin-table{padding:14px;gap:10px}.match-join form{gap:8px}.match-join .entry-secondary{padding:10px 16px}
 .hud-shell .match-invite{flex-wrap:wrap}.hud-shell .match-invite label{flex-basis:100%}.match-settings-line{top:calc(var(--hud-top,12px) + 140px);font-size:10px}
}
@media(max-height:500px) and (min-width:701px){.match-settings-line{display:none}.play-screen{padding-top:18px;padding-bottom:20px}.play-header{margin-bottom:18px}.play-content h1{font-size:30px;margin:12px 0 18px}.play-choice{padding:18px}.play-choice p{margin-bottom:12px}.play-footer{margin-top:18px}.match-core{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:480px) and (max-height:360px){
 .play-screen{padding:8px 12px}.play-header{margin-bottom:6px}.play-header>a:first-child{font-size:14px}.play-nav a{font-size:10px}.play-nav{gap:4px 12px}.play-content h1{font:500 18px/1.1 Georgia,serif;margin:8px 0}.play-choices{gap:5px}.play-choice{padding:0;border:0;background:none!important}.play-choice :is(h2,p,small){display:none}.play-choice .site-button{min-height:28px;font-size:11px;padding:5px 12px;border-radius:5px}.play-choice .site-button svg{width:12px;height:12px}.play-footer{margin-top:6px;font-size:9px}.play-note{font-size:10px;margin-bottom:10px}.match-form :is(select,input){min-height:32px;font-size:11px}.match-form label{font-size:10px}.match-core,.match-grid{gap:8px}.match-settings-line{display:none}
}
.play-screen{width:100%;max-width:none;margin:0}
.hud-shell .match-waiting [data-match-start]{background:#ebc77c;color:#193225;border:1px solid #ffe3a0;text-align:center}
.hud-shell [data-screen=seats]:has([data-hosted=true])>p.hud-muted{display:none}
.match-waiting-settings{font:11px/1.4 system-ui,sans-serif;color:#c8d0bc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:12px 0}
@media(max-width:700px),(max-height:500px){.play-screen .match-submit{position:sticky;bottom:env(safe-area-inset-bottom,0px);padding:12px 0;background:#122b22f5;z-index:2;border-top:1px solid #496153}.play-screen .match-submit .entry-primary{max-width:none;width:100%}}

.match-finishes{border:0;padding:0;margin:12px 0 18px;min-width:0}.match-finishes legend{font:500 12px system-ui,sans-serif;color:#bdc9bd;margin-bottom:10px}.match-finish-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.match-form label.match-finish{position:relative;display:flex;flex-direction:column;gap:4px;padding:6px;border:1px solid #496153;border-radius:8px;cursor:pointer;font-size:11px;text-align:center}.match-form .match-finish input{position:absolute;top:7px;left:7px;width:14px;min-height:14px;height:14px;margin:0;padding:0}.match-finish img{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:contain}.match-finish:has(input:checked){border-color:#ebc77c;background:#39482e}.match-finish:has(input:focus-visible){outline:3px solid #ffe4a5;outline-offset:2px}@media(max-width:700px){.match-finish-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

.hud-shell .match-table-actions a{color:#ebc77c;text-underline-offset:4px}.hud-shell .match-table-actions a:focus-visible{outline:3px solid #ffe4a5;outline-offset:3px}
@media(max-width:600px) and (orientation:portrait){.hud-shell[data-camera-view] .entry-context{top:112px;left:50%;transform:translateX(-50%);max-width:calc(100% - 24px)}}

.dropin-table img{border-radius:50%;object-fit:cover;vertical-align:middle;margin-right:8px}

.dropin-players{display:flex;flex-wrap:wrap;gap:8px}.dropin-players>span{display:flex;align-items:center;gap:4px}
.prematch-panel{max-width:800px;margin:auto}.prematch-heading{display:flex;align-items:baseline;justify-content:space-between;gap:16px}.prematch-heading h1{margin:0 0 8px}.prematch-heading a{font-size:13px}.prematch-panel .match-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.prematch-panel .match-rules{grid-column:auto}.prematch-panel .match-form details{padding:10px 0}.prematch-panel .match-submit{margin-top:6px}
.flag-picker,.rack-back-edit{border:0;padding:0;min-width:0;margin:14px 0}.flag-picker legend,.rack-back-edit>legend{color:#e5dbc2;font:500 13px/1.4 system-ui,sans-serif;margin-bottom:10px}.flag-filter{display:grid;gap:6px;margin-bottom:12px;color:#c6ccbf;font:12px/1.4 system-ui,sans-serif}.flag-filter input{box-sizing:border-box;width:100%;min-height:44px;border:1px solid var(--field-line);background:#193225;color:#f1ead9;border-radius:8px;padding:10px 12px;font:14px system-ui,sans-serif}.flag-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;max-height:310px;overflow:auto;padding:4px;overscroll-behavior:contain}.flag-grid label.flag-choice{display:flex;position:relative;align-items:center;flex-direction:column;justify-content:center;gap:6px;border:1px solid #57715d;border-radius:8px;min-height:76px;padding:8px 5px;cursor:pointer;color:#ddd9c4;font:11px/1.25 system-ui,sans-serif;text-align:center}.flag-grid .flag-choice[hidden]{display:none}.flag-choice img{width:60px;max-width:100%;height:36px;object-fit:contain}.flag-grid .flag-choice input{position:absolute;top:6px;left:6px;width:14px;height:14px;min-height:14px;padding:0;margin:0;accent-color:#ebc77c}.flag-choice:has(input:checked){background:#39482e;border:2px solid #ebc77c;padding:7px 4px;color:#ffe4a5}.flag-choice:has(input:focus-visible){outline:3px solid #ffe4a5;outline-offset:1px}.flag-empty{grid-column:1/-1;color:#c6ccbf;font-size:13px}.flag-grid:has(.flag-choice:not([hidden])) .flag-empty{display:none}.rack-back-edit:disabled{opacity:.6}.rack-back-edit .entry-secondary{padding:10px 16px;min-height:44px;margin-top:12px}.hud-shell .flag-grid{grid-template-columns:repeat(4,minmax(0,1fr));max-height:250px}.hud-rack-flag{display:inline-block;width:22px;height:14px;object-fit:contain;margin-left:5px;vertical-align:middle;border-radius:2px}
@media(max-width:700px){.prematch-panel .match-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.prematch-panel .match-rules{grid-column:1/-1}.flag-grid{grid-template-columns:repeat(3,minmax(0,1fr));max-height:290px}.hud-shell .flag-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.prematch-heading h1{font-size:30px}.play-content:has(.prematch-panel){padding-bottom:0}}
@media(max-height:500px){.prematch-panel .match-grid{gap:8px;margin-bottom:10px}.prematch-panel .match-form label{font-size:11px}.prematch-panel .play-note{margin:0 0 10px}.prematch-panel .match-form details{padding:6px 0}.flag-grid{max-height:160px}}
@media(max-width:400px) and (max-height:300px){.prematch-panel .match-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.prematch-heading h1{font-size:18px}.prematch-heading a{font-size:10px}.prematch-panel .match-form label{font-size:10px}.prematch-panel .match-submit{padding:5px 0}.prematch-panel .match-submit .entry-primary{padding:6px;min-height:30px;font-size:12px}.flag-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.match-form label[hidden]{display:none}
.cpu-cover-notice{position:absolute;z-index:5;left:50%;bottom:calc(var(--hud-bottom,20px) + 145px);transform:translateX(-50%);max-width:calc(100% - 32px);margin:0;padding:10px 14px;border:1px solid #f6cf7a66;border-radius:10px;background:#17392cf5;color:#f3eddc;font:13px/1.5 system-ui,sans-serif;text-align:center;pointer-events:none}
.cpu-cover-notice[hidden]{display:none}
.hud-shell:has(#room-client[data-turn-timer="false"]) :is(.hud-timer,.hud-timer-track){display:none}

.personal-settings { --paper:#f4ead6; --muted:#b8c9bf; color:var(--paper); background:#142e25; border:1px solid #586e57; border-radius:20px; padding:18px 22px; width:min(520px,calc(100vw - 32px)); max-height:min(700px,calc(100dvh - 36px)); box-sizing:border-box; overflow:auto; box-shadow:0 18px 70px #0006; }
.personal-settings::backdrop { background:transparent; }
.personal-settings header { display:flex; align-items:center; justify-content:space-between; gap:16px; position:sticky; top:-18px; background:#142e25; padding:12px 0; z-index:1; }
.personal-settings h2 { margin:0; font:500 28px Georgia,serif; }
.personal-settings button { color:var(--paper); background:#1b382d; border:1px solid #6e8065; border-radius:12px; padding:10px 14px; }
.personal-note,[data-visual-status] { font-size:13px; line-height:1.5; color:var(--muted); }
.personal-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.personal-grid label { display:grid; gap:6px; color:var(--paper); font-size:14px; font-weight:600; }
.personal-grid select { width:100%; min-width:0; color:var(--paper); background:#1b382d; border:1px solid var(--field-line); border-radius:10px; padding:10px 8px; min-height:44px; font:inherit; }
.personal-settings :focus-visible { outline:2px solid #f6c766; outline-offset:3px; }
.hud-settings-button { white-space:nowrap; }
.flag-picker-hint {margin:0 0 12px;color:#c6ccbf;font:12px/1.5 system-ui,sans-serif;}
.flag-search-row{display:flex;align-items:end;gap:8px;margin-bottom:12px}.flag-search-row .flag-filter{flex:1;min-width:0;margin:0}.flag-search-row .flag-search-clear{flex:none;width:auto;min-height:44px;margin:0;padding:10px 14px}.flag-search-clear:disabled{opacity:.4;cursor:default}.flag-search-clear:focus-visible{outline:3px solid #ffe4a5;outline-offset:2px}
@media(max-width:480px) { .personal-settings {padding:12px 16px; max-height:calc(100dvh - 130px);margin-top:70px;} .personal-settings h2{font-size:24px;} .personal-grid{gap:12px 10px;} .personal-grid label{font-size:13px;} .personal-grid select{font-size:12px;} }
/* The play header carries the site brand and links in the felt palette. */
.play-header{padding-bottom:20px;border-bottom:1px solid var(--entry-line)}
.play-header .site-brand{color:var(--entry-paper)!important}
.play-header .brand-name{font-size:17px;font-weight:650;letter-spacing:-.45px}
.play-nav a{text-decoration:none}.play-nav a[aria-current]{color:var(--entry-paper);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:8px}

/* The Discord Activity's launch panel (app/client/activity_js.go): a status while
   Discord answers, then an error or a "Try again" notice. It is the first thing in
   the page's main element: in the flow of an entry page, over the lesson scene on
   .entry-shell, and over the table in hud.css. */
.activity-panel{box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;width:fit-content;max-width:min(520px,100%);margin:0 auto 18px;padding:12px 16px;border:1px solid var(--entry-gold,#ebc77c);border-radius:12px;background:#1b352b;color:var(--entry-paper,#f1ead9);font:600 14px/1.45 "DM Sans",system-ui,sans-serif}
.activity-panel[role=status]{border-color:var(--entry-line,#496153);font-weight:500}
.activity-panel button{min-height:44px;padding:10px 18px;border:1px solid #ffe3a0;border-radius:9px;background:var(--entry-gold,#ebc77c);color:#1b3023;font:650 14px/1.25 system-ui,sans-serif;cursor:pointer}
.activity-panel button:hover{background:#ffda84}
.activity-panel button[data-secondary]{border-color:#748672;background:transparent;color:var(--entry-paper,#f1ead9)}
.activity-panel button[data-secondary]:hover{background:#2d4c3a}
.activity-panel :is(button,a):focus-visible{outline:3px solid #ffe4a5;outline-offset:3px}
.entry-shell .activity-panel{position:absolute;z-index:6;top:16px;left:50%;transform:translateX(-50%);width:max-content;max-width:min(520px,calc(100% - 24px));margin:0}
/* In a short window the buttons keep the 44px target, and from 400px wide the panel keeps to one row, with the
   sentence wrapping beside its buttons. A narrower window leaves too little width beside them. */
@media(max-height:500px){.activity-panel{gap:6px 10px;margin-bottom:8px;padding:8px 12px;font-size:13px}.activity-panel button{flex:none;min-height:44px;padding:6px 14px;font-size:13px;white-space:nowrap}}
@media(max-height:500px) and (min-width:400px){.activity-panel{flex-wrap:nowrap;gap:0 10px}}
/* In the Join list the player's own table offers a link where the others offer a button. It is sized like the button and has no underline. */
.dropin-return{flex:0 0 auto}
.dropin-return a{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;text-decoration:none;white-space:nowrap}
/* The line about practice sits close under the lesson panel's heading. */
.play-learned .live-table-note{margin:6px 0 0}
