/* Word Rush: warm paper, rounded lettering and a lavender dice tray. */
:root{--bg:#faf7f0;--panel:#fffdf8;--line:#dfded8;--cream:#303b37;--muted:#626b66;--gold:#946020;--mint:#226c50;--rose:#ac414c;--ink:#303b37;--radius:22px;--teal:#276d5e;--purple:#74618d;--tray:#ded8eb;--tray-edge:#b9adcd;--success-bg:#e2f3e8;--success-ink:#216344;--repeat-bg:#fff0d1;--repeat-ink:#80531b;--invalid-bg:#fde7e5;--invalid-ink:#9c3545;font-family:ui-rounded,'Avenir Next','Trebuchet MS',system-ui,sans-serif;color-scheme:light}
[hidden]{display:none!important}
body{background:var(--bg);font-family:inherit}
body:before{display:none}
button,input,select{font-family:inherit}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline-color:#736193}
svg{display:block}
.wordmark,.game-brand{font-family:inherit;font-style:normal;font-weight:800;letter-spacing:-1.2px;line-height:1;white-space:nowrap;color:var(--teal)}
.wordmark{font-size:29px}
.wordmark span,.game-brand span{color:var(--purple);margin-left:0}
.topbar{border-bottom-color:var(--line);padding:22px 0}
.arcade-brand{font-size:13px;letter-spacing:.1px;font-weight:700}
.arcade-brand small{color:var(--muted);font-size:8px}
.icon-button{border-color:#dcded5;background:#fffdf8;border-radius:50%;font-size:19px;color:#5c685f}
.sound-icon{display:block;width:19px;height:19px}
.sound-icon svg{width:100%;height:100%}
.eyebrow{color:var(--teal);font-size:10px;letter-spacing:1.5px;font-weight:700}
h1,h2,h3{font-family:inherit;font-weight:750}
h2{letter-spacing:-1px}
.button{border-radius:15px;font-weight:700;min-height:52px;letter-spacing:0}
.button.gold,.button.mint{background:var(--teal);box-shadow:0 3px 0 #1c5145;color:#fffdf8;border-color:#276d5e}
.button.secondary{border-color:#cccfc6;background:#fffdf8;color:var(--teal);box-shadow:0 2px 0 #e5e4dc}
.button:hover:not(:disabled){transform:translateY(-1px)}
.button.gold:hover:not(:disabled),.button.mint:hover:not(:disabled){background:#205f52}
.text-button{color:var(--teal);text-decoration:none;font-weight:650}
.text-button:hover{text-decoration:underline}
.panel{background:var(--panel);border-color:var(--line);box-shadow:0 4px 0 #eee9e1}
input,select{background:#fffefa;border-color:#c9cec4;border-radius:12px;color:var(--ink)}
input::placeholder{color:#767d77}
.connection{background:var(--success-bg);border-color:#acd1b8;color:var(--success-ink)}
.connection.warning{background:var(--repeat-bg);border-color:#daba7d;color:var(--repeat-ink)}
.skip{background:var(--teal);color:white}

/* An invitation to play, with a small preview of the real board. */
.landing{gap:64px;padding:66px 0 60px;grid-template-columns:1.2fr 1fr}
.home-game-title{font-size:clamp(66px,7.5vw,106px);font-style:normal;font-weight:800;line-height:1.04;letter-spacing:-5px;margin:16px 0 22px;white-space:nowrap;color:var(--teal)}
.home-game-title em{color:var(--purple);font-style:normal}
.intro>.home-tagline{font-size:22px;font-weight:650;color:var(--ink);line-height:1.4;margin:0 0 14px;max-width:490px;letter-spacing:-.4px}
.intro>p{font-size:17px;line-height:1.65;color:var(--muted);max-width:440px}
.intro .eyebrow{display:inline-block;border-radius:20px;background:#ebe6f2;padding:8px 13px;color:#67517e;font-size:9px;letter-spacing:1.4px;margin-bottom:0}
.intro .setup-note{font-size:12px;line-height:1.7;color:var(--muted);max-width:410px}
.primary-actions{margin:28px 0 14px;gap:12px}
.hero-art{transform:none;padding:22px;max-width:382px;border:1px solid #ddd8d0;border-radius:30px;background:#fffdf8;box-shadow:0 4px 0 #e4dfd6,0 20px 42px #51466612}
.demo-hud{display:flex;align-items:center;justify-content:space-between;padding:0 4px 14px}
.demo-hud span{color:#67517e;letter-spacing:1px;font-size:10px;font-weight:700;background:#eee9f4;padding:8px 11px;border-radius:20px}
.demo-hud strong{font-size:27px;font-variant-numeric:tabular-nums;font-weight:750}
.demo-readout{display:flex;justify-content:center;align-items:center;gap:18px;background:var(--success-bg);color:var(--success-ink);border:1px solid #a8ceb5;padding:12px;border-radius:14px;margin:0 0 18px;font-weight:800;letter-spacing:2px;font-size:24px}
.demo-readout span{font-size:10px;letter-spacing:.5px}
.sample-board{border-radius:21px;padding:10px;gap:8px;background:var(--tray);border:1px solid var(--tray-edge);box-shadow:0 5px 0 #b6a9ca}
.sample-board b{position:relative;background:#fffdf6;color:#343f39;border:1px solid #fff;border-radius:12px;box-shadow:0 4px 0 #c1b8c7,inset 0 -2px 0 #eee8dd;font-size:clamp(25px,3vw,35px);font-weight:750}
.sample-board b:nth-child(-n+4){background:#d5efdf;box-shadow:0 4px 0 #83b49b;border-color:#ebfff2;color:#255e48}
.sample-board b.demo-bonus{background:#f7d894;box-shadow:0 4px 0 #c4a263;border-color:#fff0c4;color:#684818}
.demo-bonus small{position:absolute;top:3px;right:4px;font-size:8px;letter-spacing:0}
.demo-receipt{display:flex;align-items:center;gap:12px;padding:19px 3px 0}
.demo-check{display:grid;place-items:center;background:var(--success-bg);color:var(--success-ink);width:34px;height:34px;border-radius:50%;font-size:22px;font-weight:750}
.demo-receipt small{display:block;font-size:8px;letter-spacing:1px;color:var(--success-ink);margin-bottom:4px;font-weight:700}
.demo-receipt strong{font-size:17px;letter-spacing:1.5px}
.demo-receipt>b{margin-left:auto;font-size:34px;color:var(--success-ink);letter-spacing:-1px}
.how-strip{border-color:var(--line);gap:28px}
.how-strip>div>span{border-radius:50%;color:var(--teal);background:#e4eee3;border:0;font-weight:700}
.how-strip>div:nth-child(2)>span{color:#6e5586;background:#eee7f4}
.how-strip>div:nth-child(3)>span{color:#95603b;background:#fae6d5}
.how-strip strong{font-weight:650}
.home-bottom{padding-top:24px}
footer{color:var(--muted);border-color:var(--line)}

/* The room and shared screen use the same calm, legible materials. */
.join-panel{background:#eef1e8;color:var(--ink);border-color:#d5ddcd;box-shadow:0 4px 0 #e0e5d8}
.join-panel .eyebrow,.join-panel .text-button{color:var(--teal)}
.join-panel .join-url{color:#59645b}
.join-code{letter-spacing:7px;font-weight:750;color:var(--teal)}
.player-card{background:#f5f3ed;border-color:#dfded6;border-radius:16px}
.avatar{border-radius:15px;background:#eee8f5;border-color:#d5c9e1}
.avatar-options button{background:#f2f0e9;border-radius:13px}
.avatar-options button.selected{background:#e2f0e6;border-color:var(--teal)}
.empty-player{border-color:#cbd1c5}
.waiting-avatar{background:#eee7f4}
.countdown{min-height:68dvh}
.count-number{font-style:normal;font-weight:750;color:var(--teal);text-shadow:0 5px 0 #d5e6db;letter-spacing:-6px}
.countdown h2{font-size:34px}
.round-dots i{background:#e1ddd7}
.round-dots i.done{background:#a7cbbb}
.round-dots i.current{background:var(--teal)}
.leader-row{background:#fffdf8;border-color:#dddcd4;border-radius:18px;box-shadow:0 3px 0 #eee9e1}
.leader-row:first-child{border-color:#d9c493;background:#fcf2db}
.leader-row:first-child .leader-score{color:#805720}
.leader-score{font-weight:750;letter-spacing:-1px;color:var(--teal)}
.leader-name{font-weight:700}
.rank{color:#68716a}
.big-timer{font-weight:750;letter-spacing:-5px;color:var(--teal)}
.reveal-header .eyebrow{color:var(--purple)}
.reveal-header h2{font-weight:750;letter-spacing:-1.5px}
.stat-card{background:#f0f4ea;border-color:#d8e0cf;border-radius:18px}
.stat-card:nth-child(2){background:#f2edf6;border-color:#e0d6e9}
.stat-card:nth-child(3){background:#fffdf8;border-color:var(--line)}
.stat-card:nth-child(4){background:#fbede2;border-color:#ebd6c6}
.stat-card>span{color:#62675e;font-weight:700;font-size:9px}
.stat-card strong{color:var(--ink);font-weight:750}
.word-table th{color:var(--muted)}
.word-table td.found{color:var(--success-ink)}
.word-table .only{color:#7d5420;background:#f9eacc;padding:3px 5px;border-radius:5px}
.table-scroll thead{background:var(--panel)}
.missed button{background:#f0eee7;border-color:#dedbd2;border-radius:8px}
.missed button.selected{background:var(--teal);color:#fffdf8}
.filter-tabs button.active{background:var(--teal);border-color:var(--teal);color:#fffdf8;font-weight:700}
.filter-tabs button{border-radius:20px}
.word-chip{background:#fffdf8;border-color:#dddcd4}
.word-chip b{color:var(--success-ink)}
.board,.puzzle-review .board{background:var(--tray);border:1px solid var(--tray-edge);box-shadow:0 5px 0 #b6a9ca}
.tile,.puzzle-review .tile{font-family:inherit;background:#fffdf6;border:1px solid #fff;color:#343f39;box-shadow:inset 0 -2px 0 #eee8dd,0 4px 0 #c1b8c7;font-weight:750}
.tile.bonus,.puzzle-review .tile.bonus{background:#f7d894;border-color:#fff0c4;box-shadow:0 4px 0 #c4a263}
.tile.selected,.puzzle-review .tile.selected{background:#b9e2d1;border-color:#eafff2;color:#225540;box-shadow:0 4px 0 #7aa891;transform:none}
.path-lines line{stroke:#408f76}

/* Compact phone controls leave the stable board geometry unchanged. */
.board-playing .topbar,.board-playing #connection:not(.warning){display:none}
.board-playing .shell{padding-right:max(18px,env(safe-area-inset-right));padding-left:max(18px,env(safe-area-inset-left));padding-bottom:max(18px,env(safe-area-inset-bottom))}
.board-playing #connection.warning{position:sticky;top:0;z-index:20;margin:5px 0;font-size:11px}
.board-playing .phone-play{width:100%;max-width:440px;margin:0 auto;padding:8px 0 12px}
.game-chrome{height:44px;display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}
.game-brand{font-size:26px;letter-spacing:-1px;flex:1;padding-left:2px}
.game-actions{display:flex;gap:5px}
.game-icon{display:grid;place-items:center;width:38px;height:38px;min-height:38px;padding:9px;background:#fffdf8;color:#5d6b62;border:1px solid #ddded6;border-radius:50%}
.game-icon svg{width:19px;height:19px}
.game-icon:active{background:#e9eee4}
.game-icon[aria-pressed=true]{color:var(--teal);border-color:#9bbda9;background:#e2f0e6}
.phone-play .play-top{display:flex;align-items:center;justify-content:space-between;margin:0 0 10px;gap:15px}
.phone-play .play-person{gap:8px;min-width:0}
.phone-play .play-person .avatar{width:26px;height:26px;font-size:18px;border-radius:8px;background:#eee7f4}
.phone-play .play-person strong{font-size:12px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:#56635b;font-weight:600}
.round-chip{font-size:9px;letter-spacing:.9px;color:#636b64;white-space:nowrap;font-weight:650}
.round-chip b{color:var(--ink)}
.score-hud{display:grid;grid-template-columns:1fr .7fr 1fr;align-items:center;gap:10px;min-height:67px;padding:0 3px 10px}
.hud-label{font-size:8px;letter-spacing:1.1px;font-weight:700;color:#626c63;display:block}
.score-well{position:relative}
.score-well #my-score{display:inline-block;font-size:43px;letter-spacing:-1.6px;line-height:1.1;font-weight:750;color:var(--teal);font-variant-numeric:tabular-nums;transform-origin:left center}
#score-gain{position:absolute;left:calc(100% - 20px);top:23px;color:var(--success-ink);font-size:26px;line-height:1;font-weight:800;pointer-events:none;z-index:5;text-shadow:0 1px 5px var(--bg)}
.words-well{text-align:center;border-left:1px solid #ddded5;border-right:1px solid #ddded5}
.words-well strong{font-size:24px;font-weight:700;line-height:1.1;font-variant-numeric:tabular-nums;color:#65547a}
.words-well .hud-label{margin-top:5px;font-size:8px}
.time-well{text-align:right}
.phone-play .timer{font-size:35px;letter-spacing:-1.3px;font-weight:750;line-height:1.33;color:var(--ink);display:block}
.phone-play .timer.urgent{color:var(--invalid-ink)}
.phone-play .progress-track{height:3px;background:#e0e4da;border-radius:3px;margin:0 3px}
.phone-play .progress-track>span{background:#6aa58b;transition:width .1s linear}
.phone-play:has(.timer.urgent) .progress-track>span{background:#bd6269}
.phone-play #word-entry{height:58px;min-height:58px;margin:9px auto 10px;max-width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:1px solid #cec9dc;border-radius:15px;background:#eee9f4;overflow:hidden;padding:4px 8px;transition:background-color 110ms,border-color 110ms}
.phone-play #selected-word{flex:initial;min-width:0;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:clamp(15px,calc((100vw - 70px) / var(--word-length,8) / .7),30px);line-height:1.04;font-weight:800;letter-spacing:.7px;color:var(--ink)}
.phone-play #word-feedback{max-width:100%;font-size:9px;font-weight:750;letter-spacing:.65px;line-height:1.25;text-align:center;color:#645379;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.phone-play #word-entry[data-kind=idle]{background:transparent;border-color:transparent}
.phone-play #word-entry[data-kind=idle] #selected-word{font-size:16px;letter-spacing:0;font-weight:600;color:#536158}
.phone-play #word-entry[data-kind=idle] #word-feedback{font-size:10px;letter-spacing:0;font-weight:400;color:var(--muted)}
.phone-play #word-entry[data-kind=tracing]{background:#dff0e7;border-color:#80ad96}
.phone-play #word-entry[data-kind=tracing] #selected-word,.phone-play #word-entry[data-kind=tracing] #word-feedback{color:#245e48}
.phone-play #word-entry[data-kind=scored]{background:var(--success-bg);border-color:#6f9f80}
.phone-play #word-entry[data-kind=scored] #word-feedback{color:var(--success-ink);font-size:12px;letter-spacing:.7px}
.phone-play #word-entry[data-kind=repeat],.phone-play #word-entry[data-kind=short]{background:var(--repeat-bg);border-color:#c5a25c}
.phone-play #word-entry[data-kind=repeat] #word-feedback,.phone-play #word-entry[data-kind=short] #word-feedback{color:var(--repeat-ink);font-size:10px}
.phone-play #word-entry[data-kind=invalid],.phone-play #word-entry[data-kind=closed]{background:var(--invalid-bg);border-color:#d59a9e}
.phone-play #word-entry[data-kind=invalid] #word-feedback,.phone-play #word-entry[data-kind=closed] #word-feedback{color:var(--invalid-ink);font-size:10px}
.phone-play #word-entry[data-kind=pending],.phone-play #word-entry[data-kind=waiting]{background:#eee9f4;border-color:#b8a7ce}
.phone-play #word-entry[data-kind=pending] #word-feedback{color:#645379}

/* Dice never move underneath a finger, including result and selection states. */
.board-playing #play-board-wrap{width:100%;max-width:max(224px,calc(100svh - 394px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)));margin:0 auto}
.phone-play .board{padding:10px;gap:8px;background:var(--tray);border:1px solid var(--tray-edge);border-radius:24px;box-shadow:inset 0 2px 0 #f0ecf6,0 6px 0 #b6a9ca,0 11px 18px #66547812}
.phone-play .tile{font-family:inherit;font-weight:750;line-height:1;letter-spacing:-.8px;font-size:clamp(27px,8vw,39px);background:linear-gradient(155deg,#fffef9,#f8f3e9);border:1px solid #fffefb;border-radius:13px;color:#343f39;box-shadow:inset 0 -2px 0 #eee8dd,inset 0 1px 0 #fff,0 4px 0 #bfb5c8,0 5px 3px #62516a18;z-index:auto}
.phone-play .tile>span:first-child{position:relative;z-index:4;pointer-events:none}
.phone-play .tile.bonus{background:#f7d894;border-color:#fff0c4;box-shadow:inset 0 -2px 0 #eed095,0 4px 0 #c4a263,0 5px 3px #62516a18}
.phone-play .tile small{right:4px;top:4px;background:#785520;color:#fff7e0;font-size:8px;line-height:1;padding:3px 4px;border-radius:4px;letter-spacing:-.2px;z-index:4}
.phone-play .tile.selected{background:#b9e2d1;border-color:#eafff2;color:#225540;box-shadow:inset 0 -2px 0 #a5d2bd,0 4px 0 #7aa891,0 0 0 2px #3984675e;transform:none}
.phone-play .tile .step{display:none}
.phone-play .board[style*="5"] .tile{font-size:clamp(20px,6vw,29px);border-radius:10px}
.phone-play .path-lines{z-index:3}
.phone-play .path-lines line{stroke:#377f67;stroke-width:5;opacity:.62}
.phone-play .path-lines line.finger-trail{stroke:#286f59;stroke-width:4;opacity:.8}
.phone-play .tile[data-result=scored]{background:#c5ecd2;border-color:#edfff2;box-shadow:0 4px 0 #83b595,inset 0 -2px 0 #addbbb;color:#215e3c}
.phone-play .tile[data-result=repeat],.phone-play .tile[data-result=short]{background:#f7d894;border-color:#fff1cf;box-shadow:0 4px 0 #c4a263;color:#684818}
.phone-play .tile[data-result=invalid]{background:#f7c4c4;border-color:#fff0ee;box-shadow:0 4px 0 #c88f98;color:#81334c}
#play-board-wrap[data-result=scored] .board{border-color:#679e7e;box-shadow:inset 0 0 0 1px #83b595,0 6px 0 #95b29f,0 0 20px #5e9a7522}
#play-board-wrap[data-result=invalid] .board{border-color:#bc7c8b}

/* A readable receipt stays on screen while the next word is being traced. */
.result-receipt{display:flex;align-items:center;gap:10px;min-height:75px;margin:16px 0 0;padding:10px 12px;background:#fffdf8;border:1px solid #d7d9cf;border-radius:16px;--result-ink:#59665c;--result-length:10}
.result-symbol{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:50%;background:#e5e9e0;color:#59695c}
.result-symbol svg{width:19px;height:19px;stroke-width:2.7}
.receipt-copy{min-width:0;flex:1}
#result-label{display:block;font-size:11px;letter-spacing:.5px;color:var(--result-ink);font-weight:800;line-height:1.2;margin-bottom:3px}
#result-word{display:block;font-size:clamp(12px,calc((100vw - 192px) / var(--result-length) / .7),20px);font-weight:750;line-height:1.05;color:var(--ink);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;letter-spacing:.4px}
#result-detail{display:block;font-size:10px;color:var(--result-ink);line-height:1.2;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.receipt-award{min-width:46px;text-align:right;color:var(--result-ink)}
#result-points{display:block;font-size:34px;line-height:.95;font-weight:800;letter-spacing:-1.3px;font-variant-numeric:tabular-nums}
#result-unit{display:block;font-size:7px;font-weight:750;letter-spacing:1px;margin-top:4px}
.result-receipt[data-kind=idle]{border-style:dashed;background:transparent;min-height:75px}
.result-receipt[data-kind=idle] #result-word{font-size:14px;font-weight:600;letter-spacing:0;color:#56645a}
.result-receipt[data-kind=idle] .result-symbol{background:#eae5f1;color:#6d597e}
.result-receipt[data-kind=idle] .receipt-award{display:none}
.result-receipt[data-kind=scored]{background:var(--success-bg);border-color:#91bb9f;--result-ink:var(--success-ink)}
.result-receipt[data-kind=scored] .result-symbol{background:#276d4b;color:#fff}
.result-receipt[data-kind=repeat],.result-receipt[data-kind=short]{background:var(--repeat-bg);border-color:#cfb073;--result-ink:var(--repeat-ink)}
.result-receipt[data-kind=repeat] .result-symbol,.result-receipt[data-kind=short] .result-symbol{background:#936723;color:#fff}
.result-receipt[data-kind=invalid],.result-receipt[data-kind=closed]{background:var(--invalid-bg);border-color:#d2a0a6;--result-ink:var(--invalid-ink)}
.result-receipt[data-kind=invalid] .result-symbol,.result-receipt[data-kind=closed] .result-symbol{background:#a84d60;color:#fff}
.result-receipt[data-kind=waiting]{background:#eee9f4;border-color:#c0afd2;--result-ink:#66517e}
.phone-play .phone-tools{display:flex;justify-content:space-between;gap:8px;align-items:center;margin:12px 0 0}
.phone-play .phone-tools button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;font-size:11px;font-weight:650;color:#58665b;background:#fffdf8;border:1px solid #d9dcd1;border-radius:12px;padding:10px 14px;flex:1}
.phone-tools svg{width:17px;height:17px;flex-shrink:0}
.phone-play .phone-tools button:active{background:#e7eee2}
.phone-play .phone-tools .tap-submit{background:var(--teal);color:#fffdf8;border-color:var(--teal);font-weight:750}
.phone-play .recent-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:18px 1px 8px;color:#5c675d;font-size:8px;font-weight:700;letter-spacing:1px}
.phone-play #board-hint{font-size:7px;color:#7b5c2b;letter-spacing:.5px;margin:0}
.phone-play .recent-words{display:flex;flex-wrap:nowrap;gap:6px;max-height:none;overflow:auto;border:0;padding:0 0 7px;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b5c4b5 transparent}
.phone-play .word-chip{flex-shrink:0;background:#fffdf8;border:1px solid #d7ded0;border-radius:10px;font-size:11px;padding:8px 10px;line-height:1.2;font-weight:600;gap:8px}
.phone-play .word-chip b{color:var(--success-ink)}
.phone-play .word-chip:first-child{border-color:#a5c2ac}
.phone-play .word-chip[data-highlight]{background:var(--repeat-bg);border-color:#c7a466;color:var(--repeat-ink)}
.words-empty{color:var(--muted);font-size:11px;line-height:28px}
.keyboard-form{margin:12px 0 0}
.keyboard-form input{font-size:16px;border-radius:11px}
.keyboard-form button{border-radius:11px;font-size:12px}
dialog{background:#fffdf8;border:1px solid #dfdcd2;border-radius:25px;box-shadow:0 20px 80px #33372f38;color:var(--ink)}
dialog::backdrop{background:#35413c77;backdrop-filter:blur(7px)}
.play-options h2{font-size:29px}
.play-options .eyebrow{margin-bottom:12px}
.option-list{display:flex;flex-direction:column;gap:8px;margin-top:22px}
.option-list button{text-align:left;padding:15px 17px;border:1px solid #dedfd5;border-radius:14px;background:#f4f4ed;color:var(--ink)}
.option-list button strong{display:block;font-size:15px;margin-bottom:6px;font-weight:700}
.option-list button span{font-size:11px;color:var(--muted);line-height:1.5}
.option-list .option-leave{background:transparent;margin-top:5px}
.option-list .option-leave strong{color:var(--invalid-ink)}
#toast{background:var(--teal);color:#fffdf8;border-radius:14px;box-shadow:0 8px 30px #364c3c33}

@media(max-width:900px){.landing{gap:30px}.home-game-title{font-size:clamp(56px,7.5vw,76px);letter-spacing:-3px}.intro>.home-tagline{font-size:19px}.primary-actions .button{font-size:14px;padding:14px 17px;gap:12px}}
@media(max-width:650px){
 .shell{padding:0 20px}.topbar{padding:17px 0}.wordmark{font-size:24px;letter-spacing:-.9px}.arcade-brand{font-size:11px}.arcade-brand small{font-size:6px;letter-spacing:1.5px}.icon-button{width:36px;height:36px;min-height:36px}.top-actions{gap:5px}
 .landing{grid-template-columns:1fr;padding:35px 0 38px;gap:30px}.home-game-title{font-size:clamp(44px,12.4vw,76px);letter-spacing:-2.7px;margin:18px 0 16px}.intro>.home-tagline{font-size:18px;line-height:1.4;margin-bottom:12px;letter-spacing:-.25px}.intro>p{font-size:15px;line-height:1.65}.intro .eyebrow{font-size:8px;letter-spacing:1.2px;padding:7px 11px}.primary-actions{margin-top:23px;flex-direction:row;gap:10px}.primary-actions .button{width:auto;flex:1;font-size:13px;padding:13px 10px;gap:10px}.intro .setup-note{margin:18px 0 0;font-size:11px}
 .hero-art{max-width:330px;padding:17px;transform:none;margin:0 auto 10px;border-radius:26px}.sample-board b{font-size:29px}.demo-hud{padding-bottom:11px}.demo-readout{padding:9px;margin-bottom:14px;font-size:21px}.demo-receipt{padding-top:16px}.how-strip{padding:24px 0;gap:20px}
 .screen-heading h2{font-size:31px}.leader-row{padding:13px}.leader-score{font-size:33px}.reveal-header h2{font-size:37px;line-height:1.1}.stat-card{padding:17px}.stat-card strong{font-size:22px}.puzzle-review .tile{font-size:29px}.count-number{font-size:155px;letter-spacing:-5px}.countdown h2{font-size:29px}
}
@media(max-height:690px) and (max-width:650px){
 .board-playing .phone-play{padding-top:3px}.game-chrome{height:36px;margin-bottom:5px}.game-brand{font-size:22px}.game-icon{width:33px;height:33px;min-height:33px;padding:7px}.phone-play .play-top{margin-bottom:6px}.phone-play .play-person .avatar{width:22px;height:22px;font-size:16px}.phone-play .play-person strong{font-size:11px}
 .score-hud{min-height:56px;padding-bottom:7px}.score-well #my-score{font-size:35px}.phone-play .timer{font-size:30px}.words-well strong{font-size:21px}.hud-label{font-size:7px}
 .phone-play #word-entry{height:50px;min-height:50px;margin:6px auto 8px}.phone-play #word-entry[data-kind=idle] #selected-word{font-size:14px}.phone-play #word-entry[data-kind=idle] #word-feedback{font-size:9px}
 .board-playing #play-board-wrap{max-width:max(220px,calc(100svh - 344px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)))}.phone-play .board{gap:6px;padding:8px;border-radius:19px}.phone-play .tile{font-size:29px;border-radius:10px}.phone-play .board[style*="5"] .tile{font-size:23px}.phone-play .tile small{font-size:6px;top:2px;right:2px;padding:2px 3px}
 .result-receipt,.result-receipt[data-kind=idle]{min-height:61px;margin-top:13px;padding:8px 10px}.result-symbol{width:27px;height:27px;flex-basis:27px}#result-points{font-size:30px}#result-detail{font-size:8px}.phone-play .phone-tools{margin-top:9px}.phone-play .phone-tools button{min-height:39px;padding:9px 11px}.phone-play .recent-heading{margin-top:13px}
}
@media(max-width:380px){.topbar .arcade-brand>span{display:none}.game-brand{font-size:23px}.phone-play .phone-tools{gap:6px}.phone-play .phone-tools button{padding:10px 9px;font-size:10px}.phone-play .phone-tools svg{width:15px;height:15px}.phone-play .phone-tools:has(#tap-submit:not([hidden])) svg{display:none}.primary-actions .button{font-size:12px}.phone-play #word-feedback{font-size:8px;letter-spacing:.3px}}
@media(prefers-reduced-motion:reduce){.phone-play *,.phone-play *:before,.phone-play *:after{animation:none!important;transition:none!important}}


/* Word Rush 2.0: quiet scoreboard, larger word building, tactile tile path. */
.phone-play .score-hud{grid-template-columns:1fr auto;gap:16px;padding:0 5px 10px;min-height:64px}
.phone-play .words-well{display:none}
.phone-play .score-well #my-score{font-size:clamp(39px,11vw,52px);color:#286f62;letter-spacing:-2px}
.phone-play .hud-label{font-size:9px;letter-spacing:.8px;color:#69786e}
.phone-play .time-well .timer{font-size:clamp(30px,8vw,41px)}
.phone-play #word-entry{height:68px;min-height:68px;margin:9px auto 10px;border-radius:18px;border-color:transparent;background:transparent;gap:3px;padding:4px 7px}
.phone-play #selected-word{font-size:clamp(28px,calc((100vw - 58px) / var(--word-length,8) / .66),46px);font-weight:850;letter-spacing:1px;line-height:1.06;text-transform:uppercase;color:#2a4b42}
.phone-play #word-entry[data-kind=idle] #selected-word{font-size:17px;text-transform:none;letter-spacing:0;color:#89928d;font-weight:600}
.phone-play #word-entry[data-kind=tracing]{background:#e4f1e9;border-color:#b3d4c1}
.phone-play #word-entry[data-kind=tracing] #selected-word{color:#236957}
.phone-play #word-entry[data-kind=scored] #selected-word{color:#246747}
.phone-play #word-entry[data-kind=repeat] #selected-word,.phone-play #word-entry[data-kind=short] #selected-word{color:#8e661d}
.phone-play #word-entry[data-kind=invalid] #selected-word{color:#ad5764}
.phone-play #word-feedback{font-size:12px;line-height:1.1;letter-spacing:.1px;text-transform:none}
.phone-play #word-feedback:empty{display:none}
.phone-play .board{overflow:visible;isolation:isolate;padding:10px;gap:9px}
.phone-play .tile{position:relative;z-index:2;transition:background-color 75ms,border-color 75ms,box-shadow 85ms,transform 95ms cubic-bezier(.2,.9,.3,1)}
.phone-play .tile.selected{position:relative;z-index:5;background:linear-gradient(150deg,#a8e4cf,#c8f1d8);color:#164e45;border:2px solid #4ca98c;transform:translateY(-3px) scale(1.11);box-shadow:0 6px 0 #659982,0 0 0 4px #7bc7b455,0 4px 22px #2c927344,inset 0 1px 0 #ecfff3}
.phone-play .tile.selected.bonus{background:linear-gradient(150deg,#ffe5aa,#f5d58f);border-color:#bd8544;color:#6f4c18}
.phone-play .path-lines{z-index:3;pointer-events:none;overflow:visible}
.phone-play .path-lines .path-halo line{stroke:#92e4c2;stroke-width:22;opacity:.68;stroke-linecap:round;filter:drop-shadow(0 0 6px #409e8d)}
.phone-play .path-lines .path-core line{stroke:#267d6e;stroke-width:10;opacity:.94;stroke-linecap:round}
.phone-play .path-lines .path-core line.finger-trail{stroke:#49b69b;stroke-width:9;opacity:.84;stroke-dasharray:1 0}
.phone-play .path-lines .path-rings circle{fill:none;stroke:#35a386;stroke-width:6;opacity:.84;filter:drop-shadow(0 0 4px #45b498)}
.phone-play .result-receipt,.phone-play .result-receipt[data-kind=idle]{margin:11px 0 0;min-height:46px;border:0;border-radius:13px;padding:8px 12px;gap:10px;background:#f1f1ec}
.phone-play .result-receipt[data-kind=idle]{opacity:.58;background:transparent}
.phone-play .result-symbol{width:23px;height:23px;flex-basis:23px}
.phone-play .result-symbol svg{width:15px;height:15px}
.phone-play .result-receipt #result-detail,.phone-play .result-receipt #result-unit{display:none}
.phone-play #result-label{margin:0;font-size:9px;letter-spacing:.3px}
.phone-play #result-label:empty{display:none}
.phone-play #result-word{font-size:17px;letter-spacing:.2px;line-height:1.12}
.phone-play #result-points{font-size:25px;line-height:1}
.phone-play .receipt-award{min-width:38px}
.phone-play .result-receipt[data-kind=idle] #result-word{font-size:12px}
.phone-play .recent-heading{margin-top:14px}
.phone-play #board-hint{font-size:9px}
@media(max-height:690px) and (max-width:650px){
 .phone-play #word-entry{height:53px;min-height:53px;margin:5px auto 7px}
 .phone-play #selected-word{font-size:clamp(22px,calc((100vw - 60px) / var(--word-length,8) / .7),34px)}
 .phone-play #word-entry[data-kind=idle] #selected-word{font-size:14px}
 .phone-play .result-receipt,.phone-play .result-receipt[data-kind=idle]{min-height:39px;margin-top:9px}
 .phone-play .score-hud{min-height:53px}
}
@media(prefers-reduced-motion:reduce){
 .phone-play .tile{transition:none}
 .phone-play .path-lines .path-halo line,.phone-play .path-lines .path-rings circle{filter:none}
}


/* Game Night 2.1: personalized players and the TV reveal. */
.avatar{overflow:hidden}
.avatar-doodle{width:100%;height:100%;display:block;border-radius:inherit}
.avatar-options #draw-avatar-button{display:flex;align-items:center;justify-content:center;background:#f8f4ec;border:2px solid #d5c9e1;font-size:22px;overflow:hidden;padding:2px}
.avatar-options #draw-avatar-button.selected{background:#dff0e7;border-color:var(--teal)}
.avatar-options #draw-avatar-button .avatar{width:100%;height:100%;border:0;border-radius:9px}
.waiting-avatar>.avatar{width:100%;height:100%;font-size:64px;border-radius:32px}
.score-sounds{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0 4px}
.score-sounds button{padding:9px 5px;border:2px solid #d9d8d1;background:#fffefa;border-radius:12px;font-size:12px;font-weight:700;color:#5e6962;min-height:50px}
.score-sounds button span{display:block;font-size:18px;color:#7a658e;line-height:1.1;margin-bottom:3px}
.score-sounds button.selected{border-color:#2c826c;background:#dff2e7;color:#235a48}
.draw-avatar-dialog{border:0;border-radius:26px;padding:0;background:#fffdf8;color:#2e403a;width:min(94vw,390px);max-height:90dvh;box-shadow:0 22px 90px #17282c4f}
.draw-avatar-dialog::backdrop{background:#1a2530b0}
.doodle-modal{padding:20px;display:flex;flex-direction:column;align-items:center;gap:10px}
.doodle-modal h2{align-self:stretch;margin:0;font-size:27px;color:#2e403a}
.doodle-modal>p{align-self:stretch;margin:0;font-weight:400}
#avatar-canvas{width:min(100%,275px);aspect-ratio:1;display:block;background:white;border:3px solid #d9cce4;border-radius:18px;touch-action:none;cursor:crosshair;user-select:none}
.doodle-colors{display:flex;gap:9px;justify-content:center}
.doodle-colors button{background:var(--ink-swatch);width:36px;height:36px;border-radius:50%;border:3px solid #cfcacb;padding:0;min-height:36px}
.doodle-colors button.active{outline:3px solid #378473;outline-offset:2px}
.doodle-actions{width:100%;display:flex;gap:9px;justify-content:center}
.doodle-actions button{flex:1;font-size:13px;padding:10px 8px;min-height:43px}
.player-card .avatar-doodle,.leaderboard .avatar-doodle{width:100%;height:100%}
.showdown{padding:24px 0 30px}
.showdown .reveal-header{text-align:center;padding:9px 0 10px}
.showdown .reveal-header h2{font-size:clamp(30px,4.5vw,56px);margin:6px 0 9px}
.showdown .reveal-header p{font-size:16px;margin:0}
.tally-spotlight{min-height:98px;display:flex;align-items:center;justify-content:center;gap:17px;padding:14px 20px;background:linear-gradient(135deg,#ece6f5,#e1f0e6);border:1px solid #d4cadf;border-radius:22px;margin:18px 0 20px;text-align:center;font-size:20px;font-weight:700;color:#356f60;flex-wrap:wrap}
.tally-player{display:inline-flex;align-items:center;gap:10px;color:#313b37;font-size:clamp(16px,2vw,24px)}
.tally-player .avatar{width:47px;height:47px}
.tally-word{font-size:16px;color:#687368}
.tally-points{font-variant-numeric:tabular-nums;font-size:clamp(36px,5vw,58px);font-weight:850;color:#237a5e}
.tally-pop{animation:tally-pop .35s ease-out}
@keyframes tally-pop{0%{transform:scale(.96);opacity:.75}70%{transform:scale(1.02)}100%{transform:scale(1);opacity:1}}
.showdown .tally-layout{display:grid;grid-template-columns:minmax(260px,1fr) minmax(260px,1fr);align-items:start;gap:24px}
.showdown .tally-layout>.showdown-words{min-width:0;background:#fffdf8;border:1px solid #e2dce5;border-radius:18px;padding:20px}
.showdown-words .eyebrow{margin:0 0 12px;color:#736184}
.showdown .tally-words{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:flex-start;gap:7px;max-height:42vh;overflow:auto}
.showdown .tally-words .word-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;min-height:33px;font-size:12px;border:1px solid #d5d8cf;border-radius:11px;background:#f5f4ee}
.showdown .tally-words .avatar{width:22px;height:22px;font-size:14px;border-radius:6px}
.showdown .tally-controls{display:flex;gap:12px;align-items:center;justify-content:center;margin:22px auto 0}
.showdown .leader-row{transition:transform .18s,background .18s}
.showdown .leader-row.score-bump{animation:tally-score-jump .35s ease-out}
@keyframes tally-score-jump{45%{transform:translateX(5px);background:#d7f0dc}}
.phone-play .last-ten{display:block;min-height:0;height:0;overflow:hidden;font-size:10px;font-weight:800;letter-spacing:1.2px;color:#ac4752;transition:height .18s}
.phone-play .last-ten.visible{height:16px}
.phone-play .timer.time-beat{animation:timer-bump .24s ease-out}
@keyframes timer-bump{50%{transform:scale(1.12);color:#c34b5e}}
@media(max-width:750px){
 .showdown{padding-top:12px}
 .showdown .tally-layout{grid-template-columns:1fr;gap:17px}
 .showdown .reveal-header h2{font-size:31px}
 .tally-spotlight{min-height:72px;padding:10px;gap:8px;margin:13px 0}
 .showdown .tally-words{max-height:24vh}
 .showdown .tally-controls{flex-wrap:wrap}
 .showdown .tally-controls button{flex:1;min-width:140px}
 .score-sounds{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:375px){
 .score-sounds button{font-size:10px}
 .doodle-modal{padding:14px}
}
@media(prefers-reduced-motion:reduce){
 .tally-pop,.phone-play .timer.time-beat,.showdown .leader-row.score-bump{animation:none}
}

.play-options .haptic-native-test{display:flex;align-items:center;flex-wrap:wrap;gap:9px;padding:12px 16px;border:1px solid #d7d7cf;border-radius:14px;background:#f8f7f1;color:#394e42;font-size:13px;line-height:1.35}
.play-options .haptic-native-test strong{font-size:14px}
.play-options .haptic-native-test small{flex-basis:100%;font-weight:400;color:#66766b}
.play-options .haptic-native-test input{margin-left:auto;min-height:25px;width:40px;height:25px}
body:not([data-haptics="ios-switch-only"]) .haptic-native-test{display:none}

.filter-tabs button .avatar{display:inline-grid;width:22px;height:22px;font-size:15px;border-radius:6px;vertical-align:middle;margin-right:5px}


/* Hosting is playable on a phone; the separate TV is a spectator. */
.setup-detail{margin:14px 0 24px!important;line-height:1.5}
.tv-home{margin-right:24px}
.tv-mode .shell{max-width:1800px}
.tv-mode .topbar{padding:12px 0}
.tv-mode footer{display:none}
.tv-mode .big-timer{font-size:clamp(90px,12vw,210px)}
.tv-mode .leader-score{font-size:clamp(30px,4vw,66px)}
.tv-mode .leader-name{font-size:clamp(18px,2.3vw,34px)}
.tv-mode .live-layout{min-height:72dvh;align-items:center}
.tv-mode .connection:not(.warning){display:none}
#tv-setup .wide{margin:16px 0}
#tv-display-link{font-size:14px}
@media (max-width:600px){
  .phone-mode .screen-heading{align-items:start;gap:12px;flex-direction:column}
  .phone-mode .lobby-grid{grid-template-columns:1fr}
  .phone-mode .join-panel{padding:20px}
  .phone-mode .join-panel .qr{max-width:145px;margin:0 auto}
  .phone-mode .join-panel .join-code{font-size:36px}
  .phone-mode .lobby-controls{flex-direction:column;align-items:stretch;gap:12px}
  .phone-mode .lobby-controls .button-row{display:grid;grid-template-columns:1fr 1fr}
}
@media (orientation:landscape) and (max-height:600px){
  .tv-mode .live-layout{grid-template-columns:.8fr 1.2fr;padding:16px 0;gap:24px}
  .tv-mode .live-clock h2,.tv-mode .live-clock>p,.tv-mode .topbar .arcade-brand{display:none}
  .tv-mode .big-timer{font-size:90px}
  .tv-mode .leader-row{padding:9px 12px}
  .tv-mode .leader-name{font-size:20px}
  .tv-mode .leader-score{font-size:32px}
}

.tv-fullscreen{display:none}.tv-mode .tv-fullscreen{display:inline-flex}

/* Last ten seconds: a slow red pulse behind the board, without moving tiles. */
body.final-seconds .board-wrap{background:#fbd5d1;box-shadow:0 0 0 8px #ef777344,0 0 44px 14px #e94e4e55;animation:final-board-pulse 1s ease-in-out infinite}
body.final-seconds .phone-play .time-well{background:#ffe1dc;color:#a72828;border-radius:16px}
body.final-seconds .last-ten{color:#a72828;font-weight:900}
@keyframes final-board-pulse{50%{background:#f6ada6;box-shadow:0 0 0 12px #ef777366,0 0 58px 20px #e94e4e77}}
.tally-word{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}.tally-word-item{display:inline-flex;align-items:center;gap:6px;background:#fffdf8;padding:7px 10px;border-radius:10px}.tally-word-item b,.word-points{color:#24745f;white-space:nowrap}.tally-word-item small,.word-bonus{color:#946210;font-size:11px;font-weight:800}
@media(prefers-reduced-motion:reduce){body.final-seconds .board-wrap{animation:none;background:#f7b7b0;box-shadow:0 0 0 8px #dc514c66}}

/* Review paths use explicit outlines too; SVG otherwise defaults to black fill. */
.path-lines .path-node{fill:none;stroke:#35a386;stroke-width:4;opacity:.8}
.puzzle-review .path-lines .path-halo line{stroke:#a3ddc8;stroke-width:12;opacity:.55;stroke-linecap:round}
.puzzle-review .path-lines .path-core line{stroke:#267d6e;stroke-width:4;opacity:.85;stroke-linecap:round}
