/*
 * Type Crush — швейцарский плакат.
 * Тёплый белый, чёрный, красный-синий-жёлтый; Inter Tight 900 для заголовков,
 * JetBrains Mono для подписей, толстые линейки вместо теней.
 */

/* ============ Токены ============ */

:root {
  --bg: #F4F2EC;
  --paper: #EAE7DF;
  --paper-2: #FBFAF6;
  --card: #FFFFFF;
  --ink: #111110;
  --ink-2: #57564F;
  --muted: #8E8B83;
  --line: rgba(17, 17, 16, .13);
  --line-2: rgba(17, 17, 16, .28);
  --rule: #111110;
  --red: #FF3B1F;
  --blue: #2140FF;
  --yellow: #FFC400;
  --green: #12A150;
  --accent: var(--red);
  --approve: var(--blue);
  --good: var(--green);
  --star: var(--red);
  --shadow: none;

  --ui: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Inter Tight', system-ui, sans-serif;
  --serif: 'Playfair Display', Georgia, serif;
  --num: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --my: 'wght' 800, 'CASL' 0, 'MONO' 0, 'slnt' 0, 'CRSV' 0;

  --vh: 100vh;
  --wrap: 1320px;
  --gut: 32px;
  color-scheme: light;
}
@supports (height: 100dvh) { :root { --vh: 100dvh; } }

