/* Ния — чистовая отделка. Слой намеренно отделён от сцен и их таймингов.
 * Approach: unslop by Damir Sokolovsky (@heydamir), CC BY 4.0.
 * https://github.com/heydamir/unslop
 * Сохраняем утверждённые цвета, тексты, сцены, эффекты и анимации питомцев.
 */
:root {
  --surface-low: #24133e;
  --surface: #301d4a;
  --surface-raised: #3c2858;
  --edge: #f7eaff29;
  --text-secondary: #e2d4f9;
  --text-meta: #cbb8e0;
  --control-radius: 12px;
  --panel-radius: 24px;
  --feedback: 180ms ease-out;
}

/* Ритм: связанные вещи ближе, разделы — на общей шкале. */
.wrap {
  width: min(1240px, calc(100% - 40px));
}
.header-actions {
  gap: 12px;
}
.hero {
  padding-bottom: 24px;
}
.intent-compass {
  padding-top: 16px;
  margin-top: 24px;
}
.intent-compass > div {
  gap: 8px;
  margin-top: 12px;
}
.intent-compass p {
  margin-top: 12px;
}
.pet-picker {
  gap: 4px;
  padding: 4px;
}
.stage-bottom {
  gap: 16px;
  margin-bottom: 16px;
}
.pet-speech {
  padding: 12px 16px;
  margin-bottom: 16px;
}
.game-layout,
.world-grid,
.moderation-grid {
  gap: 32px;
}
.story-stage {
  gap: 24px;
}
.message-top,
.mod-head {
  padding: 20px;
}
.game-message-body,
.mod-messages {
  padding: 20px;
}
.game-score {
  gap: 12px;
  margin-bottom: 20px;
}
.chat-header {
  gap: 12px;
  padding: 20px;
}
.chat-body {
  gap: 16px;
  padding: 24px 20px;
}
.feature-list article {
  gap: 20px;
  padding-block: 24px;
}
.future-row {
  gap: 16px;
  padding-block: 24px;
}

/* Богатый цвет остаётся у персонажей и в сценах, не на каждой рамке. */
.header,
.footer,
.chapter-line,
.ending,
.future-row {
  border-color: var(--edge);
}
.game-message,
.moderation-chat,
.development-note {
  border-color: var(--edge);
  background: var(--surface);
  box-shadow: none;
}
.message-top,
.mod-head {
  background: var(--surface-raised);
}
.game-tabs,
.pet-picker,
.intent-compass button {
  background: var(--surface-low);
  border-color: var(--edge);
}
.game-tabs button.active {
  background: var(--accent);
  color: #250b46;
}
.pet-choice.active {
  box-shadow: none;
}
.pet-speech {
  background: var(--surface);
  border-color: var(--edge);
}
.story-object {
  border-color: var(--edge);
  box-shadow: none;
}
.story-game,
.story-pet {
  background: #3b205d;
}
.story-order {
  background: #deefae;
}
.story-copy h2 > span.lit {
  text-shadow: none;
}
.world {
  background: #fff5ff;
  border-top: 1px solid #2d0b4d24;
}
.chat {
  border-color: #2d0b4d29;
  box-shadow: none;
}
.chat-reaction {
  background: #f3e6fa;
}
.development-note {
  color: var(--text-secondary);
}
.living-plate.plate-visible {
  border-top-color: var(--edge);
  box-shadow: none;
}
.scene-dock {
  background: #28133ff5;
  border-color: var(--edge);
  box-shadow: 0 8px 24px #0b001d40;
}
.scene-dock > button {
  background: var(--surface-raised);
}
.sound-control > button,
.sound-panel {
  background: var(--surface-low);
  border-color: var(--edge);
}
.logo-star b {
  filter: none;
}
.button.primary,
.button.primary:hover {
  box-shadow: none;
}
.button.primary:hover {
  background: var(--accent);
  filter: brightness(1.06);
}
.care-button:hover {
  box-shadow: none;
}

