/* Кто старше: глубокое время. Ночной индиго, лента из тёмного стекла,
   у каждой эры свой цвет полосы. Карточка в руке кремовая, как этикетка. */

:root {
  --bg: #121628;
  --bg-2: #f7f0e1;
  --ink: #eef0f8;
  --ink-2: #b9bfd6;
  --ink-3: #8189a8;
  --line: rgba(238, 240, 248, .14);
  --accent: #f0c36a;
  --accent-ink: #2a1c05;
  --ok: #58c98b;
  --no: #ef6f5e;
  --card: #f7f0e1;
  --shadow: 0 26px 50px -24px rgba(0, 0, 0, .85);
  --e0: #a98be0;  /* докембрий */
  --e1: #3fb3ac;  /* палеозой */
  --e2: #8cc152;  /* мезозой */
  --e3: #eaa84a;  /* кайнозой */
  --e4: #ef7f64;  /* время людей */
}
body { background: radial-gradient(120% 70% at 50% -10%, #28305a 0%, #121628 55%, #0b0e1c 100%) fixed; }
.note { color: var(--ink-3); }
.center { text-align: center; }
.btn--ghost { color: var(--ink); }
.card { color: #2b2519; }

/* ---------- первый экран */
.hero { border-radius: 26px; overflow: hidden; aspect-ratio: 1.25; box-shadow: var(--shadow), 0 0 0 1px var(--line); background: #151a33; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero__text { display: grid; gap: 6px; }
.hero__text h1 { font-size: clamp(40px, 12vw, 52px); color: #fff6df; }
.hero__text .eyebrow { color: var(--accent); }
.hero__text .lead { color: #d9dcec; font-size: 17px; }
.eras { display: flex; height: 8px; border-radius: 4px; overflow: hidden; }
.eras i { flex: 1; }
.eras-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); }
.eras-legend span { display: inline-flex; align-items: center; gap: 6px; }
.eras-legend span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.how li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--ink-2); font-size: 15px; }
.how b { color: var(--ink); }
.how svg { width: 22px; height: 22px; flex: none; color: var(--accent); margin-top: 1px; }
.today { display: grid; gap: 6px; padding: 14px 16px; border-radius: 16px; background: rgba(240, 195, 106, .1); border: 1px solid rgba(240, 195, 106, .35); }
.today b { color: var(--accent); }
.sq { font-size: 18px; letter-spacing: 2px; line-height: 1.2; word-break: break-all; }

/* ---------- шапка игры */
.hud { display: flex; align-items: center; gap: 10px; }
.lives { display: flex; gap: 4px; }
.lives svg { width: 24px; height: 24px; color: var(--accent); transition: transform .3s var(--ease), opacity .3s; }
.lives svg.is-lost { color: var(--ink-3); opacity: .35; transform: scale(.8); }
.hud__score { margin-left: auto; font-weight: 700; color: var(--ink-2); font-size: 14px; }
.hud__score b { color: var(--ink); font-size: 18px; }

/* ---------- лента */
.tl { display: grid; gap: 0; padding-bottom: 8px; }
.tl__end { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; text-align: center; padding: 4px 0; }
.slot { position: relative; height: 34px; display: grid; place-items: center; border-radius: 12px; transition: height .18s var(--ease), background .18s; }
.slot::before { content: ""; position: absolute; left: 22px; right: 22px; top: 50%; border-top: 2px dashed rgba(240, 195, 106, .28); }
.slot span { position: relative; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #1d2340; border: 1.5px solid rgba(240, 195, 106, .55); color: var(--accent); font-weight: 800; font-size: 18px; line-height: 1; transition: transform .18s var(--ease); }
.slot:hover span, .slot:focus-visible span { transform: scale(1.15); }
.slot.is-hot { height: 76px; background: rgba(240, 195, 106, .12); box-shadow: inset 0 0 0 2px var(--accent); }
.slot.is-hot::before { opacity: 0; }
.slot.is-hot span { width: auto; height: auto; padding: 6px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 14px; }
.slot.is-hot span::after { content: " сюда"; }
.tl.is-busy .slot { pointer-events: none; opacity: .25; }

.it { position: relative; display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center; padding: 8px 12px 8px 16px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); overflow: hidden; }
.it::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c, var(--e1)); }
.it img { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45)); }
.it b { display: block; font-size: 16px; line-height: 1.2; }
.it small { display: block; color: var(--c); font-weight: 700; font-size: 13px; margin-top: 2px; }
.it__mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.it.ok .it__mark { background: var(--ok); color: #06200f; }
.it.bad .it__mark { background: var(--no); color: #2b0906; }
.it.is-new { animation: land .5s var(--ease); }
.it.is-new.ok { box-shadow: 0 0 0 2px var(--ok), 0 0 26px -4px var(--ok); }
.it.is-new.bad { box-shadow: 0 0 0 2px var(--no), 0 0 26px -4px var(--no); animation: land .5s var(--ease), shake .45s .45s; }
@keyframes land { from { transform: scale(.85); opacity: 0; } }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }

/* ---------- карточка в руке и разбор */
.dock { position: sticky; bottom: 0; z-index: 5; margin: auto -16px calc(-28px - var(--sab)); padding: 12px 16px calc(14px + var(--sab)); background: linear-gradient(to bottom, rgba(18, 22, 40, 0), rgba(12, 15, 30, .96) 22px); }
.hand { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; padding: 12px 16px 12px 12px; border-radius: 20px; background: var(--card); color: #2b2519; box-shadow: var(--shadow), 0 0 0 2px rgba(240, 195, 106, .6); touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.hand img { width: 92px; height: 92px; object-fit: contain; pointer-events: none; filter: drop-shadow(0 8px 10px rgba(40, 30, 10, .35)); }
.hand h2 { font-size: 22px; }
.hand p { color: #6a604c; font-size: 14px; line-height: 1.35; margin-top: 2px; }
.hand__hint { font-size: 12px !important; color: #a0936f !important; margin-top: 6px !important; font-weight: 600; }
.hand.is-lift { opacity: .35; }
.ghost { position: fixed; z-index: 80; pointer-events: none; width: min(420px, calc(100vw - 48px)); transform: translate(-50%, -60%) rotate(-3deg) scale(.92); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9), 0 0 0 2px var(--accent); }

.fb { display: grid; gap: 10px; padding: 14px 16px; border-radius: 20px; background: var(--card); color: #2b2519; box-shadow: var(--shadow); border-top: 6px solid var(--k, var(--ok)); animation: rise .3s var(--ease); }
.fb.bad { --k: var(--no); }
.fb__head { display: flex; gap: 12px; align-items: center; }
.fb__head img { width: 64px; height: 64px; object-fit: contain; flex: none; }
.fb .eyebrow { color: var(--k); font-weight: 800; }
.fb.ok .eyebrow { color: #23884f; }
.fb.bad .eyebrow { color: #c64330; }
.fb h3 { font-size: 20px; line-height: 1.15; }
.fb__when { font-weight: 700; color: #7a6a45; font-size: 14px; }
.fb__fact { color: #4d4536; font-size: 15px; }
.fb .btn { width: 100%; }

/* ---------- итог */
.final { display: grid; gap: 8px; text-align: center; }
.final h1 { font-size: 36px; }
.final__score { color: var(--ink-2); font-size: 18px; }
.final__score b { font-family: var(--serif); font-size: 52px; color: var(--accent); }
.surprise { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; }
.surprise img { width: 72px; height: 72px; object-fit: contain; }
.surprise .eyebrow { color: #9a7a3a; }
.surprise p:last-child { color: #4d4536; font-size: 15px; }
.recap { display: grid; gap: 6px; }
.recap .it { grid-template-columns: 44px 1fr auto; padding: 6px 10px 6px 14px; }
.recap .it img { width: 44px; height: 44px; }
.recap .it b { font-size: 14px; }
.recap .it small { font-size: 12px; }
.museum { display: grid; gap: 6px; }
.museum .eyebrow { color: #8a7a55; }
.stats { display: flex; justify-content: center; gap: 22px; color: var(--ink-2); font-size: 14px; }
.stats b { display: block; font-family: var(--serif); font-size: 26px; color: var(--ink); }
