:root {
  color-scheme: dark;
  --app-height: 100dvh;
  --bg: #101116;
  --ink: #f9f7ef;
  --muted: #b8b6c8;
  --panel: #191a22;
  --panel-2: #222331;
  --line: rgba(255, 255, 255, 0.13);
  --coral: #ff5c7c;
  --teal: #17c3b2;
  --gold: #ffd166;
  --violet: #7c5cff;
  --good: #7be495;
  --danger: #ff8a6b;
  --shadow: 0 24px 70px rgba(0, 0, 0, .38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 92, 124, .2), transparent 26rem),
    radial-gradient(circle at 82% 8%, rgba(23, 195, 178, .18), transparent 24rem),
    linear-gradient(145deg, #101116, #171622 52%, #11151c);
  color: var(--ink);
  touch-action: manipulation;
}

#app {
  width: 100%;
  height: var(--app-height);
  min-height: var(--app-height);
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .52;
}

.shell {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: var(--app-height);
  min-height: var(--app-height);
  display: grid;
  grid-template-columns: minmax(320px, 450px) minmax(280px, 460px);
  gap: 28px;
  align-items: center;
  justify-content: center;
  padding: 28px;
  overflow: hidden;
}

.phone {
  position: relative;
  width: min(100%, 430px);
  max-width: 100vw;
  min-width: 0;
  height: min(860px, calc(var(--app-height) - 56px));
  max-height: calc(var(--app-height) - 56px);
  min-height: min(690px, var(--app-height));
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 30px;
  background: #111218;
  box-shadow: var(--shadow);
}

.phone::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 94px;
  height: 5px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, .24);
  z-index: 6;
}

.topbar,
.bottom-nav {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 18px 12px;
  background: rgba(17, 18, 24, .92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-top: max(18px, calc(env(safe-area-inset-top) + 12px));
}

.topbar-title {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.screen-title {
  margin: 0;
  overflow: hidden;
  font-size: 19px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.currency {
  display: flex;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.topbar-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  flex: 0 0 auto;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

.audio-btn {
  position: relative;
  width: 32px;
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, .07);
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

.audio-btn.is-on {
  border-color: rgba(23, 195, 178, .5);
  background: rgba(23, 195, 178, .14);
  color: #8cf4e9;
  box-shadow: 0 0 0 3px rgba(23, 195, 178, .08);
}

.audio-bars {
  width: 16px;
  height: 16px;
  display: block;
  border-bottom: 3px solid currentColor;
  border-left: 3px solid currentColor;
  border-radius: 2px;
  transform: skewY(-12deg);
}

.audio-bars::before,
.audio-bars::after {
  content: "";
  position: absolute;
  width: 3px;
  border-radius: 999px;
  background: currentColor;
}

.audio-bars::before {
  height: 8px;
  left: 12px;
  top: 11px;
}

.audio-bars::after {
  height: 13px;
  left: 18px;
  top: 6px;
}

.currency-btn {
  cursor: pointer;
}

.currency-long {
  display: none;
}

.currency-short {
  display: inline;
}

.topbar-title .eyebrow {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  min-width: 54px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.gold {
  border-color: rgba(255, 209, 102, .45);
  color: #ffe49a;
}

.pill.teal {
  border-color: rgba(23, 195, 178, .42);
  color: #8cf4e9;
}

.content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 10px max(12px, calc(env(safe-area-inset-bottom) + 8px));
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.nav-btn {
  min-width: 0;
  min-height: 48px;
  overflow: hidden;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.nav-btn[aria-current="page"] {
  background: rgba(255, 255, 255, .1);
  color: var(--ink);
}

.home {
  padding: 18px;
}

.feature-strip {
  display: grid;
  gap: 12px;
  padding-bottom: 18px;
}

.story-card {
  position: relative;
  display: grid;
  grid-template-columns: 118px 1fr;
  min-height: 168px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.story-card.featured {
  grid-template-columns: 1fr;
  min-height: 360px;
  align-content: end;
}

.cover {
  min-height: 168px;
  background-color: #222331;
  background-position: center;
  background-size: cover;
}

.story-card.featured .cover {
  position: absolute;
  inset: 0;
}

.story-card.featured::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(to top, rgba(16, 17, 22, .96), rgba(16, 17, 22, .46), transparent);
}

.story-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 14px;
}

.story-card.featured .story-copy {
  padding: 24px 18px 18px;
}

.story-copy h2,
.story-copy h3,
.side-panel h2,
.side-panel h3,
.closet h2,
.stats h2,
.store h2,
.log h2,
.chapter-card h2 {
  margin: 0;
  line-height: 1.06;
  letter-spacing: 0;
}

.story-copy h2 {
  font-size: 34px;
}

.story-copy h3 {
  font-size: 19px;
}

.story-copy p,
.side-panel p,
.form-note,
.small-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.season-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.season-meta span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid rgba(255, 209, 102, .28);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 209, 102, .1);
  color: #ffe49a;
  font-size: 11px;
  font-weight: 900;
}

.action-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.primary-btn,
.secondary-btn,
.choice-btn,
.ghost-btn {
  min-height: 44px;
  border-radius: 8px;
  font-weight: 900;
}

.primary-btn {
  padding: 0 16px;
  background: linear-gradient(135deg, var(--coral), var(--gold));
  color: #18141a;
}

.secondary-btn {
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .08);
  color: var(--ink);
}

.ghost-btn {
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
}

.library-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 12px;
}

.library-title h2 {
  margin: 0;
  font-size: 20px;
}

.story-list {
  display: grid;
  gap: 12px;
  padding-bottom: 12px;
}

.chapter-shelf {
  display: grid;
  gap: 12px;
  padding-bottom: 12px;
}

.image-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: -4px 0 16px;
}