/* Три роли текста; мелкие подписи больше не зависят от трекинга. */
body {
  font-family: "Segoe UI", Arial, sans-serif;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.01em;
  line-height: 1.5;
}
.hero .eyebrow {
  row-gap: 4px;
}
.pet-overline,
.demo-note,
.stage-note,
.game-footnote,
.message-top div span,
.message-tag,
.game-score,
.scenario-note,
.mod-head > span:last-child,
.mod-msg b,
.mod-pending,
.mod-bottom,
.chat-header span,
.chat-time,
.chat-reaction,
.chat-footer,
.chapter-line,
.story-card-number,
.story-bottom,
.development-note,
.end-note,
.footer > span,
.sound-panel label,
.sound-panel small,
.intent-compass > span,
.intent-compass p,
.scene-select-wrap > span,
.gecko-scene-label {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0;
}
.pet-overline,
.demo-note,
.intent-compass > span,
.intent-compass p,
.scene-select-wrap > span {
  color: var(--text-meta);
}
.story-card-number {
  color: #e8d9f7;
}
.story-order .story-card-number {
  color: #402553;
}
.story-object p {
  font-size: 16px;
  line-height: 1.5;
}
.chat-header strong,
.message-top strong {
  font-size: 16px;
}
.story-object h3,
.feature-list h3 {
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.game-score,
.story-card-number,
.feature-number,
#shot-count,
#scene-counter,
.story-bottom {
  font-variant-numeric: tabular-nums;
}
.maker-brand small,
.footer .maker-brand small,
.footer .maker-caption {
  font-size: 10px;
  letter-spacing: 0;
}

/* Компоненты: не все элементы — капсулы. Вложенные радиусы согласованы. */
.button,
.care-button,
.intent-compass button,
.sound-control > button,
.scene-dock > button {
  border-radius: var(--control-radius);
}
.pet-picker,
.tabs,
.game-tabs {
  border-radius: 16px;
}
.pet-choice,
.tab,
.game-tabs button {
  border-radius: 12px;
}
.story-object,
.game-message,
.moderation-chat,
.chat,
.secret-card {
  border-radius: var(--panel-radius);
}
.sound-panel,
.development-note {
  border-radius: 16px;
}
.message-tag {
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--text-meta);
}
.scene-dock {
  border-radius: 20px;
  gap: 8px;
  padding: 8px;
}
.scene-dock > button {
  min-height: 48px;
  width: 44px;
  flex-shrink: 0;
}
.scene-select-wrap {
  padding-inline: 4px;
}
.scene-select-wrap select {
  min-height: 32px;
  line-height: 1.5;
}
.sound-control {
  gap: 4px;
}
.sound-control > button,
.sound-control > button + button {
  width: 44px;
  min-height: 44px;
}
.intent-compass button,
.chat-footer button {
  min-height: 44px;
}
.pet-choice {
  font-size: 12px;
}
.chat-footer {
  gap: 16px;
  padding: 12px 16px;
}
.chat-footer button {
  font: inherit;
  color: #65228b;
  max-width: 100px;
  flex-shrink: 0;
}
.secret-crystal {
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
}

/* Общая обратная связь. Сцены и пятисекундная заставка не переопределяются. */
.button {
  transition:
    background-color var(--feedback),
    filter var(--feedback),
    transform var(--feedback);
}
.button:hover {
  transform: none;
}
.story-steps button:hover {
  transform: none;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
.world button:focus-visible,
.world a:focus-visible {
  outline-color: #65228b;
}
@media (min-width: 760px) {
  .wrap {
    width: min(1240px, calc(100% - 96px));
  }
  .game-layout,
  .world-grid,
  .moderation-grid {
    gap: 64px;
  }
  .message-top,
  .game-message-body,
  .mod-messages {
    padding: 24px;
  }
  .story-object {
    padding: 32px 24px;
  }
}
@media (max-width: 759px) {
  .header-actions {
    gap: 8px;
  }
  .header nav {
    display: none;
  }
  .support-top {
    font-size: 12px;
  }
  .hero .eyebrow {
    font-size: 12px;
  }
  .hero .eyebrow .maker-brand small {
    font-size: 10px;
  }
  .intent-compass {
    margin-top: 16px;
  }
  .story-object {
    padding: 24px;
  }
  .scene-dock {
    width: min(340px, calc(100% - 24px));
  }
  .scene-select-wrap > span {
    font-size: 12px;
  }
  .story-steps {
    gap: 8px;
  }
  .story-steps button {
    font-size: 12px;
    padding-inline: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
