/* Хранитель печати — общие стили Mini App.
   Все экраны используют одну палитру и один набор компонентов
   (шкалы, порталы-портреты, кнопки .act), собранные в прототипах. */

:root {
  --ink: #060910;
  --ink-2: #0b1019;
  --surface: #111926;
  --edge: #24313f;
  --edge-2: #33445a;
  --text: #cfd9e6;
  --muted: #6f8299;
  --ember: #e07b3c;
  --ember-soft: #f0a468;
  --blood: #c0402f;
  --blood-deep: #7d241a;
  --steel: #93aac4;
  --memory: #7fc8d8;
  --stam: #d9a441;
  --good: #6fbf73;

  --r-uncommon: #5f9e5c;
  --r-rare: #4a82c4;
  --r-epic: #9256c9;
  --r-legend: #e08b2c;

  --step: .3s cubic-bezier(.2, .8, .3, 1);
}

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: "Golos Text", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* игра, а не документ: быстрые нажатия не должны выделять текст
     (иначе всплывающий урон подсвечивается синим) */
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
input, textarea { user-select: text; -webkit-user-select: text; }

#embers { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

#vignette {
  position: fixed; inset: 0; z-index: 8; pointer-events: none;
  box-shadow: inset 0 0 90px 10px #c0402f00;
  transition: box-shadow .45s ease;
}
#vignette.hurt { box-shadow: inset 0 0 90px 16px #c0402faa; transition: box-shadow .08s ease; }
#vignette.low { animation: heartbeat 1.7s ease-in-out infinite; }
@keyframes heartbeat {
  0%, 100% { box-shadow: inset 0 0 70px 6px #c0402f33; }
  50% { box-shadow: inset 0 0 100px 16px #c0402f66; }
}

.app {
  position: relative; z-index: 1;
  max-width: 430px; margin-inline: auto;
  padding-inline: 16px;
  min-height: 100%;
  display: flex; flex-direction: column;
}

.screen { display: none; flex-direction: column; flex: 1; animation: screenIn .4s cubic-bezier(.2, .8, .3, 1); }
.screen.on { display: flex; }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ==================== верхняя панель с "назад" ==================== */

.topbar {
  display: flex; align-items: center; gap: 10px;
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  padding-block: 12px 10px;
}
.topbar b { color: var(--text); font-weight: 600; }
.topbar .sp { flex: 1; }

.quit {
  appearance: none; font: inherit; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); background: none; border: 1px solid var(--edge); padding: 3px 8px; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.quit:hover { color: var(--text); border-color: var(--edge-2); }

/* ==================== главное меню ==================== */

.title { position: relative; text-align: center; padding-block: 32px 24px; }
.seal {
  position: absolute; left: 50%; top: 46%; width: 240px; height: 240px; margin: -120px 0 0 -120px;
  color: var(--ember); opacity: .16; animation: spin 90s linear infinite; pointer-events: none;
}
.seal .inner { animation: spinBack 60s linear infinite; transform-origin: 60px 60px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinBack { to { transform: rotate(-360deg); } }

.title h1 {
  position: relative; font-family: Forum, Georgia, serif; font-weight: 400; font-size: 33px; line-height: 1.12;
  letter-spacing: .1em; margin: 0; text-transform: uppercase; text-shadow: 0 0 34px #e07b3c4d, 0 2px 8px #000;
}
.title p { position: relative; margin: 7px 0 0; font-size: 10.5px; letter-spacing: .34em; text-transform: uppercase; color: var(--muted); }

.who {
  display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 13px; align-items: center; padding: 13px;
  background: linear-gradient(135deg, #16202e, var(--ink-2) 70%); border: 1px solid var(--edge);
  position: relative; overflow: hidden;
}
.who::after {
  content: ""; position: absolute; right: -30px; top: -40px; width: 130px; height: 130px;
  background: radial-gradient(circle, #e07b3c1f, transparent 70%); pointer-events: none;
}
.who__name { font-family: Forum, Georgia, serif; font-size: 18px; line-height: 1.2; }
.who__sub { font-size: 11px; color: var(--muted); margin-bottom: 7px; }
.who__stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.who__stats span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.who__stats svg, .who__stats img.ic { width: 13px; height: 13px; object-fit: contain; }
.who__stats b { color: var(--text); font-weight: 600; }
.who__stats .gold b { color: var(--stam); }

.menu { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }

.item {
  appearance: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 13px; align-items: center;
  padding: 12px 13px; background: var(--surface); border: 1px solid var(--edge);
  position: relative; overflow: hidden; transition: background .16s, border-color .16s, transform .08s;
}
.item:hover { background: #1a2634; border-color: var(--edge-2); }
.item:active { transform: scale(.985); }
.item:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }

.item__icon { width: 46px; height: 46px; display: grid; place-items: center; color: var(--tone, var(--steel)); }
.item__icon svg, .item__icon img { width: 34px; height: 34px; object-fit: contain; }
.item__text { display: block; min-width: 0; }
.item__name { display: block; font-family: Forum, Georgia, serif; font-size: 17px; line-height: 1.25; }
.item__sub { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.item__go { color: #3d4f66; font-size: 19px; line-height: 1; }
.item__tag { font-size: 10px; font-weight: 700; letter-spacing: .06em; background: var(--tone); color: #08101a; padding: 2px 7px; white-space: nowrap; }

.item--main { --tone: var(--ember); background: linear-gradient(120deg, #33200f, #1a1310 65%); border-color: #6b4425; padding-block: 16px; }
.item--main:hover { background: linear-gradient(120deg, #40280f, #221812 65%); border-color: #925c2e; }
.item--main .item__name { font-size: 20px; color: var(--ember-soft); }
.item--main::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, #f0a4681a 50%, transparent 70%);
  background-size: 250% 100%; animation: sheen 4.5s ease-in-out infinite; pointer-events: none;
}
@keyframes sheen { 0%, 60% { background-position: 160% 0; } 100% { background-position: -60% 0; } }
.item:disabled, .item[data-locked="1"] { opacity: .5; cursor: default; }
.item:disabled:hover, .item[data-locked="1"]:hover { background: var(--surface); border-color: var(--edge); }

.raid { margin-top: 12px; padding: 12px 13px; border: 1px solid #5a2e28; background: linear-gradient(135deg, #1e100e, #110c0d 70%); }
.raid__head { display: flex; align-items: center; gap: 10px; }
.raid__port { width: 34px; height: 34px; flex: none; border-radius: 3px; overflow: hidden; border: 1px solid #5a2e28; }
.raid__port img { width: 100%; height: 100%; object-fit: cover; display: block; }
.raid__name { font-family: Forum, Georgia, serif; font-size: 16px; color: #e0715c; }
.raid__time { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: auto; }
.raid__sub { font-size: 11.5px; color: var(--muted); margin-top: 7px; display: flex; justify-content: space-between; gap: 10px; }
.raid__sub b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.raid__track { position: relative; height: 10px; background: #04070c; border: 1px solid #3a221f; overflow: hidden; margin-top: 9px; }
.raid__fill { position: absolute; inset: 0; background: linear-gradient(180deg, #c0402f, #6e1f16); transform-origin: left; transform: scaleX(.62); }

.quest-banner {
  margin-top: 12px; padding: 11px 13px; border: 1px solid #6b4425;
  background: linear-gradient(135deg, #241708, #14100c 70%);
  animation: appear .35s cubic-bezier(.2, .9, .3, 1.1);
}
.quest-banner__head {
  display: flex; justify-content: space-between; font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--stam);
}
.quest-banner__title { font-family: Forum, Georgia, serif; font-size: 16px; margin-top: 3px; color: var(--ember-soft); }
.quest-banner__desc { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }

.foot { font-size: 11px; line-height: 1.55; color: #4c5d73; text-align: center; padding-block: 14px 18px; }

/* ==================== общие: портреты-порталы ==================== */

.port { position: relative; display: flex; flex-direction: column; align-items: center; }
.port__frame { position: relative; width: 100%; aspect-ratio: 1; }
.port__img {
  position: absolute; inset: 0; overflow: hidden; background: #0a0e14;
  clip-path: polygon(50% 2.5%, 93.3% 26.25%, 93.3% 73.75%, 50% 97.5%, 6.7% 73.75%, 6.7% 26.25%);
  transition: filter var(--step);
}
.port__img img, .port__img svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.port__ring { position: absolute; inset: -5px; width: calc(100% + 10px); height: calc(100% + 10px); pointer-events: none; }
.port__ring polygon { fill: none; stroke-linejoin: round; }
.port__ring .track { stroke: #1a2533; stroke-width: 2.5; }
.port__ring .fill { stroke: var(--c); stroke-width: 2.5; transition: stroke-dashoffset var(--step); filter: drop-shadow(0 0 4px var(--c)); }
.port__cap {
  margin-top: 8px; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap; font-variant-numeric: tabular-nums; text-align: center;
}
.port__cap b { color: var(--c); font-weight: 700; }

.who__port { width: 62px; flex: none; }
.who__port .port__img { box-shadow: 0 0 0 1px var(--edge-2); }

/* ==================== экран боя ==================== */

.runbar .mult { color: var(--stam); font-variant-numeric: tabular-nums; }
.runbar .ic { width: 13px; height: 13px; object-fit: contain; vertical-align: -2px; margin-right: 2px; }
.depth { display: flex; gap: 4px; }
.depth i { width: 15px; height: 3px; background: var(--edge); display: block; }
.depth i.done { background: var(--ember); }
.depth i.boss { background: var(--blood); width: 21px; }
.depth i.boss.done { background: var(--r-legend); }

.foe {
  position: relative; border: 1px solid var(--edge);
  background: radial-gradient(90% 120% at 18% 0%, #1c2634 0%, #101825 55%, var(--ink-2) 100%);
  transition: border-color var(--step), box-shadow var(--step);
}
.foe.tone { border-color: color-mix(in srgb, var(--tone) 55%, var(--edge)); }
.foe.broken { border-color: var(--r-legend); box-shadow: 0 0 28px #e08b2c33; }

.tele {
  position: relative; z-index: 2; display: flex; flex-direction: column; gap: 2px; padding: 8px 13px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 24%, transparent), transparent 85%);
  border-bottom: 1px solid color-mix(in srgb, var(--tone) 32%, var(--edge));
}
.tele.swap { animation: swap .34s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes swap { 0% { opacity: 0; transform: translateY(-6px); } 100% { opacity: 1; transform: none; } }
.tele__head { display: flex; align-items: center; gap: 8px; }
.tele__head svg { width: 17px; height: 17px; color: var(--tone); flex: none; }
.tele__ic { width: 30px; height: 30px; object-fit: contain; flex: none; }
.tele__what { font-size: 12.5px; font-weight: 700; color: var(--tone); letter-spacing: .02em; }
.tele__tip { font-size: 11px; color: var(--muted); line-height: 1.4; padding-left: 25px; }
.foe--broken .tele__what { animation: pulseGlow 1.1s ease-in-out infinite; }
@keyframes pulseGlow { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }

.foe__row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; align-items: center; padding: 15px 14px 17px; position: relative; z-index: 2; }
.foe .port { width: 92px; }
.foe__info { min-width: 0; }
.nameline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
.nameline h2 { font-family: Forum, Georgia, serif; font-size: 17px; margin: 0; line-height: 1.2; flex: 1 1 auto; min-width: 0; }
.lvl { flex: none; font-size: 10px; letter-spacing: .1em; color: var(--muted); border: 1px solid var(--edge); padding: 2px 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.gauge { position: relative; }
.gauge__label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.gauge__tag { font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); flex: none; }
.gauge__val { font-family: Forum, Georgia, serif; font-size: 15px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; flex: none; }
.gauge__val .of { font-family: "Golos Text", sans-serif; font-size: 11px; color: var(--muted); margin-left: 1px; }
.gauge__track { position: relative; height: 14px; background: #04070c; border: 1px solid var(--edge); overflow: hidden; }
.gauge__trail, .gauge__fill { position: absolute; inset: 0 auto 0 0; width: 100%; height: 100%; transform-origin: left center; }
.gauge__trail { background: #f0f5fa; opacity: .5; transition: transform .6s cubic-bezier(.4, 0, .2, 1) .22s; }
.gauge__fill { transition: transform var(--step); }
.gauge__fill::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 2px; background: #fff; opacity: .85; }
.gauge__notch { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 21px, #00000073 21px 23px); pointer-events: none; }
.gauge--foe .gauge__fill { background: linear-gradient(180deg, var(--blood), var(--blood-deep)); }
.gauge--hero .gauge__fill { background: linear-gradient(180deg, var(--ember), #8d4a1e); }
.gauge.pop .gauge__track { animation: gpop .3s ease-out; }
@keyframes gpop { 0% { filter: brightness(2.8); } 100% { filter: none; } }

.hero {
  position: relative; border: 1px solid var(--edge);
  background: radial-gradient(90% 120% at 82% 100%, #1a2432 0%, #101825 55%, var(--ink-2) 100%);
  padding: 15px 14px 14px; transition: border-color .2s, background .2s;
}
.hero.hurt { animation: heroHurt .4s ease-out; }
@keyframes heroHurt { 0% { border-color: var(--blood); background: #251317; transform: translateX(-4px); } 100% { transform: none; } }
.hero__row { display: grid; grid-template-columns: minmax(0, 1fr) 78px; gap: 16px; align-items: center; }
.hero .port { width: 78px; }
.hero__info { min-width: 0; }
.hero__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 9px; flex-wrap: wrap; }
.hero__head h2 { font-family: Forum, Georgia, serif; font-size: 17px; margin: 0; flex: none; }
.hero__head .gear { font-size: 11px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.hero__head .gear b { color: var(--r-rare); font-weight: 600; }

.stam { display: flex; gap: 4px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.stam i { width: 10px; height: 10px; background: #121b26; border: 1px solid #2a3948; transform: rotate(45deg); display: block; transition: background .18s, border-color .18s, box-shadow .18s; }
.stam i.on { background: var(--stam); border-color: #f2c96f; box-shadow: 0 0 7px #d9a44170; }
.stam i.spent { animation: spent .42s ease-out; }
@keyframes spent { 0% { background: #fff; border-color: #fff; box-shadow: 0 0 14px #fff; transform: rotate(45deg) scale(1.6); } 100% { background: #121b26; border-color: #2a3948; box-shadow: none; transform: rotate(45deg); } }
.stam span { margin-left: 7px; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

.fx { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.fx canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.flash { position: absolute; inset: 0; background: var(--c, #fff); mix-blend-mode: screen; animation: flash .26s ease-out forwards; }
@keyframes flash { 0% { opacity: .5; } 100% { opacity: 0; } }
.slash { position: absolute; inset: -10%; overflow: visible; }
.slash path { fill: none; stroke: var(--c, #fff); stroke-linecap: round; filter: drop-shadow(0 0 7px var(--c, #fff)); stroke-dasharray: 420; stroke-dashoffset: 420; animation: draw .34s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes draw { 0% { stroke-dashoffset: 420; opacity: 0; } 22% { opacity: 1; } 60% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.ringfx { position: absolute; left: 60px; top: 62%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 2px solid var(--c, #fff); border-radius: 50%; animation: ringfx .65s cubic-bezier(.1, .8, .3, 1) forwards; }
@keyframes ringfx { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(7); opacity: 0; } }

.port.hit { animation: recoil .36s cubic-bezier(.36, .07, .19, .97); }
.port.wind { animation: wind 1.4s ease-in-out infinite; }
.port.stun .port__img { filter: grayscale(.8) brightness(1.4); }
.port.stun { animation: stunwob 1.1s ease-in-out infinite; }
.port.die { animation: die .8s ease-in forwards; }
@keyframes recoil { 0% { transform: none; } 25% { transform: translateX(9px) rotate(4deg) scale(.94); } 60% { transform: translateX(-3px) rotate(-1deg); } 100% { transform: none; } }
@keyframes wind { 0%, 100% { transform: none; } 50% { transform: translateX(-3px) scale(1.03); } }
@keyframes stunwob { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes die { 0% { transform: none; opacity: 1; } 100% { transform: translateY(-16px) scale(.86); opacity: 0; filter: grayscale(1); } }

.shake { animation: shake .3s cubic-bezier(.36, .07, .19, .97); }
.shake--hard { animation: shakeHard .42s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }
@keyframes shakeHard { 0%, 100% { transform: none; } 15% { transform: translate(-9px, 3px) rotate(-.6deg); } 30% { transform: translate(11px, -4px) rotate(.7deg); } 45% { transform: translate(-8px, 2px) rotate(-.5deg); } 60% { transform: translate(7px, -2px) rotate(.4deg); } 80% { transform: translate(-3px, 1px); } }

.arena { position: relative; min-height: 74px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 9px 2px; }
.log p { margin: 0; font-size: 13px; color: var(--muted); opacity: .4; }
.log p:last-child { color: var(--text); opacity: 1; animation: line .3s ease-out; }
.log b { color: var(--ember-soft); font-weight: 600; }
.log i { color: #e0715c; font-style: normal; font-weight: 600; }
.log u { color: var(--memory); text-decoration: none; font-weight: 600; }
@keyframes line { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

.float {
  position: absolute; font-family: Forum, Georgia, serif; font-variant-numeric: tabular-nums; pointer-events: none; z-index: 6;
  text-shadow: 0 2px 12px #000, 0 0 20px currentColor; animation: rise 1.1s cubic-bezier(.15, .85, .3, 1) forwards; font-size: 34px; white-space: nowrap;
}
.float--out { color: var(--ember); }
.float--in { color: #e86a58; }
.float--crit { color: #ffd27a; font-size: 52px; animation: critrise 1.25s cubic-bezier(.12, .9, .25, 1) forwards; }
.float--heal { color: var(--good); font-size: 26px; }
.float--miss { color: var(--steel); font-size: 22px; }
.float--post { color: var(--steel); font-size: 19px; letter-spacing: .04em; }
@keyframes rise { 0% { transform: translate(-50%, 6px) scale(.6); opacity: 0; } 16% { transform: translate(-50%, -4px) scale(1.18); opacity: 1; } 30% { transform: translate(-50%, 0) scale(1); } 100% { transform: translate(-50%, -46px) scale(.96); opacity: 0; } }
@keyframes critrise { 0% { transform: translate(-50%, 8px) scale(.4) rotate(-8deg); opacity: 0; } 14% { transform: translate(-50%, -8px) scale(1.5) rotate(3deg); opacity: 1; } 28% { transform: translate(-50%, -2px) scale(1.05) rotate(0); } 100% { transform: translate(-50%, -58px) scale(1); opacity: 0; } }

.banner {
  position: absolute; left: 50%; top: 20%; transform: translateX(-50%); font-family: Forum, Georgia, serif; font-size: 32px;
  letter-spacing: .22em; color: var(--r-legend); text-shadow: 0 0 26px #e08b2c88, 0 2px 6px #000; pointer-events: none; z-index: 6;
  animation: flare 1.6s ease-out forwards; white-space: nowrap;
}
@keyframes flare { 0% { opacity: 0; transform: translateX(-50%) scale(1.8); letter-spacing: .6em; } 18% { opacity: 1; transform: translateX(-50%) scale(1); letter-spacing: .22em; } 72% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) scale(1.06); } }

/* ==================== кнопки действий ==================== */

.actions {
  position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  padding-block: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, #06091000, var(--ink) 30%); margin-top: auto; z-index: 2;
}
.act {
  appearance: none; font: inherit; text-align: left; color: var(--text); background: var(--surface); border: 1px solid var(--edge);
  padding: 8px 10px; cursor: pointer; position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px;
  transition: background .15s, border-color .15s, transform .08s, opacity .15s;
}
.act:hover:not(:disabled) { background: #1d2938; border-color: var(--edge-2); }
.act:active:not(:disabled) { transform: scale(.97); }
.act:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.act:disabled { opacity: .26; cursor: default; }
.act__ic { width: 30px; height: 30px; object-fit: contain; flex: none; }
.act__body { min-width: 0; flex: 1; }
.act b { display: block; font-size: 13.5px; font-weight: 600; }
.act span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.act__cost { position: absolute; top: 7px; right: 8px; font-size: 10px; font-weight: 700; color: var(--stam); font-variant-numeric: tabular-nums; }
.act.good { border-color: #3f6b48; }
.act.good::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--good); }
.act--wide { grid-column: 1 / -1; }
.act--breach { background: linear-gradient(180deg, #2d1d12, #1d1410); border-color: #5a3a22; }
.act--breach:hover:not(:disabled) { background: linear-gradient(180deg, #3a2516, #241812); border-color: #7d4f2b; }
.act--breach b { color: var(--ember-soft); }
.act--memory { background: linear-gradient(180deg, #0f2a30, #0b1a1f); border-color: #2b6472; animation: mem 2.2s ease-in-out infinite; }
.act--memory b { color: var(--memory); }
@keyframes mem { 0%, 100% { box-shadow: 0 0 0 1px #7fc8d822, 0 0 10px #7fc8d81f; } 50% { box-shadow: 0 0 0 1px #7fc8d866, 0 0 22px #7fc8d84d; } }
.act--good { border-color: #2f5b39; }
.act--good b { color: var(--good); }

.panel { grid-column: 1 / -1; padding: 13px; border: 1px solid var(--edge); background: var(--surface); animation: dropIn .5s cubic-bezier(.2, .9, .3, 1.2); }
.panel--win { border-color: #3d5a3f; background: linear-gradient(135deg, #12200f, #0e1512 70%); }
.panel--loss { border-color: #5a2e28; background: linear-gradient(135deg, #200f0d, #150f0e 70%); }
@keyframes dropIn { 0% { transform: scale(.94) translateY(12px); opacity: 0; } 100% { transform: none; opacity: 1; } }
.panel h3 { font-family: Forum, Georgia, serif; font-size: 17px; margin: 0 0 8px; font-weight: 400; }
.panel--win h3 { color: var(--good); }
.panel--loss h3 { color: #e0715c; }
.haul { display: flex; flex-direction: column; gap: 5px; }
.haul__row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-variant-numeric: tabular-nums; animation: slide .4s cubic-bezier(.2, .9, .3, 1.1) backwards; }
@keyframes slide { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.haul__row svg, .haul__row img { width: 15px; height: 15px; flex: none; color: var(--rar, var(--muted)); object-fit: contain; }
.haul__row b { font-weight: 600; color: var(--rar, var(--text)); }
.rar-uncommon { --rar: var(--r-uncommon); }
.rar-rare { --rar: var(--r-rare); }
.rar-epic { --rar: var(--r-epic); }
.rar-legend { --rar: var(--r-legend); }
.rar-legend b { text-shadow: 0 0 12px #e08b2c66; }
.warn { margin-top: 10px; font-size: 11.5px; color: var(--muted); line-height: 1.5; border-top: 1px solid var(--edge); padding-top: 9px; }
.warn b { color: var(--stam); }

/* ==================== экран сюжета (визуальная новелла) ==================== */

.story {
  position: relative; flex: 1; display: flex; flex-direction: column; min-height: 70vh;
  border: 1px solid var(--edge); overflow: hidden; margin-top: 8px;
}
.story__bg { position: absolute; inset: 0; z-index: 0; }
.story__bg img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.7) saturate(.9); transition: opacity .5s ease; }
.story__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #05080e33 0%, #05080ee6 78%, #05080e 100%); }

/* Портрет говорящего — крупный «спрайт» над панелью текста, а не
   мелкая иконка внутри неё. .story__who и .story__body сидят внутри
   общей .story__panel, которая целиком прижата к низу — так группа
   не «прыгает», когда портрет то появляется, то скрыт (нарратив). */
.story__panel { margin-top: auto; position: relative; z-index: 1; }

.story__who {
  display: flex; align-items: flex-end; gap: 13px;
  padding: 0 16px;
  animation: speakerIn .3s cubic-bezier(.2, .8, .3, 1);
}
@keyframes speakerIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.story__port {
  width: 116px; flex: none;
  filter: drop-shadow(0 12px 22px #000c);
}
.story__name {
  font-family: Forum, Georgia, serif; font-size: 17px; color: var(--ember-soft);
  padding-bottom: 16px; text-shadow: 0 2px 10px #000, 0 0 20px #000;
}

.story__body { position: relative; padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }

.story__text {
  font-size: 15.5px; line-height: 1.55; min-height: 3.2em;
  text-shadow: 0 2px 8px #000, 0 1px 3px #000;
}
.story__text.dash::before { content: "— "; }

.story__naming { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.story__input {
  appearance: none; font: inherit; font-family: Forum, Georgia, serif; font-size: 17px;
  padding: 11px 13px; background: #0a0e14; border: 1px solid var(--edge-2); color: var(--text);
  text-align: center;
}
.story__input:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 2px #e07b3c33; }
.story__input::placeholder { color: var(--muted); font-family: "Golos Text", sans-serif; font-size: 14px; }

.story__next {
  appearance: none; font: inherit; width: 100%; margin-top: 14px; padding: 11px; text-align: center; cursor: pointer;
  background: linear-gradient(180deg, #2d1d12, #1d1410); border: 1px solid #5a3a22; color: var(--ember-soft);
  font-weight: 600; font-size: 14px; transition: background .15s, border-color .15s, transform .08s;
}
.story__next:hover { background: linear-gradient(180deg, #3a2516, #241812); border-color: #7d4f2b; }
.story__next:active { transform: scale(.98); }

.story__choices { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.story__choice {
  appearance: none; font: inherit; text-align: left; cursor: pointer; padding: 12px 13px;
  background: var(--surface); border: 1px solid var(--edge); color: var(--text);
  transition: background .15s, border-color .15s, transform .08s;
}
.story__choice:hover { background: #1a2634; border-color: var(--edge-2); }
.story__choice b { display: block; font-family: Forum, Georgia, serif; font-size: 15px; font-weight: 400; margin-bottom: 2px; }
.story__choice span { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.4; }

.story__skip { position: absolute; top: 10px; right: 10px; z-index: 2; }

.story__end {
  position: relative; padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}
.story__end h3 { font-family: Forum, Georgia, serif; font-size: 19px; margin: 0 0 6px; color: var(--ember-soft); }
.story__end p { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; line-height: 1.5; }

/* ==================== снаряжение ==================== */

.gear-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-block: 14px 10px; }
.gear-power { text-align: right; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.gear-power b { display: block; font-family: Forum, Georgia, serif; font-size: 26px; letter-spacing: .02em; color: var(--stam); font-variant-numeric: tabular-nums; line-height: 1.1; }
.section { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 9px; margin: 12px 0 7px; }
.section::after { content: ""; flex: 1; height: 1px; background: var(--edge); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.cell {
  appearance: none; font: inherit; text-align: left; cursor: pointer; position: relative; padding: 9px;
  background: var(--ink-2); border: 1px solid var(--edge); color: inherit; overflow: hidden; transition: border-color .18s, transform .08s;
}
.cell:active { transform: translateY(1px); }
.cell:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.cell[data-rar]::before { content: ""; position: absolute; inset: 0; background: var(--rar); opacity: .07; }
.cell[data-rar] { border-color: color-mix(in srgb, var(--rar) 50%, var(--edge)); }
.cell.sel { border-color: var(--rar, var(--ember)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rar, var(--ember)) 45%, transparent); }
.cell__icon { display: block; width: 26px; height: 26px; color: var(--rar, #3e4c5e); position: relative; }
.cell__slot { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; position: relative; }
.cell__name { font-size: 11.5px; font-weight: 600; line-height: 1.25; margin-top: 1px; position: relative; }
.cell__name em { font-style: normal; color: var(--stam); }
.cell__empty { font-size: 11.5px; color: #44536b; margin-top: 1px; position: relative; }
.sockets { display: flex; gap: 3px; margin-top: 6px; position: relative; }
.sockets i { width: 7px; height: 7px; transform: rotate(45deg); background: #10161f; border: 1px solid #2c3a4b; display: block; }
.sockets i.on { background: var(--r-rare); border-color: #7fb0e8; }

.relics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.relic {
  appearance: none; padding: 0; cursor: pointer; position: relative; aspect-ratio: 1; display: grid; place-items: center;
  background: radial-gradient(120% 120% at 50% 15%, #1b2331, #0a0e15); border: 1px solid var(--edge); color: #2e3a4a;
  transition: border-color .2s, transform .08s;
}
.relic:active { transform: translateY(1px); }
.relic:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.relic svg, .relic__img { width: 25px; height: 25px; position: relative; object-fit: contain; }
.relic:not(.own) .relic__img { opacity: .35; filter: grayscale(1); }
.relic.own { color: var(--r-legend); border-color: #6b4a22; background: radial-gradient(120% 120% at 50% 15%, #2a1d0e, #100c08); }
.relic.own::after { content: ""; position: absolute; inset: -1px; background: radial-gradient(60% 60% at 50% 40%, #e08b2c26, transparent 70%); animation: glow 3.6s ease-in-out infinite; }
@keyframes glow { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
.relic.sel { border-color: var(--r-legend); box-shadow: 0 0 0 1px #e08b2c66, 0 0 16px #e08b2c33; }
.relic__on { position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; background: var(--good); transform: rotate(45deg); box-shadow: 0 0 6px #6fbf7399; }
.relic__lock { position: absolute; bottom: 3px; right: 4px; width: 11px; height: 11px; opacity: .8; }

.card { border: 1px solid var(--rar, var(--edge)); background: linear-gradient(150deg, color-mix(in srgb, var(--rar, var(--edge)) 13%, #0d131b), #0b1017 72%); padding: 14px; position: relative; animation: appear .35s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card__top { display: grid; grid-template-columns: 54px 1fr; gap: 13px; align-items: center; }
.card__icon { width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--rar) 60%, var(--edge)); background: #0a0e14; color: var(--rar); }
.card__icon svg, .card__icon img { width: 27px; height: 27px; object-fit: contain; }
.card__rar { font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--rar); }
.card__name { font-family: Forum, Georgia, serif; font-size: 19px; margin: 1px 0 2px; }
.card__slot { font-size: 11px; color: var(--muted); }
.card__rule { margin-top: 11px; padding: 9px 11px; background: #070b11; border-left: 2px solid var(--rar); font-size: 13px; line-height: 1.45; }
.card__rule b { color: var(--rar); font-weight: 600; }
.stats { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.stat { font-size: 11.5px; color: var(--muted); background: #070b11; border: 1px solid var(--edge); padding: 2px 8px; font-variant-numeric: tabular-nums; }
.stat b { color: var(--text); font-weight: 600; }
.stat.up b { color: var(--good); }
.upgrade { margin-top: 11px; border-top: 1px solid var(--edge); padding-top: 10px; }
.pips { display: flex; gap: 2px; margin-bottom: 8px; }
.pips i { flex: 1; height: 4px; background: #16202c; display: block; }
.pips i.on { background: var(--stam); }
.pips i.risk { background: var(--ember); }
.cost { display: flex; flex-wrap: wrap; gap: 5px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.cost span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.cost span svg, .cost span img.ic { width: 13px; height: 13px; object-fit: contain; }
.cost span.ok { color: var(--text); }
.cost span.no { color: #8e4a42; }
.btn {
  appearance: none; font: inherit; width: 100%; margin-top: 10px; text-align: center; color: var(--text); background: var(--surface);
  border: 1px solid var(--edge); padding: 9px; cursor: pointer; font-weight: 600; font-size: 13.5px;
  transition: background .15s, border-color .15s, transform .08s;
}
.btn:hover:not(:disabled) { background: #22303f; border-color: #35485e; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .35; cursor: default; }
.btn--forge { background: linear-gradient(180deg, #2d1d12, #1d1410); border-color: #5a3a22; color: var(--ember-soft); }
.btn--equip { background: linear-gradient(180deg, #14281a, #0e1a12); border-color: #2f5b39; color: var(--good); }
.locked { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.locked b { color: var(--text); font-weight: 600; }
.set { padding: 12px 13px; background: var(--surface); border: 1px solid var(--edge); margin-top: 12px; }
.set__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.set__name { font-family: Forum, Georgia, serif; font-size: 15px; }
.set__count { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.set__rows { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.set__row { font-size: 12px; color: #4f6076; display: flex; gap: 8px; }
.set__row.on { color: var(--text); }
.set__row b { color: var(--memory); font-weight: 600; flex: none; }

/* ==================== toast и заглушка "скоро" ==================== */

.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: #0d1620; border: 1px solid var(--edge); padding: 9px 15px; font-size: 13px; z-index: 9;
  animation: toast 2.4s ease forwards; pointer-events: none; max-width: calc(100% - 32px); color: var(--text);
}
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 10px); } 12%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -6px); } }

.soon { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 40px 20px; }
.soon svg { width: 48px; height: 48px; color: var(--muted); }
.soon h3 { font-family: Forum, Georgia, serif; font-size: 19px; margin: 0; }
.soon p { font-size: 12.5px; color: var(--muted); max-width: 280px; line-height: 1.5; margin: 0; }

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

/* ---------- силы (энергия) ---------- */
.energy { margin-top: 8px; padding: 9px 12px; border: 1px solid var(--edge); background: var(--surface); display: flex; align-items: center; justify-content: flex-start; gap: 10px; flex-wrap: wrap; }
.energy__pips { margin-left: auto; }
.energy__label { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.energy__label b { color: var(--good); font-weight: 600; }
.energy__pips { display: flex; gap: 3px; }
.energy__pips i { width: 9px; height: 13px; background: #0a1016; border: 1px solid var(--edge); transform: skewX(-12deg); }
.energy__pips i.on { background: linear-gradient(180deg, #7fd48a, #3f8f4a); border-color: #4f9a5a; }

/* ---------- лагерь ---------- */
.camp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.camp__task { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 10px; border: 1px solid var(--edge); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.camp__task:hover:not(:disabled) { border-color: #4f9a5a; background: #14201a; }
.camp__task b { font-size: 12.5px; font-weight: 600; }
.camp__task span { font-size: 10.5px; color: var(--muted); line-height: 1.35; }
.camp__task em { font-style: normal; font-size: 10.5px; color: var(--good); margin-top: auto; }
.camp__task:disabled { opacity: .5; cursor: default; }
.camp__task:disabled em { color: var(--muted); }
@media (max-width: 420px) { .camp { grid-template-columns: 1fr; } }

/* ---------- босс ---------- */
button.raid { display: block; width: 100%; text-align: left; color: inherit; font: inherit; cursor: pointer; }
button.raid:hover { border-color: #8a4238; }
.raid--locked { opacity: .55; }
.raid__time { color: #e0715c; }
.quest-banner { cursor: pointer; }

/* ---------- открытость в бою ---------- */
.expo { min-height: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 5px; font-size: 10.5px; }
.expo__tag { color: #e0715c; border: 1px solid #5a2e28; padding: 1px 6px; background: #1e100e; }
.expo__hint { color: var(--muted); }

/* ---------- кузница ---------- */
.shop { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.shop__row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--edge); background: var(--surface); }
.shop__row--own { border-color: #2f5b39; }
.shop__row--lock { opacity: .55; }
.shop__icon { width: 30px; height: 30px; flex: none; color: var(--ember-soft); }
.shop__icon svg { width: 100%; height: 100%; }
.shop__info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.shop__info b { font-size: 13px; font-weight: 600; }
.shop__info span { font-size: 10.5px; color: var(--muted); }
.shop__row .btn { width: auto; margin: 0; padding: 6px 11px; display: inline-flex; align-items: center; gap: 5px; }
.shop__row .btn svg { width: 13px; height: 13px; }
.shop__tag { font-size: 10.5px; color: var(--good); letter-spacing: .08em; text-transform: uppercase; }
.shop__tag--no { color: var(--muted); }

/* ---------- память ---------- */
.mem-intro { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin: 0 0 8px; }
.mem-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.mem-card { position: relative; display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 10px 11px 10px 34px; border: 1px solid var(--edge); background: var(--surface); color: var(--text); font: inherit; }
.mem-card b { font-family: Forum, Georgia, serif; font-size: 15px; font-weight: 400; }
.mem-card span:not(.mem-card__num) { font-size: 10.5px; color: var(--muted); line-height: 1.35; }
.mem-card__num { position: absolute; left: 10px; top: 11px; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mem-card--open { cursor: pointer; border-color: #2c4a5a; background: linear-gradient(150deg, #0f1c24, #0b1017 75%); }
.mem-card--open:hover { border-color: var(--memory); }
.mem-card--open b { color: var(--memory); }
.mem-card--ability { box-shadow: inset 2px 0 0 var(--memory); }
.mem-card--locked { opacity: .45; }
@media (max-width: 420px) { .mem-grid { grid-template-columns: 1fr; } }

/* ---------- сюжет: имя, развилка, флешбек ---------- */
.story__hint { min-height: 16px; font-size: 11.5px; color: #e0715c; margin: 6px 0 2px; }
.story__end .story__next + .story__next { margin-top: 7px; }
.story__next--alt { background: linear-gradient(180deg, #16242e, #0f1820); border-color: #2c4a5a; color: var(--memory); }
.story--flash .story__bg img { filter: grayscale(.6) hue-rotate(160deg) brightness(.7); }
.story--flash .story__text { color: #bfe3ef; font-style: italic; }

/* ---------- рейд: общая карточка ---------- */
.raid__top { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.raid__top .me { color: var(--ember-soft); }
.raid__row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(52px, auto); gap: 8px; align-items: center; min-height: 22px; }
.raid__row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.raid__row b { color: var(--text); font-weight: 600; }
.raid__row.me b { color: var(--ember-soft); }
.raid__prize { display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px; font-style: normal; color: #d9b36c; white-space: nowrap; overflow: hidden; }
.raid__prize img { width: 22px; height: 22px; object-fit: contain; }
.raid__prize--won { color: #e6c46e; font-size: 10.5px; }
.raid__prize--none { color: var(--muted); opacity: .7; }
.raid__cap { font-size: 10.5px; color: var(--muted); opacity: .85; margin: 2px 0 3px; line-height: 1.35; }
.raid__cap--last { margin-top: 8px; padding-top: 7px; border-top: 1px solid #3a221f; }
.raid__actions { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.raid__actions .btn { width: 100%; margin: 0; }
.raid__fill { transition: transform .5s ease; }

/* ---------- рейтинг ---------- */
.tabs { display: flex; gap: 4px; margin: 10px 0; }
.tabs button { flex: 1; padding: 8px 6px; border: 1px solid var(--edge); background: var(--surface); color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.tabs button.on { color: var(--ember-soft); border-color: #6b4425; background: linear-gradient(180deg, #2d1d12, #1d1410); }
.top-list { display: flex; flex-direction: column; gap: 4px; }
.top-row { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border: 1px solid var(--edge); background: var(--surface); font-variant-numeric: tabular-nums; }
.top-row--me { border-color: #6b4425; background: #1d1410; }
.top-row__rank { width: 24px; text-align: center; font-weight: 700; color: var(--muted); }
.top-row__rank--1 { color: #f2c94c; }
.top-row__rank--2 { color: #c9d2dc; }
.top-row__rank--3 { color: #d08a4e; }
.top-row__name { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-row__name small { margin-left: 8px; font-size: 10.5px; color: var(--muted); }
.top-row__value { font-size: 12px; color: var(--text); }
.top-me { margin: 12px 0 18px; text-align: center; font-size: 12px; color: var(--muted); }
.top-me b { color: var(--ember-soft); }

/* ---------- иконки ---------- */
.topbar img.ic { width: 14px; height: 14px; object-fit: contain; vertical-align: -2px; margin-right: 4px; }
.item__img { width: 26px; height: 26px; object-fit: contain; }
.energy__ic { width: 30px; height: 30px; object-fit: contain; margin-right: -4px; }

/* ---------- новое воспоминание ---------- */
.new-memory { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--memory); background: linear-gradient(120deg, #10232d, #0b1017 70%); color: var(--text); font: inherit; text-align: left; cursor: pointer; animation: memPulse 2.4s ease-in-out infinite; }
.new-memory img { width: 34px; height: 34px; object-fit: contain; flex: none; }
.new-memory span { flex: 1; font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.new-memory b { display: block; color: var(--memory); font-size: 13px; }
.new-memory em { font-style: normal; color: var(--memory); font-size: 18px; }
@keyframes memPulse { 0%, 100% { box-shadow: 0 0 0 0 #7fc8d800; } 50% { box-shadow: 0 0 14px 0 #7fc8d855; } }
.mem-card--new { border-color: var(--memory); animation: memPulse 2.4s ease-in-out infinite; }
.mem-card--new span:not(.mem-card__num) { color: var(--memory); }

/* ---------- лагерь ---------- */
.camp__note { font-size: 11px; color: var(--muted); line-height: 1.45; margin: -2px 0 8px; }
.camp__ic { width: 52px; height: 52px; object-fit: contain; }
.item[data-locked="1"] .item__img { filter: grayscale(1); opacity: .6; }

/* ---------- мини-игры ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 16px; background: #02050acc; backdrop-filter: blur(3px); }
.modal.on { display: flex; }
.modal__box { width: 100%; max-width: 380px; border: 1px solid var(--edge-2); background: linear-gradient(160deg, #111a24, #0a0f15 75%); padding: 18px 16px; }
.mg { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.mg h3 { font-family: Forum, Georgia, serif; font-weight: 400; font-size: 20px; margin: 0; color: var(--ember-soft); }
.mg__ic { width: 64px; height: 64px; object-fit: contain; }
.mg__hint { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.45; }
.mg__status { min-height: 20px; font-size: 13px; }
.mg__status .ok, .mg__result b { color: var(--good); }
.mg__status .no { color: #e0715c; }
.mg__btn { width: 100%; margin: 4px 0 0; }
.mg__stars { font-size: 26px; letter-spacing: 4px; color: #f2c94c; }
.mg__result { margin: 0; font-size: 14px; }
.mg__reward { margin: 0; font-size: 13px; color: var(--text); }
.mg-bar { position: relative; width: 100%; height: 26px; margin: 8px 0; background: #070b11; border: 1px solid var(--edge-2); }
.mg-bar__zone { position: absolute; top: 0; bottom: 0; background: linear-gradient(180deg, #7fd48a55, #3f8f4a88); border-left: 1px solid #7fd48a; border-right: 1px solid #7fd48a; }
.mg-bar__mark { position: absolute; top: -5px; bottom: -5px; width: 4px; margin-left: -2px; background: var(--ember-soft); box-shadow: 0 0 8px var(--ember); }
.mg-path { width: 150px; height: 170px; margin: 6px 0; border: 1px solid var(--edge); background: radial-gradient(circle at 50% 70%, #1a2430, #080c11); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.mg-path img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: translateY(12px); transition: opacity .2s, transform .2s; }
.mg-path img.on { opacity: 1; transform: none; }
.mg-runes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; margin: 8px 0; }
.mg-rune { aspect-ratio: 1; font-size: 30px; border: 1px solid var(--edge-2); background: #0b1118; color: #5b6f86; cursor: pointer; transition: all .12s; }
.mg-rune.lit { color: #bfe3ef; border-color: var(--memory); background: #16303c; box-shadow: 0 0 16px #7fc8d888; }

/* ---------- бой: перезарядка между действиями — просто серые кнопки ---------- */
.actions.cooling .act { pointer-events: none; opacity: .4; filter: grayscale(1); transition: opacity .15s; }

/* ---------- рейд: крупный портрет ---------- */
.raid__head { align-items: center; }
.raid__port { width: 64px; height: 64px; border-radius: 4px; }
.raid__name { font-size: 18px; }

/* ---------- опыт до уровня ---------- */
.who__sub b { color: var(--text); }
.xp { display: block; height: 4px; margin: 5px 0 2px; background: #0a1016; border: 1px solid var(--edge); overflow: hidden; }
.xp i { display: block; height: 100%; background: linear-gradient(90deg, #6b4425, var(--ember-soft)); }

/* ---------- сюжет ждёт: выделяем только «продолжить» ---------- */
.quest-banner--ready { border-color: var(--ember); background: linear-gradient(120deg, #3a2412, #1a1310 70%); animation: readyGlow 2s ease-in-out infinite; }
.quest-banner--ready .quest-banner__title { color: var(--ember-soft); font-size: 18px; }
.quest-banner__cta { display: inline-block; margin-top: 8px; padding: 7px 14px; border: 1px solid #925c2e; background: linear-gradient(180deg, #4a2d15, #2d1d12); color: var(--ember-soft); font-weight: 600; font-size: 13px; }
@keyframes readyGlow { 0%, 100% { box-shadow: 0 0 0 0 #e07b3c00; } 50% { box-shadow: 0 0 16px 0 #e07b3c55; } }

/* ---------- ночной дозор ---------- */
.mg-path--night img.on { filter: brightness(.45) saturate(.6); }
.mg-path--night { background: radial-gradient(circle at 50% 70%, #0d131a, #030507); }

/* ---------- иконки-картинки взамен эмодзи/SVG ---------- */
.item__lock { width: 12px; height: 12px; object-fit: contain; margin-left: 4px; vertical-align: -1px; opacity: .85; }
