:root {
  --bg: #0e1115;
  --panel: rgba(16, 18, 21, 0.82);
  --panel-soft: rgba(23, 24, 28, 0.7);
  --panel-edge: rgba(214, 191, 145, 0.18);
  --text: #f1ede4;
  --muted: #b8aa92;
  --dim: #8c8373;
  --wine: #6a1f24;
  --wine-soft: #8e3233;
  --ash: #59616a;
  --gold: #c0a16e;
  --gold-soft: #8c6e42;
  --ink: #171a1f;
  --danger: #7f463b;
  --success: #5d725e;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --ui-font: "Songti SC", "STSong", "Baskerville", "Times New Roman", serif;
  --display-font: "Bodoni 72", "Songti SC", "STSong", serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui-font);
}

body {
  position: relative;
  overflow-x: hidden;
}

button {
  font: inherit;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  padding: 28px;
}

.backdrop,
.backdrop-scrim {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.backdrop {
  background:
    radial-gradient(circle at top left, rgba(144, 60, 55, 0.18), transparent 32%),
    radial-gradient(circle at bottom right, rgba(209, 161, 96, 0.12), transparent 28%),
    center / cover no-repeat;
  filter: saturate(0.9) brightness(0.7);
  transform: scale(1.04);
}

.backdrop-scrim {
  background:
    linear-gradient(135deg, rgba(10, 12, 15, 0.72), rgba(10, 12, 15, 0.46)),
    linear-gradient(to bottom, rgba(6, 8, 10, 0.2), rgba(6, 8, 10, 0.82));
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto 22px;
  max-width: 1500px;
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-kicker {
  letter-spacing: 0.28em;
  font-size: 12px;
  color: rgba(241, 237, 228, 0.56);
}

.brand-title {
  font-family: var(--display-font);
  font-size: 32px;
  letter-spacing: 0.06em;
}

.chapter-pill {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(28, 30, 35, 0.72);
  border: 1px solid rgba(214, 191, 145, 0.16);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.chrome-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(214, 191, 145, 0.22);
  background: linear-gradient(180deg, rgba(50, 26, 26, 0.8), rgba(24, 20, 22, 0.86));
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  text-align: center;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.chrome-button:hover {
  transform: translateY(-1px);
  border-color: rgba(214, 191, 145, 0.4);
}

.chrome-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  border-color: rgba(214, 191, 145, 0.14);
}

.chrome-button.ghost {
  background: rgba(24, 26, 30, 0.82);
  color: var(--muted);
}

.main-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  margin: 0 auto;
  max-width: 1500px;
}

.stage-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 22px;
  align-items: stretch;
  min-height: calc(100vh - 132px);
}

.scene-visual,
.scene-card,
.ledger-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--panel-edge);
  box-shadow: var(--shadow);
}

.scene-visual {
  position: relative;
  min-height: clamp(360px, 58vh, 720px);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.44)),
    center / cover no-repeat;
}

.scene-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.06), transparent 32%, rgba(0, 0, 0, 0.5) 100%),
    radial-gradient(circle at bottom left, rgba(0, 0, 0, 0.2), transparent 36%);
}

.scene-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(18, 25, 32, 0.32), rgba(65, 21, 23, 0.24)),
    linear-gradient(to top, rgba(9, 11, 14, 0.42), transparent 40%);
}

.portrait {
  position: absolute;
  inset: auto 5% 0 auto;
  width: min(78%, 560px);
  max-height: 94%;
  object-fit: contain;
  object-position: right bottom;
  z-index: 1;
  filter: drop-shadow(0 32px 48px rgba(0, 0, 0, 0.5));
}

.portrait.hidden {
  display: none;
}

.scene-card {
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(19, 20, 24, 0.9), rgba(13, 15, 18, 0.92)),
    linear-gradient(135deg, rgba(141, 56, 51, 0.08), transparent 40%);
  padding: 28px 28px 24px;
}

.scene-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(241, 237, 228, 0.06);
  color: var(--muted);
  font-size: 13px;
}

.meta-item.objective {
  background: rgba(129, 38, 42, 0.22);
  color: #e8d6bf;
}

.scene-title {
  margin: 0 0 14px;
  font-family: var(--display-font);
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0.03em;
}

.scene-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 240px;
  color: rgba(241, 237, 228, 0.93);
}

.line-block {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(214, 191, 145, 0.08);
}

.line-block.narration {
  background: rgba(255, 255, 255, 0.02);
}

.line-speaker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.line-text {
  font-size: 17px;
  line-height: 1.8;
  color: rgba(241, 237, 228, 0.92);
}

