@font-face { font-family: Outfit; font-style: normal; font-weight: 400 900; font-display: swap; src: url(/fonts/outfit-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Outfit; font-style: normal; font-weight: 400 900; font-display: swap; src: url(/fonts/outfit-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Manrope; font-style: normal; font-weight: 500 800; font-display: swap; src: url(/fonts/manrope-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Manrope; font-style: normal; font-weight: 500 800; font-display: swap; src: url(/fonts/manrope-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #050a1c;
  --panel: rgba(12, 22, 48, 0.72);
  --solid: #0d1834;
  --card: rgba(255, 255, 255, 0.04);
  --line: rgba(150, 185, 255, 0.14);
  --line2: rgba(150, 185, 255, 0.28);
  --text: #eaf0ff;
  --muted: #a3b1cf;
  --dim: #7383a8;
  --hot: #ff6a3d;
  --gold: #ffc857;
  --win: #2fd47a;
  --blue: #6ab4ff;
  --heat: linear-gradient(90deg, #b5121b, #e3342f 12%, #f26b2a 28%, #f89a2c 45%, #f8c95a 62%, #fbe6a6 80%, #fff7e8);
  --hdr: 62px;
  --font: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: Outfit, var(--font);
}
.cb { --heat: linear-gradient(90deg, #fff36b, #ffd23f 12%, #e2b04f 28%, #c4ad93 45%, #a5b9de 62%, #86b2ff 80%, #5d9bff); }

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; font: 500 16px/1.65 var(--font); color: var(--text);
  background:
    radial-gradient(1100px 700px at 28% -12%, rgba(32, 72, 160, 0.55), transparent 62%),
    radial-gradient(900px 620px at 105% 8%, rgba(84, 40, 140, 0.35), transparent 58%),
    var(--bg);
  background-attachment: fixed;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.7;
  background-image:
    radial-gradient(1px 1px at 23px 31px, rgba(255, 255, 255, 0.8), transparent 60%),
    radial-gradient(1px 1px at 71px 112px, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(1.6px 1.6px at 133px 47px, rgba(255, 255, 255, 0.9), transparent 60%),
    radial-gradient(1px 1px at 181px 151px, rgba(200, 220, 255, 0.6), transparent 60%),
    radial-gradient(1px 1px at 233px 83px, rgba(255, 255, 255, 0.45), transparent 60%),
    radial-gradient(1.3px 1.3px at 41px 197px, rgba(255, 235, 210, 0.7), transparent 60%);
  background-size: 260px 230px;
}
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: #9fd0ff; }
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.flag { border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.08); }
.ic { width: 20px; height: 20px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.hdr {
  position: sticky; top: 0; z-index: 30; height: var(--hdr);
  display: flex; align-items: center; gap: 22px; padding: 0 20px;
  background: rgba(6, 12, 30, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex: none; }
.logo svg { width: 34px; height: 34px; filter: drop-shadow(0 0 10px rgba(255, 120, 60, 0.35)); }
.logo b { font: 800 24px/1 var(--display); letter-spacing: -0.01em; }
.logo b span { color: var(--dim); font-weight: 600; }
.logo:hover { color: var(--text); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav a.is-on { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.hdr-tools { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--muted);
}
.icon-btn:hover { color: var(--text); border-color: var(--line2); background: rgba(255, 255, 255, 0.09); }
.menu { display: none; position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-list {
  position: absolute; right: 0; top: 48px; min-width: 220px; padding: 8px; display: grid;
  background: var(--solid); border: 1px solid var(--line2); border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.menu-list a { padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.menu-list a:hover { background: rgba(255, 255, 255, 0.07); }
.btn-play {
  padding: 9px 16px; border-radius: 12px; font-weight: 800; text-decoration: none; color: #2a0d00;
  background: linear-gradient(180deg, #ffb36b, var(--hot)); box-shadow: 0 6px 20px rgba(255, 106, 61, 0.3);
}
.btn-play:hover { color: #2a0d00; filter: brightness(1.06); }

/* Game */
.play {
  display: grid; grid-template-columns: minmax(0, 1fr) 390px;
  height: calc(100svh - var(--hdr)); min-height: 560px; max-height: 1100px;
}
.stage { position: relative; overflow: hidden; min-width: 0; }
.stage canvas { position: absolute; inset: 0; display: block; touch-action: none; cursor: grab; }
.stage canvas:active { cursor: grabbing; }
.loading {
  position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 700;
  pointer-events: none;
}
.loading[hidden] { display: none; }
.toast {
  position: absolute; left: 50%; top: 18px; z-index: 5; max-width: min(92%, 520px);
  transform: translate(-50%, -12px); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 15px; text-align: center;
  background: rgba(8, 16, 38, 0.86); border: 1px solid var(--line2); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.25s, transform 0.25s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.hot { border-color: rgba(255, 106, 61, 0.7); color: #ffd9c9; }
.toast.bad { border-color: rgba(255, 120, 140, 0.6); color: #ffd0d8; }
.tip {
  position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; margin: -52px 0 0 12px;
  display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 7px; border-radius: 999px; white-space: nowrap;
  background: rgba(8, 16, 38, 0.92); border: 1px solid var(--line2); font-size: 14px;
}
.tip span { color: var(--muted); font-weight: 700; }
.tip[hidden] { display: none; }
.legend {
  position: absolute; left: 18px; bottom: 18px; z-index: 3; display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted);
  background: rgba(8, 16, 38, 0.7); border: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.legend i { width: 120px; height: 8px; border-radius: 99px; background: var(--heat); }
.zoom { position: absolute; right: 18px; bottom: 18px; z-index: 3; display: grid; gap: 6px; }
.zoom button {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(8, 16, 38, 0.78); border: 1px solid var(--line2); color: var(--text);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.zoom button:hover { background: rgba(30, 50, 100, 0.85); }

.panel {
  position: relative; display: flex; flex-direction: column; gap: 14px; min-height: 0; padding: 20px;
  background: linear-gradient(180deg, rgba(10, 20, 46, 0.82), rgba(7, 13, 32, 0.9));
  border-left: 1px solid var(--line);
}
.panel-top { display: flex; flex-direction: column; gap: 12px; }
.panel h1 { margin: 0; font: 800 22px/1.15 var(--display); letter-spacing: -0.01em; }
.panel h1 small { display: block; font: 600 13px/1.4 var(--font); color: var(--dim); letter-spacing: 0; }
.tabs { display: flex; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.tabs a {
  flex: 1; text-align: center; padding: 8px 12px; border-radius: 10px; text-decoration: none; white-space: nowrap;
  color: var(--muted); font-weight: 800; font-size: 14px;
}
.tabs a:hover { color: var(--text); }
.tabs a.is-on { color: #1b0a00; background: linear-gradient(180deg, #ffd08a, #ff9a52); box-shadow: 0 4px 14px rgba(255, 140, 70, 0.3); }
.tabs a b { font-weight: 800; opacity: 0.7; }

.guess-form { position: relative; display: flex; gap: 8px; }
.guess-form input {
  flex: 1; min-width: 0; height: 54px; padding: 0 16px; border-radius: 14px; font-size: 17px; font-weight: 700;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line2); outline: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.guess-form input::placeholder { color: var(--dim); font-weight: 600; }
.guess-form input:focus { border-color: rgba(255, 160, 90, 0.8); box-shadow: 0 0 0 4px rgba(255, 130, 60, 0.18); }
.guess-form input:disabled { opacity: 0.6; }
.guess-form > button {
  height: 54px; padding: 0 20px; border: 0; border-radius: 14px; font-weight: 800; font-size: 16px; color: #2a0d00;
  background: linear-gradient(180deg, #ffb36b, var(--hot)); box-shadow: 0 8px 22px rgba(255, 106, 61, 0.28);
}
.guess-form > button:hover { filter: brightness(1.07); }
.guess-form input:disabled + button { opacity: 0.5; pointer-events: none; }
.shake { animation: shake 0.36s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.suggest {
  position: absolute; left: 0; right: 0; top: 60px; z-index: 20; margin: 0; padding: 6px; list-style: none;
  background: var(--solid); border: 1px solid var(--line2); border-radius: 14px; box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
}
.suggest[hidden] { display: none; }
.suggest li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; font-weight: 700; }
.suggest li.is-active, .suggest li:hover { background: rgba(255, 255, 255, 0.08); }
.suggest li.is-used { opacity: 0.55; }
.suggest em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--dim); }

.status { margin: 0; color: var(--muted); font-size: 14.5px; min-height: 1.6em; }
.status b { color: var(--text); }
.hint-box { padding: 10px 14px; border-radius: 12px; background: rgba(255, 200, 87, 0.08); border: 1px solid rgba(255, 200, 87, 0.3); font-size: 14.5px; }
.hint-box p { margin: 2px 0; }
.hint-box[hidden] { display: none; }

.guesses { flex: 1; min-height: 0; overflow: auto; margin: 0 -6px; padding: 0 6px; list-style: none; scrollbar-width: thin; }
.guesses li { margin-bottom: 6px; }
.guesses button {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 14px; text-align: left;
  border-radius: 12px; border: 1px solid var(--line); position: relative; overflow: hidden;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 24%, transparent), rgba(255, 255, 255, 0.03) 75%);
}
.guesses button::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.guesses button:hover { border-color: var(--line2); }
.g-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-dist { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.g-best { font-style: normal; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 7px; border-radius: 99px; color: #2a0d00; background: var(--gold); }
.guesses li.is-new button { animation: pop 0.5s; border-color: rgba(255, 255, 255, 0.4); }
.guesses li.is-win button { border-color: rgba(47, 212, 122, 0.7); }
.guesses li.is-win .g-dist { color: var(--win); }
@keyframes pop { 0% { transform: scale(0.94); opacity: 0; } 60% { transform: scale(1.02); opacity: 1; } 100% { transform: none; } }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions:not(:has(button:not([hidden]))) { display: none; }
.btn {
  flex: 1; min-height: 44px; padding: 10px 16px; border-radius: 12px; font-weight: 800; font-size: 15px; text-align: center; text-decoration: none;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line2); color: var(--text);
}
.btn:hover { background: rgba(255, 255, 255, 0.11); color: var(--text); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn[hidden] { display: none; }
.btn-main { color: #2a0d00; border: 0; background: linear-gradient(180deg, #ffb36b, var(--hot)); }
.btn-main:hover { color: #2a0d00; filter: brightness(1.07); background: linear-gradient(180deg, #ffb36b, var(--hot)); }
.btn-win { color: #002b14; border: 0; background: linear-gradient(180deg, #7ff0b0, var(--win)); }
.btn-win:hover { color: #002b14; background: linear-gradient(180deg, #7ff0b0, var(--win)); filter: brightness(1.05); }
.btn.is-confirm { border-color: rgba(255, 120, 140, 0.7); color: #ffd0d8; }
.panel-foot { margin: 0; font-size: 12.5px; color: var(--dim); }
.panel-foot kbd { padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line2); font: inherit; }

/* Dialogs */
dialog {
  width: min(460px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; color: var(--text);
  border: 1px solid var(--line2); border-radius: 22px;
  background: linear-gradient(180deg, #12214a, #0a1430 60%); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}
dialog::backdrop { background: rgba(2, 6, 20, 0.66); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
dialog[open] { animation: dlg 0.25s ease-out; }
@keyframes dlg { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.dlg-in { padding: 26px 24px 24px; }
.dlg-x { position: absolute; right: 12px; top: 12px; }
.dlg-x button { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); color: var(--muted); font-size: 22px; line-height: 1; }
dialog h2 { margin: 0 0 12px; font: 800 26px/1.15 var(--display); }
.dlg-h { margin: 22px 0 10px; font: 800 13px/1.3 var(--font); text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); }
.help-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.help-steps li { display: flex; gap: 12px; align-items: flex-start; }
.help-steps li > b { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; color: #2a0d00; background: linear-gradient(180deg, #ffd08a, #ff9a52); }
.help-steps p { margin: 2px 0 0; color: var(--muted); }
.help-steps strong { color: var(--text); }
.heat { margin: 18px 0 4px; }
.heat-bar { height: 12px; border-radius: 99px; background: var(--heat); }
.heat-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row span small { display: block; color: var(--dim); font-size: 13px; }
.set-row select { padding: 8px 12px; border-radius: 10px; background: var(--solid); border: 1px solid var(--line2); }
.switch { position: relative; width: 50px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: rgba(255, 255, 255, 0.12); transition: background 0.2s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; left: 4px; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked + i { background: var(--hot); }
.switch input:checked + i::after { transform: translateX(22px); }
.switch input:focus-visible + i { outline: 2px solid var(--gold); outline-offset: 2px; }

.res-head { text-align: center; padding-top: 6px; }
.res-flag { width: 76px; height: 76px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14), 0 0 40px rgba(47, 212, 122, 0.45); }
.res-head.is-lost .res-flag { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14), 0 0 40px rgba(255, 106, 61, 0.35); }
.res-kicker { margin: 12px 0 0; color: var(--win); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; }
.is-lost .res-kicker { color: var(--gold); }
.res-head h2 { margin: 2px 0 0; font-size: 32px; }
.res-sub { margin: 2px 0 0; color: var(--muted); font-weight: 700; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0 0; }
.facts div { padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.facts dt { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); }
.facts dd { margin: 2px 0 0; font-weight: 700; font-size: 14.5px; line-height: 1.4; }
.res-more { margin: 10px 0 0; text-align: center; font-size: 14px; }
.res-actions { display: flex; gap: 8px; margin-top: 16px; }
.res-next { margin: 14px 0 0; text-align: center; color: var(--muted); }
.res-next b { color: var(--text); font-variant-numeric: tabular-nums; }
.st-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.st-grid div { padding: 10px 4px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.st-grid b { display: block; font: 800 24px/1.1 var(--display); }
.st-grid span { font-size: 12px; color: var(--muted); font-weight: 700; }
.st-bars { display: grid; gap: 5px; }
.st-bars div { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.st-bars span { width: 44px; text-align: right; flex: none; }
.st-bars i { width: var(--w); min-width: 26px; padding: 2px 8px; border-radius: 6px; text-align: right; font-style: normal; color: var(--text); background: rgba(255, 255, 255, 0.12); }
.st-bars .is-me i { background: linear-gradient(90deg, #ff9a52, var(--hot)); color: #2a0d00; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 1000; overflow: hidden; }
.confetti i { position: absolute; width: 9px; height: 13px; border-radius: 2px; animation: conf var(--d) cubic-bezier(0.15, 0.7, 0.35, 1) forwards; }
@keyframes conf { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }

/* Content */
.content { max-width: 1120px; margin: 0 auto; padding: 56px 20px 24px; }
.content > section { margin-bottom: 56px; }
.page { max-width: 820px; margin: 0 auto; padding: 48px 20px 40px; }
.page h1, .content h2.big { margin: 0 0 14px; font: 800 clamp(32px, 5vw, 46px)/1.1 var(--display); letter-spacing: -0.02em; }
.lead { font-size: 18.5px; color: var(--muted); margin: 0 0 22px; }
h2 { margin: 40px 0 12px; font: 800 28px/1.2 var(--display); letter-spacing: -0.01em; }
h3 { margin: 26px 0 8px; font: 800 20px/1.3 var(--display); }
.content > section > h2:first-child { margin-top: 0; }
p, li { color: #cfd8ee; }
.page ul:not([class]), .page ol:not([class]) { padding-left: 22px; }
.page li { margin: 6px 0; }
.kicker { display: inline-block; margin-bottom: 10px; padding: 4px 12px; border-radius: 99px; font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); background: rgba(255, 200, 87, 0.1); border: 1px solid rgba(255, 200, 87, 0.25); }
.intro { display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; align-items: center; }
.intro p { font-size: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.chips li { margin: 0; padding: 7px 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--text); }
.card { padding: 24px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.card h3:first-child { margin-top: 0; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { margin: 0; padding: 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 12px; border-radius: 50%; font: 800 16px var(--display); color: #2a0d00; background: linear-gradient(180deg, #ffd08a, #ff9a52); }
.steps b { display: block; margin-bottom: 4px; color: var(--text); font-size: 17px; }
.steps span { color: var(--muted); font-size: 15px; }
.scale { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 14px; }
.scale div { padding: 10px 6px; border-radius: 12px; text-align: center; font-size: 13px; font-weight: 800; color: #2a0d00; background: var(--c); }
.scale div small { display: block; font-weight: 700; opacity: 0.75; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.faq details { margin-bottom: 10px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.faq summary { padding: 16px 20px; cursor: pointer; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 20px 16px; }
.faq details p { margin: 0 0 8px; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.game-card { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 18px; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); transition: transform 0.15s, border-color 0.15s; }
.game-card:hover { transform: translateY(-2px); border-color: var(--line2); color: var(--text); }
.game-card b { font: 800 18px var(--display); }
.game-card span { font-size: 14px; color: var(--muted); }
.game-card em { margin-top: 6px; font-style: normal; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold); }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0; }
.cta .btn { flex: none; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.toc li { margin: 0; }
.toc a { display: block; padding: 7px 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); text-decoration: none; font-weight: 700; font-size: 14px; color: var(--text); }
.toc a:hover { border-color: var(--line2); }
.clist { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.clist li { margin: 0; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); scroll-margin-top: calc(var(--hdr) + 16px); }
.clist li:target { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 200, 87, 0.18); }
.clist .c-top { display: flex; align-items: center; gap: 10px; }
.clist .c-top b { font-size: 16.5px; color: var(--text); line-height: 1.25; }
.clist p { margin: 8px 0 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.clist p strong { color: #cfd8ee; font-weight: 700; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--dim); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }

/* Contact form */
.fb-card { margin-top: 22px; padding: 26px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
[data-feedback-form] .fb-row { display: flex; gap: 16px; flex-wrap: wrap; }
[data-feedback-form] .fb-row > .fb-field { flex: 1; min-width: 220px; }
[data-feedback-form] .fb-field { margin-bottom: 18px; }
[data-feedback-form] label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 14px; color: var(--muted); }
[data-feedback-form] input, [data-feedback-form] textarea { display: block; width: 100%; padding: 11px 14px; font-size: 15px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line2); border-radius: 12px; outline: 0; }
[data-feedback-form] input:focus, [data-feedback-form] textarea:focus { border-color: rgba(255, 160, 90, 0.8); box-shadow: 0 0 0 3px rgba(255, 130, 60, 0.18); }
[data-feedback-form] textarea { min-height: 150px; resize: vertical; }
[data-feedback-form] .fb-btn { width: 100%; padding: 13px 18px; font-weight: 800; font-size: 16px; color: #2a0d00; border: 0; border-radius: 12px; background: linear-gradient(180deg, #ffb36b, var(--hot)); }
[data-feedback-form] .fb-btn:disabled { opacity: 0.65; cursor: default; }
[data-feedback-form] [data-feedback-status] { margin: 16px 0 0; text-align: center; min-height: 1.2em; }
[data-feedback-form][data-state=error] [data-feedback-status] { color: #ff8a9b; }
[data-feedback-form][data-state=sent] [data-feedback-status] { color: var(--win); }
[data-feedback-form] altcha-widget { --altcha-max-width: 100%; display: block; margin-bottom: 18px; }
.fb-muted { font-weight: 500; opacity: 0.75; }

/* Footer */
.foot { margin-top: 40px; border-top: 1px solid var(--line); background: rgba(4, 8, 22, 0.6); }
.foot-in { max-width: 1120px; margin: 0 auto; padding: 40px 20px 20px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.foot p { color: var(--muted); font-size: 14.5px; }
.foot h4 { margin: 4px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); }
.foot nav a { display: block; padding: 3px 0; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.foot nav a:hover { color: var(--text); }
.foot-bottom { max-width: 1120px; margin: 0 auto; padding: 16px 20px 30px; color: var(--dim); font-size: 13.5px; border-top: 1px solid var(--line); }

@media (max-width: 1100px) {
  .play { grid-template-columns: minmax(0, 1fr) 350px; }
  .nav a { padding: 8px 9px; }
}
@media (max-width: 900px) {
  :root { --hdr: 56px; }
  .hdr { padding: 0 12px; gap: 10px; }
  .nav { display: none; }
  .menu { display: block; }
  .logo b { font-size: 22px; }
  .logo svg { width: 30px; height: 30px; }
  .icon-btn { width: 38px; height: 38px; }
  .play { grid-template-columns: 1fr; height: auto; min-height: 0; max-height: none; }
  .stage { height: min(54svh, 112vw); min-height: 300px; }
  .panel { border-left: 0; border-top: 1px solid var(--line); padding: 14px 14px 18px; gap: 12px; }
  .panel-top { flex-direction: row; align-items: center; justify-content: space-between; }
  .panel h1 { font-size: 19px; }
  .panel h1 small { display: none; }
  .tabs a { padding: 6px 12px; font-size: 13.5px; }
  .guesses { overflow: visible; }
  .panel-foot { display: none; }
  .legend { left: 10px; bottom: 10px; padding: 6px 10px; font-size: 12px; }
  .legend i { width: 80px; }
  .zoom { right: 10px; bottom: 10px; }
  .zoom button { width: 38px; height: 38px; }
  .toast { top: 10px; font-size: 14px; padding: 8px 14px; border-radius: 16px; }
  .intro, .grid2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .scale { grid-template-columns: repeat(4, 1fr); }
  .foot-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .st-grid b { font-size: 21px; }
  .foot-in { grid-template-columns: 1fr; }
  .guess-form > button { padding: 0 16px; }
  .hdr-tools .btn-play { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
