:root {
  --bg: #1a0b16;
  --bg-2: #24101f;
  --card: #2e1528;
  --ink: #f6eee9;
  --muted: #b9a3b0;
  --gold: #e8b64c;
  --rose: #e8457a;
  --you: #7b2350;
  --line: rgba(255, 255, 255, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overscroll-behavior: none; }
body {
  background: radial-gradient(120% 80% at 50% 0%, #3a1430 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--ink);
  font: 16px/1.5 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
button { font: inherit; }

.screen { max-width: 480px; margin: 0 auto; min-height: 100dvh; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); position: relative; }

/* ---------- buttons ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer; font-weight: 600;
  border-radius: 999px; padding: 14px 20px; width: 100%;
  transition: transform .08s ease, opacity .2s ease;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; }
.btn-primary { background: linear-gradient(135deg, var(--rose), #b5305f); color: #fff; box-shadow: 0 8px 24px rgba(232, 69, 122, .35); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid rgba(255,255,255,.2); }
.btn-whatsapp { background: #25d366; color: #06301a; }
.btn-link { background: none; color: var(--muted); text-decoration: underline; }

.kicker { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; color: var(--gold); margin: 0 0 6px; }

/* ---------- auth ---------- */
.screen-auth { display: flex; flex-direction: column; justify-content: center; text-align: center; overflow: hidden; }
.title-glow { position: absolute; inset: -20% -40% auto; height: 60%; background: radial-gradient(closest-side, rgba(232,182,76,.25), transparent); pointer-events: none; }
.logo { font-family: "Playfair Display", Georgia, serif; font-size: clamp(44px, 13vw, 60px); line-height: 1; margin: 0; }
.logo span { color: var(--rose); font-style: italic; }
.tagline { color: var(--muted); margin: 10px 0 22px; }
.hook { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; text-align: left; margin-bottom: 20px; }
.hook p { margin: 0 0 6px; }
.hook p:last-child { margin: 0; color: var(--gold); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-2); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.tab { appearance: none; border: 0; background: none; color: var(--muted); padding: 10px; border-radius: 999px; cursor: pointer; font-weight: 600; }
.tab.active { background: var(--card); color: var(--ink); }
.auth-form { display: grid; gap: 12px; text-align: left; }
.auth-form label, .field { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
input:not([type="checkbox"]) {
  font: inherit; font-size: 16px; padding: 13px 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,.18);
  background: var(--bg-2); color: var(--ink); outline: none; width: 100%;
}
input:focus { border-color: var(--gold); }
.auth-form .check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.check input { margin-top: 3px; accent-color: var(--rose); width: 18px; height: 18px; flex: none; }
.error { color: #ff8a8a; font-size: 14px; margin: 0; }
.dev-banner { margin: 14px 0 0; font-size: 12px; color: var(--gold); }
.fineprint { color: var(--muted); font-size: 12px; margin-top: 18px; }

/* ---------- creator ---------- */
.field-label { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.swatches { display: flex; gap: 10px; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatch.active { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,182,76,.3); }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.option { appearance: none; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.option.active { border-color: var(--gold); color: var(--gold); }
.note { color: var(--muted); font-size: 13px; margin: 6px 0; }

/* ---------- game ---------- */
.screen-game { position: fixed; inset: 0; overflow: hidden; }
.world { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: pointer; }

.hud {
  position: absolute; top: 0; left: 0; right: 0; padding: calc(10px + env(safe-area-inset-top)) 12px 0;
  display: grid; gap: 8px; pointer-events: none; max-width: 520px; margin: 0 auto;
}
.hud-row { display: flex; gap: 8px; justify-content: space-between; }
.hud-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  background: rgba(26, 11, 22, .85); backdrop-filter: blur(8px); font-size: 14px; font-weight: 600;
  font-variant-numeric: tabular-nums; border: 1px solid var(--line);
}
.hud-chip.money { color: var(--gold); }
.hud-chip.money.neg { color: #ff8a8a; }
.energy { width: 54px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; }
.energy span { display: block; height: 100%; background: #6fdc8c; transition: width .3s ease; }
.energy span.low { background: #ff8a8a; }
.goal {
  pointer-events: auto; justify-self: center; max-width: 100%; text-align: left; cursor: pointer;
  background: var(--gold); color: #1a0b16; border: 0; border-radius: 14px; padding: 9px 14px;
  font-size: 13px; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.3);
}

.dock { position: absolute; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 10px; }
.dock-btn {
  position: relative; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer;
  background: rgba(26, 11, 22, .9); font-size: 24px; box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.badge {
  position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 5px;
  background: var(--rose); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center;
}

/* ---------- sheets ---------- */
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto;
  background: var(--bg); border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0;
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,.45);
  animation: up .25s ease both; z-index: 3;
}
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sheet h2 { margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: 22px; }
.close { appearance: none; background: var(--card); border: 0; color: var(--ink); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; flex: none; }
.place-blurb { color: var(--muted); margin: 6px 0 12px; font-size: 14px; }
.sheet-place { max-height: 62dvh; overflow-y: auto; }
.actions { display: grid; gap: 8px; }
.action {
  appearance: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px;
}
.action small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.action.primary { background: linear-gradient(135deg, var(--rose), #b5305f); border: 0; font-weight: 700; }
.action:disabled { opacity: .45; cursor: default; }
.info { margin: 0; font-size: 13px; color: var(--gold); }

.sheet-phone { max-height: 80dvh; overflow-y: auto; }
.me { background: var(--card); border-radius: 14px; padding: 10px 14px; margin: 12px 0 4px; display: grid; gap: 4px; }
.me p { margin: 0; font-size: 14px; }
.me .warn { color: #ff8a8a; }
.me .btn { margin-top: 6px; padding: 10px; }
.inbox { display: grid; gap: 8px; margin-top: 6px; }
.msg { background: var(--card); border-radius: 14px; padding: 10px 14px; }
.msg-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.msg-head b { color: var(--ink); }
.msg p { margin: 2px 0 0; font-size: 14px; }

/* ---------- story ---------- */
.sheet-story { top: 0; border-radius: 0; display: flex; flex-direction: column; padding: 0; border: 0; }
.story-stats {
  display: flex; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top)) 16px 10px;
  border-bottom: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums;
}
.story-stats .money { color: var(--gold); }
.story-feed { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.story-feed > * { animation: rise .28s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.story-controls { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); display: grid; gap: 10px; }

.scene { padding: 14px 16px; border-radius: var(--radius); background: linear-gradient(135deg, var(--a, #3a1430), var(--b, #1f0c1a)); border: 1px solid var(--line); }
.scene-place { font-family: "Playfair Display", Georgia, serif; font-size: 20px; margin: 0; }
.scene-time { color: var(--gold); font-size: 13px; margin: 2px 0 0; }
.scene[data-bg="home"]       { --a: #3b2a1e; --b: #1f150f; }
.scene[data-bg="rooftop"]    { --a: #3b1250; --b: #120a2a; }
.scene[data-bg="restaurant"] { --a: #4a3110; --b: #1d1307; }
.scene[data-bg="car"]        { --a: #0f2a3d; --b: #08131c; }
.scene[data-bg="night"]      { --a: #101830; --b: #05070f; }
.narration { color: var(--muted); font-style: italic; margin: 2px 4px; }
.line { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; }
.line .bubble { background: var(--card); border: 1px solid var(--line); padding: 10px 14px; border-radius: 18px 18px 18px 6px; }
.line .who { display: block; font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.line.you { align-self: flex-end; flex-direction: row-reverse; }
.line.you .bubble { background: var(--you); border-color: transparent; border-radius: 18px 18px 6px 18px; }
.avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; }
.phone-msg { align-self: center; width: 92%; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 10px 14px; }
.phone-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.phone-head .avatar { width: 22px; height: 22px; font-size: 11px; }
.phone-head b { color: var(--ink); }
.phone-msg p { margin: 0; }
.picked { align-self: flex-end; font-size: 13px; color: var(--gold); margin: 2px 4px 6px; }
.choice {
  appearance: none; text-align: left; cursor: pointer; color: var(--ink);
  background: var(--card); border: 1px solid rgba(232,182,76,.35); border-radius: 14px; padding: 14px 16px;
}
.choice:active { transform: scale(.98); }
.tap { appearance: none; color: var(--muted); font-size: 14px; text-align: center; padding: 14px; cursor: pointer; background: none; border: 0; width: 100%; }

.result-card { text-align: center; background: linear-gradient(160deg, #4a1638, #1f0c1a 70%); border: 1px solid rgba(232,182,76,.4); border-radius: 24px; padding: 24px 20px 18px; }
.result-emoji { font-size: 56px; line-height: 1; margin-top: 6px; }
.result-label { margin: 10px 0 0; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }
.result-title { font-family: "Playfair Display", Georgia, serif; font-size: 32px; margin: 4px 0 8px; color: var(--gold); }
.result-blurb { margin: 0 0 14px; }
.result-stats { display: flex; justify-content: center; gap: 14px; font-size: 14px; color: var(--muted); }
.next-ep { text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.next-ep h3 { font-family: "Playfair Display", Georgia, serif; margin: 0 0 4px; font-size: 22px; }
.next-ep p { color: var(--muted); margin: 0 0 14px; }
.next-ep .thanks { color: var(--gold); margin: 0; }

/* ---------- toasts ---------- */
.toasts { position: absolute; left: 50%; top: calc(110px + env(safe-area-inset-top)); transform: translateX(-50%); display: grid; gap: 6px; pointer-events: none; z-index: 10; justify-items: center; width: 92%; }
.toast { background: rgba(0,0,0,.8); padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; animation: toast 1.8s ease forwards; text-align: center; }
.toast.neg { color: #ff8a8a; }
@keyframes toast { 0% { opacity: 0; transform: translateY(-6px); } 12%, 78% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-10px); } }

/* ---------- setup ---------- */
/* Phone: the character stays pinned at the top while the choices scroll under it. */
.screen-creator { display: flex; flex-direction: column; gap: 10px; padding-top: 0; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.setup-stage {
  position: sticky; top: 0; z-index: 3; margin: 0 -16px; padding: calc(12px + env(safe-area-inset-top)) 16px 10px;
  background: var(--bg); box-shadow: 0 12px 14px -8px var(--bg); display: grid; gap: 6px; justify-items: center;
}
.setup-stage .setup-head { width: 100%; }
.creator-preview {
  width: 150px; height: 197px; border-radius: 22px; border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 40%, #4a1e40, #1f0c1a 70%);
}
.setup-panel { display: grid; gap: 10px; }
.setup-head { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; }
.icon-btn { appearance: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 20px; cursor: pointer; }
.icon-btn[hidden] { display: block !important; visibility: hidden; }
.setup-title { text-align: center; }
.setup-title p { margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: 20px; }
.dots { display: flex; gap: 6px; justify-content: center; margin-top: 6px; }
.dots span { width: 22px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.15); }
.dots span.on { background: var(--gold); }
.creator-preview.small { width: 110px; height: 144px; }
.setup-body { display: grid; gap: 10px; }
.setup-body h3 { margin: 4px 0 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.setup-next { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); width: calc(100% - 32px); max-width: 448px; z-index: 4; }
.setup-next:disabled { opacity: .5; box-shadow: none; }
.color-dot { width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.color-dot.active { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,182,76,.3); }
.option.soon { opacity: .55; }
.cards { display: grid; gap: 10px; }
.cards.two { grid-template-columns: 1fr 1fr; }
.card {
  appearance: none; text-align: left; cursor: pointer; color: var(--ink); background: var(--card);
  border: 2px solid transparent; border-radius: 16px; padding: 12px 14px; display: grid; gap: 2px;
}
.card.active { border-color: var(--gold); background: #3a1a33; }
.card.locked { opacity: .55; }
.card .emoji { font-size: 24px; }
.card b { font-size: 15px; }
.card small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card .tag { font-size: 11px; color: var(--gold); border: 1px solid rgba(232,182,76,.4); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.card .money-line { color: #6fdc8c; font-size: 13px; font-weight: 600; margin-top: 4px; }
.lottery { text-align: center; background: linear-gradient(160deg, #4a1638, #1f0c1a 70%); border: 1px solid rgba(232,182,76,.4); border-radius: 24px; padding: 24px 18px; }
.lottery .big { font-size: 64px; line-height: 1; }
.lottery h2 { font-family: "Playfair Display", Georgia, serif; margin: 10px 0 2px; font-size: 26px; color: var(--gold); }
.lottery p { margin: 0; color: var(--muted); }
.lottery ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; text-align: left; }
.lottery li { background: rgba(255,255,255,.06); border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.lottery .spin { animation: spin .12s linear infinite; display: inline-block; }
@keyframes spin { 50% { transform: scale(1.15) rotate(8deg); } }
.fine { color: var(--muted); font-size: 12px; text-align: center; margin: 0; }

/* trait-locked story choices */
.choice.trait { border-color: var(--rose); display: grid; gap: 4px; }
.trait-badge { font-size: 11px; font-weight: 700; color: var(--rose); text-transform: uppercase; letter-spacing: .06em; }

/* daily: gist + missions in the phone */
.daily { display: grid; gap: 8px; margin: 10px 0; }
.daily-card { background: var(--card); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; }
.daily-card h3 { margin: 0; font-size: 14px; color: var(--gold); }
.daily-card p { margin: 0; font-size: 14px; }
.gist-opt { appearance: none; text-align: left; cursor: pointer; color: var(--ink); background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.gist-reply { color: var(--gold); }
.mission { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.mission.done span:first-child { text-decoration: line-through; color: var(--muted); }
.mission button { appearance: none; border: 0; border-radius: 999px; padding: 6px 10px; font-weight: 700; font-size: 12px; cursor: pointer; background: var(--gold); color: #1a0b16; white-space: nowrap; }
.mission small { color: var(--muted); white-space: nowrap; }
.dock-btn .badge.dot { min-width: 12px; height: 12px; padding: 0; }
.me { grid-template-columns: 1fr auto; column-gap: 10px; }
.me > * { grid-column: 1; }
.me .me-portrait { grid-column: 2; grid-row: 1 / span 6; width: 80px; height: 105px; border-radius: 12px; background: radial-gradient(circle at 50% 40%, #4a1e40, #1f0c1a 70%); }
.auth-form .check a { color: var(--gold); }

/* ---------- cookie consent ---------- */
.consent {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50;
  max-width: 460px; margin: 0 auto; background: #2e1528; border: 1px solid rgba(232,182,76,.35);
  border-radius: 18px; padding: 14px 16px; box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.consent p { margin: 0 0 12px; font-size: 14px; }
.consent a { color: var(--gold); }
.consent-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.consent .btn { padding: 11px 14px; }

/* Laptop / tablet: character on the left, choices on the right. */
@media (min-width: 820px) {
  .screen-creator {
    max-width: 1040px; display: grid; grid-template-columns: minmax(340px, 1fr) minmax(380px, 460px);
    gap: 40px; align-items: start; padding: 24px 32px;
  }
  .setup-stage {
    top: 24px; margin: 0; padding: 0; background: none; height: calc(100dvh - 48px);
    grid-template-rows: auto 1fr; align-items: center;
  }
  .creator-preview, .creator-preview.small { width: min(100%, 360px); height: auto; aspect-ratio: 480 / 630; }
  .setup-panel { padding-bottom: 24px; }
  .setup-next { position: sticky; left: auto; transform: none; bottom: 16px; width: 100%; max-width: none; }
}

/* ---------- story stage (big portraits) ---------- */
.story-stage { width: 100%; height: min(30dvh, 250px); display: block; flex: none; border-bottom: 1px solid var(--line); }
.scene[data-bg="mall"] { --a: #4a1638; --b: #1f0c1a; }
.story-stats { flex-wrap: wrap; gap: 4px 10px; font-size: 13px; }
.sms { max-width: 80%; padding: 9px 13px; border-radius: 16px; font-size: 15px; display: grid; gap: 2px; }
.sms.in { align-self: flex-start; background: #2b3b33; border-bottom-left-radius: 4px; }
.sms.out { align-self: flex-end; background: #1f6f4f; border-bottom-right-radius: 4px; }
.sms-from { font-size: 11px; font-weight: 700; color: #8fe0b4; }
.choice.reply { border-color: rgba(111,220,140,.5); }
.meters { display: grid; gap: 8px; margin: 6px 0 12px; text-align: left; }
.meter { display: grid; grid-template-columns: 1fr 90px 34px; align-items: center; gap: 8px; font-size: 13px; }
.meter-bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.meter-fill { display: block; height: 100%; background: #6fdc8c; }
.meter-fill.neg { background: #ff8a8a; }
.meter-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.survey { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.relationships { display: grid; gap: 8px; }
.sheet-story.ending .story-stage { display: none; }
.after-ending { display: grid; gap: 6px; }
/* while a story scene is open, toasts sit above the choices instead of over faces */
.sheet-story:not([hidden]) ~ .toasts { top: auto; bottom: calc(150px + env(safe-area-inset-bottom)); }

/* ---------- acted scenes ---------- */
.sheet-story { background: #120810; }
.scene-wrap { position: relative; flex: 1; min-height: 0; }
.scene-canvas { width: 100%; height: 100%; display: block; }
.sheet-story:not(.ending) .story-feed { display: none; }
.sheet-story.ending .scene-wrap, .sheet-story.ending .dialogue { display: none; }
.scene-title { position: absolute; left: 12px; top: 12px; display: grid; background: rgba(26,11,22,.88); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; pointer-events: none; }
.scene-title b { font-family: "Playfair Display", Georgia, serif; font-size: 16px; }
.scene-title span { color: var(--gold); font-size: 12px; }
.scene-title.fade { animation: titlefade 4.5s ease forwards; }
@keyframes titlefade { 0% { opacity: 0; } 8%, 78% { opacity: 1; } 100% { opacity: 0; } }
.dialogue { display: flex; gap: 12px; align-items: flex-start; margin: 0 12px; padding: 12px 14px; min-height: 92px; background: rgba(26,11,22,.97); border: 1px solid rgba(232,182,76,.35); border-radius: 16px; }
.dialogue.narration { border-color: var(--line); }
.dialogue.narration .dialogue-text { font-style: italic; color: var(--muted); }
.dialogue-face { width: 64px; height: 64px; flex: none; border-radius: 50%; border: 2px solid var(--gold); background: radial-gradient(circle at 50% 40%, #4a1e40, #1f0c1a 70%); }
.dialogue-body { min-width: 0; }
.dialogue-name { color: var(--gold); font-size: 13px; }
.dialogue-text { margin: 2px 0 0; font-size: 16px; line-height: 1.45; }
.phone-panel { position: absolute; right: 12px; bottom: 10px; width: min(80%, 300px); max-height: calc(100% - 20px); display: flex; flex-direction: column; overflow: hidden; background: #0e1a14; border: 6px solid #0a0a0a; border-radius: 24px; box-shadow: 0 16px 40px rgba(0,0,0,.6); animation: up .25s ease both; }
.phone-panel-top { display: flex; align-items: center; gap: 8px; background: #1f6f4f; padding: 9px 12px; font-size: 14px; }
.phone-dot { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.3); }
.phone-thread { padding: 10px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.phone-thread .sms { max-width: 88%; font-size: 14px; }
.sms-photo { width: 100%; border-radius: 10px; display: block; margin-bottom: 4px; }
.sheet-story .story-controls { padding-top: 10px; }
.sheet-story .choice { padding: 11px 14px; font-size: 15px; }
.sheet-story .story-controls { gap: 8px; max-height: 46dvh; overflow-y: auto; }
/* the acted scene uses the whole screen; text and choices stay a readable width */
.sheet-story { max-width: none; }
.sheet-story .story-stats, .sheet-story .story-controls, .sheet-story .story-feed { width: 100%; max-width: 720px; margin-left: auto; margin-right: auto; }
@media (min-width: 760px) { .sheet-story .dialogue { width: calc(100% - 24px); max-width: 720px; margin: 0 auto; } }

/* ---------- exploring inside a building ---------- */
.sheet-story.explore .dialogue { display: none; }
.sheet-story.explore .story-feed { display: none; }
.sheet-story.explore .scene-title { pointer-events: none; max-width: calc(100% - 24px); }
.scene-title small { color: var(--gold); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; }
.scene-title .blurb { color: var(--muted); font-size: 12px; }
.room-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.room-actions .info { grid-column: 1 / -1; }
.room-actions .action { padding: 10px 12px; flex-direction: column; align-items: flex-start; gap: 2px; }
.room-actions .action.primary { grid-column: 1 / -1; }
.sheet-story .leave { padding: 10px; }
