/* «После точки» — тёмная игровая тема. Цвета типов файлов задаются в data.js (--c, --d, --ink). */

:root {
  --bg: #0d0a26;
  --panel: #1a1546;
  --panel-2: #231d5a;
  --panel-3: #2d266e;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #f5f3ff;
  --muted: #b6afe2;
  --dim: #8079b4;
  --violet: #7c5cff;
  --violet-d: #5232d4;
  --pink: #ff4fd8;
  --cyan: #3de0ff;
  --gold: #ffd23f;
  --gold-d: #d39a00;
  --good: #2fe08a;
  --good-d: #12a35d;
  --bad: #ff4d6a;
  --bad-d: #c62a47;
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Unbounded', 'Nunito', system-ui, sans-serif;
  /* Расширения файлов — моноширинным: в Unbounded жирная «j» похожа на «i» (.jpg читалось как .ipg). */
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --out: cubic-bezier(.2, .8, .2, 1);
  --cw: clamp(148px, min(46vw, 30vh), 214px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
h1, h2, p { margin: 0; }
.ym-hide-content { }

/* ---------- Фон ---------- */

.bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(60% 50% at 12% -5%, rgba(124, 92, 255, .5), transparent 70%),
    radial-gradient(45% 40% at 100% 18%, rgba(61, 224, 255, .2), transparent 70%),
    radial-gradient(60% 50% at 50% 112%, rgba(255, 79, 216, .28), transparent 70%);
}
.bg span {
  position: absolute; font-family: var(--mono); font-weight: 800; color: rgba(255, 255, 255, .05);
  animation: drift var(--dur) ease-in-out var(--del) infinite alternate; white-space: nowrap;
}
@keyframes drift { from { transform: translate(0, 0) rotate(-6deg); } to { transform: translate(46px, -70px) rotate(6deg); } }

#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 60; pointer-events: none; }
#app { position: relative; z-index: 1; min-height: 100vh; }

.screen {
  width: 100%; max-width: 760px; margin: 0 auto; padding: 8px 16px 40px;
  animation: screenIn .28s var(--out) both;
}
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Кнопки ---------- */

.btn3d {
  --c: var(--violet); --d: var(--violet-d); --ink: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 22px; border: 0; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 60%), var(--c);
  color: var(--ink); font-weight: 900; font-size: 17px; letter-spacing: .01em;
  box-shadow: 0 5px 0 var(--d), 0 12px 24px rgba(0, 0, 0, .3);
  transition: transform .12s ease-out, box-shadow .12s ease-out, filter .15s ease-out, opacity .15s;
}
.btn3d svg { width: 20px; height: 20px; }
.btn3d:hover:not(:disabled) { filter: brightness(1.08); }
.btn3d:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--d), 0 6px 14px rgba(0, 0, 0, .3); }
.btn3d:disabled { opacity: .45; filter: grayscale(.4); }
.btn3d.big { min-height: 58px; font-size: 19px; padding: 14px 28px; }
.btn3d.red { --c: var(--bad); --d: var(--bad-d); }
.btn3d.wide, .btn.wide { width: 100%; }
.btn3d.sm { min-height: 40px; padding: 8px 14px; font-size: 15px; border-radius: 12px; box-shadow: 0 4px 0 var(--d); }
.btn3d kbd, .chip kbd { font: 700 11px var(--font); padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .2); opacity: .8; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 10px 18px; border: 0; border-radius: 14px;
  background: var(--panel-2); color: var(--text); font-weight: 800;
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: transform .12s ease-out, background-color .15s ease-out;
}
.btn:hover { background: var(--panel-3); }
.btn:active { transform: scale(.96); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.btn.sm { min-height: 40px; padding: 8px 14px; font-size: 14px; border-radius: 12px; }

.iconbtn {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 0; border-radius: 14px; background: rgba(255, 255, 255, .07); color: var(--text);
  transition: background-color .15s, transform .12s;
}
.iconbtn svg { width: 22px; height: 22px; }
.iconbtn:hover { background: rgba(255, 255, 255, .13); }
.iconbtn:active { transform: scale(.96); }

.linkbtn {
  display: inline-flex; align-items: center; gap: 8px; margin: 18px auto 0; padding: 10px 14px;
  border: 0; border-radius: 12px; background: none; color: var(--cyan); font-weight: 800;
}
.linkbtn svg { width: 18px; height: 18px; }
.linkbtn:hover { background: rgba(61, 224, 255, .08); }

.chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 8px 16px; border: 0; border-radius: 14px;
  background: var(--panel-3); color: var(--text); font-weight: 900; font-size: 16px;
  box-shadow: 0 4px 0 #17123f, inset 0 0 0 1px var(--line-2);
  transition: transform .12s ease-out, box-shadow .12s, background-color .15s;
}
.chip:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #17123f, inset 0 0 0 1px var(--line-2); }
.chip:disabled { opacity: .35; }
.chip.on { background: var(--violet); box-shadow: 0 4px 0 var(--violet-d), inset 0 0 0 2px rgba(255, 255, 255, .5); }
.chip.allin { background: linear-gradient(135deg, #ff8a3d, #ff4fd8); box-shadow: 0 4px 0 #b92f84; }
.coin-ico { width: 20px; height: 20px; flex: none; }
.chip .coin-ico, .buy .coin-ico { width: 18px; height: 18px; }

/* ---------- Верхняя панель ---------- */

.top { display: flex; align-items: center; gap: 10px; max-width: 760px; margin: 0 auto; padding: 12px 16px 6px; }
.top-title { font: 800 clamp(16px, 4.6vw, 20px) var(--display); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.spacer { flex: 1; }
.player {
  display: flex; align-items: center; gap: 10px; min-height: 44px; max-width: 58vw;
  padding: 4px 14px 4px 4px; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .07);
  transition: background-color .15s;
}
.player:hover { background: rgba(255, 255, 255, .12); }
.pname { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ava {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--pink)); color: #fff; font: 800 15px var(--display);
}
.coins {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 14px 4px 8px;
  border-radius: 99px; background: rgba(0, 0, 0, .28); box-shadow: inset 0 0 0 1px rgba(255, 210, 63, .28);
}
.coins .coin-ico { width: 24px; height: 24px; }
.coins .num { font: 800 16px var(--display); font-variant-numeric: tabular-nums; color: var(--gold); }
.coins.bump { animation: bump .4s var(--spring); }
@keyframes bump { 40% { transform: scale(1.12); } }

/* ---------- Кто играет ---------- */

.who { max-width: 480px; padding-top: 6vh; text-align: center; }
.who-logo { display: grid; place-items: center; margin-bottom: 14px; }
.wl-file {
  display: grid; place-items: center; width: 92px; height: 112px; border-radius: 22px;
  background: linear-gradient(160deg, #2c2380, #191354); box-shadow: 0 0 0 2px rgba(124, 92, 255, .6), 0 20px 50px rgba(124, 92, 255, .45);
  font: 900 38px var(--display); color: #fff; animation: float 3.4s ease-in-out infinite;
}
.wl-file span { color: var(--pink); }
.brand { font: 900 clamp(30px, 8vw, 46px) / 1.05 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.brand-dot { color: var(--pink); text-shadow: 0 0 18px rgba(255, 79, 216, .8); margin-right: 2px; }
.tagline { margin-top: 8px; color: var(--muted); font-weight: 700; text-wrap: balance; }
.who-h { margin: 28px 0 12px; font: 800 18px var(--display); }
.plist { display: grid; gap: 10px; text-align: left; }
.pitem { display: flex; gap: 8px; }
.pbtn {
  flex: 1; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border: 0; border-radius: 18px;
  background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .15s, transform .12s;
}
.pbtn:hover { background: var(--panel-2); }
.pbtn:active { transform: scale(.98); }
.pbtn .ava { width: 44px; height: 44px; font-size: 18px; }
.pb-txt { display: grid; min-width: 0; }
.pb-txt b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-txt small { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 700; }
.pb-txt small .coin-ico { width: 15px; height: 15px; }
.pdel { width: 48px; border: 0; border-radius: 16px; background: transparent; color: var(--dim); }
.pdel svg { width: 20px; height: 20px; }
.pdel:hover { color: var(--bad); background: rgba(255, 77, 106, .1); }
.or { margin: 16px 0 4px; color: var(--dim); font-weight: 700; }
.newp { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; text-align: left; }
.newp label { font: 800 16px var(--display); text-align: center; }
.newp-row { display: flex; gap: 10px; min-width: 0; }
.newp-row input { width: 0; } /* поле сжимается под кнопку на узком телефоне */
.newp input, .codeform input, .rename input {
  flex: 1; min-width: 0; min-height: 52px; padding: 10px 16px; border: 0; border-radius: 16px;
  background: #0f0b2e; color: var(--text); font-size: 18px; font-weight: 800;
  box-shadow: inset 0 0 0 2px var(--line-2); transition: box-shadow .15s;
}
.newp input:focus, .codeform input:focus, .rename input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--cyan), 0 0 0 4px rgba(61, 224, 255, .15); }
.newp input::placeholder { color: var(--dim); font-weight: 700; }
.nope { animation: shake .4s; }
.form-err { min-height: 20px; color: #ff8aa0; font-weight: 800; font-size: 14px; text-align: center; }
.who-note { margin-top: 6px; color: var(--dim); font-size: 14px; font-weight: 700; text-wrap: pretty; }
.who-card { margin-top: 18px; padding: 18px; border-radius: 24px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); text-align: left; }
.who-card .who-h { margin: 0 0 4px; text-align: center; }
.who-card .newp { margin-top: 8px; }
.who-card .newp label { font: 700 14px var(--font); color: var(--muted); text-align: left; }
.who-card + .or { margin: 14px 0 -4px; }
.who-flash { margin-top: 16px; padding: 12px 16px; border-radius: 16px; background: rgba(61, 224, 255, .1); color: var(--cyan); font-weight: 800; box-shadow: inset 0 0 0 1px rgba(61, 224, 255, .3); }
.code-input { text-transform: uppercase; letter-spacing: .14em; font-family: var(--mono) !important; text-align: center; }
.code-input::placeholder { letter-spacing: .14em; }

/* Код игрока: после регистрации, в профиле, перед выходом */
.code-intro { display: grid; gap: 14px; }
.bigcode {
  justify-self: center; padding: 14px 22px; border-radius: 18px; background: #0f0b2e; color: var(--cyan);
  font: 800 clamp(28px, 9vw, 40px) var(--mono); letter-spacing: .12em; text-align: center; white-space: nowrap;
  box-shadow: inset 0 0 0 2px rgba(61, 224, 255, .45), 0 0 40px rgba(61, 224, 255, .2); user-select: all;
}
.code-intro .bigcode { animation: bump .6s var(--spring) .2s both; }
.me-head { display: flex; align-items: center; gap: 14px; }
.me-head > div { display: grid; min-width: 0; }
.me-head b { font: 800 20px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-head small { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 700; }
.me-head small .coin-ico { width: 16px; height: 16px; }
.ava.big { width: 56px; height: 56px; font-size: 22px; }
.ava.huge { width: 96px; height: 96px; font-size: 40px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .1), 0 20px 50px rgba(124, 92, 255, .45); }
.codebox { display: grid; gap: 4px; justify-items: center; padding: 16px; border-radius: 18px; background: rgba(0, 0, 0, .25); text-align: center; }
.codebox span { color: var(--muted); font-weight: 800; font-size: 14px; }
.codebox b { font: 800 30px var(--mono); letter-spacing: .12em; color: var(--cyan); user-select: all; }
.codebox small { color: var(--dim); font-weight: 700; text-wrap: pretty; }
.codebox.warn span { color: #ffb067; }

/* Замок после простоя */
.lock { padding-top: 10vh; }
.lock-title { margin-top: 6px; font: 900 clamp(26px, 7vw, 36px) var(--display); text-wrap: balance; }
.lock .newp { margin-top: 20px; }
.lock .newp-row { align-items: center; }
.code-mask { font: 800 22px var(--mono); color: var(--dim); letter-spacing: .1em; }
.lock #ucode { max-width: 150px; }

/* ---------- Главная ---------- */

.home { display: grid; gap: 14px; }
.hero {
  position: relative; display: grid; gap: 14px; padding: 22px; border-radius: 28px;
  background: linear-gradient(160deg, rgba(124, 92, 255, .35), rgba(26, 21, 70, .9) 55%), var(--panel);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 24px 60px rgba(0, 0, 0, .35);
  overflow: hidden;
}
.hero::after {
  content: '.'; position: absolute; right: -10px; top: -78px; font: 900 260px/1 var(--display);
  color: rgba(255, 79, 216, .12); pointer-events: none;
}
.hero .brand { font-size: clamp(30px, 7vw, 44px); }
.hero .tagline { margin-top: -6px; }
.collect { display: grid; gap: 8px; padding: 14px; border-radius: 18px; background: rgba(0, 0, 0, .25); }
.collect-head { display: flex; align-items: baseline; justify-content: space-between; font-weight: 800; color: var(--muted); }
.collect-head b { font: 800 22px var(--display); color: var(--text); font-variant-numeric: tabular-nums; }
.collect-head small { color: var(--dim); font-size: 15px; }
.collect-bar { display: grid; grid-template-columns: repeat(36, 1fr); gap: 3px; }
.collect-bar i { height: 12px; border-radius: 4px; background: rgba(255, 255, 255, .08); }
.collect-bar i.learned { background: var(--c); box-shadow: 0 0 10px var(--c); }
.collect-bar i.learning { background: linear-gradient(0deg, var(--c) 40%, rgba(255, 255, 255, .1) 40%); opacity: .8; }
.collect-bar i.broken { background: var(--bad); opacity: .85; }
.powers { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 3px 10px 3px 8px; border: 0; border-radius: 99px;
  background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); font-weight: 800; font-size: 13px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent);
}
.pchip b { color: var(--text); }
.pnone { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 700; }
.pnone svg { width: 16px; height: 16px; color: var(--gold); }