.image-rail-card {
  position: relative;
  min-height: 114px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background-color: #222331;
  background-position: center top;
  background-size: cover;
}

.image-rail-card::after {
  content: "";
  position: absolute;
  inset: 42% 0 0;
  background: linear-gradient(to top, rgba(12, 13, 19, .88), transparent);
}

.image-rail-card span {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  color: #fff6d8;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
}

.chapter-tile {
  display: grid;
  grid-template-columns: 118px 1fr;
  min-height: 160px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(25, 26, 34, .82);
}

.chapter-thumb {
  min-height: 160px;
  background-color: #222331;
  background-position: center top;
  background-size: cover;
}

.chapter-tile-copy {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  padding: 13px;
}

.chapter-tile-copy h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.08;
}

.chapter-tile-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.setup,
.closet,
.stats,
.store,
.log,
.chapter-break {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.setup-hero {
  position: relative;
  isolation: isolate;
  min-height: 330px;
  display: grid;
  place-items: end center;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(rgba(20, 19, 30, .08), rgba(20, 19, 30, .78)),
    url("assets/painted/dressing.jpg") center top / cover;
}

.style-preview {
  display: grid;
  gap: 10px;
}

.style-preview-hero {
  min-height: 330px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background-color: #222331;
  background-position: center top;
  background-size: cover;
  box-shadow: inset 0 -110px 90px rgba(17, 18, 24, .78);
}

.style-preview-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.style-preview-strip div {
  position: relative;
  min-height: 104px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background-color: #222331;
  background-position: center;
  background-size: cover;
}

.style-preview-strip div::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(to top, rgba(12, 13, 19, .9), transparent);
}

.style-preview-strip span {
  position: absolute;
  left: 10px;
  bottom: 9px;
  z-index: 1;
  color: #fff6d8;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.setup-painted::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(to bottom, transparent, rgba(17, 18, 24, .78));
  pointer-events: none;
}

.setup-avatar {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: end center;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.setup-hero .person {
  transform: translateY(18px) scale(1.1);
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  background: var(--panel);
  color: var(--ink);
  outline: 0;
}

.field input:focus {
  border-color: rgba(23, 195, 178, .84);
  box-shadow: 0 0 0 3px rgba(23, 195, 178, .16);
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.swatch,
.outfit-option {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.swatch {
  position: relative;
  color: transparent;
}

.swatch::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  background: var(--swatch);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .2);
}

.swatch[aria-pressed="true"],
.outfit-option[aria-pressed="true"] {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 209, 102, .14);
}

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

.stage {
  position: relative;
  isolation: isolate;
  min-height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow-x: hidden;
  overflow-y: hidden;
  overscroll-behavior: none;
  background: #1e2430 center / cover;
  touch-action: manipulation;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(17, 18, 24, .08), rgba(17, 18, 24, .1) 48%, rgba(17, 18, 24, .65));
  pointer-events: none;
}

.stage-painted {
  background-position: center top;
}

.stage-painted.visual-romance .scene-art {
  filter: saturate(1.12) brightness(1.04) hue-rotate(-5deg);
}

.stage-painted.visual-spotlight .scene-art {
  filter: saturate(1.18) contrast(1.04) brightness(1.05);
}

