.story-hero {
  padding: 34px 24px 18px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(130deg, rgba(255, 126, 95, 0.18), rgba(77, 228, 247, 0.08) 60%, rgba(0, 0, 0, 0.05));
}

.story-hero h1,
.story-hero h2,
.story-hero h3 {
  margin: 0;
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
}

.story-meta {
  margin-top: 10px;
  color: var(--muted);
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.story-body {
  padding: clamp(18px, 3vw, 30px);
}

.scene-title {
  font-family: var(--font-heading);
  font-size: clamp(1.95rem, 3vw, 3.25rem);
  margin-bottom: 15px;
  color: var(--accent);
  text-shadow: 0 0 22px rgba(255, 126, 95, 0.35);
}

.scene-text {
  line-height: 1.7;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  margin-bottom: 18px;
  max-width: 70ch;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 16px 18px;
}

.scene-text p {
  margin: 0 0 0.9rem;
}

.choice-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
}

.choice-button {
  width: 100%;
  text-align: left;
  background:
    linear-gradient(120deg, rgba(255, 126, 95, 0.14), rgba(77, 228, 247, 0.08) 50%, rgba(255, 255, 255, 0.02));
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text);
  padding: 18px 20px;
  min-height: 58px;
}

.choice-button:hover {
  box-shadow: 0 10px 24px rgba(255, 126, 95, 0.25);
}

.choice-button.is-locked {
  cursor: not-allowed;
  opacity: 0.58;
  border-style: dashed;
}

.choice-button.is-locked:hover {
  box-shadow: none;
}

.choice-lock {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.03rem;
}

.choice-button .choice-label {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

.choice-button .choice-next {
  display: block;
  font-size: 0.73rem;
  letter-spacing: 0.06rem;
  text-transform: uppercase;
  color: var(--muted);
}

.story-card {
  padding: 24px;
}

.story-card h3 {
  margin: 0 0 12px;
  font-size: 1.45rem;
  font-family: var(--font-heading);
  color: #ffe2c7;
}

.story-card p {
  color: var(--muted);
  margin: 0 0 14px;
  font-size: 1.04rem;
}

.story-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.story-card-setting {
  margin-top: -6px !important;
  color: var(--accent-cyan) !important;
  font-size: 0.92rem !important;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.story-card-actions {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.story-card-actions .story-button {
  flex: 1;
}

.story-status {
  margin: 0 0 24px;
  padding: 14px;
  border: 1px solid rgba(77, 228, 247, 0.22);
  border-radius: 14px;
  background: rgba(7, 9, 20, 0.32);
}

.story-status-heading {
  margin-bottom: 10px;
  color: var(--accent-cyan);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
}

.story-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.story-status-item {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.story-status-item strong {
  color: var(--text);
}

.status-change {
  margin-left: 6px;
  font-size: 0.78rem;
}

.status-change.is-positive { color: var(--ok); }
.status-change.is-negative { color: var(--danger); }

.status-bar {
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
}

.status-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent));
  transition: width 0.2s ease;
}

.story-button {
  width: 100%;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255, 126, 95, 0.35), rgba(255, 209, 102, 0.25));
  border-color: rgba(255, 209, 102, 0.44);
  color: #fff6ea;
  font-weight: 700;
}

.ending-panel {
  padding: 26px;
  border: 1px solid rgba(255, 126, 95, 0.42);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 126, 95, 0.12), rgba(17, 15, 28, 0.94)),
    radial-gradient(circle at 88% 0, rgba(77, 228, 247, 0.17), transparent 40%);
}

.ending-discovery {
  display: inline-flex;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
}

.ending-discovery.is-new {
  color: var(--accent-strong);
  border-color: rgba(255, 209, 102, 0.52);
  background: rgba(255, 126, 95, 0.14);
  box-shadow: 0 0 18px rgba(255, 126, 95, 0.18);
}

.ending-title {
  color: var(--accent);
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 12px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.status-pill {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.debug-panel {
  border: 1px dashed rgba(110, 231, 183, 0.6);
  background: rgba(16, 36, 28, 0.7);
  padding: 12px 14px;
  margin-top: 18px;
  border-radius: 12px;
}

.debug-panel h4 {
  margin: 0 0 8px;
  color: var(--ok);
}

.debug-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.debug-value {
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(110, 231, 183, 0.22);
}

.empty-state {
  padding: 20px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.end-state {
  padding: 22px;
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  background: rgba(255, 126, 95, 0.08);
  border: 1px solid rgba(255, 126, 95, 0.35);
  border-radius: 14px;
}
