/* Sems follows a centered puzzle layout; navigation stays in the menu. */
.sems-page{min-height:100dvh;overflow-x:clip}
:root[data-theme=dark] .sems-page{--page:#1b1d1c;--surface:#262828;--ink:#f5f5f4;--muted:#b4b8b7;--line:#474c4e;--tint:#303334;background:var(--page)}
.sems-page .game-topbar{width:100%;max-width:none;min-height:60px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;border:0;padding:8px 24px;gap:16px}
.sems-page .game-topbar .ws-brand{grid-column:2;font-family:"Outfit",system-ui,sans-serif;font-size:30px;font-weight:600;letter-spacing:-.8px;line-height:1.15}
/* Individual letter colors stay readable in both appearance modes. */
.sems-page{--title-1:#b42357;--title-2:#ad4600;--title-3:#806000;--title-4:#13745e;--title-5:#245cbe;--title-6:#743dbb}
:root[data-theme=dark] .sems-page{--title-1:#ff86ad;--title-2:#ffac70;--title-3:#efd364;--title-4:#65d9b7;--title-5:#8fb8ff;--title-6:#c6a1ff}
.sems-page .ws-brand .title-color-1{color:var(--title-1)}
.sems-page .ws-brand .title-color-2{color:var(--title-2)}
.sems-page .ws-brand .title-color-3{color:var(--title-3)}
.sems-page .ws-brand .title-color-4{color:var(--title-4)}
.sems-page .ws-brand .title-color-5{color:var(--title-5)}
.sems-page .ws-brand .title-color-6{color:var(--title-6)}
.icon-button{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;padding:10px;border:0;border-radius:12px;background:transparent;color:var(--ink);cursor:pointer}
.icon-button:hover{background:var(--tint)}.icon-button svg{width:28px;height:28px;display:block}
#menu-toggle{justify-self:start}.topbar-actions{grid-column:3;display:flex;justify-content:flex-end;gap:10px}
.sems-page .game-layout{display:block;max-width:600px;margin:12px auto 24px;padding:0 24px}
.sems-page .game-layout main{padding:0;min-height:0;display:block}
.sems-page .play{width:100%;margin:0}
.sems-page .eyebrow{display:none}
.sems-page .input-line{border-radius:12px;padding:4px 8px;background:var(--surface)}
.sems-page .input-line input{font-size:20px;padding:4px 8px}
/* The rounded input wrapper supplies the focus indicator. */
.sems-page .input-line input:focus-visible{outline:none}
.sems-page #feedback{background:transparent;border:0;padding:0;text-align:center;min-height:22px;margin:8px 0;font-size:14px;line-height:22px;color:var(--muted)}
.sems-page #feedback.is-win{color:var(--success)}.sems-page #feedback.is-error{color:var(--danger)}
.sems-page #closest-guesses{border:0;background:none;padding:0;margin:12px 0 8px;box-shadow:none}
.sems-page #closest-heading{text-align:center;font:400 12px/1.5 "Outfit",sans-serif;color:var(--muted);margin:0 0 8px;letter-spacing:1.2px}
.sems-page #closest-list{display:grid;gap:4px}
.sems-page #closest-list li{--row-color:#5b48c6;display:grid;grid-template-columns:20px minmax(0,1fr) auto;gap:10px;align-items:center;border:0;padding:0;min-height:32px;background:none}
.sems-page #closest-list li:nth-child(2){--row-color:#8242ad}.sems-page #closest-list li:nth-child(3){--row-color:#a335ac}.sems-page #closest-list li:nth-child(4){--row-color:#b52f6d}.sems-page #closest-list li:nth-child(5){--row-color:#b83d30}
.sems-page #closest-list .word{display:block;padding:5px 12px;border-radius:8px;background:var(--row-color);color:#fff;font-size:16px;line-height:22px;font-weight:500;letter-spacing:0;overflow-wrap:anywhere}
.sems-page #closest-list .distance{color:var(--ink);font-size:14px;min-width:72px;text-align:right}
.sems-page #closest-list .hint-badge{color:#fff;opacity:.9;letter-spacing:0}.sems-page #closest-list .rank{color:var(--muted)}
.sems-page .game-actions{justify-content:center;gap:12px}.sems-page .game-actions .quiet{border:0;background:transparent;padding:10px 14px;color:var(--muted);text-decoration:underline;text-underline-offset:5px}.sems-page #new-round{background:var(--primary);color:var(--on-primary);text-decoration:none}
.sems-page .hint-note{text-align:center;font-size:13px;margin-top:4px}
/* History opens from the corner control on desktop as well as mobile. */
.sems-page .game-layout aside{position:fixed;left:auto;right:0;top:0;bottom:0;width:min(360px,90vw);height:100dvh;max-height:none;min-height:0;border-radius:18px 0 0 18px;padding:28px;z-index:20;transform:translateX(100%);visibility:hidden;background:var(--surface);border:1px solid var(--line);box-shadow:none;transition:transform 180ms ease,visibility 180ms}
.sems-page.history-open .game-layout aside{transform:translateX(0);visibility:visible;box-shadow:0 0 0 100vmax #0007}
.sems-page .sidebar-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:28px}
.sems-page .mobile-close{display:block;min-height:44px;font-size:14px;color:var(--muted)}
.game-sheet{width:calc(100% - 40px);max-width:560px;max-height:85dvh;overflow:auto;border:1px solid var(--line);border-radius:18px;background:var(--surface);color:var(--ink);padding:28px}
.game-sheet::backdrop{background:#0008}.sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}.sheet-heading h2{font-size:28px;margin:0}.sheet-close{font-size:14px;min-height:44px;border:1px solid var(--line);border-radius:10px;padding:8px 12px;background:transparent;color:var(--ink)}
.game-sheet nav{display:grid;gap:8px;margin-bottom:28px}.game-sheet nav a{display:block;padding:12px 16px;border-radius:10px;text-decoration:none;background:var(--tint)}.game-sheet .appearance{font-size:14px;gap:8px;max-width:240px}.game-sheet select{min-height:44px}.game-sheet p{font-size:16px}.game-sheet .gameplay-demo{margin-inline:0}
@media(max-width:760px){.sems-page .game-topbar{grid-template-columns:80px minmax(0,1fr) 80px;padding:8px 16px;gap:8px;min-height:72px}.sems-page .game-topbar .ws-brand{font-size:26px;letter-spacing:-.8px}.topbar-actions{gap:0}.icon-button{width:40px;height:44px;padding:8px}.icon-button svg{width:24px;height:24px}.sems-page .game-layout{margin-top:8px;padding:0 16px}.sems-page .input-line input{font-size:18px}.sems-page #closest-list li{gap:8px;grid-template-columns:16px minmax(0,1fr) auto}.sems-page #closest-list .word{font-size:16px;padding:5px 10px}.sems-page #closest-list .distance{font-size:14px;min-width:70px}}
@media(max-width:380px){.topbar-actions .icon-button{width:36px;}.sems-page .game-topbar{grid-template-columns:72px minmax(0,1fr) 72px;padding-inline:8px}.sems-page .game-topbar .ws-brand{font-size:24px}.sems-page .game-layout{padding-inline:16px}}
@media(prefers-reduced-motion:reduce){.sems-page .game-layout aside{transition:none}}
/* An anchored, nonmodal menu leaves the puzzle in place, like the reference. */
.site-menu{position:fixed;inset:60px auto auto 24px;margin:0;width:320px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 76px);overflow-y:auto;overscroll-behavior:contain;padding:8px;border:1px solid var(--field-border);border-radius:16px;background:var(--surface);color:var(--ink);box-shadow:0 16px 40px #0003}
.site-menu::backdrop{background:transparent}
#menu-toggle[aria-expanded=true]{background:var(--tint);border-radius:50%}
.site-menu nav{display:block}.site-menu .menu-group{padding:6px 0;border-bottom:1px solid var(--line)}
.site-menu .menu-games{padding-top:0}.site-menu .menu-row{display:flex;align-items:center;gap:14px;min-height:62px;padding:12px 10px;border-radius:10px;text-decoration:none;font-size:16px;color:var(--ink);background:none}
.site-menu .menu-row:hover,.site-menu .menu-row:focus-visible,.site-menu .menu-row[aria-current=page]{background:var(--tint)}
.site-menu .menu-games .menu-row{min-height:68px}.site-menu .menu-copy{display:flex;flex-direction:column;gap:3px}.site-menu .menu-copy strong{font-size:18px;font-weight:600}.site-menu .menu-copy small{font-size:14px;color:var(--muted);line-height:1.4}
.menu-icon{display:flex;align-items:center;justify-content:center;width:36px;height:36px;flex:0 0 36px;border-radius:10px;background:var(--tint);color:var(--ink)}.menu-icon svg{width:22px;height:22px}.menu-games .menu-icon{width:44px;height:44px;flex-basis:44px;border-radius:12px}.menu-icon.sems{background:#604bd4;color:#fff}.menu-icon.questions{background:#d75420;color:#fff}
:root[data-theme=dark] .site-menu{--tint:#393d3f;--line:#51585c;--field-border:#51585c;background:#262828;color:#e1e4e8}
@media(max-width:760px){.site-menu{top:72px;left:16px;max-height:calc(100dvh - 88px)}}
@media(max-width:380px){.site-menu{left:8px;max-width:calc(100vw - 16px)}}

/* Compact controls keep ten ranked guesses within a typical laptop viewport. */
.sems-page .game-title-subtitle{font:inherit;letter-spacing:inherit;color:inherit}
.sems-page #submit{min-height:44px;padding:8px 16px;font-size:14px}
.sems-page #closest-list li:first-child .word{color:#fff}
.sems-page #closest-list li:first-child .distance{color:var(--ink)}
.sems-page #closest-list li:nth-child(n+6){--row-color:#56536d}
.sems-page .game-actions{gap:8px}.sems-page .game-actions .quiet{font-size:13px;padding:8px 12px;min-height:44px}
@media(max-width:760px){.sems-page .game-title-subtitle{display:block;margin-top:3px;font-size:13px;font-weight:500;line-height:1.35;letter-spacing:0;word-spacing:.12em;white-space:nowrap}.sems-page .game-title-subtitle .title-separator{display:none}.sems-page .game-topbar .ws-brand{min-width:0;justify-self:center;text-align:center;letter-spacing:0}.sems-page #closest-list .rank{font-size:11px}}

/* A two-line cue fits inside the existing 44px entry, without changing typed text. */
.sems-page .word-entry{position:relative;flex:1;min-width:0;display:flex;align-items:center;min-height:44px}
.sems-page .word-entry input{width:100%;min-width:0;height:44px}
.sems-page #guess-prompt{position:absolute;inset:0 8px;display:flex;align-items:center;pointer-events:none;font:400 14px/18px "Outfit",system-ui,sans-serif;letter-spacing:0;color:var(--muted);overflow-wrap:normal}
.sems-page #guess-prompt[hidden]{display:none}
@media(max-width:380px){.sems-page #guess-prompt{font-size:13px;inset-inline:4px}}

.puzzle-label{text-align:center;color:var(--muted);font-size:15px;margin:0 0 18px}.sems-page #daily-infinity{display:block;text-align:center;margin:12px 0}.sems-page #daily-infinity[hidden]{display:none}.sems-page #daily-open{display:block;margin:12px auto}.sems-page #daily-open[hidden]{display:none}

.top-hints{text-align:center;font-size:14px;line-height:1.4;color:var(--primary);margin:12px 0}.top-hints[hidden]{display:none}

/* Daily statistics reuse the accessible game sheet and theme tokens. */
.stats-sheet .stats-caption{color:var(--muted);margin-top:-12px}
.stats-sheet #stats-storage,.stats-sheet .stats-explanation{font-size:14px;line-height:1.5;color:var(--muted)}
.stats-sheet section{margin-top:28px}.stats-sheet h3{font:600 14px/1.4 "Outfit",sans-serif;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin:0 0 8px}
.stats-sheet dl{margin:0}.stats-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 0;border-bottom:1px solid var(--line)}
.stats-row:last-child{border-bottom:0}.stats-row dt{font-size:16px}.stats-row dd{margin:0;font-size:20px;font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums}
.stats-sheet #stats-status:empty{display:none}.stats-sheet [hidden]{display:none}
@media(max-width:420px){.stats-sheet{padding:20px}.stats-row{gap:12px}.stats-row dt{font-size:14px}}

/* Quiet sound control balances the existing controls around the centered title. */
.topbar-leading{grid-column:1;display:flex;align-items:center;justify-self:start;gap:4px}
#sound-toggle{color:var(--muted);width:44px;min-width:44px;height:44px;padding:12px}
#sound-toggle svg{width:20px;height:20px}
#sound-toggle:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
#sound-toggle .sound-muted,#sound-toggle[aria-pressed=false] .sound-waves{display:none}
#sound-toggle[aria-pressed=false] .sound-muted{display:block}
@media(max-width:760px){.topbar-leading{gap:0}.sems-page .game-topbar{grid-template-columns:88px minmax(0,1fr) 88px}.topbar-leading #menu-toggle{width:44px}.topbar-actions .icon-button{width:44px}}

/* Solved-round sharing uses the same dialog and theme tokens as help and stats. */
.win-sheet{max-width:460px}
.win-sheet #win-title{color:var(--primary);font-size:32px}
.win-sheet .win-mode{color:var(--muted);font-size:14px;margin:0 0 12px}
.win-sheet #win-message{font-size:20px;line-height:1.5;margin:0 0 24px}
.win-sheet .dialog-actions button{font:inherit;min-height:44px;border-radius:10px}
.win-sheet #win-share{background:var(--primary);color:var(--on-primary);border-color:var(--primary)}
.win-sheet #win-share-status{font-size:14px;color:var(--muted);margin:16px 0 0}
.win-sheet #win-share-status:empty,.win-sheet [hidden]{display:none}
.win-sheet #win-manual{margin-top:16px}
.win-sheet label{display:block;margin-bottom:8px}
.win-sheet textarea{box-sizing:border-box;width:100%;padding:12px;font:inherit;font-size:14px;line-height:1.5;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:8px;resize:vertical}
.win-sheet button:focus-visible,.win-sheet textarea:focus-visible{outline:2px solid var(--primary);outline-offset:3px}
@media(max-width:420px){.win-sheet{padding:20px}.win-sheet .dialog-actions button{flex:1}}

.unlocked-hints{margin:16px 0 24px}.unlocked-hints h2{font-size:14px;color:var(--muted);font-weight:500;margin:0 0 8px}.unlocked-hints ul{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0;margin:0}.unlocked-hint{padding:6px 12px;border-radius:16px;background:var(--tint);color:var(--ink);font-size:14px}
