.storybook-frame,
.storybook-frame * {
  box-sizing: border-box;
}

.storybook-frame {
  --ink: #243332;
  --muted: #62716e;
  --paper: #fffdf7;
  --paper-soft: #f5efe2;
  --line: #d3c7b5;
  --teal: #7bb6a5;
  --blue: #89b7da;
  --coral: #df927b;
  --amber: #e9c66f;
  --green: #b8d8bf;
  --cream: #fff7df;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  text-align: left;
  width: 100%;
  height: 100%;
  min-height: 680px;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 0;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 253, 247, .98) 0%, rgba(255, 253, 247, .98) 53%, rgba(245, 239, 226, .95) 53%, rgba(245, 239, 226, .95) 100%);
  border: 2px solid var(--line);
  box-shadow: 0 18px 44px rgba(45, 35, 22, .18);
}

.storybook-slide > h2:first-child {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.storybook-frame::after {
  content: "";
  position: absolute;
  inset: 22px;
  border: 2px dashed rgba(128, 115, 96, .32);
  pointer-events: none;
}

.slide-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 54px 48px 68px 62px;
}

.kicker {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 24px;
  font-weight: 800;
}

.slide-title {
  margin: 0;
  color: var(--ink);
  font-size: 42px;
  line-height: 1.16;
  letter-spacing: 0;
  font-weight: 900;
}

.slide-lead {
  margin: 22px 0 0;
  max-width: 19em;
  color: #344644;
  font-size: 25px;
  line-height: 1.48;
  font-weight: 600;
}

.storybook-list {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
  max-width: 31em;
}

.storybook-list li {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 14px;
  align-items: start;
  color: #2f4441;
  font-size: 25px;
  line-height: 1.36;
  font-weight: 700;
}

.storybook-list li code {
  display: inline;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: #465fb0;
  background: rgba(70, 95, 176, .08);
  border-radius: 6px;
  padding: 0 .16em;
  font-size: .9em;
}

.storybook-list li::before {
  content: "";
  width: 14px;
  height: 14px;
  margin-top: .45em;
  border: 4px solid #243332;
  border-radius: 50%;
  background: var(--teal);
}

.slide-picture {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  place-items: center;
  padding: 46px 58px 58px 28px;
}

.illustration-picture {
  padding: 26px 34px 34px 18px;
}

.figure-only {
  display: grid;
  place-items: center;
  grid-template-columns: 1fr;
  padding: 18px;
  background: #fffdf7;
}

.figure-only::after {
  inset: 22px;
}

.markdown-figure {
  display: block;
  width: min(100%, 1080px);
  max-height: 540px;
  object-fit: contain;
  margin: 0;
}

.slide-illustration {
  display: block;
  width: min(100%, 640px);
  max-height: 470px;
  object-fit: contain;
  border-radius: 22px;
  box-shadow: 0 12px 0 rgba(36, 51, 50, .12);
}

.prompt-only {
  display: grid;
  grid-template-columns: minmax(250px, 360px) 1fr;
  gap: 26px;
  padding: 46px 52px;
  align-items: center;
  background: #fffdf7;
}

.prompt-only::after {
  inset: 22px;
}

.prompt-only-copy {
  min-width: 0;
}

.prompt-only .slide-title {
  font-size: 38px;
  line-height: 1.2;
}

.large-prompt {
  max-width: none;
  max-height: 610px;
  font-size: 14px;
  line-height: 1.28;
}

.compact-prompt {
  max-height: 570px;
  padding: 14px;
  font-size: 12px;
  line-height: 1.12;
}

.story-card,
.story-folder,
.story-note,
.story-box {
  border: 4px solid var(--ink);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 12px 0 rgba(70, 61, 49, .16);
}

.story-card {
  min-width: 170px;
  padding: 24px 28px;
  text-align: center;
  font-size: 28px;
  font-weight: 900;
}

.story-card p {
  margin: 0;
}

.story-card.small {
  min-width: 140px;
  padding: 18px 20px;
  font-size: 24px;
}

.story-card.blue {
  background: #d9ecfb;
}

.story-card.green {
  background: #dceee1;
}

.story-card.amber {
  background: #f8df8d;
}

.story-card.coral {
  background: #f7d7ca;
}