/* Гарнитуры: шрифт, цвет-подсказка, масштаб */
.t-didone { --font: 'Playfair Display', Georgia, serif; --fw: 700; --fs: 1; --bg: #FFE0D9; --fg: #C8102E; }
.t-geo    { --font: 'Jost', 'Futura', sans-serif; --fw: 500; --fs: 1.02; --bg: #DCE4FF; --fg: #1D3FD8; }
.t-mono   { --font: 'Space Mono', monospace; --fw: 700; --fs: .9; --bg: #D6F2DF; --fg: #0F7A3D; }
.t-script { --font: 'Lobster', cursive; --fw: 400; --fs: 1.02; --bg: #FFE6C7; --fg: #C2410C; }
.t-black  { --font: 'UnifrakturMaguntia', serif; --fw: 400; --fs: 1.08; --bg: #E9DEFF; --fg: #5B21B6; }
.t-pixel  { --font: 'Press Start 2P', monospace; --fw: 400; --fs: .56; --bg: #D1F0F4; --fg: #0B6470; }
.t-slab   { --font: 'Alfa Slab One', serif; --fw: 400; --fs: .9; --bg: #FFF0B8; --fg: #7A5300; }
.t-comic  { --font: 'Comic Sans MS', 'Comic Neue', cursive; --fw: 700; --fs: .92; --bg: #FFF35C; --fg: #E11D8F; }
.t-var    { --font: 'Recursive', sans-serif; --fw: 800; --fs: .78; --bg: var(--ink); --fg: var(--bg); }

.colorless :is(.t-didone, .t-geo, .t-mono, .t-script, .t-black, .t-pixel, .t-slab) {
  --bg: var(--card);
  --fg: var(--ink);
}

/* ============ База ============ */

* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: hidden; }
body {
  min-height: var(--vh);
  background: var(--bg);
  color: var(--ink);
  font: 500 15px/1.45 var(--ui);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; }

.kicker {
  margin: 0;
  font: 700 11px/1.3 var(--num);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.my { font-family: 'Recursive', sans-serif; font-variation-settings: var(--my); }

.btn {
  appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px;
  border: 0; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font: 800 15px/1 var(--ui);
  letter-spacing: -.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.red { background: var(--red); color: #fff; }
.btn.small { padding: 10px 14px; font-size: 14px; }
.btn:focus-visible, .icon-btn:focus-visible, .tabs button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
#btn-sound[aria-pressed="false"] { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; color: var(--muted); }

.icon-btn {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border: 2px solid var(--rule); border-radius: 50%;
  background: transparent; color: var(--ink);
  cursor: pointer;
}
.icon-btn svg { width: 22px; height: 22px; }
.link { appearance: none; border: 0; background: none; padding: 0; color: var(--ink-2); text-decoration: underline; cursor: pointer; }

.coin-tag { display: inline-flex; align-items: center; gap: 5px; font-family: var(--num); font-weight: 700; }
.coin-tag svg { width: 18px; height: 18px; }

/* ============ Главный экран ============ */

.menu { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut) 64px; }

.top {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  padding: 20px 0;
  border-bottom: 3px solid var(--rule);
}
.logo {
  appearance: none; border: 0; background: none; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center;
  font: 900 30px/1 var(--display); letter-spacing: -.055em; color: var(--ink);
}
.logo i { display: inline-block; width: .62em; height: .62em; margin: 0 .04em; border-radius: 50%; background: var(--red); }
.tabs { display: flex; gap: 4px; justify-content: center; }
.tabs button {
  padding: 10px 16px; border: 0; border-radius: 999px; background: none;
  font: 700 14px/1 var(--ui); color: var(--ink); cursor: pointer;
}
.tabs button:hover { background: var(--paper); }
.tabs button.on { background: var(--ink); color: var(--bg); }
.res { display: flex; align-items: center; gap: 6px; grid-column: -2 / -1; justify-self: end; }
.res-i {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 10px;
  border: 0; border-radius: 999px; background: none;
  font: 700 14px/1 var(--num); color: var(--ink);
  cursor: pointer;
}
.res-i:hover { background: var(--paper); }
.res-i .ri { width: 22px; height: 22px; display: grid; place-items: center; }
.res-i .ri svg { width: 22px; height: 22px; }
.res-i .st { color: var(--red); font-size: 18px; }
.res-i small { font: 500 11px/1 var(--num); color: var(--muted); }
.res-i.bump { animation: res-bump .5s cubic-bezier(.2, 1.6, .4, 1); }
#res-stars { cursor: default; }
#res-stars:hover { background: none; }
.res .icon-btn { margin-left: 6px; }

/* Бриф на главной */
.hero { display: grid; grid-template-columns: 7fr 5fr; border-bottom: 3px solid var(--rule); }
.bh {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 0 32px;
  padding: 36px 36px 36px 0;
  border-right: 3px solid var(--rule);
}
.bh-num { font: 900 clamp(120px, 15vw, 220px)/.8 var(--display); letter-spacing: -.07em; color: var(--red); font-variant-numeric: tabular-nums; }
.bh-num.inf { font-size: clamp(120px, 14vw, 200px); }
.bh h1 { margin: 10px 0 8px; font: 900 clamp(36px, 4.4vw, 62px)/.95 var(--display); letter-spacing: -.045em; }
.bh .client { color: var(--ink-2); font-weight: 600; }
.bh blockquote { margin: 18px 0 0; font: 600 20px/1.3 var(--ui); max-width: 32ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border: 2px solid var(--rule); border-radius: 999px;
  font: 700 13px/1 var(--num); color: var(--ink); background: transparent;
  text-transform: none; letter-spacing: 0;
}
.chip.y { background: var(--yellow); border-color: var(--yellow); color: #111110; }
.chip.r { background: var(--red); border-color: var(--red); color: #fff; }
.chip.b { background: var(--blue); border-color: var(--blue); color: #fff; }
.bh-play { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 34px; }
.btn.play { padding: 22px 34px 22px 24px; gap: 14px; font: 900 22px/1 var(--display); letter-spacing: -.02em; }
.btn.play .pi { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; font-size: 13px; }
.btn.play.nudge { animation: nudge-play .8s ease; }
.bh-play .kicker { max-width: 32ch; }

/* Мой шрифт — панель на главной и вкладка */
.fp { padding: 36px 0 36px 36px; display: flex; flex-direction: column; }
.fp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.fp h2 { margin: 6px 0 0; font: 900 34px/1 var(--display); letter-spacing: -.04em; }
.traits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.traits span { padding: 6px 10px; border-radius: 4px; background: var(--ink); color: var(--bg); font: 700 11px/1 var(--num); }
.traits span.todo { background: none; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--ink-2); border: 0; }
.glyphs {
  display: grid; grid-template-columns: repeat(7, 1fr);
  margin-top: 20px;
  border-top: 2px solid var(--rule); border-left: 2px solid var(--rule);
}
.gl-c {
  position: relative;
  aspect-ratio: 1;
  display: grid; place-items: center;
  border-right: 2px solid var(--rule); border-bottom: 2px solid var(--rule);
  font: 800 clamp(22px, 2.6vw, 36px)/1 'Recursive', sans-serif;
  font-variation-settings: var(--my);
  transition: background .3s ease;
}
.gl-c.lock { color: transparent; -webkit-text-stroke: 1px var(--line-2); font-variation-settings: 'wght' 300; }
.gl-c.next { background: var(--yellow); color: #111110; -webkit-text-stroke: 0; font-variation-settings: 'wght' 300; animation: blink 1.4s ease-in-out infinite; }
.gl-c.fresh { animation: glyph-in .8s cubic-bezier(.2, 1.5, .4, 1) both; }
.gl-c small { position: absolute; right: 4px; bottom: 3px; font: 700 9px/1 var(--num); color: #111110; }
.fp-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 18px; }
.fp-foot .kicker b { color: var(--ink); }

/* Цветные блоки дня */
.day { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-bottom: 3px solid var(--rule); }
.dblock {
  appearance: none; border: 0; text-align: left; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 22px 24px;
  color: #111110;
  font: inherit;
}
.dblock + .dblock { border-left: 3px solid var(--rule); }
.dblock .kicker { color: inherit; opacity: .85; }
.dblock b { font: 900 44px/1 var(--display); letter-spacing: -.04em; }
.dblock.y { background: var(--yellow); }
.dblock.b { background: var(--blue); color: #fff; }
.dblock.r { background: var(--red); color: #fff; }
.dblock.off { background: var(--paper); color: var(--muted); cursor: default; }
.dblock.off b { font-size: 16px; letter-spacing: 0; font-weight: 700; }
.dblock.ready { animation: ready-pulse 1.6s ease-in-out infinite; }
.dblock .dot { display: inline-block; width: 9px; height: 9px; margin-left: 6px; border-radius: 50%; background: currentColor; vertical-align: middle; animation: throb 1s ease-in-out infinite; }

/* Карьера — расписание по главам */
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 30px 0 16px; }
.sec-head h2 { font: 900 46px/1 var(--display); letter-spacing: -.045em; }
.chapters { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 3px solid var(--rule); }
.ch { padding: 18px 18px 22px; border-right: 2px solid var(--rule); min-width: 0; }
.ch:last-child { border-right: 0; }
.ch h3 { margin: 8px 0 14px; font: 900 24px/1 var(--display); letter-spacing: -.03em; }
.ch.locked { color: var(--muted); }
.ch.locked .kicker { color: var(--muted); }
.lv {
  appearance: none; width: 100%; border: 0; background: none; text-align: left; color: inherit;
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: baseline; gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font: inherit; cursor: pointer;
}
.lv:disabled { cursor: default; }
.lv .n { font: 700 13px/1 var(--num); }
.lv .t { font-weight: 600; }
.lv .t small { display: block; margin-top: 3px; font: 700 10px/1.2 var(--num); letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.lv .s { font-size: 13px; letter-spacing: 1px; color: var(--red); white-space: nowrap; }
.lv .s i { font-style: normal; color: var(--line-2); }
.lv:not(:disabled):hover .t { text-decoration: underline; text-decoration-thickness: 2px; }
.lv.cur { margin: 0 -18px; padding: 10px 18px; background: var(--yellow); color: #111110; border-top-color: var(--rule); }
.lv.cur .t { font-weight: 900; }
.lv.cur .s, .lv.cur .t small { color: #111110; }
.ch .reward { margin-top: 12px; font: 700 11px/1.4 var(--num); color: var(--ink-2); }
.ch .reward.got { color: var(--green); }
.ch.locked .reward { color: var(--muted); }
.free-row { margin-top: 20px; }
.free-row .btn { font-size: 16px; }

/* Страницы вкладок */
.page { padding-bottom: 20px; }
.page-lead { margin: 0 0 20px; max-width: 60ch; color: var(--ink-2); font-size: 16px; }

/* Мой шрифт — вкладка */
.ft { display: grid; grid-template-columns: 1fr 360px; border-top: 3px solid var(--rule); }
.ft-main { padding: 28px 32px 32px 0; border-right: 3px solid var(--rule); }
.ft-side { padding: 28px 0 32px 32px; display: flex; flex-direction: column; gap: 18px; }
.ft-name { font: 900 clamp(38px, 5vw, 72px)/.95 var(--display); letter-spacing: -.045em; }
.ft .glyphs { grid-template-columns: repeat(9, 1fr); }
.ft .gl-c { font-size: clamp(26px, 3.4vw, 48px); }
.sample { margin-top: 26px; font: 800 clamp(30px, 4.6vw, 64px)/1.05 'Recursive', sans-serif; font-variation-settings: var(--my); letter-spacing: -.01em; word-break: break-word; }
.sample .off { color: transparent; -webkit-text-stroke: 1px var(--line-2); }
.trait-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--rule); }
.trait-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.trait-list b { font-size: 15px; }
.trait-list span { font: 700 12px/1.3 var(--num); color: var(--ink-2); text-align: right; }
.trait-list li.got span { color: var(--ink); }

/* Коллекция */
.collection { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); border-top: 3px solid var(--rule); border-left: 2px solid var(--rule); }
.fcard {
  display: flex; flex-direction: column; gap: 3px;
  padding: 18px;
  border-right: 2px solid var(--rule); border-bottom: 2px solid var(--rule);
  background: var(--card);
}
.fcard .aa { height: 76px; display: flex; align-items: center; font-family: var(--font); font-weight: var(--fw); font-size: calc(58px * var(--fs)); line-height: 1; color: var(--fg); }
.fcard.t-var .aa { color: var(--ink); animation: morph 2.2s ease-in-out infinite alternate; }
.fcard.t-comic { background: repeating-linear-gradient(-45deg, var(--card) 0 10px, color-mix(in srgb, #FFF35C 26%, var(--card)) 10px 20px); }
.fcard b { font-size: 16px; font-weight: 800; }
.fcard .cls { font: 700 10px/1.4 var(--num); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fcard .who { font-size: 12px; color: var(--ink-2); }
.fcard p { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.fcard.locked { justify-content: center; align-items: center; min-height: 200px; background: var(--paper); text-align: center; }
.fcard.locked .q { font: 900 60px/1 var(--display); color: var(--line-2); }
.fcard.locked small { font: 700 11px/1.4 var(--num); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ach-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); border-top: 3px solid var(--rule); }
.ach-list li { display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.ach-list li b { display: block; font-size: 15px; font-weight: 800; }
.ach-list li small { display: block; font-size: 12.5px; line-height: 1.35; }
.ach-star { flex: none; display: grid; place-items: center; width: 36px; height: 36px; font-size: 18px; line-height: 1; }
.ach-list li .ach-star { box-shadow: inset 0 0 0 2px var(--line-2); color: var(--line-2); }
.ach-list li.got { color: var(--ink); }
.ach-list li.got small { color: var(--ink-2); }
.ach-list li.got .ach-star { background: var(--red); color: #fff; box-shadow: none; }

/* Магазин */
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 3px solid var(--rule); border-left: 2px solid var(--rule); }
.shop-sec { margin: 26px 0 12px; }
.shop-item { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-right: 2px solid var(--rule); border-bottom: 2px solid var(--rule); background: var(--card); }
.shop-item.locked { background: var(--paper); color: var(--muted); }
.si-ico { color: var(--ink); }
.si-ico svg { width: 44px; height: 44px; }
.si-body b { display: block; font: 900 22px/1.1 var(--display); letter-spacing: -.02em; }
.si-body small { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.si-body .own { font: 700 11px/1.4 var(--num); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.shop-item .btn { align-self: flex-start; margin-top: auto; }
.locked-note { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 32px 0; border-top: 3px solid var(--rule); color: var(--ink-2); font-size: 16px; }
.locked-note svg { width: 36px; height: 36px; color: var(--muted); }

.tabbar { display: none; }

/* ============ Игровой экран ============ */

.game {
  --board: min(640px, calc(var(--vh) - 150px), calc(100vw - 700px));
  display: flex; flex-direction: column;
  min-height: var(--vh);
}
.topbar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 14px var(--gut);
  border-bottom: 3px solid var(--rule);
}
.topbar > .btn { justify-self: start; }
.topbar-title { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.topbar-title b { font: 900 20px/1.1 var(--display); letter-spacing: -.03em; }
.topbar-actions { justify-self: end; display: flex; gap: 8px; }

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 250px var(--board) 280px;
  grid-template-areas: "hud board side";
  gap: 40px;
  justify-content: center;
  align-items: start;
  padding: 30px var(--gut) 40px;
}
.hud { grid-area: hud; display: flex; flex-direction: column; gap: 0; min-width: 0; }
.board-area { grid-area: board; }
.side { grid-area: side; display: flex; flex-direction: column; gap: 22px; min-width: 0; }

.stats { display: grid; grid-template-columns: 1fr; border-top: 3px solid var(--rule); }
.stat { padding: 14px 0; border-bottom: 2px solid var(--rule); min-width: 0; }
.stat .label { display: flex; align-items: center; gap: 8px; font: 700 11px/1 var(--num); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.stat .value { display: block; margin-top: 8px; font: 900 64px/.9 var(--display); letter-spacing: -.05em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stats .stat:last-child .value { font-size: 34px; }
.stat .value small { margin-left: 6px; font: 700 13px/1 var(--num); letter-spacing: 0; color: var(--muted); }
.stat.low .value { color: var(--red); }
.mult { padding: 2px 6px; border-radius: 3px; background: var(--red); color: #fff; letter-spacing: 0; }

.stars-bar { position: relative; height: 10px; margin: 18px 0 20px; background: var(--paper); }
.stars-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--ink); transition: width .45s ease; }
.stars-bar .mark { position: absolute; top: 50%; translate: -50% -50%; font-size: 18px; line-height: 1; color: var(--line-2); transition: color .3s, transform .3s; }
.stars-bar .mark.on { color: var(--red); transform: scale(1.35); }

.block { padding: 0; }
.block-title { margin: 0 0 12px; font: 700 11px/1 var(--num); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.goals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 2px solid var(--rule); }
.goal { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.gl {
  grid-row: span 2;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: var(--bg, var(--paper)); color: var(--fg, var(--ink));
  font-family: var(--font, var(--num)); font-weight: var(--fw, 700);
  font-size: calc(22px * var(--fs, .8));
}
.goals .gl, .brief-goals .gl { border-radius: 6px; }
.t-comic.gl { transform: rotate(-4deg); }
.gname { font-size: 14px; line-height: 1.2; font-weight: 700; min-width: 0; }
.gname small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.gcount { font: 900 20px/1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gbar { grid-column: 2 / 4; height: 4px; background: var(--paper); overflow: hidden; }
.gbar i { display: block; height: 100%; width: 0; background: var(--fg, var(--ink)); transition: width .4s ease; }
.colorless .gbar i { background: var(--ink); }
.goal.done .gname { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.goal.done .gcount { color: var(--green); }

/* Поле: цветные фишки на чёрной сетке */
.board-wrap { --cell: calc(var(--board) / 8); position: relative; width: var(--board); height: var(--board); }
.board {
  position: absolute; inset: 0;
  overflow: hidden;
  background: none;
  touch-action: none;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  cursor: pointer;
}
.board.shaped { background: none; }
.slot {
  position: absolute; left: 0; top: 0;
  width: var(--cell); height: var(--cell);
  transform: translate(calc(var(--x) * 100%), calc(var(--y) * 100%));
  padding: calc(var(--cell) * .06);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  background-clip: content-box;
  border-radius: calc(var(--cell) * .18);
}
.board-wrap.shake { animation: shake .38s ease; }
.board-wrap.shaped .crop { display: none; }
.crop { position: absolute; width: 0; height: 0; }
.crop::before, .crop::after { content: ''; position: absolute; background: var(--muted); }
.crop::before { width: 16px; height: 1px; }
.crop::after { width: 1px; height: 16px; }
.crop.tl { left: 0; top: 0; } .crop.tl::before { right: 8px; top: 0; } .crop.tl::after { left: 0; bottom: 8px; }
.crop.tr { right: 0; top: 0; } .crop.tr::before { left: 8px; top: 0; } .crop.tr::after { right: 0; bottom: 8px; }
.crop.bl { left: 0; bottom: 0; } .crop.bl::before { right: 8px; bottom: 0; } .crop.bl::after { left: 0; top: 8px; }
.crop.br { right: 0; bottom: 0; } .crop.br::before { left: 8px; bottom: 0; } .crop.br::after { right: 0; top: 8px; }

.tile {
  position: absolute; left: 0; top: 0;
  width: var(--cell); height: var(--cell);
  transform: translate3d(calc(var(--x, 0) * 100%), calc(var(--y, 0) * 100%), 0);
  transition: transform 190ms cubic-bezier(.3, .7, .4, 1);
  will-change: transform;
}
.face {
  position: absolute;
  inset: calc(var(--cell) * .06);
  display: grid; place-items: center;
  overflow: hidden;
  border-radius: calc(var(--cell) * .16);
  background: color-mix(in srgb, var(--fg) 10%, var(--card));
  color: var(--fg);
  font-family: var(--font);
  font-weight: var(--fw, 400);
  font-size: calc(var(--cell) * .56 * var(--fs, 1));
  line-height: 1;
  transition: transform .15s ease, box-shadow .15s ease;
}
.glyph { display: block; pointer-events: none; }
.t-script .glyph { transform: translateY(-.04em); }
.board.aa-mode .face { font-size: calc(var(--cell) * .44 * var(--fs, 1)); letter-spacing: -.02em; }
@media (hover: hover) { .board .tile:hover .face { transform: scale(.94); } }

.sp-row .face { background-image: repeating-linear-gradient(180deg, transparent 0 calc(var(--cell) * .1), color-mix(in srgb, var(--fg) 24%, transparent) calc(var(--cell) * .1) calc(var(--cell) * .13)); }
.sp-col .face { background-image: repeating-linear-gradient(90deg, transparent 0 calc(var(--cell) * .1), color-mix(in srgb, var(--fg) 24%, transparent) calc(var(--cell) * .1) calc(var(--cell) * .13)); }
.sp-row .face::after, .sp-col .face::after { content: '↔'; position: absolute; right: 8%; bottom: 5%; font: 800 calc(var(--cell) * .2)/1 var(--ui); color: var(--fg); }
.sp-col .face::after { content: '↕'; }
.sp-bomb .face { background: var(--fg); color: var(--card); -webkit-text-stroke: calc(var(--cell) * .02) currentColor; animation: throb 1.3s ease-in-out infinite; }
.colorless .sp-bomb .face { background: var(--ink); color: var(--card); }
.t-var .face {
  background: linear-gradient(var(--card), var(--card)) padding-box, conic-gradient(#FF3B1F, #FFC400, #12A150, #2140FF, #8B3DFF, #FF3B1F) border-box;
  border: calc(var(--cell) * .05) solid transparent;
  color: var(--ink);
  animation: morph 2.2s ease-in-out infinite alternate;
}
.t-comic .face {
  background: repeating-linear-gradient(-45deg, #FFF35C 0 calc(var(--cell) * .1), #FFE03A calc(var(--cell) * .1) calc(var(--cell) * .2));
  color: #E11D8F;
  box-shadow: inset 0 0 0 calc(var(--cell) * .035) #19A7F5;
  transform: rotate(-4deg);
  animation: wobble 2.6s ease-in-out infinite;
}
.t-comic .glyph { transform: translateY(-.1em); }
.t-comic .face::after { content: 'Comic Sans'; position: absolute; left: 0; right: 0; bottom: 7%; text-align: center; font: 700 calc(var(--cell) * .12)/1 var(--font); color: #1D4ED8; }

.tile.selected { z-index: 3; }
.tile.selected .face { transform: scale(1.08); box-shadow: 0 0 0 2.5px var(--ink); }
.tile.hint .face { animation: nudge 1s ease-in-out infinite; }
.tile.pop { z-index: 4; pointer-events: none; }
.tile.pop .face { animation: pop 300ms var(--pop-delay, 0ms) cubic-bezier(.3, .6, .4, 1) forwards; }
.tile.born .face { animation: born 480ms cubic-bezier(.2, 1.5, .4, 1); }
.tile.land .face { animation: land 240ms var(--land-delay, 0ms) ease-out; }
.tile.nope .face { animation: nope 320ms ease; }
.tile.infect .face { animation: infect 560ms ease; }
.tile.spawn .face { animation: spawn-in 260ms ease-out; }
.board.shuffling .face { transform: scale(.55) rotate(14deg); transition: transform .2s ease; }
.board.rewind .face { animation: rewind .5s ease; }

.board-wrap.dim .tile { transition: transform 190ms cubic-bezier(.3, .7, .4, 1), opacity .3s ease; }
.board-wrap.dim .tile:not(.focus) { opacity: .18; }
.board-wrap.dim .tile.focus { z-index: 3; }
.board-wrap.dim .tile.focus .face { box-shadow: 0 0 0 2.5px var(--red); }
.board-wrap.aiming .board { cursor: crosshair; }
.board-wrap.aiming .tile .face { animation: aim-wiggle 1.2s ease-in-out infinite; }

.statusbar { display: flex; align-items: center; gap: 10px; min-height: 36px; margin-top: 14px; font: 500 12px/1.35 var(--num); color: var(--ink-2); }
.sb-glyph { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 6px; background: var(--bg, var(--paper)); color: var(--fg, var(--muted)); font-family: var(--font, var(--num)); font-weight: var(--fw, 400); font-size: calc(18px * var(--fs, .9)); }

.boosters { display: flex; gap: 8px; margin-top: 16px; }
.boosters:empty { display: none; }
.booster {
  position: relative; flex: 0 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px 8px 8px;
  border: 2px solid var(--rule); border-radius: 999px;
  background: transparent; color: var(--ink);
  font: 700 13px/1 var(--ui);
  cursor: pointer;
}
.booster:hover { background: var(--paper); }
.booster svg { flex: none; width: 24px; height: 24px; }
.booster .bn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.booster .bc { flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--ink); color: var(--bg); font: 700 11px/22px var(--num); text-align: center; }
.booster.empty { opacity: .4; }
.booster.active { background: var(--yellow); color: #111110; border-color: var(--yellow); }
.booster.fresh::after { content: 'новое'; position: absolute; top: -9px; right: -6px; padding: 3px 5px; border-radius: 3px; background: var(--red); color: #fff; font: 700 9px/1 var(--num); letter-spacing: .06em; text-transform: uppercase; }
#btn-pause { display: none; }

/* Клиент и образцы — правая колонка */
.side .client { display: flex; gap: 12px; align-items: flex-start; padding-top: 14px; border-top: 3px solid var(--rule); }
.avatar { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--bg); font: 900 14px/1 var(--display); }
.avatar.mentor { background: var(--red); color: #fff; width: 42px; height: 42px; }
.client-body { min-width: 0; flex: 1; }
.client-name { margin: 2px 0 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.bubble { margin: 0; min-height: 48px; font: 700 18px/1.3 var(--ui); letter-spacing: -.01em; }
.bubble.ping { animation: ping .45s ease; }
.side .block { border-top: 3px solid var(--rule); padding-top: 14px; }
.specimen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.specimen li { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--line); transition: background .2s ease; }
.specimen li.hot { background: var(--yellow); color: #111110; }
.specimen .aa { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 6px; background: var(--bg); color: var(--fg); font-family: var(--font); font-weight: var(--fw); font-size: calc(20px * var(--fs)); }
.specimen li.t-comic .aa { transform: rotate(-4deg); }
.specimen .nm { display: block; font-size: 13px; font-weight: 700; line-height: 1.2; }
.specimen .cl { display: block; font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.specimen li.hot .cl { color: #111110; }
.specimen .ct { font: 700 12px/1 var(--num); font-variant-numeric: tabular-nums; }

/* ============ Эффекты ============ */

.fx-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.burst { position: absolute; pointer-events: none; }
.burst-row, .burst-col { display: grid; place-items: center; }
.burst-row { left: 0; width: 100%; top: calc(var(--y) * var(--cell)); height: var(--cell); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--fg) 35%, transparent) 12% 88%, transparent); animation: beam-x 720ms ease-out forwards; }
.burst-col { top: 0; height: 100%; left: calc(var(--x) * var(--cell)); width: var(--cell); background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--fg) 35%, transparent) 12% 88%, transparent); animation: beam-y 720ms ease-out forwards; }
.burst-row span, .burst-col span { font-family: var(--font); font-weight: var(--fw); font-size: calc(var(--cell) * .42 * var(--fs)); color: var(--fg); white-space: nowrap; }
.burst-row span { animation: track 720ms ease-out forwards; }
.burst-col span { writing-mode: vertical-rl; text-orientation: upright; animation: lead 720ms ease-out forwards; }
.burst-bomb { --s: 1; left: calc((var(--x) - var(--s)) * var(--cell)); top: calc((var(--y) - var(--s)) * var(--cell)); width: calc((var(--s) * 2 + 1) * var(--cell)); height: calc((var(--s) * 2 + 1) * var(--cell)); display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--fg) 40%, transparent), transparent 70%); box-shadow: 0 0 0 calc(var(--cell) * .06) var(--fg); animation: ring 650ms ease-out forwards; }
.burst-bomb span { font-family: var(--font); font-size: calc(var(--cell) * .72 * var(--fs)); color: var(--fg); -webkit-text-stroke: calc(var(--cell) * .03) currentColor; }
.burst-var { inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; background: radial-gradient(circle at calc((var(--x) + .5) * var(--cell)) calc((var(--y) + .5) * var(--cell)), color-mix(in srgb, var(--yellow) 45%, transparent), transparent 62%); animation: fade-out 950ms ease-out forwards; }
.burst-var .vb { font: 400 calc(var(--board) * .3)/1 'Recursive', sans-serif; color: var(--card); animation: var-burst 950ms ease-out forwards; }
.burst-var em { font-style: normal; font-family: var(--font); font-weight: var(--fw); font-size: calc(var(--cell) * .5 * var(--fs)); color: var(--fg); background: var(--bg); padding: .1em .4em; border-radius: .15em; text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: .08em; }
.burst-erase { left: calc(var(--x) * var(--cell)); top: calc(var(--y) * var(--cell)); width: var(--cell); height: var(--cell); border-radius: 50%; border: calc(var(--cell) * .06) solid var(--red); animation: ring 500ms ease-out forwards; }

.particle { position: absolute; left: calc((var(--x) + .5) * var(--cell)); top: calc((var(--y) + .5) * var(--cell)); translate: -50% -50%; font-family: var(--font); font-weight: var(--fw); font-size: calc(var(--cell) * .34 * var(--fs)); line-height: 1; color: var(--fg); animation: fly 700ms cubic-bezier(.15, .7, .3, 1) forwards; }
.float { position: absolute; left: calc((var(--x) + .5) * var(--cell)); top: calc((var(--y) + .5) * var(--cell)); translate: -50% -50%; white-space: nowrap; animation: rise 1000ms ease-out forwards; }
.float-score { font: 900 calc(var(--cell) * .34)/1 var(--display); color: #fff; -webkit-text-stroke: calc(var(--cell) * .05) #111110; paint-order: stroke fill; letter-spacing: -.02em; }
.float-special { font-family: var(--font); font-weight: var(--fw); font-size: calc(var(--cell) * .36 * var(--fs)); color: var(--fg); background: var(--bg); padding: .18em .5em; border-radius: 999px; box-shadow: 0 0 0 2px var(--fg); }
.t-var.float-special { background: var(--ink); color: var(--card); box-shadow: 0 0 0 2px var(--ink); }

.combo { position: absolute; left: 50%; top: 44%; translate: -50% -50%; z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 6px; animation: combo 1150ms cubic-bezier(.2, 1.3, .4, 1) forwards; }
.combo span { padding: .08em .35em .14em; border-radius: .12em; background: var(--bg, var(--yellow)); color: var(--fg, #111110); font-family: var(--font, var(--display)); font-weight: var(--fw, 900); font-size: calc(var(--cell) * .82 * var(--fs, .6)); line-height: 1.08; white-space: nowrap; box-shadow: 0 0 0 3px var(--fg, #111110); }
.combo small { padding: 4px 9px; border-radius: 999px; background: #111110; color: #fff; font: 700 calc(var(--cell) * .24)/1 var(--num); }

.stamp { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; pointer-events: none; transition: opacity .4s ease; }
.stamp span { padding: .3em .55em .34em; border: .1em solid currentColor; border-radius: .2em; background: color-mix(in srgb, var(--card) 88%, transparent); color: var(--red); font: 900 calc(var(--board) * .08)/1 var(--display); letter-spacing: -.02em; text-transform: uppercase; white-space: nowrap; transform: rotate(-10deg); animation: stamp 520ms cubic-bezier(.2, 1.4, .4, 1) both; }
.stamp.good span { color: var(--blue); }
.stamp.gone { opacity: 0; }

.hand { position: absolute; left: 0; top: 0; z-index: 11; width: calc(var(--cell) * .46); height: calc(var(--cell) * .46); margin: calc(var(--cell) * -.23) 0 0 calc(var(--cell) * -.23); border-radius: 50%; background: var(--red); box-shadow: 0 0 0 calc(var(--cell) * .1) color-mix(in srgb, var(--red) 30%, transparent); pointer-events: none; animation: hand 1.7s ease-in-out infinite; }
/* Марк, арт-директор: фигура и реплика-облачко */
.coach { position: absolute; left: 3%; right: 3%; z-index: 12; display: flex; gap: 8px; align-items: flex-end; }
.coach.at-top { top: 2%; }
.coach.at-bottom { bottom: 2%; }
.coach.dock { top: calc(100% + 14px); bottom: auto; left: 0; right: 0; }
.coach.dock .mentor-fig { width: 96px; height: 96px; }
.coach.out { animation: coach-out .2s ease forwards; }
.mentor-fig { flex: none; width: 78px; height: 78px; margin-bottom: -2px; animation: fig-in .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.mentor-fig .mark { animation: mk-bob 3.4s ease-in-out infinite; transform-origin: 50% 100%; }
.coach.cheer .mentor-fig .mark { animation: mk-jump .5s cubic-bezier(.2, 1.8, .4, 1); }
.say {
  position: relative; flex: 1 1 auto; min-width: 0; max-width: 520px;
  margin-bottom: 14px; padding: 11px 16px 12px;
  background: var(--card); border: 2.5px solid var(--ink); border-radius: 20px 20px 20px 6px;
  transform-origin: 0 100%; animation: say-in .36s .12s cubic-bezier(.2, 1.5, .4, 1) both;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.say::before {
  content: ''; position: absolute; left: -9px; bottom: 9px; width: 14px; height: 14px;
  background: var(--card); border-left: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink);
  transform: rotate(45deg) skew(10deg, 10deg);
}
.say-name { display: block; font: 800 10.5px/1 var(--num); letter-spacing: .07em; text-transform: uppercase; color: var(--red); }
.say p { margin: 6px 0 0; font: 600 16px/1.4 var(--ui); color: var(--ink); }
.say p .rest { visibility: hidden; }
.say-next {
  display: block; margin: 8px 0 -2px auto; padding: 4px 0; border: 0; background: none; cursor: pointer;
  font: 800 11.5px/1 var(--num); letter-spacing: .07em; text-transform: uppercase; color: var(--ink);
}
.say-next.wait { visibility: hidden; }
.say-next::after { content: ' ▸'; color: var(--red); display: inline-block; animation: next-nudge .9s ease-in-out infinite; }

.mark { display: block; width: 100%; height: 100%; overflow: visible; }
.mk-body, .mk-neck, .mk-hair { fill: #111110; }
.mk-head { fill: #F2C7A5; }
.mk-brow { stroke: #111110; stroke-width: 2.4; stroke-linecap: round; fill: none; transition: transform .25s ease; transform-box: fill-box; transform-origin: center; }
.mk-eye { fill: #111110; transform-box: fill-box; transform-origin: center; animation: mk-blink 4.2s infinite; }
.mk-happy-eyes path { stroke: #111110; stroke-width: 2.2; stroke-linecap: round; fill: none; }
.mk-glasses circle, .mk-glasses path { fill: none; stroke: #FF3B1F; stroke-width: 2.3; }
.mk-glasses circle { fill: rgba(255, 255, 255, .28); }
.mk-mouth, .mk-happy-eyes { display: none; }
.mk-mouth.calm { stroke: #111110; stroke-width: 2.2; stroke-linecap: round; fill: none; }
.mk-mouth.happy, .mk-mouth.open, .mk-mouth.oh { fill: #111110; }
.mood-calm .mk-mouth.calm, .mood-smug .mk-mouth.calm { display: block; }
.mood-happy .mk-mouth.happy, .mood-happy .mk-happy-eyes { display: block; }
.mood-happy .mk-eyes { display: none; }
.mood-wow .mk-mouth.oh { display: block; }
.mood-wow .mk-brow { transform: translateY(-1.4px); }
.mood-smug .mk-brow.l { transform: translateY(-1.6px) rotate(-8deg); }
.mood-smug .mk-brow.r { transform: translateY(.8px) rotate(6deg); }
.talking .mk-mouth { display: none !important; }
.talking .mk-mouth.open { display: block !important; animation: mk-talk .24s steps(1) infinite; }
.talking .mk-mouth.calm { display: block !important; animation: mk-talk .24s steps(1) infinite reverse; }
.talking.mood-happy .mk-eyes { display: none; }
.spot { position: relative; z-index: 20; box-shadow: 0 0 0 4px var(--yellow), 0 0 0 7px var(--rule) !important; animation: spot 1.1s ease-in-out infinite; }
.toast { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 14; display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; background: var(--ink); color: var(--bg); font: 700 13.5px/1.35 var(--ui); pointer-events: none; animation: coach-in .3s cubic-bezier(.2, 1.3, .4, 1) both; transition: opacity .35s ease, transform .35s ease; }
.toast .avatar { width: 28px; height: 28px; font-size: 10px; background: var(--bg); color: var(--ink); }
.toast.gone { opacity: 0; transform: translateY(-6px); }

/* ============ Модалки ============ */

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--bg) 70%, transparent); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s ease; }
.modal.open { opacity: 1; }
.modal-card {
  width: min(600px, 100%);
  max-height: calc(var(--vh) - 32px);
  overflow-y: auto;
  padding: 30px 32px 32px;
  background: var(--card);
  border: 3px solid var(--rule);
  border-top: 12px solid var(--red);
  transform: translateY(12px);
  transition: transform .28s cubic-bezier(.2, 1.2, .4, 1);
}
.modal.open .modal-card { transform: none; }
.modal-title { margin: 8px 0 16px; font: 900 clamp(30px, 5vw, 46px)/.98 var(--display); letter-spacing: -.045em; }
.modal h3 { margin: 22px 0 10px; font: 700 11px/1 var(--num); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.modal p { margin: 0 0 10px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.modal-actions.stack { flex-direction: column; }
.modal-actions.stack .btn { width: 100%; }
.quote { margin: 0; font: 700 clamp(20px, 3.2vw, 26px)/1.25 var(--ui); letter-spacing: -.02em; }
.client-line { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-weight: 700; color: var(--ink-2); }
.client-line .avatar { width: 34px; height: 34px; font-size: 11px; }
.note { margin: 14px 0 0; padding: 12px 14px; background: var(--paper); font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.budget { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 14px 0 4px; font-size: 14px; color: var(--ink-2); }
.budget .kicker { color: var(--red); }
.fact { margin: 16px 0 0; padding: 12px 0 0; border-top: 2px solid var(--rule); font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.fact b { color: var(--ink); }
.mentor-line { display: flex; gap: 6px; align-items: flex-end; margin: 18px 0 0; }
.mentor-line .mentor-fig { width: 58px; height: 58px; }
.mentor-line .say { margin-bottom: 10px; cursor: default; background: var(--paper-2); }
.mentor-line .say::before { background: var(--paper-2); }
.mentor-line .say p { font-size: 15px; }
.mentor-line + .mentor-line { margin-top: 8px; }
.chip.hard { background: var(--red); border-color: var(--red); color: #fff; }
.chip.new { background: var(--blue); border-color: var(--blue); color: #fff; }

.brief-grid { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; }
.big-num { margin: 0; font: 900 64px/.9 var(--display); letter-spacing: -.05em; }
.brief-goals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 2px solid var(--rule); }
.brief-goals li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.brief-goals .gl { grid-row: auto; width: 36px; height: 36px; font-size: calc(18px * var(--fs, .8)); }
.brief-goals .ok { margin-left: auto; font: 700 13px/1 var(--num); white-space: nowrap; }
.brief-goals .ok.done { color: var(--green); }
.brief-fonts { display: flex; flex-wrap: wrap; gap: 8px; }
.bf { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; background: var(--paper); font-size: 12.5px; font-weight: 700; }
.bf b { width: 32px; height: 32px; display: grid; place-items: center; background: var(--bg); color: var(--fg); font-family: var(--font); font-weight: var(--fw); font-size: calc(17px * var(--fs)); }

.pre { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--rule); border-left: 2px solid var(--rule); }
.pre-b { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; border: 0; border-right: 2px solid var(--rule); border-bottom: 2px solid var(--rule); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.pre-ico svg { width: 30px; height: 30px; }
.pre-name { font-size: 13px; font-weight: 800; line-height: 1.2; }
.pre-cost { font: 700 12px/1 var(--num); color: var(--ink-2); }
.pre-b.on { background: var(--yellow); color: #111110; }
.pre-b.on .pre-cost { color: #111110; }
.pre-b.on .pre-cost::before { content: '✓ '; }

.big-stars { display: flex; gap: 6px; margin: 4px 0 18px; font-size: 54px; line-height: 1; }
.big-stars span { color: var(--line-2); }
.big-stars span.on { color: var(--red); animation: star-in .5s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: calc(var(--i) * 180ms + 150ms); }
.rewards { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.rw { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 2px solid var(--rule); border-radius: 999px; font: 800 14px/1 var(--ui); }
.rw svg { width: 20px; height: 20px; }
.rw .st { font-style: normal; color: var(--red); }
.rw.hot { background: var(--red); border-color: var(--red); color: #fff; }
.coffee-note { display: flex; align-items: center; gap: 10px; }
.coffee-note svg { width: 28px; height: 28px; flex: none; }
.cups { display: flex; gap: 6px; margin: 4px 0 14px; }
.cup { width: 46px; height: 46px; display: grid; place-items: center; border: 2px solid var(--line-2); opacity: .35; filter: grayscale(1); }
.cup.full { opacity: 1; filter: none; border-color: var(--rule); }
.cup svg { width: 30px; height: 30px; }
.days { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--rule); border-left: 2px solid var(--rule); }
.day-c { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; border-right: 2px solid var(--rule); border-bottom: 2px solid var(--rule); }
.day-c small { font: 700 10px/1 var(--num); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.day-ico svg { width: 30px; height: 30px; }
.day-c b { font-size: 13px; line-height: 1.2; font-weight: 800; }
.day-c.past { opacity: .35; }
.day-c.today { background: var(--yellow); color: #111110; }
.day-c.today small { color: #111110; }
.day-c:last-child { grid-column: span 2; }
.tasks { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--rule); }
.task-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tr-body { flex: 1; min-width: 0; }
.tr-body b { display: block; font-size: 15px; line-height: 1.3; font-weight: 800; }
.tr-body small { display: block; margin-top: 5px; font: 700 11px/1 var(--num); color: var(--ink-2); }
.tbar { display: block; height: 6px; margin-top: 8px; background: var(--paper); overflow: hidden; }
.tbar i { display: block; height: 100%; background: var(--ink); }
.task-row.done .tbar i { background: var(--red); }
.tr-ok { font: 900 22px/1 var(--display); color: var(--green); }
.bonus-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px; background: var(--paper); }
.bonus-row svg { width: 34px; height: 34px; flex: none; }
.bonus-row span { flex: 1; }
.bonus-row b { display: block; font-size: 15px; font-weight: 800; }
.bonus-row small { display: block; font-size: 12.5px; color: var(--ink-2); }
.chest-open { display: grid; place-items: center; margin: 6px 0 12px; }
.chest-open svg { width: 100px; height: 100px; animation: chest-pop .7s cubic-bezier(.2, 1.6, .4, 1) both; }
.chest-open.closed svg { animation: none; opacity: .8; }
.gifts { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--rule); }
.gifts li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 700; }
.gifts svg { flex: none; width: 28px; height: 28px; }
.gifts .gi { flex: none; width: 28px; height: 28px; display: grid; place-items: center; font: 900 16px/1 var(--display); color: var(--red); }
.rank-big { margin: 4px 0 6px; font: 900 clamp(48px, 10vw, 84px)/.9 var(--display); letter-spacing: -.06em; color: var(--red); transform-origin: left center; animation: rank-in 650ms cubic-bezier(.2, 1.4, .4, 1) both; }
.reveal { perspective: 900px; display: grid; place-items: center; margin: 8px 0 4px; }
.reveal-card { position: relative; width: min(300px, 100%); min-height: 260px; transform-style: preserve-3d; animation: reveal-flip 1s .35s cubic-bezier(.3, 1.3, .5, 1) both; }
.reveal-card > * { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.reveal-card .back { display: grid; place-items: center; background: var(--ink); color: var(--bg); font: 900 110px/1 var(--display); }
.reveal-card .fcard { transform: rotateY(180deg); border: 3px solid var(--rule); }

.legend, .how { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.how li, .legend li { display: flex; align-items: center; gap: 14px; }
.how p, .legend p { margin: 0; font-size: 14.5px; line-height: 1.45; }
.how-demo { display: flex; gap: 2px; flex: none; }
.legend li.locked { color: var(--muted); }
.mini { --cell: 48px; position: relative; flex: none; width: var(--cell); height: var(--cell); }
.mini.sm { --cell: 38px; }
.mini.ghost { display: grid; place-items: center; background: none; border: 2px dashed var(--line-2); font: 900 20px/1 var(--display); color: var(--line-2); }

.settings-list { display: flex; flex-direction: column; border-top: 2px solid var(--rule); }
.switch { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch.disabled { cursor: not-allowed; opacity: .55; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { flex: none; position: relative; width: 46px; height: 26px; margin-top: 1px; border-radius: 99px; background: var(--line-2); transition: background .2s; }
.switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--card); transition: transform .2s; }
.switch input:checked + .switch-ui { background: var(--red); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); }
.switch b { display: block; font-weight: 800; }
.switch small { display: block; margin-top: 2px; color: var(--ink-2); font-size: 13px; line-height: 1.4; }

/* Мой шрифт: выбор характера, имя, постер */
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); border-top: 2px solid var(--rule); border-left: 2px solid var(--rule); }
.opt { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 14px; border: 0; border-right: 2px solid var(--rule); border-bottom: 2px solid var(--rule); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.opt:hover { background: var(--yellow); color: #111110; }
.opt .prev { font: 800 42px/1 'Recursive', sans-serif; }
.opt b { font-size: 15px; font-weight: 800; }
.opt small { font-size: 12.5px; color: inherit; opacity: .75; }
.name-input { width: 100%; margin-top: 8px; padding: 14px 16px; border: 3px solid var(--rule); border-radius: 0; background: var(--bg); color: var(--ink); font: 900 26px/1 var(--display); letter-spacing: -.03em; }
.name-input:focus { outline: 0; border-color: var(--red); }
.sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sugg button { padding: 7px 12px; border: 2px solid var(--rule); border-radius: 999px; background: none; color: var(--ink); font: 700 13px/1 var(--ui); cursor: pointer; }
.poster { margin: 4px 0 0; padding: 20px; background: var(--ink); color: var(--bg); }
.poster .pn { font: 900 clamp(28px, 6vw, 44px)/1 var(--display); letter-spacing: -.04em; color: var(--yellow); }
.poster .pa { margin-top: 12px; font: 800 clamp(26px, 6vw, 40px)/1.05 'Recursive', sans-serif; font-variation-settings: var(--my); word-break: break-all; }
.glyph-big { display: grid; place-items: center; margin: 4px 0 8px; }
.glyph-big span { font: 800 170px/1 'Recursive', sans-serif; font-variation-settings: var(--my); animation: glyph-in .9s cubic-bezier(.2, 1.5, .4, 1) both; }

.ach-toast { position: fixed; left: 50%; top: 14px; z-index: 90; translate: -50% 0; display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 24px); padding: 10px 18px 10px 10px; background: var(--ink); color: var(--bg); animation: ach-in .45s cubic-bezier(.2, 1.4, .4, 1) both; transition: opacity .35s ease, transform .35s ease; pointer-events: none; }
.ach-toast.gone { opacity: 0; transform: translateY(-12px); }
.ach-toast .ach-star { width: 38px; height: 38px; background: var(--red); color: #fff; }
.ach-toast small { display: block; font: 700 10px/1.2 var(--num); letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); }
.ach-toast b { display: block; font: 900 16px/1.2 var(--display); letter-spacing: -.02em; }
.ach-toast em { display: block; font-style: normal; font-size: 12.5px; opacity: .75; }

.confetti { position: fixed; inset: 0; z-index: 60; overflow: hidden; pointer-events: none; }
.confetti span { position: absolute; top: -60px; font-family: var(--font); font-weight: var(--fw); color: var(--fg); animation: confetti var(--d) var(--delay) cubic-bezier(.3, .1, .6, 1) forwards; }

.rotate-hint { display: none; }
@media (orientation: landscape) and (max-height: 500px) and (hover: none) {
  body.playing .rotate-hint { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: var(--bg); text-align: center; }
  .rotate-hint > div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
  .rotate-hint b { font: 900 26px/1.1 var(--display); letter-spacing: -.03em; }
  .rotate-hint span { color: var(--ink-2); }
  .rotate-icon { width: 40px; height: 64px; margin-bottom: 10px; border: 3px solid var(--ink); border-radius: 8px; animation: rotate-phone 1.8s ease-in-out infinite; }
}

/* ============ Первый запуск: титульный экран ============ */

.intro { min-height: var(--vh); display: flex; }
.intro-in { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: calc(20px + env(safe-area-inset-top)) var(--gut) 48px; display: flex; flex-direction: column; }
.intro-top { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 3px solid var(--rule); animation: intro-fade .5s .1s both; }
.intro-logo { display: flex; flex-wrap: wrap; align-items: flex-end; margin: auto 0 0; padding: 5vh 0 .06em; font: 900 clamp(84px, min(15.4vw, 34vh), 232px)/.82 var(--display); letter-spacing: -.065em; }
.il-row { display: flex; align-items: flex-end; }
.il-row + .il-row { margin-left: .04em; }
.il-row span { display: inline-block; animation: letter-drop .6s calc(.15s + var(--i) * .07s) cubic-bezier(.3, 1.5, .5, 1) both; }
.il-row i { flex: none; width: .5em; height: .5em; margin: 0 .02em .06em .06em; border-radius: 50%; background: var(--red); animation: dot-in .55s 1s cubic-bezier(.2, 1.8, .4, 1) both; }
.intro-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-top: 28px; padding-top: 28px; border-top: 3px solid var(--rule); animation: intro-fade .5s 1.2s both; }
.intro-copy { display: flex; flex-direction: column; align-items: flex-start; }
.intro-demo { --cell: clamp(58px, 7vw, 104px); flex: none; position: relative; width: calc(var(--cell) * 4); height: var(--cell); }
.intro-demo .it { position: absolute; left: 0; top: 0; width: var(--cell); height: var(--cell); }
.intro-demo .face { font-size: calc(var(--cell) * .44 * var(--fs, 1)); letter-spacing: -.02em; }
.it.d1 { animation: demo-a 3.4s 1.7s ease-in-out infinite; }
.it.d2 { transform: translateX(var(--cell)); animation: demo-b 3.4s 1.7s ease-in-out infinite; }
.it.d3 { left: calc(var(--cell) * 2); animation: demo-pop 3.4s 1.7s ease-in-out infinite; }
.it.d4 { left: calc(var(--cell) * 3); animation: demo-pop 3.4s 1.7s ease-in-out infinite; }
.it-hand { position: absolute; left: 0; top: 0; z-index: 2; width: calc(var(--cell) * .36); height: calc(var(--cell) * .36); margin: calc(var(--cell) * -.18) 0 0 calc(var(--cell) * -.18); border-radius: 50%; background: var(--red); box-shadow: 0 0 0 calc(var(--cell) * .08) color-mix(in srgb, var(--red) 30%, transparent); opacity: 0; animation: demo-hand 3.4s 1.7s ease-in-out infinite; }
.intro-sub { margin: 0; font: 800 clamp(22px, 2.4vw, 34px)/1.15 var(--display); letter-spacing: -.03em; max-width: 20ch; }
#btn-intro { margin-top: 24px; animation: intro-up .5s 1.55s cubic-bezier(.2, 1.4, .4, 1) both; }
.intro.leaving .intro-in { animation: intro-leave .42s ease forwards; }

@keyframes letter-drop { 0% { transform: translateY(-60%) rotate(-8deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes dot-in { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes intro-fade { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes intro-up { 0% { opacity: 0; transform: translateY(16px); } 100% { opacity: 1; transform: none; } }
@keyframes intro-leave { 100% { opacity: 0; transform: translateY(-24px); } }
@keyframes demo-a {
  0%, 14% { transform: translateX(0); scale: 1; opacity: 1; }
  26%, 34% { transform: translateX(var(--cell)); scale: 1; opacity: 1; }
  40% { transform: translateX(var(--cell)); scale: 1.14; opacity: 1; }
  48%, 58% { transform: translateX(var(--cell)); scale: 0; opacity: 0; }
  59% { transform: translateX(0); scale: .6; opacity: 0; }
  70%, 100% { transform: translateX(0); scale: 1; opacity: 1; }
}
@keyframes demo-b {
  0%, 14% { transform: translateX(var(--cell)); opacity: 1; }
  26%, 55% { transform: translateX(0); opacity: 1; }
  58% { transform: translateX(0); opacity: 0; }
  59% { transform: translateX(var(--cell)); opacity: 0; }
  70%, 100% { transform: translateX(var(--cell)); opacity: 1; }
}
@keyframes demo-pop {
  0%, 34% { scale: 1; opacity: 1; }
  40% { scale: 1.14; opacity: 1; }
  48%, 58% { scale: 0; opacity: 0; }
  70%, 100% { scale: 1; opacity: 1; }
}
@keyframes demo-hand {
  0%, 2% { transform: translate(calc(var(--cell) * .5), calc(var(--cell) * .55)) scale(1.4); opacity: 0; }
  8%, 14% { transform: translate(calc(var(--cell) * .5), calc(var(--cell) * .55)) scale(1); opacity: 1; }
  26% { transform: translate(calc(var(--cell) * 1.5), calc(var(--cell) * .55)) scale(1); opacity: 1; }
  32%, 100% { transform: translate(calc(var(--cell) * 1.5), calc(var(--cell) * .55)) scale(.8); opacity: 0; }
}

/* ============ Подсказки на главной: подсветка, рука, наставник ============ */

.spot-layer { position: fixed; inset: 0; z-index: 45; }
.spot-hole {
  position: fixed; border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 4px var(--yellow), 0 0 0 7px var(--rule), 0 0 0 200vmax color-mix(in srgb, var(--bg) 84%, transparent);
  transition: left .35s cubic-bezier(.2, 1, .3, 1), top .35s cubic-bezier(.2, 1, .3, 1), width .35s cubic-bezier(.2, 1, .3, 1), height .35s cubic-bezier(.2, 1, .3, 1);
  animation: spot-ring 1.2s ease-in-out infinite;
}
.spot-tap { position: fixed; z-index: 2; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 8px color-mix(in srgb, var(--red) 30%, transparent); pointer-events: none; animation: spot-tap 1.2s ease-in-out infinite; }
.spot-coach { position: fixed; left: 16px; right: auto; top: 16px; width: min(460px, calc(100vw - 32px)); z-index: 3; }
.spot-layer.nudge .spot-tap { animation: nope .35s ease; }
.reveal-in { animation: reveal-in .7s cubic-bezier(.2, 1, .3, 1) both; }
@keyframes spot-ring {
  0%, 100% { box-shadow: 0 0 0 4px var(--yellow), 0 0 0 7px var(--rule), 0 0 0 200vmax color-mix(in srgb, var(--bg) 84%, transparent); }
  50% { box-shadow: 0 0 0 8px var(--yellow), 0 0 0 11px var(--rule), 0 0 0 200vmax color-mix(in srgb, var(--bg) 84%, transparent); }
}
@keyframes spot-tap { 0%, 100% { transform: scale(1); } 45% { transform: scale(.7); box-shadow: 0 0 0 16px color-mix(in srgb, var(--red) 0%, transparent); } }
@keyframes reveal-in { 0% { opacity: 0; transform: translateY(22px); clip-path: inset(0 0 100% 0); } 100% { opacity: 1; transform: none; clip-path: inset(0 0 0 0); } }

/* Пока открыт только бриф — он на всю ширину */
.hero.solo { grid-template-columns: 1fr; }
.hero.solo .bh { border-right: 0; }

/* Первый бриф: на поле только задача и правки */
body.ftue #btn-restart, body.ftue #stat-score, body.ftue .specimen-block, body.ftue .statusbar { display: none !important; }

/* ============ Раскладка по ширине ============ */

@media (max-width: 1180px) {
  .game { --board: min(600px, calc(var(--vh) - 140px), calc(100vw - 390px)); }
  .layout { grid-template-columns: var(--board) 280px; grid-template-areas: "board hud" "board side"; gap: 24px 36px; align-content: start; }
  .chapters { grid-template-columns: repeat(3, 1fr); }
  .ch:nth-child(3) { border-right: 0; }
  .ch:nth-child(n + 4) { border-top: 2px solid var(--rule); }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --gut: 16px; }
  .menu { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .top { grid-template-columns: 1fr auto; gap: 8px; padding: calc(12px + env(safe-area-inset-top)) 0 12px; border-bottom-width: 2px; }
  .tabs { display: none; }
  .logo { font-size: 24px; }
  .res { gap: 0; }
  .res-i { padding: 0 7px; font-size: 13px; }
  .res-i small { display: none; }
  .res .icon-btn { width: 36px; height: 36px; margin-left: 4px; }
  .hero { grid-template-columns: 1fr; border-bottom-width: 2px; }
  .bh { padding: 22px 0; border-right: 0; border-bottom: 2px solid var(--rule); gap: 0 16px; }
  .bh-num { font-size: 104px; }
  .bh h1 { font-size: 34px; margin-top: 4px; }
  .bh blockquote { font-size: 17px; }
  .bh-play { margin-top: 24px; }
  .btn.play { width: 100%; padding: 18px 24px; font-size: 20px; }
  .bh-play .kicker { display: none; }
  .fp { padding: 22px 0; }
  .fp h2 { font-size: 28px; }
  .day { grid-auto-flow: row; grid-template-columns: repeat(var(--n, 3), 1fr); grid-auto-columns: auto; border-bottom-width: 2px; }
  .dblock { flex-direction: column; align-items: flex-start; padding: 14px 12px; gap: 6px; }
  .dblock + .dblock { border-left-width: 2px; }
  .dblock b { font-size: 28px; }
  .dblock.off b { font-size: 12px; }
  .sec-head h2 { font-size: 34px; }
  .chapters { grid-template-columns: 1fr; border-top-width: 2px; }
  .ch { border-right: 0 !important; border-top: 0 !important; border-bottom: 2px solid var(--rule); padding: 16px 0; }
  .ch.locked .lv { display: none; }
  .ch.locked h3 { margin-bottom: 4px; }
  .lv.cur { margin: 0 -16px; padding: 10px 16px; }
  .ft { grid-template-columns: 1fr; }
  .ft-main { padding: 20px 0; border-right: 0; border-bottom: 2px solid var(--rule); }
  .ft-side { padding: 20px 0; }
  .ft .glyphs { grid-template-columns: repeat(7, 1fr); }
  .shop-grid { grid-template-columns: 1fr; }
  .shop-item { flex-direction: row; align-items: center; }
  .shop-item .btn { align-self: center; margin: 0 0 0 auto; }
  .si-body b { font-size: 18px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: var(--ink);
  }
  .tabbar button { padding: 10px 0; border: 0; border-radius: 999px; background: none; color: #8E8B83; font: 800 12px/1 var(--ui); cursor: pointer; }
  .tabbar button.on { background: var(--bg); color: var(--ink); }
  body.playing .tabbar { display: none; }
  .menu.no-tabs { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
  .hero.solo .bh { border-bottom: 0; }
  .intro-top { border-bottom-width: 2px; }
  .intro-top .kicker:last-child { display: none; }
  .intro-foot { flex-direction: column-reverse; align-items: stretch; gap: 26px; border-top-width: 2px; }
  .intro-copy { align-items: stretch; }
  .intro-demo { --cell: min(76px, calc((100vw - 32px) / 4)); }
  .intro-logo { font-size: min(29vw, 19vh); padding-top: 0; }
}

@media (max-width: 759px) {
  /* Уровень на телефоне: пауза, цели и правки сверху, поле, инструменты — и всё */
  .game { --board: min(560px, calc(100vw - 20px), max(300px, calc(var(--vh) - 200px))); }
  .topbar, .side, .statusbar, .crop { display: none; }
  .layout { grid-template-columns: minmax(0, var(--board)); grid-template-areas: "hud" "board"; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 10px 16px; }
  .hud { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "pause goals moves" "bar bar bar"; align-items: center; gap: 4px 10px; }
  #btn-pause { grid-area: pause; display: grid; width: 44px; height: 44px; background: var(--ink); color: var(--bg); border-color: var(--ink); }
  #goals-block { grid-area: goals; min-width: 0; }
  .hud .block-title { display: none; }
  .goals { flex-direction: row; flex-wrap: nowrap; gap: 10px; border-top: 0; overflow: hidden; }
  .goal { flex: 1 1 0; display: flex; align-items: center; gap: 6px; min-width: 0; padding: 0; border: 0; }
  .goal .gname, .goal .gbar { display: none; }
  .goal .gl { width: 32px; height: 32px; font-size: calc(16px * var(--fs, .8)); }
  .goal .gcount { font-size: 17px; }
  .stats { grid-area: moves; display: flex; flex-direction: column; align-items: flex-end; border: 0; }
  .stat { padding: 0; border: 0; text-align: right; }
  .stat .label { justify-content: flex-end; font-size: 9px; }
  .stat .value { margin-top: 2px; font-size: 34px; }
  .stats .stat:last-child .label { display: none; }
  .stats .stat:last-child .value { margin: 0; font: 700 11px/1.2 var(--num); color: var(--ink-2); letter-spacing: 0; }
  .stats .stat:last-child .value small { font-size: 10px; margin-left: 3px; }
  .stars-bar { grid-area: bar; height: 6px; margin: 6px 0 2px; }
  .t-comic .face::after { display: none; }
  .t-comic .glyph { transform: none; }
  .boosters { justify-content: center; gap: 8px; margin-top: 12px; }
  .booster { padding: 7px 10px 7px 7px; gap: 6px; font-size: 12.5px; }
  .booster svg { width: 22px; height: 22px; }
  .mentor-fig { width: 62px; height: 62px; }
  .coach.dock .mentor-fig { width: 76px; height: 76px; }
  .say { padding: 9px 13px 10px; margin-bottom: 10px; }
  .say p { font-size: 15px; }
  .mentor-line .mentor-fig { width: 50px; height: 50px; }
  .avatar.mentor { width: 34px; height: 34px; font-size: 11px; }

  .modal-card { padding: 22px 18px 24px; border-top-width: 10px; }
  .brief-grid { grid-template-columns: 1fr; gap: 0; }
  .brief-fonts-wrap { display: none; }
  .big-num { font-size: 48px; }
  .opts { grid-template-columns: 1fr; }
  .opt { flex-direction: row; align-items: center; }
  .opt .prev { font-size: 32px; width: 80px; }
  .glyph-big span { font-size: 130px; }
}

/* ============ Анимации ============ */

@keyframes pop { 0% { transform: scale(1); } 30% { transform: scale(1.18) rotate(-4deg); filter: brightness(1.12); } 100% { transform: scale(0) rotate(30deg); opacity: 0; } }
@keyframes born { 0% { transform: scale(.3) rotate(-20deg); } 100% { transform: scale(1); } }
@keyframes land { 0% { transform: translateY(4%) scale(1.06, .86); } 100% { transform: none; } }
@keyframes nudge { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg) scale(1.06); } 75% { transform: rotate(8deg) scale(1.06); } }
@keyframes nope { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-9%); } 75% { transform: translateX(9%); } }
@keyframes throb { 0%, 100% { transform: scale(1); } 50% { transform: scale(.93); } }
@keyframes wobble { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(3deg); } }
@keyframes infect { 0% { transform: rotateY(0); } 50% { transform: rotateY(90deg) scale(.9); } 100% { transform: rotateY(0) rotate(-4deg); } }
@keyframes morph { from { font-variation-settings: 'wght' 300, 'CASL' 0, 'MONO' 0, 'slnt' 0; } to { font-variation-settings: 'wght' 1000, 'CASL' 1, 'MONO' 1, 'slnt' -15; } }
@keyframes shake { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-5px, 3px); } 40% { transform: translate(5px, -3px); } 60% { transform: translate(-3px, -2px); } 80% { transform: translate(3px, 2px); } }
@keyframes beam-x { 0% { transform: scaleX(.05); opacity: 1; } 35% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes beam-y { 0% { transform: scaleY(.05); opacity: 1; } 35% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@keyframes track { 0% { letter-spacing: -.2em; } 100% { letter-spacing: .8em; } }
@keyframes lead { 0% { letter-spacing: -.3em; } 100% { letter-spacing: .5em; } }
@keyframes ring { 0% { transform: scale(.2); opacity: 1; } 60% { opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes fade-out { 0%, 55% { opacity: 1; } 100% { opacity: 0; } }
@keyframes var-burst { 0% { font-variation-settings: 'wght' 300, 'CASL' 0, 'MONO' 0; transform: scale(.6); opacity: 0; } 25% { opacity: .95; } 100% { font-variation-settings: 'wght' 1000, 'CASL' 1, 'MONO' 1; transform: scale(1.12); opacity: .9; } }
@keyframes fly { to { transform: translate(calc(var(--dx) * var(--cell)), calc(var(--dy) * var(--cell))) rotate(var(--rot)) scale(.5); opacity: 0; } }
@keyframes rise { 0% { transform: translateY(10px) scale(.8); opacity: 0; } 15% { transform: none; opacity: 1; } 70% { opacity: 1; } 100% { transform: translateY(calc(var(--cell) * -.8)); opacity: 0; } }
@keyframes combo { 0% { transform: scale(.3) rotate(-8deg); opacity: 0; } 18% { transform: scale(1.05) rotate(-3deg); opacity: 1; } 75% { transform: scale(1) rotate(-3deg); opacity: 1; } 100% { transform: scale(.96) translateY(-20px) rotate(-3deg); opacity: 0; } }
@keyframes stamp { 0% { transform: rotate(-10deg) scale(2.4); opacity: 0; } 60% { opacity: 1; } 100% { transform: rotate(-10deg) scale(1); opacity: 1; } }
@keyframes star-in { 0% { transform: scale(0) rotate(-60deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes ping { 0% { transform: scale(.97); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes hand {
  0% { transform: translate(calc((var(--ac) + .5) * var(--cell)), calc((var(--ar) + .5) * var(--cell))) scale(1.3); opacity: 0; }
  15% { transform: translate(calc((var(--ac) + .5) * var(--cell)), calc((var(--ar) + .5) * var(--cell))) scale(1); opacity: 1; }
  60% { transform: translate(calc((var(--bc) + .5) * var(--cell)), calc((var(--br) + .5) * var(--cell))) scale(1); opacity: 1; }
  85%, 100% { transform: translate(calc((var(--bc) + .5) * var(--cell)), calc((var(--br) + .5) * var(--cell))) scale(.8); opacity: 0; }
}
@keyframes coach-in { 0% { transform: translateY(12px) scale(.96); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes coach-out { 100% { opacity: 0; transform: translateY(10px); } }
@keyframes fig-in { 0% { transform: translateY(40%) scale(.7); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes say-in { 0% { transform: scale(.4) rotate(-4deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes mk-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-1.5px) rotate(-1.2deg); } }
@keyframes mk-jump { 0% { transform: none; } 40% { transform: translateY(-14%) rotate(-4deg); } 100% { transform: none; } }
@keyframes mk-blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.12); } }
@keyframes mk-talk { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }
@keyframes next-nudge { 0%, 100% { transform: none; } 50% { transform: translateX(3px); } }
@keyframes spot { 0%, 100% { box-shadow: 0 0 0 4px var(--yellow), 0 0 0 7px var(--rule); } 50% { box-shadow: 0 0 0 8px var(--yellow), 0 0 0 11px var(--rule); } }
@keyframes aim-wiggle { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(2.5deg); } }
@keyframes spawn-in { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes rewind { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(-180deg) scale(.6); } 100% { transform: rotate(-360deg) scale(1); } }
@keyframes reveal-flip { 0% { transform: rotateY(0) scale(.9); } 100% { transform: rotateY(180deg) scale(1); } }
@keyframes rank-in { 0% { transform: scale(2) rotate(-8deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: rotate(-2deg); opacity: 1; } }
@keyframes res-bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes ready-pulse { 0%, 100% { filter: none; } 50% { filter: brightness(1.08) saturate(1.15); } }
@keyframes nudge-play { 0%, 100% { transform: none; } 20% { transform: translateY(-5px) scale(1.02); } 40% { transform: none; } 60% { transform: translateY(-3px); } }
@keyframes chest-pop { 0% { transform: scale(.3) rotate(-15deg); } 100% { transform: none; } }
@keyframes blink { 50% { background: #FFE27A; } }
@keyframes glyph-in { 0% { transform: scale(.2) rotate(-20deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes ach-in { 0% { transform: translateY(-30px) scale(.9); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes confetti { to { transform: translate(var(--x), calc(100vh + 120px)) rotate(var(--r)); } }
@keyframes rotate-phone { 0%, 20% { transform: rotate(-90deg); } 60%, 100% { transform: rotate(0); } }

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