.stage-painted.visual-polished .scene-art {
  filter: saturate(.92) contrast(1.08) brightness(.98);
}

.stage-painted.visual-couture .scene-art {
  filter: saturate(1.22) contrast(1.08) brightness(1.03);
}

.stage-painted.visual-chaos .scene-art {
  filter: saturate(.85) contrast(1.16) brightness(.9);
}

.stage-painted::before {
  background:
    linear-gradient(to bottom, rgba(10, 10, 14, 0) 0%, rgba(10, 10, 14, .08) 44%, rgba(10, 10, 14, .48) 72%, rgba(10, 10, 14, .82) 100%),
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .08), transparent 42%);
}

.scene-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  transform: scale(1.035);
  transform-origin: center top;
  animation: scene-drift 11s ease-in-out both;
}

.stage-painted.motion-push .scene-art {
  animation-name: scene-push;
}

.stage-painted.motion-drift-left .scene-art {
  animation-name: scene-drift-left;
}

.stage-painted.motion-drift-right .scene-art {
  animation-name: scene-drift-right;
}

.stage-painted.motion-rise .scene-art {
  animation-name: scene-rise;
}

.cinematic-effect {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .72;
  mix-blend-mode: screen;
}

.cue-paparazzi .cinematic-effect {
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, .82), transparent 0 5%, transparent 12%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, .62), transparent 0 4%, transparent 11%),
    radial-gradient(circle at 72% 54%, rgba(255, 255, 255, .48), transparent 0 3%, transparent 9%);
  animation: paparazzi-pop 1.9s steps(2, end) infinite;
}

.cue-romance .cinematic-effect {
  background:
    radial-gradient(circle at 52% 36%, rgba(255, 147, 181, .22), transparent 38%),
    linear-gradient(to bottom, transparent 38%, rgba(255, 132, 164, .16));
  animation: romance-bloom 5.6s ease-in-out infinite alternate;
}

.cue-blackout .cinematic-effect {
  background:
    linear-gradient(115deg, rgba(0, 0, 0, .62), transparent 38%, rgba(0, 0, 0, .48)),
    radial-gradient(circle at 70% 14%, rgba(117, 98, 255, .22), transparent 22%);
  mix-blend-mode: multiply;
  animation: blackout-pulse 3.6s ease-in-out infinite;
}

.cue-power .cinematic-effect {
  background:
    linear-gradient(130deg, rgba(255, 209, 102, .2), transparent 28%, rgba(120, 214, 255, .14)),
    radial-gradient(circle at 18% 80%, rgba(255, 209, 102, .18), transparent 30%);
  animation: power-scan 5.2s ease-in-out infinite alternate;
}

.cue-spotlight .cinematic-effect,
.cue-complete .cinematic-effect,
.cue-finale .cinematic-effect {
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 246, 202, .36), transparent 31%),
    linear-gradient(to bottom, rgba(255, 209, 102, .12), transparent 42%);
  animation: spotlight-swell 4.8s ease-in-out infinite alternate;
}

.cue-glow .cinematic-effect {
  background: radial-gradient(circle at 50% 24%, rgba(255, 255, 255, .12), transparent 42%);
  animation: romance-bloom 6s ease-in-out infinite alternate;
}

.cue-choice .dialogue-box,
.cue-choice .choice-btn {
  animation: choice-rise .34s ease-out both;
}

.cue-high .scene-art {
  animation-duration: 8.5s;
}

.painted-focus {
  position: relative;
  z-index: 2;
  display: grid;
  align-items: end;
  overflow: hidden;
  min-height: 0;
  pointer-events: none;
}

@keyframes scene-drift {
  from { transform: scale(1.035) translate3d(0, 0, 0); }
  to { transform: scale(1.075) translate3d(0, -1.8%, 0); }
}

@keyframes scene-push {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(0, -2.4%, 0); }
}

@keyframes scene-drift-left {
  from { transform: scale(1.055) translate3d(1.6%, 0, 0); }
  to { transform: scale(1.085) translate3d(-1.6%, -1.2%, 0); }
}

@keyframes scene-drift-right {
  from { transform: scale(1.055) translate3d(-1.6%, 0, 0); }
  to { transform: scale(1.085) translate3d(1.6%, -1.2%, 0); }
}

@keyframes scene-rise {
  from { transform: scale(1.05) translate3d(0, 1.2%, 0); }
  to { transform: scale(1.085) translate3d(0, -2.2%, 0); }
}

