:root {
  color-scheme: light;
  --navy: #034677;
  --navy-2: #215e96;
  --blue-soft: #e9f3f8;
  --gold: #fa3711;
  --gold-soft: #ffebe6;
  --mint: #bbdbd4;
  --mint-soft: #edf7f4;
  --ink: #363433;
  --muted: #5f6468;
  --line: #9bb5ca;
  --surface: #ffffff;
  --primary-text: #ffffff;
  --page: #f7f7f4;
  --success: #176b42;
  --danger: #b52820;
  --focus: #fa6d51;
  --cell: #ffffff;
  --cell-given: #edf2f3;
  --cell-related: #e5f1f4;
  --cell-given-related: #d5e7e7;
  --error-bg: #fff0ed;
  --word-found-bg: #ccefe6;
  --word-found-text: #0b4138;
  --word-found-outline: #2a7d70;
  --border: #c9d9df;
  --shadow: rgb(3 70 119 / .11);
  --radius: 18px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
  font-size: 18px;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--page); }
button { font: inherit; appearance: none; -webkit-appearance: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 50; background: var(--surface); color: var(--navy); padding: .75rem 1rem; font-weight: 800; border-radius: .5rem; }
.skip-link:focus { top: 1rem; }

.site-header { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem max(1rem, calc((100vw - 1080px)/2)); background: var(--surface); color: var(--navy); border-bottom: 5px solid var(--gold); box-shadow: 0 3px 18px var(--shadow); }
.brand { display: inline-flex; gap: .75rem; align-items: center; border: 0; color: inherit; background: transparent; cursor: pointer; text-align: left; padding: .25rem; }
.brand-mark { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; overflow: hidden; border: 2px solid currentColor; border-radius: 12px; color: var(--gold); background: var(--gold-soft); }
.brand-mark img { display: none; }
.brand-mark::before { content: ""; width: 34px; height: 40px; background: currentColor; -webkit-mask: url("logo-editions-ormeval-transparent.png") -4px -4px / auto 48px no-repeat; mask: url("logo-editions-ormeval-transparent.png") -4px -4px / auto 48px no-repeat; }
.brand:hover .brand-mark { box-shadow: 0 0 0 3px var(--gold-soft); }
.brand strong, .brand small { display: block; }
.brand strong { font-family: Georgia, serif; font-size: 1.08rem; }
.brand small { margin-top: .12rem; color: var(--muted); font-size: .72rem; letter-spacing: .04em; }
.theme-toggle { min-height: 46px; display: inline-flex; align-items: center; gap: .45rem; border: 2px solid var(--navy); border-radius: 999px; padding: .5rem .8rem; background: var(--surface); color: var(--navy); font-size: .78rem; font-weight: 850; cursor: pointer; }
.theme-toggle:hover { background: var(--blue-soft); }

main { width: min(1080px, 100%); margin: 0 auto; padding: 2rem 1rem 4rem; }
.screen { animation: appear .22s ease-out; }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } }
h1, h2 { font-family: Georgia, serif; color: var(--navy); line-height: 1.12; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 .65rem; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); margin: 0 0 .5rem; }
p { line-height: 1.55; }
.eyebrow { margin: 0 0 .5rem; color: var(--gold); font-size: .88rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.intro { max-width: 720px; margin: 0 0 1.8rem; color: var(--muted); font-size: 1.1rem; }
.stack { display: grid; gap: 1rem; }
.home-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1.15rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 1.6rem); box-shadow: 0 8px 28px var(--shadow); }
.daily-card { border-top: 6px solid var(--gold); background: var(--mint-soft); }
.resume-card { border-left: 6px solid var(--navy-2); }
.card p { margin: .35rem 0 1.2rem; color: var(--muted); }
.resume-actions { display: grid; gap: .6rem; }
.meta { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .65rem; color: var(--navy-2); font-weight: 750; }
.meta-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.btn { min-height: 54px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border-radius: 13px; border: 2px solid transparent; padding: .75rem 1.15rem; font-weight: 850; cursor: pointer; text-decoration: none; transition: transform .1s, background .15s; }
.btn:active { transform: scale(.98); }
.btn-primary { color: var(--primary-text); background: var(--navy); }
.btn-primary:hover { background: var(--navy-2); }
.btn-secondary { color: var(--navy); background: var(--surface); border-color: var(--navy); }
.btn-soft { color: var(--navy); background: var(--blue-soft); border-color: var(--line); }
.btn-danger { color: var(--danger); background: var(--surface); border-color: color-mix(in srgb, var(--danger) 55%, var(--surface)); }
.btn-abandon { color: var(--danger); background: var(--surface); border-color: var(--danger); }
.btn-block { width: 100%; }
.back { margin-bottom: 1rem; border: 0; background: transparent; color: var(--navy); font-weight: 800; cursor: pointer; padding: .65rem .25rem; }

.catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.game-card { display: flex; gap: 1rem; align-items: center; text-align: left; width: 100%; min-height: 112px; background: var(--surface); border: 2px solid var(--border); border-radius: 16px; padding: 1rem; }
button.game-card { cursor: pointer; }
button.game-card:hover { border-color: var(--navy-2); }
.game-icon { flex: 0 0 auto; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--mint); color: var(--navy); font-size: 1.5rem; font-weight: 900; }
.game-card strong { display: block; color: var(--navy); font-size: 1.08rem; }
.game-card small { display: block; margin-top: .25rem; color: var(--muted); font-size: .86rem; }
.game-card.coming { opacity: .72; }
.badge { display: inline-block; margin-top: .45rem; padding: .2rem .55rem; border-radius: 999px; background: var(--gold-soft); color: var(--ink); font-size: .72rem; font-weight: 800; }

.levels { max-width: 760px; display: grid; gap: .85rem; margin-top: 1.5rem; }
.level { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; background: var(--surface); border: 2px solid var(--border); border-radius: 16px; padding: 1rem; text-align: left; cursor: pointer; }
.level:hover { border-color: var(--navy); }
.level-symbol { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--navy); background: var(--gold-soft); font-weight: 900; }
.level strong { display: block; color: var(--navy); font-size: 1.06rem; }
.level small { display: block; margin-top: .25rem; color: var(--muted); font-size: .85rem; }
.level-arrow { font-size: 1.4rem; color: var(--navy); }

.shape-grid { max-width: 780px; display: grid; gap: .85rem; margin-top: 1.5rem; }
.shape-card { width: 100%; min-height: 108px; display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: 1rem; border: 2px solid var(--border); border-radius: 16px; background: var(--surface); text-align: left; cursor: pointer; }
.shape-card:hover { border-color: var(--navy); }
.shape-card strong { display: block; color: var(--navy); font-size: 1.08rem; }
.shape-card small { display: block; margin-top: .25rem; color: var(--muted); font-size: .86rem; }
.shape-preview { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 14px; background: var(--mint-soft); }
.shape-preview span { position: relative; width: 43px; height: 43px; border: 3px solid var(--navy); background: var(--surface); }
.shape-preview span::after { content: ""; position: absolute; left: 7px; top: 18px; width: 23px; height: 3px; transform: rotate(-32deg); background: var(--gold); }
.shape-cercle span { border-radius: 50%; }
.shape-hexagone span { border: 0; background: var(--navy); clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%); }
.shape-hexagone span::before { content: ""; position: absolute; inset: 3px; background: var(--surface); clip-path: inherit; }
.shape-hexagone span::after { z-index: 1; }

