/* 👹 Sakura Prison — ПУТЬ ДУХОВ.
 *
 * Отдельный файл, но НЕ отдельный дизайн: используются те же переменные
 * (--panel, --pink, --radius, --serif) и те же приёмы, что во всей игре.
 * Ничего нового в палитру не вводится.
 */

/* --------------------------------------------------------------- карта */

.path-head { padding: 14px 16px; margin-bottom: 12px; }
.path-title {
  font-family: var(--serif); font-size: 20px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--pink);
}
.path-sub { font-size: 12px; color: var(--ink-dim); margin: 4px 0 8px; }
.path-sub b { color: var(--ink); }

.path-map { position: relative; padding-bottom: 40px; }
.path-track { position: relative; width: 100%; }

/* Дорожка между узлами. Рисуется одной ломаной по координатам с сервера —
   форма пути живёт в данных, а не в вёрстке. */
/* pointer-events:none обязателен: иначе толстая линия дорожки перехватывает
   нажатия по узлам, которые лежат прямо на ней (22.09.2026). */
.path-line {
  position: absolute; inset: 0; width: 100%; height: 100%;
  overflow: visible; pointer-events: none;
}
.path-line-stroke {
  fill: none; stroke: rgba(255, 143, 208, .16); stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 5 7;
}
.path-line-done {
  fill: none; stroke: rgba(255, 143, 208, .75); stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 6px rgba(255, 122, 176, .6));
}

.path-node {
  position: absolute; transform: translate(-50%, -50%);
  width: 54px; height: 54px; padding: 0; cursor: pointer;
  display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--panel-line);
  background: rgba(24, 15, 34, .92); color: var(--ink);
}
.path-node:active { transform: translate(-50%, -50%) scale(.94); }
.path-node .path-shape { width: 26px; height: 26px; }
.path-node-num {
  position: absolute; bottom: -15px; font-size: 10px; color: var(--ink-faint);
}
.path-node-rank {
  position: absolute; top: -6px; right: -6px; font-size: 10px; font-weight: 800;
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pink); color: #1a0a14;
}

/* Пройдено — приглушённо и с галочным свечением, текущий — подсвечен,
   закрытые — почти не видны. */
.path-node.s-cleared { border-color: rgba(255, 143, 208, .45); opacity: .85; }
.path-node.s-current {
  border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 122, 176, .16),
    0 0 22px rgba(255, 122, 176, .5);
  animation: node-pulse 2.2s ease-in-out infinite;
}
.path-node.s-locked { opacity: .32; filter: grayscale(.6); cursor: default; }
@keyframes node-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255, 122, 176, .16), 0 0 18px rgba(255, 122, 176, .4); }
  50%      { box-shadow: 0 0 0 7px rgba(255, 122, 176, .08), 0 0 30px rgba(255, 122, 176, .7); }
}

/* Боссовые узлы крупнее и заметнее остальных — это главное на пути. */
.path-node.n-boss {
  width: 82px; height: 82px;
  border-color: rgba(255, 95, 122, .6);
  background: radial-gradient(circle at 50% 40%, rgba(90, 20, 48, .95), rgba(20, 10, 26, .95));
  box-shadow: 0 0 26px rgba(255, 60, 90, .28);
}
.path-node.n-boss .path-shape { width: 52px; height: 52px; }
.path-node.n-boss.s-current { box-shadow: 0 0 34px rgba(255, 60, 90, .7); }
.path-node.n-elite { width: 62px; height: 62px; border-color: rgba(255, 176, 32, .4); }
.path-node.n-cursed { border-color: rgba(176, 108, 255, .45); }
.path-node.n-shrine { border-color: rgba(143, 217, 200, .4); }
.path-node.n-chest { border-color: rgba(255, 210, 74, .4); }

/* ---------------------------------------------------------- экран узла */

.boss-art {
  position: relative; height: 200px; margin-bottom: 12px;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--panel-line);
  background: radial-gradient(circle at 50% 42%, rgba(74, 23, 48, .8), rgba(12, 8, 18, .96));
}
.boss-art-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.boss-art-tag {
  position: absolute; left: 12px; bottom: 10px; font-size: 11px; color: var(--ink-dim);
  background: rgba(8, 6, 13, .6); padding: 3px 9px; border-radius: 999px;
}