@keyframes paparazzi-pop {
  0%, 44%, 100% { opacity: .18; }
  8%, 15% { opacity: .78; }
  58%, 64% { opacity: .66; }
}

@keyframes romance-bloom {
  from { opacity: .42; transform: scale(1); }
  to { opacity: .82; transform: scale(1.04); }
}

@keyframes blackout-pulse {
  0%, 100% { opacity: .5; }
  46% { opacity: .82; }
  52% { opacity: .34; }
}

@keyframes power-scan {
  from { opacity: .36; transform: translate3d(-1.5%, 0, 0); }
  to { opacity: .78; transform: translate3d(1.5%, 0, 0); }
}

@keyframes spotlight-swell {
  from { opacity: .45; transform: scale(1); }
  to { opacity: .86; transform: scale(1.03); }
}

@keyframes choice-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.stage-cast {
  position: relative;
  z-index: 2;
  align-self: end;
  min-height: 0;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: min(4vw, 18px);
  overflow: hidden;
  padding: clamp(34px, 7svh, 84px) 12px 0;
}

.stage-cast[data-count="1"] .person {
  transform: translateY(8px) scale(1.14);
}

.stage-cast[data-count="2"] .person:first-child {
  transform: translate(10px, 12px) scale(1.02);
}

.stage-cast[data-count="2"] .person:last-child {
  transform: translate(-10px, 0) scale(1.08);
}

.stage-cast[data-count="3"] {
  gap: 0;
}

.stage-cast[data-count="3"] .person {
  margin-inline: -16px;
  transform: scale(.84);
}

.person {
  --skin: #c98e67;
  --hair: #2b211d;
  --jacket: #17c3b2;
  --shirt: #f9f7ef;
  position: relative;
  width: 154px;
  height: 430px;
  flex: 0 0 154px;
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, .34));
  transform-origin: bottom center;
  transition: transform .28s ease;
}

.person.is-talking {
  animation: talk-bob .9s ease-in-out infinite alternate;
}

@keyframes talk-bob {
  from { translate: 0 0; }
  to { translate: 0 -7px; }
}

.hair {
  position: absolute;
  top: 8px;
  left: 22px;
  width: 110px;
  height: 126px;
  border-radius: 48% 52% 44% 48%;
  background: var(--hair);
  z-index: 3;
  box-shadow: inset -12px 0 0 rgba(255, 255, 255, .04);
}

.ear {
  position: absolute;
  top: 88px;
  width: 18px;
  height: 30px;
  border-radius: 999px;
  background: var(--skin);
  z-index: 3;
}

.ear.left {
  left: 28px;
}

.ear.right {
  right: 28px;
}

.head {
  position: absolute;
  top: 48px;
  left: 36px;
  width: 82px;
  height: 98px;
  border-radius: 44% 46% 48% 48%;
  background: var(--skin);
  z-index: 4;
  box-shadow: inset -8px -8px 0 rgba(92, 45, 45, .08);
}

.head::before,
.head::after {
  content: none;
}

.brow,
.eye,
.cheek,
.nose {
  position: absolute;
  display: block;
}

.brow {
  top: 35px;
  width: 18px;
  height: 4px;
  border-radius: 999px;
  background: rgba(35, 20, 20, .56);
}

.brow.left {
  left: 18px;
  transform: rotate(-7deg);
}

.brow.right {
  right: 18px;
  transform: rotate(7deg);
}

.eye {
  top: 45px;
  width: 10px;
  height: 12px;
  border-radius: 999px;
  background: #111218;
  box-shadow: 4px 2px 0 -2px rgba(255, 255, 255, .7);
}

.eye.left {
  left: 23px;
}

.eye.right {
  right: 23px;
}

.nose {
  top: 54px;
  left: 50%;
  width: 10px;
  height: 20px;
  border-right: 3px solid rgba(87, 37, 34, .24);
  border-bottom: 3px solid rgba(87, 37, 34, .18);
  border-radius: 0 0 9px 0;
  transform: translateX(-50%);
}

.cheek {
  top: 66px;
  width: 18px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 112, 132, .18);
}

.cheek.left {
  left: 12px;
}

.cheek.right {
  right: 12px;
}

.mouth {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 30px;
  height: 13px;
  border-bottom: 5px solid rgba(98, 32, 42, .78);
  border-radius: 0 0 999px 999px;
  transform: translateX(-50%);
}

.neck {
  position: absolute;
  top: 136px;
  left: 62px;
  width: 30px;
  height: 44px;
  border-radius: 0 0 12px 12px;
  background: var(--skin);
  z-index: 2;
}