.game-shell { max-width: 820px; margin: 0 auto; }
.game-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: .8rem; }
.game-heading h1 { font-size: clamp(1.6rem, 5vw, 2.35rem); margin: 0; }
.save-status { margin: 0; color: var(--success); font-size: .82rem; font-weight: 750; }
.play-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(.65rem, 2vw, 1.25rem); box-shadow: 0 8px 30px var(--shadow); }
.game-help { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.game-help p { margin: 0; color: var(--muted); font-size: .88rem; }
.link-button { border: 0; background: transparent; color: var(--navy); text-decoration: underline; font-weight: 800; cursor: pointer; padding: .5rem; white-space: nowrap; }
.sudoku { width: min(100%, 600px); aspect-ratio: 1; margin: 0 auto; display: grid; grid-template-columns: repeat(9, 1fr); border: 4px solid var(--navy); background: var(--navy); gap: 1px; }
.cell { position: relative; min-width: 0; border: 0; background: var(--cell); color: var(--navy-2); font-size: clamp(1.05rem, 5.5vw, 2rem); font-weight: 750; cursor: pointer; padding: 0; }
.cell:nth-child(3n):not(:nth-child(9n)) { border-right: 3px solid var(--navy); }
.cell:nth-child(n+19):nth-child(-n+27), .cell:nth-child(n+46):nth-child(-n+54) { border-bottom: 3px solid var(--navy); }
.cell.given { color: var(--ink); background: var(--cell-given); font-weight: 900; cursor: default; }
.cell.related { background: var(--cell-related); }
.cell.given.related { background: var(--cell-given-related); }
.cell.selected { background: var(--gold-soft); box-shadow: inset 0 0 0 4px var(--gold); z-index: 1; }
.cell.error { color: var(--danger); background: var(--error-bg); }
.number-pad { display: grid; grid-template-columns: repeat(9, 1fr); gap: .35rem; width: min(100%, 600px); margin: .9rem auto 0; }
.number { min-height: 52px; border: 2px solid var(--line); border-radius: 11px; background: var(--blue-soft); color: var(--navy); font-size: 1.25rem; font-weight: 900; cursor: pointer; }
.number:hover { background: var(--mint-soft); }
.game-actions { width: min(100%, 600px); margin: .85rem auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; }
.game-actions .btn { min-width: 0; padding-inline: .5rem; }
.game-actions .btn-abandon { grid-column: 1 / -1; }

.maze { position: relative; isolation: isolate; width: min(100%, 570px); aspect-ratio: 1; margin: 0 auto; display: grid; grid-template-columns: repeat(var(--maze-size), 1fr); background: transparent; }
.maze-outline { position: absolute; inset: 0; z-index: 6; width: 100%; height: 100%; overflow: visible; pointer-events: none; color: var(--navy); }
.maze-outline > * { fill: none; stroke: currentColor; stroke-width: 3px; shape-rendering: geometricPrecision; }
.maze-walls { stroke-linecap: square; stroke-linejoin: miter; }
.maze-void { position: relative; z-index: 2; min-width: 0; min-height: 0; }
.maze-cell { position: relative; z-index: 2; min-width: 0; min-height: 0; border: 0; border-top: 3px solid transparent; border-left: 3px solid transparent; padding: 0; background: var(--cell); color: var(--navy); cursor: pointer; }
.maze-cell.wall-n { border-top-color: var(--navy); }
.maze-cell.wall-w { border-left-color: var(--navy); }
.maze-cell.wall-e { border-right: 3px solid var(--navy); }
.maze-cell.wall-s { border-bottom: 3px solid var(--navy); }
.maze-cercle .maze-cell, .maze-hexagone .maze-cell { border: 0; }
.maze-cell.visited { background: var(--mint-soft); }
.maze-cell.visited::after { content: ""; position: absolute; right: 12%; bottom: 12%; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }
.maze-cell.current { background: var(--gold-soft); z-index: 3; }
.maze-cell.current::after { display: none; }
.maze-player { position: absolute; left: 50%; top: 50%; width: 56%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 3px solid var(--surface); border-radius: 50%; background: var(--gold); box-shadow: 0 2px 8px var(--shadow); }
.maze-start { position: absolute; left: 8%; top: 4%; z-index: 2; font-size: clamp(.55rem, 1.8vw, .78rem); font-weight: 900; }
.maze-finish { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: clamp(1rem, 4vw, 1.8rem); color: var(--navy); }
.maze-controls { width: min(250px, 100%); margin: 1rem auto 0; display: grid; grid-template: repeat(3, 58px) / repeat(3, 1fr); gap: .35rem; }
.maze-direction { border: 2px solid var(--line); border-radius: 13px; background: var(--blue-soft); color: var(--navy); font-size: 1.65rem; font-weight: 900; cursor: pointer; }
.maze-direction:hover { background: var(--mint-soft); }
.direction-up { grid-area: 1 / 2; }
.direction-left { grid-area: 2 / 1; }
.direction-right { grid-area: 2 / 3; }
.direction-down { grid-area: 3 / 2; }
.maze-control-center { grid-area: 2 / 2; display: grid; place-items: center; color: var(--muted); font-size: .7rem; font-weight: 800; }
.game-actions.maze-actions { grid-template-columns: repeat(2, 1fr); }

.word-search-layout { display: grid; grid-template-columns: minmax(0, 570px) minmax(220px, 1fr); align-items: start; gap: 1.25rem; width: min(100%, 900px); margin: 0 auto; }
.word-grid { display: grid; grid-template-columns: repeat(var(--word-size), 1fr); width: min(100%, 570px); aspect-ratio: 1; border: 3px solid var(--navy); border-radius: 8px; overflow: hidden; background: var(--cell); }
.word-cell { min-width: 0; min-height: 0; border: 1px solid var(--line); padding: 0; display: grid; place-items: center; background: var(--cell); color: var(--ink); font-size: clamp(.72rem, 2.1vw, 1.08rem); line-height: 1; font-weight: 850; cursor: pointer; }
.word-cell:hover { background: var(--blue-soft); }
.word-cell.found { background: var(--word-found-bg); color: var(--word-found-text); box-shadow: inset 0 0 0 2px var(--word-found-outline); font-weight: 950; }
.word-cell.selection-start { position: relative; z-index: 1; background: var(--gold-soft); outline: 4px solid var(--gold); outline-offset: -4px; }
.word-progress { margin: .7rem 0 0; text-align: center; color: var(--muted); }
.word-bank { border: 2px solid var(--border); border-radius: 16px; padding: 1rem; background: var(--surface); }
.word-bank h2 { margin: 0 0 .75rem; font-size: 1.12rem; }
.word-bank ul { list-style: none; display: grid; grid-template-columns: 1fr; gap: .42rem .65rem; margin: 0; padding: 0; }
.word-bank li { display: flex; align-items: center; gap: .35rem; min-width: 0; color: var(--ink); font-size: .86rem; font-weight: 800; overflow-wrap: anywhere; }
.word-bank li > span { flex: 0 0 auto; color: var(--navy); }
.word-bank li.found { color: var(--success); text-decoration: line-through; text-decoration-thickness: 2px; }
.game-actions.word-actions { width: min(100%, 900px); }

.mixed-word-card { max-width: 760px; margin: 0 auto; }
.mixed-progress { margin: .5rem 0 .8rem; text-align: center; color: var(--muted); }
.mixed-answer { min-height: 64px; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: 0 auto 1.2rem; }
.mixed-answer-slot { width: 48px; height: 58px; display: grid; place-items: center; border-bottom: 4px solid var(--navy); color: var(--navy); background: var(--cell); font-size: 1.55rem; font-weight: 900; }
.mixed-answer-slot.filled { background: var(--gold-soft); }
.mixed-letters { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; margin: 0 auto 1.25rem; }
.mixed-letter { min-width: 58px; min-height: 58px; border: 2px solid var(--line); border-radius: 12px; padding: .5rem; background: var(--blue-soft); color: var(--navy); font-size: 1.45rem; font-weight: 900; cursor: pointer; }
.mixed-letter:hover { background: var(--mint-soft); border-color: var(--navy); }
.mixed-letter:disabled { opacity: .32; cursor: default; }
.mixed-solved { width: min(100%, 620px); margin: 0 auto; border: 2px solid var(--border); border-radius: 16px; padding: .9rem; background: var(--surface); }
.mixed-solved h2 { margin: 0 0 .65rem; font-size: 1.05rem; }
.mixed-solved > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem .7rem; }
.mixed-solved span { color: var(--muted); font-size: .84rem; font-weight: 750; }
.mixed-solved span.found { color: var(--success); }
.game-actions.mixed-actions { width: min(100%, 620px); grid-template-columns: repeat(2, 1fr); }
.mixed-actions .btn-abandon { grid-column: 1 / -1; }
.mixed-actions .btn:disabled { opacity: .5; cursor: default; }

