:root {
  --orange: #f05a28;
  --ink: #16191d;
  --ink-2: #555c66;
  --navy: #0f2f45;
  --cream: #fbf3ec;
  --line: #ece4dc;
  --red: #e5483d;
  --green: #22b35a;
  --panel-w: 420px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
.ico { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* ---------------------------------------------------------------- top */
.topbar { height: 60px; flex: none; display: flex; align-items: center; gap: 18px; padding: 0 22px; border-bottom: 1px solid var(--line); background: #fff; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 22px; letter-spacing: -0.02em; text-decoration: none; color: var(--ink); }
.mark { width: 26px; height: 26px; border-radius: 50%; background: conic-gradient(from 200deg, var(--orange), #ff8a4c, var(--orange)); box-shadow: inset 0 0 0 6px #fff, 0 0 0 0 transparent; outline: 3px solid var(--orange); outline-offset: -3px; }
.topline { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.pill { margin-left: auto; font-size: 12px; font-weight: 600; border: 1px solid #cbbfb4; border-radius: 99px; padding: 4px 12px; color: var(--ink-2); }

.layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr var(--panel-w); }

/* ---------------------------------------------------------------- stage */
.stage { position: relative; min-height: 0; overflow: hidden; background: radial-gradient(90% 80% at 30% 40%, #fffaf5 0%, var(--cream) 55%, #f3e6da 100%); }
.powered { position: absolute; top: 18px; left: 18px; display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px 10px 13px; border-radius: 99px;
  background: rgba(22, 25, 29, 0.9); color: #fff; text-decoration: none; font-size: 14px; backdrop-filter: blur(10px); box-shadow: 0 8px 26px rgba(0,0,0,0.2); z-index: 6; }
.powered strong { font-weight: 700; }
.powered svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; opacity: 0.8; }
.powered-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.25); }

.views { display: none; }
.duo { position: absolute; inset: 70px 24px 24px; display: grid; grid-template-columns: 1.1fr 64px 1fr; align-items: stretch; }
.side { margin: 0; position: relative; display: flex; flex-direction: column; min-height: 0; }
figcaption { align-self: center; font-size: 14px; color: var(--ink-2); background: rgba(255,255,255,0.75); border: 1px solid var(--line); padding: 7px 14px; border-radius: 99px; white-space: nowrap; }
figcaption strong { color: var(--ink); }
.hint { color: #9a8f86; margin-left: 4px; }
model-viewer { flex: 1; width: 100%; min-height: 0; background: transparent; --poster-color: transparent; }
model-viewer::part(default-progress-bar) { display: none; }
.loader { position: absolute; inset: 40px 0 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--ink-2); font-size: 14px; transition: opacity 0.5s; background: transparent; }
.loader.done { opacity: 0; pointer-events: none; }
.spin { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--orange); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* tap target that sits on the 3D screen */
.tap { position: relative; width: 0; height: 0; border: 0; padding: 0; background: none; }
.tap[data-visible="false"] { opacity: 0; pointer-events: none; }
.tap-ring { position: absolute; left: -26px; top: -26px; width: 52px; height: 52px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 3px rgba(240, 90, 40, 0.9); animation: ping 1.6s ease-out infinite; }
.tap-label { position: absolute; left: 34px; top: -16px; white-space: nowrap; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 99px; box-shadow: 0 6px 16px rgba(0,0,0,0.25); }
.tap-label::before { content: ''; position: absolute; left: -5px; top: 50%; margin-top: -5px; border: 5px solid transparent; border-left: 0; border-right-color: var(--ink); }
@keyframes ping { 0% { transform: scale(0.7); opacity: 1; } 80%, 100% { transform: scale(1.35); opacity: 0; } }

/* signal travelling from Papa's phone to Laura's */
.signal { align-self: center; position: relative; height: 4px; margin-top: 30px; background: repeating-linear-gradient(90deg, #d8c9bc 0 6px, transparent 6px 12px); border-radius: 2px; }
.signal span { position: absolute; top: -6px; left: -8px; width: 16px; height: 16px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 6px rgba(240, 90, 40, 0.18); opacity: 0; }
.signal.go span { animation: travel 0.9s cubic-bezier(.5,0,.3,1) forwards; }
.signal.go.red span { background: var(--red); box-shadow: 0 0 0 6px rgba(229, 72, 61, 0.2); }
.signal.go.green span { background: var(--green); box-shadow: 0 0 0 6px rgba(34, 179, 90, 0.2); }
@keyframes travel { 0% { left: -8px; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }

.side-laura { align-items: center; }
.app-wrap { flex: 1; width: 100%; min-height: 0; position: relative; margin-top: 14px; }

/* ---------------------------------------------------------------- companion app (designed at 300 x 640) */
.app { --s: 1; width: 300px; height: 640px; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(var(--s)); border-radius: 42px; background: #0d0f12; padding: 10px;
  box-shadow: 0 0 0 2px #2a2d31, 0 30px 60px rgba(40, 25, 10, 0.28), 0 8px 18px rgba(0,0,0,0.18); }
.scr { position: absolute; inset: 10px; border-radius: 33px; overflow: hidden; background: #121519; color: #f2f4f6; font-size: 13px; }
.a-status { height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; font-size: 12px; font-weight: 700; }
.a-status::after { content: ''; position: absolute; left: 50%; top: 9px; width: 78px; height: 20px; margin-left: -39px; background: #000; border-radius: 12px; }
.a-status .ico { width: 13px; height: 13px; }
.a-body { position: absolute; top: 34px; bottom: 58px; left: 0; right: 0; overflow: hidden; padding: 4px 14px 0; }
.who { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; }
.who img { width: 42px; height: 42px; border-radius: 50%; }
.who b { display: block; font-size: 16px; }
.who small { color: #9aa3ad; font-size: 11px; white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; }
.chip { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; background: #1f242a; border-radius: 99px; padding: 5px 9px; font-weight: 700; font-size: 12px; }
.chip .ico { width: 14px; height: 14px; }
.chip.low { background: rgba(229,72,61,0.18); color: #ff7a6f; }
.map { position: relative; height: 210px; border-radius: 18px; overflow: hidden; background: #e9e4da; }
.map svg { display: block; width: 100%; height: 100%; }
.loc { display: flex; gap: 8px; align-items: center; margin: 9px 2px 10px; }
.loc .ico { width: 18px; height: 18px; color: var(--orange); }
.loc b { display: block; font-size: 13px; }
.loc small { color: #9aa3ad; font-size: 11px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.tile { background: #1c2026; border-radius: 14px; padding: 9px 9px 8px; min-height: 64px; transition: background 0.4s; }
.tile .ico { width: 16px; height: 16px; color: #c5ccd3; }
.tile small { display: block; color: #9aa3ad; font-size: 10px; margin-top: 3px; }
.tile b { display: block; font-size: 13px; }
.tile.warn { background: rgba(229,72,61,0.2); } .tile.warn .ico, .tile.warn b { color: #ff7a6f; }
.tile.wait { background: rgba(245,161,0,0.18); } .tile.wait .ico, .tile.wait b { color: #ffc04d; }
.tile.ok { background: rgba(34,179,90,0.2); } .tile.ok .ico, .tile.ok b { color: #5fe08f; }
.feed { margin-top: 10px; }
.feed h4 { margin: 0 0 6px; font-size: 12px; color: #9aa3ad; font-weight: 600; }
.feed-item { display: flex; gap: 9px; align-items: center; padding: 8px 2px; border-top: 1px solid #1f242a; font-size: 12px; animation: feedIn 0.5s ease-out; }
.feed-item .fi { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.feed-item .fi .ico { width: 15px; height: 15px; color: #fff; }
.feed-item time { margin-left: auto; color: #7d8792; font-size: 11px; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-6px); } }
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: 58px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #1f242a; background: #121519; }
.tabbar span { display: grid; justify-items: center; align-content: center; gap: 2px; font-size: 10px; color: #7d8792; }
.tabbar span.on { color: var(--orange); }
.tabbar .ico { width: 20px; height: 20px; }

.banner { position: absolute; left: 8px; right: 8px; top: 8px; z-index: 5; display: flex; gap: 10px; align-items: center; padding: 11px 12px; border-radius: 18px; background: rgba(40, 44, 50, 0.96); box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  transform: translateY(-130%); transition: transform 0.45s cubic-bezier(.2,.9,.3,1.2); }
.banner.show { transform: translateY(0); }
.banner .bi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--orange); }
.banner .bi .ico { width: 20px; height: 20px; color: #fff; }
.banner b { display: block; font-size: 13px; }
.banner small { display: block; font-size: 11.5px; color: #c5ccd3; line-height: 1.3; }
.banner time { position: absolute; right: 12px; top: 9px; font-size: 10px; color: #8b95a0; }

.over { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; padding: 44px 16px 18px; opacity: 0; pointer-events: none; transition: opacity 0.35s; }
.over.show { opacity: 1; pointer-events: auto; }
.over.sos { background: linear-gradient(180deg, #d83a2f, #8f1c15); }
.over.incall { background: linear-gradient(180deg, #173f5a, #0b1e2c); }
.over h3 { margin: 6px 0 2px; font-size: 22px; text-align: center; }
.over p.sub { margin: 0; text-align: center; font-size: 12.5px; color: rgba(255,255,255,0.85); }
.over .badge { align-self: center; display: inline-flex; gap: 6px; align-items: center; background: rgba(255,255,255,0.18); border-radius: 99px; padding: 5px 11px; font-size: 11.5px; font-weight: 700; }
.over .badge .ico { width: 14px; height: 14px; }
.over .mini { margin: 12px 0; height: 170px; border-radius: 16px; overflow: hidden; background: #e9e4da; position: relative; flex: none; }
.over .mini svg { width: 100%; height: 100%; display: block; }
.over .addr { display: flex; gap: 8px; align-items: center; background: rgba(0,0,0,0.18); border-radius: 12px; padding: 9px 11px; font-size: 12px; }
.over .addr .ico { width: 18px; height: 18px; flex: none; }
.over .addr b { display: block; font-size: 13px; }
.caller { margin-top: auto; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.12); border-radius: 18px; padding: 10px; }
.caller img { width: 40px; height: 40px; border-radius: 50%; }
.caller b { display: block; font-size: 14px; }
.caller small { font-size: 11.5px; color: rgba(255,255,255,0.8); }
.answer { margin-left: auto; width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--green); display: grid; place-items: center; box-shadow: 0 0 0 0 rgba(34,179,90,0.6); animation: ring 1.2s infinite; }
.answer .ico { width: 26px; height: 26px; color: #fff; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.55); } 100% { box-shadow: 0 0 0 16px rgba(255,255,255,0); } }
.incall .face { align-self: center; width: 96px; height: 96px; border-radius: 50%; margin-top: 8px; box-shadow: 0 0 0 4px rgba(255,255,255,0.2); }
.incall .timer { text-align: center; font-size: 13px; color: rgba(255,255,255,0.8); }
.incall .hang { align-self: center; margin-top: auto; width: 62px; height: 62px; border-radius: 50%; border: 0; background: var(--red); display: grid; place-items: center; }
.incall .hang .ico { width: 30px; height: 30px; color: #fff; }

/* map svg pieces */
.pin-pulse { transform-box: fill-box; transform-origin: center; animation: pinPulse 1.6s ease-out infinite; }
@keyframes pinPulse { 0% { transform: scale(0.6); opacity: 0.8; } 100% { transform: scale(2.4); opacity: 0; } }

/* ---------------------------------------------------------------- panel */
.panel { border-left: 1px solid var(--line); min-height: 0; display: flex; flex-direction: column; background: #fff; }
.panel-scroll { overflow-y: auto; padding: 26px 28px 20px; flex: 1; }
.eyebrow { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); }
.panel h1 { font-size: 27px; line-height: 1.15; margin: 8px 0 8px; letter-spacing: -0.02em; font-weight: 800; }
.lead { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.scenarios { display: grid; gap: 8px; margin-top: 18px; }
.scenarios button { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: #fff; transition: border-color 0.15s, background 0.15s; }
.scenarios button:hover { border-color: #e0cbb9; }
.scenarios button[aria-pressed="true"] { border-color: var(--orange); background: #fff6f0; box-shadow: inset 0 0 0 1px var(--orange); }
.scenarios strong { display: block; font-size: 15.5px; }
.scenarios small { display: block; color: var(--ink-2); font-size: 13px; margin-top: 1px; }
.s-ico { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; color: #fff; }
.s-ico .ico { width: 22px; height: 22px; }
.s-red { background: var(--red); } .s-amber { background: #f5a100; } .s-violet { background: #6b3de0; } .s-green { background: var(--green); }

.story { margin-top: 14px; padding: 16px 16px 14px; border-radius: 16px; background: #faf6f2; }
.story ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: st; }
.story li { counter-increment: st; display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 14.5px; line-height: 1.45; color: #9a948e; transition: color 0.3s; }
.story li::before { content: counter(st); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: #ece4dc; color: #8a8178; }
.story li.on { color: var(--ink); }
.story li.on::before { background: var(--orange); color: #fff; }
.story li.done { color: var(--ink-2); }
.story li.done::before { content: '✓'; background: var(--green); color: #fff; }
.story-actions { display: flex; gap: 8px; margin-top: 14px; }
.next { flex: 1; height: 44px; border-radius: 12px; border: 0; background: var(--ink); color: #fff; font-weight: 700; }
.reset { height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 600; }

.shop { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.shop h2 { font-size: 18px; margin: 0; font-weight: 800; }
.block { margin-top: 14px; }
.block > header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.block h3 { margin: 0; font-size: 14.5px; font-weight: 700; }
.block > header span { font-size: 13px; color: var(--ink-2); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg button { padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 15px; }
.seg button small { display: block; font-weight: 500; font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.seg button[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 0; position: relative; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }
.swatch.none { background: repeating-linear-gradient(135deg, #fff 0 5px, #eee 5px 6px); }
.swatch[aria-checked="true"]::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--ink); }
.colophon { margin: 22px 0 0; font-size: 12px; color: #8a8178; line-height: 1.5; }

.summary { border-top: 1px solid var(--line); padding: 14px 28px 18px; }
.price-row { margin-bottom: 10px; }
.price { margin: 0; font-size: 24px; font-weight: 800; }
.meta { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
.buy { width: 100%; height: 52px; border: 0; border-radius: 14px; background: var(--orange); color: #fff; font-size: 16px; font-weight: 800; }

.modal { border: 0; border-radius: 20px; padding: 28px; width: min(400px, 92vw); text-align: center; }
.modal::backdrop { background: rgba(20, 15, 10, 0.45); }
.modal h2 { margin: 4px 0 8px; }
.muted { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.close { position: absolute; top: 8px; right: 12px; }
.close button { border: 0; background: none; font-size: 26px; }

.cap { display: none; }

/* ---------------------------------------------------------------- small screens: one phone at a time */
@media (max-width: 900px) {
  .layout { display: flex; flex-direction: column; overflow-y: auto; }
  .stage { height: calc(100svh - 192px); min-height: 470px; flex: none; }
  .panel { border-left: 0; }
  .panel-scroll { overflow: visible; padding: 22px 18px; }
  .summary { position: sticky; bottom: 0; background: #fff; padding: 12px 18px 16px; }
  .topline { display: none; }
  .powered { top: 12px; left: 12px; font-size: 12.5px; padding: 8px 13px 8px 11px; }
  .views { display: flex; position: absolute; top: 60px; left: 50%; transform: translateX(-50%); z-index: 5; background: rgba(255,255,255,0.85); border: 1px solid var(--line); border-radius: 99px; padding: 4px; gap: 2px; }
  .views button { border: 0; background: none; padding: 7px 14px; border-radius: 99px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
  .views button[aria-selected="true"] { background: var(--ink); color: #fff; }
  .duo { inset: 108px 10px 10px; display: block; }
  .side { position: absolute; inset: 0; transition: opacity 0.35s, transform 0.35s; }
  .duo[data-view="papa"] .side-laura, .duo[data-view="laura"] .side-papa { opacity: 0; pointer-events: none; transform: scale(0.96); }
  figcaption { display: none; }
  .signal { display: none; }
  .app-wrap { margin-top: 0; }
  .duo.has-cap { bottom: 96px; }
  .cap:not([hidden]) { display: flex; position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 6; gap: 10px; align-items: center; background: #fff; border-radius: 16px; padding: 10px 10px 10px 14px; box-shadow: 0 10px 30px rgba(60, 35, 15, 0.16); }
  .cap p { margin: 0; flex: 1; font-size: 13.5px; line-height: 1.35; }
  .cap button { flex: none; border: 0; border-radius: 12px; background: var(--orange); color: #fff; font-weight: 800; font-size: 14px; padding: 11px 13px; max-width: 46%; }
}
