/* Сцены: обложка, вступление, разговор со старым другом, финал, журнал, справка. */

.screen-scroll { overflow-y: auto; }

/* ---------- Обложка ---------- */

.cover {
  height: 100%;
  display: flex;
  align-items: flex-start;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(24px, 5vw, 72px);
}
.cover-inner {
  max-width: 620px;
  margin: auto 0;
  padding-bottom: 8px;
}
.cover h1 { margin-bottom: 10px; }
.cover-part {
  font-size: clamp(16px, 1.6vw, 20px);
  color: var(--accent-soft);
  font-weight: 600;
  margin-bottom: 22px;
}
.cover-lead { margin-bottom: 30px; }
.cover-actions { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.cover-actions .btn { width: 100%; justify-content: flex-start; }
.cover-note {
  margin-top: 26px;
  font-size: 12.5px;
  color: var(--ink-mute);
  max-width: 420px;
}

.cover-nudge {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 520px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 138, 61, 0.35);
  background: rgba(255, 138, 61, 0.1);
}
.cover-nudge b { display: block; font-size: 13px; color: var(--accent-soft); }
.cover-nudge span { display: block; font-size: 14px; color: var(--ink); margin-top: 3px; }
.cover-nudge .btn { flex: 0 0 auto; margin-left: auto; }

/* ---------- Вступление ---------- */

.intro {
  height: 100%;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(24px, 5vw, 60px);
}
.intro-card { width: min(720px, 100%); margin: auto; }
.intro-card h2 { margin-bottom: 8px; }
.intro-grid { display: grid; gap: 20px; }
.intro-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- Сцена «Старый друг» ---------- */

.friend {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: clamp(24px, 5vw, 60px);
  text-align: center;
}
.friend-line {
  max-width: 820px;
  padding: 20px 30px;
  border-radius: 20px;
  background: rgba(6, 9, 14, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  font-size: clamp(19px, 2.3vw, 30px);
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.01em;
  animation: rise 0.5s ease both;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.friend-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
  animation: rise 0.4s ease both;
}
.friend-choices .btn { min-height: 44px; padding: 10px 18px; font-size: 14.5px; font-weight: 500; }

.friend-progress {
  display: flex;
  gap: 7px;
  margin-top: 26px;
  align-items: center;
}
.friend-progress i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}
.friend-progress i.is-done { background: rgba(255, 255, 255, 0.42); }
.friend-progress i.is-now {
  width: 22px;
  border-radius: 4px;
  background: var(--accent);
}

.friend-hint {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--ink-mute);
  cursor: pointer;
  background: none;
  border: 0;
}

/* ---------- Финал ---------- */

.ending {
  height: 100%;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(24px, 5vw, 60px);
}
.ending-card { width: min(700px, 100%); margin: auto; }
.ending-card h2 { margin-bottom: 6px; }
.ending-rows { display: grid; gap: 14px; margin: 22px 0; }
.ending-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.ending-row span {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-top: 2px;
}
.ending-row b { font-size: 16px; font-weight: 600; line-height: 1.45; }
.ending-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ending-after { margin-top: 18px; color: var(--ink-dim); font-size: 14.5px; }

/* ---------- Журнал ---------- */

.journal { height: 100%; overflow-y: auto; padding: clamp(24px, 5vw, 60px); display: flex; justify-content: center; }
.journal-inner { max-width: 820px; width: 100%; margin: auto; }
.journal-group { margin-top: 26px; }
.journal-group-title {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 14px;
}
.journal-list { display: grid; gap: 12px; margin-top: 24px; }
.journal-group .journal-list { margin-top: 0; }
.journal-item {
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.journal-item.is-open { border-color: rgba(255, 138, 61, 0.45); background: rgba(255, 138, 61, 0.06); }
.journal-q { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.journal-meta { font-size: 12.5px; color: var(--ink-mute); }
.journal-step { margin-top: 10px; font-size: 14px; color: var(--ink-dim); }
.journal-step b { color: var(--accent-soft); font-weight: 600; }
.journal-empty { padding: 34px; text-align: center; color: var(--ink-mute); }

/* ---------- Справка ---------- */

.doc { height: 100%; overflow-y: auto; padding: clamp(24px, 5vw, 60px); display: flex; justify-content: center; }
.doc-inner { max-width: 760px; width: 100%; margin: auto; }
.doc h2 { margin-bottom: 18px; }
.doc-block { margin-bottom: 26px; }
.doc-block h3 { margin-bottom: 7px; color: var(--accent-soft); }
.doc-block p { color: var(--ink-dim); margin: 0; }
.doc-steps { display: grid; gap: 16px; counter-reset: s; }
.doc-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.028);
}
.doc-step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 138, 61, 0.15);
  color: var(--accent-soft);
  font-weight: 700;
  font-size: 15px;
}
.doc-step p { color: var(--ink-dim); margin: 0; }