.interactive-area {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.choice-grid,
.option-grid,
.deduction-grid {
  display: grid;
  gap: 12px;
}

.choice-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.option-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.deduction-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.choice-button,
.option-card,
.deduction-card,
.action-button {
  border: 1px solid rgba(214, 191, 145, 0.18);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(72, 31, 33, 0.28), rgba(20, 21, 25, 0.92)),
    rgba(18, 19, 22, 0.84);
  color: var(--text);
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.clue-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.choice-button:hover,
.option-card:hover,
.deduction-card:hover,
.action-button:hover {
  transform: translateY(-2px);
  border-color: rgba(214, 191, 145, 0.42);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.choice-button:disabled,
.option-card:disabled,
.deduction-card:disabled,
.action-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  border-color: rgba(214, 191, 145, 0.14);
  box-shadow: none;
}

.choice-button-title,
.option-title,
.deduction-title {
  display: block;
  margin-bottom: 8px;
  color: #f0e2c6;
  font-size: 17px;
}

.choice-button-copy,
.option-copy,
.deduction-copy {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.option-card.selected,
.deduction-card.selected {
  border-color: rgba(214, 191, 145, 0.56);
  background:
    linear-gradient(180deg, rgba(122, 40, 42, 0.4), rgba(26, 22, 24, 0.96)),
    rgba(16, 18, 21, 0.94);
}

.option-card.disabled {
  opacity: 0.42;
  cursor: default;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.group-title {
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 0.1em;
}

.feedback-box {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(214, 191, 145, 0.14);
  color: var(--muted);
  line-height: 1.8;
}

.feedback-box.strong {
  background: rgba(81, 111, 86, 0.14);
  border-color: rgba(93, 114, 94, 0.34);
}

.feedback-box.warn {
  background: rgba(122, 70, 59, 0.18);
  border-color: rgba(127, 70, 59, 0.34);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.action-button {
  min-width: 168px;
}

.action-button.primary {
  background:
    linear-gradient(180deg, rgba(124, 39, 40, 0.52), rgba(34, 24, 26, 0.98)),
    rgba(14, 16, 18, 0.98);
}

.action-button.secondary {
  background: rgba(18, 20, 24, 0.88);
}

.ledger-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ledger-card {
  background:
    linear-gradient(180deg, rgba(16, 18, 22, 0.88), rgba(11, 13, 16, 0.94)),
    linear-gradient(135deg, rgba(140, 54, 51, 0.08), transparent 34%);
  padding: 20px;
}

.ledger-title {
  margin-bottom: 14px;
  color: #e8d6bf;
  font-size: 15px;
  letter-spacing: 0.12em;
}

.ledger-fold {
  padding: 0;
}

.ledger-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}

.ledger-summary::-webkit-details-marker {
  display: none;
}

.ledger-summary::marker {
  content: "";
}

.ledger-summary::after {
  content: "展开";
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.ledger-fold[open] .ledger-summary::after {
  content: "收起";
  color: var(--gold);
}

.ledger-fold .ledger-title {
  margin: 0;
}

.ledger-fold-body {
  padding: 0 20px 20px;
}

.meter-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.meter-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 32px;
  gap: 10px;
  align-items: center;
}

.meter-label,
.meter-value {
  color: var(--muted);
  font-size: 14px;
}

.meter-value {
  text-align: right;
}

.meter-note {
  margin-top: 14px;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.7;
}

.meter-track {
  position: relative;
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.meter-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 180ms ease;
}

.meter-fill.poise {
  background: linear-gradient(90deg, #b89963, #e1c488);
}

.meter-fill.alert {
  background: linear-gradient(90deg, #7d3340, #bf5f4d);
}

.meter-fill.injury {
  background: linear-gradient(90deg, #5c6874, #a5b0ba);
}

.meter-fill.relation {
  background: linear-gradient(90deg, #35536b, #7f9eb1);
}

.relation-track {
  background: rgba(53, 83, 107, 0.22);
}

.clue-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clue-item {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(214, 191, 145, 0.1);
}

.clue-item:hover {
  border-color: rgba(214, 191, 145, 0.36);
}

.clue-name {
  color: #f0e2c6;
  font-size: 15px;
  margin-bottom: 4px;
}

.clue-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.status-note {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  line-height: 1.62;
  font-size: 14px;
}

.help-copy {
  color: var(--muted);
  line-height: 1.8;
  font-size: 15px;
}

.progress-note {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.progress-current {
  color: #f0e2c6;
  font-size: 15px;
  line-height: 1.7;
}

.progress-path {
  color: var(--dim);
  font-size: 13px;
  line-height: 1.7;
}

.progress-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-step {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(214, 191, 145, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: var(--dim);
  font-size: 13px;
  line-height: 1.6;
}

.progress-step.current {
  border-color: rgba(214, 191, 145, 0.34);
  background: rgba(122, 40, 42, 0.16);
  color: #f0e2c6;
}

.progress-step.done {
  color: var(--muted);
}

.reading-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(214, 191, 145, 0.12);
}

.reading-title {
  color: #f0e2c6;
  font-size: 16px;
}

.reading-copy {
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

.cover-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cover-brief-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.cover-brief-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(58, 25, 28, 0.22), rgba(16, 18, 22, 0.92)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(214, 191, 145, 0.14);
}

.cover-brief-title {
  margin-bottom: 8px;
  color: #f0e2c6;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.cover-brief-copy {
  color: var(--muted);
  line-height: 1.75;
  font-size: 14px;
}

.cover-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cover-chip {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 13px;
}

.ending-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ending-pill {
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(214, 191, 145, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 13px;
}

.ending-pill.unlocked {
  border-color: rgba(214, 191, 145, 0.48);
  color: #f0e2c6;
  background: rgba(122, 40, 42, 0.18);
}

.summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.summary-card {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(214, 191, 145, 0.12);
}

.summary-card-label {
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-card-value {
  margin-top: 6px;
  color: #f0e2c6;
  font-size: 18px;
}

.preview-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(214, 191, 145, 0.12);
}

.preview-copy {
  color: var(--muted);
  line-height: 1.8;
}

.preview-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 14px;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 7, 10, 0.72);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(940px, 100%);
  max-height: min(88vh, 960px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(214, 191, 145, 0.18);
  background:
    linear-gradient(180deg, rgba(18, 20, 24, 0.96), rgba(11, 13, 16, 0.98)),
    linear-gradient(135deg, rgba(141, 56, 51, 0.08), transparent 38%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(214, 191, 145, 0.1);
}

.modal-kicker {
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.modal-title {
  font-family: var(--display-font);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.14;
}

.modal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 24px 0;
}

.modal-body {
  overflow: auto;
  padding: 18px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-intro {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(214, 191, 145, 0.1);
  color: var(--muted);
  line-height: 1.8;
}

.info-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.fold-card {
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(58, 25, 28, 0.18), rgba(16, 18, 22, 0.94)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(214, 191, 145, 0.12);
  overflow: hidden;
}

.fold-card.current {
  border-color: rgba(214, 191, 145, 0.38);
  background:
    linear-gradient(180deg, rgba(98, 36, 40, 0.24), rgba(16, 18, 22, 0.94)),
    rgba(255, 255, 255, 0.04);
}

.fold-card.locked {
  opacity: 0.6;
  background: rgba(255, 255, 255, 0.02);
}

.fold-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.fold-summary::-webkit-details-marker {
  display: none;
}

.fold-summary::marker {
  content: "";
}

.fold-summary::after {
  content: "展开";
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.fold-card[open] .fold-summary::after {
  content: "收起";
  color: var(--gold);
}

.fold-meta {
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.fold-title {
  color: #f0e2c6;
  font-size: 15px;
}

.fold-content {
  padding: 0 16px 16px;
  border-top: 1px solid rgba(214, 191, 145, 0.1);
}

.fold-copy {
  padding-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.archive-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(214, 191, 145, 0.1);
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(122, 40, 42, 0.22);
  color: #f0e2c6;
  font-size: 18px;
}

.step-title {
  margin-bottom: 6px;
  color: #f0e2c6;
  font-size: 15px;
}

.step-copy {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

@media (max-width: 1260px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .stage-panel {
    min-height: auto;
  }

  .ledger-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .app-shell {
    padding: 18px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .chapter-pill {
    width: 100%;
  }

  .topbar-actions {
    width: 100%;
  }

  .chrome-button {
    flex: 1 1 180px;
  }

  .stage-panel {
    grid-template-columns: 1fr;
  }

  .scene-visual {
    min-height: 520px;
  }

  .portrait {
    width: min(84%, 420px);
    right: 2%;
  }
}

@media (max-width: 760px) {
  .scene-meta {
    flex-direction: column;
  }

  .meta-item {
    width: 100%;
  }

  .choice-grid,
  .option-grid,
  .deduction-grid,
  .cover-brief-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .ledger-panel {
    grid-template-columns: 1fr;
  }

  .action-button {
    width: 100%;
    min-width: 0;
  }

  .modal-layer {
    padding: 12px;
  }

  .modal-header {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-tabs {
    padding: 14px 18px 0;
  }

  .modal-body {
    padding: 16px 18px 20px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .brand-title {
    font-size: 28px;
  }

  .topbar {
    gap: 12px;
    margin-bottom: 18px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .scene-card {
    padding: 20px 18px 18px;
  }

  .scene-title {
    font-size: 30px;
  }

  .scene-visual {
    min-height: 420px;
  }

  .portrait {
    width: min(94%, 360px);
  }

  .meter-row {
    grid-template-columns: 70px minmax(0, 1fr) 28px;
  }

  .line-text {
    font-size: 16px;
    line-height: 1.72;
  }

  .cover-chip,
  .ending-pill {
    width: 100%;
    justify-content: center;
  }

  .preview-card {
    grid-template-columns: 1fr;
  }

  .step-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .app-shell {
    padding: 12px;
  }

  .brand-title {
    font-size: 24px;
  }

  .topbar-actions {
    grid-template-columns: 1fr;
  }

  .scene-title {
    font-size: 26px;
  }

  .scene-visual {
    min-height: 320px;
  }

  .portrait {
    width: min(100%, 300px);
    right: -2%;
  }

  .meter-row {
    grid-template-columns: 64px minmax(0, 1fr) 26px;
    gap: 8px;
  }
}
