/* Хоукинс '84: основа, яркий мир и общие элементы */
@font-face { font-family: "HK Display"; src: url("../fonts/yeseva-cyr.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; font-display: swap; }
@font-face { font-family: "HK Display"; src: url("../fonts/yeseva-lat.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0152-0153, U+2000-206F, U+2191, U+2193, U+2212; font-display: swap; }
@font-face { font-family: "HK Text"; font-weight: 400; src: url("../fonts/rubik-cyr-400.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; font-display: swap; }
@font-face { font-family: "HK Text"; font-weight: 400; src: url("../fonts/rubik-lat-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0152-0153, U+2000-206F, U+2191, U+2193, U+2212; font-display: swap; }
@font-face { font-family: "HK Text"; font-weight: 700; src: url("../fonts/rubik-cyr-700.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; font-display: swap; }
@font-face { font-family: "HK Text"; font-weight: 700; src: url("../fonts/rubik-lat-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0152-0153, U+2000-206F, U+2191, U+2193, U+2212; font-display: swap; }
@font-face { font-family: "HK Pixel"; src: url("../fonts/pixel-cyr.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; font-display: swap; }
@font-face { font-family: "HK Pixel"; src: url("../fonts/pixel-lat.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2212; font-display: swap; }

:root { --ink: #2a1635; --paper: #fff6e5; --red: #ff3b30; --yellow: #ffd23f; --pink: #ff4fa3; --cyan: #2ee6ff; --green: #2fbf6a;
  --display: "HK Display", Georgia, serif; --text: "HK Text", system-ui, sans-serif; --pixel: "HK Pixel", monospace; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body { font: 400 15px/1.45 var(--text); color: var(--ink); min-height: 100vh; background: #2d1457; overflow-x: hidden; }
button, input, textarea, select { font-family: var(--text); }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; }
h1, h2, h3, h4 { margin: 0 0 8px; line-height: 1.2; }
p { margin: 0 0 8px; }
.display { font-family: var(--display); font-weight: 400; }
.muted { opacity: .74; }
.small { font-size: 13px; }
.center { text-align: center; }
.label { font-weight: 700; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .85; margin: 12px 0 6px; }
.row { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

main { max-width: 520px; margin: 0 auto; padding: 0 14px 96px; }
.screen { position: relative; }

/* ---------- кнопки и поля ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 15px; line-height: 1.2;
  padding: 11px 16px; border: 2px solid var(--ink); border-radius: 14px; background: var(--yellow); color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { opacity: .45; }
.btn.red { background: var(--red); color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; border-style: dashed; box-shadow: none; }
.btn.ghost.picked { border-style: solid; background: rgba(255, 255, 255, .14); }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 10px; box-shadow: 0 3px 0 var(--ink); }
.btn.ghost.small { box-shadow: none; }
.btn.wide { width: 100%; margin-top: 10px; }
.btn.big { font-size: 20px; padding: 16px; }
.btn.neon { background: #17082f; color: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 12px rgba(46, 230, 255, .6), inset 0 0 8px rgba(46, 230, 255, .3); }
.btn.portal-btn { background: linear-gradient(180deg, #4a0b14, #150409); color: #ff8076; border-color: var(--red); box-shadow: 0 0 16px rgba(255, 59, 48, .65); }
.link { background: none; border: 0; text-decoration: underline; opacity: .65; font-size: 13px; margin-top: 10px; }
.field { width: 100%; border: 2px solid #c9b497; border-radius: 12px; padding: 10px 12px; font-size: 15px; background: #fff; color: #241435; margin: 4px 0; }
.field.inline { width: auto; }
.cost-field { width: 82px; }
.icon-field { width: 58px; text-align: center; font-size: 20px; }
.check { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.check input { width: 18px; height: 18px; flex: none; }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- эмблемы ---------- */
.emblem { display: inline-grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%; flex: none; vertical-align: middle;
  background: radial-gradient(circle at 32% 26%, #fffbea, #ffdd91 58%, #ff9a63); box-shadow: 0 0 0 2.5px var(--ink), 0 0 0 4.5px var(--pink); }
.emblem svg { width: 80%; height: 80%; }

/* ---------- вывеска и гирлянда ---------- */
.logo { display: block; width: 100%; overflow: visible; }
.logo-text { font-family: var(--display); font-size: 52px; letter-spacing: 1px; fill: #16030a; stroke: #ff3b33; stroke-width: 2.2px; paint-order: stroke;
  filter: drop-shadow(0 0 5px rgba(255, 50, 40, .95)) drop-shadow(0 0 16px rgba(255, 40, 40, .6)); }
.logo-cap { font-size: 66px; }
.logo-bar { fill: #ff3b33; filter: drop-shadow(0 0 4px #ff3b33); }
.logo-year { font-family: var(--pixel); font-size: 15px; fill: var(--yellow); letter-spacing: 3px; filter: drop-shadow(0 0 5px rgba(255, 210, 63, .8)); }
.garland { display: block; width: calc(100% + 28px); margin: 0 -14px; height: 34px; }
.wire { fill: none; stroke: #120d1f; stroke-width: 1.6; }
.bulb-cap { stroke: #1b1528; stroke-width: 4; }
.bulb-glass { fill: var(--c); filter: drop-shadow(0 0 4px var(--c)) drop-shadow(0 0 9px var(--c)); animation: twinkle 2.6s var(--d) infinite; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 46% { opacity: 1; } 50% { opacity: .3; } 56% { opacity: 1; } }

/* ---------- яркий Хоукинс ---------- */
.theme-hawkins { background: #2d1457; }
.theme-hawkins::before { content: ""; position: fixed; inset: 0; z-index: -2;
  background: linear-gradient(180deg, #1d0c3d 0%, #4b1873 18%, #a8367e 36%, #ee6760 55%, #f9a35b 74%, #fdd28a 100%); }
.theme-hawkins::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .18;
  background-image: radial-gradient(#fff 1px, transparent 1.4px); background-size: 14px 14px; }
.hero { text-align: center; }
.hero-sky { position: relative; height: 196px; }
.hero-sky .logo { position: relative; z-index: 2; width: 94%; max-width: 430px; margin: 2px auto 0; }
.skyline { position: absolute; left: -14px; right: -14px; bottom: 0; width: calc(100% + 28px); height: 150px; }
.pine { fill: #1b0c31; }
.tower path { stroke: #1b0c31; stroke-width: 3.2; fill: #1b0c31; }
.tower rect { fill: #1b0c31; }
.tower text { font-family: var(--pixel); font-size: 6px; fill: #ff9a4d; }
.grid rect { fill: #17082c; }
.grid line { stroke: var(--pink); stroke-width: .8; opacity: .75; }
.hero-sub { color: #fff3d8; font-family: var(--pixel); font-size: 8.5px; letter-spacing: 1px; text-transform: uppercase; background: #17082c; margin: 0 -14px 12px; padding: 7px 0 10px; }

.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.member { position: relative; display: grid; justify-items: center; gap: 3px; padding: 12px 4px 9px; border: 2px solid var(--ink); border-radius: 18px; background: var(--paper); box-shadow: 0 5px 0 rgba(42, 22, 53, .45); }
.member.me { background: linear-gradient(180deg, #fff9e6, #ffe39c); box-shadow: 0 0 0 3px var(--yellow), 0 5px 0 3px rgba(42, 22, 53, .45); }
.member-name { font-weight: 700; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 5px; }
.member-score { display: flex; gap: 8px; font-size: 13px; }
.member-score i { font-style: normal; }
.member-edit { font-size: 10px; opacity: .6; }
.dots { display: flex; gap: 4px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(42, 22, 53, .18); border: 1px solid rgba(42, 22, 53, .4); }
.dots i.on { background: var(--green); border-color: #12703c; box-shadow: 0 0 6px var(--green); }
.dots.big i { width: 14px; height: 14px; }

.card { border-radius: 18px; padding: 14px 16px; margin: 12px 0; }
.card.paper { background: var(--paper); color: var(--ink); border: 2px solid var(--ink); box-shadow: 0 7px 0 rgba(42, 22, 53, .4), 0 16px 30px rgba(30, 5, 40, .25); }
.card.paper.slim { box-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.dossier { position: relative; margin-top: 22px; padding-top: 18px; }
.dossier h1 { font-size: 27px; }
.stamp { position: absolute; top: -13px; right: 12px; transform: rotate(4deg); font-family: var(--pixel); font-size: 9px; color: #cf2018; background: var(--paper); border: 3px solid #cf2018; border-radius: 5px; padding: 7px 9px; }
.chip { display: inline-block; font-weight: 700; font-size: 10.5px; letter-spacing: .09em; background: var(--ink); color: var(--yellow); padding: 5px 10px; border-radius: 20px; margin-bottom: 8px; }
.hook { font-size: 15.5px; }
.dates { font-weight: 700; font-size: 12.5px; opacity: .65; margin: 0; }
.route-title { font-family: var(--display); font-weight: 400; color: #fff7e0; text-shadow: 0 2px 0 var(--ink); margin-top: 20px; font-size: 23px; }

.stage { background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; margin: 10px 0; overflow: hidden; }
.stage-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 13px; background: none; border: 0; text-align: left; color: var(--ink); }
.stage-num { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--ink); color: var(--yellow); font-family: var(--pixel); font-size: 13px; }
.stage-title { display: grid; }
.stage-title b { font-family: var(--display); font-weight: 400; font-size: 18px; }
.stage-title i { font-style: normal; font-size: 12px; opacity: .65; }
.stage-flag { margin-left: auto; font-weight: 700; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; border: 1.5px solid currentColor; border-radius: 20px; padding: 3px 8px; }
.stage-done .stage-num { background: var(--green); color: #fff; }
.stage-done .stage-flag { color: #12703c; }
.stage-active { box-shadow: 0 0 0 3px var(--red), 0 0 22px rgba(255, 59, 48, .6); }
.stage-active .stage-num { background: var(--red); color: #fff; }
.stage-active .stage-flag { color: var(--red); }
.stage-locked { opacity: .6; }
.stage-body { padding: 0 13px 14px; }
.sub { font-size: 14px; margin: 16px 0 6px; padding-top: 10px; border-top: 2px dashed rgba(42, 22, 53, .25); }
.word { display: grid; gap: 2px; padding: 9px 12px; margin: 7px 0; border-radius: 10px; background: #fff; border-left: 5px solid var(--pink); }
.word b { font-family: var(--display); font-weight: 400; font-size: 19px; }
.word i { font-size: 12.5px; color: #6c5a80; }
.fact { background: #fff0c2; border: 1.5px dashed #b7862a; border-radius: 10px; padding: 9px 11px; margin-top: 10px; font-size: 13.5px; }
.prompt { margin: 0 0 8px; padding: 10px 13px; border-radius: 12px; background: var(--ink); color: #fff3d8; font-family: var(--display); font-size: 17px; line-height: 1.35; }
.tips summary { font-weight: 700; font-size: 13.5px; cursor: pointer; }
.tips ul { margin: 6px 0; padding-left: 18px; font-size: 14px; }
.how { font-size: 14px; background: #e6f6ff; border-radius: 10px; padding: 9px 11px; color: #12354d; }
.mark { display: flex; gap: 8px; align-items: flex-start; font-weight: 700; font-size: 14px; }
.mark span { flex: none; }
.mark.ok { color: #12803f; }
.waiting { font-size: 13.5px; background: #fff0c2; color: #6b4b00; border-radius: 10px; padding: 8px 11px; }
.notice { background: #ffe3df; color: #6b130c; border-radius: 10px; padding: 9px 11px; }
.notice.good { background: #dcf7e6; color: #0d5b2c; }

.quiz .question { border: 0; padding: 0; margin: 0 0 12px; }
.quiz legend { font-weight: 700; margin-bottom: 5px; }
.option { display: block; width: 100%; text-align: left; margin: 5px 0; padding: 10px 12px; border-radius: 12px; border: 2px solid #cdbb9d; background: #fff; color: var(--ink); font-size: 14.5px; }
.option.picked { border-color: var(--ink); background: #fff0b8; }
.option.right { border-color: #12803f; background: #d9f6e3; }
.option.wrong { border-color: var(--red); background: #ffe0dc; }

.progress-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(42, 22, 53, .12); }
.progress-row span:nth-child(2) { flex: 1; font-weight: 700; }
.fb { margin: 10px 0; }
.note { background: #fff; color: var(--ink); border-radius: 12px; padding: 9px 12px; margin: 8px 0; font-size: 14px; }
.note p { margin: 3px 0; }
.card.radio { background: #17082c; color: #eaf6ff; border: 2px solid var(--cyan); box-shadow: 0 0 14px rgba(46, 230, 255, .5); }
.card.radio h3 { display: flex; gap: 8px; align-items: center; font-size: 15px; color: var(--cyan); }
.confirm-row { display: flex; align-items: center; gap: 8px; margin: 9px 0; }
.confirm-row > span:nth-child(2) { flex: 1; font-size: 14px; }
.laws { color: var(--ink); background: rgba(255, 246, 229, .85); border-radius: 14px; padding: 10px 14px; margin-top: 14px; }
.laws summary { font-weight: 700; cursor: pointer; }
.laws ul { margin: 8px 0 0; padding-left: 18px; }

/* ---------- нижняя панель ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; background: rgba(14, 6, 28, .95); border-top: 2px solid var(--red); box-shadow: 0 -4px 18px rgba(255, 59, 48, .25); padding: 7px 4px calc(7px + env(safe-area-inset-bottom)); }
.nav button { position: relative; flex: 1; display: grid; justify-items: center; gap: 2px; background: none; border: 0; padding: 0; font-weight: 700; font-size: 10.5px; color: #a897c9; }
.nav button.on { color: #fff; }
.nav button.on .icon { stroke: #ff5a4f; filter: drop-shadow(0 0 6px var(--red)); }
.badge { position: absolute; top: -3px; left: calc(50% + 7px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--red); color: #fff; font-style: normal; font-size: 10.5px; line-height: 17px; padding: 0 4px; }

/* ---------- окна и сообщения ---------- */
.modal-back { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(10, 3, 20, .72); }
.modal-back.solid { background: linear-gradient(180deg, #1d0c3d, #a8367e 70%, #f9a35b); }
.modal { width: 100%; max-width: 440px; max-height: 92vh; overflow: auto; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 20px; padding: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.profile h2 { font-size: 26px; }
.emblem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.emblem-pick { display: grid; justify-items: center; gap: 7px; padding: 10px 2px 6px; border: 2px solid transparent; border-radius: 14px; background: none; font-size: 11px; color: var(--ink); }
.emblem-pick.picked { border-color: var(--red); background: #fff; box-shadow: 0 0 12px rgba(255, 59, 48, .45); }
.age-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.age-pick { padding: 11px 6px; border: 2px solid rgba(42, 22, 53, .25); border-radius: 14px; background: none; font-size: 13px; color: var(--ink); }
.age-pick.picked { border-color: var(--red); background: #fff; box-shadow: 0 0 12px rgba(255, 59, 48, .45); }
.toasts { position: fixed; left: 12px; right: 12px; bottom: 82px; z-index: 80; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { max-width: 480px; padding: 11px 15px; border-radius: 14px; background: #17082c; color: #fff; border: 2px solid var(--cyan); font-weight: 700; font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.toast-good { border-color: var(--green); }
.toast-error { border-color: var(--red); }

.gate { max-width: 440px; margin: 0 auto; padding: 0 14px 40px; text-align: center; color: #fff3d8; }
.gate .logo { margin: 40px 0 20px; }
.gate .card { text-align: left; }
.gate .btn.wide { justify-content: flex-start; }
.off h2 { font-size: 24px; }

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