/* Liquid Glass-inspired web material. Content stays legible; controls float above it. */
:root{
  --ink:#201e27;--muted:#615f6b;--accent:#3674a9;--pink:#d44076;--violet:#6776db;
  --page:#fcf9f6;--surface:#eeedf0;--panel:rgba(255,255,255,.72);--line:rgba(255,255,255,.88);
  --glass:rgba(255,255,255,.43);--glass-edge:rgba(255,255,255,.94);--glass-bottom:rgba(143,171,204,.28);
  --glass-shadow:0 12px 35px -17px rgba(34,69,112,.28),inset 0 1px 1px rgba(255,255,255,.98),inset 0 -1px 1px rgba(84,121,166,.08);
  --solid:#fffdfa;--input:rgba(255,255,255,.86);--selected:#e4f0ff;--primary:#3679bc;--on-primary:#fff;
  --card:#fffefd;--card-text:#292832;--good-card:#c6f0db;--good-ink:#115b3e;--miss-card:#e8e2d8;
  --sand:#e7dbbf;--assassin:#283547;--focus:#3674a9;color-scheme:light;
}
:root[data-theme=dark]{
  --ink:#f2f6ff;--muted:#b0bed2;--accent:#8ac6ff;--pink:#ffa6bc;--violet:#b1b5ff;
  --page:#080f12;--surface:#223033;--panel:rgba(20,32,36,.9);--line:rgba(210,231,255,.19);
  --glass:rgba(29,47,53,.56);--glass-edge:rgba(219,236,255,.37);--glass-bottom:rgba(112,151,197,.16);
  --glass-shadow:0 14px 35px -16px rgba(0,0,0,.72),inset 0 1px 1px rgba(230,241,255,.19),inset 0 -1px 1px rgba(123,166,221,.08);
  --solid:#17272c;--input:rgba(9,20,25,.88);--selected:#164553;--primary:#315a80;--on-primary:#fff;
  --card:#203035;--card-text:#f3f7ff;--good-card:#194f40;--good-ink:#b9f8d9;--miss-card:#3d3d3b;
  --sand:#80765e;--assassin:#070d17;--focus:#91caff;color-scheme:dark;
}
html{background:var(--page)}body{background:none;color:var(--ink);isolation:isolate}
body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(ellipse 80% 55% at 1% 4%,#d5e8ff 0,transparent 72%),radial-gradient(ellipse 85% 65% at 105% 38%,#c5edf5 0,transparent 74%),radial-gradient(ellipse 70% 50% at 4% 90%,#dcdffc 0,transparent 78%),linear-gradient(145deg,#f8faff,#edf4fa 65%,#eff4ff)}
:root[data-theme=dark] body::before{background:radial-gradient(ellipse 85% 55% at 0 0,#183758 0,transparent 70%),radial-gradient(ellipse 80% 65% at 110% 40%,#124552 0,transparent 70%),radial-gradient(ellipse 80% 50% at 10% 100%,#27264d 0,transparent 75%),#0a1220}
#app{max-width:660px}button,a,input,select{-webkit-tap-highlight-color:transparent}button{transition:transform .18s ease,background-color .18s ease,box-shadow .18s ease;color:var(--ink);touch-action:manipulation}button:not(:disabled):active{transform:scale(.975)}button:disabled{opacity:.55}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--focus);outline-offset:4px}
.ui-icon{display:inline-block;vertical-align:middle;flex-shrink:0;width:24px;height:24px;pointer-events:none}
/* A reflective upper rim, soft inner edge and blurred backdrop form the material. */
.round-icon,.mode-card,.home-links,.quick-links button,.resume,.subhead,.game-top,.key-toggle,.secondary,.role-switch,.replay-controls{
  border:1px solid var(--glass-edge);border-bottom-color:var(--glass-bottom);
  background:linear-gradient(145deg,rgba(255,255,255,.24),rgba(255,255,255,0) 42%,rgba(174,209,244,.09)),var(--glass);
  -webkit-backdrop-filter:blur(24px) saturate(160%);backdrop-filter:blur(24px) saturate(160%);
  box-shadow:var(--glass-shadow);color:var(--ink);
}
.round-icon{width:46px;height:46px;border-radius:50%;font-size:28px}.round-icon .ui-icon{width:22px;height:22px}
.home{padding:calc(18px + env(safe-area-inset-top,0px)) 24px max(14px,env(safe-area-inset-bottom,0px));overflow:visible;gap:0}
.home-head{height:46px}.home-wordmark{display:flex;align-items:center;gap:9px;font-size:11px;letter-spacing:.15em;font-weight:750;color:var(--muted)}.home-wordmark>svg{width:20px;color:var(--accent);stroke-width:1.6}
.brand{margin:15px 0 25px}.brand h1{font-size:clamp(28px,7.8vw,44px);font-weight:740;letter-spacing:-.055em;line-height:1.16;margin:13px 0 9px}.brand p{color:var(--muted);font-size:15px;letter-spacing:-.015em;margin:0}
.glass-emblem{position:relative;height:124px;width:172px;margin:0 auto;filter:drop-shadow(0 16px 15px rgba(40,94,156,.14))}.emblem-card{position:absolute;width:76px;height:98px;border-radius:25px;border:1px solid rgba(255,255,255,.96);box-shadow:inset 2px 2px 4px #ffffffdb,inset -2px -2px 5px #467dc62b,0 8px 24px #2b63922b;display:flex;align-items:center;justify-content:center;gap:7px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.emblem-card.back{left:23px;top:10px;transform:rotate(-20deg);background:linear-gradient(145deg,#ffffffb0,#a7dcff68 65%,#d4bfff7a)}.emblem-card.front{left:78px;top:22px;transform:rotate(16deg);background:linear-gradient(135deg,#faffffda,#b9eafc9c 62%,#7dc4f175)}.emblem-card i{width:9px;height:9px;border-radius:50%;background:#167bc8;box-shadow:inset 0 1px 2px #0b437b4d,0 1px 1px #ffffffa1}.emblem-card.back i{background:#6d7cd0}.emblem-spark{position:absolute;right:6px;top:3px;font-size:24px;color:var(--accent);text-shadow:0 1px 2px #fff}
:root[data-theme=dark] .emblem-card.back{background:linear-gradient(145deg,#859fe363,#405e9955 65%,#605b9c70)}:root[data-theme=dark] .emblem-card.front{background:linear-gradient(135deg,#94d4fba6,#5ca6d766 65%,#6f8ed459)}:root[data-theme=dark] .emblem-card i{background:#d5f0ff}:root[data-theme=dark] .emblem-spark{text-shadow:none}
.mode-list{gap:11px}.mode-card,.daily-card{min-height:83px;border-radius:27px;padding:15px;gap:14px}.mode-card.featured{min-height:98px;background:linear-gradient(125deg,rgba(255,255,255,.30),rgba(152,211,255,.28)),var(--glass);border-color:var(--glass-edge)}.mode-card strong{font-size:18px;font-weight:700;letter-spacing:-.025em}.mode-card small{font-size:12px;line-height:1.45;margin-top:4px;color:var(--muted)}.mode-card>span:nth-child(2){min-width:0}.mode-card .chevron{color:var(--muted);margin-left:auto}.chevron .ui-icon{width:16px;height:16px}
.tile-icon,.tile-icon.pair,.tile-icon.sparkle,.tile-icon.daily-icon{min-width:49px;width:49px;height:49px;border-radius:17px;padding:0;letter-spacing:0;background:rgba(127,180,239,.15);color:var(--accent);box-shadow:inset 0 1px 1px var(--glass-edge)}.tile-icon .ui-icon{width:26px;height:26px}.tile-icon.daily-icon{background:rgba(247,176,60,.14);color:#956000}.tile-icon.sparkle{background:rgba(136,121,214,.13);color:#6356b6}:root[data-theme=dark] .tile-icon.daily-icon{color:#ffcf75}:root[data-theme=dark] .tile-icon.sparkle{color:#bdb5ff}
.quick-links{gap:11px;margin:13px 0 24px}.quick-links button{min-height:62px;border-radius:23px;padding:12px 6px;display:flex;justify-content:center;align-items:center;gap:9px;font-size:12px;font-weight:650}.quick-links span{font-size:12px;margin:0;color:var(--ink)}.quick-links .ui-icon{width:20px;height:20px;color:var(--accent)}
.home-links{display:flex;align-items:center;justify-content:space-evenly;gap:0;width:100%;max-width:350px;min-height:63px;margin:auto auto 0;padding:5px;border-radius:99px}.home-links button{width:auto;flex:1;min-height:48px;flex-direction:row;gap:8px;font-size:12px;font-weight:650;color:var(--ink);border-radius:99px}.home-links button>span{display:inline;width:auto;height:auto;font-size:12px;border:0;background:none;box-shadow:none}.home-links button>.ui-icon{width:20px;height:20px;color:var(--accent)}.dock-divider{height:22px;width:1px;background:var(--glass-bottom)}.build-number{font-size:10px;color:var(--muted);margin:13px 0 0;opacity:.8}.resume{display:flex;align-items:center;gap:8px;min-height:44px}.resume .ui-icon{width:17px;height:17px}
.page{padding:calc(16px + env(safe-area-inset-top,0px)) 24px max(36px,env(safe-area-inset-bottom,0px))}.subhead{position:sticky;top:calc(8px + env(safe-area-inset-top,0px));z-index:20;min-height:60px;margin:0 -7px 30px;padding:6px;border-radius:99px}.subhead .round-icon{background:transparent;box-shadow:none;border-color:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}.subhead strong{font-size:17px;font-weight:650}.head-spacer{width:46px;flex-shrink:0}.eyebrow{color:var(--accent);letter-spacing:.12em;font-size:10px;margin:3px 0 10px}.page h2{font-size:clamp(27px,7.4vw,36px);font-weight:730;letter-spacing:-.04em}.muted,.small-note,.rules-text p,.field-label,.setting-label,.or,.number-row span{color:var(--muted)}.small-note{font-size:12px;line-height:1.6}.muted{font-size:15px}.glass-panel,.action-panel,.stats-grid>div,.badge-card,.daily-results,.history-row,.result-numbers>div{background:var(--panel);border:1px solid var(--line);border-radius:28px;box-shadow:0 10px 32px -24px #16335345}.glass-panel{padding:21px;margin-top:23px}.field-label,.setting-label{font-size:13px;font-weight:650}.setting-label{margin-top:23px}
.glass-panel input,.action-panel input,.full-select,.number-row select{background:var(--input);border:1px solid var(--glass-bottom);color:var(--ink);border-radius:17px;box-shadow:inset 0 1px 2px #17325505}.glass-panel input::placeholder,.action-panel input::placeholder{color:var(--muted);opacity:.8}.glass-panel input,.action-panel input{min-height:54px;font-size:16px}.primary,.secondary{min-height:52px;border-radius:99px;font-size:15px;font-weight:650}.primary{background:linear-gradient(180deg,#ffffff0f,#ffffff00),var(--primary);color:var(--on-primary);border:1px solid #ffffff3d;box-shadow:inset 0 1px 0 #ffffff33,0 8px 19px -12px #0064c999}.primary span{font-size:21px}.join-row button{background:var(--selected);color:var(--accent);border:1px solid var(--glass-bottom);border-radius:18px;min-width:88px}.text-link{color:var(--accent);min-height:34px}.refresh-room{outline:none}
.segmented,.difficulty-grid{background:var(--surface);border:1px solid var(--glass-bottom);border-radius:21px;padding:4px;gap:4px;grid-template-columns:repeat(3,minmax(0,1fr))}.segmented button{font-size:12px;color:var(--muted);min-height:44px;border-radius:17px;padding:10px 4px}.segmented button.is-active,.difficulty-grid .choice.selected{background:var(--solid);color:var(--ink);box-shadow:0 2px 8px #1f416c15,inset 0 1px 0 var(--glass-edge);border-color:var(--line)}.difficulty-grid .choice{padding:11px 3px;background:transparent;border:1px solid transparent;border-radius:17px;box-shadow:none;font-size:12px}.choice small{color:var(--muted);font-size:10px;margin-top:5px}.difficulty-description{color:var(--ink);font-size:13px;margin:13px 0 6px}.deck-grid{gap:9px}.deck-grid .choice{border:1px solid var(--glass-bottom);border-radius:18px;padding:13px 9px;min-height:54px;background:var(--input);font-size:12px;display:flex;align-items:center;gap:8px}.deck-grid .choice.selected{background:var(--selected);border-color:var(--accent);box-shadow:inset 0 0 0 .5px var(--accent);color:var(--ink)}.deck-grid span{display:flex;width:20px;flex-shrink:0;color:var(--accent)}.deck-grid .ui-icon{width:20px;height:20px}
.room-code{background:var(--input);border:1px solid var(--glass-bottom);color:var(--accent);font-size:32px;letter-spacing:.15em;border-radius:20px;font-variant-numeric:tabular-nums}.room-qr{background:transparent;border:0;padding:14px 0 5px}.room-qr svg{background:#fff;border-color:#fff;border-radius:12px;box-shadow:0 5px 20px #13294712}.room-qr p{color:var(--muted)}.player-list{border-color:var(--glass-bottom)}.player-list div{color:var(--ink)}.player-list span{color:var(--accent)}
.game-screen{padding:calc(12px + env(safe-area-inset-top,0px)) 15px max(30px,env(safe-area-inset-bottom,0px))}.game-top{border-radius:99px;height:60px;padding:6px;z-index:10}.game-top .round-icon{background:transparent;border-color:transparent;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}.game-heading strong{font-size:18px;font-weight:700}.game-heading small{color:var(--muted);font-size:8px}.turn-token{background:var(--selected);color:var(--accent);font-size:14px;min-height:40px;min-width:57px;border:1px solid var(--line)}.connection-bar{font-size:10px;gap:5px}.connection-state{color:#176542}:root[data-theme=dark] .connection-state{color:#8ce5ba}.connection-state.reconnecting{color:var(--pink)}.connection-bar button{color:var(--accent);min-width:32px;min-height:32px}
.mission-progress{background:var(--panel);border-color:var(--line);border-radius:24px;box-shadow:none;margin-top:8px}.mission-progress small{color:var(--muted);font-size:9px;letter-spacing:.05em}.mission-progress strong{color:var(--ink);font-size:24px}.mission-progress strong span{color:var(--muted)}.mission-progress .sep{background:var(--glass-bottom)}.role-status{color:var(--muted);font-size:12px}.role-status b{color:var(--ink)}.key-toggle{border-radius:19px;min-height:47px;font-size:12px}.key-toggle>span+span{color:var(--accent)}.key-panel{background:var(--panel);border-color:var(--line);border-radius:0 0 22px 22px;box-shadow:none}.key-legend{color:var(--muted)}.key-cell{background:var(--sand);border-color:#9d896e4d}.key-cell.agent,.key-legend .agent{background:#58bc92;border-color:#348969}.key-cell.assassin,.key-legend .assassin{background:var(--assassin);border-color:#77879a}.grid-caption{color:var(--muted);font-size:10px;letter-spacing:.1em}
.word-grid{gap:6px}.word-tile{background:var(--card);color:var(--card-text);border:1px solid var(--line);border-radius:13px;box-shadow:0 3px 6px #142d4f08;font-size:clamp(9px,2.35vw,13px);min-height:48px;font-weight:700;aspect-ratio:1.12;letter-spacing:-.015em}.word-tile.solved{background:var(--good-card);color:var(--good-ink);border-color:#46ab7f;box-shadow:inset 0 1px 0 #ffffff33}.word-tile.missed{background:var(--miss-card);color:var(--muted)}.word-tile.trait-agent:not(.solved){box-shadow:inset 0 -4px 0 #47ac82,0 3px 6px #142d4f08}.word-tile.trait-assassin:not(.solved){box-shadow:inset 0 -4px 0 var(--assassin),0 3px 6px #142d4f08}:root[data-theme=dark] .word-tile.trait-assassin:not(.solved){box-shadow:inset 0 -4px 0 #99a5b9,0 3px 6px #0002}.word-mark{color:var(--good-ink)}.word-mark.grey{color:var(--muted)}
.action-panel{padding:19px;margin-top:19px}.action-panel h3{font-size:19px;font-weight:700}.action-panel p{color:var(--muted)}.number-row select{min-height:48px}.clue-current small{color:var(--muted)}.clue-current strong{color:var(--accent)}.clue-current strong span,.number-pill{color:var(--accent);background:var(--selected);border-radius:10px}.history{background:var(--panel);border-color:var(--line);color:var(--muted);border-radius:21px}.history>div span{background:var(--surface)}.role-switch{border-radius:99px;min-height:48px;color:var(--accent)}.loading-mark{color:var(--accent)}.sudden-badge{color:#a32e42;background:#ffe0e6}.error-note{color:#a12437;background:#fff0f2;border-color:#e8a9b4}:root[data-theme=dark] .error-note,:root[data-theme=dark] .sudden-badge{color:#ffd2db;background:#4e2230;border-color:#a45f70}
.overlay{background:#07132666;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);padding-bottom:max(20px,env(safe-area-inset-bottom,0px))}.confirm{position:relative;background:var(--solid);border:1px solid var(--glass-edge);border-radius:34px;box-shadow:0 24px 70px #06152666;padding:28px 23px 23px}.confirm::before{content:"";position:absolute;top:10px;left:calc(50% - 17px);width:34px;height:4px;border-radius:99px;background:var(--glass-bottom)}.confirm h2{font-size:30px;overflow-wrap:anywhere}.confirm p{color:var(--muted)}.confirm-buttons{gap:12px}.confirm .secondary{background:var(--surface)}
.stats-grid{gap:12px}.stats-grid>div{padding:22px 16px;border-radius:25px}.stats-grid strong{font-size:32px;font-weight:700;letter-spacing:-.03em;color:var(--ink)}.stats-grid small{color:var(--muted)}.badge-card{border-radius:24px}.badge-icon{background:var(--surface);color:var(--muted);border-radius:18px}.unlocked .badge-icon{background:var(--selected);color:var(--accent)}.badge-card progress{accent-color:var(--accent);background:var(--surface)}.badge-card progress::-webkit-progress-bar{background:var(--surface)}.badge-card progress::-webkit-progress-value{background:var(--accent)}.badge-card progress::-moz-progress-bar{background:var(--accent)}.good-text{color:var(--good-ink)}:root[data-theme=dark] .good-text{color:#8ce5ba}.history-row{border-radius:20px}.replay-controls{border-radius:99px;padding:6px}.replay-controls .secondary{width:46px;min-height:46px;padding:8px}.event-list li{border-color:var(--glass-bottom)}.event-list .current button{background:var(--selected)}.event-list button{color:var(--ink);min-height:48px}.word-tile.replay-current{outline-color:var(--accent)}.replay-keys .agent{background:#a2e4c4;color:#12462f}.replay-keys .assassin{background:#182536;color:white}
.toggle-row{gap:18px;padding:23px 0 4px;color:var(--ink);font-size:14px}.toggle-row>span{flex:1;min-width:0}.toggle-row small{display:block;color:var(--muted);font-size:11px;line-height:1.5;margin-top:5px}.toggle-row input[type=checkbox]{appearance:none;-webkit-appearance:none;position:relative;width:51px;height:31px;min-height:31px;flex-shrink:0;padding:0;border:0;border-radius:99px;background:#aeb9c8;box-shadow:inset 0 1px 3px #1122331f;cursor:pointer;transition:background .18s}.toggle-row input[type=checkbox]::before{content:"";position:absolute;left:3px;top:3px;width:25px;height:25px;border-radius:50%;background:#fff;box-shadow:0 2px 5px #20304038;transition:transform .18s}.toggle-row input[type=checkbox]:checked{background:#279d62}.toggle-row input[type=checkbox]:checked::before{transform:translateX(20px)}
.end-screen{padding-top:calc(20px + env(safe-area-inset-top,0px))}.end-screen .finish-illustration{margin-top:45px;background:linear-gradient(135deg,#ffffff80,#91d7ed66),var(--glass);border:1px solid var(--glass-edge);box-shadow:var(--glass-shadow);color:var(--accent);font-size:65px}.end-screen h1{font-size:clamp(38px,10vw,54px);font-weight:740;letter-spacing:-.05em}.end-screen p{color:var(--muted)}.fail-word{background:var(--surface);color:var(--pink)}.result-numbers small{color:var(--muted)}.end-screen .primary,.end-screen .secondary{min-height:53px}.end-actions{margin:18px 0}
/* No continuous motion: only small press feedback. Respect both app and OS preferences. */
:root[data-motion=reduced] *, :root[data-motion=reduced] *::before{transition:none!important;animation:none!important}
@media(prefers-reduced-motion:reduce){*,*::before{transition:none!important;animation:none!important}html{scroll-behavior:auto}}
/* Browsers without backdrop filters receive an opaque material. */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){:root{--glass:var(--solid);--panel:var(--solid)}}
:root[data-transparency=reduced]{--glass:var(--solid);--panel:var(--solid)}
:root[data-transparency=reduced] .round-icon,:root[data-transparency=reduced] .mode-card,:root[data-transparency=reduced] .home-links,:root[data-transparency=reduced] .quick-links button,:root[data-transparency=reduced] .subhead,:root[data-transparency=reduced] .game-top,:root[data-transparency=reduced] .secondary,:root[data-transparency=reduced] .key-toggle,:root[data-transparency=reduced] .resume,:root[data-transparency=reduced] .role-switch,:root[data-transparency=reduced] .replay-controls,:root[data-transparency=reduced] .emblem-card{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--solid)}
@media(prefers-reduced-transparency:reduce){:root{--glass:var(--solid);--panel:var(--solid)}.round-icon,.mode-card,.home-links,.quick-links button,.subhead,.game-top,.secondary,.key-toggle,.resume,.role-switch,.replay-controls,.emblem-card{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--solid)}}
@media(prefers-contrast:more){:root{--glass:var(--solid);--panel:var(--solid);--muted:var(--ink);--glass-bottom:var(--ink);--line:var(--ink)}.word-tile{border-color:var(--ink)}}
@media(forced-colors:active){body::before,.glass-emblem{display:none}button,input,select,.word-tile{border:1px solid ButtonText}.choice.selected{outline:2px solid Highlight}.word-tile.solved::after{content:'✓'}.word-tile.trait-agent::before{content:'Ü';position:absolute;top:0;left:2px}.word-tile.trait-assassin::before{content:'B';position:absolute;top:0;left:2px}}
@media(max-width:380px){.home,.page{padding-inline:16px}.home-wordmark{font-size:10px}.brand{margin:12px 0 22px}.brand h1{font-size:28px}.glass-emblem{height:114px;transform:scale(.92)}.mode-card{gap:10px;padding:13px}.mode-card strong{font-size:16px}.mode-card small{font-size:11px}.tile-icon,.tile-icon.pair,.tile-icon.sparkle,.tile-icon.daily-icon{min-width:43px;width:43px;height:43px;border-radius:15px}.glass-panel{padding:16px}.subhead strong{font-size:15px}.game-screen{padding-inline:9px}.word-grid{gap:4px}.word-tile{border-radius:10px;font-size:9px;padding:3px 2px}.deck-grid .choice{font-size:11px;gap:6px;padding:11px 7px}.quick-links button{gap:6px}.room-code{font-size:29px}.key-legend{gap:6px;font-size:9px}.segmented button{font-size:11px}}
@media(min-width:600px){.home{padding-inline:45px}.brand{margin-top:24px}.brand h1{font-size:42px}.mode-card{padding:18px 21px}.mode-card strong{font-size:20px}.mode-card small{font-size:13px}.game-screen{padding-inline:25px}.word-grid{gap:9px}.word-tile{font-size:14px;min-height:70px;border-radius:17px}.page{padding-inline:30px}}
/* The divider is a line, not an icon container inherited from the old dock. */
.home-links>.dock-divider{display:block;flex:0 0 1px;width:1px;height:22px;min-width:1px;border:0;border-radius:0;background:var(--glass-bottom);box-shadow:none}
:root{background:var(--page)}
:root[data-theme=dark] .badge-card progress,:root[data-theme=dark] .badge-card progress::-webkit-progress-bar{background:var(--surface)}
/* Keep secondary text readable on the darker tinted control material. */
:root[data-theme=dark]{--muted:#c7d4e6}
:root[data-theme=dark] .mode-card.featured{background:linear-gradient(125deg,rgba(255,255,255,.08),rgba(104,178,235,.12)),var(--glass)}
:root[data-theme=dark][data-transparency=reduced] .mode-card.featured{background:var(--solid)}
@media(prefers-reduced-transparency:reduce){:root[data-theme=dark] .mode-card.featured{background:var(--solid)}}
/* v4.10: approved concept — porcelain, a restrained blue action and warm/cool glass. */
body::before{background:radial-gradient(ellipse 63% 30% at 14% 12%,#fbe6de80,transparent 78%),radial-gradient(ellipse 55% 28% at 92% 30%,#e1f4f480,transparent 76%),radial-gradient(ellipse 75% 38% at 10% 80%,#fff0df80,transparent 80%),#fcf9f6}
:root[data-theme=dark] body::before{background:radial-gradient(ellipse 70% 38% at 65% 18%,#0e3b435c,transparent 74%),radial-gradient(ellipse 70% 35% at 5% 77%,#132e3450,transparent 74%),#080f12}
:root[data-theme=dark]{--muted:#bccbd1;--accent:#86cde2;--glass-edge:rgba(224,249,255,.35);--glass-bottom:rgba(143,192,201,.21)}
.home{padding:calc(16px + env(safe-area-inset-top,0px)) 22px max(12px,env(safe-area-inset-bottom,0px));min-height:100svh}
.home-head{height:44px}.home-head .round-icon{width:44px;height:44px;background:#ffffff7a;border-color:#fff9;box-shadow:0 5px 15px #1e243308}
:root[data-theme=dark] .home-head .round-icon{background:#6b8d9922;border-color:#daeefb50}
.home-wordmark{gap:10px;font-size:10px;letter-spacing:.22em;color:var(--ink);font-weight:700}.mini-brand{width:34px;height:32px;display:block}.mini-brand img{width:38px;height:29px;max-width:none}.home-wordmark>span:last-child{padding-top:2px}
.brandmark-dark{display:none!important}:root[data-theme=dark] .brandmark-light{display:none!important}:root[data-theme=dark] .brandmark-dark{display:block!important}
.brand{margin:7px 0 22px;position:relative}.glass-emblem{width:216px;height:162px;position:relative;filter:none;margin:0 auto 2px;transform:none}.glass-emblem img{width:216px;height:162px;display:block;border-radius:0}.brand h1{font-size:clamp(27px,8.1vw,39px);font-weight:750;letter-spacing:-.055em;line-height:1.14;margin:4px 0 10px}.brand p{font-size:15px;color:var(--muted);line-height:1.4;letter-spacing:-.015em}
.mode-list{display:grid;grid-template-columns:1fr 1fr;gap:12px;z-index:2}
.mode-card{position:relative;min-width:0;min-height:116px;display:flex;flex-direction:column;align-items:flex-start;gap:9px;padding:17px 16px 15px;border-radius:26px;background:linear-gradient(140deg,#ffffffae,#ffffff65);border-color:#fff;box-shadow:0 14px 22px -18px #4e443d55,inset 0 1px 1px #fff}
.mode-card strong{font-size:16px;font-weight:700;letter-spacing:-.025em;line-height:1.2}.mode-card small{font-size:11px;line-height:1.45;margin-top:5px;color:var(--muted)}.mode-card>.chevron{position:absolute;right:12px;top:19px;width:17px;height:17px;font-weight:400;color:#8b9295}.chevron .ui-icon{width:17px;height:17px}
.tile-icon,.tile-icon.pair,.tile-icon.daily-icon,.tile-icon.sparkle{background:none;box-shadow:none;padding:0;min-width:27px;width:27px;height:27px;border-radius:0;display:grid;place-items:center}.tile-icon .ui-icon{width:27px;height:27px}.tile-icon.daily-icon{color:#be7100}.tile-icon.sparkle{color:#367c90}.daily-card{background:linear-gradient(140deg,#ffffffc7,#ffead479)}.demo-card{background:linear-gradient(140deg,#ffffffc7,#d4f2ea85)}
.mode-card.featured{grid-column:1/-1;min-height:94px;flex-direction:row;align-items:center;gap:16px;padding:18px 16px 18px 20px;border-radius:27px;color:#fff;background:var(--soft-action);border-color:#b1d4ef;box-shadow:0 13px 24px -16px #4b739b66,inset 0 1px 2px #f2faffd9,inset 0 -1px 1px #33598440}
.mode-card.featured .tile-icon{color:#fff;min-width:45px;width:45px;height:43px;border-right:1px solid #ffffff40;padding-right:13px;box-sizing:content-box}.mode-card.featured .tile-icon .ui-icon{width:29px;height:29px}.mode-card.featured>span:nth-child(2){flex:1;padding-right:34px}.mode-card.featured strong{font-size:19px;font-weight:650;letter-spacing:-.02em}.mode-card.featured small{color:#fff;font-size:12px;opacity:.95;line-height:1.45;max-width:230px}
.mode-card.featured>.chevron{position:absolute;right:13px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:36px;height:36px;border-radius:50%;border:1px solid #bdefff6b;background:#b3dfff24;color:#fff;box-shadow:inset 0 1px 1px #ffffff36}.featured .chevron .ui-icon{width:20px;height:20px}
:root[data-theme=dark] .mode-card{background:linear-gradient(130deg,#a8c5c91a,#1e3c402e);border-color:#accbd652;box-shadow:0 12px 22px -13px #0008,inset 0 1px 1px #defcff36}
:root[data-theme=dark] .mode-card.daily-card{background:linear-gradient(140deg,#d4bb7b2b,#252c2638);border-color:#d7c18d5c}:root[data-theme=dark] .mode-card.demo-card{background:linear-gradient(140deg,#8bd7d52a,#16404433);border-color:#98d9dc57}
:root[data-theme=dark] .tile-icon.daily-icon{color:#ffc55c}:root[data-theme=dark] .tile-icon.sparkle{color:#8bdcde}
:root[data-theme=dark] .mode-card.featured{background:var(--soft-action);border-color:#94b9d980;box-shadow:inset 0 1px 2px #c6e5fc80,inset 0 -1px 1px #162e4e80,0 12px 28px -20px #638cb06b}
:root[data-theme=dark] .mode-card.featured small{color:#d3e6f8}.mode-card:not(.featured)>.tile-icon{margin-bottom:1px}
.word-vignette{position:relative;height:115px;flex:0 0 115px;width:100%;max-width:450px;margin:14px auto 0;isolation:isolate}
.sample-word{position:absolute;top:21px;display:grid;place-items:center;height:65px;width:108px;border-radius:17px;font-size:13px;font-weight:500;letter-spacing:.18em;border:1px solid #ffffffec;box-shadow:inset 0 1px 2px #ffffffe6,inset 0 -1px 1px #b3bfc344,0 12px 16px -8px #8e7f6a38;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
.sample-moon{left:6%;transform:rotate(-19deg);background:linear-gradient(135deg,#effbf8a6,#a2dbc4a0);color:#2e635d}.sample-mirror{left:calc(50% - 54px);top:40px;z-index:3;transform:rotate(-7deg);background:linear-gradient(135deg,#fffcf6e6,#ffdbb5b3);color:#775849}.sample-sea{right:3%;transform:rotate(17deg);background:linear-gradient(135deg,#f6fbffa6,#b6d7efa0);color:#225d76}
.orbit{position:absolute;z-index:-1;left:0;top:32px;width:100%;height:55px;border:1px solid #ffffffb3;border-radius:50%;transform:rotate(3deg)}.orbit-two{transform:rotate(-12deg);top:40px;width:92%;left:4%;opacity:.65}
:root[data-theme=dark] .sample-word{box-shadow:inset 0 1px 2px #e6ffff8c,inset 0 -2px 1px #b8ffff24,0 14px 20px -9px #000b;border-color:#c5ffff61}:root[data-theme=dark] .sample-moon{background:linear-gradient(135deg,#59c6ae70,#163f39a6);color:#cefff0}:root[data-theme=dark] .sample-mirror{background:linear-gradient(135deg,#f9f5d6d1,#b6ac8bad);color:#151f25}:root[data-theme=dark] .sample-sea{background:linear-gradient(135deg,#66b9d36b,#19343fa6);color:#a7f1ff}:root[data-theme=dark] .orbit{border-color:#69b8c633}
.quick-links{margin:5px 2px 24px;gap:0;grid-template-columns:1fr 1fr}.quick-links button{border:0;border-radius:0;min-height:45px;padding:8px 3px;box-shadow:none;background:none;-webkit-backdrop-filter:none;backdrop-filter:none;gap:8px;font-size:12px}.quick-links button+button{border-left:1px solid #b3b4b740}.quick-links button>span{font-size:12px;color:var(--ink);white-space:nowrap}.quick-links .ui-icon{width:20px;height:20px;color:#634157}.quick-links button>.ui-icon:last-child{width:13px;height:13px;color:var(--muted)}
:root[data-theme=dark] .quick-links .ui-icon{color:#bbd6e2}.home-links{min-height:59px;margin-top:auto;max-width:100%;padding:4px;border-radius:99px;background:linear-gradient(145deg,#ffffffb5,#ffffff4a);box-shadow:inset 0 1px 1px #fff,0 12px 24px -15px #72647e45}.home-links button{min-height:47px;font-size:12px;gap:9px}.home-links button>span{font-size:12px}.home-links button>.ui-icon{color:#8e355b;width:20px;height:20px}.home-links>.dock-divider{height:21px;background:#948b9238}
:root[data-theme=dark] .home-links{background:linear-gradient(145deg,#a9d4e226,#142b3063);border-color:#ceeaf65c;box-shadow:inset 0 1px 2px #d5f6ff70,0 12px 28px -12px #0009}:root[data-theme=dark] .home-links button>.ui-icon{color:#cadde4}.build-number{margin-top:9px;font-size:9px;opacity:.7}
/* The reduced-transparency setting also covers the new decorative cards. */
:root[data-transparency=reduced] .mode-card:not(.featured),:root[data-transparency=reduced] .home-links,:root[data-transparency=reduced] .sample-word{background:var(--solid);-webkit-backdrop-filter:none;backdrop-filter:none}
:root[data-transparency=reduced] .mode-card.featured{background:#4175b1;-webkit-backdrop-filter:none;backdrop-filter:none}
:root[data-theme=dark][data-transparency=reduced] .mode-card.featured{background:#315a80}
:root[data-theme=dark][data-transparency=reduced] .sample-word{color:var(--ink)}
@media(prefers-reduced-transparency:reduce){.mode-card:not(.featured),.home-links,.sample-word{background:var(--solid)!important;-webkit-backdrop-filter:none;backdrop-filter:none}.mode-card.featured{background:#4175b1!important;-webkit-backdrop-filter:none;backdrop-filter:none}.sample-word{color:var(--ink)!important}}
@media(prefers-contrast:more){.mode-card:not(.featured),.home-links{background:var(--solid)!important}.mode-card small{color:var(--ink)}.mode-card.featured small{color:#fff}.mode-card.featured{background:#0557ab!important}}
@media(max-width:380px){.home{padding-inline:16px}.brand{margin-top:7px;margin-bottom:20px}.brand h1{font-size:27px}.brand p{font-size:13px}.glass-emblem{width:192px;height:144px;transform:none}.glass-emblem img{width:192px;height:144px}.mode-list{gap:10px}.mode-card{padding:14px 12px;min-height:111px;gap:8px;border-radius:23px}.mode-card strong{font-size:14px}.mode-card small{font-size:10px}.mode-card.featured{padding:16px 12px;gap:10px;min-height:91px}.mode-card.featured .tile-icon{width:28px;min-width:28px;padding-right:10px}.mode-card.featured strong{font-size:17px}.mode-card.featured small{font-size:10px}.mode-card.featured>span:nth-child(2){padding-right:32px}.mode-card.featured>.chevron{right:10px;width:32px;height:32px}.sample-word{width:94px;height:60px;font-size:11px}.sample-mirror{left:calc(50% - 47px)}.word-vignette{height:106px;flex-basis:106px}.sample-moon{left:3%}.sample-sea{right:2%}.quick-links{margin-bottom:19px}.quick-links button{gap:5px}.quick-links button>span{font-size:11px}.home-links{min-height:56px}}
@media(min-width:600px){.home{padding-inline:45px}.brand{margin:14px 0 28px}.glass-emblem{width:240px;height:180px}.glass-emblem img{width:240px;height:180px}.brand h1{font-size:40px}.brand p{font-size:17px}.mode-card{padding:20px;min-height:128px}.mode-card strong{font-size:19px}.mode-card small{font-size:13px}.mode-card.featured{min-height:102px;padding-inline:24px}.mode-card.featured strong{font-size:22px}.mode-card.featured small{font-size:14px}.mode-card.featured>.chevron{right:24px;width:42px;height:42px}.mode-card.featured .tile-icon{width:51px}.sample-word{width:126px;height:73px;font-size:15px}.sample-mirror{left:calc(50% - 63px)}.word-vignette{height:135px;flex-basis:135px}.quick-links button>span{font-size:14px}.home-links{max-width:420px}}

/* v4.10: softer blue actions and layered frosted setup materials. */
:root{
  --soft-action:radial-gradient(ellipse 38% 150% at 112% -30%,#bceaff8c,transparent 80%),linear-gradient(115deg,#4588c7,#3679bc 55%,#4384c2);
  --setup-panel:linear-gradient(135deg,#ffffff9e,#ffffff4d),var(--glass);
  --setup-control:linear-gradient(140deg,#ffffffb8,#ffffff38);
  --setup-selected:linear-gradient(135deg,#e7f5ffe0,#bcdcf4b8);
  --setup-edge:#bfd0df9c;
  --setup-rim:#7daacc;
  --setup-track:#e4e8ed8c;
  --setup-highlight:#ffffffd9;
}
:root[data-theme=dark]{
  --soft-action:radial-gradient(ellipse 50% 150% at 110% -35%,#a0c4e43b,transparent 80%),linear-gradient(120deg,#376d9d,#2c5b8a 65%,#386d98);
  --setup-panel:linear-gradient(135deg,#7794aa14,#162d3a30),var(--glass);
  --setup-control:linear-gradient(140deg,#b4d2e51f,#263f4d21);
  --setup-selected:linear-gradient(135deg,#457fa294,#2c5b828c);
  --setup-edge:#9bb7ca40;
  --setup-rim:#93b6d1;
  --setup-track:#08151c52;
  --setup-highlight:#e1f3ff38;
}
.mode-card.featured small{opacity:1}
.setup-page .glass-panel{
  background:var(--setup-panel);border-color:var(--glass-edge);
  box-shadow:0 18px 36px -28px #324b6b66,inset 0 1px 1px var(--setup-highlight),inset 0 -1px 1px var(--setup-edge);
  -webkit-backdrop-filter:blur(24px) saturate(1.15);backdrop-filter:blur(24px) saturate(1.15);
}
.setup-page .difficulty-grid{background:var(--setup-track);border-color:var(--setup-edge);box-shadow:inset 0 1px 3px #112c4510}
.setup-page .difficulty-grid .choice.selected{background:var(--setup-control);border-color:var(--glass-edge);box-shadow:inset 0 1px 1px var(--setup-highlight),0 5px 14px -8px #223b5c40}
.setup-page .deck-grid .choice,.setup-page .glass-panel input{
  background:var(--setup-control);border-color:var(--setup-edge);
  box-shadow:inset 0 1px 1px var(--setup-highlight),0 7px 16px -15px #34516d70;
}
.setup-page .deck-grid .choice.selected{
  background:var(--setup-selected);border-color:var(--setup-rim);
  box-shadow:inset 0 1px 1px var(--setup-highlight),inset 0 -1px 1px #7797b326,0 8px 18px -15px #42699180;
}
.setup-page .primary{background:var(--soft-action);border-color:var(--setup-rim);box-shadow:inset 0 1px 2px #f1faffb3,inset 0 -1px 1px #2b4d7238,0 10px 22px -15px #426c9b99}
.setup-page .join-row button{background:var(--setup-selected);border-color:var(--setup-edge);box-shadow:inset 0 1px 1px var(--setup-highlight)}
/* Material variables keep the same selection affordance in opaque mode. */
:root[data-transparency=reduced]{--setup-panel:var(--solid);--setup-control:var(--solid);--setup-selected:var(--selected);--setup-track:var(--surface);--soft-action:var(--primary)}
:root[data-transparency=reduced] .setup-page .glass-panel{-webkit-backdrop-filter:none;backdrop-filter:none}
@media(prefers-reduced-transparency:reduce){
  :root,:root[data-theme=dark]{--setup-panel:var(--solid);--setup-control:var(--solid);--setup-selected:var(--selected);--setup-track:var(--surface);--soft-action:var(--primary)}
  .setup-page .glass-panel{-webkit-backdrop-filter:none;backdrop-filter:none}
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  :root,:root[data-theme=dark]{--setup-panel:var(--solid);--setup-control:var(--solid);--setup-selected:var(--selected);--setup-track:var(--surface)}
}
@media(prefers-contrast:more){
  :root,:root[data-theme=dark]{--setup-panel:var(--solid);--setup-control:var(--solid);--setup-selected:var(--selected);--setup-track:var(--surface);--setup-edge:var(--ink);--setup-rim:var(--accent);--soft-action:#315f95}
  .setup-page .deck-grid .choice.selected{outline:2px solid var(--accent);outline-offset:1px}
}

/* v4.10: neutral graphite controls inside the app; the home action stays blue. */
.page,.game-screen,.end-screen{
  --accent:#41414b;--primary:#25252d;--selected:#e5e5e9;--focus:#555562;
  --control-action:linear-gradient(120deg,#303039,#202027);
  --control-edge:#54545f;--setup-rim:#555560;
}
:root[data-theme=dark] .page,:root[data-theme=dark] .game-screen,:root[data-theme=dark] .end-screen{
  --accent:#e0e0e7;--primary:#303038;--selected:#383840;--focus:#c7c7d1;
  --control-action:linear-gradient(120deg,#41414b,#292930);
  --control-edge:#81818b;--setup-rim:#81818b;
}
.page .primary,.game-screen .primary,.end-screen .primary,
.setup-page .join-row button,.setup-page .deck-grid .choice.selected{
  background:var(--control-action);color:#fff;border-color:var(--control-edge);
  box-shadow:inset 0 1px 1px #ffffff26,0 10px 22px -17px #25253066;
}
.setup-page .deck-grid .choice.selected span{color:#fff}
.setup-page .deck-grid .choice:not(.selected) span{color:var(--accent)}
.page .role-switch,.game-screen .role-switch{color:var(--accent)}
:root[data-transparency=reduced] .page,:root[data-transparency=reduced] .game-screen,:root[data-transparency=reduced] .end-screen{--control-action:var(--primary)}
@media(prefers-reduced-transparency:reduce){.page,.game-screen,.end-screen{--control-action:var(--primary)}}
@media(prefers-contrast:more){.page,.game-screen,.end-screen{--control-action:#202027;--control-edge:#fff}}
/* A static, softly colored pool of light around the emblem. */
.glass-emblem::before{
  content:"";position:absolute;inset:-8px -44px -12px;pointer-events:none;
  background:radial-gradient(ellipse 42% 50% at 28% 35%,#ffb9b75c,transparent 100%),radial-gradient(ellipse 42% 42% at 35% 76%,#ffe6ab70,transparent 100%),radial-gradient(ellipse 40% 54% at 76% 52%,#83ddeb63,transparent 100%);
  filter:blur(14px);
}
.glass-emblem img{position:relative;z-index:1}
:root[data-theme=dark] .glass-emblem::before{
  background:radial-gradient(ellipse 36% 44% at 30% 32%,#e9ae6845,transparent 100%),radial-gradient(ellipse 48% 58% at 62% 52%,#18c6cf66,transparent 100%),radial-gradient(ellipse 40% 46% at 73% 73%,#2a90a536,transparent 100%);
}
:root[data-transparency=reduced] .glass-emblem::before{display:none}
@media(prefers-reduced-transparency:reduce),(forced-colors:active){.glass-emblem::before{display:none}}