.body {
  position: absolute;
  top: 168px;
  left: 28px;
  width: 98px;
  height: 176px;
  border-radius: 46px 46px 18px 18px;
  background: var(--jacket);
  z-index: 2;
  overflow: hidden;
}

.body::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 33px;
  width: 32px;
  height: 132px;
  border-radius: 18px 18px 8px 8px;
  background: var(--shirt);
}

.lapel {
  position: absolute;
  top: 18px;
  width: 38px;
  height: 96px;
  background: rgba(17, 18, 24, .18);
  z-index: 2;
}

.lapel.left {
  left: 0;
  clip-path: polygon(0 0, 100% 20%, 38% 100%, 0 100%);
}

.lapel.right {
  right: 0;
  clip-path: polygon(100% 0, 0 20%, 62% 100%, 100% 100%);
}

.waist {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 34px;
  height: 8px;
  border-radius: 999px;
  background: rgba(17, 18, 24, .22);
}

.arm {
  position: absolute;
  top: 184px;
  width: 26px;
  height: 152px;
  border-radius: 999px;
  background: var(--skin);
  z-index: 1;
}

.arm.left {
  left: 12px;
  transform: rotate(7deg);
}

.arm.right {
  right: 12px;
  transform: rotate(-7deg);
}

.legs {
  position: absolute;
  top: 330px;
  left: 43px;
  display: flex;
  gap: 14px;
  z-index: 1;
}

.legs span {
  display: block;
  width: 27px;
  height: 86px;
  border-radius: 13px 13px 7px 7px;
  background: #242236;
}

.shoes {
  position: absolute;
  top: 410px;
  left: 36px;
  display: flex;
  gap: 12px;
  z-index: 3;
}

.shoes span {
  display: block;
  width: 38px;
  height: 12px;
  border-radius: 999px 999px 5px 5px;
  background: #0f111a;
}

.person.hair-bob .hair {
  height: 104px;
  border-radius: 52% 52% 38% 38%;
}

.person.hair-curls .hair {
  border-radius: 54% 48% 54% 42%;
  box-shadow: -12px 34px 0 -4px var(--hair), 14px 28px 0 -6px var(--hair), inset -12px 0 0 rgba(255, 255, 255, .04);
}

.person.hair-wave .hair {
  transform: rotate(-5deg);
  border-radius: 56% 42% 48% 42%;
  box-shadow: 18px 26px 0 -8px var(--hair), inset -12px 0 0 rgba(255, 255, 255, .04);
}

.person[data-character="alex"] .body {
  border-radius: 34px 34px 16px 16px;
}

.person[data-character="mara"] .mouth {
  width: 24px;
  border-bottom-color: rgba(112, 24, 54, .85);
}

.person[data-character="nico"] .body {
  box-shadow: inset 0 0 0 4px rgba(17, 18, 24, .1);
}

.stage-cast[data-mode="choice"][data-count="1"] .person {
  transform: translateY(8px) scale(.88);
}

.stage-cast[data-mode="choice"][data-count="2"] .person:first-child {
  transform: translate(8px, 12px) scale(.74);
}

.stage-cast[data-mode="choice"][data-count="2"] .person:last-child {
  transform: translate(-8px, 8px) scale(.78);
}

.stage-cast[data-mode="choice"][data-count="3"] .person {
  margin-inline: -24px;
  transform: scale(.68);
}

.personalized-cast {
  width: 100%;
  min-height: 100%;
  pointer-events: none;
}

.stage-painted .personalized-cast {
  padding: 6px 8px 0;
}

.stage-painted .personalized-cast[data-count="1"] {
  justify-content: flex-start;
  padding-left: 22px;
}

.stage-painted .personalized-cast .person {
  opacity: .98;
}

.stage-painted .personalized-cast[data-mode="dialogue"][data-count="1"] .person {
  transform: translateY(16px) scale(.78);
}

.stage-painted .personalized-cast[data-mode="dialogue"][data-count="2"] .person:first-child {
  transform: translate(10px, 18px) scale(.72);
}

.stage-painted .personalized-cast[data-mode="dialogue"][data-count="2"] .person:last-child {
  transform: translate(-10px, 10px) scale(.78);
}

.stage-painted .personalized-cast[data-mode="dialogue"][data-count="3"] .person {
  margin-inline: -22px;
  transform: translateY(18px) scale(.58);
}

.stage-painted .personalized-cast[data-mode="choice"][data-count="1"] .person {
  transform: translateY(24px) scale(.56);
}

