:root {
  --ink: #1f1f1f;
  --muted: #5f6368;
  --line: #e3e8ee;
  --screen: #f0f4f9;
  --card: #ffffff;
  --card-in: #f1f4f8;
  --blue: #0b57d0;
  --blue-soft: #c2e7ff;
  --ring: #427ef9;
  --teal: #90f4e9;
  --green: #bef0bb;
  --lav: #ecdcff;
  --pink: #d55a88;
  --ok-bg: #bdefc6; --ok-ink: #0d5017;
  --info-bg: #cee3fb; --info-ink: #0b3d74;
  --warn-bg: #ffebb3; --warn-ink: #5c4300;
  --risk-bg: #fbd3df; --risk-ink: #7a1a3c;
  --none-bg: #e3e8ee; --none-ink: #3c4043;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --phone-w: 380px;
  --phone-h: 820px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
button { -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
button.card, .tile, .action, .chip, .realm, .discuss, .model-item, .data-pill { transition: transform .12s ease, filter .12s ease; }
button.card:active, .tile:active, .action:active, .chip:active, .realm:active, .discuss:active, .model-item:active, .data-pill:active { transform: scale(.98); filter: brightness(.97); }
.tab:active .tab-icon { background: #dbe6f3; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(135deg, #dde9ff 0%, #eef3fb 45%, #f8fafb 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
svg.chart { display: block; overflow: visible; max-width: 100%; height: auto; }
svg.chart text { font-family: var(--font); }

/* Page chrome */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  max-width: 1680px; margin: 0 auto; padding: 22px 32px 12px;
}
.eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #1a4fa0; }
h1 { margin: 0; font-size: 28px; font-weight: 500; letter-spacing: -.01em; }
.yhat { font-style: italic; }
.lede { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.page-tools { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.legend { margin: 0; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.legend .tag + * { margin-right: 8px; }
.view-switch { display: inline-flex; background: #fff; border-radius: 999px; padding: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 0 0 1px #dfe5ee; }
.view-switch button { border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 14px; }
.view-switch button[aria-pressed="true"] { background: var(--blue-soft); color: #0b2a5b; font-weight: 600; }
.page-foot { max-width: 1680px; margin: 0 auto; padding: 4px 32px 28px; font-size: 12px; color: var(--muted); text-align: center; }

.stage { display: flex; justify-content: center; padding: 6px 16px 14px; }
.gallery { display: grid; grid-template-columns: repeat(4, var(--phone-w)); gap: 26px; transform-origin: top center; }
.gallery.two { grid-template-columns: repeat(2, var(--phone-w)); }
.single { display: grid; justify-items: center; }

/* Phone */
.phone {
  width: var(--phone-w); height: var(--phone-h);
  border-radius: 54px; padding: 9px;
  background: #fbfcfe;
  box-shadow: 0 0 0 1.5px #d4dbe6, 0 18px 40px -18px rgba(30, 60, 110, .35), 0 2px 6px rgba(30,60,110,.08);
}
.screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 46px; overflow: hidden;
  background: var(--screen);
}
.screen[data-tab="play"] { background: linear-gradient(180deg, #d9f1f1 0, var(--screen) 150px); }
.screen[data-tab="model"] { background: linear-gradient(180deg, #ece4fb 0, #f3f0fb 200px, var(--screen) 420px); }
.statusbar { position: absolute; top: 0; left: 0; right: 0; height: 40px; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 34px; font-size: 14px; font-weight: 600; z-index: 3; }
.status-icons { display: flex; gap: 6px; align-items: center; }
.appbar { position: absolute; top: 40px; left: 0; right: 0; height: 52px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 14px; z-index: 3; }
.app-title { font-size: 20px; font-weight: 400; letter-spacing: -.01em; white-space: nowrap; }
.data-pill { justify-self: start; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 999px; background: #fff; font-size: 12px; font-weight: 600; color: #3c4043; border: 0; cursor: pointer; box-shadow: 0 0 0 1px #e1e6ee; }
.data-pill svg { width: 13px; height: 13px; }
.avatar { justify-self: end; width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; background: none; cursor: pointer; }
.avatar svg { width: 36px; height: 36px; }

.scroll { position: absolute; top: 92px; left: 0; right: 0; bottom: 76px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 4px 16px 24px; }
.scroll::-webkit-scrollbar { display: none; }
.scroll.flush { padding-left: 0; padding-right: 0; }

.tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: 76px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 6px 18px; background: rgba(240, 244, 249, .96); backdrop-filter: blur(10px); z-index: 4; border-top: 1px solid rgba(0,0,0,.03); }
.tab { border: 0; background: none; display: grid; justify-items: center; gap: 4px; cursor: pointer; font-size: 12px; color: #3b3f41; padding: 0; }
.tab .tab-icon { width: 58px; height: 30px; border-radius: 999px; display: grid; place-items: center; transition: background .2s; }
.tab .tab-icon svg { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: #0b4f8a; font-weight: 600; }
.tab[aria-current="page"] .tab-icon { background: var(--blue-soft); }
.home-bar { position: absolute; bottom: 7px; left: 50%; width: 120px; height: 4px; margin-left: -60px; border-radius: 4px; background: #1f1f1f; opacity: .85; z-index: 5; }

/* Content primitives */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 2px 10px; }
.sec-head h2 { margin: 0; font-size: 19px; font-weight: 400; letter-spacing: -.01em; }
.sec-head .link { font-size: 13px; color: var(--blue); font-weight: 500; background: none; border: 0; padding: 0; cursor: pointer; }
.kicker { margin: 0; font-size: 12.5px; color: var(--muted); }
.title-lg { margin: 2px 0 0; font-size: 18px; font-weight: 500; }
.white-sheet { background: #fff; border-radius: 28px 28px 0 0; margin: 14px -16px 0; padding: 18px 16px 8px; min-height: 200px; }
.white-sheet .card { background: var(--card-in); }
.card { background: var(--card); border-radius: 22px; padding: 14px; }
.card + .card, .card + .grid2, .grid2 + .card, .grid2 + .grid2 { margin-top: 8px; }
button.card { width: 100%; border: 0; text-align: left; cursor: pointer; display: block; }
button.card:focus-visible, .tab:focus-visible, .chip:focus-visible, .data-pill:focus-visible, .avatar:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid2 > .card { margin: 0; min-width: 0; }
.label { font-size: 13px; font-weight: 500; color: var(--ink); margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.value { font-size: 26px; font-weight: 400; letter-spacing: -.01em; margin: 2px 0 2px; line-height: 1.15; }
.value small { font-size: 14px; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.value.xl { font-size: 30px; }
.sub { font-size: 11.5px; color: var(--muted); margin: 2px 0 0; line-height: 1.35; }
.body { font-size: 13.5px; color: #3c4043; line-height: 1.45; margin: 6px 0 0; }
.chart-wrap { margin-top: 8px; }
.chart-wrap > svg.chart { margin: 0 auto; }
.row { display: flex; align-items: center; gap: 8px; }
.spacer { flex: 1; }

.pill { display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 8px; border-radius: 8px; font-size: 11px; font-weight: 600; white-space: nowrap; margin-top: 6px; }
.pill.ok { background: var(--ok-bg); color: var(--ok-ink); }
.pill.info { background: var(--info-bg); color: var(--info-ink); }
.pill.warn { background: var(--warn-bg); color: var(--warn-ink); }
.pill.risk { background: var(--risk-bg); color: var(--risk-ink); }
.pill.none { background: var(--none-bg); color: var(--none-ink); }

.tag { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 6px; font-size: 10px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.tag.sim { color: #5c4300; background: #fff4cf; box-shadow: inset 0 0 0 1px #f0d68a; }
.tag.real { color: #0b3d74; background: #e3eefc; box-shadow: inset 0 0 0 1px #b9d1f3; }

.chip { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px 0 12px; border-radius: 12px; background: var(--blue-soft); border: 0; font-size: 13.5px; font-weight: 500; color: #0b2a5b; white-space: nowrap; cursor: pointer; }
.chip svg { width: 17px; height: 17px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }

/* Today */
.today-top { display: grid; grid-template-columns: 176px 1fr; gap: 6px; align-items: center; margin-top: 4px; }
.tiles { display: grid; gap: 6px; }
.tile { position: relative; overflow: hidden; display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 6px; height: 56px; border-radius: 16px; padding: 0 10px 0 8px; border: 0; text-align: left; cursor: pointer; }
.tile .ic { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.65); display: grid; place-items: center; }
.tile .ic svg { width: 17px; height: 17px; }
.tile .t-label { font-size: 11.5px; font-weight: 500; line-height: 1.1; }
.tile .t-value { font-size: 19px; line-height: 1.15; }
.tile .t-value small { font-size: 11px; color: #3c4043; }
.tile.teal { background: var(--teal); }
.tile.green { background: var(--green); }
.tile.lav { background: linear-gradient(90deg, #e2c9ff var(--fill, 30%), #f3e8ff var(--fill, 30%)); }
.actions { display: grid; grid-template-columns: 1fr 1fr 40px; gap: 8px; }
.action { height: 40px; border-radius: 20px; border: 0; background: var(--blue-soft); font-size: 14px; font-weight: 500; color: #0b2a5b; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.action.icon { background: #e1e6ee; }
.action svg { width: 17px; height: 17px; }
.legend-row { display: flex; gap: 14px; font-size: 11px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.legend-row i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.legend-row b { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: middle; margin-right: 5px; }
.omen-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.omen { background: #fff; border-radius: 14px; padding: 8px 8px 7px; }
.omen-dots { display: flex; gap: 4px; }
.omen-dots span { width: 15px; height: 15px; border-radius: 50%; opacity: .32; }
.omen-dots span.picked { opacity: 1; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--c); }
.omen p { margin: 6px 0 0; font-size: 11px; color: var(--muted); }
.omen p b { color: var(--ink); font-weight: 600; }
.turn-strip { display: grid; grid-template-columns: repeat(22, 1fr); gap: 2px; margin-top: 8px; }
.turn { height: 28px; border-radius: 6px; display: grid; place-items: center; font-size: 9px; font-weight: 700; color: #fff; position: relative; }
.turn .x { position: absolute; top: -5px; right: -3px; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #fff; }

.help-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 9px 12px; border-radius: 16px; background: #fff1f4; color: #5b3341; font-size: 12.5px; }
.help-row b { color: #7a1a3c; letter-spacing: .03em; }
.help-ic { width: 26px; height: 26px; border-radius: 50%; background: #fbd3df; color: #7a1a3c; display: grid; place-items: center; flex: none; }
.help-ic svg { width: 15px; height: 15px; }
.team-banner { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 2px 0 8px; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.7); color: #46247a; font-size: 11.5px; font-weight: 600; }
.team-banner svg { width: 14px; height: 14px; }

/* Play */
.realms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.realm { position: relative; height: 150px; border-radius: 18px; overflow: hidden; border: 0; padding: 0; cursor: pointer; text-align: left; }
.realm svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.realm::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(180deg, transparent, rgba(10, 14, 30, .55)); }
.realm span { z-index: 1; position: absolute; left: 10px; bottom: 9px; right: 8px; color: #fff; font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.35); line-height: 1.15; }
.realm em { display: block; font-style: normal; font-size: 10.5px; font-weight: 500; opacity: .9; }
.quarters { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); text-align: center; }
.quarters .q { display: grid; justify-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.quarters .disc { width: 16px; height: 16px; margin: 4px 0; border-radius: 50%; background: #e1e6ee; display: grid; place-items: center; }
.quarters .disc.on { background: #0e8f86; width: 24px; height: 24px; margin: 0; }
.quarters .disc.on svg { width: 14px; height: 14px; }
.quarters .disc.next { background: none; box-shadow: inset 0 0 0 2px #9ac7c3; }
.quarters .q.now { color: var(--ink); font-weight: 700; }
button.card.game-row, .game-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; }
.game-row .gi { width: 40px; height: 40px; border-radius: 50%; background: #d9f1ef; display: grid; place-items: center; }
.game-row .gi svg { width: 20px; height: 20px; }
.game-row .g-title { font-size: 15px; }
.game-row .g-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.game-row .g-num { text-align: right; font-size: 22px; }
.game-row .g-num small { display: block; font-size: 11px; color: var(--muted); }
.games-list .card { border-radius: 8px; }
.games-list .card:first-child { border-radius: 22px 22px 8px 8px; }
.games-list .card:last-child { border-radius: 8px 8px 22px 22px; }
.games-list .card + .card { margin-top: 3px; }
.mini-legend { display: flex; gap: 10px; font-size: 10.5px; color: var(--muted); margin-top: 4px; flex-wrap: wrap; }
.mini-legend .ring-key::before { background: #fff; border-radius: 50%; box-shadow: inset 0 0 0 1.6px #1f1f1f; }
.mini-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--c); margin-right: 4px; vertical-align: -1px; }
.x-head { display: flex; align-items: center; gap: 8px; }
.x-badge { font-size: 10px; font-weight: 700; color: #0b4f8a; background: #e3eefc; border-radius: 6px; padding: 2px 6px; }

/* Model */
.y-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.y-hero .card { padding-bottom: 10px; }
.discuss { width: 100%; height: 50px; margin-top: 10px; border-radius: 25px; border: 0; background: #fff; color: #0b57d0; font-size: 15px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 9px; cursor: pointer; box-shadow: 0 0 0 1px #e5e9f0; }
.discuss svg { width: 19px; height: 19px; }
.story { background: var(--screen); border-radius: 28px 28px 0 0; margin: 14px -16px 0; padding: 16px 16px 6px; }
.story .card { background: #fff; }
.chip-sm { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 8px; background: #ece4fb; color: #46247a; font-size: 11.5px; font-weight: 600; }
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 12px; align-items: stretch; }
.pipe { text-align: center; position: relative; padding: 0 2px; }
.pipe .pipe-ic { width: 44px; height: 44px; border-radius: 14px; margin: 0 auto 6px; display: grid; place-items: center; background: #eef2f7; }
.pipe .pipe-ic svg { width: 22px; height: 22px; }
.pipe b { display: block; font-size: 11.5px; }
.pipe span { display: block; font-size: 10px; color: var(--muted); line-height: 1.25; margin-top: 2px; }
.pipe:not(:last-child)::after { content: ""; position: absolute; top: 21px; right: -6px; width: 10px; height: 2px; background: #b6c2d1; }
button.card.iris-card, .iris-card { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; }
.iris-name { font-size: 17px; font-weight: 500; margin: 0; }
.mix { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; font-size: 11.5px; color: #3c4043; }
.mix span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 4px; vertical-align: -0.5px; }
.model-list { display: grid; gap: 1px; margin-top: 8px; background: var(--line); border-radius: 16px; overflow: hidden; }
.model-item { background: #fff; display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; padding: 10px 12px; align-items: start; border: 0; text-align: left; cursor: pointer; width: 100%; }
.model-item .n { width: 22px; height: 22px; border-radius: 50%; background: #ece4fb; color: #46247a; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.model-item b { font-size: 13px; font-weight: 600; display: block; }
.model-item span { font-size: 11.5px; color: var(--muted); display: block; margin-top: 1px; }
.model-item em { font-style: normal; font-size: 10.5px; color: #46247a; background: #f3edfc; border-radius: 6px; padding: 2px 6px; white-space: nowrap; }

.video-wrap { margin-top: 12px; border-radius: 16px; overflow: hidden; background: #0f1222; aspect-ratio: 16 / 9; }
.video-wrap { position: relative; }
/* The video has no sound track, so its volume controls would only confuse. */
.video-wrap video::-webkit-media-controls-mute-button, .video-wrap video::-webkit-media-controls-volume-slider, .video-wrap video::-webkit-media-controls-volume-control-container { display: none; }
.video-wrap video { display: block; width: 100%; height: 100%; object-fit: contain; background: #0f1222; }
.video-retry { display: none; position: absolute; inset: auto 0 0 0; padding: 10px 12px; border: 0; background: rgba(15, 18, 34, .88); color: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.video-wrap.failed .video-retry { display: block; }
.chapters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 8px -14px 0; padding: 0 14px 2px; }
.chapters::-webkit-scrollbar { display: none; }
.chapter { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 0; border-radius: 10px; background: #eef2f7; color: #3c4043; font-size: 12px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.chapter b { font-weight: 600; color: #46247a; font-variant-numeric: tabular-nums; }
.chapter.on { background: #ece4fb; color: #2b1a52; }
.chapter:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

button.card.deck-card { display: grid; grid-template-columns: 116px 1fr; gap: 12px; align-items: center; padding: 10px; }
.deck-card img { width: 116px; height: 104px; object-fit: cover; border-radius: 14px; background: #e6dcf3; }
.present { height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: #2f2356; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.present:focus-visible, .deck-close:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.deck { position: fixed; inset: 0; z-index: 100; background: #1f1838; }
.deck[hidden] { display: none; }
.deck iframe { display: block; width: 100%; height: 100%; border: 0; }
.deck-close { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); left: calc(12px + env(safe-area-inset-left, 0px)); width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(31, 24, 56, .78); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.deck-close svg { width: 20px; height: 20px; }
.deck-close span { display: none; }
/* Wide screens show the deck's map rail at the top left, so the close control moves to the top centre. */
@media (min-width: 900px) {
  .deck-close { left: 50%; transform: translateX(-50%); width: auto; height: 40px; padding: 0 16px 0 12px; border-radius: 20px; display: flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 600; }
  .deck-close svg { width: 16px; height: 16px; }
  .deck-close span { display: inline; }
}
html.deck-open, html.deck-open body { overflow: hidden; }

/* Report */
.status-card { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.big-stat { display: flex; align-items: baseline; gap: 6px; }
.big-stat .value { margin: 0; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.stat-row div { background: var(--card-in); border-radius: 12px; padding: 7px 8px; }
.stat-row b { display: block; font-size: 15px; font-weight: 500; }
.stat-row span { font-size: 10.5px; color: var(--muted); }
.fact { display: grid; grid-template-columns: 1fr; gap: 2px; }
.fact .value { color: #0b3d74; }
.safety { background: #fff1f4; border-radius: 22px; padding: 14px; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.safety .s-ic { width: 40px; height: 40px; border-radius: 50%; background: #fbd3df; display: grid; place-items: center; }
.safety .s-ic svg { width: 21px; height: 21px; }
.safety b { font-size: 14px; font-weight: 600; }
.safety p { margin: 3px 0 0; font-size: 12.5px; color: #5b3341; line-height: 1.4; }
.hotline { display: inline-block; margin-top: 7px; font-size: 20px; font-weight: 600; color: #7a1a3c; letter-spacing: .04em; }

/* Bottom sheet */
.sheet { position: absolute; inset: 0; z-index: 10; display: none; }
.sheet.open { display: block; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(15, 22, 35, .38); border: 0; padding: 0; cursor: pointer; width: 100%; }
.sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 82%; overflow-y: auto; background: #fff; border-radius: 28px 28px 0 0; padding: 10px 18px 26px; scrollbar-width: none; animation: rise .22s ease-out; }
.sheet-panel::-webkit-scrollbar { display: none; }
.sheet-grip { width: 34px; height: 4px; border-radius: 2px; background: #c4cbd4; margin: 0 auto 12px; }
.sheet-panel h3 { margin: 0; font-size: 20px; font-weight: 500; }
.sheet-panel dl { margin: 12px 0 0; display: grid; gap: 10px; }
.sheet-panel dt { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sheet-panel dd { margin: 2px 0 0; font-size: 14px; line-height: 1.45; }
.sheet-close { margin-top: 16px; width: 100%; height: 44px; border-radius: 22px; border: 0; background: var(--blue-soft); font-weight: 600; color: #0b2a5b; cursor: pointer; }
@keyframes rise { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }

.notice { margin: 0 auto 10px; max-width: 520px; background: #fff4cf; color: #5c4300; border-radius: 12px; padding: 8px 12px; font-size: 13px; text-align: center; }

/* The app fills the window on every screen; the four-phone overview is html.gallery-view (app.js sets it). */
html:not(.gallery-view), html:not(.gallery-view) body { height: 100%; overflow: hidden; overscroll-behavior: none; background: var(--screen); }
html:not(.gallery-view) .page-head, html:not(.gallery-view) .page-foot, html:not(.gallery-view) .notice { display: none; }
html:not(.gallery-view) .stage { padding: 0; }
html:not(.gallery-view) .single { display: block; }
html:not(.gallery-view) .phone { position: fixed; top: 0; left: 0; right: 0; width: auto; max-width: 430px; height: 100vh; height: 100dvh; margin: 0 auto; border-radius: 0; padding: 0; box-shadow: none; background: none; zoom: 1; }
html:not(.gallery-view) .screen { border-radius: 0; }
html:not(.gallery-view) .statusbar, html:not(.gallery-view) .home-bar { display: none; }
html:not(.gallery-view) .appbar { top: env(safe-area-inset-top, 0px); padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px)); }
html:not(.gallery-view) .scroll { top: calc(52px + env(safe-area-inset-top, 0px)); bottom: calc(68px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
html:not(.gallery-view) .tabbar { height: calc(68px + env(safe-area-inset-bottom, 0px)); padding: 8px max(6px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); }
html:not(.gallery-view) .sheet-panel { padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px)); }
/* On a laptop the app sits in a phone-width column. */
@media (min-width: 700px) {
  html:not(.gallery-view) body { background: linear-gradient(135deg, #dde9ff 0%, #eef3fb 45%, #f8fafb 100%); }
  html:not(.gallery-view) .phone { box-shadow: 0 0 0 1px #dfe5ee, 0 24px 60px -24px rgba(30, 60, 110, .35); }
}
.sheet-link { display: block; margin-top: 16px; text-align: center; color: var(--blue); font-size: 14px; font-weight: 600; text-decoration: none; }
/* Phone-sized screens never show the overview. The query must equal PHONE_MEDIA in app.js; verify.mjs checks it. */
@media (max-width: 600px), (pointer: coarse) and (max-height: 520px) {
  .sheet-link { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet-panel { animation: none; }
  button.card, .tile, .action, .chip, .realm, .discuss, .model-item, .data-pill { transition: none; }
  button.card:active, .tile:active, .action:active, .chip:active, .realm:active, .discuss:active, .model-item:active, .data-pill:active { transform: none; }
}
