/* «Хасеки» — мини-приложение. Ночной дворец: тёмная слива, золото, роза. */

:root {
  --bg: #140d17;
  --bg-2: #1c1220;
  --surface: rgba(40, 27, 46, 0.78);
  --surface-solid: #251929;
  --surface-2: #301f35;
  --line: rgba(222, 184, 112, 0.2);
  --line-strong: rgba(222, 184, 112, 0.46);
  --gold: #deb870;
  --gold-2: #f4dca2;
  --gold-deep: #a47f3c;
  --rose: #d2647d;
  --rose-2: #f2a8b8;
  --teal: #63bdb2;
  --text: #f5ece0;
  --text-2: #cbbba9;
  --text-3: #8f7e70;
  --ok: #94d6a3;
  --bad: #f0907f;
  --radius: 18px;
  --display: "Cormorant Garamond", "Times New Roman", serif;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
  --top-inset: env(safe-area-inset-top, 0px);
  --bottom-inset: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* Неподвижный фон: свечение и тонкий узор из восьмиконечных звёзд. */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 55% at 50% -12%, rgba(150, 62, 112, 0.38), transparent 62%),
    radial-gradient(90% 50% at 110% 105%, rgba(86, 46, 128, 0.3), transparent 60%),
    radial-gradient(70% 40% at -10% 70%, rgba(222, 184, 112, 0.07), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23deb870' stroke-opacity='0.07' stroke-width='1'%3E%3Cpath d='M22 22h20v20H22z'/%3E%3Cpath d='M32 17.9 46.1 32 32 46.1 17.9 32z'/%3E%3C/g%3E%3C/svg%3E"),
    var(--bg);
}

button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
body.busy button:not(.keep-active) { pointer-events: none; }

.screen {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 var(--gutter) calc(32px + var(--bottom-inset));
}

[hidden] { display: none !important; }

/* ---------- загрузка ---------- */

.loading {
  min-height: 80vh;
  display: grid;
  place-items: center;
  color: var(--gold);
}
.loading-star { width: 54px; height: 54px; animation: spin 6s linear infinite; opacity: 0.85; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- верхняя полоса с героиней ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: calc(8px + var(--top-inset)) var(--gutter) 8px;
  background: linear-gradient(180deg, rgba(20, 13, 23, 0.96), rgba(20, 13, 23, 0.86));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 528px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: none;
  border: 0;
  padding: 2px 0;
  text-align: left;
}
.hero-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.05;
  color: var(--gold-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.hero-title {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 3px;
}
.stats {
  display: flex;
  gap: 4px;
  background: none;
  border: 0;
  padding: 0;
}
.stat {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 36px;
  padding: 4px 3px 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(222, 184, 112, 0.1);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  transition: transform 0.25s, background 0.25s, border-color 0.25s;
}
.stat i { font-style: normal; font-size: 13px; line-height: 1.1; }
.stat.up { animation: bump-up 1.4s ease; }
.stat.down { animation: bump-down 1.4s ease; }

@keyframes bump-up {
  0%, 100% { transform: none; }
  20% { transform: translateY(-3px) scale(1.08); background: rgba(148, 214, 163, 0.22); border-color: rgba(148, 214, 163, 0.5); }
}
@keyframes bump-down {
  0%, 100% { transform: none; }
  20% { transform: translateY(2px) scale(0.96); background: rgba(240, 144, 127, 0.22); border-color: rgba(240, 144, 127, 0.5); }
}

/* ---------- общие блоки ---------- */

.page { padding-top: 18px; }

.kicker {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin: 4px 0 14px;
}
.kicker::before, .kicker::after {
  content: "";
  display: inline-block;
  width: 26px;
  height: 1px;
  background: var(--line-strong);
  vertical-align: middle;
  margin: 0 10px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.scene { padding: 22px 20px 20px; }
.scene p {
  margin: 0;
  font-size: 17.5px;
  line-height: 1.68;
  color: var(--text);
  hyphens: auto;
  -webkit-hyphens: auto;
}
.scene p + p { margin-top: 0.85em; }
.scene b { color: var(--gold-2); font-weight: 600; }
.scene i { color: var(--text-2); }
.scene.dropcap p:first-child { display: flow-root; } /* короткий первый абзац не «обтекает» буквицу следующим */
.scene.dropcap p:first-child::first-letter {
  float: left;
  font-family: var(--display);
  font-weight: 700;
  font-size: 3.35em;
  line-height: 0.82;
  padding: 0.06em 0.1em 0 0;
  color: var(--gold);
}

.reveal { opacity: 0; transform: translateY(8px); animation: reveal 0.55s ease forwards; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes reveal { to { opacity: 1; transform: none; } }

/* Уже показанное при перерисовке не анимируем заново. */
.no-anim, .no-anim * { animation: none !important; }
.no-anim.reveal, .no-anim .reveal, .no-anim .outcome { opacity: 1 !important; transform: none !important; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 16px;
  color: var(--gold);
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  font-style: italic;
  justify-content: center;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong));
}
.divider::after { background: linear-gradient(90deg, var(--line-strong), transparent); }

.prose p { margin: 0 0 0.8em; font-size: 16.5px; line-height: 1.62; color: var(--text-2); }
.prose p:last-child { margin-bottom: 0; }

.note {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-3);
  text-align: center;
  margin-top: 12px;
}