.vowel-card { max-width: 780px; margin: 0 auto; }
.vowel-progress { margin: .5rem 0 .8rem; text-align: center; color: var(--muted); }
.vowel-clue { width: min(100%, 650px); margin: 0 auto 1.15rem; padding: .8rem 1rem; border-left: 5px solid var(--gold); border-radius: 10px; background: var(--gold-soft); color: var(--ink); }
.vowel-word { display: grid; grid-template-columns: repeat(var(--vowel-length), minmax(0, 1fr)); gap: .3rem; width: min(100%, calc(var(--vowel-length) * 54px)); margin: 0 auto 1rem; }
.vowel-consonant, .vowel-slot { min-width: 0; height: 56px; display: grid; place-items: center; border: 0; border-bottom: 4px solid var(--navy); padding: 0; background: var(--cell); color: var(--ink); font-size: clamp(1.05rem, 3vw, 1.45rem); font-weight: 900; }
.vowel-slot { color: var(--navy); cursor: pointer; }
.vowel-slot.selected { position: relative; z-index: 1; background: var(--gold-soft); outline: 3px solid var(--gold); outline-offset: -3px; }
.vowel-slot.error { color: var(--danger); background: var(--error-bg); }
.vowel-pad { display: grid; grid-template-columns: repeat(6, 1fr); gap: .45rem; width: min(100%, 520px); margin: 0 auto 1.2rem; }
.vowel-choice { min-height: 58px; border: 2px solid var(--line); border-radius: 12px; background: var(--blue-soft); color: var(--navy); font-size: 1.4rem; font-weight: 900; cursor: pointer; }
.vowel-choice:hover { background: var(--mint-soft); border-color: var(--navy); }
.vowel-solved { width: min(100%, 650px); margin: 0 auto; border: 2px solid var(--border); border-radius: 16px; padding: .9rem; background: var(--surface); }
.vowel-solved h2 { margin: 0 0 .65rem; font-size: 1.05rem; }
.vowel-solved > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem .7rem; }
.vowel-solved span { color: var(--muted); font-size: .84rem; font-weight: 750; }
.vowel-solved span.found { color: var(--success); }
.game-actions.vowel-actions { width: min(100%, 650px); grid-template-columns: repeat(2, 1fr); }
.vowel-actions .btn-abandon { grid-column: 1 / -1; }
.vowel-actions .btn:disabled { opacity: .5; cursor: default; }

