/* Режимы: хаб, сюжет, башня, мировой босс. Цвета — только из theme/theme.css. */
.modes-head { margin-bottom: 16px; }
.modes-title { font-size: 25px; margin: 4px 0 6px; }
.modes-muted { font-size: 12px; color: var(--text-2); line-height: 1.6; }
.modes-subtitle { font-size: 16px; font-weight: 900; margin: 22px 0 10px; text-shadow: 0 2px 0 var(--ink-line); }
.modes-back { cursor: pointer; margin-bottom: 10px; color: var(--text); }

/* Карточки режимов */
.mode-card { position: relative; width: 100%; display: flex; gap: 14px; align-items: center; text-align: left; margin-bottom: 12px;
  padding: 16px; border-radius: var(--r-lg); border: 2px solid var(--ink-line); color: var(--text); cursor: pointer; overflow: hidden;
  background: var(--panel); box-shadow: var(--shadow-cel), inset 0 2px 0 rgba(255,255,255,.08); transition: transform .12s, filter .15s; }
.mode-card:hover { filter: brightness(1.08); }
.mode-card:active { transform: translateY(2px); box-shadow: inset 0 2px 0 rgba(255,255,255,.08); }
.mode-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background: radial-gradient(120% 90% at 100% 0%, var(--mode-glow, rgba(var(--sun-rgb),.25)), transparent 60%); }
.mode-card--story { --mode-glow: rgba(var(--sun-rgb),.35); }
.mode-card--tower { --mode-glow: rgba(var(--violet-rgb),.4); }
.mode-card--boss  { --mode-glow: rgba(var(--coral-rgb),.4); }
.mode-card--pvp   { --mode-glow: rgba(var(--sky-rgb),.35); }
.mode-card--banner { margin: 0 0 14px; }
.mode-card-icon { flex: 0 0 56px; height: 56px; display: grid; place-items: center; font-size: 30px; border-radius: var(--r-md);
  background: var(--ink-900); border: 2px solid var(--ink-line); box-shadow: var(--shadow-cel-sm); position: relative; z-index: 1; }
.mode-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; position: relative; z-index: 1; }
.mode-card-body small { font-size: 10px; font-weight: 900; letter-spacing: .14em; color: var(--sun); }
.mode-card-body strong { font-size: 17px; font-weight: 900; text-shadow: 0 2px 0 var(--ink-line); }
.mode-card-body > span { font-size: 12px; color: var(--text-2); }
.mode-progress { display: block; height: 9px; border-radius: var(--r-pill); background: var(--track); border: 1.5px solid var(--ink-line); overflow: hidden; margin-top: 4px; }
.mode-progress i { display: block; height: 100%; background: var(--sun); box-shadow: inset 0 2px 0 rgba(255,255,255,.35); }
.mode-hp { margin-top: 4px; }

/* Сюжет */
.story-progress { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.story-progress .mode-progress { flex: 1; margin: 0; }
.story-progress b { font-size: 12px; color: var(--sun); }
.story-current h2 { font-size: 22px; font-weight: 900; margin: 4px 0 12px; text-shadow: 0 2px 0 var(--ink-line); }
.story-enemies { display: grid; gap: 8px; }
.story-enemy { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); background: var(--ink-900); border: 2px solid var(--ink-line); }
.story-enemy span { display: flex; flex-direction: column; }
.story-enemy strong { font-size: 14px; }
.story-enemy small { font-size: 11px; color: var(--text-2); }
.story-enemy.is-next { box-shadow: inset 0 0 0 2px var(--sun); }
.story-enemy.is-done { opacity: .55; }
.story-reward { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 0; }
.story-reward small { font-size: 11px; color: var(--mute); width: 100%; }
.story-lock { font-size: 12px; color: var(--bad-soft); background: rgba(var(--coral-rgb),.12); border: 2px solid var(--ink-line); border-radius: var(--r-md); padding: 9px 11px; margin-bottom: 10px; }
.story-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.story-list { list-style: none; display: grid; gap: 8px; }
.story-chapter { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--panel); border: 2px solid var(--panel-border); box-shadow: var(--shadow-cel-sm); }
.story-chapter-num { flex: 0 0 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-weight: 900; background: var(--ink-700); border: 2px solid var(--ink-line); }
.story-chapter.is-done .story-chapter-num { background: var(--leaf); color: var(--ink-950); }
.story-chapter.is-current { box-shadow: var(--shadow-cel-sm), inset 0 0 0 2px var(--sun); }
.story-chapter.is-current .story-chapter-num { background: var(--sun); color: var(--ink-950); }
.story-chapter.is-locked { opacity: .55; }
.story-chapter-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.story-chapter-body strong { font-size: 14px; }
.story-chapter-body small { font-size: 11px; color: var(--mute); }
.story-chapter .pill { cursor: pointer; color: var(--text); }
.story-finale { text-align: center; }
.story-finale-mark { font-size: 46px; }
.story-finale h2 { font-size: 22px; font-weight: 900; margin: 4px 0; }
.story-finale p { font-size: 13px; color: var(--text-2); margin-bottom: 12px; }