.stage-painted .personalized-cast[data-mode="choice"][data-count="2"] .person:first-child {
  transform: translate(8px, 24px) scale(.54);
}

.stage-painted .personalized-cast[data-mode="choice"][data-count="2"] .person:last-child {
  transform: translate(-8px, 20px) scale(.58);
}

.stage-painted .personalized-cast[data-mode="choice"][data-count="3"] .person {
  margin-inline: -28px;
  transform: translateY(24px) scale(.46);
}

.dialogue-wrap {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 10px;
  align-self: end;
  min-height: 0;
  padding: 0 14px max(14px, env(safe-area-inset-bottom));
}

.story-insert {
  position: relative;
  display: block;
  min-height: 104px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px;
  background: rgba(18, 19, 27, .88);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .26);
  backdrop-filter: blur(14px);
}

.story-insert::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(12, 13, 19, .28), rgba(12, 13, 19, .82) 58%, rgba(12, 13, 19, .94)),
    linear-gradient(to top, rgba(12, 13, 19, .9), transparent 70%);
  pointer-events: none;
}

.story-insert-image {
  position: absolute;
  inset: 0;
  min-height: 100%;
  background-color: #222331;
  background-position: center;
  background-size: cover;
  filter: saturate(1.08) contrast(1.03);
}

.story-insert figcaption {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  gap: 4px;
  min-width: 0;
  min-height: 104px;
  padding: 12px;
}

.story-insert span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.story-insert strong {
  color: #fffaf1;
  font-size: 12px;
  line-height: 1.25;
}

.choice-stack {
  display: grid;
  gap: 10px;
}

.store-prompt {
  min-height: 42px;
  border: 1px solid rgba(255, 209, 102, .42);
  border-radius: 8px;
  background: rgba(255, 209, 102, .12);
  color: #ffe49a;
  font-size: 12px;
  font-weight: 900;
}

.route-notice {
  justify-self: center;
  max-width: 96%;
  border: 1px solid rgba(255, 209, 102, .42);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(17, 18, 24, .84);
  color: #ffe49a;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .28);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.route-notice.inline {
  justify-self: stretch;
  border-radius: 8px;
  font-size: 11px;
}

.dialogue-box,
.choice-btn {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  background: rgba(18, 19, 27, .92);
  color: var(--ink);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .28);
}

.dialogue-box {
  padding: 14px;
}

.dialogue-box[data-action] {
  cursor: pointer;
}

.speaker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.dialogue-text {
  margin: 0;
  color: #fffaf1;
  font-size: 17px;
  line-height: 1.42;
}

.dialogue-page-progress {
  display: flex;
  gap: 5px;
  align-items: center;
  min-height: 10px;
  margin-top: 12px;
}

.dialogue-page-progress span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .24);
}

.dialogue-page-progress span.active {
  width: 18px;
  background: linear-gradient(135deg, var(--gold), var(--teal));
}

.dialogue-controls {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.continue-btn {
  min-height: 42px;
  min-width: 118px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), var(--teal));
  color: #111218;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.choice-btn {
  min-height: 58px;
  padding: 12px 14px;
  text-align: left;
  line-height: 1.25;
}

.choice-btn:hover,
.choice-btn:focus-visible,
.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.currency-btn:hover,
.store-prompt:hover,
.pack-card:hover,
.nav-btn:hover {
  transform: translateY(-1px);
}

.choice-btn.premium {
  border-color: rgba(255, 209, 102, .54);
  background: linear-gradient(135deg, rgba(255, 209, 102, .18), rgba(255, 92, 124, .14)), rgba(18, 19, 27, .94);
}

.choice-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-weight: 900;
}

.choice-effect {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.season-progress,
.route-summary,
.monetization-summary,
.store-hero,
.ending-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(25, 26, 34, .78);
}

.store-hero-art {
  position: relative;
  min-height: 168px;
  align-content: end;
  overflow: hidden;
  background-color: #222331;
  background-position: center;
  background-size: cover;
}

.store-hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(14, 15, 22, .94), rgba(14, 15, 22, .42), rgba(14, 15, 22, .08)),
    radial-gradient(circle at 80% 10%, rgba(255, 209, 102, .24), transparent 34%);
}

.store-hero-art > div {
  position: relative;
  z-index: 1;
}

.entitlement-card {
  grid-template-columns: 92px 1fr;
  align-items: center;
}

