:root {
  color-scheme: dark;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --text: #f4f9fc;
  --muted: #abc0d0;
  --line: #30485c;
  --accent: #ffd37b;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(ellipse at 10% 0%, #193a55 0, transparent 55%), #091725; line-height: 1.6; }
button, input { font: inherit; }
a { color: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, .button { touch-action: manipulation; }
:focus-visible { outline: 3px solid #83dfff; outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(2.1rem, 6vw, 4rem); line-height: 1.1; letter-spacing: -.045em; }
h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); line-height: 1.3; letter-spacing: -.025em; }
.site-header { min-height: 72px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px max(20px, calc((100% - 1140px) / 2)); border-bottom: 1px solid #284053; background: #071421b3; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(145deg, #93e8ff, #2db9e9); color: #062237; font-size: 1.25rem; }
.site-header nav a { font-size: .9rem; color: var(--muted); text-decoration: none; }
.shell { width: min(1140px, calc(100% - 40px)); margin: 0 auto; padding: clamp(32px, 6vw, 64px) 0 48px; }
.intro { margin-bottom: 32px; }
.intro > p:last-child { color: var(--muted); font-size: 1.1rem; margin-bottom: 0; }
.eyebrow { color: var(--accent); font-size: .75rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; }
.panel { min-width: 0; background: #122b3f; border: 1px solid var(--line); border-radius: 24px; padding: clamp(18px, 3vw, 36px); box-shadow: 0 18px 42px #030b1426; }
.create-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.section-number { display: block; color: var(--muted); font-size: .7rem; letter-spacing: .12em; margin-bottom: 20px; }
label { display: block; font-weight: 650; margin-bottom: 8px; }
input { width: 100%; min-width: 0; min-height: 50px; border: 1px solid #476174; border-radius: 12px; padding: 12px 14px; background: #0b2031; color: var(--text); font-size: 16px; }
input::placeholder { color: #92a9ba; opacity: 1; }
.field-help { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; color: var(--muted); font-size: .75rem; margin: 8px 0 24px; }
.captcha-box { display: grid; grid-template-columns: 1fr 96px; align-items: center; gap: 8px 16px; border-top: 1px solid var(--line); padding-top: 24px; }
.captcha-box label { margin: 0; font-size: 1.15rem; }
.captcha-box p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .8rem; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 16px; border: 1px solid transparent; border-radius: 12px; padding: 12px 20px; font-size: .85rem; font-weight: 750; text-align: center; text-decoration: none; text-transform: uppercase; letter-spacing: .03em; cursor: pointer; }
.button-primary { background: var(--accent); color: #292313; }
.button-secondary { background: #19364c; border-color: #4a667a; color: var(--text); }
.button:disabled { cursor: wait; opacity: .6; }
#create-button { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.button-row > * { flex: 1 1 auto; }
.text-link { display: inline-block; color: var(--accent); font-weight: 650; text-decoration: none; }
.message { min-height: 1.6em; margin: 16px 0; font-size: .9rem; color: #b5ddf2; overflow-wrap: anywhere; }
.message.is-error { color: #ffb3ac; }
.guide { padding: 20px 0; }
.sample-word { display: flex; gap: 8px; margin-bottom: 28px; }
.sample-word span { display: grid; place-items: center; width: 52px; height: 58px; background: #163449; border: 1px solid #516073; border-bottom: 3px solid var(--accent); border-radius: 8px; color: var(--accent); font-size: 1.6rem; font-weight: 750; }
.sample-word span:last-child { color: #7e98a9; border: 1px dashed #547084; background: #102739; }
.steps { list-style: none; counter-reset: steps; margin: 24px 0; padding: 0; }
.steps li { counter-increment: steps; position: relative; padding-left: 46px; margin-bottom: 22px; }
.steps li::before { content: counter(steps); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); font-size: .8rem; }
.steps strong, .steps span { display: block; }
.steps span, .guide-note, .share-panel > p { color: var(--muted); font-size: .9rem; }
.guide-note { border-top: 1px solid var(--line); padding-top: 20px; }
.success-mark { display: grid; place-items: center; width: 54px; height: 54px; background: #1a5342; color: #a5f4cf; border-radius: 50%; font-size: 1.8rem; margin-bottom: 24px; }
.game-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.game-intro h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
.panel-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-bottom: 24px; }
.panel-heading h2 { margin: 0; }
.progress { border: 1px solid #486071; border-radius: 99px; padding: 5px 12px; color: var(--accent); font-size: .8rem; white-space: nowrap; }
.phrase-board { display: flex; justify-content: center; flex-wrap: wrap; align-items: center; gap: 32px 44px; min-height: 104px; padding-block: 16px; }
.word { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 100%; }
.tile { display: grid; place-items: center; flex: 0 0 84px; width: 84px; height: 104px; border: 1px solid #577082; border-bottom: 3px solid #7e93a2; border-radius: 10px; background: #0b2031; font-size: 3rem; font-weight: 750; line-height: 1; }
.tile.is-revealed { background: #243d48; color: #ffe2a6; border-color: #9a8a62; border-bottom-color: var(--accent); }
.tile.punctuation { color: var(--muted); border-color: transparent; background: transparent; flex-basis: 36px; width: 36px; }
.muted { color: var(--muted); font-size: .8rem; }
.keyboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); gap: 8px; }
.key { min-width: 44px; min-height: 50px; padding: 6px 0; border: 1px solid #597084; border-bottom: 3px solid #597084; border-radius: 9px; background: #23445d; color: var(--text); font-size: 1.1rem; font-weight: 750; cursor: pointer; }
.key:disabled { cursor: default; }
.key.is-used { text-decoration: line-through; text-decoration-thickness: 2px; }
.key.is-hit { color: #a0ebc5; background: #183e35; border-color: #39785b; }
.key.is-miss { color: #94a6b4; background: #112432; border-color: #2f4758; }
.key.is-pending { border-color: var(--accent); color: var(--accent); }
.keyboard-hint { color: var(--muted); font-size: .8rem; margin: 20px 0 0; }
.game-message { text-align: center; }
#retry-game { display: flex; margin: 0 auto 20px; }
.victory { border-top: 1px solid var(--line); text-align: center; margin-top: 24px; padding-top: 28px; }
.victory h2 { color: #a0ebc5; font-size: clamp(1.1rem, 4vw, 1.6rem); }
.full-phrase { font-size: 1.15rem; font-weight: 650; overflow-wrap: anywhere; }
.empty-state { text-align: center; max-width: 760px; margin: 28px auto; }
.empty-state h1 { font-size: clamp(1.6rem, 4vw, 2.5rem); margin-bottom: 28px; }
.notice { color: var(--accent); padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.site-footer { width: min(1140px, calc(100% - 40px)); margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 24px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.site-footer a { text-decoration: none; }
.skip-link { position: absolute; top: 8px; left: 8px; padding: 10px; background: #0b2031; transform: translateY(-200%); z-index: 5; }
.skip-link:focus { transform: translateY(0); }
@media (hover: hover) and (pointer: fine) {
  .button-primary:hover { background: #ffe1a4; }
  .key:not(:disabled):hover { border-color: var(--accent); background: #32576f; }
  .text-link:hover { text-decoration: underline; }
}
@media (max-width: 760px) {
  .create-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .guide { padding: 12px; }
  .shell { width: calc(100% - 24px); }
  .panel { border-radius: 18px; padding: 18px 14px; }
  .tile { flex-basis: 68px; width: 68px; height: 88px; font-size: 2.4rem; }
  .phrase-board { gap: 28px 36px; }
  .word { gap: 8px; }
  .keyboard { gap: 6px; }
  .panel-heading { margin-bottom: 20px; }
  .site-header { padding: 14px 16px; gap: 10px; }
}