/* ---------- кнопки ---------- */

.actions { display: grid; gap: 10px; margin-top: 18px; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.12s ease, filter 0.2s, opacity 0.2s;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.42; }
.btn.primary {
  color: #2b1b0b;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, #c89e52);
  box-shadow: 0 8px 24px rgba(222, 184, 112, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.btn.secondary {
  color: var(--gold-2);
  background: rgba(222, 184, 112, 0.08);
  border-color: var(--line-strong);
}
.btn.ghost {
  color: var(--text-2);
  background: transparent;
  border-color: var(--line);
}
.btn.text {
  min-height: 40px;
  color: var(--text-3);
  background: none;
  font-weight: 500;
  font-size: 14.5px;
}

/* ---------- обложка ---------- */

.cover {
  min-height: var(--tg-viewport-stable-height, 100vh);
  display: flex;
  flex-direction: column;
  padding-top: calc(18px + var(--top-inset));
}
.cover-art { width: min(64vw, 250px); margin: 0 auto -6px; }
.cover-art svg { display: block; width: 100%; height: auto; }
.cover-title {
  margin: 0;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(54px, 17vw, 76px);
  line-height: 1;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #fff1cf, var(--gold) 60%, var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(222, 184, 112, 0.15);
}
.cover-tagline {
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 20px;
  color: var(--rose-2);
  margin: 8px 12px 22px;
}
.cover .prose { padding: 0 4px; }
.cover .prose p { text-align: center; font-size: 16px; }
.cover .actions { margin-top: auto; padding-top: 24px; }

.twinkle { animation: twinkle 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes twinkle { 0%, 100% { opacity: 0.35; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.1); } }

.center-message {
  min-height: 70vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 14px;
  padding: 0 12px;
}
.center-message h2 { margin: 0; font-family: var(--display); font-size: 30px; color: var(--gold-2); }
.center-message p { margin: 0; color: var(--text-2); font-size: 16.5px; line-height: 1.6; }

/* ---------- анкета ---------- */

.steps { display: flex; justify-content: center; gap: 8px; margin: 6px 0 22px; }
.steps span { width: 28px; height: 3px; border-radius: 3px; background: rgba(222, 184, 112, 0.18); transition: background 0.3s; }
.steps span.on { background: var(--gold); }

.ask {
  margin: 0 0 6px;
  text-align: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 29px;
  line-height: 1.15;
  color: var(--gold-2);
}
.ask-sub { text-align: center; color: var(--text-2); font-size: 15.5px; line-height: 1.55; margin: 6px 6px 20px; }

.name-input {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  text-align: center;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.name-input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(222, 184, 112, 0.12); }
.name-input::placeholder { color: var(--text-3); font-weight: 500; }
.field-error { min-height: 22px; margin-top: 8px; text-align: center; color: var(--bad); font-family: var(--sans); font-size: 13.5px; }

.traits { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trait {
  position: relative;
  padding: 13px 12px 12px;
  border-radius: 14px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.12s;
}
.trait:active { transform: scale(0.97); }
.trait-name { display: block; font-size: 16.5px; font-weight: 500; }
.trait-talent { display: block; margin-top: 3px; font-family: var(--sans); font-size: 11.5px; letter-spacing: 0.06em; color: var(--text-3); }
.trait.on { border-color: var(--gold); background: linear-gradient(180deg, rgba(222, 184, 112, 0.18), rgba(222, 184, 112, 0.06)); }
.trait.on .trait-talent { color: var(--gold); }
.trait.on::after {
  content: "✓";
  position: absolute;
  top: 9px;
  right: 11px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
}

.counter { text-align: center; font-family: var(--sans); font-size: 13px; color: var(--text-3); margin: 14px 0 4px; }

.talents { padding: 14px 16px; margin-top: 12px; display: grid; gap: 9px; }
.talents-title { font-family: var(--sans); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.talent-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 15.5px; }
.pips { display: inline-flex; gap: 5px; }
.pips span { width: 9px; height: 9px; border-radius: 50%; border: 1px solid rgba(222, 184, 112, 0.45); }
.pips span.on { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 8px rgba(222, 184, 112, 0.45); }

.cards { display: grid; gap: 12px; }
.pick {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.12s;
}
.pick:active { transform: scale(0.98); }
.pick.on { border-color: var(--gold); background: linear-gradient(135deg, rgba(222, 184, 112, 0.17), rgba(210, 100, 125, 0.08)); }
.pick-icon {
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--gold);
  background: radial-gradient(circle at 30% 25%, rgba(222, 184, 112, 0.25), rgba(222, 184, 112, 0.05));
  border: 1px solid var(--line-strong);
}
.pick-icon svg { width: 26px; height: 26px; }
.pick-body { min-width: 0; }
.pick.has-art { flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; }
.pick.has-art .pick-body { padding: 14px 16px 16px; }
.pick-art { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); }
.pick.on .pick-art { filter: saturate(1.1) brightness(1.05); }

.cover-art.has-photo { width: min(68vw, 280px); margin-bottom: 14px; }
.cover-photo {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 999px 999px 20px 20px;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 6px rgba(222, 184, 112, 0.08), 0 24px 60px rgba(0, 0, 0, 0.5);
  background: var(--surface-2);
}
.pick-name { display: block; font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.15; color: var(--gold-2); }
.pick-hook { display: block; margin-top: 5px; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }

/* ---------- сцена и выборы ---------- */

.result { margin-bottom: 14px; display: grid; gap: 8px; }
.result-choice {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: 19px;
  color: var(--rose-2);
  text-align: center;
  line-height: 1.3;
}
.result-choice::before { content: "❧ "; color: var(--gold); font-style: normal; }

.dice {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-2);
}
.dice .die { display: inline-block; font-size: 18px; animation: roll 0.75s cubic-bezier(0.3, 1.4, 0.5, 1); }
.dice .outcome { font-weight: 700; opacity: 0; animation: reveal 0.35s ease 0.7s forwards; }
.dice.success { border-color: rgba(148, 214, 163, 0.45); }
.dice.success .outcome { color: var(--ok); }
.dice.fail { border-color: rgba(240, 144, 127, 0.45); }
.dice.fail .outcome { color: var(--bad); }
@keyframes roll {
  0% { transform: rotate(-200deg) scale(0.4); opacity: 0; }
  60% { transform: rotate(25deg) scale(1.25); opacity: 1; }
  100% { transform: none; }
}

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.chip {
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  background: rgba(222, 184, 112, 0.1);
  color: var(--gold-2);
  border: 1px solid rgba(222, 184, 112, 0.22);
}
.chip.good { background: rgba(148, 214, 163, 0.1); color: #c4ecce; border-color: rgba(148, 214, 163, 0.28); }
.chip.bad { background: rgba(240, 144, 127, 0.1); color: #f8c1b7; border-color: rgba(240, 144, 127, 0.28); }

.choices { display: grid; gap: 10px; margin-top: 18px; }
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 13px 14px 13px 16px;
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)), var(--surface-solid);
  border: 1px solid var(--line);
  text-align: left;
  transition: transform 0.12s, border-color 0.2s, background 0.2s;
}
.choice:active { transform: scale(0.985); border-color: var(--line-strong); }
.choice::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: var(--gold);
  box-shadow: 0 0 10px rgba(222, 184, 112, 0.6);
}
.choice .label { flex: 1; font-size: 16.5px; line-height: 1.4; font-weight: 500; }
.choice.chosen { border-color: var(--gold); background: rgba(222, 184, 112, 0.14); }
.choice.free::before { background: var(--rose); box-shadow: 0 0 10px rgba(210, 100, 125, 0.6); }