.entitlement-art {
  grid-row: span 2;
  min-height: 72px;
  border-radius: 8px;
  background-color: #222331;
  background-position: center;
  background-size: cover;
}

.pack-art {
  flex: 0 0 68px;
  width: 68px;
  height: 68px;
  border-radius: 8px;
  background-color: #222331;
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 -40px 36px rgba(0, 0, 0, .28);
}

.route-image-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.route-image-cards article,
.ending-memory-cards article {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 120px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  padding: 9px;
  background-color: #222331;
  background-position: center;
  background-size: cover;
}

.route-image-cards article::before,
.ending-memory-cards article::before {
  content: "";
  position: absolute;
  inset: 30% 0 0;
  background: linear-gradient(to top, rgba(12, 13, 19, .94), transparent);
}

.route-image-cards span,
.route-image-cards strong,
.ending-memory-cards span,
.ending-memory-cards strong {
  position: relative;
  z-index: 1;
}

.route-image-cards span,
.ending-memory-cards span {
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.route-image-cards strong,
.ending-memory-cards strong {
  display: -webkit-box;
  overflow: hidden;
  color: #fffaf1;
  font-size: 12px;
  line-height: 1.16;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ending {
  display: grid;
  align-content: start;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 209, 102, .14), transparent 34%),
    linear-gradient(180deg, rgba(17, 18, 24, .12), #111218 58%);
}

.ending-hero {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  background-color: #222331;
  background-position: center top;
  background-size: cover;
  isolation: isolate;
}

.ending-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom, rgba(17, 18, 24, .05), rgba(17, 18, 24, .18) 46%, rgba(17, 18, 24, .92)),
    radial-gradient(circle at 50% 35%, transparent 0 30%, rgba(0, 0, 0, .42) 76%);
}

.ending-hero.visual-romance {
  filter: saturate(1.08) brightness(1.04) hue-rotate(-4deg);
}

.ending-hero.visual-spotlight,
.ending-hero.visual-couture {
  filter: saturate(1.16) contrast(1.05) brightness(1.04);
}

.ending-hero.visual-polished {
  filter: saturate(.94) contrast(1.08);
}

.ending-glow {
  position: absolute;
  inset: auto 12% 10% 12%;
  height: 42%;
  z-index: 0;
  background: radial-gradient(circle, rgba(255, 209, 102, .32), transparent 68%);
  filter: blur(10px);
  opacity: .72;
}

.ending-card {
  position: relative;
  z-index: 2;
  margin: -116px 14px 16px;
  background: rgba(18, 19, 27, .94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .44);
  backdrop-filter: blur(18px);
}

.ending-card h2 {
  font-size: 30px;
  line-height: 1.02;
}

.ending-card h3 {
  margin-top: 4px;
  color: var(--gold);
  font-size: 13px;
  text-transform: uppercase;
}

.ending-card p {
  color: #fffaf1;
  line-height: 1.45;
}

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

.ending-badges span,
.ending-proof div {
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.ending-badges span {
  padding: 7px 9px;
}

.ending-proof {
  display: grid;
  gap: 8px;
}

.ending-memory-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ending-proof div {
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--muted);
  line-height: 1.35;
}

.chapter-break {
  align-content: start;
  background: linear-gradient(180deg, rgba(17, 18, 24, .2), #111218 62%);
}

.chapter-cover {
  min-height: 356px;
  border-radius: 8px;
  background-color: #222331;
  background-position: center top;
  background-size: cover;
  box-shadow: inset 0 -120px 80px rgba(17, 18, 24, .88);
}

.chapter-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin-top: -94px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  padding: 16px;
  background: rgba(19, 20, 29, .94);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .36);
}

.chapter-card h2 {
  font-size: 25px;
}

.chapter-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.gate-cost {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(23, 195, 178, .24);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(23, 195, 178, .08);
}

.gate-cost > span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.season-progress p,
.store-hero p,
.monetization-summary p,
.route-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.summary-title {
  display: grid;
  gap: 3px;
}

.summary-title span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-title small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

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

.signal-grid div {
  display: grid;
  gap: 2px;
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, .05);
}

.signal-grid strong {
  color: var(--teal);
  font-size: 20px;
  line-height: 1;
}

.signal-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.route-summary > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.route-summary strong {
  color: var(--gold);
  font-size: 28px;
  line-height: 1;
}

.route-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.store-hero h2 {
  margin: 0;
  font-size: 24px;
}

.pack-list {
  display: grid;
  gap: 10px;
}

.pack-list.compact {
  gap: 8px;
}