.boss-card { padding: 14px 16px; margin-bottom: 12px; }
.boss-name {
  font-family: var(--serif); font-size: 23px; font-weight: 700; color: #fff;
  letter-spacing: .5px;
}
.boss-title { font-size: 12px; color: var(--pink); margin-bottom: 8px; }
.boss-desc { font-size: 13px; color: var(--ink-dim); line-height: 1.5; }

.boss-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 6px;
}
.boss-stat {
  padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .04);
  border: 1px solid var(--panel-line);
}
.boss-stat-label { font-size: 10px; letter-spacing: .8px; text-transform: uppercase; color: var(--ink-faint); }
.boss-stat-value { font-size: 16px; font-weight: 700; margin-top: 2px; }
.boss-stat.good .boss-stat-value { color: #67d98b; }
.boss-stat.warn .boss-stat-value { color: #ffb020; }

.boss-line {
  display: flex; align-items: center; gap: 8px; padding: 7px 0;
  border-top: 1px solid rgba(255, 255, 255, .05); font-size: 13px;
}
.boss-line-label { flex: 1 1 auto; color: var(--ink-faint); font-size: 11px;
  text-transform: uppercase; letter-spacing: .8px; }
.boss-note { font-size: 12px; color: var(--ink-dim); line-height: 1.5; padding-bottom: 4px; }
.danger { color: #ff6b7f; letter-spacing: 2px; }

.boss-sub {
  font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 8px;
}
.boss-phases { margin-top: 10px; }
.boss-phase {
  display: flex; align-items: baseline; gap: 8px; font-size: 12px; padding: 4px 0;
}
.boss-phase-at { color: var(--pink); font-weight: 700; width: 38px; flex: 0 0 auto; }
.boss-phase-note { color: var(--ink-faint); font-size: 11px; }

.boss-rewards, .boss-prep { padding: 14px 16px; margin-bottom: 12px; }
.reward-row { display: flex; align-items: center; gap: 7px; font-size: 14px; padding: 4px 0; }
.reward-row .dim { font-size: 11px; }
.reward-drops { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.drop {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px;
  padding: 5px 9px; border-radius: 999px; background: rgba(255, 255, 255, .05);
}

/* Слоты экипировки */
.slot-grid { display: grid; gap: 8px; }
.slot {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; width: 100%;
  border-radius: 14px; border: 1px dashed var(--panel-line); cursor: pointer;
  background: rgba(255, 255, 255, .03); color: var(--ink); text-align: left;
}
.slot.filled { border-style: solid; border-color: rgba(255, 143, 208, .4); }
.slot:active { transform: scale(.99); }
.slot-icon {
  width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 10px; background: rgba(255, 138, 205, .1);
}
.slot-icon .item-svg, .slot-icon .tool-svg { width: 22px; height: 22px; }
.slot-main { display: flex; flex-direction: column; min-width: 0; }
.slot-name { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-faint); }
.slot-item { font-size: 14px; font-weight: 700; }
.slot-note { font-size: 11px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }

.battle-btn { width: 100%; font-size: 17px; letter-spacing: 1.5px; padding: 15px; }
.battle-warn {
  margin-top: 10px; font-size: 12px; color: #ffb020; text-align: center; line-height: 1.5;
}

/* Список выбора предмета внутри листа подтверждения */
.pick-list { display: grid; gap: 8px; }
.pick-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; width: 100%;
  border-radius: 12px; border: 1px solid var(--panel-line); cursor: pointer;
  background: rgba(255, 255, 255, .04); color: var(--ink); text-align: left;
}
.pick-main { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.pick-main .dim { font-size: 11px; }
.pick-qty { color: var(--ink-faint); font-size: 12px; }

/* ------------------------------------------------------------------- бой */

.battle {
  position: fixed; inset: 0; z-index: 60; background: #08060d;
  touch-action: none; overscroll-behavior: none; user-select: none;
}
.battle-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
body.no-scroll { overflow: hidden; }

.battle-top {
  position: absolute; left: 0; right: 0; top: 0; padding: 14px 16px 10px;
  background: linear-gradient(to bottom, rgba(8, 6, 13, .92), transparent);
  pointer-events: none;
}
.battle-name {
  font-family: var(--serif); font-size: 18px; font-weight: 700; color: #fff;
  letter-spacing: 1px;
}
.battle-sub { font-size: 11px; color: var(--ink-dim); margin-bottom: 7px; }
.battle-bar {
  height: 9px; border-radius: 999px; overflow: hidden;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .08);
}
.battle-bar-fill { height: 100%; width: 100%; transition: width .18s ease; }
.battle-bar.boss .battle-bar-fill { background: linear-gradient(90deg, #ff4d6a, #ff9ed8); }
.battle-bar.player .battle-bar-fill { background: linear-gradient(90deg, #67d98b, #a8f5c8); }
.battle-hp { font-size: 10px; color: var(--ink-dim); margin-top: 3px; }
.battle-close {
  position: absolute; right: 10px; top: 10px; pointer-events: auto;
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--panel-line);
  background: rgba(20, 12, 28, .8); color: var(--ink-dim); font-size: 15px; cursor: pointer;
}
.battle-combo {
  position: absolute; right: 16px; top: 42%; font-family: var(--serif);
  font-size: 30px; font-weight: 800; color: #ffd76a; pointer-events: none;
  text-shadow: 0 2px 18px rgba(255, 190, 90, .6);
}
.battle-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 16px 18px;
  background: linear-gradient(to top, rgba(8, 6, 13, .92), transparent);
  pointer-events: none;
}
.battle-hint { font-size: 10.5px; color: var(--ink-faint); margin-top: 6px; text-align: center; }

/* --------------------------------------------------------------- победа */

.victory {
  position: fixed; inset: 0; z-index: 70; overflow-y: auto;
  background: radial-gradient(circle at 50% 20%, rgba(90, 24, 60, .9), rgba(8, 6, 13, .98));
  padding: 24px 16px 28px;
}
.victory-card {
  max-width: 520px; margin: 0 auto; border-radius: var(--radius);
  border: 1px solid var(--panel-line); background: rgba(18, 11, 26, .9);
  padding: 20px 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
.victory-title {
  font-family: var(--serif); font-size: 27px; font-weight: 800; text-align: center;
  color: #fff; letter-spacing: 3px; text-shadow: 0 0 26px rgba(255, 122, 176, .7);
}
.victory-title.lose { color: #ff6b7f; text-shadow: 0 0 22px rgba(255, 80, 100, .5); }
.victory-sub {
  text-align: center; font-size: 12px; letter-spacing: 1.6px; color: var(--pink);
  text-transform: uppercase; margin: 4px 0 14px;
}
.victory-rank {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px; border-radius: 14px; margin-bottom: 14px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--panel-line);
}
.rank-letter { font-family: var(--serif); font-size: 34px; font-weight: 800; line-height: 1; }
.rank-stars { color: #ffd76a; letter-spacing: 2px; }
.rank-name { font-size: 12px; color: var(--ink-dim); }
.victory-rank.rank-S .rank-letter { color: #ffd24a; text-shadow: 0 0 20px rgba(255, 210, 74, .6); }
.victory-rank.rank-A .rank-letter { color: #ff9ed8; }
.victory-rank.rank-B .rank-letter { color: #a8d8ff; }
.victory-rank.rank-C .rank-letter { color: #9aa0b5; }
.victory-rank.rank-D .rank-letter { color: #7c8093; }

.victory-block {
  padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, .06);
}
.victory-head {
  font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 7px;
}
.victory-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.victory-stat { display: flex; justify-content: space-between; font-size: 12.5px; }
.victory-stat span { color: var(--ink-faint); }
.victory-levelup, .victory-unlock {
  text-align: center; font-size: 13px; font-weight: 700; color: var(--pink);
  padding: 10px 0 2px;
}
.victory-unlock { animation: unlock-in .6s ease both; }
@keyframes unlock-in {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
.relic-block .relic-line { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.relic-done { font-size: 12px; color: #ffd24a; margin-top: 7px; }
.victory-actions { display: flex; gap: 10px; margin-top: 16px; }
.victory-actions button { flex: 1 1 0; }

/* ------------------------------------------------------------ реликвии */

.relics-head { padding: 14px 16px; margin-bottom: 12px; }
.relic-bonuses { font-size: 12px; color: #ffd24a; line-height: 1.5; }
.relic-row .bar-thin { height: 4px; margin-top: 6px; }
.relic-row.done { border-color: rgba(255, 210, 74, .35); }
.pill-done { background: rgba(255, 210, 74, .16); color: #ffd24a; }

@media (max-width: 360px) {
  .path-node { width: 48px; height: 48px; }
  .path-node.n-boss { width: 72px; height: 72px; }
  .boss-art { height: 172px; }
}
