/* Тёмная «системная» тема: синее свечение окон Системы, золото — легендарное. Одна тема намеренно (игра). */
:root {
  --bg: #070a14;
  --bg2: #0d1426;
  --panel: rgba(16, 28, 54, 0.82);
  --line: #2b5fa8;
  --sys: #4fb3ff;
  --sys-soft: rgba(79, 179, 255, 0.16);
  --text: #e7eeff;
  --muted: #8e9bbd;
  --gold: #f4c95d;
  --danger: #ff5470;
  --ok: #3fe0a0;
  --violet: #a77bff;
  --f-display: "Russo One", "Arial Black", system-ui, sans-serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(120% 80% at 50% 0%, #10204a 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--f-body);
  -webkit-tap-highlight-color: transparent;
}
#app { max-width: 520px; margin: 0 auto; min-height: 100%; padding-inline: 16px; padding-block: 16px 32px; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; letter-spacing: 0.02em; margin: 0; text-wrap: balance; }
h2 { font-size: 22px; }
h3 { font-size: 16px; }
p { margin: 0; }
b { font-weight: 800; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center-t { text-align: center; margin-top: 10px; }

.screen { display: flex; flex-direction: column; gap: 14px; animation: rise 0.35s ease both; }
.screen.center { min-height: 80vh; justify-content: center; }
@keyframes rise { from { opacity: 0.4; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen, .pop, .float { animation: none !important; } }

/* Окно Системы */
.sys-window {
  position: relative;
  background: linear-gradient(180deg, rgba(20, 40, 80, 0.85), var(--panel));
  border: 1px solid var(--line);
  box-shadow: 0 0 0 1px rgba(79, 179, 255, 0.15) inset, 0 0 28px rgba(79, 179, 255, 0.18);
  border-radius: 6px;
  padding: 22px 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.sys-window::before, .sys-window::after {
  content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--sys);
}
.sys-window::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.sys-window::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.sys-label { font: 700 11px/1 var(--f-body); letter-spacing: 0.22em; color: var(--sys); }
.logo { font-size: 46px; line-height: 1; color: #fff; text-shadow: 0 0 18px rgba(79, 179, 255, 0.7); display: flex; flex-direction: column; gap: 4px; }
.logo span { font-size: 22px; color: var(--sys); letter-spacing: 0.3em; }
.intro p { font-size: 16px; }

.btn {
  font: 800 15px/1 var(--f-body); border-radius: 6px; padding: 15px 18px; cursor: pointer;
  border: 1px solid var(--sys); color: var(--text); background: transparent;
}
.btn.primary { background: linear-gradient(180deg, #2d8cff, #1764d6); border-color: #6cc0ff; box-shadow: 0 0 18px rgba(45, 140, 255, 0.45); }
.btn.ghost { border-color: var(--line); color: var(--muted); }
.btn:focus-visible, .ctl:focus-visible, .seg button:focus-visible, .tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn:disabled { opacity: 0.4; }

/* Форма */
.form { display: flex; flex-direction: column; gap: 12px; }
.form label, .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
input, select {
  font: 600 16px var(--f-body); color: var(--text); background: var(--bg2); border: 1px solid var(--line);
  border-radius: 6px; padding: 11px 12px; width: 100%; min-width: 0;
}
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  flex: 1; font: 700 14px var(--f-body); padding: 10px; border-radius: 6px; cursor: pointer;
  background: var(--bg2); color: var(--muted); border: 1px solid var(--line);
}
.seg button.on { color: var(--text); border-color: var(--sys); background: var(--sys-soft); }
.seg.wide button { padding: 9px 4px; }
.bmi { font-size: 14px; color: var(--muted); }
.bmi b { color: var(--text); }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* Камера */
.cam-wrap { position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 70vh; background: #000; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
#cam, #overlay { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam-top { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 8px; }
.ex-name, .ex-timer { background: rgba(7, 10, 20, 0.75); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; font-family: var(--f-display); }
.ex-timer { color: var(--gold); font-variant-numeric: tabular-nums; }
.ex-timer:empty { display: none; }
.cam-hint { position: absolute; left: 10px; right: 10px; bottom: 96px; text-align: center; background: rgba(7, 10, 20, 0.72); border-radius: 6px; padding: 8px; font-size: 14px; }
.cam-hint:empty { display: none; }
.counter { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-family: var(--f-display); text-shadow: 0 0 16px rgba(79, 179, 255, 0.9); }
.counter span { font-size: 64px; line-height: 1; font-variant-numeric: tabular-nums; }
.counter small { display: block; font-size: 15px; color: var(--sys); }
.counter.pop span { animation: pop 0.25s ease; }
@keyframes pop { 50% { transform: scale(1.25); color: var(--gold); } }
.cam-actions { display: flex; gap: 10px; }
.cam-actions .btn { flex: 1; }

/* Очки */
.free { font-size: 15px; }
.free b { color: var(--gold); font-size: 18px; }
.stat-list { display: flex; flex-direction: column; gap: 10px; }
.stat { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; }
.stat-name { font-weight: 800; }
.stat-desc { grid-column: 1; font-size: 12px; color: var(--muted); }
.stat-ctl { grid-row: 1 / span 2; grid-column: 2; display: flex; align-items: center; gap: 8px; }
.stat-val { font: 20px var(--f-display); min-width: 2.4ch; text-align: center; font-variant-numeric: tabular-nums; }
.pm { width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--sys); background: var(--sys-soft); color: var(--text); font-size: 20px; cursor: pointer; }
.pm:disabled { opacity: 0.25; }

/* Главный экран */
.hud { display: flex; gap: 12px; align-items: center; }
.hud-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hud-name { font: 20px var(--f-display); display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.hud-sub { font-size: 13px; color: var(--muted); }
.rank { font: 14px var(--f-display); padding: 2px 8px; border-radius: 4px; border: 1px solid var(--gold); color: var(--gold); }
.bar { height: 8px; background: var(--bg2); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--sys); transition: width 0.25s ease; }
.bar.hp i { background: var(--danger); }
.bar.hp.me i { background: var(--ok); }
.bar.energy i { background: var(--violet); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 14px; display: flex; flex-direction: column; gap: 10px; color: var(--text); text-align: left; font: inherit; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.forma { flex-direction: row; align-items: center; gap: 12px; }
.forma .pct { font: 24px var(--f-display); font-variant-numeric: tabular-nums; }
.forma.low { border-color: var(--danger); }
.forma.low .pct { color: var(--danger); }
.daily-list { display: flex; flex-direction: column; gap: 8px; }
.dq { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; text-align: left; color: var(--text); font: inherit; }
.dq.done { border-color: var(--ok); }
.dq .dq-name { font-weight: 800; }
.dq .dq-prog { font: 16px var(--f-display); font-variant-numeric: tabular-nums; }
.dq.done .dq-prog { color: var(--ok); }
.dq .bar { grid-column: 1 / -1; height: 5px; }
.dq.done .bar i { background: var(--ok); }
.streak { font-size: 13px; color: var(--gold); font-weight: 800; }
.streak-track { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.streak-track i { height: 8px; border-radius: 3px; background: var(--bg2); border: 1px solid var(--line); }
.streak-track i.on { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 8px var(--gold); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { cursor: pointer; gap: 4px; min-height: 84px; justify-content: space-between; }
.tile-k { font-size: 13px; color: var(--muted); }
.tile-v { font: 20px var(--f-display); }

/* Башня */
.topbar { display: flex; align-items: center; gap: 12px; }
.back { background: none; border: 0; color: var(--sys); font: 700 15px var(--f-body); cursor: pointer; padding: 6px 0; }
.tower { display: flex; flex-direction: column-reverse; gap: 8px; }
.floor { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg2); color: var(--text); text-align: left; font: inherit; }
.floor .fn { font: 18px var(--f-display); color: var(--muted); }
.floor.boss { border-color: var(--danger); }
.floor.boss .fn { color: var(--danger); }
.floor.cur { border-color: var(--sys); box-shadow: 0 0 14px rgba(79, 179, 255, 0.35); cursor: pointer; }
.floor.cur .fn { color: var(--sys); }
.floor.done { opacity: 0.55; }
.floor.locked { opacity: 0.35; }
.floor .fstate { font-size: 13px; color: var(--muted); }

/* Рейтинг */
.ranklist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ranklist li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg2); }
.ranklist li.me { border-color: var(--gold); box-shadow: 0 0 12px rgba(244, 201, 93, 0.3); }
.ranklist .pos { font: 16px var(--f-display); color: var(--muted); text-align: center; }
.ranklist li:nth-child(-n+3) .pos { color: var(--gold); }
.ranklist .who { min-width: 0; }
.ranklist .who div:last-child { font-size: 12px; color: var(--muted); }
.ranklist .pw { font: 16px var(--f-display); font-variant-numeric: tabular-nums; }

/* Герой */
.hero-card { flex-direction: row; align-items: center; gap: 14px; }
.abil { display: flex; flex-direction: column; gap: 8px; }
.abil div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; background: var(--bg2); border-radius: 6px; border: 1px solid var(--line); }
.dev summary { cursor: pointer; color: var(--muted); }
.dev-btns { display: flex; flex-direction: column; gap: 8px; }

/* Модальное окно */
.modal { position: fixed; inset: 0; background: rgba(3, 6, 14, 0.78); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10; }
.modal-box { width: 100%; max-width: 420px; animation: rise 0.3s ease; }
.m-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.m-btns .btn { flex: 1; }
.loot { display: flex; flex-direction: column; gap: 6px; }
.loot div { padding: 8px 10px; border-radius: 6px; background: var(--bg2); border: 1px solid var(--line); }
.loot .leg { border-color: var(--gold); color: var(--gold); }
.chest { font: 15px var(--f-display); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chest button { padding: 14px 6px; border-radius: 6px; background: var(--bg2); border: 1px solid var(--line); color: var(--text); font: 14px var(--f-display); cursor: pointer; }
.chest button.r { border-color: var(--violet); }
.chest button.l { border-color: var(--gold); color: var(--gold); }
.chest button:disabled { opacity: 0.3; }

/* Аватар-портреты */
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar { border-radius: 6px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #1b2f5c, #0a0f1f); border: 1px solid var(--line); }
.avatar.md { width: 72px; height: 90px; flex: none; }
.avatar.sm { width: 54px; height: 68px; flex: none; }

/* Общие добавки */
.btn.big { padding: 18px; font-size: 17px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.btn.big small { font: 600 12px var(--f-body); opacity: 0.8; }
.btn.sm { padding: 9px 12px; font-size: 13px; }
.gold { color: var(--gold); }
.rare { border-color: var(--violet) !important; color: #d6c3ff; }
.red { color: var(--danger); }
.glow { border-color: var(--gold) !important; box-shadow: 0 0 14px rgba(244, 201, 93, 0.35); }
.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 32px rgba(79, 179, 255, 0.9); transform: scale(1.02); } }

/* Классы героев */
.classes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cls { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; cursor: pointer; text-align: center; }
.cls.on { border-color: var(--gold); box-shadow: 0 0 14px rgba(244, 201, 93, 0.35); }
.cls.locked { opacity: 0.45; cursor: not-allowed; }
.cls-img { width: 100%; aspect-ratio: 4 / 5; border-radius: 4px; background: radial-gradient(circle at 50% 40%, #1b2f5c, #0a0f1f); overflow: hidden; }
.cls-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Энергия */
.energy { display: flex; flex-direction: column; gap: 4px; }
.energy-row { display: flex; align-items: center; gap: 10px; }
.pips { display: flex; gap: 5px; flex: 1; }
.pips i { flex: 1; height: 12px; border-radius: 3px; background: var(--bg2); border: 1px solid var(--line); }
.pips i.on { background: linear-gradient(180deg, #7fd0ff, #2d8cff); border-color: #7fd0ff; box-shadow: 0 0 8px rgba(79, 179, 255, 0.7); }

/* Главная кнопка боя */
.cta { gap: 10px; }
.cta-top { display: flex; flex-direction: column; gap: 4px; }
.cta-enemy { font: 24px var(--f-display); }
.cta-pw { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.cta-pw .ok { color: var(--ok); font-weight: 800; }
.cta-pw .bad { color: var(--danger); font-weight: 800; }
.pwbar i { background: var(--danger); }
.pwbar i.ok { background: var(--ok); }
.surprise { border-color: var(--violet); box-shadow: 0 0 22px rgba(167, 123, 255, 0.3); }
.surprise .sys-label { color: var(--violet); }
.next-rival { font-size: 14px; }

/* Бой */
.screen.battle { gap: 10px; }
.stage { position: relative; width: 100%; aspect-ratio: 4 / 5; max-height: 60vh; min-height: 340px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #07060f; touch-action: none; user-select: none; }
.arena3d { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.fhud { position: absolute; top: 8px; left: 8px; right: 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: start; z-index: 2; }
.fside { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fside.right { align-items: flex-end; }
.fname { font: 13px var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; text-shadow: 0 1px 4px #000; }
.fmid { font: 12px var(--f-display); color: var(--gold); padding-top: 2px; }
.fbar { width: 100%; height: 14px; background: rgba(0, 0, 0, 0.6); border: 1px solid #7a6a3a; transform: skewX(-14deg); overflow: hidden; }
.fbar i { display: block; height: 100%; width: 100%; background: linear-gradient(180deg, #ffd25a, #e0571f); transition: width 0.2s; }
.fbar.me i { background: linear-gradient(180deg, #8af5c0, #1fae6a); }
.fside.right .fbar i { margin-left: auto; }
.quit { position: absolute; top: 36px; right: 8px; z-index: 3; background: rgba(0, 0, 0, 0.5); border: 1px solid var(--line); color: var(--muted); border-radius: 50%; width: 30px; height: 30px; cursor: pointer; }
.combo { position: absolute; left: 12px; top: 44px; font: 18px var(--f-display); color: var(--gold); text-shadow: 0 0 10px #000; z-index: 2; }
.warn { position: absolute; top: 18%; left: 0; right: 0; text-align: center; font: 72px var(--f-display); color: var(--danger); text-shadow: 0 0 24px var(--danger); animation: blink 0.25s infinite alternate; z-index: 2; pointer-events: none; }
@keyframes blink { to { opacity: 0.35; transform: scale(1.15); } }
.banner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 64px var(--f-display); opacity: 0; pointer-events: none; z-index: 4; text-shadow: 0 0 30px rgba(79, 179, 255, 0.9); }
.banner.show { animation: bannerIn 0.5s cubic-bezier(.2, 1.6, .4, 1) forwards; }
.banner.ko { color: var(--gold); font-size: 96px; text-shadow: 0 0 40px rgba(244, 201, 93, 0.9); }
.banner.lose { color: var(--danger); text-shadow: 0 0 30px var(--danger); font-size: 44px; }
.banner.super { color: #d6c3ff; font-size: 44px; text-shadow: 0 0 30px var(--violet); }
.banner.go { color: #fff; }
@keyframes bannerIn { from { opacity: 0; transform: scale(2.2); } to { opacity: 1; transform: scale(1); } }
.dmg-layer { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.dmg { position: absolute; transform: translate(-50%, -50%); font: 26px var(--f-display); color: #fff; text-shadow: 0 0 8px #000, 0 0 2px #000; animation: dmgUp 0.9s ease-out forwards; white-space: nowrap; }
.dmg.crit { color: var(--gold); font-size: 32px; }
.dmg.sup { color: #d6c3ff; font-size: 44px; }
.dmg.hurt { color: var(--danger); }
.dmg.blk { color: #9fd6ff; font-size: 18px; }
.dmg.dodge { color: var(--ok); font-size: 18px; }
@keyframes dmgUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.6); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.2); } 100% { opacity: 0; transform: translate(-50%, -180%) scale(1); } }
.vig { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 90px rgba(255, 30, 60, 0.85); opacity: 0; z-index: 2; }
.vig.on { animation: vig 0.45s ease-out; }
@keyframes vig { 20% { opacity: 1; } 100% { opacity: 0; } }
.loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 16px var(--f-display); color: var(--sys); background: #07060f; z-index: 5; }
.tut { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(4, 6, 14, 0.75); z-index: 6; }
.tut .steps { padding-left: 18px; font-size: 14px; }
.meter-wrap { display: flex; align-items: center; gap: 10px; }
.fbar.meter { height: 10px; border-color: var(--violet); }
.fbar.meter i { width: 0; background: linear-gradient(90deg, #6a3df0, #c4a6ff); }
.controls { display: grid; grid-template-columns: 1fr 1fr 1.6fr; grid-template-rows: auto auto; gap: 8px; }
.ctl { font: 16px var(--f-display); padding: 18px 6px; border-radius: 10px; cursor: pointer; color: var(--text); border: 1px solid var(--line); background: var(--bg2); touch-action: none; user-select: none; -webkit-user-select: none; }
.ctl:active { transform: scale(0.96); }
.ctl.hit { grid-column: 3; grid-row: 1 / span 2; font-size: 24px; background: linear-gradient(180deg, #2d8cff, #1452c0); border-color: #6cc0ff; box-shadow: 0 0 20px rgba(45, 140, 255, 0.45); }
.ctl.block { grid-column: 1; grid-row: 1; }
.ctl.dodge { grid-column: 2; grid-row: 1; }
.ctl.super { grid-column: 1 / span 2; grid-row: 2; }
.ctl.super.ready { border-color: var(--violet); background: linear-gradient(180deg, #8a5cff, #5a2fd0); box-shadow: 0 0 22px rgba(167, 123, 255, 0.7); animation: pulse 1s infinite; }
.ctl:disabled { opacity: 0.4; }

/* Награды */
.lvlup { font: 96px var(--f-display); text-align: center; color: var(--gold); text-shadow: 0 0 40px rgba(244, 201, 93, 0.8); animation: bannerIn 0.6s cubic-bezier(.2, 1.6, .4, 1); }
.box-anim { display: flex; justify-content: center; padding: 6px 0 10px; }
.box-anim .box { width: 84px; height: 70px; border-radius: 8px; background: linear-gradient(180deg, #3a5a9a, #1d2f5a); border: 2px solid var(--sys); animation: shakeBox 0.6s ease 2, openBox 0.4s 1.2s ease forwards; }
.box-anim.r .box { background: linear-gradient(180deg, #7a52d8, #3c2378); border-color: var(--violet); }
.box-anim.l .box { background: linear-gradient(180deg, #f4c95d, #a8741c); border-color: #ffe39b; }
@keyframes shakeBox { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes openBox { to { transform: scale(1.5); opacity: 0; filter: brightness(3); } }
.loot.reveal { opacity: 0; animation: rise 0.4s 1.4s ease forwards; }
.hero-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.floor .btn { justify-self: end; }
.floor { cursor: default; }
@media (prefers-reduced-motion: reduce) { .banner.show, .dmg, .pulse, .box-anim .box, .ctl.super.ready { animation-duration: 0.01s !important; } .loot.reveal { opacity: 1; } }

/* Нижнее меню */
body.has-nav #app { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 8;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end;
  max-width: 560px; margin: 0 auto; padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(7, 10, 20, 0), rgba(7, 10, 20, 0.96) 30%);
}
.tabbar button {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: 0; color: var(--muted); font: 700 11px var(--f-body); padding: 6px 2px; cursor: pointer;
}
.tabbar .ti { font-size: 20px; line-height: 1; }
.tabbar button.on { color: var(--sys); }
.tabbar .fightbtn {
  margin-top: -26px; height: 78px; border-radius: 50%; aspect-ratio: 1; justify-self: center;
  background: radial-gradient(circle at 50% 35%, #4aa3ff, #1452c0); border: 2px solid #8fd0ff; color: #fff;
  box-shadow: 0 0 24px rgba(45, 140, 255, 0.7); justify-content: center; animation: pulse 2s ease-in-out infinite;
}
.tabbar .fightbtn span { font: 16px var(--f-display); }
.tabbar .fightbtn small { font: 700 9px var(--f-body); opacity: 0.85; white-space: nowrap; }
.tabbar .fightbtn.empty { background: radial-gradient(circle at 50% 35%, #3a4560, #1c2236); border-color: var(--line); box-shadow: none; animation: none; color: var(--muted); }
.dot { position: absolute; top: 2px; right: 18%; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 8px var(--danger); }

/* Задание дня наверху */
.daily { gap: 10px; border-color: var(--gold); box-shadow: 0 0 22px rgba(244, 201, 93, 0.22); }
.daily .sys-label { color: var(--gold); }
.daily.done { border-color: var(--ok); box-shadow: 0 0 18px rgba(63, 224, 160, 0.2); }
.daily.done .sys-label { color: var(--ok); }
.daily-top { display: flex; flex-direction: column; gap: 2px; }
.daily-top b { font: 20px var(--f-display); }
.daily .daily-list .dq { padding: 8px 10px; }
@media (prefers-reduced-motion: reduce) { .tabbar .fightbtn { animation: none; } }
.daily .daily-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.daily .daily-list .dq { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 6px; }
.daily .daily-list .dq .muted { display: none; }
.daily .daily-list .dq-name { font-size: 13px; overflow-wrap: anywhere; }
.daily .daily-list .dq-prog { font-size: 14px; }
.daily > p.muted { display: none; }
