@import url("./demo-styles.css");

.demo-shell--story {
  padding-bottom: 200px;
}

.demo-shell--story .console-bar {
  background:
    radial-gradient(circle at top left, rgba(255, 90, 31, 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(52, 199, 255, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    var(--panel);
}

.story-stage {
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 46%),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.story-scene-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.story-scene-button {
  display: grid;
  gap: 6px;
  text-align: left;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  cursor: pointer;
}

.story-scene-button span,
.story-lane-meta span {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
}

.story-scene-button strong {
  font-size: 1rem;
}

.story-scene-button--active {
  border-color: rgba(255, 90, 31, 0.5);
  background: rgba(255, 90, 31, 0.12);
}

.story-callout {
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 90, 31, 0.12), rgba(52, 199, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.story-callout h3,
.panel-story-copy {
  margin: 6px 0 0;
}

.story-callout p:last-child,
.panel-story-copy {
  color: var(--muted);
  line-height: 1.5;
}

.panel-card--muted {
  opacity: 0.68;
}

.panel-card--focus {
  border-color: rgba(255, 255, 255, 0.16);
}

.story-lane-meta {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.story-lane-meta strong {
  font-size: 0.96rem;
}

.demo-shell--story .footer-grid {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.demo-shell--story .footer-grid--compact {
  grid-template-columns: minmax(0, 1fr);
}

.demo-shell--story .footer-surface {
  padding: 8px 12px;
}

.demo-shell--story .footer-surface .section-heading {
  margin-bottom: 6px;
}

.demo-shell--story .control-group {
  padding: 8px 10px;
}

.demo-shell--story .control-group h3 {
  margin-bottom: 6px;
}

.demo-shell--story .action-list {
  gap: 4px;
}

.demo-shell--story .action-button {
  min-width: 136px;
  padding: 7px 9px;
}

.demo-shell--story .action-button--running,
.demo-shell--story .action-button--running:disabled {
  background: #9f1d1d;
  border-color: #cf3b3b;
  color: #fff2f2;
  opacity: 1;
  box-shadow: 0 0 0 1px rgba(255, 98, 98, 0.18), 0 10px 24px rgba(122, 16, 16, 0.28);
}

.demo-shell--story .action-button--running small {
  color: rgba(255, 242, 242, 0.86);
}

.demo-shell--story .action-button small {
  font-size: 0.72rem;
}

.demo-shell--story .panel-toolbar > div:first-child {
  min-height: 7.25rem;
}

.footer-tools {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: flex-end;
}

.footer-tool-button {
  min-width: 140px;
}

.log-popout-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(12px);
}

.log-popout {
  width: min(920px, 100%);
  max-height: min(78vh, 900px);
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(20, 20, 24, 0.98), rgba(12, 12, 14, 0.99)),
    var(--panel);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.log-popout__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.log-popout__head h3 {
  margin: 4px 0 0;
}

.log-popout pre {
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", ui-monospace, monospace;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--muted);
}

@media (max-width: 920px) {
  .story-scene-list {
    grid-template-columns: 1fr;
  }

  .demo-shell--story {
    padding-bottom: 250px;
  }

  .demo-shell--story .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-tools {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