.crypto-shell { max-width: 980px; }
.crypto-card { max-width: 940px; margin: 0 auto; }
.crypto-progress { margin: .4rem 0 .9rem; text-align: center; color: var(--muted); }
.crypto-message { display: flex; flex-wrap: wrap; justify-content: center; align-items: end; gap: .65rem 1rem; width: 100%; margin: 0 auto 1rem; padding: 1rem; border: 2px solid var(--border); border-radius: 16px; background: var(--cell); }
.crypto-word { display: inline-flex; align-items: end; gap: 2px; white-space: nowrap; }
.crypto-cell { width: 34px; height: 58px; display: grid; grid-template-rows: 21px 1fr; place-items: center; border: 0; border-bottom: 3px solid var(--navy); padding: 1px; background: var(--cell); color: var(--ink); cursor: pointer; }
.crypto-cell small { color: var(--muted); font-size: .8rem; font-weight: 900; line-height: 1; }
.crypto-cell strong { color: var(--navy); font-size: 1.28rem; line-height: 1; }
.crypto-cell.selected { position: relative; z-index: 1; background: var(--gold-soft); outline: 3px solid var(--gold); outline-offset: -3px; }
.crypto-cell.locked { background: var(--mint-soft); cursor: default; }
.crypto-cell.locked small { color: var(--gold); }
.crypto-cell.error { background: var(--error-bg); }
.crypto-cell.error strong { color: var(--danger); }
.crypto-punctuation { display: inline-grid; place-items: end center; min-width: 8px; height: 54px; padding-bottom: 4px; color: var(--ink); font-weight: 900; }
.crypto-selection { min-height: 30px; margin: .3rem 0 .7rem; text-align: center; color: var(--muted); }
.crypto-pad { display: grid; grid-template-columns: repeat(9, 1fr); gap: .35rem; width: min(100%, 650px); margin: 0 auto 1rem; }
.crypto-choice { min-height: 50px; border: 2px solid var(--line); border-radius: 10px; background: var(--blue-soft); color: var(--navy); font-size: 1.12rem; font-weight: 900; cursor: pointer; }
.crypto-choice:hover { background: var(--mint-soft); border-color: var(--navy); }
.crypto-choice:disabled { opacity: .4; cursor: default; }
.crypto-note { margin: 0; text-align: center; color: var(--muted); font-size: .78rem; }
.game-actions.crypto-actions { width: min(100%, 650px); grid-template-columns: repeat(2, 1fr); }
.crypto-actions .btn-abandon { grid-column: 1 / -1; }
.crypto-actions .btn:disabled { opacity: .5; cursor: default; }

