/* ============================================================
   ЭХО-9: Последний сигнал — тема (vanilla CSS, без сборки)
   ============================================================ */

@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('../fonts/manrope-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('../fonts/manrope-400-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 200 900; font-display: swap; src: url('../fonts/unbounded-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 200 900; font-display: swap; src: url('../fonts/unbounded-400-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --amber: #f0b429;
  --amber-2: #ffd166;
  --red: #e5484d;
  --green: #7ee2b8;
  --sky: #8fb6d8;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #000;
  color: #fff;
  font-family: 'Manrope', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
.font-display { font-family: 'Manrope', 'Unbounded', system-ui, sans-serif; font-weight: 800; letter-spacing: 0.02em; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
h1, h2, h3, p { margin: 0; }

/* ---------- фон и кино-оверлеи ---------- */
#bg-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; animation: kenburns 36s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.07); } }

.film { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.grain { position: absolute; inset: -100px; opacity: 0.09; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E"); animation: grainShift 0.9s steps(4) infinite; }
@keyframes grainShift { 0% { transform: translate(0, 0); } 25% { transform: translate(-14px, 8px); } 50% { transform: translate(10px, -10px); } 75% { transform: translate(-6px, 14px); } 100% { transform: translate(0, 0); } }
.scanlines { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,0.16) 0 1px, transparent 1px 3px); }
.vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 52%, rgba(0,0,0,0.55) 100%); }

/* ---------- каретка / анимации текста ---------- */
.caret { display: inline-block; width: 8px; height: 16px; margin-left: 3px; vertical-align: middle; background: rgba(255,235,200,0.85); animation: blink 0.8s step-end infinite; }
.caret.amber { background: rgba(255,209,102,0.85); }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- всплывающий урон ---------- */
.floats { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.float-up { position: absolute; font-weight: 900; font-size: 19px; animation: floatUp 1.35s cubic-bezier(0.2, 0.8, 0.4, 1) forwards; }
.float-up.crit { font-size: 25px; }
@keyframes floatUp { 0% { transform: translateY(4px); opacity: 1; } 70% { opacity: 1; } 100% { transform: translateY(-46px); opacity: 0; } }

/* ---------- HUD ---------- */
.hud { position: fixed; inset-inline: 0; top: 0; z-index: 30; border-bottom: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.55); backdrop-filter: blur(10px); }
.hud-in { max-width: 1024px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 8px 20px; }
.hud-hero { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.hud-ava { display: flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 999px; font-weight: 700; color: #000; font-size: 14px; }
.hud-hero-name { font-size: 12px; font-weight: 800; letter-spacing: 0.05em; color: rgba(255,255,255,0.92); }
.hud-lvl { margin-left: 6px; border-radius: 4px; background: rgba(255,255,255,0.1); padding: 1px 6px; font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.72); }
.hud-bars { flex: 1; min-width: 190px; display: flex; flex-direction: column; gap: 4px; }
.hud-row { display: flex; align-items: center; gap: 8px; }
.hud-lab { width: 20px; font-size: 10px; font-weight: 700; }
.hud-lab.red { color: #f87171; } .hud-lab.amber { color: #fcd34d; }
.hud-val { width: 56px; text-align: right; font-size: 10px; color: rgba(255,255,255,0.7); }
.hud-moral { min-width: 130px; }
.hud-moral-head { display: flex; justify-content: space-between; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.5); margin-bottom: 2px; }
.moral-track { position: relative; height: 8px; border-radius: 999px; overflow: hidden; background: linear-gradient(90deg, #e5484d, #3a3f4a, #7ee2b8); }
.moral-pin { position: absolute; top: 50%; width: 6px; height: 14px; transform: translateY(-50%); border-radius: 2px; background: #fff; box-shadow: 0 0 6px #fff; transition: left 0.7s; }
.hud-items { display: flex; align-items: center; gap: 6px; }
.item-chip { position: relative; display: flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 6px; background: rgba(255,255,255,0.05); font-size: 14px; color: rgba(255,255,255,0.8); outline: 1px solid rgba(255,255,255,0.15); }
.item-n { position: absolute; bottom: -4px; right: -4px; border-radius: 4px; background: #000; padding: 0 3px; font-size: 9px; font-weight: 700; color: rgba(255,255,255,0.8); }
.icon-btn { display: flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 6px; background: rgba(255,255,255,0.05); font-size: 14px; outline: 1px solid rgba(255,255,255,0.15); transition: background 0.2s; }
.icon-btn:hover { background: rgba(255,255,255,0.15); }

/* ---------- бары ---------- */
.bar { position: relative; width: 100%; height: 8px; border-radius: 999px; background: rgba(0,0,0,0.6); overflow: hidden; outline: 1px solid rgba(255,255,255,0.1); }
.bar.h1 { height: 4px; } .bar.h15 { height: 6px; }
.bar .bar-fill { height: 100%; border-radius: 999px; transition: width 0.5s; }
.bar.en { height: 6px; margin-top: 8px; }
.w24 { width: 96px; }

/* ---------- экраны ---------- */
.screen { position: relative; z-index: 20; min-height: 100vh; }
.sup { font-size: 11px; text-transform: uppercase; letter-spacing: 0.4em; color: rgba(255,255,255,0.4); }
.sup2 { font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(255,255,255,0.4); }
.sup.red { color: rgba(252,165,165,0.7); }
.sup.amber { color: rgba(253,230,138,0.7); }
.dim { color: rgba(255,255,255,0.7); }
.bright { color: rgba(255,255,255,0.92); }
.bold { font-weight: 700; }
.dim-small { font-size: 11px; color: rgba(255,255,255,0.3); }
.text-center { text-align: center; }

/* ---------- титул ---------- */
.screen-title { display: flex; flex-direction: column; align-items: center; justify-content: center; justify-content: safe center; text-align: center; padding: 0 16px; height: 100vh; overflow-y: auto; scrollbar-width: thin; }
.title-mid { display: flex; flex-direction: column; align-items: center; }
.title-sup { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4em; color: rgba(255,255,255,0.4); }
.title-sup .rule { display: inline-block; width: 40px; height: 1px; background: rgba(255,255,255,0.3); }
.glitch-title { font-size: clamp(64px, 17vw, 110px); font-weight: 900; line-height: 1; letter-spacing: -0.02em; color: #fff;
  text-shadow: 0 0 34px rgba(150,180,255,0.35), 2px 0 rgba(255,60,60,0.4), -2px 0 rgba(60,220,255,0.4); }
.glitching { animation: glitchAnim 0.28s steps(2) 1; }
@keyframes glitchAnim {
  0% { transform: translate(0); clip-path: inset(0); }
  25% { transform: translate(-4px, 2px); clip-path: inset(12% 0 40% 0); }
  50% { transform: translate(3px, -2px); clip-path: inset(60% 0 8% 0); }
  75% { transform: translate(-2px, 1px); clip-path: inset(30% 0 20% 0); }
  100% { transform: translate(0); clip-path: inset(0); }
}
.title-sub { margin-top: 8px; font-size: clamp(16px, 2.4vw, 24px); letter-spacing: 0.5em; color: rgba(253,230,138,0.8); }
.title-desc { margin-top: 24px; max-width: 576px; font-size: 14px; line-height: 1.7; color: rgba(255,255,255,0.6); }
.btn-start { margin-top: 40px; padding: 16px 40px; border-radius: 10px; border: 1px solid rgba(252,211,77,0.4); background: rgba(252,211,77,0.1); font-size: 15px; font-weight: 700; letter-spacing: 0.3em; color: #fde68a; transition: all 0.3s; }
.btn-start:hover { transform: scale(1.05); background: rgba(252,211,77,0.2); color: #fef3c7; box-shadow: 0 0 30px rgba(240,180,60,0.35); }
.title-foot { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); font-size: 11px; color: rgba(255,255,255,0.35); }
.title-meta { position: absolute; top: 16px; right: 16px; text-align: right; font-size: 10px; line-height: 1.7; color: rgba(255,255,255,0.25); }

/* ---------- выбор героя ---------- */
.screen-select { display: flex; flex-direction: column; justify-content: center; justify-content: safe center; max-width: 1152px; margin: 0 auto; padding: 96px 24px; height: 100vh; overflow: hidden; }
.select-head h2 { margin-top: 4px; font-size: clamp(26px, 4vw, 36px); }
.select-sub { margin-top: 8px; max-width: 640px; font-size: 14px; color: rgba(255,255,255,0.55); }
.hero-grid { margin-top: 32px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); flex: 0 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent; align-content: start; }
.hero-card { position: relative; display: flex; flex-direction: column; padding: 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.4); text-align: left; transition: all 0.3s; }
.hero-card:hover { background: rgba(255,255,255,0.04); }
.hero-card.selected { transform: scale(1.02); background: rgba(255,255,255,0.07); }
.hero-ava { display: flex; width: 48px; height: 48px; align-items: center; justify-content: center; margin-bottom: 12px; border-radius: 10px; font-size: 20px; color: #000; }
.hero-name { font-size: 16px; color: #fff; }
.hero-role { font-size: 11px; text-transform: uppercase; letter-spacing: 0.25em; }
.hero-bio { margin-top: 12px; font-size: 12px; line-height: 1.6; color: rgba(255,255,255,0.55); }
.hero-quip { margin-top: 8px; font-size: 12px; font-style: italic; color: rgba(255,255,255,0.4); }
.hero-stats { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.stat-row { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.stat-lab { width: 76px; color: rgba(255,255,255,0.5); }
.stat-val { width: 32px; text-align: right; color: rgba(255,255,255,0.7); }
.hero-abilities { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; gap: 8px; }
.ab-row { display: flex; gap: 8px; }
.ab-icon { font-size: 14px; }
.ab-name { font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.85); }
.ab-cost { margin-left: 6px; font-size: 10px; color: rgba(252,211,77,0.8); font-family: ui-monospace, monospace; }
.ab-desc { font-size: 11px; line-height: 1.4; color: rgba(255,255,255,0.45); }
.hero-passive { margin-top: 12px; padding: 10px; border-radius: 8px; background: rgba(255,255,255,0.05); }
.hero-cta { margin-top: 16px; padding: 8px; border-radius: 8px; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: 0.3em; color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.06); }
.hero-card.selected .hero-cta { color: #000; }
.select-foot { margin-top: 32px; display: flex; justify-content: center; flex: 0 0 auto; }
.btn-go { padding: 16px 40px; border-radius: 10px; background: rgba(255,255,255,0.05); font-size: 14px; font-weight: 700; letter-spacing: 0.3em; color: rgba(255,255,255,0.3); }
.btn-go.ready { background: #fff; color: #000; }
.btn-go.ready:hover { transform: scale(1.05); box-shadow: 0 0 30px rgba(255,255,255,0.3); }

/* ---------- сюжет ---------- */
.screen-story { display: flex; flex-direction: column; justify-content: flex-end; height: 100vh; max-width: 768px; margin: 0 auto; padding: 96px 16px 28px; }
.story-zone { position: fixed; inset: 0; z-index: 19; display: flex; flex-direction: column; justify-content: flex-end; max-width: 768px; margin: 0 auto; padding: 96px 16px 28px; cursor: default; user-select: none; }
.story-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; flex: 0 0 auto; }
.chapter-tag { padding: 4px 10px; border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; background: rgba(0,0,0,0.5); font-size: 10px; font-weight: 700; letter-spacing: 0.3em; color: rgba(253,230,138,0.9); }
.story-head h2 { font-size: clamp(20px, 3vw, 24px); color: rgba(255,255,255,0.95); }
.alarm-tag { padding: 2px 8px; border: 1px solid rgba(239,68,68,0.5); border-radius: 6px; background: rgba(239,68,68,0.1); font-size: 10px; font-weight: 700; letter-spacing: 0.2em; color: #fca5a5; animation: pulse-opacity 2s infinite; }
@keyframes pulse-opacity { 50% { opacity: 0.55; } }
.story-body { display: flex; flex-direction: column; gap: 16px; padding: 20px 24px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.6); box-shadow: 0 25px 50px rgba(0,0,0,0.5); backdrop-filter: blur(10px); flex: 0 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent; }
.story-body::-webkit-scrollbar { width: 6px; }
.story-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 999px; }
.story-body p { font-size: 14px; line-height: 1.75; }
.skip-hint { text-align: right; font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(255,255,255,0.3); }
.story-actions { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; flex: 0 0 auto; }
.btn-combat { padding: 16px 24px; border-radius: 10px; border: 1px solid rgba(239,68,68,0.5); background: rgba(239,68,68,0.1); font-size: 15px; font-weight: 700; letter-spacing: 0.25em; color: #fecaca; transition: all 0.3s; }
.btn-combat:hover { background: rgba(239,68,68,0.25); box-shadow: 0 0 25px rgba(229,72,77,0.3); }
.btn-choice { display: block; width: 100%; padding: 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.15); background: rgba(0,0,0,0.55); text-align: left; transition: all 0.2s; }
.btn-choice:hover { border-color: rgba(253,230,138,0.5); background: rgba(255,255,255,0.07); box-shadow: 0 0 22px rgba(240,180,60,0.15); }
.choice-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.choice-text { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.9); }
.choice-arrow { margin-right: 8px; color: rgba(253,230,138,0.7); }
.btn-choice:hover .choice-arrow { color: #fde68a; transform: translateX(2px); }
.moral-chip { flex-shrink: 0; padding: 2px 8px; border-radius: 6px; font-size: 10px; font-weight: 700; }
.moral-chip.up { background: rgba(52,211,153,0.1); color: #6ee7b7; outline: 1px solid rgba(52,211,153,0.3); }
.moral-chip.down { background: rgba(248,113,113,0.1); color: #fca5a5; outline: 1px solid rgba(248,113,113,0.3); }
.choice-hint { margin-top: 4px; padding-left: 24px; font-size: 11px; font-style: italic; color: rgba(255,255,255,0.4); }
.btn-next { padding: 16px 24px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); font-size: 14px; font-weight: 700; letter-spacing: 0.3em; color: rgba(255,255,255,0.85); transition: all 0.3s; }
.btn-next:hover { background: rgba(255,255,255,0.1); box-shadow: 0 0 22px rgba(255,255,255,0.12); }
.btn-next.full { width: 100%; margin-top: 24px; }

/* ---------- бой ---------- */
.screen-combat { position: relative; max-width: 1024px; margin: 0 auto; padding: 88px 16px 32px; height: 100vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent; }
.combat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.combat-head h2 { margin-top: 2px; font-size: clamp(20px, 3vw, 24px); }
.combat-head .sup { font-size: 10px; letter-spacing: 0.4em; }
.phase-announce { margin-bottom: 16px; padding: 16px; border: 1px solid rgba(232,121,249,0.5); border-radius: 10px; background: rgba(217,70,239,0.1); text-align: center; font-size: 15px; font-weight: 700; letter-spacing: 0.2em; color: #f5d0fe; animation: pulse-opacity 1.6s infinite; }
.cb-body { animation: none; }
.cb-shake.shaking { animation: shakeAnim 0.4s; }
@keyframes shakeAnim { 0%,100% { transform: translateX(0); } 15% { transform: translateX(-12px); } 35% { transform: translateX(10px); } 55% { transform: translateX(-7px); } 75% { transform: translateX(4px); } }
.enemy-grid { display: grid; gap: 12px; }
.enemy-grid.multi { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.enemy-card { position: relative; width: 100%; padding: 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.5); text-align: left; transition: all 0.3s; }
.enemy-card.targeting { cursor: crosshair; border-color: rgba(252,211,77,0.7); background: rgba(69,10,10,0.4); }
.enemy-card.targeting:hover { transform: scale(1.03); box-shadow: 0 0 30px rgba(255,200,80,0.3); }
.enemy-card.dead { opacity: 0.4; filter: grayscale(1); border-color: rgba(255,255,255,0.05); background: rgba(0,0,0,0.4); }
.enemy-card-in { display: flex; align-items: center; gap: 12px; }
.enemy-sprite { flex-shrink: 0; }
.enemy-info { min-width: 0; flex: 1; }
.enemy-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.enemy-name { font-size: 14px; color: rgba(255,255,255,0.95); }
.phase-tag { margin-left: 8px; padding: 1px 6px; border-radius: 4px; background: rgba(217,70,239,0.2); font-size: 9px; font-weight: 700; color: #f0abfc; outline: 1px solid rgba(232,121,249,0.5); }
.stun-tag { padding: 1px 6px; border-radius: 4px; background: rgba(250,204,21,0.15); font-size: 9px; font-weight: 700; color: #fde047; outline: 1px solid rgba(250,204,21,0.4); white-space: nowrap; }
.enemy-kind { margin-bottom: 8px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(255,255,255,0.4); }
.enemy-nums { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 10px; color: rgba(255,255,255,0.6); }
.sky { color: #7dd3fc; }
.buff-chips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.buff-chip { padding: 1px 6px; border-radius: 4px; font-size: 9px; font-weight: 700; }
.buff-chip.good { background: rgba(52,211,153,0.1); color: #6ee7b7; outline: 1px solid rgba(52,211,153,0.4); }
.buff-chip.bad { background: rgba(239,68,68,0.15); color: #fca5a5; outline: 1px solid rgba(248,113,113,0.4); }
.target-badge { position: absolute; left: 0; right: 0; bottom: 6px; display: flex; justify-content: center; pointer-events: none; color: #fde68a; font-size: 10px; letter-spacing: 0.3em; animation: pulse-opacity 1.2s infinite; }
.targeting-banner { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border: 1px solid rgba(252,211,77,0.5); border-radius: 10px; background: rgba(252,211,77,0.1); font-size: 12px; font-weight: 700; letter-spacing: 0.25em; color: #fde68a; }
.cancel-btn { padding: 4px 12px; border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; font-size: 10px; letter-spacing: 0.2em; color: rgba(255,255,255,0.7); }
.cancel-btn:hover { background: rgba(255,255,255,0.1); }
.combat-cols { margin-top: 16px; display: grid; gap: 12px; }
@media (min-width: 1024px) { .combat-cols { grid-template-columns: 1fr 290px; } }
.allies-col { display: flex; flex-direction: column; gap: 12px; }
.ally-panel { position: relative; padding: 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.4); }
.ally-panel.hero { background: rgba(0,0,0,0.6); }
.ally-body { position: relative; }
.lvl-tag { margin-left: 8px; padding: 1px 6px; border-radius: 4px; background: rgba(255,255,255,0.1); font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.7); }
.ally-dead { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(0,0,0,0.7); font-size: 12px; letter-spacing: 0.3em; color: #fca5a5; }
.action-panel { padding: 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.6); }
.turn-note { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.3em; color: #6ee7b7; }
.dot { width: 8px; height: 8px; border-radius: 999px; animation: pulse-opacity 1.4s infinite; }
.dot.green { background: #34d399; } .dot.red { background: #f87171; }
.action-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 640px) { .action-grid { grid-template-columns: repeat(4, 1fr); } }
.act-btn { padding: 12px 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.85); transition: all 0.2s; }
.act-btn:hover { border-color: rgba(248,113,113,0.6); background: rgba(248,113,113,0.1); color: #fecaca; }
.act-btn.off { opacity: 0.35; cursor: not-allowed; }
.act-btn:hover:not(.off) { border-color: rgba(252,211,77,0.6); background: rgba(252,211,77,0.1); color: #fde68a; }
.items-block { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.1); }
.items-row { display: flex; flex-wrap: wrap; gap: 8px; }
.item-btn { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); font-size: 12px; color: rgba(255,255,255,0.85); transition: all 0.2s; }
.item-btn:hover { border-color: rgba(52,211,153,0.6); background: rgba(52,211,153,0.1); }
.chip { border-radius: 4px; background: #000; padding: 0 4px; font-size: 10px; color: rgba(255,255,255,0.7); }
.wait-panel { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.6); font-size: 12px; letter-spacing: 0.3em; color: rgba(255,255,255,0.6); }
.log-panel { padding: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.6); }
.log-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.3em; color: rgba(255,255,255,0.4); }
.log-scroll { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.log-line { font-size: 11px; line-height: 1.45; }
.log-line.l0 { color: rgba(255,255,255,0.85); }
.log-line.l1 { color: rgba(255,255,255,0.55); }
.log-line.l2 { color: rgba(255,255,255,0.35); }

/* оверлеи победы/поражения */
.ov-back { position: fixed; inset: 0; z-index: -1; background: rgba(0,0,0,0.85); backdrop-filter: blur(4px); }
.ov-back.dark { background: rgba(0,0,0,0.9); }
.ov-card { position: relative; margin: 0 auto; max-width: 448px; max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: thin; padding: 24px; border-radius: 16px; border: 1px solid rgba(52,211,153,0.4); background: #09090b; text-align: center; box-shadow: 0 0 60px rgba(120,220,160,0.15); }
.ov-card.defeat { border-color: rgba(239,68,68,0.4); box-shadow: 0 0 60px rgba(229,72,77,0.15); }
#cb-overlays { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; pointer-events: none; }
#cb-overlays > * { pointer-events: auto; }
.ov-title { font-size: 30px; letter-spacing: 0.15em; }
.ov-title.win { color: #6ee7b7; }
.ov-title.lose { color: #f87171; }
.ov-sub { margin-top: 4px; font-size: 12px; color: rgba(255,255,255,0.5); }
.ov-stats { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.ov-row { display: flex; justify-content: space-between; padding: 8px 16px; border-radius: 10px; background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.6); }
.amber { color: #fcd34d; }
.loot-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 12px; border-radius: 10px; background: rgba(255,255,255,0.05); }
.loot-chip { padding: 4px 10px; border-radius: 6px; background: rgba(0,0,0,0.6); font-size: 12px; color: rgba(255,255,255,0.8); outline: 1px solid rgba(255,255,255,0.15); }
.btn-victory { margin-top: 24px; width: 100%; padding: 14px; border-radius: 10px; background: #34d399; font-size: 14px; font-weight: 700; letter-spacing: 0.3em; color: #000; transition: all 0.2s; }
.btn-victory:hover { transform: scale(1.02); box-shadow: 0 0 25px rgba(120,220,160,0.4); }
.ov-desc { margin-top: 12px; font-size: 14px; line-height: 1.7; color: rgba(255,255,255,0.6); }
.ov-btns { margin-top: 24px; display: flex; flex-direction: column; gap: 8px; }
.btn-retry { padding: 14px; border-radius: 10px; background: #f87171; font-size: 14px; font-weight: 700; letter-spacing: 0.3em; color: #000; transition: all 0.2s; }
.btn-retry:hover { transform: scale(1.02); box-shadow: 0 0 25px rgba(229,72,77,0.4); }
.btn-menu { padding: 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.15); font-size: 12px; letter-spacing: 0.2em; color: rgba(255,255,255,0.6); transition: background 0.2s; }
.btn-menu:hover { background: rgba(255,255,255,0.1); }

/* ---------- модалка уровня ---------- */
.lvl-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,0.8); backdrop-filter: blur(4px); }
.lvl-card { width: 100%; max-width: 672px; max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: thin; padding: 24px; border-radius: 16px; border: 1px solid rgba(252,211,77,0.4); background: #09090b; box-shadow: 0 0 60px rgba(240,180,60,0.2); }
.lvl-title { margin-top: 4px; font-size: 30px; color: #fde68a; }
.perk-grid { margin-top: 20px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.perk-btn { padding: 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); text-align: left; transition: all 0.2s; }
.perk-btn:hover { border-color: rgba(252,211,77,0.5); background: rgba(252,211,77,0.1); box-shadow: 0 0 20px rgba(240,180,60,0.2); }
.perk-name { font-size: 14px; color: #fef3c7; }
.perk-desc { margin-top: 4px; font-size: 12px; line-height: 1.5; color: rgba(255,255,255,0.55); }

/* ---------- финал ---------- */
.screen-ending { display: flex; flex-direction: column; justify-content: center; justify-content: safe center; max-width: 768px; margin: 0 auto; padding: 96px 16px 64px; height: 100vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent; }
.ending-head { text-align: center; }
.ending-head .sup { letter-spacing: 0.5em; }
.ending-title { margin-top: 12px; font-size: clamp(40px, 8vw, 60px); letter-spacing: 0.2em; }
.ending-sub { margin-top: 8px; font-size: 14px; font-style: italic; color: rgba(255,255,255,0.55); }
.ending-body { margin-top: 32px; display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.6); backdrop-filter: blur(10px); cursor: pointer; }
.ending-body p { font-size: 14px; line-height: 1.75; }
.ending-report { margin-top: 24px; padding: 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.6); }
.ending-report .sup2 { margin-bottom: 12px; letter-spacing: 0.3em; }
.report-grid { display: grid; gap: 8px; margin-bottom: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.report-row { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 6px; background: rgba(255,255,255,0.05); font-size: 12px; }
.endings-note { margin-top: 12px; text-align: center; font-size: 11px; color: rgba(255,255,255,0.3); }

/* ---------- катсцены ---------- */
.cine-wrap { position: fixed; inset: 0; z-index: 40; overflow: hidden; background: #000; user-select: none; }
.cine-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cine-bars { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.cine-bar { position: absolute; left: 0; right: 0; height: 6vh; background: #000; }
.cine-bar.top { top: 0; } .cine-bar.bottom { bottom: 0; }
.cine-card { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.cine-card-chapter { font-size: 11px; font-weight: 700; letter-spacing: 0.5em; color: rgba(253,230,138,0.8); }
.cine-card-title { margin-top: 12px; font-size: clamp(30px, 6vw, 60px); font-weight: 900; letter-spacing: 0.18em; color: #fff; text-shadow: 0 0 28px rgba(255,255,255,0.3); }
.cine-skip { position: absolute; right: 12px; top: 7.5vh; z-index: 30; padding: 6px 12px; border: 1px solid rgba(255,255,255,0.25); border-radius: 6px; background: rgba(0,0,0,0.6); font-size: 10px; font-weight: 700; letter-spacing: 0.25em; color: rgba(255,255,255,0.6); transition: all 0.2s; }
.cine-skip:hover { border-color: rgba(253,230,138,0.6); color: #fde68a; }
.cine-dialog { position: absolute; left: 0; right: 0; bottom: 7.5vh; z-index: 20; padding: 0 16px; }
.cine-dialog > div { max-width: 768px; margin: 0 auto; }
.cine-cap { border-left: 4px solid rgba(253,230,138,0.7); padding: 16px; border-radius: 12px; border-top: 1px solid rgba(255,255,255,0.1); border-right: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.75); box-shadow: 0 25px 50px rgba(0,0,0,0.6); backdrop-filter: blur(8px); }
.cine-cap-text { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,0.85); }
.cine-await { margin-top: 6px; text-align: right; font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(255,255,255,0.35); }
.cine-speech { border: 2px solid rgba(255,209,102,0.4); padding: 16px; border-radius: 16px; background: rgba(0,0,0,0.8); box-shadow: 0 25px 50px rgba(0,0,0,0.6); backdrop-filter: blur(8px); }
.cine-speech-who { display: inline-block; margin-bottom: 6px; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 900; letter-spacing: 0.2em; }
.cine-speech-text { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,0.9); }
.cine-choice { position: absolute; left: 0; right: 0; bottom: 16vh; z-index: 30; padding: 0 16px; }
.cine-choice > div { max-width: 672px; margin: 0 auto; }
.cine-choice-prompt { text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 0.28em; color: rgba(253,230,138,0.9); margin-bottom: 8px; }
.cine-choice-btn { display: block; width: 100%; padding: 12px; margin-top: 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.7); text-align: left; transition: all 0.2s; }
.cine-choice-btn:hover { border-color: rgba(253,230,138,0.6); background: rgba(255,255,255,0.1); }
.cine-choice-label { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.9); }
.cine-choice-hint { margin-top: 2px; padding-left: 24px; font-size: 11px; font-style: italic; color: rgba(255,255,255,0.45); }
.cine-qte { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cine-qte-label { padding: 4px 12px; border-radius: 6px; background: rgba(0,0,0,0.7); font-size: 10px; font-weight: 700; letter-spacing: 0.3em; color: #fde68a; margin-bottom: 12px; }
.cine-qte-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 176px; height: 176px; border-radius: 999px; border: 4px solid #fcd34d; background: rgba(251,191,36,0.2); color: #fef3c7; box-shadow: 0 0 44px rgba(255,209,102,0.4); transition: transform 0.1s; }
.cine-qte-btn:active { transform: scale(0.95); }
.cine-qte-count { font-size: 30px; font-weight: 900; }
.cine-qte-sub { margin-top: 4px; font-size: 10px; letter-spacing: 0.2em; }
.cine-aim { position: absolute; left: 50%; top: 9vh; transform: translateX(-50%); z-index: 30; text-align: center; }
.cine-timerbar { height: 4px; width: 192px; border-radius: 999px; background: rgba(255,255,255,0.15); overflow: hidden; }
.cine-timerbar.w48 { width: 192px; margin-top: 16px; }
.cine-timerbar.w40 { width: 160px; margin-top: 8px; }
.cine-timerbar-fill { height: 100%; background: rgba(252,211,77,0.8); }
@keyframes cineTimer { from { width: 100%; } to { width: 0%; } }
@keyframes cinePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* ---------- низкие окна (DevTools / маленькие экраны): компактные отступы ---------- */
@media (max-height: 700px) {
  .screen-select { padding: 72px 24px 16px; }
  .screen-combat { padding: 72px 16px 16px; }
  .screen-ending { padding: 72px 16px 24px; }
  .hero-grid { margin-top: 16px; }
  .select-foot { margin-top: 16px; }
  /* компактные карточки героя: био/цитата/умения скрываются, карточка влезает в кадр */
  .hero-bio, .hero-quip, .hero-abilities { display: none; }
  .hero-card { padding: 14px; }
  .hero-ava { width: 40px; height: 40px; margin-bottom: 8px; font-size: 18px; }
  .hero-name { font-size: 15px; }
  .hero-stats { margin-top: 8px; }
  .story-body p { font-size: 13px; line-height: 1.6; }
  .enemy-card { padding: 12px; }
  .log-scroll { max-height: 140px; }
  .combat-head { margin-bottom: 8px; }
  .phase-announce { margin-bottom: 10px; padding: 10px; }
  .combat-cols { margin-top: 8px; gap: 8px; }
  .ally-panel, .action-panel, .log-panel { padding: 12px; }
  .action-grid { gap: 6px; }
  .act-btn { padding: 10px 6px; }
  .targeting-banner { margin-top: 8px; padding: 8px 12px; }
}

/* ---------- вау-эффекты боя ---------- */
.fx-layer { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
.fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx-flash { position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: var(--fx-a, 0.5); animation: fxFlashOut 0.46s ease-out forwards; }
@keyframes fxFlashOut { from { opacity: var(--fx-a, 0.5); } to { opacity: 0; } }
.fx-banner { position: fixed; left: 0; right: 0; top: 34%; z-index: 61; pointer-events: none; text-align: center; animation: fxBannerIn 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.fx-banner-main { font-size: clamp(26px, 4vw, 44px); font-weight: 800; letter-spacing: 0.22em; color: #ffd166; text-shadow: 0 0 30px rgba(240,180,60,0.75), 0 4px 24px rgba(0,0,0,0.9); }
.fx-banner-sub { margin-top: 6px; font-size: 11px; letter-spacing: 0.4em; text-transform: uppercase; color: rgba(255,255,255,0.6); }
@keyframes fxBannerIn { 0% { opacity: 0; transform: scale(1.6); } 18% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(0.94); } }
.fx-combo { position: fixed; right: 26px; top: 84px; z-index: 61; pointer-events: none; font-size: 30px; font-weight: 800; color: #ffd166; text-shadow: 0 0 18px rgba(240,180,60,0.8), 0 2px 10px rgba(0,0,0,0.9); animation: fxComboPop 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes fxComboPop { 0% { opacity: 0; transform: scale(2) rotate(-8deg); } 30% { opacity: 1; transform: scale(1) rotate(-3deg); } 100% { opacity: 0; transform: scale(0.9) rotate(-3deg); } }
.fx-slowmo { animation: fxSlowPulse 1.4s ease-in-out; }
@keyframes fxSlowPulse { 0% { filter: none; transform: none; } 22% { filter: saturate(1.6) contrast(1.18) brightness(1.12); transform: scale(1.012); } 60% { filter: saturate(1.25) contrast(1.08); transform: scale(1.006); } 100% { filter: none; transform: none; } }

/* декорации арены: прожекторы, голографический круг, толпа теней */
.arena-decor { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; border-radius: 12px; }
.arena-spot { position: absolute; top: -12%; width: 34%; height: 130%; opacity: 0.16; background: linear-gradient(180deg, rgba(255,214,120,0.85), rgba(255,214,120,0)); filter: blur(18px); transform-origin: top center; }
.arena-spot.a { left: 8%; animation: arenaSweepA 7s ease-in-out infinite alternate; }
.arena-spot.b { right: 8%; animation: arenaSweepB 9s ease-in-out infinite alternate; }
@keyframes arenaSweepA { from { transform: rotate(-14deg); } to { transform: rotate(12deg); } }
@keyframes arenaSweepB { from { transform: rotate(12deg); } to { transform: rotate(-14deg); } }
.arena-ring { position: absolute; left: 50%; bottom: 6%; width: 76%; height: 90px; transform: translateX(-50%); border-radius: 50%; border: 1.5px solid rgba(240,180,60,0.35); box-shadow: 0 0 40px rgba(240,180,60,0.14), inset 0 0 40px rgba(240,180,60,0.08); animation: arenaRingPulse 3.6s ease-in-out infinite; }
@keyframes arenaRingPulse { 50% { opacity: 0.55; box-shadow: 0 0 60px rgba(240,180,60,0.2), inset 0 0 60px rgba(240,180,60,0.1); } }
.arena-crowd { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; gap: 4px; height: 44px; opacity: 0.5; padding: 0 10px; }
.arena-crowd i { flex: 1; height: 55%; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, rgba(12,10,8,0.95), rgba(8,7,6,0.98)); box-shadow: inset 0 2px 0 rgba(240,180,60,0.1); animation: crowdWave 2.2s ease-in-out infinite; }
.arena-crowd i:nth-child(2n) { animation-delay: -0.5s; height: 68%; }
.arena-crowd i:nth-child(3n) { animation-delay: -1.1s; height: 48%; }
.arena-crowd i:nth-child(5n) { animation-delay: -1.6s; height: 74%; }
@keyframes crowdWave { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* хотспот прицела: большая кликабельная зона поверх всего экрана */
.cine-aim-hot { position: absolute; width: 230px; height: 230px; border-radius: 999px; transform: translate(-50%, -50%); z-index: 40; background: radial-gradient(circle, rgba(255,209,102,0.16) 0%, rgba(255,209,102,0.05) 52%, rgba(255,209,102,0) 70%); border: 2px dashed rgba(255,209,102,0.6); box-shadow: 0 0 30px rgba(255,209,102,0.25); cursor: crosshair; transition: transform 0.08s; }
.cine-aim-hot:active { transform: translate(-50%, -50%) scale(0.94); }
.cine-aim-hot::after { content: ''; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 999px; background: rgba(255,209,102,0.9); box-shadow: 0 0 12px rgba(255,209,102,0.8); }

/* ============================================================
   БЕСКОНЕЧНЫЙ КОСМОС — заставка уровня, карточки, сценки
   ============================================================ */
.screen-endless { position: absolute; inset: 0; overflow-y: auto; padding: 22px 18px 26px; display: flex; flex-direction: column; align-items: center; gap: 14px; z-index: 2; }
.endless-stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.endless-head, .endless-progress, .endless-cards, .endless-foot { position: relative; z-index: 2; }
.endless-head { text-align: center; max-width: 860px; }
.endless-title { font-size: clamp(22px, 3.4vw, 34px); letter-spacing: 0.12em; color: #f5f7ff; margin: 4px 0 6px; text-shadow: 0 0 22px rgba(216,143,240,0.35); }
.boss-tag { display: inline-block; margin-left: 10px; padding: 3px 10px; font-size: 12px; letter-spacing: 0.2em; color: #ffd166; border: 1px solid rgba(255,209,102,0.5); border-radius: 6px; background: rgba(255,209,102,0.08); vertical-align: middle; }
.endless-sub { font-size: 13px; line-height: 1.55; color: rgba(224,232,255,0.72); max-width: 640px; margin: 0 auto; }
.endless-progress { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 760px; }
.prog-chip { display: flex; flex-direction: column; gap: 2px; padding: 7px 14px; border: 1px solid rgba(143,182,216,0.22); border-radius: 9px; background: rgba(6,10,22,0.62); min-width: 118px; text-align: center; }
.prog-chip .mono { font-size: 15px; font-weight: 700; color: #eef2ff; }
.endless-cards { display: grid; grid-template-columns: repeat(3, minmax(210px, 258px)); gap: 12px; justify-content: center; }
.endless-cards.solo { grid-template-columns: minmax(240px, 330px); }
.endless-card { position: relative; border: 1px solid rgba(143,182,216,0.25); border-radius: 14px; background: linear-gradient(180deg, rgba(10,16,32,0.88), rgba(5,8,18,0.92)); padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s; }
.endless-card.current { border-color: rgba(216,143,240,0.65); box-shadow: 0 0 26px rgba(216,143,240,0.22), inset 0 0 30px rgba(216,143,240,0.08); transform: translateY(-3px); }
.endless-card.done { opacity: 0.4; filter: grayscale(0.6); }
.endless-card.boss { border-color: rgba(229,72,77,0.55); box-shadow: inset 0 0 40px rgba(229,72,77,0.1); }
.endless-card.boss.current { border-color: rgba(255,209,102,0.7); box-shadow: 0 0 30px rgba(229,72,77,0.3); }
.endless-sprite { width: 100%; height: 128px; }
.endless-card.boss .endless-sprite { height: 168px; }
.ec-top { display: flex; justify-content: space-between; align-items: center; }
.ec-idx { font-size: 11px; color: rgba(224,232,255,0.55); }
.ec-phases { font-size: 10px; letter-spacing: 0.18em; color: #ffd166; border: 1px solid rgba(255,209,102,0.45); border-radius: 5px; padding: 2px 7px; background: rgba(255,209,102,0.08); }
.ec-name { font-size: 15px; letter-spacing: 0.04em; color: #f5f7ff; margin-top: 2px; }
.ec-kind { font-size: 11px; color: rgba(224,232,255,0.5); font-style: italic; }
.ec-stats { display: flex; flex-wrap: wrap; gap: 5px 12px; font-size: 12px; color: #cfe0f5; margin-top: 5px; }
.ec-affixes { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.affix-chip { display: inline-block; padding: 3px 8px; font-size: 10.5px; letter-spacing: 0.05em; color: #ffd166; border: 1px solid rgba(255,209,102,0.35); border-radius: 999px; background: rgba(255,209,102,0.07); width: fit-content; }
.endless-foot { display: flex; flex-direction: column; align-items: center; gap: 9px; margin-top: 4px; }
.btn-endless-go { padding: 13px 30px; font-size: 16px; letter-spacing: 0.16em; color: #0b0f1e; background: linear-gradient(135deg, #ffd166, #f0b24a); border: none; border-radius: 11px; cursor: pointer; box-shadow: 0 0 26px rgba(255,209,102,0.4); transition: transform 0.12s; }
.btn-endless-go:hover { transform: translateY(-2px); }
.btn-endless-go:active { transform: scale(0.97); }

/* кнопка режима на титуле */
.btn-endless { display: block; margin: 10px auto 0; padding: 11px 26px; font-size: 14px; letter-spacing: 0.2em; color: #d8b4fe; background: rgba(216,143,240,0.08); border: 1px solid rgba(216,143,240,0.45); border-radius: 10px; cursor: pointer; transition: all 0.15s; }
.btn-endless:hover { background: rgba(216,143,240,0.18); box-shadow: 0 0 22px rgba(216,143,240,0.3); }

/* мультяшная комикс-надпись удара */
.fx-comic { position: absolute; z-index: 60; font-size: 26px; font-weight: 900; letter-spacing: 0.02em; color: #ffd166; background: #1a0d02; border: 3px solid #ffd166; padding: 4px 12px; border-radius: 8px; transform: translate(-50%, -50%) rotate(-7deg) scale(0.6); box-shadow: 4px 4px 0 #7c2d12, 0 0 24px rgba(255,209,102,0.5); pointer-events: none; animation: comicPop 0.85s cubic-bezier(0.2, 1.6, 0.4, 1) forwards; text-shadow: 0 0 12px rgba(255,209,102,0.6); }
@keyframes comicPop { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(-7deg) scale(0.5); } 22% { opacity: 1; transform: translate(-50%, -58%) rotate(-4deg) scale(1.18); } 45% { transform: translate(-50%, -50%) rotate(3deg) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -80%) rotate(0deg) scale(0.9); } }

/* мультяшная тряска карточки врага и всего поля */
.hit-shake { animation: cardShake 0.34s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes cardShake { 0%, 100% { transform: translateX(0) rotate(0); } 20% { transform: translateX(-7px) rotate(-1.4deg); } 40% { transform: translateX(6px) rotate(1.2deg); } 60% { transform: translateX(-4px) rotate(-0.8deg); } 80% { transform: translateX(3px) rotate(0.5deg); } }
.shake-hard { animation: fieldShake 0.38s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes fieldShake { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-8px, 3px); } 40% { transform: translate(7px, -3px); } 60% { transform: translate(-5px, 2px); } 80% { transform: translate(3px, -1px); } }

/* слой смешной сценки победы */
.skit-layer { position: fixed; inset: 0; z-index: 90; background: rgba(2, 3, 8, 0.88); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; }
.skit-label { margin-bottom: 10px; font-size: 12px; letter-spacing: 0.3em; color: #ffd166; text-shadow: 0 0 14px rgba(255,209,102,0.5); }
.skit-holder { position: relative; width: min(96vw, 1100px); height: min(74vh, 620px); border-radius: 14px; overflow: hidden; border: 1px solid rgba(143,182,216,0.3); box-shadow: 0 0 40px rgba(0,0,0,0.7); }
.skit-holder .cine-wrap { position: absolute; inset: 0; }

/* ============================================================
   ВАУ-ЭФФЕКТЫ v10: крупные цифры, отлёт от удара, кино-панч,
   звёздный комикс-взрыв
   ============================================================ */
.float-up { font-size: 30px; -webkit-text-stroke: 1px rgba(0,0,0,0.85); }
.float-up.crit { font-size: 44px; -webkit-text-stroke: 1.5px rgba(0,0,0,0.9); animation-name: floatCrit; }
@keyframes floatCrit { 0% { transform: scale(0.3) translateY(6px); opacity: 0; } 18% { transform: scale(1.35) translateY(0); opacity: 1; } 30% { transform: scale(1) translateY(-4px); } 70% { opacity: 1; } 100% { transform: translateY(-64px) scale(1.05); opacity: 0; } }
@keyframes floatUp { 0% { transform: scale(0.5) translateY(4px); opacity: 0; } 14% { transform: scale(1.2) translateY(0); opacity: 1; } 26% { transform: scale(1) translateY(-6px); } 70% { opacity: 1; } 100% { transform: translateY(-56px); opacity: 0; } }
.kick-r { animation: kickR 0.46s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes kickR { 0% { transform: translateX(0) rotate(0) scale(1); } 18% { transform: translateX(26px) rotate(2.4deg) scale(0.94); } 45% { transform: translateX(14px) rotate(1deg) scale(1.02); } 100% { transform: translateX(0) rotate(0) scale(1); } }
.kick-l { animation: kickL 0.46s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes kickL { 0% { transform: translateX(0); } 18% { transform: translateX(-24px) rotate(-1.6deg); } 45% { transform: translateX(-12px); } 100% { transform: translateX(0); } }
.fx-punch { animation: fxPunch 0.19s ease-out; }
@keyframes fxPunch { 0% { transform: scale(1); filter: saturate(1); } 35% { transform: scale(1.022); filter: saturate(1.6) brightness(1.18); } 100% { transform: scale(1); filter: saturate(1); } }
.fx-comic { position: absolute; z-index: 60; width: 0; height: 0; pointer-events: none; }
.fx-comic-star { position: absolute; left: -70px; top: -70px; width: 140px; height: 140px; background: var(--star, #ffd166); clip-path: polygon(50% 0%, 59% 22%, 79% 10%, 75% 32%, 98% 35%, 82% 50%, 98% 65%, 75% 68%, 79% 90%, 59% 78%, 50% 100%, 41% 78%, 21% 90%, 25% 68%, 2% 65%, 18% 50%, 2% 35%, 25% 32%, 21% 10%, 41% 22%); opacity: 0.92; filter: drop-shadow(0 0 18px rgba(0,0,0,0.5)); }
.fx-comic-word { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) rotate(var(--tilt, -6deg)) scale(0.4); font-size: 30px; font-weight: 900; letter-spacing: 0.01em; color: #1a0d02; -webkit-text-stroke: 1px #1a0d02; text-shadow: 0 2px 0 #fff3, 0 0 14px var(--star, #ffd166); white-space: nowrap; animation: comicWordIn 0.95s cubic-bezier(0.2, 1.6, 0.4, 1) forwards; }
.fx-comic-star { animation: comicStarIn 0.95s cubic-bezier(0.2, 1.5, 0.4, 1) forwards; }
@keyframes comicStarIn { 0% { opacity: 0; transform: rotate(-20deg) scale(0.2); } 22% { opacity: 0.95; transform: rotate(8deg) scale(1.22); } 40% { transform: rotate(-4deg) scale(1); } 75% { opacity: 0.85; } 100% { opacity: 0; transform: rotate(6deg) scale(1.1); } }
@keyframes comicWordIn { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--tilt, -6deg)) scale(0.4); } 24% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--tilt, -6deg)) scale(1.25); } 45% { transform: translate(-50%, -50%) rotate(var(--tilt, -6deg)) scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -72%) rotate(var(--tilt, -6deg)) scale(0.95); } }

/* ============================================================
   АДМИНКА — файловый менеджер
   ============================================================ */
.admin-root { position: fixed; inset: 0; z-index: 200; background: rgba(3, 5, 10, 0.82); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 18px; }
.admin-frame { width: min(1180px, 96vw); height: min(760px, 92vh); display: flex; flex-direction: column; background: #10141f; border: 1px solid #2c3550; border-radius: 12px; overflow: hidden; box-shadow: 0 30px 90px rgba(0,0,0,0.7); font-family: ui-monospace, "JetBrains Mono", Consolas, monospace; color: #cfd8ee; }
.adm-titlebar { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; background: linear-gradient(180deg, #1a2133, #141927); border-bottom: 1px solid #2c3550; }
.adm-brand { font-weight: 800; letter-spacing: 0.14em; font-size: 12px; color: #d8b4fe; }
.adm-brand i { font-style: normal; color: #ffd166; margin-right: 6px; }
.adm-winbtns { display: flex; gap: 6px; }
.adm-winbtn { width: 26px; height: 22px; border-radius: 6px; border: 1px solid #3a4468; background: #1a2133; color: #cfd8ee; cursor: pointer; }
.adm-winbtn:hover { background: #3d2330; border-color: #e5484d; color: #ffb3b8; }
.adm-toolbar { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid #232b42; background: #131826; flex-wrap: wrap; }
.adm-tbtn { padding: 7px 14px; font-size: 12px; letter-spacing: 0.04em; border-radius: 8px; border: 1px solid #3a4468; background: #1a2133; color: #cfd8ee; cursor: pointer; transition: all 0.14s; font-family: inherit; }
.adm-tbtn:hover { border-color: #6f7fae; background: #222a40; transform: translateY(-1px); }
.adm-tbtn.green { border-color: #2f7d5b; color: #9ff0c8; } .adm-tbtn.green:hover { background: #12321f; }
.adm-tbtn.amber { border-color: #8a6a2a; color: #ffd166; } .adm-tbtn.amber:hover { background: #33270f; }
.adm-tbtn.red { border-color: #8a3a3a; color: #ffb3b8; } .adm-tbtn.red:hover { background: #3a1616; }
.adm-sep { width: 1px; height: 20px; background: #2c3550; }
.adm-breadcrumb { padding: 7px 14px; font-size: 11.5px; color: #8fa0c4; border-bottom: 1px solid #232b42; background: #10141f; display: flex; gap: 8px; align-items: center; }
.adm-crumb.root { color: #d8b4fe; font-weight: 700; }
.adm-crumb.file { color: #ffd166; }
.adm-crumb-sep { opacity: 0.5; }
.adm-main { flex: 1; display: flex; min-height: 0; }
.adm-tree { width: 250px; border-right: 1px solid #232b42; overflow-y: auto; background: #0e1220; padding: 6px 0; flex-shrink: 0; }
.adm-folder { display: flex; align-items: center; gap: 6px; padding: 7px 12px; cursor: pointer; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: #9fb2d8; }
.adm-folder:hover { background: #161d30; }
.adm-fcount { margin-left: auto; font-size: 10px; color: #5c6b90; background: #1a2133; border-radius: 999px; padding: 1px 7px; }
.adm-mini { margin-left: auto; border: 1px solid #3a4468; background: #1a2133; color: #9ff0c8; border-radius: 6px; padding: 1px 8px; cursor: pointer; font-size: 12px; }
.adm-mini.red { color: #ffb3b8; }
.adm-file { display: flex; align-items: center; gap: 7px; padding: 5px 12px 5px 26px; cursor: pointer; font-size: 12px; border-left: 2px solid transparent; }
.adm-file:hover { background: #161d30; }
.adm-file.active { background: #1c2440; border-left-color: #d8b4fe; }
.adm-fico { font-size: 12px; opacity: 0.8; }
.adm-fname { color: #cfd8ee; }
.adm-fhint { color: #5c6b90; font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 90px; }
.adm-dot { color: #ffd166; margin-left: auto; font-size: 10px; }
.adm-pane { flex: 1; overflow-y: auto; padding: 16px 20px; }
.adm-welcome { max-width: 520px; margin: 60px auto; text-align: center; color: #8fa0c4; }
.adm-welcome-ico { font-size: 44px; color: #d8b4fe; }
.adm-welcome h3 { color: #e6ecff; letter-spacing: 0.1em; }
.adm-filehead { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.adm-fico.big { font-size: 30px; color: #d8b4fe; }
.adm-fpath { font-size: 14px; color: #ffd166; font-weight: 700; }
.adm-fsub { font-size: 11px; color: #7484ab; }
.adm-form { display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
.adm-field { display: flex; flex-direction: column; gap: 4px; }
.adm-flab { font-size: 11px; color: #8fa0c4; letter-spacing: 0.04em; }
.adm-key { color: #5c6b90; font-style: normal; font-size: 10px; }
.adm-in { background: #0e1220; border: 1px solid #2c3550; border-radius: 8px; color: #e6ecff; padding: 8px 10px; font-size: 13px; font-family: inherit; width: 100%; box-sizing: border-box; }
.adm-in:focus { outline: none; border-color: #d8b4fe; box-shadow: 0 0 0 2px rgba(216,143,240,0.15); }
textarea.adm-in { resize: vertical; line-height: 1.5; }
.adm-check { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: #cfd8ee; }
.adm-subhead { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; letter-spacing: 0.12em; color: #ffd166; font-weight: 700; border-top: 1px dashed #2c3550; padding-top: 12px; }
.adm-choices, .adm-moves { display: flex; flex-direction: column; gap: 10px; }
.adm-choice, .adm-move { border: 1px solid #232b42; border-radius: 10px; padding: 10px; background: #131826; }
.adm-choice-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; align-items: end; }
.adm-choice-row .adm-mini { justify-self: end; margin: 0; }
.adm-empty { color: #5c6b90; font-size: 12px; padding: 8px; }
.adm-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.adm-rawwrap { margin-top: 18px; max-width: 860px; }
.adm-raw { font-size: 11.5px; line-height: 1.45; }
.adm-status { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; border-top: 1px solid #232b42; background: #0e1220; font-size: 11px; color: #8fa0c4; flex-wrap: wrap; }
.adm-status .green { color: #9ff0c8; }
.adm-status-right { color: #5c6b90; }

/* ============================================================
   КАРТА СЮЖЕТА
   ============================================================ */
.map-zoom { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.map-viewport { overflow: auto; border: 1px solid #232b42; border-radius: 10px; background: #0b0f1a; max-height: 55vh; touch-action: pan-x pan-y; }
.map-canvas { position: relative; transform-origin: 0 0; }
.map-svg { position: absolute; inset: 0; pointer-events: none; }
.me { fill: none; stroke: #4a5a85; stroke-width: 1.6; }
.me-next { stroke: #d8b4fe; }
.me-choice { stroke: #5c6b90; stroke-dasharray: 5 4; }
.me-up { stroke: #7ee2b8; stroke-dasharray: 5 4; }
.me-down { stroke: #e5484d; stroke-dasharray: 5 4; }
.me-label { fill: #8fa0c4; font-size: 10px; font-family: ui-monospace, Consolas, monospace; }
.map-node { position: absolute; width: 178px; height: 64px; box-sizing: border-box; border: 1px solid #3a4468; border-radius: 10px; background: #161d30; padding: 7px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; overflow: hidden; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.map-node:active { transform: scale(0.97); }
.map-node.start { border-color: #ffd166; box-shadow: 0 0 10px rgba(255, 209, 102, 0.25); }
.map-node.combat { background: #2a1620; border-color: #8a3a3a; }
.map-node.alarm { border-color: #8a6a2a; }
.map-node.custom { border-color: #6a4a9e; }
.map-node.orphan { opacity: 0.55; border-style: dashed; }
.map-node.active { outline: 2px solid #d8b4fe; }
.mn-title { font-size: 11.5px; color: #e6ecff; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.mn-id { font-size: 10px; color: #7484ab; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-inspector { margin-top: 14px; border: 1px solid #232b42; border-radius: 10px; padding: 12px; background: #131826; }
.map-insp-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; color: #e6ecff; font-size: 13px; }
.map-insp-id { color: #ffd166; font-size: 11px; }
.map-link-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(140px, 220px); gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed #232b42; }
.map-link-row:last-child { border-bottom: none; }
.map-link-name { font-size: 12px; color: #cfd8ee; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-link-name .up { color: #7ee2b8; }
.map-link-name .down { color: #e5484d; }

/* ============================================================
   КЛИКИ БЕЗ ЗАВИСИМОСТИ ОТ УСТРОЙСТВА И РАЗМЕРОВ
   ============================================================ */
.adm-tbtn, .adm-mini, .adm-winbtn, .adm-file, .adm-folder { touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.adm-tbtn:active, .adm-mini:active, .adm-winbtn:active { transform: scale(0.96); }
.adm-tbtn.clicked, .adm-mini.clicked { animation: admClick 0.28s ease-out; }
@keyframes admClick { 0% { box-shadow: 0 0 0 0 rgba(216, 143, 240, 0.55); } 100% { box-shadow: 0 0 0 14px rgba(216, 143, 240, 0); } }
.adm-status .red { color: #ffb3b8; }
@media (hover: hover) {
  .adm-tbtn:hover { border-color: #6f7fae; background: #222a40; transform: translateY(-1px); }
  .adm-tbtn.green:hover { background: #12321f; }
  .adm-tbtn.amber:hover { background: #33270f; }
  .adm-tbtn.red:hover { background: #3a1616; }
  .adm-file:hover, .adm-folder:hover { background: #161d30; }
}
/* сетки не переполняют контейнер ни при какой ширине */
.adm-choice-row { grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.adm-pane { overflow-x: hidden; }
.adm-form, .adm-rawwrap, .map-inspector { max-width: 100%; }

/* ---------- мобильные и малые экраны ---------- */
@media (max-width: 720px) {
  .admin-root { padding: 0; }
  .admin-frame { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; border: none; }
  .adm-main { flex-direction: column; }
  .adm-tree { width: 100%; max-height: 32%; border-right: none; border-bottom: 1px solid #232b42; flex-shrink: 0; }
  .adm-pane { padding: 12px; }
  .adm-actions { position: sticky; bottom: 0; margin-top: 12px; padding: 12px 0 4px; background: linear-gradient(180deg, rgba(16, 20, 31, 0), #10141f 32%); }
  .adm-tbtn { padding: 11px 13px; font-size: 12.5px; }
  .adm-fhint { display: none; }
  .adm-status-right { display: none; }
  .adm-status { font-size: 10.5px; }
  .map-viewport { max-height: 46vh; }
  .map-link-row { grid-template-columns: 1fr; }
  .adm-titlebar { padding: 10px 12px; }
  .adm-toolbar { padding: 10px 12px; gap: 6px; }
}

/* ============================================================
   БЕСКОНЕЧНЫЙ КОСМОС — ВАУ-ЭФФЕКТЫ + ГРУППЫ
   ============================================================ */
.boss-tag { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12px; letter-spacing: 0.14em; border: 1px solid #d88ff0; color: #d88ff0; background: rgba(216, 143, 240, 0.1); vertical-align: middle; animation: tagPulse 2.2s ease-in-out infinite; }
.boss-tag.group { border-color: #6be0ff; color: #6be0ff; background: rgba(107, 224, 255, 0.1); }
.boss-tag.double { border-color: #ff6b5e; color: #ff6b5e; background: rgba(255, 107, 94, 0.12); font-size: 14px; padding: 4px 14px; }
.boss-tag.asm { border-color: #ffd166; color: #ffd166; background: rgba(255, 209, 102, 0.12); }
@keyframes tagPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(216, 143, 240, 0.35); } 50% { box-shadow: 0 0 18px 2px rgba(216, 143, 240, 0.2); } }
.endless-card { animation: cardIn 0.55s cubic-bezier(0.2, 0.8, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 110ms); }
@keyframes cardIn { 0% { opacity: 0; transform: translateY(26px) scale(0.94); filter: blur(4px); } 100% { opacity: 1; transform: none; filter: none; } }
.endless-card.current { box-shadow: 0 0 26px rgba(216, 143, 240, 0.25), inset 0 0 22px rgba(216, 143, 240, 0.06); }
.endless-card.current::after { content: ''; position: absolute; inset: -3px; border-radius: 16px; border: 1px solid rgba(216, 143, 240, 0.55); animation: auraSpin 3.5s linear infinite; pointer-events: none; }
@keyframes auraSpin { 0% { opacity: 0.25; } 50% { opacity: 0.9; } 100% { opacity: 0.25; } }
.endless-card.two-boss { border-color: #8a3a3a; background: linear-gradient(180deg, #221420, #191022); }
.endless-card.two-boss .ec-name { color: #ffb3b8; }
.btn-endless-go { animation: goPulse 1.8s ease-in-out infinite; }
@keyframes goPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(216, 143, 240, 0.4); } 55% { box-shadow: 0 0 26px 4px rgba(216, 143, 240, 0.25); } }
.btn-endless-go.asm { border-color: #ffd166; color: #ffd166; }
.endless-jump::before { content: ''; position: fixed; inset: 0; z-index: 60; background: radial-gradient(circle at 50% 60%, rgba(255, 255, 255, 0.95), rgba(120, 180, 255, 0.55) 30%, transparent 70%); animation: jumpFlash 0.42s ease-in forwards; pointer-events: none; }
@keyframes jumpFlash { 0% { opacity: 0; transform: scale(0.4); } 55% { opacity: 1; } 100% { opacity: 0; transform: scale(1.6); } }

/* ============================================================
   СБОРКА ЗВЕЗДОЛЁТА (промежуточный уровень после валища)
   ============================================================ */
.screen-asm { padding: 18px 16px 120px; max-width: 900px; margin: 0 auto; }
.asm-counter { text-align: center; font-size: 26px; letter-spacing: 0.1em; color: #e6ecff; margin: 4px 0 10px; }
.asm-counter b { color: #ffd166; font-size: 34px; }
.asm-rail { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.asm-mile { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 86px; padding: 8px 10px; border: 1px solid #232b42; border-radius: 12px; background: rgba(16, 20, 31, 0.7); transition: border-color 0.3s, box-shadow 0.3s; }
.asm-mile-dot { width: 10px; height: 10px; border-radius: 50%; background: #3a4468; transition: background 0.3s, box-shadow 0.3s; }
.asm-mile-n { font-size: 12px; color: #8fa0c4; }
.asm-mile-label { font-size: 10.5px; color: #7484ab; text-align: center; }
.asm-mile.done { border-color: #ffd166; }
.asm-mile.done .asm-mile-dot { background: #ffd166; box-shadow: 0 0 12px rgba(255, 209, 102, 0.7); }
.asm-mile.done .asm-mile-label { color: #ffd166; }
.asm-mile.launch.done { border-color: #7ee2b8; }
.asm-mile.launch.done .asm-mile-label { color: #7ee2b8; }
.asm-stage { position: relative; display: flex; justify-content: center; padding: 10px 0 0; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.asm-rocket-svg { width: min(300px, 62vw); height: auto; filter: drop-shadow(0 0 22px rgba(255, 209, 102, 0.16)); transition: transform 0.15s; }
.asm-stage.jiggle .asm-rocket-svg { animation: asmJiggle 0.16s; }
@keyframes asmJiggle { 0% { transform: translateY(0) rotate(0); } 40% { transform: translateY(2px) rotate(-0.8deg); } 100% { transform: translateY(0) rotate(0); } }
.asm-stage.milestone .asm-rocket-svg { animation: asmMile 0.5s; }
@keyframes asmMile { 0% { transform: scale(1); } 30% { transform: scale(1.07); } 100% { transform: scale(1); } }
.asm-blueprint path, .asm-blueprint circle { fill: none; stroke: #3a4468; stroke-width: 1.4; stroke-dasharray: 5 4; }
.asm-part { opacity: 0; transform-origin: 110px 180px; }
.stage-1 .p-nose, .stage-2 .p-body, .stage-2 .p-win, .stage-2 .p-fin.a, .stage-2 .p-fin.b, .stage-3 .p-noz.a, .stage-3 .p-noz.b, .stage-3 .p-noz.c, .stage-4 .p-seat, .stage-4 .p-pilot { opacity: 1; animation: asmPop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
@keyframes asmPop { 0% { opacity: 0; transform: scale(0.5) translateY(14px); filter: blur(3px); } 60% { opacity: 1; transform: scale(1.08); } 100% { opacity: 1; transform: none; filter: none; } }
.p-nose { fill: #ff6b5e; stroke: #ffb3a8; stroke-width: 2; }
.p-body { fill: #e8ecf5; stroke: #cfd8ee; stroke-width: 2; }
.p-win { fill: #6be0ff; stroke: #d8f4ff; stroke-width: 2; }
.p-fin.a, .p-fin.b { fill: #d88ff0; stroke: #f0d4ff; stroke-width: 1.5; }
.p-noz.a, .p-noz.b, .p-noz.c { fill: #5c6b90; stroke: #8fa0c4; stroke-width: 1.5; }
.p-seat rect { fill: none; stroke: #ffd166; stroke-width: 1.6; stroke-dasharray: 4 3; }
.p-seat path { stroke: #ffd166; stroke-width: 1.2; fill: none; stroke-dasharray: 4 3; }
.p-pilot circle { fill: #f4f7ff; stroke: #cfd8ee; stroke-width: 1.5; }
.p-pilot rect:first-of-type { fill: #2a3550; }
.p-pilot rect:last-of-type { fill: #ff6b5e; stroke: #ffd166; stroke-width: 1.2; }
.asm-flames .asm-flame { opacity: 0; }
.stage-5 .asm-flame { opacity: 1; fill: url(#none) #ff9561; stroke: none; transform-origin: 110px 340px; animation: flameFlick 0.16s ease-in-out infinite alternate; }
.stage-5 .f1 { fill: #ff9561; } .stage-5 .f2 { fill: #ffd166; } .stage-5 .f3 { fill: #ff6b5e; }
@keyframes flameFlick { 0% { transform: scaleY(0.85); } 100% { transform: scaleY(1.25); } }
.launching .asm-rocket { animation: asmLift 2.7s cubic-bezier(0.55, 0, 0.9, 0.4) forwards; }
@keyframes asmLift { 0% { transform: translateY(0); } 12% { transform: translateY(10px); } 100% { transform: translateY(-620px) rotate(2deg); } }
.launching .screen-asm { animation: asmShake 0.5s ease-in-out infinite; }
@keyframes asmShake { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-2px, 1px); } 75% { transform: translate(2px, -1px); } }
.asm-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.asm-flash.go { animation: asmFlash 0.5s; }
@keyframes asmFlash { 0% { opacity: 0; background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.85), transparent 60%); } 30% { opacity: 1; } 100% { opacity: 0; } }
.asm-spark { position: absolute; width: 5px; height: 5px; border-radius: 50%; pointer-events: none; animation: asmSpark 0.65s ease-out forwards; box-shadow: 0 0 8px currentColor; }
@keyframes asmSpark { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(0.2); } }
.asm-launch-banner { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(0.6); font-size: clamp(34px, 8vw, 72px); letter-spacing: 0.18em; color: #ffd166; text-shadow: 0 0 30px rgba(255, 209, 102, 0.6), 0 0 80px rgba(255, 149, 97, 0.4); opacity: 0; pointer-events: none; z-index: 70; }
.asm-launch-banner.show { animation: bannerIn 0.7s cubic-bezier(0.2, 1.2, 0.4, 1) both; }
.asm-launch-banner.sub { font-size: clamp(16px, 4vw, 26px); color: #7ee2b8; text-shadow: 0 0 20px rgba(126, 226, 184, 0.5); letter-spacing: 0.1em; }
@keyframes bannerIn { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); } 60% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.asm-progress { margin: 14px auto 0; max-width: 620px; }
.asm-bar { height: 12px; border: 1px solid #232b42; border-radius: 999px; background: #10141f; overflow: hidden; }
.asm-bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, #ffd166, #ff9561, #d88ff0); transition: width 0.12s; box-shadow: 0 0 14px rgba(255, 209, 102, 0.5); }
.asm-hint { text-align: center; margin-top: 7px; }
.asm-promo { display: flex; gap: 18px; align-items: center; border: 1px solid #2c3448; border-radius: 16px; background: linear-gradient(180deg, rgba(255, 209, 102, 0.06), rgba(16, 20, 31, 0.8)); padding: 18px 20px; margin-top: 12px; animation: cardIn 0.55s both; }
.asm-promo-art { position: relative; flex-shrink: 0; }
.asm-promo-svg { width: 130px; height: auto; }
.asm-promo-svg .pp-body { fill: #e8ecf5; stroke: #cfd8ee; stroke-width: 2; }
.asm-promo-svg .pp-win { fill: #6be0ff; }
.asm-promo-svg .pp-nose { fill: #ff6b5e; }
.asm-promo-svg .pp-fin { fill: #d88ff0; }
.asm-promo-svg .pp-noz { fill: #5c6b90; }
.asm-promo-orbit { position: absolute; inset: -14px; border: 1px dashed rgba(255, 209, 102, 0.4); border-radius: 50%; animation: orbitSpin 9s linear infinite; }
.asm-promo-orbit i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #ffd166; box-shadow: 0 0 10px rgba(255, 209, 102, 0.8); }
.asm-promo-orbit i:nth-child(1) { top: -3px; left: 46%; }
.asm-promo-orbit i:nth-child(2) { bottom: 8%; right: -3px; background: #6be0ff; }
.asm-promo-orbit i:nth-child(3) { top: 30%; left: -4px; background: #d88ff0; }
@keyframes orbitSpin { to { transform: rotate(360deg); } }
.asm-promo-text .font-display { color: #ffd166; font-size: 19px; letter-spacing: 0.08em; margin-bottom: 6px; }
.asm-promo-text p { margin: 0 0 6px; color: #cfd8ee; font-size: 13.5px; }
@media (max-width: 640px) {
  .asm-promo { flex-direction: column; text-align: center; }
  .asm-mile { min-width: 72px; }
  .screen-asm { padding-bottom: 130px; }
}

/* ============================================================
   ПРОФЕССИОНАЛЬНЫЕ БОЕВЫЕ МЕХАНИКИ — ВАУ-СЛОЙ
   (порядок ходов · метка сосредоточения · резонанс валищей ·
   адаптация строя · сотрясение)
   ============================================================ */
.cb-body { position: relative; }
.turn-strip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 2px 2px; }
.ts-label { font-size: 10px; letter-spacing: 0.16em; color: #7484ab; margin-right: 4px; }
.ts-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid #2c3448; border-left: 3px solid var(--c, #5c6b90); border-radius: 999px; font-size: 11px; color: #cfd8ee; background: rgba(16, 20, 31, 0.8); }
.ts-chip i { font-style: normal; font-size: 9px; color: #7484ab; letter-spacing: 0.1em; }
.ts-chip.now { border-color: var(--c, #7ee2b8); color: #fff; box-shadow: 0 0 12px rgba(126, 226, 184, 0.25); animation: tsNow 1.6s ease-in-out infinite; }
.ts-chip.now i { color: #7ee2b8; }
@keyframes tsNow { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.ts-chip.boss { font-weight: 700; color: #ffd166; border-color: #8a5a2a; }
.ts-arrow { color: #3a4468; }
.adapt-chip { display: inline-block; margin-top: 6px; padding: 3px 10px; font-size: 11px; letter-spacing: 0.06em; color: #7ee2b8; border: 1px solid rgba(126, 226, 184, 0.45); border-radius: 999px; background: rgba(126, 226, 184, 0.08); animation: adaptPulse 2.4s ease-in-out infinite; }
@keyframes adaptPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(126, 226, 184, 0.25); } 50% { box-shadow: 0 0 14px 2px rgba(126, 226, 184, 0.18); } }
.enemy-card.focused { outline: 1.5px solid rgba(107, 224, 255, 0.75); outline-offset: 2px; }
.enemy-card.focus-warn { outline: 1.5px solid #ffd166; animation: warnPulse 0.8s ease-in-out infinite; }
@keyframes warnPulse { 0%, 100% { outline-offset: 2px; } 50% { outline-offset: 5px; } }
.focus-tag { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 6; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; letter-spacing: 0.08em; color: #6be0ff; background: rgba(10, 14, 22, 0.85); border: 1px solid rgba(107, 224, 255, 0.5); box-shadow: 0 0 12px rgba(107, 224, 255, 0.25); white-space: nowrap; }
.enemy-card.focus-warn .focus-tag { color: #ffd166; border-color: rgba(255, 209, 102, 0.6); box-shadow: 0 0 14px rgba(255, 209, 102, 0.3); }
.reso-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; display: none; }
.reso-arc { fill: none; stroke: rgba(216, 143, 240, 0.65); stroke-width: 2.5; stroke-dasharray: 10 8; animation: resoFlow 1.1s linear infinite; filter: drop-shadow(0 0 6px rgba(216, 143, 240, 0.8)); }
.reso-arc.inner { stroke: rgba(255, 209, 102, 0.5); stroke-width: 1.4; stroke-dasharray: 4 10; animation-duration: 1.7s; }
@keyframes resoFlow { to { stroke-dashoffset: -36; } }
.reso-label text { fill: #d88ff0; font-size: 13px; font-weight: 700; letter-spacing: 0.18em; text-anchor: middle; }
.reso-label text.sub { fill: #c9b3dd; font-size: 9.5px; letter-spacing: 0.06em; font-weight: 400; }
@media (max-width: 640px) {
  .ts-chip { font-size: 10px; padding: 2px 8px; }
  .focus-tag { font-size: 9.5px; }
}

/* --- вау-слой 2: хит-стоп, зум-панч поля боя, оверлей дуэти --- */
.fx-hitstop { animation: fxHitstop 0.13s steps(2, end) both; }
.fx-hitstop-hard { animation: fxHitstop 0.23s steps(3, end) both; }
@keyframes fxHitstop { 0% { filter: contrast(1.45) saturate(1.35) brightness(1.14); } 60% { filter: contrast(1.15) saturate(1.1); } 100% { filter: none; } }
.fx-zoom { animation: fxZoom 0.36s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
@keyframes fxZoom { 0% { transform: scale(1); } 30% { transform: scale(1.045); } 100% { transform: scale(1); } }
.ov-duo { margin-top: 10px; padding: 6px 12px; font-size: 12px; letter-spacing: 0.08em; color: #ffd166; border: 1px dashed rgba(255, 209, 102, 0.5); border-radius: 10px; background: rgba(255, 209, 102, 0.06); }

/* ============================================================
   БОНУС-УРОВЕНЬ «АСТЕРОИДНЫЙ ДОЖДЬ» + вау-переход варпа
   ============================================================ */
.screen-asteroid { display: flex; flex-direction: column; padding: 18px 22px; gap: 10px; overflow: hidden; }
.ast-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; z-index: 3; }
.ast-title { font-size: clamp(22px, 3.4vw, 34px); color: #ffd166; letter-spacing: 0.04em; text-shadow: 0 0 22px rgba(255, 209, 102, 0.35); }
.ast-sub { font-size: 13px; color: #9fb4d8; margin-top: 4px; }
.ast-timer-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 16px; border: 1px solid rgba(255, 209, 102, 0.4); border-radius: 14px; background: rgba(10, 14, 26, 0.6); box-shadow: 0 0 24px rgba(255, 209, 102, 0.12); }
.ast-timer-chip span { font-size: 10px; letter-spacing: 0.22em; color: #9fb4d8; }
.ast-timer-chip b { font-size: 26px; color: #ffd166; }
.ast-timer-chip.low { animation: astTimerLow 0.9s steps(2, end) infinite; border-color: rgba(229, 72, 77, 0.7); }
.ast-timer-chip.low b { color: #ff6b5e; }
@keyframes astTimerLow { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.ast-hud { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 30px; z-index: 3; }
.ast-hud-label { font-size: 10px; letter-spacing: 0.22em; color: #6f84a8; margin-right: 4px; }
.ast-hud-empty { font-size: 11px; color: #55627e; }
.ast-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; font-size: 12px; font-weight: 600; color: #e8f0ff; border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--c) 14%, rgba(10, 14, 26, 0.7)); animation: chipPop 0.28s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.ast-chip i { font-style: normal; font-weight: 400; font-size: 10px; color: #9fb4d8; }
@keyframes chipPop { 0% { transform: scale(0.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.ast-buff-strip { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0; }
.ast-field { position: relative; flex: 1; min-height: 320px; border-radius: 18px; border: 1px solid rgba(120, 150, 200, 0.16); background: radial-gradient(ellipse at 50% 40%, rgba(20, 28, 52, 0.55), rgba(6, 9, 18, 0.85)); overflow: hidden; z-index: 2; }
.ast-field::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(1.4px 1.4px at 12% 22%, rgba(255,255,255,0.5) 50%, transparent 51%), radial-gradient(1.2px 1.2px at 78% 16%, rgba(255,255,255,0.4) 50%, transparent 51%), radial-gradient(1.6px 1.6px at 42% 74%, rgba(255,255,255,0.35) 50%, transparent 51%), radial-gradient(1.1px 1.1px at 88% 62%, rgba(255,255,255,0.42) 50%, transparent 51%), radial-gradient(1.3px 1.3px at 24% 84%, rgba(255,255,255,0.3) 50%, transparent 51%); }
.ast-rock { position: absolute; transform: translate(-50%, -50%); border: none; border-radius: 46% 54% 52% 48% / 50% 46% 54% 50%; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6); background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--c) 55%, #6a7284) 0%, var(--c) 38%, color-mix(in srgb, var(--c) 70%, #0a0e1a) 100%); box-shadow: inset -10px -14px 26px rgba(0, 0, 0, 0.55), inset 6px 8px 18px rgba(255, 255, 255, 0.14), 0 0 34px color-mix(in srgb, var(--c) 45%, transparent); transition: transform 0.06s ease; animation: astSpawn 0.32s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
.ast-rock::before, .ast-rock::after { content: ''; position: absolute; border-radius: 50%; background: rgba(0, 0, 0, 0.28); box-shadow: inset 2px 3px 5px rgba(0, 0, 0, 0.4); }
.ast-rock::before { width: 22%; height: 18%; top: 22%; left: 18%; }
.ast-rock::after { width: 16%; height: 14%; bottom: 20%; right: 22%; }
.ast-rock:active { transform: translate(-50%, -50%) scale(0.9); }
.ast-rock.squash { transform: translate(-50%, -50%) scale(0.86) rotate(-4deg); }
.ast-rock-icon { font-size: 30px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5)); }
.ast-rock-name { font-size: 11px; letter-spacing: 0.1em; }
.ast-rock-left { font-size: 11px; color: #ffe9b8; }
.ast-rock-left b { font-size: 15px; color: #ffd166; }
@keyframes astSpawn { 0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.ast-shard { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; border-radius: 3px; background: var(--c); box-shadow: 0 0 10px var(--c); animation: astShard 0.75s cubic-bezier(0.1, 0.7, 0.4, 1) both; pointer-events: none; z-index: 5; }
@keyframes astShard { 0% { transform: translate(0, 0) rotate(0deg); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(300deg) scale(0.3); opacity: 0; } }
.ast-break-word { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%) rotate(-5deg); font-size: 34px; color: #ffd166; text-shadow: 0 0 22px rgba(255, 209, 102, 0.6), 3px 3px 0 #7a1f1f; pointer-events: none; animation: astWord 0.95s cubic-bezier(0.2, 1.2, 0.3, 1) both; z-index: 6; }
@keyframes astWord { 0% { transform: translate(-50%, -50%) scale(0.3) rotate(-5deg); opacity: 0; } 30% { transform: translate(-50%, -50%) scale(1.25) rotate(-5deg); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(-50%, -58%) scale(1) rotate(-5deg); opacity: 0; } }
.ast-hint { text-align: center; font-size: 11px; color: #6f84a8; letter-spacing: 0.1em; z-index: 3; }
.ast-warp { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 60; pointer-events: none; }
.ast-warp-flash { position: fixed; inset: 0; z-index: 61; pointer-events: none; background: radial-gradient(circle at 50% 50%, #fffdf4 0%, #ffe9b0 45%, rgba(255, 233, 176, 0) 72%); opacity: 0; transition: opacity 0.35s ease; }
.ast-warp-flash.go { opacity: 1; animation: astFlashOut 0.85s ease both; }
@keyframes astFlashOut { 0% { opacity: 1; } 100% { opacity: 0; } }
.ast-summary { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; }
.ast-summary .loot-row { flex-wrap: wrap; justify-content: center; }

/* ============================================================
   ГЕНЕРАТИВНАЯ ГРАФИКА: SVG-иконки (вместо эмодзи),
   canvas-астероиды бонус-уровня, планировщик уровней админки
   ============================================================ */
.svg-ico { width: 1em; height: 1em; display: inline-block; vertical-align: -0.12em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .svg-ico { width: 1.15em; height: 1.15em; }
.act-btn .svg-ico { color: #ffd166; }
.alarm-tag .svg-ico, .btn-combat .svg-ico, .ally-dead .svg-ico, .adapt-chip .svg-ico { color: inherit; }
.moral-chip .svg-ico { width: 0.85em; height: 0.85em; }
.ast-title-ico { width: 1.2em; height: 1.2em; color: #ffd166; vertical-align: -0.18em; }
.ast-chip .svg-ico { color: var(--c, currentColor); }
.ec-stats .svg-ico { color: #8fb6d8; }

/* canvas-астероид вместо глифа-эмодзи */
.ast-rock-icon { display: block; width: 46%; height: 46%; margin: 0 auto; }
.ast-rock-canvas { width: 100%; height: 100%; display: block; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5)); animation: astRockFloat 3.6s ease-in-out infinite; }
@keyframes astRockFloat { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-7px) rotate(2.5deg); } }

/* планировщик уровней «Бесконечного космоса» */
.adm-plan-mode { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.adm-plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; margin-top: 10px; }
.adm-plan-blk { border: 1px solid #2c3550; border-radius: 10px; padding: 8px 8px 6px; background: rgba(14, 18, 32, 0.6); }
.adm-plan-blkhead { font-size: 10.5px; letter-spacing: 0.14em; color: #8fa8d8; padding: 2px 4px 6px; }
.adm-plan-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; }
.adm-plan-row + .adm-plan-row { border-top: 1px dashed rgba(44, 53, 80, 0.55); }
.adm-plan-row.key { background: rgba(240, 180, 41, 0.08); outline: 1px solid rgba(240, 180, 41, 0.3); }
.adm-plan-row.asm { opacity: 0.55; }
.adm-plan-lv { min-width: 34px; color: #ffd166; font-size: 12px; }
.adm-plan-row.key .adm-plan-lv { color: #ffdf8a; }
.adm-plan-kind { min-width: 88px; font-size: 11px; color: #cfd8ee; }
.adm-plan-slots { display: flex; gap: 5px; flex: 1; min-width: 0; }
.adm-plan-slots .adm-in { padding: 5px 6px; font-size: 11.5px; min-width: 0; }
.adm-plan-none { font-size: 11.5px; color: #8fa8d8; }

/* ============================================================
   КОСТИ ЗЕВСА: программные кубики, магическая цифра,
   тетрис-стакан 10×30 с молниями, итог и схлопывание
   ============================================================ */
.screen-zeus { position: absolute; inset: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.zeus-stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.zeus-flash { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 42%, #fffdf4 0%, #ffe9b0 40%, rgba(255, 233, 176, 0) 70%); opacity: 0; }
.zeus-flash.go { animation: astFlashOut 0.9s ease both; }

.zeus-stage { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px; transition: opacity 0.5s ease, transform 0.5s ease; }
.zeus-stage.stage-gone { opacity: 0; transform: scale(0.82); pointer-events: none; height: 0; padding: 0; overflow: hidden; }
.zeus-sup { font-size: 26px; letter-spacing: 0.14em; color: #ffd166; text-shadow: 0 0 22px rgba(255, 209, 102, 0.5); }
.zeus-dice-ico { width: 1.15em; height: 1.15em; color: #ffe9a0; }
.zeus-sub { font-size: 12.5px; color: #9db2d8; letter-spacing: 0.06em; }

.zeus-dice-row { display: flex; gap: 26px; margin: 16px 0 4px; transition: opacity 0.45s ease, transform 0.45s ease; }
.zeus-dice-row.dice-gone { opacity: 0; transform: scale(0.5) rotate(18deg); height: 0; margin: 0; overflow: hidden; }
.zeus-dice { width: 92px; height: 92px; border-radius: 18px; background: linear-gradient(150deg, #fffbe8, #e8d9a8 62%, #c9b478); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5), inset 0 2px 6px rgba(255, 255, 255, 0.8), inset 0 -5px 12px rgba(120, 90, 30, 0.4); padding: 12px; }
.zeus-dice.tumble { animation: zdTumble 0.28s linear infinite; }
.zeus-dice.landed { animation: zdLand 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
@keyframes zdTumble { 0% { transform: rotate(-14deg) translateY(-4px); } 50% { transform: rotate(10deg) translateY(3px); } 100% { transform: rotate(-8deg) translateY(-2px); } }
@keyframes zdLand { 0% { transform: scale(1.25) rotate(6deg); } 100% { transform: scale(1) rotate(0deg); } }
.zd-pips { width: 100%; height: 100%; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); place-items: center; }
.zd-pips .pip { width: 15px; height: 15px; border-radius: 50%; background: transparent; }
.zd-pips .pip.on { background: radial-gradient(circle at 35% 30%, #4a3c18, #1b1408 70%); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7), 0 0 4px rgba(0, 0, 0, 0.3); }

.zeus-roll-hint { min-height: 22px; font-size: 13px; color: #cfd8ee; }
.zeus-roll-hint .gold { color: #ffd166; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.zeus-roll { display: inline-flex; align-items: center; gap: 9px; background: linear-gradient(180deg, #ffd166, #e0a92e); color: #241a04; border: none; border-radius: 12px; padding: 13px 34px; font-size: 17px; letter-spacing: 0.12em; cursor: pointer; box-shadow: 0 10px 26px rgba(224, 169, 46, 0.4); }
.zeus-roll:disabled { opacity: 0.55; cursor: default; }
.zeus-roll .svg-ico { color: #241a04; }

.zeus-magic { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: transform 0.6s ease; animation: zmIn 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
@keyframes zmIn { 0% { transform: scale(0.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.zeus-magic.magic-docked { transform: scale(0.62) translateY(-14px); margin-bottom: -26px; }
.zm-cap { font-size: 13px; letter-spacing: 0.3em; color: #9db2d8; }
.zm-num { font-size: 104px; line-height: 1; color: #fff6d8; text-shadow: 0 0 34px rgba(159, 208, 255, 0.85), 0 0 90px rgba(120, 170, 255, 0.4); animation: zmPulse 1.6s ease-in-out infinite; }
@keyframes zmPulse { 0%, 100% { text-shadow: 0 0 34px rgba(159, 208, 255, 0.85), 0 0 90px rgba(120, 170, 255, 0.4); } 50% { text-shadow: 0 0 44px rgba(190, 225, 255, 1), 0 0 110px rgba(150, 200, 255, 0.6); } }
.zm-num.mega { color: #ffe9a0; animation: zmMega 1.15s ease-in-out infinite; }
@keyframes zmMega { 0%, 100% { text-shadow: 0 0 26px rgba(255, 209, 102, 0.95), 0 0 70px rgba(255, 170, 40, 0.5), 0 0 130px rgba(255, 140, 20, 0.35); transform: scale(1); } 50% { text-shadow: 0 0 40px rgba(255, 230, 150, 1), 0 0 100px rgba(255, 190, 60, 0.75), 0 0 170px rgba(255, 150, 30, 0.5); transform: scale(1.05); } }
.zm-sub { font-size: 11.5px; color: #7e93b8; letter-spacing: 0.1em; }

.zeus-glass { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 10px; animation: zgIn 0.7s cubic-bezier(0.2, 1.2, 0.4, 1) both; }
@keyframes zgIn { 0% { transform: translateY(60px) scaleY(0.3); opacity: 0; } 100% { transform: none; opacity: 1; } }
.zd-canvas { background: linear-gradient(180deg, rgba(10, 14, 30, 0.85), rgba(16, 22, 46, 0.9)); border: 1px solid rgba(159, 208, 255, 0.35); border-radius: 10px; box-shadow: 0 0 40px rgba(90, 140, 255, 0.25), inset 0 0 30px rgba(20, 30, 70, 0.6); }
.zeus-hud { display: flex; gap: 22px; }
.zh-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.zh-cell b { font-size: 20px; color: #fff6d8; font-variant-numeric: tabular-nums; }
.zh-games b { font-size: 26px; color: #ffd166; text-shadow: 0 0 14px rgba(255, 209, 102, 0.6); }
.zh-lab { font-size: 10px; letter-spacing: 0.2em; color: #7e93b8; text-transform: uppercase; }
.zeus-controls { display: flex; align-items: center; gap: 12px; }
.zeus-spawn { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(180deg, #bfe0ff, #6fa8e8); color: #06101e; border: none; border-radius: 11px; padding: 11px 26px; font-size: 15px; letter-spacing: 0.1em; cursor: pointer; box-shadow: 0 8px 22px rgba(111, 168, 232, 0.4); }
.zeus-spawn:disabled { opacity: 0.45; cursor: default; }
.zeus-cd { font-size: 11px; color: #9db2d8; min-width: 150px; }

.zeus-results { position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; background: rgba(4, 6, 14, 0.55); backdrop-filter: blur(3px); }
.zr-card { background: linear-gradient(165deg, rgba(20, 26, 52, 0.96), rgba(12, 16, 34, 0.96)); border: 1px solid rgba(255, 209, 102, 0.4); border-radius: 16px; padding: 26px 34px; display: flex; flex-direction: column; align-items: center; gap: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 209, 102, 0.15); animation: zmIn 0.5s ease both; }
.zr-sup { font-size: 15px; letter-spacing: 0.22em; color: #ffd166; }
.zr-rows { display: flex; flex-direction: column; gap: 8px; min-width: 240px; }
.zr-row { display: flex; justify-content: space-between; gap: 30px; font-size: 14px; color: #cfd8ee; }
.zr-row b { color: #fff6d8; font-size: 16px; }
.zr-buffs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 320px; }
.zr-buff { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; padding: 4px 9px; border-radius: 20px; background: rgba(255, 209, 102, 0.1); border: 1px solid rgba(255, 209, 102, 0.35); color: #ffe9a0; }
.zeus-return { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(180deg, #ffd166, #e0a92e); color: #241a04; border: none; border-radius: 11px; padding: 12px 28px; font-size: 15px; letter-spacing: 0.1em; cursor: pointer; }
.zeus-return .svg-ico { color: #241a04; }
.zr-hint { font-size: 10.5px; color: #7e93b8; }

.screen-zeus.collapse { animation: zCollapse 0.65s cubic-bezier(0.6, -0.2, 0.9, 0.4) both; }
@keyframes zCollapse { 40% { transform: scale(0.55) rotate(6deg); filter: blur(3px) brightness(1.6); opacity: 1; } 100% { transform: scale(0.01) rotate(20deg); filter: blur(8px) brightness(2.2); opacity: 0; } }

/* ---------- админка: модуль управления «Кости Зевса» ---------- */
.adm-subhead2 { margin: 14px 0 8px; padding: 7px 10px; border-left: 3px solid #ffd166; background: rgba(255, 209, 102, 0.07); color: #ffd166; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; border-radius: 0 8px 8px 0; }
.adm-dtable { display: flex; flex-direction: column; gap: 7px; margin: 6px 0; }
.adm-drow { border: 1px solid rgba(159, 208, 255, 0.16); border-radius: 10px; padding: 7px 9px; background: rgba(12, 18, 38, 0.5); }
.adm-drow.off { opacity: 0.45; }
.adm-dline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adm-dline + .adm-dline { margin-top: 6px; }
.adm-dcolor { width: 26px; height: 26px; padding: 0; border: 1px solid rgba(255,255,255,.25); border-radius: 7px; background: none; cursor: pointer; }
.adm-dname { font-size: 12.5px; color: #e8f0ff; flex: 1; min-width: 90px; }
.adm-dmini { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #9db2d8; cursor: pointer; white-space: nowrap; }
.adm-drare { background: rgba(10, 16, 34, 0.9); border: 1px solid rgba(159, 208, 255, 0.25); color: #cfd8ee; border-radius: 7px; font-size: 11px; padding: 3px 5px; }
.adm-dline.nums label { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; color: #7e93b8; }
.adm-dline.nums input { width: 46px; background: rgba(10, 16, 34, 0.9); border: 1px solid rgba(159, 208, 255, 0.25); color: #fff6d8; border-radius: 6px; font-size: 11px; padding: 3px 4px; font-family: inherit; }
.adm-test { display: flex; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.adm-zbtn { display: inline-flex; align-items: center; gap: 7px; background: linear-gradient(180deg, #ffd166, #e0a92e); color: #241a04; border: none; border-radius: 9px; padding: 8px 16px; font-size: 12.5px; letter-spacing: 0.06em; cursor: pointer; font-weight: 700; }
.adm-zbtn .svg-ico { color: #241a04; }
.adm-zbtn.warn { background: linear-gradient(180deg, #ff9d9d, #e06666); color: #2b0808; }
.adm-zbtn.warn .svg-ico { color: #2b0808; }
.adm-test-out { font-size: 11px; color: #bfe0ff; }
.adm-zbtn.gold { background: linear-gradient(180deg, #fff3c4, #ffd166 55%, #e0a92e); box-shadow: 0 0 14px rgba(255, 209, 102, 0.35); }
.adm-dfx { background: rgba(10, 16, 34, 0.9); border: 1px solid rgba(255, 209, 102, 0.35); color: #ffd166; border-radius: 7px; font-size: 10.5px; padding: 3px 4px; }
.zeus-mhint { margin-top: 6px; text-align: center; font-size: 10px; letter-spacing: 0.08em; color: rgba(255, 209, 102, 0.75); }
.adm-enpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 12px; background: rgba(10, 16, 34, 0.6); border: 1px solid rgba(120, 150, 220, 0.18); border-radius: 8px; padding: 8px 10px; margin: 4px 0 10px; }
.adm-enpick .adm-check { margin: 0; }
.adm-enid { opacity: 0.55; font-size: 10px; }
/* ---------- магазин внешности ---------- */
.btn-shop { margin-top: 10px; background: rgba(240, 180, 41, 0.08); border: 1px solid rgba(240, 180, 41, 0.45); color: #f0b429; padding: 12px 34px; border-radius: 10px; letter-spacing: 0.14em; cursor: pointer; transition: background 0.2s, box-shadow 0.2s; }
.btn-shop:hover { background: rgba(240, 180, 41, 0.16); box-shadow: 0 0 18px rgba(240, 180, 41, 0.25); }
/* ---------- МАГАЗИН v56: витрина-примерочная ---------- */
.screen-shop { overflow-y: auto; padding: 26px 30px 40px; }
.shop-head-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.shop-head-row h2 { margin: 0; font-size: clamp(20px, 3vw, 28px); letter-spacing: 0.08em; color: #e4e9f0; }
.shop-back { background: rgba(127, 216, 255, 0.08); border: 1px solid rgba(127, 216, 255, 0.35); color: #7fd8ff; padding: 8px 18px; border-radius: 10px; cursor: pointer; transition: background 0.25s; }
.shop-back:hover { background: rgba(127, 216, 255, 0.16); }
.shop-sub { color: #9aa4b4; font-size: 12.5px; line-height: 1.55; max-width: 760px; }
.shop-balance { margin-left: auto; display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 12px; background: rgba(240, 180, 41, 0.08); border: 1px solid rgba(240, 180, 41, 0.4); font-size: 12px; letter-spacing: 0.14em; color: #9aa4b4; }
.shop-balance-ico { color: #f0b429; font-size: 16px; text-shadow: 0 0 12px rgba(240, 180, 41, 0.6); }
.shop-balance b { color: #f0b429; font-size: 20px; font-variant-numeric: tabular-nums; }
.shop-balance.bump { animation: shopBump 0.55s ease; }
@keyframes shopBump { 0% { transform: scale(1); } 35% { transform: scale(1.1); box-shadow: 0 0 26px rgba(240, 180, 41, 0.35); } 100% { transform: scale(1); } }
.shop-balance.shake { animation: shopShake 0.45s ease; }
@keyframes shopShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); border-color: rgba(229, 72, 77, 0.8); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.shop-layout { display: grid; grid-template-columns: 380px 1fr; gap: 22px; margin-top: 18px; align-items: start; }
.shop-preview { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; }
.shop-stage { position: relative; border-radius: 18px; padding: 18px 0 10px; background: linear-gradient(160deg, rgba(16, 26, 52, 0.85), rgba(8, 12, 26, 0.92)); border: 1px solid rgba(127, 216, 255, 0.22); overflow: hidden; display: flex; justify-content: center; }
.shop-stage-glow { position: absolute; inset: 0; pointer-events: none; transition: background 0.5s ease; }
.shop-big-cv { position: relative; width: min(320px, 76%); height: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.5)); }
.shop-stage-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.shop-stage.flash .shop-stage-flash { animation: shopFlash 0.6s ease; }
@keyframes shopFlash { 0% { opacity: 0.6; } 100% { opacity: 0; } }
.shop-stage.pulse { animation: shopPulse 0.6s ease; }
@keyframes shopPulse { 0% { box-shadow: none; } 40% { box-shadow: 0 0 44px rgba(127, 216, 255, 0.3); border-color: rgba(127, 216, 255, 0.6); } 100% { box-shadow: none; } }
.shop-worn { display: flex; flex-direction: column; gap: 4px; background: rgba(10, 16, 34, 0.65); border: 1px solid rgba(120, 150, 220, 0.18); border-radius: 14px; padding: 10px 12px; }
.shop-worn-chip { display: flex; align-items: center; gap: 8px; background: transparent; border: none; color: #9aa4b4; font-size: 11.5px; letter-spacing: 0.06em; padding: 6px 8px; border-radius: 8px; cursor: pointer; text-align: left; transition: background 0.2s, color 0.2s; }
.shop-worn-chip b { color: #e4e9f0; font-weight: 600; }
.shop-worn-chip.on { background: rgba(127, 216, 255, 0.1); color: #cfe6f7; }
.shop-worn-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: 0 0 8px rgba(255, 255, 255, 0.35); }
.shop-random { background: rgba(127, 216, 255, 0.1); border: 1px dashed rgba(127, 216, 255, 0.45); color: #7fd8ff; padding: 11px; border-radius: 12px; cursor: pointer; letter-spacing: 0.12em; transition: background 0.25s, transform 0.25s; }
.shop-random:hover { background: rgba(127, 216, 255, 0.18); transform: translateY(-2px); }
.shop-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.shop-tab { --slot-c: #7fd8ff; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px 9px; border-radius: 12px; background: rgba(10, 16, 34, 0.65); border: 1px solid rgba(120, 150, 220, 0.18); color: #9aa4b4; cursor: pointer; transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1), border-color 0.25s, box-shadow 0.25s; position: relative; }
.shop-tab-ico { font-size: 17px; color: var(--slot-c); opacity: 0.7; transition: opacity 0.25s, text-shadow 0.25s; }
.shop-tab-t { font-size: 10.5px; letter-spacing: 0.14em; }
.shop-tab-n { font-size: 9.5px; opacity: 0.6; font-family: var(--mono, monospace); }
.shop-tab:hover { transform: translateY(-3px); border-color: var(--slot-c); }
.shop-tab.on { border-color: var(--slot-c); background: rgba(10, 16, 34, 0.92); box-shadow: 0 0 18px -6px var(--slot-c); }
.shop-tab.on::after { content: ''; position: absolute; left: 18%; right: 18%; bottom: -1px; height: 2px; background: var(--slot-c); box-shadow: 0 0 10px var(--slot-c); border-radius: 2px; }
.shop-tab.on .shop-tab-ico { opacity: 1; text-shadow: 0 0 12px var(--slot-c); }
.shop-tab.on .shop-tab-t { color: #e4e9f0; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin-top: 14px; animation: shopGridIn 0.35s ease; }
@keyframes shopGridIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.shop-grid[data-slot="head"] { --slot-c: #7fd8ff; }
.shop-grid[data-slot="eyes"] { --slot-c: #ffd166; }
.shop-grid[data-slot="mouth"] { --slot-c: #7ee2b8; }
.shop-grid[data-slot="body"] { --slot-c: #e5484d; }
.shop-grid[data-slot="legs"] { --slot-c: #9aa4b4; }
.shop-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px 12px; border-radius: 14px; background: rgba(10, 16, 34, 0.72); border: 1px solid rgba(120, 150, 220, 0.18); cursor: pointer; transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1), border-color 0.28s, box-shadow 0.28s; overflow: hidden; }
.shop-card:hover { transform: translateY(-5px); border-color: rgba(127, 216, 255, 0.5); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.8), 0 0 22px -6px var(--slot-c, #7fd8ff); }
.shop-card .shop-prev { width: 84px; height: 112px; transition: transform 0.3s ease; }
.shop-card:hover .shop-prev { transform: scale(1.08); }
.shop-card-name { font-size: 11.5px; color: #dfe7f2; text-align: center; line-height: 1.3; min-height: 26px; display: flex; align-items: center; }
.shop-card-meta { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
.shop-part-price { font-size: 10px; letter-spacing: 0.1em; color: #f0b429; font-family: var(--mono, monospace); }
.shop-card.owned .shop-part-price { color: #7ee2b8; }
.shop-card.worn { border-color: rgba(126, 226, 184, 0.65); box-shadow: 0 0 18px -6px rgba(126, 226, 184, 0.5); }
.shop-card.worn::before { content: 'НАДЕТО'; position: absolute; top: 10px; right: -28px; transform: rotate(38deg); background: rgba(126, 226, 184, 0.16); color: #7ee2b8; font-size: 8.5px; letter-spacing: 0.2em; padding: 3px 32px; border: 1px solid rgba(126, 226, 184, 0.4); }
.shop-card.trying { border-color: rgba(240, 180, 41, 0.75); box-shadow: 0 0 22px -6px rgba(240, 180, 41, 0.55); }
.shop-badge { font-size: 8px; letter-spacing: 0.18em; padding: 2.5px 9px; border-radius: 20px; }
.shop-badge-alien { color: #b18cff; border: 1px solid rgba(177, 140, 255, 0.55); background: rgba(177, 140, 255, 0.1); animation: alienPulse 2.6s ease-in-out infinite; }
@keyframes alienPulse { 0%, 100% { box-shadow: 0 0 10px -4px rgba(177, 140, 255, 0.5); } 50% { box-shadow: 0 0 18px -2px rgba(177, 140, 255, 0.85); } }
.shop-badge-star { color: #f0b429; border: 1px solid rgba(240, 180, 41, 0.55); background: rgba(240, 180, 41, 0.1); }
.shop-selected { --slot-c: #7fd8ff; display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 12px 16px; border-radius: 14px; background: rgba(10, 16, 34, 0.9); border: 1px solid var(--slot-c); box-shadow: 0 0 26px -10px var(--slot-c); opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease; }
.shop-selected.open { opacity: 1; transform: none; pointer-events: auto; }
.shop-sel-info { flex: 1; min-width: 0; }
.shop-sel-name { font-size: 14px; color: #eef3fa; letter-spacing: 0.04em; }
.shop-sel-slot { font-size: 10.5px; color: #9aa4b4; letter-spacing: 0.1em; margin-top: 3px; }
.shop-buy-big { background: linear-gradient(135deg, rgba(240, 180, 41, 0.22), rgba(240, 180, 41, 0.1)); border: 1px solid rgba(240, 180, 41, 0.6); color: #f0b429; padding: 12px 22px; border-radius: 12px; cursor: pointer; letter-spacing: 0.1em; font-size: 13px; transition: transform 0.2s, box-shadow 0.2s, background 0.2s; }
.shop-buy-big:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 22px -8px rgba(240, 180, 41, 0.6); background: rgba(240, 180, 41, 0.26); }
.shop-sel-cancel { background: transparent; border: 1px solid rgba(154, 164, 180, 0.4); color: #9aa4b4; padding: 11px 16px; border-radius: 12px; cursor: pointer; font-size: 11px; letter-spacing: 0.12em; transition: color 0.2s, border-color 0.2s; }
.shop-sel-cancel:hover { color: #e4e9f0; border-color: rgba(154, 164, 180, 0.7); }
.shop-empty { grid-column: 1 / -1; padding: 30px; text-align: center; color: #9aa4b4; font-size: 12px; letter-spacing: 0.1em; }
@media (max-width: 980px) {
  .shop-layout { grid-template-columns: 1fr; }
  .shop-preview { position: static; flex-direction: row; flex-wrap: wrap; align-items: stretch; }
  .shop-stage { flex: 1 1 240px; }
  .shop-big-cv { width: min(220px, 66%); }
  .shop-worn { flex: 1 1 230px; }
  .shop-random { flex: 1 1 100%; }
}
@media (max-width: 560px) {
  .screen-shop { padding: 18px 14px 30px; }
  .shop-tabs { gap: 5px; }
  .shop-tab-t { font-size: 8.5px; letter-spacing: 0.06em; }
  .shop-tab-n { display: none; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-selected { flex-wrap: wrap; }
  .shop-buy-big { flex: 1 1 auto; }
}
.note-float { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: rgba(69, 10, 10, 0.92); border: 1px solid rgba(220, 38, 38, 0.5); color: #fecaca; font-size: 12.5px; padding: 9px 16px; border-radius: 10px; z-index: 9998; max-width: 92vw; animation: notefloat 0.25s; }
@keyframes notefloat { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
/* ---------- конструктор героя ---------- */
.select-points { text-align: center; color: #9aa4b4; font-size: 12.5px; letter-spacing: 0.08em; margin: 10px 0 4px; }
.select-points b { color: #f0b429; }
.btn-create { display: block; margin: 6px auto 14px; background: rgba(127, 216, 255, 0.08); border: 1px dashed rgba(127, 216, 255, 0.45); color: #7fd8ff; padding: 11px 30px; border-radius: 10px; cursor: pointer; letter-spacing: 0.14em; font-size: 14px; }
.btn-create:hover { background: rgba(127, 216, 255, 0.16); }
.hero-ava-canvas { display: flex; justify-content: center; margin-bottom: 8px; }
.hero-ava-canvas canvas { width: 72px; height: 81px; }
.ctor-wrap { position: fixed; inset: 0; background: rgba(2, 6, 14, 0.82); backdrop-filter: blur(4px); z-index: 600; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ctor-panel { width: min(760px, 96vw); max-height: 92vh; overflow-y: auto; background: #0a1022; border: 1px solid rgba(127, 216, 255, 0.3); border-radius: 16px; padding: 18px 20px; box-shadow: 0 0 60px rgba(127, 216, 255, 0.12); }
.ctor-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ctor-head h3 { margin: 0; letter-spacing: 0.14em; color: #e4e9f0; }
.ctor-close { background: none; border: 1px solid rgba(154, 164, 180, 0.4); color: #9aa4b4; border-radius: 8px; width: 30px; height: 30px; cursor: pointer; }
.ctor-close:hover { color: #fecaca; border-color: rgba(220, 38, 38, 0.5); }
.ctor-cols { display: grid; grid-template-columns: 190px 1fr; gap: 18px; }
.ctor-left { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.ctor-prev { width: 150px; height: 190px; background: radial-gradient(circle at 50% 30%, rgba(127, 216, 255, 0.12), rgba(10, 16, 34, 0.4)); border: 1px solid rgba(120, 150, 220, 0.2); border-radius: 12px; }
.ctor-row-label { font-size: 11px; letter-spacing: 0.12em; color: #9aa4b4; }
.ctor-colors { display: flex; gap: 8px; }
.ctor-color { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.ctor-color.on { border-color: #e4e9f0; }
.ctor-rand { background: rgba(192, 132, 252, 0.1); border: 1px solid rgba(192, 132, 252, 0.45); color: #c084fc; padding: 9px 16px; border-radius: 8px; cursor: pointer; letter-spacing: 0.1em; font-size: 12px; width: 100%; }
.ctor-rand:hover { background: rgba(192, 132, 252, 0.2); }
.ctor-hint { font-size: 11px; color: #9aa4b4; line-height: 1.5; }
.ctor-field { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ctor-field span { font-size: 11px; letter-spacing: 0.12em; color: #9aa4b4; width: 74px; flex: none; }
.ctor-field input { flex: 1; background: rgba(10, 16, 34, 0.7); border: 1px solid rgba(120, 150, 220, 0.3); color: #e4e9f0; border-radius: 8px; padding: 8px 10px; font: inherit; }
.ctor-slot { margin-bottom: 10px; }
.ctor-slot-t { font-size: 12px; letter-spacing: 0.14em; margin-bottom: 5px; }
.ctor-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ctor-chip { background: rgba(10, 16, 34, 0.7); border: 1px solid rgba(120, 150, 220, 0.25); color: #cdd6e4; font-size: 11.5px; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.ctor-chip.on { border-color: #7fd8ff; color: #7fd8ff; background: rgba(127, 216, 255, 0.1); }
.ctor-chip.locked { opacity: 0.45; cursor: not-allowed; }
.ctor-btns { margin-top: 12px; }
/* v62: способности в конструкторе — разблокировка за прохождения истории роя */
.ctor-abil-wrap { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(120, 150, 220, 0.18); }
.ctor-abil-count { font-size: 10px; letter-spacing: 0.08em; color: #7fd8ff; margin-left: 6px; }
.ctor-abil { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; max-height: 240px; overflow-y: auto; }
.ctor-abil-sec { padding: 6px 8px; border: 1px solid rgba(120, 150, 220, 0.16); border-radius: 10px; }
.ctor-abil-sec.ok { border-color: rgba(126, 226, 184, 0.35); background: rgba(126, 226, 184, 0.04); }
.ctor-abil-hero { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.ctor-abil-hero-name { font-size: 11.5px; letter-spacing: 0.08em; }
.ctor-abil-hero-state { font-size: 9.5px; letter-spacing: 0.1em; color: #9aa4b4; }
.ctor-abil-sec.ok .ctor-abil-hero-state { color: #7ee2b8; }
.ctor-abil-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ctor-abchip { display: flex; align-items: center; gap: 6px; background: rgba(10, 16, 34, 0.7); border: 1px solid rgba(127, 216, 255, 0.3); color: #cdd6e4; font-size: 11.5px; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.ctor-abchip:hover { border-color: rgba(127, 216, 255, 0.6); }
.ctor-abchip.on { border-color: #7fd8ff; color: #7fd8ff; background: rgba(127, 216, 255, 0.14); box-shadow: 0 0 12px rgba(127, 216, 255, 0.25); }
.ctor-abchip.locked { opacity: 0.4; cursor: not-allowed; filter: grayscale(0.7); }
.ctor-abchip-kind { font-size: 9.5px; color: #f0b429; }
.ctor-abchip.locked .ctor-abchip-kind { color: inherit; }
/* v62: бейдж пройденной истории на карточке выбора героя */
.hero-done { margin-top: 6px; font-size: 9.5px; letter-spacing: 0.18em; color: #7ee2b8; border: 1px solid rgba(126, 226, 184, 0.4); border-radius: 6px; padding: 4px 8px; display: inline-block; }
.ctor-save { width: 100%; background: rgba(126, 226, 184, 0.12); border: 1px solid rgba(126, 226, 184, 0.5); color: #7ee2b8; padding: 12px; border-radius: 10px; cursor: pointer; letter-spacing: 0.12em; }
.ctor-save:hover { background: rgba(126, 226, 184, 0.22); }
@media (max-width: 640px) { .ctor-cols { grid-template-columns: 1fr; } .ctor-left { flex-direction: row; flex-wrap: wrap; justify-content: center; } }
/* ---------- портрет героя в бою ---------- */
.ally-ava { display: flex; justify-content: center; margin: 2px 0 10px; position: relative; }
.ally-ava .hero-sprite { width: 104px; height: 104px; filter: drop-shadow(0 0 14px rgba(127, 216, 255, 0.18)); }
.ally-panel:not(.hero) .ally-ava { display: none; }
.ally-panel.hero { transition: filter 0.5s ease; }
.ally-panel.hero.is-dead { filter: grayscale(0.85) brightness(0.65); }
/* ---------- живой портрет героя в HUD ---------- */
.hud-ava { position: relative; overflow: visible; }
.hud-ava-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- mp4 в кадрах катсцен (из админки) ---------- */
.cine-video {
  position: absolute; z-index: 3;
  inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center center;
  background: rgba(0,0,0,0.4);
}

/* ---------- лут: «Глаз станции» ---------- */
.loot-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; overflow: hidden; }
.loot-stage { position: relative; width: min(78vmin, 560px); height: min(46vmin, 330px); }
.loot-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.loot-cross {
  position: absolute; width: 52px; height: 52px; margin: -26px 0 0 -26px;
  background: transparent; border: none; cursor: crosshair; z-index: 5;
  animation: lootFlash 0.55s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 10px rgba(229,72,77,0.85));
}
.loot-cross svg { width: 100%; height: 100%; }
.loot-cross .loot-ring { position: absolute; inset: -7px; }
.loot-cross:hover { filter: drop-shadow(0 0 16px rgba(255,209,102,0.95)); }
@keyframes lootFlash { from { opacity: 0.45; transform: scale(0.9); } to { opacity: 1; transform: scale(1.12); } }
.loot-head { text-align: center; z-index: 3; }
.loot-head h2 { font-size: clamp(26px, 5vw, 44px); letter-spacing: 0.2em; color: #e6fbff; text-shadow: 0 0 30px rgba(127,216,255,0.35); }
.loot-sub { max-width: 640px; font-size: 13px; line-height: 1.55; color: rgba(230,251,255,0.55); }
.loot-counter { font-family: var(--font-mono, monospace); font-size: 14px; letter-spacing: 0.3em; color: #f0b429; z-index: 3; }
.loot-reveal {
  position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 45%, rgba(4,8,16,0.82) 0%, rgba(2,4,9,0.96) 70%);
  animation: lootIn 0.5s ease both;
}
@keyframes lootIn { from { opacity: 0; } to { opacity: 1; } }
.loot-card {
  width: min(86vw, 460px); padding: 26px 28px; text-align: center;
  background: rgba(8,14,26,0.92); border: 1px solid rgba(127,216,255,0.3); border-radius: 14px;
  box-shadow: 0 0 60px rgba(127,216,255,0.12); display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.loot-card-title { font-size: 12px; letter-spacing: 0.4em; color: rgba(253,230,138,0.8); }
.loot-card-name { font-size: clamp(22px, 4vw, 32px); font-weight: 900; letter-spacing: 0.06em; }
.loot-card-name.unique { color: #ffd166; text-shadow: 0 0 24px rgba(255,209,102,0.45); }
.loot-card-name.secret { color: #e5484d; text-shadow: 0 0 24px rgba(229,72,77,0.45); }
.loot-card-desc { font-size: 13px; line-height: 1.6; color: rgba(230,251,255,0.65); }
.loot-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.loot-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: rgba(127,216,255,0.08); border: 1px solid rgba(127,216,255,0.25);
  font-size: 12px; color: #e6fbff;
}
.loot-chip.amber { border-color: rgba(240,180,41,0.5); background: rgba(240,180,41,0.1); }
.loot-verdict { font-family: var(--font-mono, monospace); font-size: 12px; letter-spacing: 0.14em; }
.loot-verdict.good { color: #8fd8a0; } .loot-verdict.bad { color: #e5484d; }

/* чип оружия в HUD */
.hud-weapon {
  display: flex; align-items: center; gap: 6px; margin-top: 8px;
  font-size: 11px; letter-spacing: 0.08em; color: #ffd166;
  border-top: 1px dashed rgba(255,209,102,0.25); padding-top: 7px;
}

/* ---------- вау-эффекты «Глаза станции» ---------- */
.loot-stage { will-change: transform; }
.loot-stage.shake { animation: lootShake .34s ease; }
@keyframes lootShake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-7px, 3px); }
  40% { transform: translate(6px, -4px); }
  60% { transform: translate(-4px, 2px); }
  80% { transform: translate(3px, -2px); }
}
.loot-cross { animation: lootPop .28s cubic-bezier(.2, 1.4, .4, 1) both, lootFlash .55s ease-in-out .3s infinite alternate; }
@keyframes lootPop { from { opacity: 0; transform: scale(.15); } to { opacity: 1; transform: scale(1); } }
.loot-counter { animation: lootCountPulse 1.8s ease-in-out infinite; }
@keyframes lootCountPulse {
  0%, 100% { opacity: .7; text-shadow: none; }
  50% { opacity: 1; text-shadow: 0 0 14px rgba(240,180,65,.85); }
}
.loot-reveal { animation: lootIn .5s ease .35s both; background: radial-gradient(circle at 50% 45%, rgba(4,8,16,0.42) 0%, rgba(2,4,9,0.68) 70%); }
.loot-card { animation: lootCardIn .6s cubic-bezier(.18,.9,.26,1.18) .55s both; }
@keyframes lootCardIn { from { opacity: 0; transform: translateY(28px) scale(.92); } to { opacity: 1; transform: none; } }
.loot-card-name.unique { animation: lootGlowGold 2.2s ease-in-out infinite; }
.loot-card-name.secret { animation: lootGlowRed 2.2s ease-in-out infinite; }
@keyframes lootGlowGold { 0%, 100% { text-shadow: 0 0 24px rgba(255,209,102,.45); } 50% { text-shadow: 0 0 46px rgba(255,209,102,.95); } }
@keyframes lootGlowRed { 0%, 100% { text-shadow: 0 0 24px rgba(229,72,77,.45); } 50% { text-shadow: 0 0 46px rgba(229,72,77,.95); } }

/* ---------- РОЙ: компактный строй врагов и панель генератора ---------- */
.enemy-grid.dense { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.enemy-grid.dense .enemy-card { padding: 10px 12px; }
.enemy-grid.dense .enemy-card-in { gap: 8px; }
.enemy-grid.dense .enemy-card-in canvas { max-width: 52px; height: auto; }
.enemy-grid.dense .enemy-kind { display: none; }
.enemy-grid.dense .enemy-name { font-size: 11px; letter-spacing: 0.04em; }
.adm-swarm { display: flex; flex-direction: column; gap: 18px; max-width: 720px; }
.adm-swarm h2 { font-size: 22px; letter-spacing: 0.14em; color: #fde68a; }
.swarm-block { padding: 14px; border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; background: rgba(255,255,255,0.03); }
.swarm-lbl { font-size: 12px; letter-spacing: 0.12em; color: rgba(255,255,255,0.6); }
.swarm-stepper { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.swarm-count-num { font-size: 30px; min-width: 44px; text-align: center; color: #fde68a; }
.swarm-chips { display: inline-flex; gap: 6px; }
.swarm-chip.on { border-color: rgba(252,211,77,0.7); color: #fde68a; }
.swarm-themes { margin-top: 10px; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.swarm-theme { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.4); text-align: left; transition: all 0.2s; }
.swarm-theme:hover { border-color: rgba(252,211,77,0.5); }
.swarm-theme.on { border-color: rgba(252,211,77,0.8); background: rgba(252,211,77,0.08); }
.swarm-tname { font-size: 13px; color: #fef3c7; letter-spacing: 0.08em; }
.swarm-tdesc { font-size: 11px; line-height: 1.45; color: rgba(255,255,255,0.55); }
.swarm-tbase { font-size: 10px; }
.swarm-roster-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.swarm-ok { color: #4ade80; font-size: 11px; }
.swarm-warn { color: #f0a35e; font-size: 11px; }
.swarm-key { margin-top: 8px; font-size: 11px; color: rgba(230,251,255,0.7); }
.swarm-roster { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.swarm-f { display: grid; grid-template-columns: minmax(150px, 1.3fr) 1fr auto; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.07); background: rgba(0,0,0,0.35); font-size: 12px; }
.swarm-f.heart { border-color: rgba(229,72,77,0.55); background: rgba(69,10,10,0.35); }
.swarm-fname { color: rgba(230,251,255,0.92); }
.swarm-f.heart .swarm-fname { color: #fca5a5; }
.swarm-fkind { color: rgba(255,255,255,0.45); font-size: 11px; }
.swarm-fstats { color: rgba(252,211,77,0.8); font-size: 11px; white-space: nowrap; }
.swarm-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.swarm-summon { padding: 14px 26px; border-radius: 12px; border: 1px solid rgba(229,72,77,0.6); background: rgba(229,72,77,0.16); color: #fecaca; letter-spacing: 0.12em; font-size: 16px; transition: all 0.2s; }
.swarm-summon:hover { background: rgba(229,72,77,0.3); box-shadow: 0 0 26px rgba(229,72,77,0.4); }

/* ---------- ФЛОТ СБОРКИ: программные прототипы № 1–7 ---------- */
/* части закрашиваются на стенде по своим этапам (data-s="N") */
.asm-craft { transform-origin: 110px 180px; }
.stage-1 [data-s="1"], .stage-2 [data-s="2"], .stage-3 [data-s="3"], .stage-4 [data-s="4"], .stage-5 [data-s="5"] { opacity: 1; animation: asmPop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.launching .asm-craft { animation: asmLift 2.7s cubic-bezier(0.55, 0, 0.9, 0.4) forwards; }
.stage-5 [data-flick], .launching [data-flick] { animation: flameFlick 0.16s ease-in-out infinite alternate; transform-origin: 110px 300px; }

/* ---------- админка: редактор «ФЛОТ СБОРКИ» ---------- */
.adm-fleet { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.adm-fleet h2 { font-size: 22px; letter-spacing: 0.14em; color: #fde68a; }
.fleet-list { display: flex; flex-direction: column; gap: 10px; }
.fleet-c { padding: 12px 14px; border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; background: rgba(255,255,255,0.03); display: flex; flex-direction: column; gap: 8px; }
.fleet-c.base { border-color: rgba(252,211,77,0.35); }
.fleet-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fleet-num { color: #fde68a; font-size: 13px; min-width: 34px; }
.fleet-name { flex: 1; min-width: 180px; padding: 7px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.14); background: rgba(0,0,0,0.4); color: rgba(230,251,255,0.92); font-family: inherit; font-size: 13px; }
.fleet-name:focus { outline: none; border-color: rgba(252,211,77,0.6); }
.fleet-go { white-space: nowrap; }
.fleet-clicks { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fleet-clicks label { font-size: 11px; letter-spacing: 0.12em; color: rgba(255,255,255,0.5); }
.fleet-total { width: 76px; padding: 6px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.14); background: rgba(0,0,0,0.4); color: rgba(252,211,77,0.9); font-family: inherit; font-size: 13px; }
.fleet-stages { font-size: 11px; }
.fleet-desc { font-size: 11px; }

/* ---------- ИСТОРИЯ РОЯ: экран путешествия ---------- */
.tale-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px clamp(16px, 5vw, 64px); overflow-y: auto; }
.tale-swarm { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.tale-head { position: relative; z-index: 1; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.boss-tag.swarm { border-color: rgba(240,166,255,0.5); color: #f0a6ff; text-shadow: 0 0 14px rgba(240,166,255,0.4); }
.tale-title { font-size: clamp(24px, 5vw, 44px); letter-spacing: 0.16em; color: #fde68a; text-shadow: 0 0 26px rgba(253,230,138,0.25); margin: 0; }
.tale-score { color: rgba(230,251,255,0.8); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.tale-score b { color: #ffd166; }
.tale-end-sub { color: rgba(230,251,255,0.7); font-size: clamp(12px, 2.4vw, 15px); letter-spacing: 0.08em; }
.tale-body { position: relative; z-index: 1; max-width: 760px; margin: 16px auto; background: rgba(6,8,16,0.72); border: 1px solid rgba(176,143,240,0.18); border-radius: 16px; padding: clamp(14px, 3vw, 26px); backdrop-filter: blur(3px); }
.tale-p { color: rgba(230,251,255,0.85); line-height: 1.65; margin: 0 0 12px; font-size: clamp(13px, 2.4vw, 15px); }
.tale-route { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; margin: 14px auto 2px; max-width: 620px; flex-wrap: wrap; justify-content: center; }
.tale-stop { display: inline-flex; align-items: center; gap: 5px; }
.tale-stop-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(176,143,240,0.5); }
.tale-stop.done .tale-stop-dot { background: #7ee2b8; border-color: #7ee2b8; }
.tale-stop.now .tale-stop-dot { background: #ffd166; border-color: #ffd166; box-shadow: 0 0 12px rgba(255,209,102,0.6); }
.tale-stop.far .tale-stop-dot { opacity: 0.45; }
.tale-stop-n { font-size: 11px; color: rgba(230,251,255,0.65); }
.tale-line { width: 26px; height: 2px; background: rgba(176,143,240,0.35); }
.tale-planet-name { color: #f0a6ff; letter-spacing: 0.14em; margin: 6px 0 10px; font-size: clamp(18px, 4vw, 28px); }
.tale-sub { color: rgba(230,251,255,0.85); font-size: 14px; letter-spacing: 0.1em; margin: 14px 0 10px; }
.tale-note { margin: 8px 0; color: #7ee2b8; }
.tale-crafts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tale-craft { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px; border: 1px solid rgba(176,143,240,0.25); border-radius: 14px; background: rgba(176,143,240,0.05); cursor: pointer; transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.tale-craft:hover { transform: translateY(-3px); border-color: rgba(255,209,102,0.6); box-shadow: 0 6px 24px rgba(176,143,240,0.2); }
.tale-craft-name { color: rgba(230,251,255,0.92); font-size: 12px; letter-spacing: 0.06em; text-align: center; }
.tale-craft-clicks { color: #ffd166; font-size: 11px; }
.craft-mini { width: 56px; height: 86px; }
.craft-mini .mini-blueprint path, .craft-mini .mini-blueprint circle { fill: none; stroke: #3a4468; stroke-width: 6; stroke-dasharray: 12 9; }
.craft-mini .mini-parts .asm-part { opacity: 1; }
.craft-mini.admin { flex: 0 0 40px; width: 40px; height: 62px; }
.tale-event-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.tale-opt { text-align: left; padding: 12px 16px; border: 1px solid rgba(176,143,240,0.3); border-radius: 12px; background: rgba(176,143,240,0.06); color: rgba(230,251,255,0.9); cursor: pointer; font-family: inherit; font-size: clamp(12px, 2.4vw, 14px); transition: border-color 0.15s, background 0.15s; }
.tale-opt:hover { border-color: rgba(255,209,102,0.6); background: rgba(255,209,102,0.06); }
.tale-opt.fire { border-color: rgba(255,107,94,0.4); }
.tale-opt.fire:hover { border-color: #ff6b5e; background: rgba(255,107,94,0.08); }
.tale-opt.sing { border-color: rgba(126,226,184,0.4); }
.tale-opt.sing:hover { border-color: #7ee2b8; background: rgba(126,226,184,0.08); }
.tale-foot { position: relative; z-index: 1; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 6px 0 18px; }
.tale-stats { margin-top: 10px; color: rgba(230,251,255,0.55); }
.tale-route-note { margin-top: 4px; color: rgba(230,251,255,0.5); }
.tale-planet > .sup { display: block; margin-bottom: 6px; }
/* ---------- админка: история роя ---------- */
.adm-tale { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.adm-tale h2 { font-size: 22px; letter-spacing: 0.14em; color: #f0a6ff; }
.tale-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 14px; }
.tale-planets { display: flex; flex-direction: column; gap: 6px; }
.tale-planet-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; background: rgba(255,255,255,0.02); }
.tale-planet-row .adm-check { margin: 0; }
@media (max-width: 640px) {
  .tale-route { gap: 4px; }
  .tale-line { width: 14px; }
  .tale-crafts { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
}

/* карта сюжета: связи-развилки истории роя и сборок */
.me.tale { stroke: #f0a6ff; stroke-dasharray: 5 4; }
.me-label.tale { fill: #f0a6ff; font-size: 11px; font-weight: 700; }
.map-node.tale { border-color: rgba(240,166,255,0.45); box-shadow: 0 0 10px rgba(240,166,255,0.12) inset; }
.tale-tag { display: inline-block; margin-right: 8px; padding: 1px 6px; border: 1px solid rgba(240,166,255,0.4); border-radius: 4px; font-size: 10px; }
.tale-test-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }


/* ---------- перелёт к рандомной планете (цепочка роя в кампании) ---------- */
.screen-swarmhop { display: flex; align-items: center; justify-content: center; padding: 20px 16px; }
.hop-wrap { width: min(680px, 94vw); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; animation: hopin 0.5s; }
@keyframes hopin { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hop-sup { font-size: 11px; text-transform: uppercase; letter-spacing: 0.4em; color: rgba(255,255,255,0.45); }
.hop-planet { font-size: clamp(2rem, 7vw, 3.6rem); letter-spacing: 0.18em; color: #ffd166; text-shadow: 0 0 44px rgba(255,209,102,0.35); }
.hop-desc { max-width: 560px; font-size: 13.5px; line-height: 1.7; color: rgba(230,251,255,0.72); }
.hop-signal { display: inline-flex; align-items: center; gap: 9px; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: #e5484d; }
.hop-dot { width: 8px; height: 8px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 10px #e5484d; animation: hopdot 1.1s infinite; }
@keyframes hopdot { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.hop-swarm { font-size: clamp(1rem, 3.4vw, 1.3rem); letter-spacing: 0.12em; color: #b35fd0; text-shadow: 0 0 26px rgba(179,95,208,0.4); }
.hop-intro { max-width: 560px; font-size: 12.5px; line-height: 1.7; color: rgba(255,255,255,0.5); }
.hop-btns { margin-top: 10px; width: min(380px, 88vw); display: flex; flex-direction: column; gap: 9px; }
.hop-btns .btn-victory { margin-top: 0; }
.hop-exit { padding: 11px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.15); font-size: 11px; letter-spacing: 0.24em; color: rgba(255,255,255,0.55); transition: background 0.2s; }
.hop-exit:hover { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8); }


/* ---------- общий архив файлов в редакторе катсцен ---------- */
.adm-arch { border: 1px dashed #3a4468; border-radius: 8px; padding: 10px 12px; margin-top: 4px; background: rgba(26, 33, 51, 0.5); }
.adm-arch-head { display: flex; align-items: center; gap: 10px; }
.adm-arch-title { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; color: #ffd166; }
.adm-arch .arch-input { display: none; }
.adm-arch .adm-fhint2 { display: block; margin-top: 7px; }
.arch-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.arch-item { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 6px; border: 1px solid #232c45; background: #141a2b; cursor: pointer; transition: border-color 0.15s; }
.arch-item:hover { border-color: #4f9efc; }
.arch-ico { flex: 0 0 auto; width: 22px; text-align: center; color: #9ff0c8; font-size: 11px; }
.arch-thumb { flex: 0 0 auto; width: 34px; height: 24px; object-fit: cover; border-radius: 4px; border: 1px solid #232c45; }
.arch-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: rgba(230, 240, 255, 0.85); }
.arch-size { flex: 0 0 auto; font-size: 10.5px; color: rgba(230, 240, 255, 0.4); }
.arch-del { flex: 0 0 auto; width: 20px; height: 20px; border: none; background: transparent; color: rgba(255, 179, 184, 0.55); font-size: 14px; line-height: 1; cursor: pointer; border-radius: 4px; }
.arch-del:hover { background: rgba(229, 72, 77, 0.18); color: #ffb3b8; }
.arch-empty { font-size: 11.5px; color: rgba(230, 240, 255, 0.4); padding: 4px 0; }
.arch-empty.arch-err { color: #ffb3b8; }


/* ---------- монтажный план катсцены ---------- */
.adm-plan { border: 1px dashed #3a4468; border-radius: 8px; padding: 10px 12px; margin-top: 10px; background: rgba(20, 26, 43, 0.6); }
.adm-plan-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.adm-plan-title { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; color: #9ff0c8; }
.adm-plan-note { font-size: 10.5px; color: rgba(230, 240, 255, 0.4); }
.adm-plan-body { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.adm-plan-row { display: grid; grid-template-columns: 130px 90px 1fr; gap: 8px; align-items: baseline; padding: 3px 6px; border-radius: 5px; background: rgba(26, 33, 51, 0.55); }
.adm-plan-row.qte { background: rgba(240, 178, 74, 0.09); }
.adm-plan-t { font-size: 11.5px; color: #ffd166; white-space: nowrap; }
.adm-plan-i { font-size: 10.5px; color: rgba(230, 240, 255, 0.45); white-space: nowrap; }
.adm-plan-row.qte .adm-plan-i { color: #f0b24a; }
.adm-plan-l { font-size: 11.5px; color: rgba(230, 240, 255, 0.78); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-plan-verdict { margin-top: 8px; font-size: 12px; color: #9ff0c8; line-height: 1.45; }
.adm-plan-verdict.dim { color: rgba(230, 240, 255, 0.55); font-size: 11.5px; }
.adm-plan-dim { font-size: 11.5px; color: rgba(230, 240, 255, 0.4); }
.adm-beathint { margin-top: 6px; font-size: 10.5px; color: #f0b24a; }
@media (max-width: 700px) {
  .adm-plan-row { grid-template-columns: 1fr; gap: 1px; }
  .adm-plan-l { white-space: normal; }
}


/* ---------- пролог: космос, корабль, док ---------- */
.screen-opening { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 50% 110%, #101a30 0%, #05080f 55%, #01030a 100%); cursor: pointer; user-select: none; }
.open-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.open-sup { position: absolute; top: clamp(14px, 3vh, 26px); left: 50%; transform: translateX(-50%); font-size: clamp(10px, 1.4vw, 13px); letter-spacing: 0.34em; color: rgba(230, 240, 255, 0.5); white-space: nowrap; }
.open-ship-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.open-ship { width: clamp(110px, 21vw, 190px); filter: drop-shadow(0 0 26px rgba(127, 178, 255, 0.35)); will-change: transform; }
.open-ship svg { width: 100%; height: auto; }
.open-ship .asm-part { stroke-width: 2; opacity: 1; }
.open-ship .asm-flame { opacity: 1; }
.open-ship [data-flick], .open-ship .asm-flame { animation: flameFlick 0.16s ease-in-out infinite alternate; transform-origin: 110px 300px; }
.open-bottom { position: absolute; left: 50%; bottom: clamp(18px, 5vh, 44px); transform: translateX(-50%); width: min(680px, 92vw); display: flex; flex-direction: column; align-items: center; gap: 12px; pointer-events: none; }
.open-craft { font-size: clamp(11px, 1.5vw, 13px); letter-spacing: 0.22em; color: #ffd166; opacity: 0; transition: opacity 0.8s ease; }
.open-craft span { color: rgba(230, 240, 255, 0.45); margin-right: 8px; }
.open-text { display: flex; flex-direction: column; gap: 6px; text-align: center; min-height: clamp(64px, 14vh, 130px); justify-content: flex-end; }
.open-line { font-size: clamp(12px, 1.8vw, 16px); letter-spacing: 0.12em; color: rgba(230, 240, 255, 0.92); transition: color 0.9s ease, opacity 0.9s ease; text-shadow: 0 0 12px rgba(127, 178, 255, 0.35); }
.open-line.dim { color: rgba(230, 240, 255, 0.4); }
.open-line:not(.dim)::after { content: '▊'; color: #7fb2ff; animation: caretBlink 0.9s steps(1) infinite; margin-left: 2px; }
@keyframes caretBlink { 50% { opacity: 0; } }
.open-choose { pointer-events: auto; opacity: 0; transform: translateY(8px); transition: opacity 0.7s ease, transform 0.7s ease; background: rgba(20, 28, 46, 0.85); border: 1px solid #7fb2ff; color: #d8e6ff; padding: clamp(10px, 1.8vh, 16px) clamp(22px, 5vw, 44px); font-size: clamp(13px, 1.9vw, 17px); letter-spacing: 0.24em; border-radius: 8px; cursor: pointer; }
.open-choose.show { opacity: 1; transform: translateY(0); box-shadow: 0 0 24px rgba(127, 178, 255, 0.3); }
.open-choose:hover { background: rgba(46, 62, 96, 0.9); }

/* кадр дока */
.screen-dock { cursor: default; }
.dock-hot { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: clamp(180px, 34vw, 300px); aspect-ratio: 1; background: none; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.dock-hot:focus-visible { outline: 1px solid #7fb2ff; border-radius: 50%; }
.dock-ring { position: absolute; inset: 8%; border: 1.5px solid rgba(127, 178, 255, 0.55); border-radius: 50%; animation: dockPulse 2.4s ease-out infinite; }
.dock-ring.r2 { animation-delay: 1.2s; }
@keyframes dockPulse { 0% { transform: scale(0.55); opacity: 0.9; } 100% { transform: scale(1.25); opacity: 0; } }
.dock-core { position: relative; width: 46%; aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: clamp(11px, 1.5vw, 15px); letter-spacing: 0.18em; color: #eaf2ff; background: radial-gradient(circle, rgba(46, 62, 96, 0.95) 0%, rgba(20, 28, 46, 0.9) 70%); border: 1px solid rgba(127, 178, 255, 0.7); box-shadow: 0 0 30px rgba(127, 178, 255, 0.35), inset 0 0 18px rgba(127, 178, 255, 0.2); }
.dock-hot:hover .dock-core { box-shadow: 0 0 44px rgba(127, 178, 255, 0.55), inset 0 0 22px rgba(127, 178, 255, 0.3); }
.dock-sub { position: absolute; left: 50%; bottom: clamp(16px, 4vh, 36px); transform: translateX(-50%); font-size: clamp(11px, 1.5vw, 13px); color: rgba(230, 240, 255, 0.5); letter-spacing: 0.1em; white-space: nowrap; }
.dock-pilot { position: absolute; top: clamp(14px, 3vh, 28px); right: clamp(14px, 3vw, 34px); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 14px; border: 1px solid rgba(127, 178, 255, 0.3); border-radius: 10px; background: rgba(12, 18, 32, 0.72); }
.dock-ava { width: clamp(64px, 9vw, 104px); height: auto; }
.dock-pname { font-size: clamp(10px, 1.4vw, 13px); letter-spacing: 0.16em; }
.dock-pname .dim2 { color: rgba(230, 240, 255, 0.45); }

/* кнопка РАНДОМ в выборе героя */
.btn-random { background: rgba(20, 28, 46, 0.85); border: 1px solid #ffd166; color: #ffd166; padding: 12px 26px; font-size: 14px; letter-spacing: 0.2em; border-radius: 8px; cursor: pointer; }
.btn-random:hover { background: rgba(64, 52, 20, 0.85); box-shadow: 0 0 20px rgba(255, 209, 102, 0.25); }
.select-foot { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.btn-back { background: rgba(10, 18, 34, 0.85); border: 1px solid rgba(127, 216, 255, 0.5); color: #7fd8ff; padding: 12px 26px; font-size: 14px; letter-spacing: 0.2em; border-radius: 8px; cursor: pointer; }
.btn-back:hover { background: rgba(16, 34, 58, 0.85); box-shadow: 0 0 20px rgba(127, 216, 255, 0.25); }

@media (max-width: 640px) {
  .dock-pilot { top: auto; bottom: clamp(64px, 12vh, 96px); right: 12px; transform: scale(0.85); transform-origin: bottom right; }
  .dock-sub { white-space: normal; text-align: center; width: 92vw; }
}


/* ---------- пролог v42: планета, герой, прицелы ---------- */
.dock-tag { position: absolute; top: clamp(14px, 3vh, 26px); left: 50%; transform: translateX(-50%); font-size: clamp(11px, 1.5vw, 14px); letter-spacing: 0.2em; color: rgba(230,240,255,0.85); }
.dock-tag .dim2 { color: rgba(230,240,255,0.45); }

/* кадр прицелов */
.screen-aim { cursor: crosshair; }
.aim-head { position: absolute; top: clamp(46px, 9vh, 78px); left: 50%; transform: translateX(-50%); text-align: center; pointer-events: none; }
.aim-head h2 { font-size: clamp(15px, 2.4vw, 24px); letter-spacing: 0.18em; color: #eaf2ff; margin: 0 0 6px; }
.aim-hint { font-size: clamp(11px, 1.5vw, 13px); color: rgba(230,240,255,0.55); margin: 0; }
.aim-field { position: absolute; inset: 0; }
.aim-target { position: absolute; transform: translate(-50%, -50%); width: clamp(44px, 7vw, 64px); aspect-ratio: 1; background: none; border: none; cursor: crosshair; border-radius: 50%; }
.aim-target::before, .aim-target::after { content: ''; position: absolute; background: rgba(127,178,255,0.85); transition: background 0.25s ease; }
.aim-target::before { left: 50%; top: 0; bottom: 0; width: 1.5px; transform: translateX(-50%); box-shadow: 0 0 8px rgba(127,178,255,0.6); }
.aim-target::after { top: 50%; left: 0; right: 0; height: 1.5px; transform: translateY(-50%); box-shadow: 0 0 8px rgba(127,178,255,0.6); }
.aim-target i { position: absolute; inset: 18%; border: 1.5px solid rgba(127,178,255,0.85); border-radius: 50%; box-shadow: 0 0 10px rgba(127,178,255,0.4); animation: dockPulse 2.2s ease-out infinite; transition: border-color 0.25s ease; }
.aim-target:hover i { border-color: #ffd166; }
.aim-target.hit::before, .aim-target.hit::after { background: #7ee2b8; box-shadow: 0 0 10px rgba(126,226,184,0.7); }
.aim-target.hit i { border-color: #7ee2b8; animation: none; }
.aim-tag { font-size: 11px; letter-spacing: 0.14em; padding: 3px 8px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, 140%); pointer-events: none; }
.aim-tag.ok { color: #7ee2b8; background: rgba(20,46,34,0.9); }
.aim-tag.bad { color: #ff8a8a; background: rgba(60,20,20,0.92); transform: translate(-50%, -160%); z-index: 5; }
.aim-result { position: absolute; left: 50%; bottom: clamp(18px, 6vh, 54px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.aim-karma { font-size: clamp(16px, 2.6vw, 26px); letter-spacing: 0.22em; padding: 8px 22px; border-radius: 10px; border: 1px solid rgba(127,178,255,0.5); background: rgba(12,18,32,0.85); }
.aim-karma.good { color: #7ee2b8; border-color: rgba(126,226,184,0.6); box-shadow: 0 0 24px rgba(126,226,184,0.2); }
.aim-karma.bad { color: #ff8a8a; border-color: rgba(229,72,77,0.6); box-shadow: 0 0 24px rgba(229,72,77,0.2); }


/* ---------- звёздная карта ---------- */
.screen-starmap { position: relative; overflow: hidden; background: radial-gradient(130% 100% at 50% 100%, #0c1526 0%, #05080f 55%, #01030a 100%); }
.sm-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.sm-head { position: absolute; top: clamp(12px, 3vh, 24px); left: 50%; transform: translateX(-50%); text-align: center; pointer-events: none; }
.sm-sup { font-size: clamp(10px, 1.3vw, 12px); letter-spacing: 0.32em; color: rgba(230,240,255,0.5); margin-bottom: 4px; }
.sm-head h2 { font-size: clamp(15px, 2.3vw, 22px); letter-spacing: 0.16em; color: #eaf2ff; margin: 0 0 6px; }
.sm-task { font-size: clamp(11px, 1.5vw, 13px); letter-spacing: 0.14em; color: #ffd166; }
.sm-count { color: #7ee2b8; margin-left: 14px; }
.sm-hint { font-size: clamp(10px, 1.3vw, 12px); color: rgba(230,240,255,0.45); margin: 6px 0 0; }
.sm-next { position: absolute; right: clamp(14px, 3vw, 34px); bottom: clamp(14px, 3vh, 30px); opacity: 0; transform: translateY(8px); transition: opacity 0.6s ease, transform 0.6s ease; background: rgba(20,28,46,0.9); border: 1px solid #7fb2ff; color: #d8e6ff; padding: 12px 30px; font-size: 14px; letter-spacing: 0.2em; border-radius: 8px; cursor: pointer; }
.sm-next.show { opacity: 1; transform: translateY(0); box-shadow: 0 0 20px rgba(127,178,255,0.25); }
.sm-all { position: absolute; left: 50%; bottom: clamp(18px, 6vh, 54px); transform: translateX(-50%); text-align: center; opacity: 0; transition: opacity 1s ease; pointer-events: none; padding: 14px 26px; border-radius: 12px; border: 1px solid rgba(255,209,102,0.6); background: rgba(40,32,10,0.88); box-shadow: 0 0 34px rgba(255,209,102,0.25); }
.sm-all.show { opacity: 1; }
.sm-all-t { font-size: clamp(15px, 2.4vw, 22px); letter-spacing: 0.2em; color: #ffd166; }
.sm-all-s { font-size: clamp(11px, 1.5vw, 13px); color: rgba(230,240,255,0.8); margin-top: 4px; }

@media (max-width: 640px) {
  .sm-head { width: 94vw; }
  .aim-head { width: 94vw; }
}


/* ================= v43: общий дизайн-слой «вау» ================= */

/* плавный вход каждого кадра пролога и карты */
.screen-opening, .screen-starmap { animation: frameIn 0.8s ease both; }
@keyframes frameIn { from { opacity: 0; } to { opacity: 1; } }

/* угловые скобки — фирменный элемент панелей (позиционирование задаёт сам экран) */
.xc { position: absolute; width: 14px; height: 14px; pointer-events: none; opacity: 0.9; }
.xc::before, .xc::after { content: ''; position: absolute; background: rgba(127,178,255,0.8); }
.xc::before { width: 14px; height: 1.5px; }
.xc::after { width: 1.5px; height: 14px; }
.xc.tl { left: -1px; top: -1px; }
.xc.tl::before { left: 0; top: 0; } .xc.tl::after { left: 0; top: 0; }
.xc.tr { right: -1px; top: -1px; }
.xc.tr::before { right: 0; top: 0; } .xc.tr::after { right: 0; top: 0; }
.xc.bl { left: -1px; bottom: -1px; }
.xc.bl::before { left: 0; bottom: 0; } .xc.bl::after { left: 0; bottom: 0; }
.xc.br { right: -1px; bottom: -1px; }
.xc.br::before { right: 0; bottom: 0; } .xc.br::after { right: 0; bottom: 0; }

/* ---------- кадр прицелов: огневой допуск ---------- */
.screen-aim { cursor: crosshair; }
.aim-head { left: 50%; top: clamp(40px, 7vh, 64px); transform: translateX(-50%); text-align: center; padding: 14px 26px 12px; background: rgba(12,18,32,0.66); border: 1px solid rgba(127,178,255,0.28); border-radius: 10px; backdrop-filter: blur(2px); pointer-events: none; }
.aim-head::before { content: ''; position: absolute; left: 10%; right: 10%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(127,178,255,0.75), transparent); animation: aimSweep 3.4s ease-in-out infinite; }
@keyframes aimSweep { 0%, 100% { transform: translateX(-30%); opacity: 0.4; } 50% { transform: translateX(30%); opacity: 1; } }
.aim-head h2 { font-size: clamp(15px, 2.3vw, 23px); letter-spacing: 0.2em; color: #eaf2ff; margin: 0 0 7px; }
.aim-head-row { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.aim-progress { display: flex; align-items: center; gap: 10px; }
.aim-progress-t { font-size: 11px; letter-spacing: 0.18em; color: #ffd166; }
.aim-pips { display: flex; gap: 5px; }
.aim-pips i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid rgba(127,178,255,0.5); transition: all 0.3s ease; }
.aim-pips i.ok { background: #7ee2b8; border-color: #7ee2b8; box-shadow: 0 0 8px rgba(126,226,184,0.7); }
.aim-pips i.bad { background: #e5484d; border-color: #e5484d; box-shadow: 0 0 8px rgba(229,72,77,0.7); }
.aim-hint { font-size: clamp(11px, 1.4vw, 13px); color: rgba(230,240,255,0.55); margin: 7px 0 0; }

/* ретикл: скобки-замки, кольца, перекрестие */
.aim-target { position: absolute; transform: translate(-50%, -50%); width: clamp(52px, 7.4vw, 72px); aspect-ratio: 1; background: none; border: none; cursor: crosshair; border-radius: 50%; filter: drop-shadow(0 0 6px rgba(127,178,255,0.35)); }
.aim-ret { width: 100%; height: 100%; overflow: visible; }
.aim-ret-br path { fill: none; stroke: rgba(127,178,255,0.9); stroke-width: 2.4; stroke-linecap: round; transition: stroke 0.25s ease, transform 0.45s cubic-bezier(0.2, 1.4, 0.4, 1); transform-origin: 50px 50px; }
.aim-ret-ring { fill: none; stroke: rgba(127,178,255,0.6); stroke-width: 1.6; stroke-dasharray: 10 7; animation: retSpin 14s linear infinite; transition: stroke 0.25s ease; transform-origin: 50px 50px; }
.aim-ret-ring2 { fill: none; stroke: rgba(127,178,255,0.35); stroke-width: 1; animation: retSpin 9s linear infinite reverse; transform-origin: 50px 50px; }
.aim-ret-cross line { stroke: rgba(190,214,255,0.85); stroke-width: 1.6; stroke-linecap: round; transition: stroke 0.25s ease; }
.aim-ret-dot { fill: rgba(255,209,102,0.95); animation: retBreathe 2.1s ease-in-out infinite; transform-origin: 50px 50px; }
@keyframes retSpin { to { transform: rotate(360deg); } }
@keyframes retBreathe { 0%, 100% { opacity: 0.75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.5); } }
.aim-target:hover .aim-ret-br path, .aim-target:hover .aim-ret-ring { stroke: #ffd166; }
.aim-target:hover .aim-ret-cross line { stroke: #ffd166; }
.aim-target:hover { filter: drop-shadow(0 0 10px rgba(255,209,102,0.45)); }
/* фиксация цели: скобки сходятся, кольцо становится сплошным */
.aim-target.hit { filter: drop-shadow(0 0 12px rgba(126,226,184,0.6)); }
.aim-target.hit .aim-ret-br path { stroke: #7ee2b8; transform: scale(0.8); }
.aim-target.hit .aim-ret-ring { stroke: #7ee2b8; stroke-dasharray: none; animation-duration: 3s; }
.aim-target.hit .aim-ret-ring2 { stroke: rgba(126,226,184,0.6); animation-play-state: paused; }
.aim-target.hit .aim-ret-cross line { stroke: rgba(220,255,240,0.95); }
.aim-target.hit .aim-ret-dot { fill: #eafff5; animation: none; }
.aim-target.hit::after { content: ''; position: absolute; inset: -18%; border: 1.5px solid rgba(126,226,184,0.8); border-radius: 50%; animation: hitWave 0.7s ease-out forwards; }
@keyframes hitWave { from { transform: scale(0.55); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }

/* искры попадания */
.aim-spark { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #ffe9b0; box-shadow: 0 0 6px rgba(255,209,102,0.9); pointer-events: none; animation: sparkFly 0.7s ease-out forwards; }
@keyframes sparkFly { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(0.4); opacity: 0; } }

/* промах: красная вспышка по краям + вздрагивание кадра */
.aim-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, transparent 58%, rgba(229,72,77,0.4) 100%); }
.aim-flash.on { animation: missFlash 0.55s ease-out; }
@keyframes missFlash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
.screen-aim.shake .aim-field { animation: aimShake 0.4s ease-out; }
@keyframes aimShake { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-5px, 3px); } 50% { transform: translate(4px, -3px); } 75% { transform: translate(-3px, -2px); } }

.aim-tag { font-size: 11px; letter-spacing: 0.14em; padding: 3px 9px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, 150%); pointer-events: none; font-weight: 600; }
.aim-tag.ok { color: #7ee2b8; background: rgba(20,46,34,0.92); border: 1px solid rgba(126,226,184,0.4); }
.aim-tag.bad { color: #ff8a8a; background: rgba(60,20,20,0.94); border: 1px solid rgba(229,72,77,0.45); transform: translate(-50%, -170%); z-index: 5; }

/* итог: шкала кармы со скользящим штифтом и счётчиком */
.aim-result { position: absolute; left: 50%; bottom: clamp(18px, 6vh, 54px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 26px; border-radius: 12px; background: rgba(12,18,32,0.82); border: 1px solid rgba(127,178,255,0.3); backdrop-filter: blur(2px); }
.aim-meter { display: flex; align-items: center; gap: 10px; }
.aim-meter-l { font-size: 11px; color: rgba(230,240,255,0.45); }
.aim-scale { position: relative; width: clamp(180px, 26vw, 260px); height: 6px; border-radius: 999px; background: linear-gradient(90deg, rgba(229,72,77,0.5), rgba(127,178,255,0.35) 50%, rgba(126,226,184,0.55)); }
.aim-notch { position: absolute; left: 50%; top: -5px; bottom: -5px; width: 1.5px; background: rgba(230,240,255,0.55); }
.aim-pin { position: absolute; top: 50%; left: calc(50% - 4px); width: 9px; height: 9px; border-radius: 50%; background: #d8e6ff; transform: translateY(-50%); transition: left 1s cubic-bezier(0.2, 1.2, 0.3, 1), background 0.4s ease, box-shadow 0.4s ease; }
.aim-pin.good { background: #7ee2b8; box-shadow: 0 0 14px rgba(126,226,184,0.9); }
.aim-pin.bad { background: #e5484d; box-shadow: 0 0 14px rgba(229,72,77,0.9); }
.aim-karma-wrap { display: flex; align-items: baseline; gap: 12px; }
.aim-karma-l { font-size: 12px; letter-spacing: 0.3em; color: rgba(230,240,255,0.6); }
.aim-karma { font-size: clamp(22px, 3.4vw, 34px); letter-spacing: 0.1em; min-width: 3.2ch; text-align: center; }
.aim-karma.good { color: #7ee2b8; text-shadow: 0 0 22px rgba(126,226,184,0.55); }
.aim-karma.bad { color: #ff8a8a; text-shadow: 0 0 22px rgba(229,72,77,0.55); }

/* ---------- звёздная карта: обсерватория ---------- */
.sm-head { left: 50%; top: clamp(10px, 2.6vh, 22px); transform: translateX(-50%); text-align: center; padding: 12px 30px 11px; background: rgba(12,18,32,0.66); border: 1px solid rgba(127,178,255,0.28); border-radius: 10px; backdrop-filter: blur(2px); pointer-events: none; }
.sm-head::before { content: ''; position: absolute; left: 12%; right: 12%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,209,102,0.8), transparent); animation: aimSweep 4.2s ease-in-out infinite; }
.sm-sup { font-size: clamp(10px, 1.2vw, 12px); letter-spacing: 0.34em; color: rgba(230,240,255,0.55); margin-bottom: 3px; }
.sm-head h2 { font-size: clamp(15px, 2.2vw, 22px); letter-spacing: 0.16em; color: #eaf2ff; margin: 0 0 6px; }
.sm-task { font-size: clamp(11px, 1.4vw, 13px); letter-spacing: 0.14em; color: #ffd166; }
.sm-count { color: #7ee2b8; margin-left: 14px; }
.sm-progress { position: relative; height: 4px; margin: 8px auto 0; width: min(360px, 60vw); border-radius: 999px; background: rgba(127,178,255,0.18); overflow: hidden; }
.sm-progress-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: linear-gradient(90deg, #7fb2ff, #ffd166); transition: width 0.6s ease; }
.sm-progress-fill.done { background: linear-gradient(90deg, #ffd166, #ffe9b0); animation: progPulse 1.6s ease-in-out infinite; }
@keyframes progPulse { 0%, 100% { box-shadow: 0 0 8px rgba(255,209,102,0.4); } 50% { box-shadow: 0 0 16px rgba(255,209,102,0.9); } }
.sm-hint { font-size: clamp(10px, 1.2vw, 12px); color: rgba(230,240,255,0.45); margin: 7px 0 0; }

/* каталог: найденные узоры горят */
.sm-legend { position: absolute; left: clamp(12px, 2vw, 24px); bottom: clamp(12px, 2.6vh, 24px); display: flex; flex-wrap: wrap; gap: 5px 8px; max-width: min(300px, 46vw); }
.sm-leg { font-size: 10px; letter-spacing: 0.12em; color: rgba(230,240,255,0.32); padding: 2px 7px; border-radius: 5px; border: 1px solid rgba(127,178,255,0.14); transition: all 0.5s ease; }
.sm-leg.got { color: #ffd166; border-color: rgba(255,209,102,0.55); background: rgba(58,46,14,0.5); text-shadow: 0 0 8px rgba(255,209,102,0.5); }

/* салют «все 13»: панель с живой каймой */
.sm-all { position: absolute; left: 50%; bottom: clamp(18px, 6vh, 54px); transform: translateX(-50%); text-align: center; opacity: 0; transition: opacity 1s ease; pointer-events: none; padding: 15px 30px; border-radius: 12px; background: rgba(40,32,10,0.9); border: 1px solid rgba(255,209,102,0.6); overflow: hidden; }
.sm-all::before { content: ''; position: absolute; inset: -60%; background: conic-gradient(from 0deg, transparent 0 70deg, rgba(255,209,102,0.35) 85deg, transparent 100deg 360deg); animation: allHalo 3.2s linear infinite; }
@keyframes allHalo { to { transform: rotate(360deg); } }
.sm-all.show { opacity: 1; }
.sm-all > * { position: relative; }
.sm-all-t { font-size: clamp(15px, 2.3vw, 22px); letter-spacing: 0.2em; color: #ffd166; text-shadow: 0 0 18px rgba(255,209,102,0.6); }
.sm-all-s { font-size: clamp(11px, 1.4vw, 13px); color: rgba(230,240,255,0.85); margin-top: 4px; }


@media (max-width: 640px) {
  .sm-head { width: 94vw; padding: 10px 12px 9px; }
  .aim-head { width: 94vw; padding: 10px 8px 9px; }
  .sm-legend { display: none; }
}


/* ECHO-9 v47 — живой канал Эхо */
.echo-contact-panel{margin:22px 0 8px;padding:16px 18px;border:1px solid rgba(115,218,211,.28);border-radius:14px;background:linear-gradient(135deg,rgba(17,47,54,.78),rgba(12,19,31,.82));box-shadow:inset 0 0 28px rgba(75,190,184,.055)}
.echo-contact-title{display:flex;align-items:center;gap:9px;color:#9de6dc;font:700 11px/1.3 sans-serif;font-family:var(--font-display,sans-serif);letter-spacing:.14em;margin-bottom:8px}
.echo-pulse{width:8px;height:8px;border-radius:50%;background:#75e4d4;box-shadow:0 0 12px #75e4d4;animation:echoPulse 1.8s infinite}
.echo-contact-hint{font-size:12px;line-height:1.55;color:rgba(218,235,238,.65);margin-bottom:12px}
.echo-contact-buttons{display:flex;flex-wrap:wrap;gap:8px}
.echo-contact-btn{border:1px solid rgba(130,218,210,.24);border-radius:9px;padding:9px 12px;background:rgba(64,135,139,.12);color:#c7f4ed;font:600 11px/1.3 sans-serif;font-family:inherit;cursor:pointer;transition:background .18s,border-color .18s,transform .18s}
.echo-contact-btn:hover{background:rgba(87,190,180,.2);border-color:rgba(130,235,220,.6);transform:translateY(-1px)}
@keyframes echoPulse{0%,100%{opacity:.65;transform:scale(.85)}50%{opacity:1;transform:scale(1.18)}}

/* ================= v50: карма в панели игрока — кольцо-«душа» ================= */
.hud-karma {
  --kc-rgb: 154,164,180; --ki: 0;
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 10px;
  margin: 0; padding: 3px 16px 3px 4px; width: auto; border-radius: 999px;
  font-size: 11px; letter-spacing: normal; color: inherit; cursor: default; user-select: none;
  border: 1px solid rgba(var(--kc-rgb), 0.4);
  background:
    radial-gradient(120% 150% at 0% 50%, rgba(var(--kc-rgb), 0.24), transparent 62%),
    linear-gradient(180deg, rgba(20,28,48,0.86), rgba(7,11,21,0.92));
  box-shadow:
    0 0 calc(6px + 22px * var(--ki)) rgba(var(--kc-rgb), calc(0.16 + 0.34 * var(--ki))),
    inset 0 1px 0 rgba(255,255,255,0.08);
  transition: border-color .6s ease, box-shadow .6s ease;
}
.hud-karma.kr-good { --kc-rgb: 126,226,184; }
.hud-karma.kr-bad  { --kc-rgb: 255,107,120; }
/* диагональный блик, раз в несколько секунд */
.hud-karma::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,0.13) 50%, transparent 62%);
  background-size: 260% 100%; background-position: 160% 0;
  animation: krSheen 6.5s ease-in-out infinite;
}
.kr-orb { position: relative; flex: none; width: 38px; height: 38px; display: grid; place-items: center; }
.kr-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.kr-track { fill: rgba(5,9,18,0.8); stroke: rgba(255,255,255,0.09); stroke-width: 3.2; }
.kr-ticks { fill: none; stroke: rgba(255,255,255,0.2); stroke-width: 2.2; stroke-dasharray: 0.9 4.1; }
.kr-arc {
  fill: none; stroke-width: 3.2; stroke-linecap: round;
  transform-origin: 24px 24px; transform: rotate(-90deg);
  transition: stroke-dasharray .8s cubic-bezier(.2,.8,.2,1), opacity .35s ease;
}
.kr-pos { stroke: #7ee2b8; filter: drop-shadow(0 0 3px rgba(126,226,184,0.95)); }
.kr-neg { stroke: #ff6b78; filter: drop-shadow(0 0 3px rgba(255,107,120,0.95)); transform: rotate(-90deg) scaleY(-1); }
.kr-orbit { transform-origin: 24px 24px; opacity: 0; transition: opacity .5s;
  animation: krOrbit calc(7s - 4.6s * var(--ki)) linear infinite; }
.kr-good .kr-orbit, .kr-bad .kr-orbit { opacity: 1; }
.kr-dot { fill: #fff; filter: drop-shadow(0 0 3px rgb(var(--kc-rgb))) drop-shadow(0 0 6px rgb(var(--kc-rgb))); }
.kr-core {
  position: absolute; inset: 7px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 38%, rgba(var(--kc-rgb), calc(0.26 + 0.36 * var(--ki))), transparent 72%);
  animation: krBreath 3.4s ease-in-out infinite;
}
.kr-val {
  position: relative; font-family: 'Manrope', 'Unbounded', system-ui, sans-serif;
  font-weight: 800; font-size: 12px; line-height: 1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; color: rgb(var(--kc-rgb));
  text-shadow: 0 0 8px rgba(var(--kc-rgb), 0.75); transition: color .5s;
}
.kr-long .kr-val { font-size: 10.5px; letter-spacing: -0.04em; }
.kr-val.bump { animation: krBump .7s cubic-bezier(.2,.9,.3,1.3); }
.kr-txt { position: relative; display: flex; flex-direction: column; gap: 2px; line-height: 1.1; min-width: 84px; }
.kr-lab { font-size: 9px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; color: rgba(230,240,255,0.55); }
.kr-state {
  font-size: 10.5px; font-weight: 800; letter-spacing: .13em; white-space: nowrap;
  color: rgb(var(--kc-rgb)); text-shadow: 0 0 10px rgba(var(--kc-rgb), 0.55); transition: color .5s;
}
.kr-state.swap { animation: krSwap .5s ease; }
/* волна при изменении */
.hud-karma.pulse .kr-orb::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  border: 2px solid rgb(var(--kc-rgb)); animation: krRing .9s ease-out forwards;
}
.hud-karma.pulse { animation: krFlash .9s ease-out; }
/* искры и всплывающая дельта */
.kr-p { position: absolute; left: 50%; top: 50%; width: var(--s, 4px); height: var(--s, 4px);
  margin: -2px 0 0 -2px; border-radius: 50%; pointer-events: none; z-index: 3;
  animation: krP var(--d, .8s) cubic-bezier(.1,.7,.3,1) forwards; }
.kr-delta { position: absolute; left: 50%; top: 100%; z-index: 4; pointer-events: none;
  font-family: 'Manrope', system-ui, sans-serif; font-weight: 800; font-size: 14px; letter-spacing: .02em;
  text-shadow: 0 0 10px currentColor, 0 2px 6px rgba(0,0,0,.8);
  animation: krDelta 1.3s cubic-bezier(.2,.8,.2,1) forwards; }

@keyframes krSheen { 0%, 58% { background-position: 160% 0; } 100% { background-position: -60% 0; } }
@keyframes krOrbit { to { transform: rotate(360deg); } }
@keyframes krBreath { 0%, 100% { opacity: .7; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes krBump { 0% { transform: scale(1); } 35% { transform: scale(1.5); filter: brightness(1.7); } 100% { transform: scale(1); } }
@keyframes krSwap { from { opacity: 0; transform: translateY(5px); letter-spacing: .3em; } to { opacity: 1; transform: none; letter-spacing: .13em; } }
@keyframes krRing { from { transform: scale(1); opacity: .95; } to { transform: scale(2.3); opacity: 0; } }
@keyframes krFlash { 0% { filter: brightness(1.7); } 100% { filter: brightness(1); } }
@keyframes krP { 0% { transform: translate(0,0) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
@keyframes krDelta {
  0%   { opacity: 0; transform: translate(-50%, -8px) scale(.5); }
  16%  { opacity: 1; transform: translate(-50%, 2px) scale(1.25); }
  100% { opacity: 0; transform: translate(-50%, 26px) scale(1); }
}
@media (max-width: 520px) { .kr-state { display: none; } .kr-txt { min-width: 0; } .hud-karma { padding-right: 12px; } }
@media (prefers-reduced-motion: reduce) {
  .hud-karma, .hud-karma *, .hud-karma::before { animation: none !important; transition: none !important; }
}

/* ============================================================
   ЦВЕТОВОЙ РЕЕСТР ЭХО-9 (v52): один цвет = один смысл во всей
   игре. Переменные наполняются из assets/js/colors.js через
   installColorVars(); ниже — резервные значения того же реестра.
   ============================================================ */
:root {
  --c-plot: #f0b429;   --c-plot-rgb: 240,180,41;
  --c-threat: #e5484d; --c-threat-rgb: 229,72,77;
  --c-echo: #67e8f9;   --c-echo-rgb: 103,232,249;
  --c-loot: #ff8a3d;   --c-loot-rgb: 255,138,61;
  --c-system: #7ee2b8; --c-system-rgb: 126,226,184;
  --c-fate: #b18cff;   --c-fate-rgb: 177,140,255;
  --c-nav: #8fb6d8;    --c-nav-rgb: 143,182,216;
  --c-media: #9aa7b5;  --c-media-rgb: 154,167,181;
  --c-spectrum: linear-gradient(90deg, #f0b429, #e5484d, #67e8f9, #ff8a3d, #7ee2b8, #b18cff, #8fb6d8, #9aa7b5);
}

/* ---------- файловый менеджер: цвет = семантика файла ---------- */
.adm-file, .adm-folder, .arch-item, .legend-row, .spectrum-chip { --fc: var(--c-media); }
.adm-file[data-c="plot"], .adm-folder[data-c="plot"], .arch-item[data-c="plot"], .legend-row[data-c="plot"], .spectrum-chip[data-c="plot"] { --fc: var(--c-plot); --fc-rgb: var(--c-plot-rgb); }
.adm-file[data-c="threat"], .adm-folder[data-c="threat"], .arch-item[data-c="threat"], .legend-row[data-c="threat"], .spectrum-chip[data-c="threat"] { --fc: var(--c-threat); --fc-rgb: var(--c-threat-rgb); }
.adm-file[data-c="echo"], .adm-folder[data-c="echo"], .arch-item[data-c="echo"], .legend-row[data-c="echo"], .spectrum-chip[data-c="echo"] { --fc: var(--c-echo); --fc-rgb: var(--c-echo-rgb); }
.adm-file[data-c="loot"], .adm-folder[data-c="loot"], .arch-item[data-c="loot"], .legend-row[data-c="loot"], .spectrum-chip[data-c="loot"] { --fc: var(--c-loot); --fc-rgb: var(--c-loot-rgb); }
.adm-file[data-c="system"], .adm-folder[data-c="system"], .arch-item[data-c="system"], .legend-row[data-c="system"], .spectrum-chip[data-c="system"] { --fc: var(--c-system); --fc-rgb: var(--c-system-rgb); }
.adm-file[data-c="fate"], .adm-folder[data-c="fate"], .arch-item[data-c="fate"], .legend-row[data-c="fate"], .spectrum-chip[data-c="fate"] { --fc: var(--c-fate); --fc-rgb: var(--c-fate-rgb); }
.adm-file[data-c="nav"], .adm-folder[data-c="nav"], .arch-item[data-c="nav"], .legend-row[data-c="nav"], .spectrum-chip[data-c="nav"] { --fc: var(--c-nav); --fc-rgb: var(--c-nav-rgb); }
.adm-file[data-c="media"], .adm-folder[data-c="media"], .arch-item[data-c="media"], .legend-row[data-c="media"], .spectrum-chip[data-c="media"] { --fc: var(--c-media); --fc-rgb: var(--c-media-rgb); }

/* файл: цветной край, иконка и имя своего цвета; ховер подсвечивает */
.adm-file { border-left-color: rgba(var(--fc-rgb, 154,167,181), 0.4); }
.adm-file .adm-fico { color: var(--fc); opacity: 1; filter: drop-shadow(0 0 3px rgba(var(--fc-rgb, 154,167,181), 0.5)); }
.adm-file:hover { background: rgba(var(--fc-rgb, 154,167,181), 0.07); border-left-color: var(--fc); transform: none; }
.adm-file:hover .adm-fname { color: rgba(255,255,255,0.95); text-shadow: 0 0 6px rgba(var(--fc-rgb, 154,167,181), 0.55); }
.adm-file.active { background: rgba(var(--fc-rgb, 154,167,181), 0.12); border-left-color: var(--fc); }
.adm-file.active .adm-fname { color: var(--fc); text-shadow: 0 0 7px rgba(var(--fc-rgb, 154,167,181), 0.6); }

/* папка: имя и счётчик в своём цвете */
.adm-folder .adm-fico { color: var(--fc); }
.adm-folder .adm-folname { color: rgba(var(--fc-rgb, 154,167,181), 0.88); }
.adm-folder:hover { background: rgba(var(--fc-rgb, 154,167,181), 0.07); }
.adm-folder .adm-fcount { color: rgba(var(--fc-rgb, 154,167,181), 0.75); background: rgba(var(--fc-rgb, 154,167,181), 0.1); border: 1px solid rgba(var(--fc-rgb, 154,167,181), 0.25); }

/* изменённый файл: пульсирующая точка своего цвета */
.adm-dot { color: var(--fc, #e5484d); animation: admDotPulse 1.6s ease-in-out infinite; text-shadow: 0 0 6px rgba(var(--fc-rgb, 229,72,77), 0.7); }
@keyframes admDotPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.82); } }

/* спектр-полоса: все цвета реестра одной лентой над деревом */
.spectrum-bar { display: flex; height: 4px; margin: 4px 8px 8px; border-radius: 999px; overflow: hidden; gap: 2px; }
.spectrum-chip { flex: 1 1 0; background: var(--fc); box-shadow: 0 0 8px rgba(var(--fc-rgb, 154,167,181), 0.55); transition: flex-grow 0.35s cubic-bezier(0.2, 0.8, 0.3, 1); }
.spectrum-chip:hover { flex-grow: 6; }

/* легенда цветов: свотч-пульс + метка цвета + описание */
.legend-box { padding: 2px 10px 10px 18px; }
.legend-row { display: flex; align-items: baseline; gap: 8px; padding: 4px 6px; border-radius: 6px; }
.legend-row:hover { background: rgba(var(--fc-rgb, 154,167,181), 0.07); }
.legend-swatch { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 3px; background: var(--fc); box-shadow: 0 0 7px rgba(var(--fc-rgb, 154,167,181), 0.6); align-self: center; animation: legendSwatch 2.4s ease-in-out infinite; }
@keyframes legendSwatch { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.8); } }
.legend-label { flex: 0 0 auto; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; color: var(--fc); }
.legend-desc { flex: 1 1 auto; min-width: 0; font-size: 10.5px; color: rgba(230,240,255,0.5); }
.legend-note { margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(var(--c-plot-rgb), 0.3); font-size: 10px; line-height: 1.5; color: rgba(230,240,255,0.42); }

/* архив файлов: цветная рамка и метка типа медиа */
.arch-item { border-left: 2px solid rgba(var(--fc-rgb, 154,167,181), 0.45); }
.arch-item:hover { border-color: var(--fc); border-left-width: 2px; background: rgba(var(--fc-rgb, 154,167,181), 0.07); }
.arch-item .arch-ico { color: var(--fc); text-shadow: 0 0 5px rgba(var(--fc-rgb, 154,167,181), 0.5); }
.arch-kind { flex: 0 0 auto; font-size: 9.5px; letter-spacing: 0.05em; color: rgba(var(--fc-rgb, 154,167,181), 0.8); }

/* ---------- враги: программная карточка боя ---------- */
.enemy-card { --ec: var(--c-threat); }
.enemy-card[data-c="threat"] { --ec: var(--c-threat); --ec-rgb: var(--c-threat-rgb); }
.enemy-card[data-c="echo"] { --ec: var(--c-echo); --ec-rgb: var(--c-echo-rgb); }
.enemy-card[data-c="loot"] { --ec: var(--c-loot); --ec-rgb: var(--c-loot-rgb); }
.enemy-card[data-c="plot"] { --ec: var(--c-plot); --ec-rgb: var(--c-plot-rgb); }
.enemy-card[data-c="fate"] { --ec: var(--c-fate); --ec-rgb: var(--c-fate-rgb); }
.enemy-card[data-c="nav"] { --ec: var(--c-nav); --ec-rgb: var(--c-nav-rgb); }
.enemy-card[data-c="system"] { --ec: var(--c-system); --ec-rgb: var(--c-system-rgb); }
.enemy-card[data-c="media"] { --ec: var(--c-media); --ec-rgb: var(--c-media-rgb); }
.enemy-card::before, .enemy-card::after { content: ''; position: absolute; width: 14px; height: 14px; pointer-events: none; opacity: 0.8; transition: opacity 0.2s, width 0.2s, height 0.2s; }
.enemy-card::before { top: 5px; left: 5px; border-top: 2px solid var(--ec); border-left: 2px solid var(--ec); }
.enemy-card::after { bottom: 5px; right: 5px; border-bottom: 2px solid var(--ec); border-right: 2px solid var(--ec); }
.enemy-card:hover::before, .enemy-card:hover::after { width: 22px; height: 22px; opacity: 1; filter: drop-shadow(0 0 4px rgba(var(--ec-rgb, 229,72,77), 0.7)); }
.enemy-card.targeting::before, .enemy-card.targeting::after { width: 20px; height: 20px; opacity: 1; animation: progBrackets 1.1s ease-in-out infinite; }
@keyframes progBrackets { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(2px, 2px); } }
.enemy-uid { margin-left: auto; flex: 0 0 auto; font-size: 9px; letter-spacing: 0.06em; color: rgba(var(--ec-rgb, 229,72,77), 0.85); border: 1px solid rgba(var(--ec-rgb, 229,72,77), 0.4); border-radius: 4px; padding: 1px 5px; background: rgba(var(--ec-rgb, 229,72,77), 0.08); }

/* ---------- история роя (v53): катсцена прибытия + хроника ---------- */
.tale-arriving .tale-arrival { display: flex; flex-direction: column; gap: 14px; max-width: 780px; margin: 0 auto; width: 100%; }
.tale-planet-cv { display: block; width: min(760px, 92vw); height: clamp(180px, 30vh, 300px); margin: 0 auto; border-radius: 14px; border: 1px solid rgba(177,140,255,0.35); box-shadow: 0 0 34px rgba(177,140,255,0.16), inset 0 0 40px rgba(0,0,0,0.5); background: #05060c; }
.tale-arrival-head { text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.tale-planet-kind { font-size: 11px; color: rgba(177,140,255,0.8); letter-spacing: 0.08em; }
.sup.fate { color: var(--c-fate, #b18cff); font-size: 11px; letter-spacing: 0.14em; }
.tale-arrival .tale-body { background: rgba(20,14,38,0.55); border: 1px solid rgba(177,140,255,0.22); border-radius: 12px; padding: 16px 18px; }
.tale-arrival-meta { text-align: center; margin-top: 10px; }
.tale-chron { background: rgba(0,0,0,0.45); border: 1px dashed rgba(177,140,255,0.3); border-radius: 10px; padding: 10px 14px; }
.tale-chron-wide { margin: 14px auto 0; max-width: 640px; }
.tale-chron-title { display: block; font-size: 10px; letter-spacing: 0.16em; color: rgba(177,140,255,0.85); margin-bottom: 6px; }
.tale-chron-row { font-size: 11px; line-height: 1.75; color: rgba(230,240,255,0.78); display: flex; gap: 8px; align-items: baseline; }
.tale-chron-pts { margin-left: auto; color: var(--c-loot, #ff8a3d); font-weight: 700; }

/* ---------- v54: несколько историй роя ---------- */
.title-stories { display: flex; flex-direction: column; gap: 8px; margin: 16px auto 0; max-width: 420px; }
.title-stories-sup { font-size: 10px; letter-spacing: 0.22em; color: rgba(177,140,255,0.75); }
.btn-tale { margin: 0 auto; padding: 12px 28px; width: 100%; max-width: 380px; font-size: 15px; letter-spacing: 0.16em; color: #b18cff; background: rgba(177,140,255,0.07); border: 1px solid rgba(177,140,255,0.45); border-radius: 10px; cursor: pointer; transition: all 0.15s; }
.btn-tale:hover { background: rgba(177,140,255,0.16); color: #e3d2ff; box-shadow: 0 0 24px rgba(177,140,255,0.35); transform: translateY(-1px); }
.btn-tale:active { transform: scale(0.98); }
/* админка: список историй и чипсы конструктора */
.adm-story-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.adm-story-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: rgba(0,0,0,0.35); border: 1px solid rgba(177,140,255,0.3); border-radius: 10px; padding: 10px 12px; }
.adm-story-row.hidden { opacity: 0.55; border-style: dashed; }
.adm-story-info { display: flex; flex-direction: column; gap: 3px; min-width: 220px; }
.adm-story-name { font-size: 16px; letter-spacing: 0.06em; }
.adm-story-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-story-form { background: rgba(0,0,0,0.3); border: 1px dashed rgba(177,140,255,0.35); border-radius: 12px; padding: 12px; }
.adm-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0; }
.adm-chip { padding: 7px 13px; font-size: 12px; border-radius: 999px; cursor: pointer; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.22); color: rgba(255,255,255,0.75); transition: all 0.12s; }
.adm-chip.on { background: rgba(177,140,255,0.2); border-color: rgba(177,140,255,0.65); color: #e3d2ff; box-shadow: 0 0 12px rgba(177,140,255,0.25); }
.adm-chip.story-chip-all { border-style: dashed; }
.adm-story-save { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }

/* v55: секретная награда инопланетянина на финале истории роя */
.tale-alien-reward { display: flex; flex-direction: column; gap: 4px; margin: 14px auto 4px; padding: 12px 18px; max-width: 560px; text-align: center; font-size: 16px; letter-spacing: 0.06em; color: #b18cff; background: rgba(177,140,255,0.08); border: 1px solid rgba(177,140,255,0.5); border-radius: 12px; box-shadow: 0 0 26px rgba(177,140,255,0.2); }
.tale-alien-reward .sup2 { font-size: 10px; letter-spacing: 0.22em; color: rgba(177,140,255,0.75); }
.tale-alien-sub { font-family: var(--mono, monospace); font-size: 10.5px; letter-spacing: 0.04em; color: rgba(216,180,254,0.6); }
/* v62: блок «способности открыты» на финале истории роя */
.tale-abil-reward { display: flex; flex-direction: column; gap: 4px; margin: 10px auto 4px; padding: 12px 18px; max-width: 560px; text-align: center; font-size: 16px; letter-spacing: 0.06em; color: #7fd8ff; background: rgba(127,216,255,0.07); border: 1px solid rgba(127,216,255,0.5); border-radius: 12px; box-shadow: 0 0 26px rgba(127,216,255,0.18); }
.tale-abil-reward .sup2 { font-size: 10px; letter-spacing: 0.22em; color: rgba(127,216,255,0.8); }
.tale-abil-reward .tale-alien-sub { color: rgba(127,216,255,0.55); }

/* ---------- v57: вау-эффекты магазина ---------- */
.shop-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.shop-set-banner { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%) translateY(6px); white-space: nowrap; font-size: 10px; letter-spacing: 0.18em; color: #7ee2b8; background: rgba(126, 226, 184, 0.12); border: 1px solid rgba(126, 226, 184, 0.5); padding: 5px 14px; border-radius: 20px; opacity: 0; transition: opacity 0.4s ease, transform 0.4s ease; pointer-events: none; box-shadow: 0 0 18px -4px rgba(126, 226, 184, 0.7); }
.shop-stage.set-alien .shop-set-banner { opacity: 1; transform: translateX(-50%); }
.shop-stage.set-alien { border-color: rgba(126, 226, 184, 0.6); }
.shop-stage.set-alien .shop-stage-glow { background: radial-gradient(circle at var(--gx, 50%) var(--gy, 42%), rgba(126, 226, 184, 0.2), transparent 68%) !important; }
.shop-fly { position: fixed; z-index: 999; pointer-events: none; transition: transform 0.62s cubic-bezier(0.2, 0.8, 0.3, 1), opacity 0.34s ease 0.3s; will-change: transform, opacity; }
.shop-balance { position: relative; }
.shop-price-float { position: absolute; right: 14px; top: -6px; font-size: 11px; color: #f0b429; letter-spacing: 0.1em; pointer-events: none; animation: shopPriceFloat 0.9s ease forwards; font-family: var(--mono, monospace); }
@keyframes shopPriceFloat { from { opacity: 0; transform: translateY(8px); } 25% { opacity: 1; } to { opacity: 0; transform: translateY(-30px); } }
.shop-stage.poke .shop-big-cv { animation: shopPoke 0.5s cubic-bezier(0.2, 0.8, 0.3, 1); }
@keyframes shopPoke { 0% { transform: scale(1); } 35% { transform: scale(1.07) rotate(-3deg); } 70% { transform: scale(0.98) rotate(1.5deg); } 100% { transform: scale(1); } }
.shop-big-cv { cursor: pointer; }
.shop-collect { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; background: rgba(127, 216, 255, 0.07); border: 1px solid rgba(127, 216, 255, 0.3); font-size: 11px; letter-spacing: 0.12em; color: #9aa4b4; }
.shop-collect b { color: #7fd8ff; font-variant-numeric: tabular-nums; }
.shop-collect-bar { width: 90px; height: 5px; border-radius: 4px; background: rgba(127, 216, 255, 0.15); overflow: hidden; }
.shop-collect-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7fd8ff, #b18cff); border-radius: 4px; box-shadow: 0 0 10px rgba(127, 216, 255, 0.8); transition: width 0.6s cubic-bezier(0.2, 0.8, 0.3, 1); }
.shop-stage-glow { background: radial-gradient(circle at var(--gx, 50%) var(--gy, 42%), var(--slot-glow, rgba(127, 216, 255, 0.18)), transparent 68%); }
@media (max-width: 560px) { .shop-collect { width: 100%; justify-content: space-between; } }

/* ---------- v58: зеркальный зал + кино + достижения ---------- */
.shop-mirror { display: block; }
.shop-mir-head { padding: 14px 16px; border-radius: 14px; background: rgba(127, 216, 255, 0.06); border: 1px solid rgba(127, 216, 255, 0.25); margin-bottom: 14px; }
.shop-mir-title { font-size: 14px; letter-spacing: 0.16em; color: #dfe7f2; }
.shop-mir-sub { margin-top: 6px; font-size: 11px; color: #8fa0b5; letter-spacing: 0.08em; }
.shop-mir-cap { margin: 16px 0 10px; font-size: 11px; letter-spacing: 0.22em; color: #7fd8ff; opacity: 0.85; }
.shop-mir-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.shop-mir-part { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 12px; background: rgba(20, 28, 42, 0.55); border: 1px solid rgba(127, 216, 255, 0.14); cursor: pointer; transition: border-color 0.25s ease, transform 0.25s ease; }
.shop-mir-part:hover { border-color: rgba(127, 216, 255, 0.6); transform: translateY(-3px); }
.shop-mir-part.worn { border-color: rgba(177, 140, 255, 0.7); }
.shop-mir-cv { width: 72px; height: 90px; }
.shop-mir-name { font-size: 10px; color: #c9d4e2; text-align: center; line-height: 1.25; }
.shop-mir-slot { font-size: 9px; letter-spacing: 0.14em; color: #7b8a9e; }
.shop-mir-snaps { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.shop-mir-snap { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 14px; background: rgba(240, 180, 41, 0.05); border: 1px solid rgba(240, 180, 41, 0.25); }
.shop-mir-snapcv { width: 84px; height: 105px; }
.shop-mir-restore { margin-top: 2px; padding: 6px 14px; border-radius: 10px; background: rgba(240, 180, 41, 0.14); border: 1px solid rgba(240, 180, 41, 0.55); color: #f0b429; font-size: 10px; letter-spacing: 0.18em; cursor: pointer; transition: background 0.25s ease, box-shadow 0.25s ease; }
.shop-mir-restore:hover { background: rgba(240, 180, 41, 0.26); box-shadow: 0 0 16px -4px rgba(240, 180, 41, 0.8); }
.shop-mir-log { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; border-radius: 10px; background: rgba(20, 28, 42, 0.5); border: 1px solid rgba(127, 216, 255, 0.1); margin-bottom: 6px; font-size: 11px; color: #9fb0c4; }
.shop-mir-log b { color: #f0b429; }
.shop-mir-log i { font-style: normal; color: #66788c; }
.shop-mir-empty { padding: 10px 14px; font-size: 11px; color: #66788c; letter-spacing: 0.06em; margin-bottom: 6px; }
.shop-cine { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: opacity 0.22s ease; }
.shop-cine.out { opacity: 0; }
.shop-cine-veil, .shop-cine::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 46%, rgba(10, 16, 28, 0.68), rgba(6, 10, 18, 0.92)); animation: shopCineVeil 0.4s ease; }
.shop-stage.cine-on .shop-big-cv { opacity: 0.14; filter: blur(2px); transition: opacity 0.3s ease; }
.shop-stage.cine-on .shop-stage-glow, .shop-stage.cine-on .shop-fx { opacity: 0.35; }
.shop-cine-stage { position: relative; width: 220px; height: 316px; will-change: transform; }
.shop-cine-cv, .shop-cine-fx { position: absolute; inset: 0; width: 100%; height: 100%; }
.shop-cine-lab { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-size: 15px; letter-spacing: 0.2em; color: #f0b429; text-shadow: 0 0 18px rgba(240, 180, 41, 0.5); animation: shopCineLab 0.5s ease 0.25s backwards; pointer-events: none; }
.shop-cine-lab i { display: block; margin-top: 6px; font-style: normal; font-family: var(--mono, monospace); font-size: 10px; letter-spacing: 0.16em; color: #9fb0c4; }
@keyframes shopCineVeil { from { opacity: 0; } to { opacity: 1; } }
@keyframes shopCineLab { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.shop-achv-toast { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 45; text-align: center; padding: 12px 22px; border-radius: 14px; background: linear-gradient(160deg, rgba(240, 180, 41, 0.16), rgba(240, 180, 41, 0.06)); border: 1px solid rgba(240, 180, 41, 0.6); box-shadow: 0 0 34px -8px rgba(240, 180, 41, 0.8); color: #f0b429; animation: shopAchv 0.5s cubic-bezier(0.2, 0.8, 0.3, 1); pointer-events: none; white-space: nowrap; }
.shop-achv-cap { display: block; font-size: 9px; letter-spacing: 0.3em; color: #c9d4e2; margin-bottom: 4px; }
.shop-achv-toast b { font-size: 14px; letter-spacing: 0.14em; }
.shop-achv-toast i { display: block; margin-top: 4px; font-style: normal; font-family: var(--mono, monospace); font-size: 10px; color: #9fb0c4; letter-spacing: 0.1em; }
@keyframes shopAchv { from { opacity: 0; transform: translateX(-50%) scale(0.9); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
.shop-stage[data-frame="1"] { border-color: rgba(205, 127, 50, 0.55); box-shadow: 0 0 0 1px rgba(205, 127, 50, 0.25), 0 0 26px -10px rgba(205, 127, 50, 0.8); }
.shop-stage[data-frame="2"] { border-color: rgba(192, 198, 210, 0.65); box-shadow: 0 0 0 1px rgba(192, 198, 210, 0.3), 0 0 30px -8px rgba(192, 198, 210, 0.8); }
.shop-stage[data-frame="3"] { border-color: rgba(240, 180, 41, 0.75); box-shadow: 0 0 0 1px rgba(240, 180, 41, 0.35), 0 0 40px -6px rgba(240, 180, 41, 0.9); }
@media (max-width: 560px) {
  .shop-mir-wall, .shop-mir-snaps { grid-template-columns: repeat(3, 1fr); }
  .shop-cine-stage { width: 180px; height: 259px; }
  .shop-cine-lab { font-size: 12px; }
  .shop-achv-toast { white-space: normal; width: calc(100% - 28px); }
}

/* ---------- v59: погода арены + рил + CRT + вахта + код пилота ---------- */
.wx-canvas { position: absolute; inset: 0; z-index: 20; pointer-events: none; mix-blend-mode: screen; }
.wx-chip { display: inline-flex; align-items: center; margin-left: 10px; padding: 2px 9px; border: 1px solid rgba(159,208,255,.35); border-radius: 999px; font-size: 11px; letter-spacing: .08em; color: #9fd0ff; background: rgba(10,16,28,.55); white-space: nowrap; }
.screen-combat::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 3px); mix-blend-mode: overlay; }
.screen-combat.crt-hurt { animation: crtHurt 0.16s steps(2) infinite; }
@keyframes crtHurt {
  0% { transform: translate(0.5px, -0.5px); filter: saturate(1.12); }
  50% { transform: translate(-0.6px, 0.4px) skewX(0.12deg); }
  100% { transform: translate(0.3px, 0.6px); filter: hue-rotate(3deg); }
}
.screen-combat.crt-hurt::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 6; background: linear-gradient(rgba(255, 0, 60, 0.03), transparent 30%, rgba(0, 255, 240, 0.03)); }
.crt-swap { position: fixed; inset: 0; z-index: 9999; pointer-events: none; background: repeating-linear-gradient(180deg, rgba(10, 14, 24, 0.5) 0 3px, rgba(90, 110, 140, 0.14) 3px 5px); animation: crtSwap 0.26s linear forwards; }
@keyframes crtSwap { 0% { opacity: 1; transform: scaleY(1.02); } 55% { opacity: 0.7; } 100% { opacity: 0; transform: scaleY(0.98); } }
.drone-watch { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: radial-gradient(circle at 50% 40%, rgba(12, 20, 34, 0.9), rgba(4, 7, 14, 0.97)); animation: shopCineVeil 0.4s ease; text-align: center; padding: 20px; transition: opacity 0.26s ease; }
.drone-watch.out { opacity: 0; }
.drone-orb { width: 74px; height: 74px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #7fd8ff, #1d4a66 60%, #0b1220); box-shadow: 0 0 34px -6px rgba(127, 216, 255, 0.8), inset 0 0 12px rgba(255, 255, 255, 0.25); animation: droneOrb 2.4s ease-in-out infinite; }
@keyframes droneOrb {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 34px -6px rgba(127, 216, 255, 0.8); }
  50% { transform: translateY(-10px); box-shadow: 0 0 50px -4px rgba(127, 216, 255, 1); }
}
.drone-watch h3 { font-size: 16px; letter-spacing: 0.26em; color: #7fd8ff; }
.drone-watch p { font-size: 12px; color: #9fb0c4; }
.drone-watch b { color: #f0b429; }
.drone-btn { margin-top: 12px; padding: 10px 26px; border-radius: 12px; background: rgba(127, 216, 255, 0.12); border: 1px solid rgba(127, 216, 255, 0.5); color: #dfe7f2; font-size: 12px; letter-spacing: 0.2em; cursor: pointer; transition: background 0.25s ease; }
.drone-btn:hover { background: rgba(127, 216, 255, 0.24); }
.pc-modal { position: fixed; inset: 0; z-index: 85; display: flex; align-items: center; justify-content: center; background: rgba(4, 7, 14, 0.86); padding: 16px; }
.pc-box { background: rgba(12, 18, 30, 0.96); border: 1px solid rgba(127, 216, 255, 0.4); border-radius: 16px; padding: 22px; max-width: 420px; width: 100%; text-align: center; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 0 60px -18px rgba(127, 216, 255, 0.8); }
.pc-box h3 { font-size: 15px; letter-spacing: 0.26em; color: #7fd8ff; }
.pc-qr { width: 220px; height: 220px; margin: 0 auto; border-radius: 8px; image-rendering: pixelated; }
.pc-code { font-size: 11px; color: #dfe7f2; word-break: break-all; background: rgba(127, 216, 255, 0.06); border-radius: 8px; padding: 8px; }
.pc-hint { font-size: 10px; color: #66788c; }
.pc-row { display: flex; gap: 8px; }
.pc-row button { flex: 0 0 auto; padding: 8px 14px; border-radius: 10px; background: rgba(127, 216, 255, 0.12); border: 1px solid rgba(127, 216, 255, 0.4); color: #dfe7f2; font-size: 10px; letter-spacing: 0.16em; cursor: pointer; }
.pc-row input { flex: 1 1 auto; min-width: 0; background: rgba(6, 10, 18, 0.7); border: 1px solid rgba(127, 216, 255, 0.25); border-radius: 10px; color: #dfe7f2; padding: 8px 10px; font-size: 11px; }
.pc-msg { font-size: 11px; color: #f0b429; min-height: 14px; }
.btn-pilot { margin-top: 8px; }
@media (max-width: 560px) {
  .pc-qr { width: 180px; height: 180px; }
  .drone-watch { padding: 14px; }
}

/* ============================================================
   v63 — «СТОЙКОСТЬ-7»: космическое выживание. Интро-мультик
   (подлёт, кодовый замок), карта станции, крафт Rust-стиль,
   финалы. Всё адаптивно: колонки складываются на узких экранах.
   ============================================================ */
.surv-intro { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px; min-height: 100vh; position: relative; }
.surv-intro-cv { width: min(1280px, 96vw); height: auto; border: 1px solid rgba(127, 216, 255, 0.25); border-radius: 12px; background: #04070f; cursor: pointer; }
.surv-intro-cap { font-size: clamp(13px, 1.6vw, 17px); letter-spacing: 0.08em; color: #cdd6e4; max-width: min(900px, 92vw); min-height: 2.2em; text-align: center; }
.surv-intro-skip { position: absolute; top: 14px; right: 16px; }
.surv-intro-enter { margin-top: 4px; }

.screen-survival { display: flex; flex-direction: column; gap: 12px; padding: 16px clamp(10px, 2vw, 26px); min-height: 100vh; }
.surv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.surv-title { font-size: clamp(16px, 2.4vw, 24px); letter-spacing: 0.14em; color: #7fd8ff; text-shadow: 0 0 18px rgba(127, 216, 255, 0.35); }
.surv-status { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #9aa4b4; }
.surv-clock { font-size: 20px; font-weight: bold; color: #7ee2b8; letter-spacing: 0.1em; }
.surv-clock.urgent { color: #e5484d; animation: survPulse 1s infinite; }
@keyframes survPulse { 50% { opacity: 0.45; } }
.surv-cols { display: flex; gap: 14px; align-items: flex-start; }
.surv-mapcol { flex: 1 1 auto; min-width: 0; }
.surv-map { width: 100%; height: auto; border: 1px solid rgba(127, 216, 255, 0.22); border-radius: 12px; background: #060b18; cursor: pointer; }
.surv-map-hint { margin-top: 6px; }
.surv-side { flex: 0 0 280px; display: flex; flex-direction: column; gap: 10px; }
.surv-inv { background: rgba(10, 16, 34, 0.6); border: 1px solid rgba(120, 150, 220, 0.25); border-radius: 10px; padding: 10px; }
.surv-inv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; }
.surv-slot { display: flex; flex-direction: column; align-items: center; gap: 2px; background: rgba(6, 11, 24, 0.8); border: 1px solid rgba(120, 150, 220, 0.3); border-radius: 8px; padding: 5px 2px; }
.surv-slot canvas { width: 20px; height: 20px; }
.surv-slot span { font-size: 11px; color: #cdd6e4; }
.surv-slot.empty { opacity: 0.35; }
.surv-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.surv-actions button { flex: 1 1 40%; background: rgba(127, 216, 255, 0.08); border: 1px solid rgba(127, 216, 255, 0.35); color: #7fd8ff; padding: 9px 8px; border-radius: 8px; cursor: pointer; font-size: 12px; letter-spacing: 0.08em; }
.surv-actions button:hover { background: rgba(127, 216, 255, 0.16); }
.surv-goals, .surv-log { background: rgba(10, 16, 34, 0.6); border: 1px solid rgba(120, 150, 220, 0.25); border-radius: 10px; padding: 10px; }
.surv-goal { display: flex; flex-direction: column; gap: 2px; padding: 6px 4px; border-bottom: 1px dashed rgba(120, 150, 220, 0.15); font-size: 12px; }
.surv-goal:last-child { border-bottom: 0; }
.surv-goal-name { color: #cdd6e4; letter-spacing: 0.08em; font-size: 11px; }
.surv-goal.ok .surv-goal-name { color: #7ee2b8; }
.surv-log-rows { max-height: 150px; overflow-y: auto; font-size: 11px; line-height: 1.5; color: #9aa4b4; }
.surv-quit { width: 100%; }
/* событие-модалка */
.surv-event { position: fixed; inset: 0; background: rgba(4, 7, 15, 0.72); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 16px; }
.surv-event-box { background: #0a1022; border: 1px solid rgba(127, 216, 255, 0.4); border-radius: 14px; box-shadow: 0 0 40px rgba(127, 216, 255, 0.15); max-width: 560px; width: 100%; padding: 18px 20px; }
.surv-event-title { font-size: 17px; letter-spacing: 0.12em; color: #7fd8ff; margin-bottom: 8px; }
.surv-event-text { font-size: 13.5px; line-height: 1.6; color: #cdd6e4; margin-bottom: 14px; }
.surv-event-choices { display: flex; flex-direction: column; gap: 8px; }
.surv-choice { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: rgba(127, 216, 255, 0.07); border: 1px solid rgba(127, 216, 255, 0.3); border-radius: 9px; padding: 10px 12px; color: #e4e9f0; cursor: pointer; font-size: 13px; }
.surv-choice:hover { background: rgba(127, 216, 255, 0.15); border-color: rgba(127, 216, 255, 0.6); }
/* крафт Rust-стиль */
.surv-craft { position: fixed; inset: 0; background: rgba(4, 7, 15, 0.78); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 14px; }
.surv-craft-box { background: #0a1022; border: 1px solid rgba(240, 180, 41, 0.4); border-radius: 14px; max-width: 980px; width: 100%; max-height: 92vh; overflow-y: auto; padding: 16px 18px; }
.surv-craft-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: #f0b429; letter-spacing: 0.1em; }
.surv-craft-cols { display: flex; gap: 16px; }
.surv-craft-inv { flex: 0 0 250px; }
.surv-craft-recipes { flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.surv-recipe { border: 1px solid rgba(120, 150, 220, 0.25); border-radius: 10px; padding: 10px 12px; background: rgba(10, 16, 34, 0.5); }
.surv-recipe-name { color: #e4e9f0; font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.surv-recipe-time { font-size: 10px; color: #f0b429; }
.surv-recipe-desc { font-size: 12px; color: #9aa4b4; line-height: 1.5; margin: 4px 0 8px; }
.surv-recipe-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.surv-cost { display: flex; gap: 8px; font-size: 11px; color: #7ee2b8; }
.surv-cost .lack { color: #e5484d; }
.btn-craft-go { background: rgba(126, 226, 184, 0.14); border: 1px solid rgba(126, 226, 184, 0.5); color: #7ee2b8; padding: 7px 14px; border-radius: 8px; cursor: pointer; font-size: 12px; letter-spacing: 0.08em; }
.btn-craft-go:disabled { opacity: 0.4; cursor: not-allowed; }
.surv-queue { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.surv-queue-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #cdd6e4; }
.surv-qbar { flex: 1; height: 8px; background: rgba(6, 11, 24, 0.9); border: 1px solid rgba(120, 150, 220, 0.3); border-radius: 5px; overflow: hidden; }
.surv-qbar-fill { height: 100%; background: linear-gradient(90deg, #f0b429, #ff9561); transition: width 0.4s; }
/* финалы */
.surv-ending { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px; min-height: 100vh; }
.surv-end-head { text-align: center; }
.surv-end-title { font-size: clamp(22px, 4vw, 38px); letter-spacing: 0.14em; margin-top: 6px; }
.surv-end-cv { width: min(1280px, 96vw); height: auto; border: 1px solid rgba(120, 150, 220, 0.3); border-radius: 12px; }
.surv-end-body { max-width: 760px; display: flex; flex-direction: column; gap: 10px; }
.surv-p { font-size: 14px; line-height: 1.7; color: #cdd6e4; }
.surv-end-foot { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
/* кнопка на тайтле */
.btn-survival { width: min(420px, 88vw); background: rgba(126, 226, 184, 0.08); border: 1px solid rgba(126, 226, 184, 0.5); color: #7ee2b8; padding: 12px; border-radius: 10px; cursor: pointer; letter-spacing: 0.14em; font-size: 14px; margin-top: 8px; }
.btn-survival:hover { background: rgba(126, 226, 184, 0.18); box-shadow: 0 0 26px rgba(126, 226, 184, 0.25); }
@media (max-width: 900px) {
  .surv-cols { flex-direction: column; }
  .surv-side { flex: 1 1 auto; width: 100%; }
  .surv-craft-cols { flex-direction: column; }
  .surv-craft-inv { flex: 1 1 auto; }
}
@media (max-width: 560px) {
  .surv-inv-grid { grid-template-columns: repeat(4, 1fr); }
  .surv-actions button { flex: 1 1 100%; }
}

/* ---------- v65: сюжетные диалоги, карма, мультики финалов ---------- */
.surv-talk-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.surv-talk-face { width: 48px; height: 48px; border-radius: 10px; border: 1px solid rgba(127,216,240,0.4); }
.surv-talk-zodiac { font-size: 11px; color: #c9a0ff; margin-top: 3px; }
.surv-event-box.is-talk { border-color: rgba(201,160,255,0.45); box-shadow: 0 0 40px rgba(201,160,255,0.14); }
.kr-badge { font-style: normal; font-size: 10px; border-radius: 6px; padding: 1px 6px; align-self: flex-start; margin-top: 3px; }
.kr-badge.kr-good { background: rgba(126,226,184,0.16); color: #7ee2b8; }
.kr-badge.kr-bad { background: rgba(229,72,77,0.16); color: #ff8a8f; }
.surv-karma { font-size: 12px; padding: 2px 8px; border-radius: 8px; background: rgba(255,255,255,0.06); }
.surv-karma.kr-good { color: #7ee2b8; }
.surv-karma.kr-bad { color: #ff8a8f; }
.surv-karma.kr-zero { color: rgba(228,233,240,0.7); }
.surv-zsign { color: #c9a0ff; font-size: 12px; }
/* мультик финала + wow */
.surv-movie { position: relative; max-width: 1280px; width: 100%; margin: 0 auto; border-radius: 16px; overflow: hidden; border: 1px solid rgba(127,216,240,0.3); box-shadow: 0 0 60px rgba(127,216,240,0.12); }
.surv-movie video, .surv-movie canvas { display: block; width: 100%; height: auto; max-height: 62vh; object-fit: contain; background: #04070f; }
.surv-movie .cine-skip { position: absolute; top: 10px; right: 12px; }
.wow-in { animation: survWowIn 0.9s cubic-bezier(.2,.8,.25,1) both; }
@keyframes survWowIn {
  0% { filter: brightness(4) contrast(1.6); transform: scale(1.06); }
  18% { transform: scale(1) translate(4px, -3px); }
  34% { transform: translate(-5px, 2px); filter: brightness(1.4); }
  55% { transform: translate(2px, -1px); }
  100% { transform: none; filter: none; }
}
.finale-hint { font-weight: 600; }

/* ---------- v66: раскраска выживания, легенда, панели по смыслу ---------- */
.surv-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 8px; }
.surv-leg-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: rgba(228,233,240,0.66); }
.surv-leg-chip i { width: 9px; height: 9px; border-radius: 3px; flex: none; box-shadow: 0 0 6px currentColor; }
.surv-event-box.is-fight { border-color: rgba(229,72,77,0.5); box-shadow: 0 0 40px rgba(229,72,77,0.14); }
.surv-event-box.is-fight .surv-event-title { color: #ff8a8f; }
.surv-event-box.is-bonus { border-color: rgba(127,216,255,0.55); box-shadow: 0 0 44px rgba(127,216,255,0.18); }
.surv-event-box.is-bonus .surv-event-title { color: #7fd8ff; }
.surv-event-box.is-loot { border-color: rgba(240,180,41,0.5); box-shadow: 0 0 40px rgba(240,180,41,0.14); }
.surv-event-box.is-loot .surv-event-title { color: #f0b429; }
.surv-event-box.is-event .surv-event-title { color: #a9b6cd; }
.surv-event-box.surv-pop { animation: survPop 0.3s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes survPop {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* ---------- v67: живая комната — программная сцена отсека ---------- */
/* v68fix-6: окно комнаты перенесено НАД картой (первый блок после шапки) —
   мини-игры отсека и планеты всегда в кадре, бонусы собирать удобно */
.surv-roomview-wrap { position: relative; margin: 0 0 14px; }
.surv-room-view {
  display: block; width: 100%; height: auto;
  border: 1px solid rgba(127,216,255,0.22); border-radius: 12px;
  box-shadow: 0 0 34px rgba(127,216,255,0.09), inset 0 0 60px rgba(0,0,10,0.35);
  cursor: crosshair;
}
.surv-roomview-cap {
  position: absolute; top: 10px; left: 14px; max-width: calc(100% - 28px);
  font-size: 11px; letter-spacing: 0.14em; color: rgba(228,233,240,0.72);
  text-shadow: 0 1px 8px rgba(0,0,0,0.8); pointer-events: none;
}
/* активная мини-игра: заголовок · таймер · подсказка подсвечены */
.surv-roomview-cap.game-on {
  color: #f0b429;
  text-shadow: 0 0 14px rgba(240,180,41,0.45), 0 1px 8px rgba(0,0,0,0.8);
}
@media (max-width: 720px) {
  .surv-room-view { min-height: 96px; }
  .surv-roomview-cap { font-size: 9px; }
}

/* ---------- v68: мультики боссов + катсцена отлёта + статистика ---------- */
.surv-bosswin {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px;
}
.surv-bosswin-box {
  width: min(760px, 96vw); display: flex; flex-direction: column; gap: 10px;
}
.surv-bosswin-cv {
  width: 100%; height: auto; display: block;
  border: 1px solid rgba(229,72,77,0.35); border-radius: 14px;
  box-shadow: 0 0 60px rgba(229,72,77,0.18);
}
.surv-bosswin-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
}
.surv-flightstats {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  padding: 10px 14px; margin: 12px 0;
  border: 1px solid rgba(127,216,255,0.25); border-radius: 10px;
  background: rgba(10,18,34,0.55); font-size: 12px; color: rgba(228,233,240,0.85);
}
.surv-flightstats b { color: #7fd8ff; font-weight: 600; }

/* v68fix-5: киношный слой — letterbox выезжает, титры проявляются из лёгкого блика */
.cine-bar { transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1); }
.cine-bar.top { transform: translateY(-100%); }
.cine-bar.bottom { transform: translateY(100%); }
.cine-wrap.on .cine-bar.top, .cine-wrap.on .cine-bar.bottom { transform: translateY(0); }
.cine-card-chapter { animation: cineCardIn 1.1s cubic-bezier(0.22, 1, 0.36, 1) both; }
.cine-card-title { animation: cineCardIn 1.5s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes cineCardIn {
  from { opacity: 0; letter-spacing: 1.2em; filter: blur(16px); }
}