/* Сводка организатора */
.stats-form { display: flex; gap: 10px; margin: 18px 0 10px; flex-wrap: wrap; }
.stats-form .input { max-width: 320px; }
.stats-out { margin-top: 10px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}
.stats-card {
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}
.stats-card b { display: block; font-size: 30px; line-height: 1.1; color: var(--accent-soft); }
.stats-card span { font-size: 12.5px; color: var(--ink-mute); }
.stats-block { margin-bottom: 24px; }
.stats-block h4 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.stats-bar {
  display: grid;
  grid-template-columns: 190px 1fr 44px;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-size: 14px;
}
.stats-bar-label { color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-bar-track { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.stats-bar-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent)); }
.stats-bar-value { text-align: right; color: var(--ink-mute); font-variant-numeric: tabular-nums; }

/* Пилот */
.pilot-banner {
  max-width: 520px;
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(110, 231, 168, 0.3);
  background: rgba(110, 231, 168, 0.07);
}
.pilot-banner .tag {
  display: inline-block;
  margin-bottom: 10px;
  border-color: rgba(110, 231, 168, 0.4);
  color: var(--good);
}
.pilot-banner b { display: block; font-size: 16px; margin-bottom: 6px; }
.pilot-banner p { font-size: 13.5px; color: var(--ink-dim); margin-bottom: 10px; }
.pilot-banner ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-dim); }
.pilot-banner li { margin-bottom: 4px; }

.fb-form { margin-top: 8px; }
.fb-comment {
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  font-size: 14px;
  line-height: 1.45;
}
.fb-comment b { color: var(--accent-soft); font-weight: 600; }

.invite-text {
  margin: 0 0 12px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  color: var(--ink-dim);
}

.back-row { margin-top: 28px; }

@media (max-width: 640px) {
  .ending-row { grid-template-columns: 1fr; gap: 4px; }
  .cover-actions .btn { width: 100%; }
}

/* Подсказка «куда нажать» — заметная, но не кричащая. */
.friend-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(14, 19, 26, 0.72);
  color: var(--ink-dim);
  font-size: 13.5px;
  transition: all 0.15s ease;
}
.friend-hint:hover { color: var(--ink); border-color: rgba(255, 138, 61, 0.5); }
.friend-hint::after {
  content: "↳";
  color: var(--accent);
  animation: hint-bob 1.6s ease-in-out infinite;
}
@keyframes hint-bob {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}
.friend-hint[hidden] { display: none; }

/* Низкие окна (ноутбуки 1366×768 и меньше): всё влезает без обрезки. */
@media (max-height: 860px) {
  .cover { padding: 20px clamp(24px, 5vw, 64px) 24px; }
  .cover h1 { font-size: clamp(34px, 4.4vw, 52px); }
  .cover-part { margin-bottom: 12px; }
  .cover-lead { margin-bottom: 16px; font-size: 14.5px; }
  .cover-actions { gap: 8px; }
  .cover-actions .btn { min-height: 44px; }
  .cover-note { margin-top: 14px; font-size: 12px; }
  .pilot-banner { margin-bottom: 14px; padding: 12px 14px; }
  .pilot-banner .tag { margin-bottom: 6px; }
  .pilot-banner p { margin-bottom: 6px; font-size: 12.5px; }
  .pilot-banner ul { font-size: 12.5px; }
  .pilot-banner li { margin-bottom: 2px; }
}

/* Низкие окна: вступление ужимается, «Дальше» остаётся на экране. */
@media (max-height: 800px) and (min-width: 720px) {
  .intro { padding: 14px clamp(20px, 4vw, 44px); }
  .intro-card { padding: 22px 24px; }
  .intro-card h2 { font-size: 25px; margin-bottom: 4px; }
  .intro-card p.dim.small { font-size: 12.5px; }
  .intro-grid { gap: 12px; }
  .chip-row { gap: 6px; }
  .chip { padding: 7px 12px; font-size: 13px; }
  .intro-actions { margin-top: 0; }
  .panel-note { font-size: 12px; }
}