.modal-backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 1rem; background: rgb(7 22 34 / .72); }
.modal { width: min(520px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 1.5rem; box-shadow: 0 18px 70px rgb(0 0 0 / .3); }
.modal h2 { margin-top: 0; }
.modal p { color: var(--muted); }
.modal-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.25rem; }
.victory { max-width: 680px; margin: 1.5rem auto; text-align: center; }
.victory-mark { display: grid; place-items: center; width: 92px; height: 92px; margin: 0 auto 1rem; border-radius: 50%; background: var(--gold-soft); color: var(--navy); font-size: 3rem; }
.victory p { color: var(--muted); font-size: 1.08rem; }
.victory-actions { display: grid; gap: .75rem; max-width: 420px; margin: 1.4rem auto 0; }
.toast { position: fixed; left: 50%; bottom: 1rem; z-index: 40; transform: translate(-50%, 140%); opacity: 0; max-width: calc(100vw - 2rem); padding: .7rem 1rem; border-radius: 10px; background: var(--navy); color: var(--primary-text); font-weight: 750; transition: .2s; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --navy: #73b8e8;
  --navy-2: #9dcced;
  --blue-soft: #193449;
  --gold: #ffad75;
  --gold-soft: #482d24;
  --mint: #5f978e;
  --mint-soft: #173932;
  --ink: #f4f5f3;
  --muted: #c5d0d7;
  --line: #7094aa;
  --surface: #142635;
  --primary-text: #061520;
  --page: #091722;
  --success: #7fd8aa;
  --danger: #ff9b91;
  --focus: #ffd08a;
  --cell: #102331;
  --cell-given: #203746;
  --cell-related: #17384a;
  --cell-given-related: #294b58;
  --error-bg: #4a2928;
  --word-found-bg: #7ad8c8;
  --word-found-text: #061f1b;
  --word-found-outline: #c2fff4;
  --border: #45687b;
  --shadow: rgb(0 0 0 / .32);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --navy: #73b8e8;
    --navy-2: #9dcced;
    --blue-soft: #193449;
    --gold: #ffad75;
    --gold-soft: #482d24;
    --mint: #5f978e;
    --mint-soft: #173932;
    --ink: #f4f5f3;
    --muted: #c5d0d7;
    --line: #7094aa;
    --surface: #142635;
    --primary-text: #061520;
    --page: #091722;
    --success: #7fd8aa;
    --danger: #ff9b91;
    --focus: #ffd08a;
    --cell: #102331;
    --cell-given: #203746;
    --cell-related: #17384a;
    --cell-given-related: #294b58;
    --error-bg: #4a2928;
    --word-found-bg: #7ad8c8;
    --word-found-text: #061f1b;
    --word-found-outline: #c2fff4;
    --border: #45687b;
    --shadow: rgb(0 0 0 / .32);
  }
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 720px) {
  :root { font-size: 17px; }
  .site-header { height: 70px; }
  .theme-toggle [data-theme-label] { display: none; }
  main { padding-top: 1.4rem; }
  .home-grid, .catalog-grid { grid-template-columns: 1fr; }
  .game-heading { align-items: start; flex-direction: column; gap: .3rem; }
  .game-actions { grid-template-columns: 1fr 1fr; }
  .game-actions .btn:last-child { grid-column: 1 / -1; }
  .game-actions.maze-actions .btn-abandon { grid-column: 1 / -1; }
  .word-search-layout { grid-template-columns: 1fr; gap: .85rem; }
  .word-grid { margin: 0 auto; }
  .word-bank ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mixed-answer-slot { width: 42px; height: 52px; font-size: 1.35rem; }
  .mixed-letter { min-width: 54px; min-height: 54px; font-size: 1.3rem; }
  .vowel-word { gap: .2rem; }
  .vowel-consonant, .vowel-slot { height: 50px; }
  .vowel-pad { gap: .3rem; }
  .crypto-pad { grid-template-columns: repeat(7, 1fr); }
}