/* Диалоговая сцена */
.story-dialog { position: fixed; inset: 0; z-index: 95; display: flex; align-items: flex-end; justify-content: center; padding: 16px 12px max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(8,11,31,.25), rgba(8,11,31,.85)), var(--catch-scene) center/cover; animation: duel-overlay-in .3s ease both; }
.story-dialog-scene { width: 100%; max-width: 520px; }
.story-dialog-title { text-align: center; font-size: 12px; font-weight: 900; letter-spacing: .12em; color: var(--sun); text-shadow: 0 2px 0 var(--ink-line); margin-bottom: 10px; text-transform: uppercase; }
.story-dialog-box { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--r-xl); background: var(--panel-solid);
  border: 2px solid var(--ink-line); box-shadow: var(--shadow-float), inset 0 0 0 2px rgba(255,255,255,.06); cursor: pointer; min-height: 120px; animation: duel-panel-in .35s ease both; }
.story-dialog-box.is-narrator { background: rgba(14,19,51,.94); font-style: italic; }
.story-dialog-box.is-hero { flex-direction: row-reverse; text-align: right; }
.story-portrait { flex: 0 0 64px; height: 64px; display: grid; place-items: center; font-size: 38px; border-radius: 50%; background: var(--ink-700); border: 3px solid var(--ink-line); box-shadow: 0 0 0 3px rgba(var(--sun-rgb),.55); }
.story-dialog-text strong { display: block; font-size: 14px; font-weight: 900; color: var(--sun); margin-bottom: 4px; }
.story-dialog-text p { font-size: 15px; line-height: 1.55; color: var(--text); }
.story-dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.story-dialog-count { font-size: 11px; font-weight: 800; color: var(--text-2); }

/* Башня */
.tower-card { position: relative; }
.tower-card.is-boss { border-color: rgba(var(--sun-rgb),.7); }
.tower-floor { position: absolute; top: 14px; right: 14px; text-align: center; background: var(--sun); color: var(--ink-950); border: 2px solid var(--ink-line);
  border-radius: var(--r-md); padding: 4px 12px; box-shadow: var(--shadow-cel-sm); }
.tower-floor small { display: block; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.tower-floor b { font-size: 26px; font-weight: 900; line-height: 1; }
.tower-enemy { display: flex; align-items: center; gap: 12px; padding-right: 70px; }
.tower-enemy > div { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.tower-enemy strong { font-size: 19px; font-weight: 900; }
.tower-enemy small { font-size: 12px; color: var(--text-2); }
.tower-boss-tag { background: var(--sun); color: var(--ink-950); border-color: var(--ink-line); }
.tower-stats { text-align: center; margin-top: 8px; }
.mode-board { list-style: none; display: grid; gap: 6px; }
.mode-board li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-md); background: var(--panel); border: 2px solid var(--panel-border); }
.mode-board li > span { flex: 0 0 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--ink-700); border: 2px solid var(--ink-line); font-size: 12px; font-weight: 900; }
.mode-board li:nth-child(1) > span { background: var(--sun); color: var(--ink-950); }
.mode-board li strong { flex: 1; font-size: 14px; }
.mode-board li b { font-size: 13px; color: var(--sun); }

/* Мировой босс */
.boss-stage { position: relative; overflow: hidden; border-radius: var(--r-xl); border: 2px solid var(--ink-line); box-shadow: var(--shadow-float);
  background: linear-gradient(180deg, rgba(8,11,31,.05), rgba(8,11,31,.65)), var(--arena-scene) center 60%/cover; min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end; margin-bottom: 14px; }
.boss-stage .duel-round { position: absolute; top: 12px; left: 12px; }
.boss-art { display: grid; place-items: center; padding-top: 34px; animation: duel-idle 3.7s ease-in-out infinite; }
.boss-art.is-hit { animation: duel-hit 1.2s ease infinite; }
.boss-stage.is-defeated .boss-art { filter: grayscale(1); opacity: .5; animation: none; }
.boss-info { margin: 0 12px 12px; padding: 10px 12px; border-radius: var(--r-md); background: rgba(14,19,51,.92); border: 2px solid var(--ink-line); }
.boss-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.boss-name strong { font-size: 18px; font-weight: 900; }
.boss-hp { height: 14px; }
.boss-hp-text { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-2); margin-top: 4px; }
.boss-hit { text-align: center; }
.boss-hit-dmg { display: block; font-size: 40px; font-weight: 900; color: #fff; -webkit-text-stroke: 2px var(--ink-line); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink-line); }
.boss-log { text-align: left; font-size: 12px; color: var(--text-2); padding-left: 18px; line-height: 1.7; margin-top: 6px; }
.boss-attempts { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.boss-attempts i { width: 18px; height: 18px; border-radius: 50%; background: var(--track); border: 2px solid var(--ink-line); }
.boss-attempts i.is-left { background: var(--coral); }
.boss-attempts span { font-size: 13px; margin-left: 4px; }
.boss-actions .btn { margin-top: 8px; }
.boss-trophy { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

@media (prefers-reduced-motion: reduce) { .boss-art, .story-dialog, .story-dialog-box { animation: none !important; } }