.cta {
  display: flex; align-items: center; gap: 16px; width: 100%; min-height: 84px; padding: 14px 20px; border: 0; border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, 0) 55%), linear-gradient(120deg, #ff4fd8, #7c5cff 60%, #3d7bff);
  color: #fff; text-align: left; box-shadow: 0 6px 0 #4a2bb8, 0 18px 40px rgba(124, 92, 255, .5);
  transition: transform .12s ease-out, box-shadow .12s ease-out, filter .15s;
  animation: ctaGlow 2.8s ease-in-out infinite;
}
.cta:hover { filter: brightness(1.06); }
.cta:active { transform: translateY(5px); box-shadow: 0 1px 0 #4a2bb8, 0 8px 20px rgba(124, 92, 255, .4); }
.cta-ico { display: grid; place-items: center; width: 54px; height: 54px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.cta-ico svg { width: 26px; height: 26px; margin-left: 3px; }
.cta-txt { display: grid; }
.cta-txt b { font: 900 26px var(--display); letter-spacing: -.01em; }
.cta-txt small { font-weight: 800; opacity: .9; }
@keyframes ctaGlow { 50% { box-shadow: 0 6px 0 #4a2bb8, 0 18px 60px rgba(255, 79, 216, .55); } }

.fixtile {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 0; border-radius: 22px; text-align: left;
  background: linear-gradient(120deg, rgba(255, 77, 106, .3), rgba(255, 77, 106, .1)); color: var(--text);
  box-shadow: inset 0 0 0 2px rgba(255, 77, 106, .55); transition: transform .12s, background-color .15s;
}
.fixtile:active { transform: scale(.98); }
.fix-ico { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 14px; background: var(--bad); color: #fff; }
.fix-ico svg { width: 24px; height: 24px; }
.fix-txt { display: grid; flex: 1; min-width: 0; }
.fix-txt b { font: 800 17px var(--display); }
.fix-txt small { color: #ffb3c0; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fixtile em { font: 900 26px var(--display); font-style: normal; color: #ff8aa0; animation: pulse 1.6s ease-in-out infinite; }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 12px 14px; border: 0; border-radius: 20px;
  background: var(--panel); color: var(--text); text-align: left; box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .12s ease-out, background-color .15s, box-shadow .15s;
}
.tile:hover { background: var(--panel-2); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 50%, transparent); }
.tile:active { transform: scale(.96); }
.tile-ico { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 14px; background: color-mix(in srgb, var(--c) 20%, transparent); color: var(--c); }
.tile-ico svg { width: 24px; height: 24px; }
.tile-txt { display: grid; min-width: 0; }
.tile-txt b { font: 800 15px var(--display); letter-spacing: -.01em; }
.tile-txt small { color: var(--muted); font-weight: 700; font-size: 13px; line-height: 1.25; }
.badge {
  position: absolute; top: -6px; right: -4px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px;
  background: var(--bad); color: #fff; font: 800 13px/24px var(--display); text-align: center;
  box-shadow: 0 0 0 3px var(--bg); animation: pulse 1.4s ease-in-out infinite;
}
.badge[hidden] { display: none; }
@keyframes pulse { 50% { transform: scale(1.12); } }

/* ---------- Раунд ---------- */

.play {
  max-width: 560px; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  padding: 10px 16px 18px; gap: 8px;
}
.phud { display: flex; align-items: center; gap: 10px; }
.pdots { flex: 1; display: flex; gap: 4px; }
.pdots i { flex: 1; height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .1); transition: background-color .25s; }
.pdots i.ok { background: var(--good); box-shadow: 0 0 10px rgba(47, 224, 138, .6); }
.pdots i.no { background: var(--bad); }
.timer { position: relative; flex: 1; height: 30px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.timer-fill { position: absolute; inset: 0; transform-origin: left; background: linear-gradient(90deg, var(--gold), #ff8a3d); }
.timer b { position: relative; display: block; text-align: center; font: 800 15px/30px var(--display); color: #241500; font-variant-numeric: tabular-nums; }
.timer.hurry .timer-fill { background: linear-gradient(90deg, var(--bad), #ff8a3d); }
.timer.hurry { animation: pulse .6s ease-in-out infinite; }

.hudline { display: flex; align-items: center; gap: 8px; min-height: 40px; flex-wrap: wrap; }
.combo {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 12px 4px 8px; border-radius: 99px;
  background: rgba(255, 255, 255, .07); color: var(--muted); transition: background-color .3s, color .3s;
}
.combo .flame { width: 20px; height: 20px; }
.combo b { font: 800 16px var(--display); min-width: 28px; }
.cbar { width: 54px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.cbar i { display: block; height: 100%; background: currentColor; transform-origin: left; transition: transform .3s var(--out); }
.clabel { font-size: 12px; font-weight: 800; opacity: .8; }
.combo.m2 { color: #ffb067; background: rgba(255, 138, 61, .15); }
.combo.m3 { color: #ff7fe6; background: rgba(255, 79, 216, .16); }
.combo.m4 { color: var(--gold); background: rgba(255, 210, 63, .16); box-shadow: 0 0 22px rgba(255, 210, 63, .35); }
.combo.m2 .flame, .combo.m3 .flame, .combo.m4 .flame { animation: flicker .5s ease-in-out infinite alternate; transform-origin: 50% 90%; }
@keyframes flicker { to { transform: scale(1.18) rotate(-4deg); } }
.shields, .fixleft, .score { display: inline-flex; align-items: center; gap: 6px; color: var(--cyan); font-weight: 800; }
.shields svg { width: 20px; height: 20px; }
.shields b { font-family: var(--display); }
.fixleft { color: #ff8aa0; }
.fixleft svg { width: 18px; height: 18px; }
.fixleft b { font-family: var(--display); }
.fixleft span { font-size: 13px; color: var(--muted); }
.score { gap: 8px; color: var(--text); }
.score span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.score b { font: 900 24px var(--display); color: var(--gold); font-variant-numeric: tabular-nums; }
.score small { color: var(--dim); font-weight: 700; }
.score.bump b { animation: bump .35s var(--spring); }
.pw-box { display: inline-flex; gap: 6px; margin-left: auto; }
.pw {
  display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 4px 10px; border: 0; border-radius: 12px;
  background: rgba(255, 210, 63, .14); color: var(--gold); font-weight: 900; font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(255, 210, 63, .35); transition: transform .12s, opacity .15s;
}
.pw svg { width: 18px; height: 18px; }
.pw b { font-family: var(--display); font-size: 12px; padding: 0 5px; border-radius: 6px; background: rgba(0, 0, 0, .25); }
.pw:active:not(:disabled) { transform: scale(.96); }
.pw:disabled { opacity: .35; }

.stage { position: relative; flex: 1; display: grid; place-items: center; min-height: calc(var(--cw) * 1.28 + 12px); perspective: 900px; }
.tip { min-height: 40px; display: grid; place-items: center; text-align: center; color: var(--muted); font-weight: 800; font-size: 15px; text-wrap: balance; }
.hinttip { display: inline-flex; align-items: flex-start; gap: 8px; padding: 8px 12px; border-radius: 14px; background: rgba(255, 210, 63, .12); color: #ffe9a3; text-align: left; animation: screenIn .25s var(--out); }
.hinttip svg { width: 20px; height: 20px; flex: none; color: var(--gold); }

/* Карточка-файл: внешний слой — перетаскивание и полёт, средний — наклон, внутренний — появление и покачивание. */
.filecard { position: relative; width: var(--cw); height: calc(var(--cw) * 1.26); touch-action: none; user-select: none; cursor: grab; z-index: 5; }
.filecard.dragging { cursor: grabbing; z-index: 40; }
.fc-tilt { width: 100%; height: 100%; transition: transform .18s ease-out; transform-style: preserve-3d; }
.fc-body {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 100%; border-radius: 26px; overflow: hidden;
  animation: bob 3.4s ease-in-out infinite;
}
.filecard.enter .fc-body { animation: cardIn .45s var(--spring) both; }
.filecard.shake .fc-body { animation: shake .45s; }
.filecard.dragging .fc-body { animation: none; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(40px) scale(.7) rotate(-8deg); } }
@keyframes shake { 20% { transform: translateX(-10px) rotate(-3deg); } 40% { transform: translateX(9px) rotate(2deg); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
@keyframes float { 50% { transform: translateY(-8px); } }

.fc-body::after {
  content: ''; position: absolute; top: 0; right: 0; width: 36px; height: 36px; border-bottom-left-radius: 12px;
  background: linear-gradient(225deg, rgba(13, 10, 38, .9) 0 50%, rgba(255, 255, 255, .3) 50% 100%);
}
.fc-tag {
  position: absolute; top: 14px; left: 14px; padding: 3px 10px; border-radius: 99px;
  background: rgba(255, 255, 255, .14); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em;
}
.st-new .fc-tag { background: rgba(61, 224, 255, .2); color: var(--cyan); }
.st-broken .fc-tag { background: rgba(255, 77, 106, .25); color: #ff9cb0; }
.st-learned .fc-tag { background: rgba(47, 224, 138, .2); color: var(--good); }
.fc-name { margin-top: 10px; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .2em; opacity: .55; }
.fc-ext { font: 800 calc(var(--cw) * .36 * var(--k)) / 1 var(--mono); letter-spacing: -.02em; white-space: nowrap; }
.fc-ext i { font-style: normal; color: var(--pink); }
.fc-pips { display: flex; gap: 6px; margin-top: 6px; }
.fc-pips i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, .15); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .2); }
.fc-pips i.on { background: var(--good); box-shadow: 0 0 10px rgba(47, 224, 138, .8); }
.fc-bet {
  position: absolute; bottom: 12px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 99px;
  background: var(--gold); color: #2a1a00; font: 800 14px var(--display); animation: bump .4s var(--spring);
}
.fc-bet .coin-ico { width: 16px; height: 16px; }
.filecard.has-bet .fc-body { box-shadow: 0 0 0 3px var(--gold), 0 0 40px rgba(255, 210, 63, .55) !important; }
.filecard.bet-wait .fc-body { animation: betPulse 1s ease-in-out infinite; }
@keyframes betPulse { 50% { box-shadow: 0 0 0 4px var(--gold), 0 0 50px rgba(255, 210, 63, .6); } }
.filecard.is-wrong .fc-body { filter: saturate(.7); }
.crack { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.crack path { fill: none; stroke: rgba(255, 120, 145, .85); stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.crack.draw path { stroke-dasharray: 400; stroke-dashoffset: 400; animation: crackDraw .45s ease-out .1s forwards; }
@keyframes crackDraw { to { stroke-dashoffset: 0; } }

/* Скины карточки */
.skin-neon .fc-body {
  background: linear-gradient(160deg, #2e2585, #171248 70%);
  box-shadow: 0 0 0 2px rgba(124, 92, 255, .8), 0 0 0 5px rgba(61, 224, 255, .12), 0 22px 50px rgba(0, 0, 0, .45), 0 0 50px rgba(124, 92, 255, .4);
}
.skin-neon .fc-ext { text-shadow: 0 0 22px rgba(124, 92, 255, .9); }
.skin-space .fc-body {
  background:
    radial-gradient(1.5px 1.5px at 20% 30%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 70% 20%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 40% 70%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 85% 75%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 12% 85%, #fff 50%, transparent 51%), radial-gradient(60% 50% at 70% 100%, rgba(255, 79, 216, .45), transparent 70%),
    linear-gradient(170deg, #071a4a, #050822);
  box-shadow: 0 0 0 2px #3d7bff, 0 22px 50px rgba(0, 0, 0, .5), 0 0 50px rgba(61, 123, 255, .45);
}
.skin-candy .fc-body { background: linear-gradient(150deg, #ffe0f4, #ffd1a8 60%, #fff3b0); color: #3a1440; box-shadow: 0 0 0 3px #ff8ad8, 0 22px 50px rgba(0, 0, 0, .4); }
.skin-candy .fc-ext i { color: #e0249a; }
.skin-candy .fc-tag { background: rgba(58, 20, 64, .12); color: #3a1440; }
.skin-candy .fc-pips i { background: rgba(58, 20, 64, .15); box-shadow: inset 0 0 0 2px rgba(58, 20, 64, .2); }
.skin-pixel .fc-body {
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 2px, transparent 2px 4px), linear-gradient(180deg, #1d6b3a, #0d3b1f);
  border-radius: 6px; color: #b6ff7a; box-shadow: 0 0 0 4px #0a2614, 0 0 0 8px #b6ff7a, 0 22px 40px rgba(0, 0, 0, .5);
}
.skin-pixel .fc-ext { font-family: 'Press Start 2P', monospace; font-weight: 400; font-size: calc(var(--cw) * .2 * var(--k)); }
.skin-pixel .fc-ext i { color: #ffd23f; }
.skin-pixel .fc-tag { border-radius: 2px; }
.skin-gold .fc-body {
  background: linear-gradient(115deg, #b8860b 0%, #ffe27a 22%, #c99a1c 42%, #fff1b8 58%, #b8860b 80%); background-size: 220% 100%;
  color: #3b2600; box-shadow: 0 0 0 3px #ffe27a, 0 22px 50px rgba(0, 0, 0, .45), 0 0 50px rgba(255, 210, 63, .45);
  animation: bob 3.4s ease-in-out infinite, shine 3s linear infinite;
}
.skin-gold .fc-ext i { color: #8a1c00; }
.skin-gold .fc-tag { background: rgba(59, 38, 0, .15); color: #3b2600; }
.skin-holo .fc-body {
  background: linear-gradient(120deg, #ff9ad5, #9ad0ff, #b8ff9a, #ffe79a, #ff9ad5); background-size: 300% 300%; color: #1b1440;
  box-shadow: 0 0 0 3px #fff, 0 22px 50px rgba(0, 0, 0, .45), 0 0 60px rgba(154, 208, 255, .6);
  animation: bob 3.4s ease-in-out infinite, shine 4s linear infinite;
}
.skin-holo .fc-ext i { color: #7c1fd6; }
.skin-holo .fc-tag { background: rgba(27, 20, 64, .12); color: #1b1440; }
@keyframes shine { to { background-position: 220% 0; } }

/* Папки */
.folders { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 10px; padding-top: 10px; transition: opacity .2s, filter .2s; }
.folders.locked { opacity: .35; filter: grayscale(.5); pointer-events: none; }
.folder {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 76px; padding: 12px 12px 10px; border: 0;
  border-radius: 6px 18px 18px 18px; text-align: left; color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, 0) 60%), var(--c);
  box-shadow: 0 5px 0 var(--d), 0 12px 22px rgba(0, 0, 0, .35);
  transition: transform .14s ease-out, box-shadow .14s ease-out, opacity .2s, filter .2s;
  animation: folderIn .22s var(--out) both;
}
.folder::before {
  content: ''; position: absolute; left: 0; top: -10px; width: 46%; height: 12px; border-radius: 10px 14px 0 0;
  background: linear-gradient(rgba(255, 255, 255, .24), rgba(255, 255, 255, .24)), var(--c);
}
@keyframes folderIn { from { opacity: 0; transform: translateY(8px); } }
.folder:hover:not(:disabled) { filter: brightness(1.07); }
.folder:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--d), 0 6px 14px rgba(0, 0, 0, .3); }
.f-ico { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: rgba(0, 0, 0, .14); }
.f-txt { display: grid; min-width: 0; }
.f-txt b { font-weight: 900; font-size: 15px; line-height: 1.15; }
.f-txt small { font-weight: 800; font-size: 12px; opacity: .78; }
.folder kbd { position: absolute; top: 6px; right: 8px; font: 800 11px var(--font); opacity: .55; display: none; }
@media (hover: hover) and (pointer: fine) { .folder kbd { display: block; } }
.folder.hover { transform: translateY(-4px) scale(1.04); box-shadow: 0 9px 0 var(--d), 0 0 0 3px #fff, 0 16px 30px rgba(0, 0, 0, .4); }
.folder.gulp { animation: gulp .5s var(--spring); }
@keyframes gulp { 30% { transform: scale(1.12, .9); } 60% { transform: scale(.96, 1.06); } }
.folder.wrong { animation: shake .45s; filter: saturate(.5) brightness(.75); box-shadow: 0 5px 0 var(--d), 0 0 0 3px var(--bad); }
.folder.right { box-shadow: 0 5px 0 var(--d), 0 0 0 3px #fff, 0 0 30px var(--c); animation: rightGlow 1s ease-in-out infinite; }
@keyframes rightGlow { 50% { transform: scale(1.04); } }
.folder.dim { opacity: .3; }
.folder.gone { opacity: 0; transform: scale(.85); pointer-events: none; }

.hand { position: absolute; left: 50%; top: 58%; width: 54px; height: 54px; margin-left: -10px; pointer-events: none; z-index: 30; animation: hand 1.8s ease-in-out infinite; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .5)); }
@keyframes hand { 0% { opacity: 0; transform: translateY(-30px); } 20% { opacity: 1; } 70% { opacity: 1; transform: translateY(110px) scale(.92); } 100% { opacity: 0; transform: translateY(130px) scale(.92); } }

/* Нижняя шторка: объяснение ошибки и ставка */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; justify-content: center;
  transform: translateY(110%); transition: transform .32s var(--out); pointer-events: none;
}
.sheet.open { transform: none; pointer-events: auto; }
.sheet-in {
  width: 100%; max-width: 560px; display: grid; gap: 12px; padding: 20px 18px calc(18px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0; background: #221b5c; box-shadow: 0 -18px 50px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.sh-head { display: flex; align-items: center; gap: 12px; }
.sh-ico { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 16px; background: var(--c); color: var(--ink); }
.sh-kicker { color: #ff9cb0; font-weight: 800; }
.sh-kicker b { color: var(--text); }
.sh-title { font: 900 24px/1.1 var(--display); }
.sh-hint { font-size: 17px; font-weight: 700; text-wrap: pretty; }
.sh-note { color: var(--muted); font-size: 14px; font-weight: 700; text-wrap: pretty; }
.bet { text-align: center; }
.bet-title { display: flex; align-items: center; justify-content: center; gap: 8px; font: 900 30px var(--display); color: var(--gold); text-shadow: 0 0 24px rgba(255, 210, 63, .6); animation: bump .5s var(--spring); }
.bet-title svg { width: 30px; height: 30px; }
.bet-text { color: var(--muted); font-weight: 700; text-wrap: balance; }
.bet-text b { color: var(--gold); }
.bet-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* Всплывающие тексты и уведомления */
.float {
  position: fixed; z-index: 70; pointer-events: none; transform: translate(-50%, -50%);
  font: 900 24px var(--display); color: var(--gold); text-shadow: 0 3px 0 rgba(0, 0, 0, .35), 0 0 18px rgba(255, 210, 63, .6);
  animation: floatUp 1s var(--out) forwards; white-space: nowrap;
}
.float.big { font-size: clamp(26px, 7vw, 40px); animation-duration: 1.4s; }
.float.good { color: var(--good); text-shadow: 0 3px 0 rgba(0, 0, 0, .35), 0 0 22px rgba(47, 224, 138, .7); }
.float.bad { color: #ff7d95; text-shadow: 0 3px 0 rgba(0, 0, 0, .35), 0 0 22px rgba(255, 77, 106, .6); }
.float.combo { background: linear-gradient(90deg, #ffd23f, #ff8a3d, #ff4fd8); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .35)); }
.float.crit { color: #ff8ad8; font-size: 20px; }
@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
  18% { opacity: 1; transform: translate(-50%, -60%) scale(1.12); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -150%) scale(1); }
}

#toasts { position: fixed; top: 12px; left: 50%; z-index: 80; display: grid; gap: 8px; width: min(420px, calc(100% - 24px)); transform: translateX(-50%); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 18px;
  background: rgba(30, 24, 82, .97); box-shadow: 0 14px 40px rgba(0, 0, 0, .5), inset 0 0 0 1px var(--line-2);
  animation: toastIn .4s var(--spring); transition: opacity .3s, transform .3s;
}
.toast.out { opacity: 0; transform: translateY(-10px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-24px) scale(.9); } }
.t-txt { display: grid; }
.t-txt b { font-weight: 900; }
.t-txt small { color: var(--muted); font-weight: 700; }
.t-card, .t-set {
  display: grid; place-items: center; min-width: 54px; height: 54px; padding: 0 8px; border-radius: 14px;
  background: var(--c); color: var(--ink); font: 800 16px var(--mono); animation: flipIn .6s var(--spring);
}
.toast.card.r3 .t-card, .toast.card.r4 .t-card { box-shadow: 0 0 22px var(--c); }
.toast.card.r4 { box-shadow: 0 14px 40px rgba(0, 0, 0, .5), inset 0 0 0 2px var(--gold); }
@keyframes flipIn { from { transform: rotateY(180deg) scale(.6); } }

/* ---------- Итог раунда ---------- */

.sum { max-width: 560px; padding-top: 4vh; }
.sum-card {
  display: grid; gap: 16px; justify-items: center; padding: 26px 20px; border-radius: 30px; text-align: center;
  background: linear-gradient(170deg, rgba(124, 92, 255, .3), rgba(26, 21, 70, .95) 50%), var(--panel);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 30px 70px rgba(0, 0, 0, .45);
}
.sum-title { font: 900 clamp(28px, 7vw, 38px) var(--display); letter-spacing: -.02em; text-wrap: balance; }
.sum-text { color: var(--muted); font-weight: 700; text-wrap: pretty; }
.stars { display: flex; gap: 6px; }
.star { width: 64px; height: 64px; color: rgba(255, 255, 255, .12); }
.star svg { width: 100%; height: 100%; }
.star.on { color: var(--gold); filter: drop-shadow(0 0 14px rgba(255, 210, 63, .7)); animation: starPop .5s var(--spring) both; animation-delay: calc(var(--i) * 160ms + 150ms); }
.star:nth-child(2) { transform: translateY(-10px); }
.star.on:nth-child(2) { animation-name: starPop2; }
@keyframes starPop { from { transform: scale(0) rotate(-40deg); } }
@keyframes starPop2 { from { transform: translateY(-10px) scale(0) rotate(-40deg); } to { transform: translateY(-10px); } }
.record { padding: 6px 16px; border-radius: 99px; background: linear-gradient(90deg, #ffd23f, #ff8a3d); color: #2a1300; font: 900 16px var(--display); animation: bump .6s var(--spring) .5s both; }
.sum-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.sum-stats > div { display: grid; gap: 2px; padding: 12px 6px; border-radius: 18px; background: rgba(0, 0, 0, .25); }
.sum-stats b { display: inline-flex; align-items: center; justify-content: center; gap: 4px; font: 900 22px var(--display); font-variant-numeric: tabular-nums; }
.sum-stats b small { font-size: 14px; color: var(--muted); }
.sum-stats b .coin-ico { width: 20px; height: 20px; }
.sum-stats span { color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.25; }
.sum-stats .neg b { color: #ff8aa0; }
.sum-sec { width: 100%; display: grid; gap: 10px; }
.sum-sec h2 { font: 800 15px var(--display); color: var(--muted); }
.sum-sec.got h2 { color: var(--good); }
.sum-sec.broke h2 { color: #ff8aa0; }
.sum-sec .minis { justify-content: center; }
.sum-sec .mini { animation: flipIn .6s var(--spring) both; animation-delay: calc(var(--i) * 110ms + 400ms); }
.sum-actions { display: grid; gap: 10px; width: 100%; margin-top: 4px; }

/* Мини-карточки (альбом, итоги) */
.minis { display: flex; flex-wrap: wrap; gap: 10px; }
.mini {
  position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; width: 76px; height: 98px; padding: 6px;
  border: 0; border-radius: 16px; overflow: hidden; background: var(--panel-2); color: var(--text);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c) 45%, transparent); transition: transform .14s ease-out;
}
.mini:hover { transform: translateY(-3px); }
.mini:active { transform: scale(.96); }
.m-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: color-mix(in srgb, var(--c) 25%, transparent); color: var(--c); }
.m-ext { font: 800 15px var(--mono); }
.m-r { font-size: 10px; letter-spacing: 1px; color: var(--gold); }
.m-pips { display: flex; gap: 3px; }
.m-pips i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.m-pips i.on { background: var(--good); }
.mini.st-learned { background: linear-gradient(160deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, 0) 55%), var(--c); color: var(--ink); box-shadow: 0 4px 0 var(--d); }
.mini.st-learned .m-ico { background: rgba(0, 0, 0, .15); color: var(--ink); }
.mini.st-learned .m-r { color: var(--ink); opacity: .8; }
.mini.st-learned.r3 { box-shadow: 0 4px 0 var(--d), 0 0 18px color-mix(in srgb, var(--c) 70%, transparent); }
.mini.st-learned.r4::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .55) 45%, transparent 60%); background-size: 250% 100%;
  animation: shine 2.6s linear infinite;
}
.mini.st-broken { background: #2a1838; box-shadow: inset 0 0 0 2px rgba(255, 77, 106, .7); }
.mini.st-broken .crack path { stroke-width: 1.6; }
.mini.hidden { background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .12); border: 2px dashed rgba(255, 255, 255, .12); }
.m-q { font: 900 30px var(--display); color: rgba(255, 255, 255, .2); }
.mini.big { width: 120px; height: 156px; margin: 0 auto; }
.mini.big .m-q { font-size: 52px; }

/* ---------- Как на ВПР ---------- */

.vpr { max-width: 720px; }
.paper {
  position: relative; display: grid; gap: 16px; padding: 22px 20px; border-radius: 18px;
  background: #fbf9f2; color: #1d1a35; box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  font-family: Georgia, 'Times New Roman', serif; overflow: hidden;
}
.paper-head { display: flex; align-items: center; gap: 12px; font-family: var(--font); }
.paper-no { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: #1d1a35; color: #fff; font: 900 20px var(--display); }
.paper-head b { display: block; font: 800 18px var(--display); }
.paper-head small { color: #6b6690; font-weight: 700; }
.paper-task { font-size: 17px; line-height: 1.5; text-wrap: pretty; }
.paper-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.pc-h { margin-bottom: 8px; font: 800 12px var(--font); letter-spacing: .12em; text-transform: uppercase; color: #6b6690; }
.vr { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 6px; border-radius: 12px; transition: background-color .25s; }
.vr-l { width: 24px; font-weight: 700; }
.vr-x { flex: 1; font: 700 19px var(--font); }
.vr-pick { display: flex; gap: 6px; font-family: var(--font); }
.np {
  width: 44px; height: 44px; border: 0; border-radius: 12px; background: #ece8dc; color: #1d1a35; font-weight: 900; font-size: 17px;
  transition: background-color .15s, transform .12s, color .15s;
}
.np:hover { background: #e0dbcb; }
.np:active { transform: scale(.94); }
.np[aria-pressed="true"] { background: #4f3ff0; color: #fff; box-shadow: 0 3px 0 #3424b8; }
.vr-mark { width: 40px; font: 900 16px var(--font); text-align: center; }
.vr.ok { background: rgba(47, 224, 138, .16); }
.vr.ok .vr-mark { color: #0d8a4d; }
.vr.no { background: rgba(255, 77, 106, .14); }
.vr.no .vr-mark { color: #c62a47; }
.pc-types { padding: 12px 14px; border-radius: 14px; background: #f1eee3; align-self: start; }
.pt { padding: 6px 0; font-size: 18px; }
.paper-ans { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-family: var(--font); font-weight: 700; color: #4b4670; }
.paper-ans table { border-collapse: collapse; font-family: Georgia, serif; }
.paper-ans th, .paper-ans td { width: 44px; height: 34px; border: 1.5px solid #1d1a35; text-align: center; font-size: 17px; color: #1d1a35; }
.paper-ans th { font-weight: 400; background: #f1eee3; }
.paper-ans td { font-weight: 700; font-family: var(--font); }
.paper-ans td.pop { animation: bump .3s var(--spring); }
.paper-ans td.ok { background: rgba(47, 224, 138, .25); }
.paper-ans td.no { background: rgba(255, 77, 106, .22); }
.paper-result { min-height: 24px; font-family: var(--font); font-weight: 700; color: #4b4670; }
.paper-result b { color: #1d1a35; }
.paper-result code { padding: 2px 8px; border-radius: 6px; background: #1d1a35; color: #fff; font: 800 15px var(--display); letter-spacing: .1em; }
.paper-result .coin-ico { width: 16px; height: 16px; vertical-align: -3px; }
.paper-actions { display: flex; flex-wrap: wrap; gap: 10px; font-family: var(--font); }
.paper-actions .btn.ghost { color: #4b4670; }
.paper-actions .btn.ghost:hover { background: rgba(0, 0, 0, .05); color: #1d1a35; }
.stamp {
  position: absolute; bottom: 84px; right: 18px; padding: 8px 18px; border: 5px solid currentColor; border-radius: 14px;
  font: 900 26px var(--display); text-transform: uppercase; letter-spacing: .04em; transform: rotate(-12deg);
  mix-blend-mode: multiply; animation: stampIn .38s cubic-bezier(.2, 1.4, .4, 1) both; pointer-events: none;
}
.stamp[hidden] { display: none; }
.stamp.good { color: #0e9f56; }
.stamp.mid { color: #e07a12; }
.stamp.bad { color: #d4253f; }
@keyframes stampIn { from { opacity: 0; transform: rotate(-12deg) scale(2.6); } }

/* ---------- Альбом ---------- */

.album { display: grid; gap: 14px; }
.album-head { display: grid; gap: 12px; padding: 18px; border-radius: 24px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.ah-main { display: flex; align-items: center; gap: 12px; }
.ah-main b { font: 900 52px/1 var(--display); background: linear-gradient(135deg, #ff4fd8, #7c5cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ah-main span { color: var(--muted); font-weight: 800; line-height: 1.25; }
.ah-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ah-stats span { display: grid; padding: 8px 4px; border-radius: 14px; background: rgba(0, 0, 0, .22); text-align: center; color: var(--muted); font-size: 12px; font-weight: 800; }
.ah-stats b { font: 800 18px var(--display); color: var(--text); }
.ah-legend { color: var(--dim); font-size: 14px; font-weight: 700; text-wrap: pretty; }
.set { display: grid; gap: 10px; padding: 14px; border-radius: 22px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.set.done { box-shadow: inset 0 0 0 2px var(--c), 0 0 30px color-mix(in srgb, var(--c) 30%, transparent); }
.set h2 { display: flex; align-items: center; gap: 10px; font: 800 16px var(--display); }
.set-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--c); color: var(--ink); }
.set-name { flex: 1; }
.set-n { color: var(--muted); font-variant-numeric: tabular-nums; }
.power { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, .2); color: var(--dim); font-size: 13px; font-weight: 700; }
.power svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.power b { display: block; color: var(--muted); font-size: 14px; }
.power.on { background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--text); }
.power.on svg { color: var(--gold); }
.power.on b { color: var(--c); }

/* ---------- Окна ---------- */

.modal-wrap {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: rgba(6, 4, 22, .74); animation: fadeIn .2s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto; display: grid; gap: 14px; padding: 22px;
  border-radius: 28px; background: #1f1955; box-shadow: 0 30px 80px rgba(0, 0, 0, .6), inset 0 0 0 1px var(--line-2);
  animation: modalIn .3s var(--spring);
}
.modal.wide { max-width: 640px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.94); } }
.m-title { font: 900 24px var(--display); text-align: center; text-wrap: balance; }
.m-text { color: var(--muted); font-weight: 700; text-align: center; text-wrap: pretty; }
.m-sub { font: 800 14px var(--display); color: var(--muted); text-align: center; }
.m-note { color: var(--dim); font-size: 13px; font-weight: 700; text-align: center; text-wrap: pretty; }
.locked-card { display: grid; gap: 14px; }
.bigcard {
  position: relative; display: grid; gap: 4px; justify-items: center; padding: 18px; border-radius: 24px; overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 55%), var(--c); color: var(--ink);
  box-shadow: 0 6px 0 var(--d), 0 20px 40px rgba(0, 0, 0, .35); animation: flipIn .6s var(--spring);
}
.bigcard.r4::after { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .5) 45%, transparent 60%); background-size: 250% 100%; animation: shine 2.6s linear infinite; }
.bigcard.st-broken, .bigcard.st-learning, .bigcard.st-new { background: var(--panel-3); color: var(--text); box-shadow: inset 0 0 0 2px var(--c); }
.bc-top { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.bc-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(0, 0, 0, .14); }
.bc-r { font-size: 13px; font-weight: 900; }
.bc-ext { font: 800 54px/1.1 var(--mono); letter-spacing: -.02em; }
.bc-type { font: 800 18px var(--display); }
.bc-hint { font-size: 17px; font-weight: 700; text-wrap: pretty; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; padding: 12px 14px; border-radius: 16px; background: rgba(0, 0, 0, .22); font-size: 14px; }
.facts dt { color: var(--dim); font-weight: 800; }
.facts dd { margin: 0; font-weight: 700; }
.bc-status { padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); font-weight: 800; }
.bc-status span { display: block; color: var(--muted); font-size: 13px; }
.bc-status.st-learned { background: rgba(47, 224, 138, .14); color: var(--good); }
.bc-status.st-broken { background: rgba(255, 77, 106, .14); color: #ff9cb0; }
.t-share { display: flex; gap: 16px; align-items: center; padding: 14px; border-radius: 20px; background: rgba(0, 0, 0, .22); }
.t-qr { flex: none; padding: 8px; border-radius: 14px; background: #fff; line-height: 0; }
.t-qr svg { width: 148px; height: 148px; }
.t-link { display: grid; gap: 8px; min-width: 0; }
.t-link span { color: var(--muted); font-weight: 800; }
.t-link code { font: 700 15px var(--font); color: var(--cyan); word-break: break-all; }
.t-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); font-weight: 700; font-size: 15px; }
.t-list b { color: var(--text); }
.codeform { display: flex; gap: 10px; }
.codeform input { text-transform: uppercase; letter-spacing: .12em; text-align: center; font-family: var(--display); }

/* ---------- Магазин ---------- */

.shop { display: grid; gap: 12px; }
.sec-h { margin-top: 6px; font: 800 18px var(--display); }
.items { display: grid; gap: 10px; }
.item { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.it-ico { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: color-mix(in srgb, var(--c) 20%, transparent); color: var(--c); }
.it-ico svg { width: 26px; height: 26px; }
.it-txt { flex: 1; display: grid; gap: 2px; min-width: 0; }
.it-txt b { font: 800 16px var(--display); }
.it-txt small { color: var(--muted); font-weight: 700; }
.lvl { display: flex; gap: 4px; margin-top: 4px; }
.lvl i { width: 22px; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .12); }
.lvl i.on { background: var(--gold); box-shadow: 0 0 8px rgba(255, 210, 63, .6); }
.buy {
  display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 8px 14px; border: 0; border-radius: 14px; flex: none;
  background: var(--gold); color: #2a1a00; font: 800 16px var(--display); box-shadow: 0 4px 0 var(--gold-d);
  transition: transform .12s, box-shadow .12s, opacity .15s;
}
.buy:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gold-d); }
.buy.poor { opacity: .45; filter: grayscale(.5); }
.it-done { color: var(--good); font-weight: 900; padding: 0 6px; }
.skins { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.skin { display: grid; gap: 8px; justify-items: center; padding: 14px 10px; border-radius: 22px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.skin.on { box-shadow: inset 0 0 0 2px var(--good); }
.skin .filecard { --cw: 92px; cursor: default; }
.skin .filecard .fc-body { animation: none; gap: 2px; border-radius: 16px; }
.skin.on .filecard .fc-body { animation: bob 3.4s ease-in-out infinite; }
.skin-gold.preview .fc-body, .skin-holo.preview .fc-body { animation: shine 3s linear infinite; }
.skin .fc-name { margin-top: 0; font-size: 9px; }
.skin .fc-body::after { width: 18px; height: 18px; border-bottom-left-radius: 6px; }
.shop-note { color: var(--dim); font-weight: 700; font-size: 14px; text-align: center; }

/* ---------- Шпаргалка ---------- */

.cheat { display: grid; gap: 12px; }
.cheat-lead { padding: 14px 16px; border-radius: 18px; background: var(--panel); font-weight: 700; line-height: 1.7; text-wrap: pretty; }
.fname { display: inline-block; padding: 1px 10px; border-radius: 8px; background: rgba(0, 0, 0, .3); font-weight: 800; white-space: nowrap; }
.fname b { color: var(--pink); font-family: var(--mono); }
.crow { display: grid; gap: 10px; padding: 14px; border-radius: 20px; background: var(--panel); box-shadow: inset 4px 0 0 var(--c), inset 0 0 0 1px var(--line); }
.crow-head { display: flex; align-items: center; gap: 12px; }
.crow-ico { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 14px; background: var(--c); color: var(--ink); }
.crow-head b { display: block; font: 800 17px var(--display); }
.crow-head small { color: var(--muted); font-weight: 700; }
.crow-exts { display: flex; flex-wrap: wrap; gap: 6px; }
.xchip {
  min-height: 40px; padding: 6px 12px; border: 0; border-radius: 12px; font: 800 16px var(--mono);
  background: rgba(255, 255, 255, .07); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); transition: transform .12s, background-color .15s;
}
.xchip:active { transform: scale(.96); }
.xchip.st-learned { background: var(--c); color: var(--ink); box-shadow: none; }
.xchip.st-broken { box-shadow: inset 0 0 0 2px var(--bad); color: #ff9cb0; }
.crow .facts { font-size: 13px; }

/* ---------- Рейтинг ---------- */

.rating { display: grid; gap: 12px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: 16px; background: rgba(0, 0, 0, .3); }
.seg-b { min-height: 42px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 900; font-size: 14px; transition: background-color .15s, color .15s; }
.seg-b.on { background: var(--violet); color: #fff; box-shadow: 0 3px 0 var(--violet-d); }
.rlist { display: grid; gap: 6px; }
.rrow {
  display: grid; grid-template-columns: 30px 38px 1fr auto 44px; align-items: center; gap: 10px; min-height: 60px; padding: 8px 8px 8px 12px;
  border-radius: 18px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line);
  animation: screenIn .3s var(--out) both; animation-delay: calc(var(--i, 0) * 30ms);
}
.rk { font: 900 18px var(--display); color: var(--dim); text-align: center; font-variant-numeric: tabular-nums; }
.rn { display: grid; min-width: 0; }
.rn-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rn b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16px; }
.rn small { color: var(--muted); font-weight: 700; font-size: 12px; }
.rn .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); }
.rv { display: inline-flex; align-items: center; gap: 4px; font: 800 16px var(--display); font-variant-numeric: tabular-nums; }
.rv small { color: var(--dim); }
.rv .coin-ico { width: 18px; height: 18px; }
.rsp { width: 44px; }
.btn.duel { width: 44px; padding: 0; color: #ff8aa0; }
.btn.duel svg { width: 20px; height: 20px; }
.rrow.me { background: linear-gradient(90deg, rgba(124, 92, 255, .35), var(--panel)); box-shadow: inset 0 0 0 2px var(--violet); }
.rrow.top1 { box-shadow: inset 0 0 0 2px var(--gold), 0 0 24px rgba(255, 210, 63, .2); }
.rrow.top1 .rk { color: var(--gold); }
.rrow.top2 .rk { color: #d6dcf5; }
.rrow.top3 .rk { color: #e3a066; }
.rgap { text-align: center; color: var(--dim); font-weight: 900; }
.rtotal { margin-top: 6px; color: var(--dim); font-weight: 700; font-size: 13px; text-align: center; }
.mycode:empty { display: none; }
.mycode { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 18px; background: rgba(61, 224, 255, .08); box-shadow: inset 0 0 0 1px rgba(61, 224, 255, .3); }
.mycode svg { width: 24px; height: 24px; flex: none; color: var(--cyan); }
.mycode span { display: grid; gap: 2px; font-weight: 700; }
.mycode b { font: 800 18px var(--display); letter-spacing: .1em; color: var(--cyan); }
.mycode small { color: var(--muted); }
.rename { display: grid; gap: 8px; padding: 14px; border-radius: 18px; background: rgba(255, 77, 106, .12); box-shadow: inset 0 0 0 1px rgba(255, 77, 106, .4); }
.rename > b { color: #ff9cb0; }
.rename > span { color: var(--muted); font-weight: 700; }
.rename .form-err { text-align: left; }

/* ---------- Батлы ---------- */

.battles { display: grid; gap: 14px; }
.bhero {
  display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center; padding: 18px; border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 80, 80, .35), rgba(124, 92, 255, .3)), var(--panel); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.bh-ico { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: rgba(0, 0, 0, .25); color: #ff8a8a; }
.bh-ico svg { width: 30px; height: 30px; }
.bh-txt b { display: block; font: 900 20px var(--display); }
.bh-txt small { color: #e2dcff; font-weight: 700; font-size: 14px; }
.bhero .btn3d { grid-column: 1 / -1; --c: #ff5050; --d: #b8243a; }
.bsec { display: grid; gap: 8px; }
.bsec h2 { font: 800 16px var(--display); color: var(--muted); }
.bsec.hot h2 { color: #ff8a8a; }
.brow {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 12px; border-radius: 18px;
  background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); animation: screenIn .3s var(--out) both;
}
.brow.invite { box-shadow: inset 0 0 0 2px rgba(255, 80, 80, .6), 0 0 26px rgba(255, 80, 80, .2); }
.bt { flex: 1; display: grid; min-width: 0; }
.bt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt small { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 700; flex-wrap: wrap; }
.bt small .coin-ico { width: 15px; height: 15px; }
.bacts { display: flex; gap: 6px; flex: none; }
.brow.mine { box-shadow: inset 4px 0 0 var(--dim), inset 0 0 0 1px var(--line); }
.brow.mine.win { box-shadow: inset 4px 0 0 var(--good), inset 0 0 0 1px var(--line); }
.brow.mine.win b { color: var(--good); }
.brow.mine.lose { box-shadow: inset 4px 0 0 var(--bad), inset 0 0 0 1px var(--line); }
.brow.mine.wait { box-shadow: inset 4px 0 0 var(--cyan), inset 0 0 0 1px var(--line); }
.brow.mine.back { opacity: .8; }
.brow.fresh { animation: freshIn .8s var(--spring) both; background: linear-gradient(90deg, rgba(255, 210, 63, .14), var(--panel)); }
@keyframes freshIn { from { transform: scale(.9); opacity: 0; } }
.bpay, .bstake-s { display: inline-flex; align-items: center; gap: 4px; font: 800 15px var(--display); color: var(--gold); flex: none; }
.bstake-s { color: var(--muted); }
.bpay .coin-ico, .bstake-s .coin-ico { width: 17px; height: 17px; }
.stakes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.empty { padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, .04); color: var(--dim); font-weight: 700; text-align: center; }
.loading { padding: 24px; color: var(--muted); font-weight: 800; text-align: center; animation: pulse 1.2s ease-in-out infinite; }
.loading.big { font: 800 20px var(--display); }
.offline { display: grid; gap: 8px; justify-items: center; padding: 20px; border-radius: 18px; background: rgba(255, 255, 255, .05); text-align: center; }
.offline b { font: 800 17px var(--display); }
.offline span { color: var(--muted); font-weight: 700; }

/* Батл: дорожки «ты» и «соперник» */
.mode-battle .phud { gap: 8px; }
.bstake { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 800; }
.bstake svg { width: 22px; height: 22px; flex: none; color: #ff8a8a; }
.bstake span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bstake em { display: inline-flex; align-items: center; gap: 4px; font: 800 15px var(--display); font-style: normal; color: var(--gold); }
.bstake em .coin-ico { width: 18px; height: 18px; }
.btime { min-width: 64px; padding: 8px 12px; border-radius: 12px; background: rgba(0, 0, 0, .3); font: 800 16px var(--display); text-align: center; font-variant-numeric: tabular-nums; }
.race { display: grid; gap: 6px; padding: 10px 12px; border-radius: 16px; background: rgba(0, 0, 0, .22); }
.lane { display: grid; grid-template-columns: 90px 1fr 28px; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; }
.lane span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane b { font-family: var(--display); text-align: right; font-variant-numeric: tabular-nums; }
.track { height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.track i { display: block; height: 100%; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--out); border-radius: 99px; }
.lane.me .track i { background: linear-gradient(90deg, var(--cyan), var(--violet)); }
.lane.ghost .track i { background: linear-gradient(90deg, #ff8a3d, #ff5050); }
.lane.ghost { color: #ffb0b0; }

/* Итог батла */
.bigscore { display: grid; }
.bigscore b { font: 900 64px/1 var(--display); color: var(--cyan); }
.bigscore span { color: var(--muted); font-weight: 800; }
.versus { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; width: 100%; }
.vs-side { display: grid; justify-items: center; gap: 6px; padding: 14px 8px; border-radius: 20px; background: rgba(0, 0, 0, .25); min-width: 0; }
.vs-side .ava { width: 48px; height: 48px; font-size: 18px; }
.vs-side b { font: 900 46px/1 var(--display); font-variant-numeric: tabular-nums; }
.vs-side small { color: var(--muted); font-weight: 700; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs { font: 900 22px var(--display); color: var(--pink); }
.battle-res.win .vs-side.me { box-shadow: inset 0 0 0 2px var(--good), 0 0 30px rgba(47, 224, 138, .3); }
.battle-res.lose .vs-side:not(.me) { box-shadow: inset 0 0 0 2px var(--bad); }
.battle-res.win .sum-title { color: var(--good); }
.battle-res.lose .sum-title { color: #ff8aa0; }
.payout { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 99px; background: rgba(255, 210, 63, .14); color: var(--gold); font-weight: 900; animation: bump .6s var(--spring) .8s both; }

/* ---------- Узкие и широкие экраны ---------- */

@media (max-width: 380px) {
  .folders { gap: 14px 8px; }
  .folder { min-height: 70px; padding: 10px 8px 8px; gap: 8px; }
  .f-ico { width: 32px; height: 32px; }
  .f-ico svg { width: 22px; height: 22px; }
  .f-txt b { font-size: 14px; }
  .clabel { display: none; }
  .tile { padding: 10px; gap: 10px; }
  .tile-ico { width: 38px; height: 38px; }
  .rrow { grid-template-columns: 24px 32px 1fr auto 40px; gap: 8px; }
  .rrow .ava { width: 32px; height: 32px; }
}
@media (max-width: 560px) {
  .paper { padding: 18px 14px; }
  .paper-cols { grid-template-columns: 1fr; }
  .pc-types { order: -1; }
  .stamp { bottom: 120px; right: 12px; font-size: 20px; }
  .ah-stats { grid-template-columns: repeat(2, 1fr); }
  .t-share { flex-direction: column; text-align: center; }
  .lane { grid-template-columns: 70px 1fr 24px; }
}
@media (min-width: 720px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .tile { flex-direction: column; align-items: flex-start; min-height: 112px; }
  :root { --cw: clamp(160px, 26vh, 230px); }
}
@media (max-height: 640px) {
  :root { --cw: clamp(120px, min(42vw, 26vh), 180px); }
  .folder { min-height: 64px; }
  .tip { min-height: 30px; font-size: 14px; }
}

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