@media (max-width: 430px) {
  main { padding-inline: .65rem; }
  .brand strong { font-size: .94rem; }
  .brand small { font-size: .65rem; }
  .play-card { padding-inline: .35rem; }
  .game-help { padding-inline: .25rem; }
  .game-help p { max-width: 62%; }
  .number-pad { gap: .2rem; }
  .number { min-height: 47px; border-radius: 8px; }
  .game-actions { padding-inline: .25rem; }
  .word-cell { font-size: clamp(.68rem, 3vw, .88rem); }
  .word-bank { padding: .8rem; }
  .word-bank li { font-size: .79rem; }
  .mixed-answer { gap: .28rem; }
  .mixed-answer-slot { width: 35px; height: 46px; font-size: 1.15rem; }
  .mixed-letters { gap: .38rem; }
  .mixed-letter { min-width: 48px; min-height: 50px; font-size: 1.18rem; }
  .mixed-solved > div { grid-template-columns: 1fr; }
  .vowel-clue { padding: .7rem .8rem; }
  .vowel-word { gap: .13rem; }
  .vowel-consonant, .vowel-slot { height: 46px; border-bottom-width: 3px; font-size: clamp(.92rem, 5vw, 1.15rem); }
  .vowel-pad { gap: .22rem; }
  .vowel-choice { min-height: 50px; border-radius: 9px; font-size: 1.18rem; }
  .vowel-solved > div { grid-template-columns: 1fr; }
  .crypto-message { gap: .5rem .7rem; padding: .7rem .35rem; }
  .crypto-word { gap: 1px; }
  .crypto-cell { width: 26px; height: 53px; grid-template-rows: 19px 1fr; }
  .crypto-cell small { font-size: .68rem; }
  .crypto-cell strong { font-size: 1.12rem; }
  .crypto-punctuation { height: 48px; }
  .crypto-pad { grid-template-columns: repeat(7, 1fr); gap: .22rem; }
  .crypto-choice { min-height: 48px; border-radius: 8px; font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
