@import url('https://fonts.googleapis.com/css2?family=Lilita+One&family=Nunito+Sans:wght@400;600;700;800;900&display=swap');

:root{color-scheme:light;--purple:#7042e8;--ink:#291a4c;--yellow:#ffe45c;--sky:#9ae3ff;--orange:#ffa173;--green:#c1f58c;--pink:#f5b9f1;--paper:#fffef9;--muted:#6a5e7c;--line:#dcd7e9;--display:'Lilita One','Arial Black',system-ui,sans-serif;--body:'Nunito Sans',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;font-family:var(--body);font-synthesis:none}
*{box-sizing:border-box}
html{background:var(--purple);min-height:100%;scroll-behavior:smooth}
body{margin:0;min-width:280px;min-height:100dvh;background-color:var(--purple);background-image:radial-gradient(#ffffff12 1.1px,transparent 1.1px);background-size:20px 20px;color:var(--ink);font-size:1rem;line-height:1.5;-webkit-tap-highlight-color:transparent}
button,input{font:inherit}
button{cursor:pointer;touch-action:manipulation;border:0}
button:disabled{cursor:not-allowed;opacity:.45;box-shadow:none}
button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #ff5a2d;outline-offset:4px}
button,input,a{touch-action:manipulation}
a{color:inherit;text-decoration:none}
h1,h2,h3,p{margin:0}
h1,h2,h3{font-family:var(--display);font-weight:400;line-height:1.12}
h1{font-size:2.65rem;letter-spacing:-.015em;overflow-wrap:anywhere}
h1:focus{outline:none}
h2{font-size:2rem;letter-spacing:-.01em}
h3{font-size:1.375rem}
em{font:inherit;font-style:normal}
.icon{width:24px;height:24px;flex-shrink:0;vertical-align:middle;stroke-width:2}
.site-shell{width:min(800px,100%);margin:auto;padding:0 26px 30px}
.site-header{height:84px;display:flex;align-items:center;justify-content:space-between;gap:20px;color:white}
.brand-slot{display:flex;align-items:center;width:118px;flex:0 0 auto}
.brand{font-family:var(--display);font-size:2.25rem;letter-spacing:-.035em;color:var(--yellow);text-shadow:2px 3px 0 var(--ink);transform:rotate(-4deg);line-height:1.2}
.brand span{color:var(--orange);display:inline-block;transform:rotate(8deg);margin-left:2px}
.rules-link{display:flex;align-items:center;gap:9px;background:transparent;color:#fff;font-size:.875rem;font-weight:800;padding:8px 0}
.question-mark{font-family:var(--display);font-size:1.375rem;display:grid;place-items:center;width:32px;height:32px;background:white;color:var(--ink);border:2px solid var(--ink);border-radius:50%;box-shadow:1px 2px 0 var(--ink)}
.rules-link:hover .question-mark{background:var(--yellow)}
.studio-brand{display:none;width:100%;flex-direction:column;align-items:center;line-height:1}
.studio-brand img{display:block;width:100%;height:auto;min-width:0;filter:drop-shadow(0 2px 0 #291a4c66)}
.studio-brand span{margin-top:-2px;color:#fff;font-size:.5625rem;font-weight:900;letter-spacing:.08em;text-decoration:underline;text-decoration-thickness:1.5px;text-underline-offset:2px;white-space:nowrap}
.studio-brand:hover span,.studio-brand:focus-visible span{color:var(--yellow)}
body[data-screen='home'] .site-header .brand{display:none}
body[data-screen='home'] .site-header .studio-brand{display:flex}
body[data-screen='home'] .site-shell{padding-bottom:16px}
.home-screen{width:min(550px,100%);margin:auto;min-height:calc(100dvh - 115px);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:15px 10px 24px}
.home-brand{width:100%;position:relative}
.game-tag{font-weight:900;font-size:.8125rem;letter-spacing:.13em;color:#fff;transform:rotate(-3deg);margin-bottom:8px}
.wordmark{font-family:var(--display);font-size:min(7.8rem,17vw);line-height:1.25;white-space:nowrap;letter-spacing:-.04em;color:var(--yellow);text-shadow:0 6px 0 var(--ink),4px 6px 0 var(--ink),-3px 4px 0 var(--ink);-webkit-text-stroke:2px var(--ink);paint-order:stroke fill;overflow-wrap:normal;transform:rotate(-4deg);padding-bottom:12px}
.wordmark>span{display:inline-block}
.wordmark>span:nth-child(2){transform:rotate(5deg) translateY(-2px)}
.wordmark>span:nth-child(3){transform:rotate(-5deg)}
.wordmark>span:nth-child(4){transform:translateY(-4px) rotate(5deg)}
.wordmark-bang{color:var(--orange);transform:rotate(10deg);margin-left:4px}
.home-rounds{display:grid;grid-template-columns:repeat(3,1fr);gap:17px;margin:28px auto 19px;width:360px;max-width:90%}
.round-sticker{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;aspect-ratio:1.1;background:var(--yellow);border:3px solid var(--ink);border-radius:20px;box-shadow:3px 4px 0 var(--ink);padding:13px 7px}
.sticker-0{transform:rotate(-7deg)}
.sticker-1{background:var(--sky);transform:rotate(3deg)}
.sticker-2{background:var(--orange);transform:rotate(7deg)}
.sticker-number{position:absolute;top:-11px;left:8px;background:white;border:2px solid var(--ink);border-radius:50%;width:24px;height:24px;display:grid;place-items:center;font-size:.75rem;font-weight:900}
.round-sticker>.icon{width:30px;height:30px;stroke-width:2.2}
.round-sticker strong{font-family:var(--display);font-weight:400;font-size:1.1rem;line-height:1.15}
.home-instruction{color:#fff;font-size:.9375rem;font-weight:600;margin:3px 0 27px}
.home-controls{width:min(405px,100%)}
.button{display:inline-flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;min-height:56px;padding:14px 22px;border:3px solid var(--ink);border-radius:16px;font-family:var(--display);font-size:1.25rem;font-weight:400;line-height:1.2;color:var(--ink);box-shadow:0 5px 0 var(--ink);transition:transform .12s,box-shadow .12s,background .12s;max-width:100%}
.button>.icon{width:23px;height:23px}
.button:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 7px 0 var(--ink)}
.button:active:not(:disabled){transform:translateY(3px);box-shadow:0 2px 0 var(--ink)}
.primary{background:var(--yellow)}
.primary:hover:not(:disabled){background:#ffed8b}
.secondary{background:var(--paper)}
.secondary:hover:not(:disabled){background:#f2ebff}
.danger{background:#ff805e}
.play-button{width:100%;min-height:83px;font-size:2.25rem;border-radius:20px;gap:20px;box-shadow:0 7px 0 var(--ink)}
.play-button>.icon{width:29px;height:29px;fill:var(--ink);stroke-width:1.5}
.quick-summary{color:#fff;font-size:.875rem;margin:19px 0 21px;font-weight:800}
.quick-summary>span{padding:0 6px;color:#cab5ff}
.home-options{display:flex;flex-direction:column;gap:18px}
.cards-button{width:100%;font-family:var(--body);font-size:1rem;font-weight:900;min-height:57px;padding:12px 18px;justify-content:flex-start;gap:10px;box-shadow:0 4px 0 var(--ink)}
.cards-button>span{min-width:0;text-align:left}
.cards-button>.icon:last-child{margin-left:auto;width:18px;height:18px}
.selection-badge{font-size:.8125rem;margin-left:auto;background:var(--purple);color:white;border-radius:8px;min-width:29px;padding:3px 7px}
.options-button{background:none;color:white;display:inline-flex;gap:8px;align-items:center;justify-content:center;align-self:center;font-size:.875rem;font-weight:800;padding:8px 16px;min-height:40px}
.options-button>.icon{width:20px;height:20px}
.options-button:hover{text-decoration:underline;text-underline-offset:4px}
.home-footnote{font-size:.75rem;color:#eee5ff;font-weight:600;margin:24px 0 0}
.game-top{display:flex;align-items:center;justify-content:space-between;gap:12px;width:min(540px,100%);margin:0 auto 18px;color:#fff}
.subtle-button{display:inline-flex;align-items:center;gap:5px;background:none;padding:6px 0;font-size:.875rem;font-weight:700;color:white}
.subtle-button>.icon{height:19px;width:19px}
.round-track{display:flex;align-items:center;justify-content:flex-end;gap:13px;flex-wrap:wrap}
.round-track>span{display:flex;align-items:center;gap:5px;font-size:.75rem;color:#e7daff;font-weight:900}
.round-track b{font-size:.75rem;font-weight:800}
.round-track .current{color:var(--yellow)}
.round-track .current b{text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:2px}
.round-track .icon{width:13px;height:13px}
.scoreboard{width:min(540px,100%);display:grid;grid-template-columns:1fr 1fr;gap:13px;margin:0 auto 18px}
.score-team{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;border:2px solid var(--ink);border-radius:14px;background:#5631b4;box-shadow:0 3px 0 var(--ink);color:white;padding:10px 15px;font-weight:800;font-size:.9375rem}
.score-team span{overflow-wrap:anywhere}
.score-team strong{font-family:var(--display);font-weight:400;font-size:1.65rem;line-height:1;font-variant-numeric:tabular-nums}
.score-team.active.team-a{background:var(--yellow);color:var(--ink)}
.score-team.active.team-b{background:var(--sky);color:var(--ink)}
.play-surface{width:min(540px,100%);margin:0 auto 20px;padding:31px;background:var(--paper);border:3px solid var(--ink);border-radius:26px;box-shadow:0 7px 0 var(--ink);text-align:center;animation:pop-in .16s ease-out}
.play-surface .eyebrow{color:var(--muted);margin-bottom:13px}
.eyebrow{font-size:.8125rem;font-weight:900;letter-spacing:.07em;line-height:1.4}
.small-meta{font-size:.8125rem;color:var(--muted);line-height:1.5}
.round-symbol{height:69px;width:69px;border:3px solid var(--ink);border-radius:19px;display:grid;place-items:center;box-shadow:3px 3px 0 var(--ink);background:var(--yellow);margin:0 auto 25px;transform:rotate(-8deg)}
.round-symbol>.icon{width:35px;height:35px;transform:rotate(8deg)}
.symbol-1{background:var(--sky)}
.symbol-2{background:var(--orange)}
.handoff-surface h1{font-size:2.55rem}
.handoff-surface h1 em{display:inline-block;color:#6940ca;margin-top:7px}
.handoff-copy{font-size:1rem;color:var(--muted);margin:20px 0;line-height:1.6}
.rule-note{background:#ede5ff;border-radius:12px;font-weight:800;font-size:1rem;padding:14px 16px;margin:22px 0}
.large-button{width:100%;margin-bottom:18px;min-height:65px}
.playing-surface{padding:23px;animation:none}
.timer-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.timer-row .eyebrow{flex:1;margin:0;color:var(--ink);text-align:left;font-size:.875rem}
.timer{font-family:var(--display);display:flex;align-items:baseline;gap:4px;font-size:2.3rem;line-height:1;font-variant-numeric:tabular-nums}
.timer .icon{align-self:center;width:21px;height:21px;margin-right:4px}
.timer small{font-family:var(--body);font-weight:900;font-size:.875rem}
.timer.urgent{color:#b82d12}
.icon-button{display:inline-grid;place-items:center;width:41px;height:41px;border:2px solid var(--ink);border-radius:12px;background:white;color:var(--ink);flex-shrink:0;box-shadow:0 2px 0 var(--ink)}
.icon-button:hover{background:var(--yellow)}
.timer-track{height:8px;border:2px solid var(--ink);background:#e8e0f4;border-radius:10px;margin:19px 0;overflow:hidden}
.timer-track>div{height:100%;background:var(--purple);border-radius:10px;transition:width .1s linear}
.peach{--tile-color:var(--orange)}
.blue{--tile-color:var(--sky)}
.yellow{--tile-color:var(--yellow)}
.purple{--tile-color:var(--pink)}
.mint{--tile-color:var(--green)}
.word-card{position:relative;min-height:292px;display:flex;flex-direction:column;justify-content:center;align-items:center;background:var(--tile-color);border:3px solid var(--ink);border-radius:20px;padding:60px 25px 55px}
.card-category{position:absolute;top:16px;left:17px;display:flex;align-items:center;gap:6px;font-size:.8125rem;font-weight:900}
.card-category .icon{width:18px;height:18px}
.card-corner{position:absolute;top:10px;right:16px;transform:rotate(8deg);font-family:var(--display);font-size:1.4rem;opacity:.55}
.word-card h1{font-family:var(--display);font-weight:400;line-height:1.1;font-size:clamp(2rem,6vw,3rem);text-wrap:balance;max-width:100%;overflow-wrap:anywhere;hyphens:auto}
.card-instruction{position:absolute;bottom:17px;left:15px;right:15px;font-size:.8125rem;font-weight:700}
.live-meta{display:flex;justify-content:space-between;gap:10px;align-items:center;margin:15px 0 17px;font-size:.8125rem;color:var(--muted)}
.live-meta strong{color:var(--ink);font-weight:900;background:#eee6ff;padding:3px 9px;border-radius:8px}
.game-actions{display:grid;grid-template-columns:1fr 1.6fr;gap:12px}
.game-actions .button{min-width:0;flex-wrap:wrap;padding:14px 10px;gap:8px;min-height:69px}
.pass-button{background:#ede6f9;font-family:var(--body);font-size:1rem;font-weight:900}
.guessed-button{font-size:1.45rem;background:var(--green)}
.guessed-button:hover:not(:disabled){background:#d0ffa4}
.passing-note{font-size:.75rem;margin-top:21px}
.pause-surface{padding-top:40px}
.pause-surface>p{margin:19px 0;color:var(--muted)}
.pause-time{font-family:var(--display);font-size:4.4rem;line-height:1;margin:30px 0}
.pause-time span{display:block;font-family:var(--body);font-size:.875rem;font-weight:700;color:var(--muted);margin-top:9px}
.text-button{background:none;color:var(--ink);font-family:var(--body);font-size:.875rem;font-weight:800;text-decoration:underline;text-underline-offset:4px;padding:10px 4px;min-height:42px}
.result-surface h1{font-size:2rem}
.points-earned{font-family:var(--display);font-size:6rem;color:#7042cf;line-height:1;letter-spacing:-.05em;margin:20px 0 23px}
.points-earned>span{display:block;font-family:var(--body);font-weight:900;font-size:.9375rem;color:var(--ink);letter-spacing:0;margin-top:8px}
.result-copy{color:var(--muted);font-size:1rem;margin:15px 0 23px}
.found-cards{padding:10px 0;margin:clamp(8px,1.8dvh,16px) 0;border-block:2px solid var(--line);text-align:left;font-size:.875rem;min-width:0}
.found-cards summary{cursor:pointer;font-weight:800;display:flex;align-items:center;justify-content:space-between;gap:10px}
.found-cards summary small{font-size:.75rem;color:var(--muted);font-weight:800;white-space:nowrap}
.found-cards-row{display:flex;gap:8px;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;overscroll-behavior-inline:contain;scroll-snap-type:x proximity;scrollbar-width:thin;-webkit-overflow-scrolling:touch;margin-top:9px;padding:2px 2px 6px;touch-action:pan-x}
.found-card-chip{flex:0 0 auto;display:inline-flex;align-items:center;gap:7px;scroll-snap-align:start;background:#eee6ff;color:var(--ink);padding:7px 9px 7px 12px;border:2px solid transparent;border-radius:10px;font-family:var(--body);font-size:.8125rem;line-height:1.2}
.found-card-chip .icon{width:16px;height:16px}
.found-card-chip:hover{border-color:var(--purple)}
.found-card-chip:active{background:#ded0fa}
.undo-hint{margin-top:3px;color:var(--muted);font-size:.75rem;line-height:1.3}
.final-surface{margin-top:14px}
.trophy-symbol{background:var(--yellow);border-radius:50%;width:80px;height:80px}
.trophy-symbol .icon{height:41px;width:41px}
.final-surface h1 em{display:block;color:#7042cf;font-size:.8em;margin-top:10px}
.final-score{display:flex;gap:12px;align-items:center;margin:30px 0 21px}
.final-score>div{flex:1;min-width:0;border:2px solid var(--ink);border-radius:17px;background:#f0eafb;padding:17px 10px;display:flex;flex-direction:column;gap:8px}
.final-score>div>span{font-size:.875rem;font-weight:800;overflow-wrap:anywhere}
.final-score>div>strong{font-family:var(--display);font-size:3.2rem;line-height:1;font-weight:400}
.final-score .team-a.winner{background:var(--yellow);transform:rotate(-3deg);box-shadow:2px 3px 0 var(--ink)}
.final-score .team-b.winner{background:var(--sky);transform:rotate(3deg);box-shadow:2px 3px 0 var(--ink)}
.score-separator{font-family:var(--display);font-size:1.75rem}
.round-table{margin:8px 0 27px}
table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:.875rem}
th,td{padding:11px 6px;border-bottom:1px solid var(--line);text-align:right;overflow-wrap:anywhere}
th:first-child{text-align:left;width:37%}
thead th{color:var(--muted);font-size:.75rem;font-weight:700}
tbody th{font-weight:700}
tbody td{font-weight:900}
.final-surface>.text-button{margin-top:8px}
dialog{background:var(--paper);color:var(--ink);width:600px;max-width:calc(100vw - 28px);max-height:88dvh;padding:29px;border:3px solid var(--ink);border-radius:24px;box-shadow:0 8px 0 var(--ink),0 18px 80px #291a4c77;overscroll-behavior:contain}
dialog::backdrop{background:#241142b8;backdrop-filter:blur(5px)}
.modal-open{overflow:hidden}
.modal-close{position:absolute;top:15px;right:15px;width:35px;height:35px;border-radius:50%;box-shadow:none;z-index:2}
.modal-close .icon{width:18px;height:18px}
.dialog-heading{margin:6px 28px 24px 0}
.dialog-heading .eyebrow{color:#755c95;font-size:.75rem;margin-bottom:9px}
.dialog-heading h2{font-size:2.05rem;line-height:1.1}
.dialog-copy{color:var(--muted);font-size:1rem;line-height:1.55;margin:15px 0 22px}
.mode-switch,.setting{border:0;padding:0;min-width:0}
.mode-switch{display:flex;gap:7px;background:#eee8fa;padding:5px;border:2px solid var(--ink);border-radius:14px;margin:0 0 23px}
.mode-switch>label{flex:1;position:relative;cursor:pointer;min-width:0}
.mode-switch input,.segments input,.theme-tile input{position:absolute;opacity:0;width:1px;height:1px}
.mode-switch label>span{display:flex;align-items:center;justify-content:center;gap:8px;padding:11px 6px;border:2px solid transparent;border-radius:9px;font-weight:900;font-size:.9375rem;min-height:49px}
.mode-switch .icon{width:19px;height:19px}
.mode-switch input:checked+span{background:var(--ink);color:#fff}
.mode-switch input:focus-visible+span,.segments input:focus-visible+span{outline:3px solid #ff6a42;outline-offset:3px}
.theme-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0 25px}
.theme-tile{position:relative;cursor:pointer;min-width:0}
.theme-tile:last-child{grid-column:1/-1}
.theme-face{display:flex;align-items:center;gap:9px;min-height:76px;padding:12px;border:2px solid var(--ink);border-radius:12px;background:var(--tile-color)}
.theme-face>span:not(.theme-check){min-width:0}
.theme-face strong{font-size:.875rem;font-weight:900;display:block;overflow-wrap:anywhere}
.theme-face small{font-size:.75rem;display:block;margin-top:3px}
.theme-face>.icon{width:22px;height:22px}
.theme-check{background:var(--ink);color:white;border:2px solid var(--ink);border-radius:6px;height:20px;width:20px;flex-shrink:0;display:grid;place-items:center;margin-left:auto}
.theme-check .icon{width:13px;height:13px;stroke-width:3}
.theme-tile input:not(:checked)+.theme-face{background:#f2eff8;color:#766984;border-color:#aea2bd}
.theme-tile input:not(:checked)+.theme-face .theme-check{background:#fff;color:transparent;border-color:#aea2bd}
.theme-tile input:focus-visible+.theme-face{outline:3px solid #ff6a42;outline-offset:3px}
.setting{margin:22px 0 15px}
.setting legend{font-weight:900;font-size:.9375rem;margin-bottom:12px}
.segments{display:flex;gap:8px}
.segments label{position:relative;flex:1;min-width:0;cursor:pointer}
.segments span{border:2px solid var(--ink);border-radius:10px;display:block;text-align:center;font-size:1.125rem;font-weight:900;padding:10px 6px;background:#fff}
.segments small{font-size:.875rem}
.segments input:checked+span{background:var(--yellow);box-shadow:0 3px 0 var(--ink)}
#random-hint{margin:16px 0 22px}
.bulk-actions{display:flex;align-items:center;justify-content:flex-start;gap:19px;margin:7px 0 15px;flex-wrap:wrap}
.bulk-actions .text-button{padding:5px 0;font-size:.875rem}
.bulk-actions>span{margin-left:auto;font-size:.8125rem;color:var(--muted)}
.card-picker{display:flex;flex-direction:column;gap:12px;margin-bottom:24px}
.pick-group{border:2px solid var(--ink);border-radius:13px;background:white;overflow:hidden}
.pick-group summary{display:flex;align-items:center;gap:10px;min-height:58px;padding:11px 13px;cursor:pointer;list-style:none;background:var(--tile-color)}
.pick-group summary::-webkit-details-marker{display:none}
.pick-group summary>strong{font-size:1rem;font-weight:900;min-width:0;overflow-wrap:anywhere}
.group-icon{display:grid;place-items:center}
.group-icon .icon{width:21px;height:21px}
.group-count{font-size:.8125rem;white-space:nowrap;margin-left:auto;font-weight:800}
.group-chevron{height:17px;width:17px;transition:transform .15s}
.pick-group[open] .group-chevron{transform:rotate(90deg)}
.group-content{padding:10px 13px 15px}
.group-toggle{display:flex;align-items:center;gap:9px;font-size:.875rem;font-weight:900;cursor:pointer;min-height:44px;margin-bottom:7px}
input[type='checkbox']{accent-color:var(--purple)}
.group-toggle input,.pick-card input{width:20px;height:20px;flex-shrink:0;margin:0;cursor:pointer}
.pick-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.pick-card{display:flex;align-items:center;gap:8px;cursor:pointer;padding:9px 10px;background:#f4f0fa;border:1px solid #e4dcee;border-radius:9px;min-height:47px;font-size:.875rem;line-height:1.4;font-weight:700}
.pick-card:has(input:checked){background:#eee2ff;border-color:#9874d0}
.pick-card span{overflow-wrap:anywhere;hyphens:auto;min-width:0}
.pick-card input{width:18px;height:18px}
.dialog-footer{position:sticky;bottom:-29px;z-index:3;border-top:2px solid var(--line);background:var(--paper);padding:16px 29px 24px;margin:24px -29px -29px;box-shadow:0 -8px 15px #fffef9cc}
.dialog-footer>.button{width:100%;min-height:60px}
.selection-hint{font-size:.8125rem;color:var(--muted);font-weight:700;margin:0 0 12px;line-height:1.45;text-align:center}
#save-count{font-family:var(--body);font-size:.9375rem;font-weight:900;padding-left:8px;border-left:2px solid #291a4c55}
.team-fields{display:grid;grid-template-columns:1fr 1fr;gap:13px}
.team-field{min-width:0}
.team-field>span{display:block;font-size:.875rem;font-weight:900;margin:0 0 8px}
.team-field input{display:block;width:100%;padding:13px 11px;border:2px solid var(--ink);border-radius:10px;font-size:1rem;min-width:0;font-weight:800;color:var(--ink)}
.team-a input{background:#fff1a3}
.team-b input{background:#d4f1ff}
.error{font-size:.875rem;color:#ab3216;font-weight:800;margin:15px 0;line-height:1.45}
.error:empty{display:none}
.rules-list{display:flex;flex-direction:column;gap:21px;margin:28px 0}
.rules-list>section{display:flex;align-items:flex-start;gap:15px}
.rule-number{height:35px;width:35px;border:2px solid var(--ink);border-radius:10px;background:var(--yellow);display:grid;place-items:center;font-family:var(--display);font-size:1.375rem;flex-shrink:0;box-shadow:1px 2px 0 var(--ink);transform:rotate(-5deg)}
.rules-list>section:nth-child(2) .rule-number{background:var(--sky)}
.rules-list>section:nth-child(3) .rule-number{background:var(--orange)}
.rules-list h3{margin-bottom:7px}
.rules-list p{font-size:1rem;color:var(--muted);line-height:1.55}
.rules-extra{border-top:2px solid var(--line);padding-top:23px;margin-bottom:24px}
.rules-extra ul{margin:16px 0 0;padding-left:23px}
.rules-extra li{color:var(--muted);font-size:.9375rem;line-height:1.55;margin-bottom:12px}
.rules-extra strong{color:var(--ink)}
dialog>.button{width:100%;margin-bottom:5px}
.modal-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:25px;margin-bottom:6px}
.modal-actions .button{flex:1;min-width:155px;font-size:1.125rem}
[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.loading{color:white}
@keyframes pop-in{from{opacity:.6;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:900px){.home-screen{padding-bottom:45px}.home-rounds{width:390px;margin-top:31px;margin-bottom:24px}.home-instruction{margin-bottom:30px}.home-controls{width:420px}.home-footnote{margin-top:32px}}
@media(max-width:600px){.site-shell{padding:0 17px 22px}.site-header{height:68px}.brand{font-size:1.95rem}.rules-link{font-size:.8125rem;gap:7px}.question-mark{width:30px;height:30px;font-size:1.25rem}.home-screen{padding:2px 7px 13px;min-height:calc(100dvh - 100px);justify-content:center}.wordmark{font-size:min(6.3rem,18.2vw);text-shadow:0 4px 0 var(--ink),3px 4px 0 var(--ink),-2px 3px 0 var(--ink);-webkit-text-stroke:1.5px var(--ink);padding-bottom:8px}.game-tag{font-size:.75rem;letter-spacing:.08em;margin-bottom:11px}.home-rounds{gap:13px;width:300px;margin-top:22px;margin-bottom:19px}.round-sticker{padding:11px 5px;border-radius:16px;gap:6px;aspect-ratio:1.08}.round-sticker .icon{width:25px;height:25px}.round-sticker strong{font-size:1rem}.sticker-number{top:-10px;left:5px;width:22px;height:22px}.home-instruction{font-size:.875rem;margin-bottom:23px}.home-controls{width:100%}.play-button{min-height:77px;font-size:2rem}.quick-summary{font-size:.8125rem;margin:18px 0}.home-options{gap:14px}.home-footnote{margin-top:17px}.game-top{margin-bottom:14px;gap:8px}.round-track{gap:10px}.subtle-button{font-size:.8125rem}.round-track>span,.round-track b{font-size:.75rem;gap:4px}.scoreboard{gap:10px;margin-bottom:14px}.score-team{padding:10px 12px;font-size:.875rem;border-radius:12px}.score-team strong{font-size:1.5rem}.play-surface{padding:26px 22px;border-radius:22px}.play-surface h1{font-size:2.2rem}.round-symbol{width:58px;height:58px;border-radius:16px;margin-bottom:21px}.round-symbol .icon{width:29px;height:29px}.eyebrow{font-size:.75rem}.handoff-copy{font-size:.9375rem;margin:18px 0}.rule-note{font-size:.9375rem;padding:12px;margin:19px 0 23px}.large-button{font-size:1.3rem;min-height:61px}.playing-surface{padding:17px}.timer-row{gap:9px}.timer-row .eyebrow{font-size:.8125rem;letter-spacing:.04em}.timer{font-size:2.1rem}.timer .icon{width:18px;height:18px}.timer-row .icon-button{width:37px;height:37px}.timer-row .icon-button .icon{width:20px;height:20px}.timer-track{margin:16px 0}.word-card{min-height:266px;padding:59px 18px 49px;border-radius:17px}.word-card h1{font-size:2.3rem}.card-category{font-size:.75rem;left:14px;top:14px}.card-instruction{font-size:.75rem;bottom:15px}.card-corner{right:13px;font-size:1.25rem}.game-actions{gap:10px;grid-template-columns:1fr 1.6fr}.game-actions .button{min-height:65px;padding:12px 8px}.guessed-button{font-size:1.3rem}.pass-button{font-size:.9375rem}.game-actions .icon{width:21px;height:21px}.live-meta{font-size:.75rem;margin:14px 0 16px}.passing-note{font-size:.75rem;line-height:1.5;margin-top:20px}.result-surface h1{font-size:1.8rem}.points-earned{font-size:5.4rem}.result-copy{font-size:.9375rem}.final-surface{margin-top:8px}.final-score{gap:9px}.final-score>div>span{font-size:.8125rem}.final-score>div>strong{font-size:2.75rem}.final-surface .large-button{font-size:1.25rem}.trophy-symbol{width:71px;height:71px}.trophy-symbol .icon{width:35px;height:35px}dialog{padding:23px;border-radius:20px;max-height:90dvh;max-width:calc(100vw - 22px)}.dialog-heading{margin-bottom:20px;margin-right:27px}.dialog-heading h2{font-size:1.85rem}.dialog-heading .eyebrow{font-size:.75rem}.mode-switch label>span{font-size:.875rem;gap:6px}.dialog-footer{bottom:-23px;margin:22px -23px -23px;padding:15px 23px 21px}.theme-grid{gap:8px}.theme-face{padding:10px 9px;gap:7px}.theme-face>.icon{width:19px;height:19px}.theme-face strong{font-size:.875rem}.theme-face small{font-size:.75rem}.theme-check{width:18px;height:18px}.theme-check .icon{width:11px;height:11px}.team-fields{grid-template-columns:1fr}.team-field input{padding:11px 12px}.pick-group summary{padding:11px 10px;gap:7px}.pick-group summary>strong{font-size:.9375rem}.group-count{font-size:.75rem}.group-icon .icon{width:18px;height:18px}.group-content{padding:9px 10px 13px}.pick-grid{gap:6px}.pick-card{font-size:.875rem;padding:9px 7px;gap:7px}.pick-card input{width:18px;height:18px}.bulk-actions{gap:14px}.bulk-actions>span{font-size:.75rem}.bulk-actions .text-button{font-size:.875rem}}
@media(max-width:360px){.site-shell{padding-inline:13px}.home-screen{padding-inline:6px}.home-rounds{gap:11px;max-width:93%}.home-instruction{font-size:.8125rem}.game-top{flex-wrap:wrap}.round-track{gap:9px}.score-team{padding:9px 10px}.play-surface{padding:22px 17px}.playing-surface{padding:14px}.game-actions{grid-template-columns:1fr 1.5fr}.guessed-button{font-size:1.125rem}.pass-button{font-size:.875rem}.game-actions .icon{width:18px;height:18px}.word-card h1{font-size:2.1rem}.timer-row .eyebrow{font-size:.75rem}.theme-grid{grid-template-columns:1fr}.theme-tile:last-child{grid-column:auto}.theme-face{min-height:64px;padding:10px 12px}.pick-grid{grid-template-columns:1fr}.mode-switch .icon{display:none}.dialog-heading h2{font-size:1.7rem}.bulk-actions{gap:12px}.bulk-actions>span{display:none}}
@media(max-height:740px) and (max-width:600px){.home-screen{padding-top:0;padding-bottom:3px}.home-rounds{width:260px;margin-top:16px;margin-bottom:14px}.home-instruction{margin-bottom:19px}.home-footnote{margin-top:12px}.home-options{gap:10px}body[data-screen='playing'] .site-header{height:58px}body[data-screen='playing'] .word-card{min-height:230px}body[data-screen='playing'] .game-top{margin-bottom:11px}body[data-screen='playing'] .scoreboard{margin-bottom:12px}body[data-screen='playing'] .timer-track{margin:13px 0}body[data-screen='playing'] .passing-note{margin-top:18px}}
@media(max-height:640px) and (max-width:600px){.home-screen{justify-content:flex-start}.home-rounds{width:230px;margin-top:15px}.home-footnote{margin-top:9px}.play-button{min-height:67px}.wordmark{font-size:min(4.4rem,18.2vw)}.quick-summary{margin:15px 0}.home-options{gap:8px}.home-instruction{margin-bottom:16px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Audio controls stay reachable on every screen, including open dialogs. */
.site-header{position:sticky;top:0;z-index:20;background:var(--purple)}
.header-actions{display:flex;align-items:center;gap:15px}
.audio-controls{display:flex;align-items:center;gap:7px}
.fullscreen-control{display:flex;align-items:center}
.audio-button{display:inline-grid;place-items:center;min-width:42px;min-height:42px;padding:8px;border:2px solid var(--ink);border-radius:12px;background:var(--yellow);color:var(--ink);box-shadow:0 2px 0 var(--ink)}
.audio-button .icon{width:21px;height:21px}
.audio-button.is-muted{background:#eee7ff;color:#756289;box-shadow:none}
.fullscreen-button.is-active{background:var(--sky)}
.audio-button:hover:not(:disabled){background:#fff2a0}
.audio-button:disabled{opacity:.5;cursor:not-allowed}
.dialog-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:-29px;z-index:5;background:var(--paper);margin:-29px -29px 21px;padding:13px 17px;border-bottom:2px solid var(--line)}
.dialog-toolbar .modal-close{position:static;margin:0;flex-shrink:0}
.dialog-toolbar .audio-button{min-width:38px;min-height:38px;padding:7px;box-shadow:none}
.dialog-toolbar+.dialog-heading{margin-right:0}

/* Let the card float over the interface; only the viewport clips its exit. */
body{overflow-x:clip}
.playing-surface{overflow:visible}
.swipe-stage{position:relative;overflow:visible;z-index:30}
.swipe-stage .word-card{position:relative;touch-action:pan-y pinch-zoom;user-select:none;-webkit-user-select:none;cursor:grab;--drag-x:0px;--drag-y:0px;--drag-angle:0deg;transform:translate3d(var(--drag-x),var(--drag-y),0) rotate(var(--drag-angle));transition:transform .24s cubic-bezier(.2,.85,.3,1),box-shadow .2s;transform-origin:50% 65%}
.swipe-stage .word-card.is-dragging{transition:none;cursor:grabbing;box-shadow:0 14px 28px #291a4c30,0 3px 0 #291a4c18;will-change:transform}
.swipe-stage .word-card::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:var(--edge-opacity,0);transition:opacity .1s}
.word-card[data-swipe='left']::after{background:linear-gradient(to right,#e4485359,transparent 28%);box-shadow:inset 5px 0 0 #d43d49,-7px 0 15px -9px #d43d4980}
.word-card[data-swipe='right']::after{background:linear-gradient(to left,#39b46859,transparent 28%);box-shadow:inset -5px 0 0 #26884a,7px 0 15px -9px #26884a80}
.word-card.is-dragging::after{transition:none}
.word-card.is-exiting{animation:swipe-away .22s cubic-bezier(.32,0,.7,.5) forwards;box-shadow:0 14px 28px #291a4c30;pointer-events:none;will-change:transform,opacity}
@keyframes swipe-away{from{transform:translate3d(var(--drag-x),var(--drag-y),0) rotate(var(--drag-angle));opacity:1}65%{opacity:1}to{transform:translate3d(var(--exit-x),var(--drag-y),0) rotate(var(--exit-angle));opacity:0}}
@media(max-width:600px){.header-actions{gap:10px}.rules-link>span:last-child{display:none}.audio-controls{gap:6px}.audio-button{min-width:39px;min-height:41px;padding:7px}.audio-button .icon{width:20px;height:20px}.dialog-toolbar{top:-23px;margin:-23px -23px 19px;padding:11px 15px}}
@media(max-height:740px) and (max-width:600px){body[data-screen='playing'] .passing-note{margin-top:16px}}
@media(prefers-reduced-motion:reduce){.word-card.is-exiting{animation:card-fade .07s linear forwards!important}.word-card.is-dragging{transform:none}.word-card{transition:none!important}}
@keyframes card-fade{to{opacity:0}}

/* Every game state behaves like a fixed mobile game screen. Only dialogs scroll internally. */
html,body{width:100%;height:100%;height:100dvh;max-height:100dvh;overflow:hidden;overscroll-behavior:none}
body{min-height:0}
.site-shell{--header-height:84px;height:100vh;height:100dvh;max-height:100dvh;display:grid;grid-template-rows:calc(var(--header-height) + env(safe-area-inset-top,0px)) minmax(0,1fr);padding-bottom:max(18px,env(safe-area-inset-bottom,0px));overflow:visible}
.site-header{height:auto;min-height:0;padding-top:env(safe-area-inset-top,0px)}
.brand{display:block;width:118px;line-height:0;transform:none;text-shadow:none}
.brand img{display:block;width:100%;height:auto}
#app{height:100%;min-height:0;display:flex;flex-direction:column}
body[data-screen='finished'] #app{display:flex;align-items:stretch;justify-content:center}
body[data-screen='home'] .site-shell{padding-bottom:max(12px,env(safe-area-inset-bottom,0px))}
.home-screen{height:100%;min-height:0;overflow:hidden}
.wordmark{width:min(100%,540px);font-size:0;line-height:0;transform:none;padding:0;margin:auto;overflow:visible}
.wordmark-logo{display:block;width:100%;height:auto}
body[data-screen='handoff'] #app,
body[data-screen='playing'] #app,
body[data-screen='paused'] #app,
body[data-screen='turn-end'] #app{display:grid;grid-template-rows:auto auto minmax(0,1fr)}
.game-top,.scoreboard{flex-shrink:0}
.play-surface{min-height:0;max-height:100%;margin-bottom:7px;overflow:hidden}
.handoff-surface,.pause-surface,.result-surface,.final-surface{display:flex;flex-direction:column;justify-content:center}
.playing-surface{display:flex;flex-direction:column;overflow:visible}
.swipe-stage{display:flex;flex:1 1 auto;min-height:0}
.swipe-stage .word-card{width:100%;height:100%;min-height:0}
.final-surface{height:100%;margin-top:0}
.final-heading{display:flex;flex-direction:column;align-items:center;text-align:center}

@media(max-width:600px){
  .site-shell{--header-height:68px;padding-bottom:max(12px,env(safe-area-inset-bottom,0px))}
  .brand-slot,.brand{width:101px}
  .wordmark{width:min(100%,480px)}
}

@media(max-height:720px){
  .site-shell{--header-height:54px;padding-bottom:max(8px,env(safe-area-inset-bottom,0px))}
  .site-header{min-height:0}
  .brand-slot,.brand{width:92px}
  .audio-button{min-width:38px;min-height:38px;padding:6px}
  .question-mark{width:28px;height:28px}
  .game-top{margin-bottom:8px}
  .scoreboard{margin-bottom:8px}
  .score-team{padding:7px 11px}
  .play-surface{padding:clamp(12px,2.4dvh,19px);border-radius:20px;box-shadow:0 5px 0 var(--ink);margin-bottom:5px}
  .playing-surface{padding:12px 14px}
  .timer-row .icon-button{width:36px;height:36px}
  .timer-track{margin:9px 0}
  .live-meta{margin:8px 0}
  .game-actions .button{min-height:52px;padding:8px}
  .passing-note{display:none}
  .round-symbol{width:48px;height:48px;margin-bottom:10px;border-radius:14px}
  .round-symbol .icon{width:25px;height:25px}
  .handoff-surface h1{font-size:clamp(1.75rem,5dvh,2.25rem)}
  .handoff-copy{font-size:.875rem;line-height:1.35;margin:9px 0}
  .rule-note{font-size:.875rem;line-height:1.3;padding:8px 11px;margin:9px 0}
  .large-button{min-height:50px;margin-bottom:7px;padding-block:9px}
  .pause-surface{padding-top:16px}
  .pause-surface>p{margin:9px 0}
  .pause-time{font-size:3.5rem;margin:13px 0}
  .result-surface h1{font-size:1.7rem}
  .points-earned{font-size:4.25rem;margin:8px 0 10px}
  .points-earned>span{margin-top:3px}
  .result-copy{font-size:.875rem;line-height:1.35;margin:8px 0 10px}
  .found-cards{padding:8px 0;margin:9px 0}
  .final-heading{flex-direction:row;justify-content:center;gap:14px}
  .final-heading .trophy-symbol{flex:0 0 52px;width:52px;height:52px;margin:0}
  .final-heading .trophy-symbol .icon{width:27px;height:27px}
  .final-heading h1{font-size:1.75rem}
  .final-heading h1 em{margin-top:3px}
  .final-score{margin:10px 0 7px}
  .final-score>div{padding:8px 7px;gap:3px}
  .final-score>div>strong{font-size:2.35rem}
  .round-table{margin:2px 0 8px}
  th,td{padding:5px}
  .final-surface .large-button{min-height:49px;margin-bottom:4px}
  .final-surface>.text-button{min-height:34px;margin-top:0;padding:5px 4px}
}

@media(max-height:620px){
  .site-shell{--header-height:48px;padding-bottom:max(6px,env(safe-area-inset-bottom,0px))}
  .brand-slot,.brand{width:82px}
  .header-actions{gap:7px}
  .audio-controls{gap:4px}
  .audio-button{min-width:35px;min-height:35px}
  .game-top{margin-bottom:5px}
  .scoreboard{margin-bottom:5px}
  .score-team{padding:5px 9px}
  .score-team strong{font-size:1.35rem}
  .play-surface{padding:10px 13px;border-radius:17px;border-width:2px;box-shadow:0 4px 0 var(--ink)}
  .playing-surface{padding:9px 11px}
  .timer{font-size:1.8rem}
  .timer-row .icon-button{width:33px;height:33px}
  .timer-track{height:7px;margin:6px 0}
  .live-meta{margin:6px 0}
  .game-actions .button{min-height:47px}
  .round-symbol{width:42px;height:42px;margin-bottom:6px}
  .handoff-copy{margin:6px 0}
  .rule-note{padding:6px 9px;margin:6px 0}
  .large-button{min-height:46px;margin-bottom:4px}
  .pause-time{font-size:3rem;margin:8px 0}
  .points-earned{font-size:3.6rem;margin:4px 0 6px}
  .result-copy{margin:5px 0 7px}
  .found-cards{padding:5px 0;margin:6px 0}
  .final-heading{gap:9px}
  .final-heading .trophy-symbol{flex-basis:45px;width:45px;height:45px}
  .final-heading h1{font-size:1.55rem}
  .final-score{margin:6px 0 4px}
  .final-score>div{padding:5px 6px}
  .final-score>div>strong{font-size:2rem}
  .round-table{margin:0 0 5px}
  th,td{padding:3px 4px;line-height:1.25}
  .final-surface .large-button{min-height:44px}
  .final-surface>.small-meta{font-size:.75rem;line-height:1.2}
  .final-surface>.text-button{min-height:30px;padding:3px}
}

@media(max-width:360px){
  .site-header{gap:8px}
  .site-header .brand-slot,.site-header .brand{width:84px}
  .header-actions{gap:6px}
  .audio-controls{gap:4px}
  .audio-button{min-width:35px;min-height:37px;padding:6px}
  .question-mark{width:28px;height:28px}
  .game-top{flex-wrap:nowrap}
  .round-track b{display:none}
}

@media(max-height:500px){
  .site-shell{--header-height:43px;padding-bottom:4px}
  .site-header .brand{display:none}
  .site-header{justify-content:flex-end}
  .audio-button{min-width:32px;min-height:32px}
  .question-mark{width:26px;height:26px}
  .game-top{margin-bottom:3px}
  .scoreboard{margin-bottom:3px}
  .score-team{padding-block:3px}
  .play-surface{padding-block:7px;margin-bottom:3px}
  .round-symbol{display:none}
  .final-heading .trophy-symbol{display:grid}
  .handoff-copy br{display:none}
  .rule-note{margin:4px 0}
  .final-heading .eyebrow{display:none}
  .round-table{font-size:.75rem}
  .final-surface>.small-meta{display:none}
  .home-screen{justify-content:flex-start;padding-top:0}
  .home-screen .wordmark{width:min(76%,360px)}
  .home-rounds{width:210px;margin:3px auto 5px}
  .home-instruction,.home-footnote{display:none}
  .play-button{min-height:52px;font-size:1.7rem}
  .quick-summary{margin:5px 0;font-size:.75rem}
  .home-options{gap:3px}
  .cards-button{min-height:44px}
  .options-button{min-height:32px;padding-block:4px}
}

@media(max-height:500px) and (min-width:601px){
  .home-screen{width:min(760px,100%);display:grid;grid-template-columns:minmax(0,1fr) minmax(270px,.8fr);grid-template-areas:"brand controls" "rounds controls";align-content:center;column-gap:34px}
  .home-brand{grid-area:brand}
  .home-rounds{grid-area:rounds;width:100%;max-width:320px}
  .home-controls{grid-area:controls}
  .home-screen .wordmark{width:100%}
}

/* Compact final score: every control stays inside the phone viewport. */
.final-surface{justify-content:center;padding-block:clamp(12px,2.2dvh,20px)}
.final-heading{flex-direction:column;justify-content:center;gap:4px}
.final-heading .trophy-symbol{display:grid;flex:0 0 auto;width:clamp(52px,7.5dvh,66px);height:clamp(52px,7.5dvh,66px);margin:0 auto clamp(7px,1.2dvh,10px)}
.final-heading .trophy-symbol .icon{width:clamp(27px,4dvh,34px);height:clamp(27px,4dvh,34px)}
.victory-title{font-size:clamp(1.8rem,4.3dvh,2.45rem);color:var(--ink)}
.winner-line{display:flex;align-items:baseline;justify-content:center;flex-wrap:wrap;gap:4px 9px;line-height:1.15}
.winner-line span{font-size:.9375rem;font-weight:900;color:var(--muted)}
.winner-line strong{font-family:var(--display);font-size:clamp(1.55rem,3.8dvh,2.15rem);font-weight:400;color:#7042cf;overflow-wrap:anywhere}
.final-score{margin:clamp(13px,2.1dvh,19px) 0 clamp(9px,1.5dvh,13px)}
.final-score>div{padding:clamp(7px,1.4dvh,12px) 8px;gap:4px}
.final-score>div>strong{font-size:clamp(2.2rem,5.3dvh,2.8rem)}
.round-table{margin:0 0 clamp(10px,1.7dvh,16px)}
.round-table th,.round-table td{padding:clamp(5px,1.05dvh,8px) 5px;line-height:1.25}
.final-surface .large-button{min-height:clamp(46px,6.6dvh,56px);margin-bottom:clamp(3px,.7dvh,6px);padding-block:8px}
.final-surface>.small-meta{line-height:1.25}
.final-surface>.text-button{min-height:clamp(30px,4.5dvh,38px);margin-top:0;padding-block:4px}

@media(max-height:620px){
  .final-surface{padding-block:8px}
  .final-heading .trophy-symbol{width:44px;height:44px;margin-bottom:4px}
  .final-heading .trophy-symbol .icon{width:24px;height:24px}
  .victory-title{font-size:1.65rem}
  .winner-line strong{font-size:1.45rem}
  .final-score{margin:5px 0 3px}
  .round-table{margin-bottom:4px}
  .final-surface>.small-meta{font-size:.75rem}
}