.story-arrow {
  width: 82px;
  height: 18px;
  position: relative;
  background: var(--ink);
  border-radius: 999px;
}

.story-arrow::after {
  content: "";
  position: absolute;
  right: -12px;
  top: -13px;
  border-left: 28px solid var(--ink);
  border-top: 22px solid transparent;
  border-bottom: 22px solid transparent;
}

.story-person {
  width: 108px;
  height: 142px;
  position: relative;
}

.story-person::before {
  content: "";
  position: absolute;
  left: 30px;
  top: 0;
  width: 56px;
  height: 56px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: #f2c29d;
}

.story-person::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 54px;
  width: 94px;
  height: 84px;
  border: 4px solid var(--ink);
  border-radius: 42px 42px 18px 18px;
  background: var(--teal);
}

.visual-menu,
.visual-tools,
.visual-prompt,
.visual-flow,
.visual-rename,
.visual-folder,
.visual-note,
.visual-search,
.visual-submit {
  width: 100%;
  max-width: 500px;
  min-height: 460px;
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 28px;
}

.visual-menu {
  grid-template-columns: 1fr 1fr;
}

.visual-menu .story-card:nth-child(5) {
  grid-column: 1 / -1;
}

.visual-tools {
  grid-template-columns: 1fr 1fr;
}

.visual-tools .wide {
  grid-column: 1 / -1;
}

.visual-prompt {
  grid-template-columns: 1fr;
}

.prompt-stack {
  width: 420px;
  display: grid;
  gap: 18px;
}

.prompt-line {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: center;
}

.prompt-line.mapped {
  grid-template-columns: 170px 1fr;
}

.prompt-line .bar {
  height: 18px;
  border-radius: 999px;
  background: var(--ink);
}

.prompt-source {
  width: 100%;
  min-height: 62px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 4px solid var(--ink);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 8px 0 rgba(70, 61, 49, .14);
  padding: 10px 14px;
  color: #2f4441;
  font-size: 18px;
  line-height: 1.24;
  font-weight: 900;
}

.visual-flow {
  grid-template-columns: auto auto auto;
}

.visual-flow .story-person {
  grid-column: 1 / -1;
}

.visual-rename {
  grid-template-columns: 1fr auto 1fr;
}

.visual-rename .bottom {
  grid-column: 1 / -1;
}

.story-folder {
  width: 390px;
  height: 250px;
  position: relative;
  background: #e4b85f;
}

.story-folder::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -46px;
  width: 170px;
  height: 64px;
  border: 4px solid var(--ink);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: #e4b85f;
}

.folder-label {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  font-size: 34px;
  font-weight: 900;
}

.visual-folder,
.visual-note,
.visual-search,
.visual-submit {
  grid-template-columns: 1fr;
}

.story-note {
  width: 380px;
  min-height: 300px;
  padding: 34px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.note-heading {
  font-size: 30px;
  font-weight: 900;
}

.note-line {
  height: 18px;
  border-radius: 999px;
  background: rgba(36, 51, 50, .75);
}

.note-line.short {
  width: 68%;
}

.search-scene {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 22px;
  align-items: center;
}

.submit-grid {
  width: 430px;
  display: grid;
  gap: 20px;
}

.submit-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: center;
}

.checkmark {
  width: 48px;
  height: 48px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--green);
  position: relative;
}

.checkmark::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 8px;
  width: 17px;
  height: 26px;
  border-right: 6px solid var(--ink);
  border-bottom: 6px solid var(--ink);
  transform: rotate(42deg);
}

.prompt-example {
  width: 100%;
  max-width: 520px;
  max-height: 570px;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
  border: 4px solid var(--ink);
  border-radius: 18px;
  background: #fffdf7;
  box-shadow: 0 12px 0 rgba(70, 61, 49, .16);
  padding: 20px;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 16px;
  line-height: 1.34;
}

.codex-difference-card {
  width: 100%;
  max-width: 520px;
  text-align: left;
  padding: 30px 34px;
}

.comparison-card-title {
  margin: 0 0 18px;
  text-align: center;
  font-size: 30px;
  font-weight: 900;
}

.comparison-card-list {
  margin: 0;
  padding-left: 24px;
  display: grid;
  gap: 14px;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 800;
}