.chance {
  flex: none;
  padding: 5px 9px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.chance.high { color: #c4ecce; background: rgba(148, 214, 163, 0.14); }
.chance.mid { color: var(--gold-2); background: rgba(222, 184, 112, 0.14); }
.chance.low { color: #f8c1b7; background: rgba(240, 144, 127, 0.14); }

/* ---------- 14 дней ---------- */

.dayhead { text-align: center; margin: 2px 0 16px; }
.dayhead-line { display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.day-number { font-family: var(--display); font-weight: 700; font-size: 30px; color: var(--gold-2); line-height: 1; }
.day-slot { font-family: var(--sans); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.event {
  display: inline-block;
  margin-top: 9px;
  padding: 5px 13px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(210, 100, 125, 0.2), rgba(222, 184, 112, 0.16));
  border: 1px solid rgba(210, 100, 125, 0.35);
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: 17px;
  color: var(--rose-2);
}
.dayline { display: flex; gap: 3px; margin-top: 13px; }
.dayline span { flex: 1; height: 4px; border-radius: 3px; background: rgba(222, 184, 112, 0.14); }
.dayline span.past { background: rgba(222, 184, 112, 0.5); }
.dayline span.now { background: var(--gold); box-shadow: 0 0 10px rgba(222, 184, 112, 0.7); }
.slots { display: flex; justify-content: center; gap: 14px; margin-top: 10px; font-family: var(--sans); font-size: 12px; color: var(--text-3); }
.slots span.now { color: var(--gold); font-weight: 700; }

.writing { padding: 22px 20px; text-align: center; }
.writing-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: 20px;
  color: var(--gold-2);
}
.writing-label svg { width: 24px; height: 24px; color: var(--gold); animation: quill 1.6s ease-in-out infinite; transform-origin: 20% 80%; }
@keyframes quill { 0%, 100% { transform: rotate(-6deg) translateX(-2px); } 50% { transform: rotate(6deg) translateX(3px); } }
.skeleton { display: grid; gap: 11px; margin-top: 20px; }
.skeleton span {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(222, 184, 112, 0.07), rgba(222, 184, 112, 0.2), rgba(222, 184, 112, 0.07));
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
.skeleton span:nth-child(2) { width: 92%; }
.skeleton span:nth-child(3) { width: 97%; }
.skeleton span:nth-child(4) { width: 64%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.error-box { padding: 18px; text-align: center; border-color: rgba(240, 144, 127, 0.35); }
.error-box p { margin: 0 0 14px; color: var(--text-2); line-height: 1.55; }

.composer { padding: 16px; margin-top: 10px; }
.composer-hint { margin: 0 0 10px; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.composer textarea, .feedback-area {
  display: block;
  width: 100%;
  min-height: 92px;
  resize: vertical;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.5;
  outline: none;
}
.composer textarea:focus, .feedback-area:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(222, 184, 112, 0.1); }
.composer-meta { display: flex; justify-content: space-between; align-items: center; margin: 8px 2px 12px; font-family: var(--sans); font-size: 12.5px; color: var(--text-3); }
.rejected {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(240, 144, 127, 0.1);
  border: 1px solid rgba(240, 144, 127, 0.28);
  color: #f8c1b7;
  font-size: 14.5px;
  line-height: 1.5;
}

.offer { padding: 18px; margin-top: 16px; }
.offer .prose p { color: var(--text); }
.offer-thanks { margin: 0; text-align: center; font-size: 16px; line-height: 1.55; color: var(--gold-2); }

.season-text {
  margin-top: 18px;
  padding: 18px;
  text-align: center;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--gold-2);
}
.season-text.defeated { color: var(--rose-2); }

/* ---------- свиток героини ---------- */

.summary { padding: 18px; margin-top: 16px; }
.summary-title { font-family: var(--display); font-weight: 700; font-size: 24px; color: var(--gold-2); text-align: center; }
.summary-sub { text-align: center; font-family: var(--sans); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin-top: 4px; }

.section-title {
  margin: 20px 0 10px;
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; align-items: center; font-size: 15px; }
.bar-row .value { font-family: var(--sans); font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--text-2); }
.bar { grid-column: 1 / -1; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.06); overflow: hidden; position: relative; }
.bar i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 4px; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }
.bar.favor i { background: linear-gradient(90deg, #a8445c, var(--rose)); }
.bar.suspicion i { background: linear-gradient(90deg, #b45a4a, var(--bad)); }
.bar.center::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: rgba(255, 255, 255, 0.25); }
.bar.center i.pos { left: 50%; background: linear-gradient(90deg, rgba(148, 214, 163, 0.5), var(--ok)); }
.bar.center i.neg { left: auto; right: 50%; background: linear-gradient(270deg, rgba(240, 144, 127, 0.5), var(--bad)); }
.list { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.list li { font-size: 15px; line-height: 1.45; color: var(--text-2); padding-left: 24px; position: relative; }
.list li span { position: absolute; left: 0; top: 0; }

/* ---------- всплывающие листы ---------- */

.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-shade { position: absolute; inset: 0; background: rgba(8, 4, 10, 0.62); opacity: 0; transition: opacity 0.25s; }
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 560px;
  margin: 0 auto;
  max-height: 88vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 20px calc(22px + var(--bottom-inset));
  background: linear-gradient(180deg, #2b1c30, var(--surface-solid) 120px);
  border-radius: 24px 24px 0 0;
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.45);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet-wrap.open .sheet-shade { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: rgba(222, 184, 112, 0.35); margin: 0 auto 14px; }
.sheet h3 { margin: 0; text-align: center; font-family: var(--display); font-weight: 700; font-size: 27px; color: var(--gold-2); }
.sheet .sub { text-align: center; margin-top: 4px; font-family: var(--sans); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.sheet .meta { text-align: center; margin-top: 8px; font-size: 14.5px; color: var(--text-2); }
.sheet textarea { margin-top: 14px; }
.sheet .confirm-text { margin: 6px 0 4px; text-align: center; font-size: 17px; line-height: 1.5; color: var(--text); }

/* ---------- уведомления ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + var(--bottom-inset));
  z-index: 60;
  max-width: min(92vw, 480px);
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(46, 31, 52, 0.97);
  border: 1px solid var(--line-strong);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--text);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (min-width: 600px) {
  .scene { padding: 28px 28px 26px; }
  .scene p { font-size: 18px; }
}