.pack-card {
  width: 100%;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
}

.pack-card > span:not(.pack-art):not(.pack-price) {
  min-width: 0;
}

.pack-card.featured {
  border-color: rgba(255, 209, 102, .48);
  background: linear-gradient(135deg, rgba(255, 209, 102, .16), rgba(45, 212, 191, .1)), var(--panel);
}

.pack-card:disabled {
  cursor: default;
  opacity: .78;
}

.pack-card strong,
.pack-card small {
  display: block;
}

.pack-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.product-id {
  color: rgba(255, 255, 255, .42) !important;
  font-size: 10px !important;
  overflow-wrap: anywhere;
}

.pack-price {
  flex: 0 0 auto;
  color: #ffe49a;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  text-align: right;
}

.entitlement-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 4px;
  align-items: center;
  border: 1px solid rgba(45, 212, 191, .44);
  border-radius: 8px;
  padding: 12px;
  background: rgba(45, 212, 191, .12);
}

.entitlement-card strong {
  color: #9ff7ec;
  font-size: 13px;
}

.entitlement-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.billing-status {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .06);
}

.billing-status[data-billing-mode="revenuecat"] {
  border-color: rgba(45, 212, 191, .44);
  background: rgba(45, 212, 191, .1);
}

.billing-status strong {
  color: var(--ink);
  font-size: 12px;
}

.billing-status span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.store-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.side-panel {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 16px;
  max-width: 460px;
}

.side-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(25, 26, 34, .78);
  backdrop-filter: blur(18px);
}

.side-block h2 {
  font-size: 26px;
}

.side-block h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.stat-grid {
  display: grid;
  gap: 12px;
}

.stat {
  display: grid;
  gap: 7px;
}

.stat-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
}

.meter span {
  display: block;
  height: 100%;
  width: var(--value);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--coral));
}

.memory-list,
.log-list {
  display: grid;
  gap: 10px;
}

.memory,
.log-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
}

.memory {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px;
  align-items: center;
}

.memory-art {
  grid-row: span 2;
  min-height: 72px;
  border-radius: 8px;
  background-color: #222331;
  background-position: center;
  background-size: cover;
}

.memory strong,
.log-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--gold);
  text-transform: uppercase;
}

.memory p,
.log-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, .18);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  padding: 22px;
}

@media (max-width: 900px) {
  .shell {
    height: var(--app-height);
    min-height: var(--app-height);
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }

  .phone {
    width: 100%;
    height: 100%;
    max-height: none;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }

  .side-panel {
    display: none;
  }
}

@media (max-height: 740px) {
  .topbar {
    padding-top: max(14px, calc(env(safe-area-inset-top) + 8px));
    padding-bottom: 10px;
  }

  .bottom-nav {
    padding-top: 6px;
    padding-bottom: max(8px, calc(env(safe-area-inset-bottom) + 6px));
  }

  .nav-btn {
    min-height: 44px;
  }

  .dialogue-wrap {
    gap: 8px;
    padding-inline: 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .story-insert {
    min-height: 90px;
  }

  .story-insert figcaption {
    min-height: 90px;
    padding: 10px 12px;
  }

  .story-insert strong {
    font-size: 11px;
    line-height: 1.18;
  }

  .route-notice {
    padding: 6px 10px;
    font-size: 11px;
  }

  .dialogue-box {
    padding: 12px;
  }

  .dialogue-text {
    font-size: 15px;
    line-height: 1.34;
  }

  .choice-btn {
    min-height: 52px;
    padding: 10px 12px;
  }

  .choice-effect {
    font-size: 11px;
  }
}

@media (max-width: 390px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
    gap: 6px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .topbar-tools {
    gap: 5px;
  }

  .audio-controls {
    gap: 4px;
  }

  .audio-btn {
    width: 26px;
    min-width: 26px;
    height: 26px;
    font-size: 9px;
  }

  .currency {
    gap: 4px;
  }

  .pill {
    min-width: 0;
    min-height: 28px;
    padding: 4px 6px;
    font-size: 10.5px;
  }

  .currency-btn {
    min-width: 34px;
    max-width: 46px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .story-card {
    grid-template-columns: 100px 1fr;
  }

  .image-rail,
  .route-image-cards,
  .ending-memory-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-insert {
    min-height: 90px;
  }

  .pack-art {
    flex-basis: 58px;
    width: 58px;
    height: 58px;
  }

  .story-copy h2 {
    font-size: 30px;
  }

  .dialogue-text {
    font-size: 16px;
  }
}
