/* Got it Good. System fonts only (no font downloads = no third-party requests). */
:root {
  /* Index charts (step 5; dataviz validator): map = one teal ramp, light→dark, lightest ≥ 2:1 on the surface; donut
     parts = the fixed categorical order (contrast relief: every part is named with its value beside the chart). */
  --map-0: #6cc4ae; --map-1: #3aa98f; --map-2: #078f78; --map-3: #06705e; --map-4: #044c40; --map-none: #ddd4c7; --you: #f2b632;
  --cat-1: #2a78d6; --cat-2: #eb6834; --cat-3: #1baf7a; --cat-4: #eda100; --cat-5: #e87ba4; --cat-6: #008300;
  --bg: #f7f2ea;
  --surface: #fffdf9;
  --ink: #2a2520;
  --ink-2: #5d554c;
  --muted: #8a8075;
  --line: #e8dfd2;
  --track: #ece5da;
  --accent: #078f78;       /* meter fill; validated vs surface (dataviz validator) */
  --accent-ink: #05705e;   /* links and buttons; AA on surface */
  --warm: #b4532a;
  --insight-bg: #fdf1e3;
  --accent-fill: #17a085;  /* filled buttons and selected chips */
  --on-accent: #1b1916;    /* dark text on filled teal: 5.35:1 on #17a085 (WCAG AA) */
  --radius: 16px;
  --shadow: 0 1px 2px rgb(60 40 20 / 6%), 0 6px 24px rgb(60 40 20 / 6%);
  --status-veil: rgb(247 242 234 / 82%);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1916; --surface: #25221e; --ink: #f2ece3; --ink-2: #c9bfb2; --muted: #9a8f82;
    --line: #3a352f; --track: #3a352f; --accent: #17a085; --accent-ink: #5cc9b3; --warm: #e59468;
    --insight-bg: #34291f; --accent-fill: #5cc9b3; --on-accent: #1b1916; --shadow: none; --status-veil: rgb(27 25 22 / 82%); color-scheme: dark;
    --map-0: #0f5e50; --map-1: #13806c; --map-2: #17a085; --map-3: #5cc9b3; --map-4: #a8e6d7; --map-none: #3a352f; --you: #f2b632;
    --cat-1: #3987e5; --cat-2: #d95926; --cat-3: #199e70; --cat-4: #c98500; --cat-5: #d55181; --cat-6: #008300;
  }
}
:root[data-theme="dark"] {
  --bg: #1b1916; --surface: #25221e; --ink: #f2ece3; --ink-2: #c9bfb2; --muted: #9a8f82;
  --line: #3a352f; --track: #3a352f; --accent: #17a085; --accent-ink: #5cc9b3; --warm: #e59468;
  --insight-bg: #34291f; --accent-fill: #5cc9b3; --on-accent: #1b1916; --shadow: none; --status-veil: rgb(27 25 22 / 82%); color-scheme: dark;
  --map-0: #0f5e50; --map-1: #13806c; --map-2: #17a085; --map-3: #5cc9b3; --map-4: #a8e6d7; --map-none: #3a352f; --you: #f2b632;
  --cat-1: #3987e5; --cat-2: #d95926; --cat-3: #199e70; --cat-4: #c98500; --cat-5: #d55181; --cat-6: #008300;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* The iPhone app (Bret, 2026-10-31): long-pressing text selected it (Copy/Translate/Share) and long-pressing a tab showed
   a capacitor://localhost link preview. No selection, callouts or dragging anywhere but text fields (link previews are
   off in capacitor.config.json too). The web app keeps normal selection. */
html[data-app] body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html[data-app] :is(input, textarea, [contenteditable]) { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
html[data-app] :is(a, img) { -webkit-user-drag: none; }
body {
  /* The sky follows the time of day (src/sky.js via main.js): a tint at the top of the page that fades into the
     page color. Text on it is checked for contrast in every sky (tests). */
  margin: 0; color: var(--ink); min-height: 100vh;
  background: linear-gradient(var(--sky-top, var(--bg)), var(--sky-mid, var(--bg)) 240px, var(--bg) 560px) no-repeat, var(--bg);
  font: 16px/1.5 ui-rounded, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--accent-ink); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.small { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.center { text-align: center; }
h1, h2 { line-height: 1.2; letter-spacing: -0.01em; }

.top { padding-top: env(safe-area-inset-top); }
/* Keeps scrolled content from showing through the status bar (iPhone app and home-screen install). */
body::before { content: ''; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top); background: var(--sky-top, var(--bg)); z-index: 50; }
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 18px; }
.link-btn { background: none; border: 0; color: var(--accent-ink); font: inherit; font-size: 14px; cursor: pointer; padding: 8px 0; text-decoration: underline; text-underline-offset: 3px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin: 0 0 16px; }

/* Intake */
.lede { font-size: 18px; color: var(--ink-2); margin: 0 0 20px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.field > span:first-child, .field legend { font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 6px; }
.field small, legend small { color: var(--muted); font-weight: 400; font-size: 13px; }
input, select {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; width: 100%; min-height: 46px;
}
/* Checkboxes are drawn here, the same in light and dark: an outline when off, a teal box with a dark check when on.
   (The page-wide input style above would otherwise paint them as solid squares in dark mode.) */
input[type=checkbox] { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; min-height: 0; padding: 0; margin: 0; flex: none; border: 2px solid var(--ink-2); border-radius: 6px; background: transparent; cursor: pointer; }
input[type=checkbox]:checked { border-color: var(--accent-fill); background: var(--accent-fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.6l3.1 3L12.8 4.6' fill='none' stroke='%231b1916' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
input:focus, select:focus, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
.money { display: flex; align-items: center; gap: 0; }
.money .cur:not(:empty) { padding: 0 10px 0 12px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; background: var(--track); color: var(--ink-2); }
.money .cur:not(:empty) + input { border-radius: 0 10px 10px 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; min-height: 0; padding: 0; left: 0; top: 0; }
.pill span { display: inline-block; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; background: var(--bg); font-size: 15px; }
.pill input:checked + span { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }
.pill input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.check { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.check input { width: 20px; height: 20px; flex: none; }
.more { margin: 0 0 18px; }
.more summary { cursor: pointer; font-weight: 600; color: var(--accent-ink); margin-bottom: 14px; }
.err { color: var(--warm); min-height: 1.5em; margin: 0 0 8px; }
.primary, .secondary { font: inherit; font-weight: 650; border-radius: 12px; cursor: pointer; min-height: 48px; padding: 12px 20px; }
.primary { width: 100%; background: var(--accent-fill); color: var(--on-accent); border: 0; font-size: 17px; }
.secondary { background: transparent; color: var(--accent-ink); border: 1.5px solid var(--accent-ink); }

/* One-question-per-screen intake */
.flow { max-width: 560px; margin: 0 auto; padding: 8px 0 8px; }
.flow-top { display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; gap: 8px; margin: 0 0 14px; min-height: 44px; }
.flow-progress { appearance: none; -webkit-appearance: none; width: 100%; height: 8px; border: 0; border-radius: 4px; overflow: hidden; background: color-mix(in srgb, var(--ink) 15%, transparent); }
.flow-progress::-webkit-progress-bar { background: color-mix(in srgb, var(--ink) 15%, transparent); border-radius: 4px; }
.flow-progress::-webkit-progress-value { background: var(--accent); border-radius: 4px; transition: width 0.25s ease; }
.flow-progress::-moz-progress-bar { background: var(--accent); border-radius: 4px; }
/* First launch and Redo: the questions and the reveal get the whole screen (no tabs). */
body.onboarding #app { padding-top: calc(env(safe-area-inset-top) + 16px); }
.back.cancel { justify-self: end; padding: 10px 0 10px 8px; }
.back { justify-self: start; font: inherit; font-weight: 600; color: var(--accent-ink); background: none; border: 0; padding: 10px 8px 10px 0; min-height: 44px; cursor: pointer; }
.flow-card { padding: 24px 20px; }
.flow-q { font-size: clamp(24px, 6.4vw, 30px); line-height: 1.25; margin: 0 0 20px; }
.big-input { font-size: 22px; min-height: 60px; padding: 14px 16px; border-radius: 14px; }
select.big-input { font-size: 20px; }
.money.big .cur:not(:empty) { height: 60px; font-size: 20px; border-radius: 14px 0 0 14px; padding: 0 14px; }
.money.big .cur:not(:empty) + input { border-radius: 0 14px 14px 0; }
.hint { color: var(--ink-2); font-size: 15px; margin: 10px 0 0; }
.counter { display: grid; grid-template-columns: 64px 1fr 64px; gap: 12px; align-items: center; }
.count-btn { font: inherit; font-size: 30px; line-height: 1; height: 64px; border-radius: 14px; border: 1.5px solid var(--accent-ink); background: var(--surface); color: var(--accent-ink); cursor: pointer; }
.big-input.count { text-align: center; font-size: 30px; font-weight: 700; -moz-appearance: textfield; }
.big-input.count::-webkit-inner-spin-button, .big-input.count::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.flow-field { margin: 22px 0 0; }
.options { display: grid; gap: 10px; }
.option { position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg); cursor: pointer; font-size: 17px; }
.option input { width: 22px; height: 22px; min-height: 0; margin: 0; flex: none; accent-color: var(--accent-ink); }
.option:has(input:checked) { border-color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.option:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.flow-actions { display: grid; gap: 10px; margin-top: 8px; }
.flow-actions .primary { min-height: 56px; }
.skip { font: inherit; font-weight: 600; color: var(--ink-2); background: none; border: 0; min-height: 48px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.skip-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 24px; }
.teaser-k { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; font-weight: 700; color: var(--warm); margin: 0 0 8px; }
.teaser-h { font-size: clamp(28px, 7.5vw, 38px); line-height: 1.2; margin: 0 0 20px; letter-spacing: -0.01em; }
.teaser-dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; max-width: 360px; margin: 0 0 8px; }
.teaser-dots span { aspect-ratio: 1; border-radius: 50%; background: var(--track); }
.teaser-dots span.on { background: var(--accent); }
@media (min-width: 960px) { .flow { padding-top: 32px; } .flow-card { padding: 36px 36px 28px; } .flow-card .avatar-stage { margin: 0 -36px; padding: 8px 36px 10px; } }

/* Results */
.saved { margin: 4px 0 0; font-size: 13px; color: var(--muted); text-align: right; }
.saved .link-btn { font-size: 13px; padding: 4px 0; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; font-weight: 700; color: var(--warm); margin: 0 0 8px; }
.fact-num { font-size: clamp(36px, 9vw, 56px); font-weight: 750; line-height: 1.05; margin: 0 0 8px; letter-spacing: -0.02em; }
.fact-text { font-size: clamp(18px, 4.6vw, 22px); line-height: 1.4; margin: 0 0 12px; max-width: 62ch; }

.lenses { display: grid; gap: 8px 32px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 960px) { .lenses { grid-template-columns: 1fr 1fr; } }
.lens h2 { font-size: 24px; margin: 20px 0 4px; }
.lens-sub { color: var(--ink-2); margin: 0 0 14px; font-size: 15px; }
.stats { display: grid; gap: 16px; grid-template-columns: 1fr; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat-title { font-size: 14px; font-weight: 650; color: var(--ink-2); margin: 0 0 2px; }
.stat-title small { font-weight: 400; color: var(--muted); }
.stat-head { font-size: 34px; font-weight: 750; letter-spacing: -0.02em; margin: 0 0 8px; line-height: 1.1; }
.stat-body { margin: 10px 0 0; color: var(--ink-2); font-size: 15px; }
.stat-body b { color: var(--ink); }

.meter { height: 8px; background: var(--track); border-radius: 4px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

.blist, .levels, .plist { list-style: none; margin: 8px 0 0; padding: 0; }
.blist li { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.blist li:first-child { border-top: 0; }
.blist .meter { grid-column: 1 / -1; }
.b-name { font-size: 15px; }
.blist .lack .b-name { color: var(--muted); }

.levels li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: end; }
.levels li:first-child { border-top: 0; padding-top: 0; }
.levels .meter { grid-column: 1 / -1; }
.lvl { display: flex; flex-direction: column; min-width: 0; }
.lvl-kind { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 650; }
.lvl-name { font-size: 15px; overflow-wrap: anywhere; }
.lvl-num { font-size: 14px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lvl-num b { color: var(--ink); font-size: 16px; }

.insight { background: var(--insight-bg); border-left: 4px solid var(--warm); border-radius: 0 12px 12px 0; padding: 14px 16px; margin: 0 0 16px; font-size: 16px; }
.plist li { padding: 6px 0; color: var(--ink-2); }
.plist b { color: var(--ink); }
.locate p { margin: 0 0 12px; color: var(--ink-2); }

.src { color: var(--muted); }
.privacy { color: var(--ink-2); max-width: 70ch; }
.privacy strong { color: var(--ink); }
.loading { color: var(--muted); padding: 40px 0; }
[hidden] { display: none !important; }

/* Luck summary */
.summary { border-left: 4px solid var(--accent-fill); }
.summary h2 { font-size: clamp(24px, 6vw, 30px); margin: 0 0 8px; }

/* Perspective */
.summary-perspective { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-style: italic; color: var(--ink-2); font-size: 16px; }
.yr, .yr a { color: var(--muted); font-size: 13px; }
.cost-line { display: block; margin-top: 8px; color: var(--ink-2); }
.lenses.one { grid-template-columns: 1fr; }
@media (min-width: 960px) { .lenses.one .stats { grid-template-columns: repeat(2, 1fr); } }

/* GIG score */
.gig { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.gig-name { font-weight: 750; }
.gig-num .out { white-space: nowrap; }
.gig-sub { margin: 0 0 6px; color: var(--ink-2); font-size: 15px; }
.gig-num { font-size: clamp(28px, 7.4vw, 44px); font-weight: 750; letter-spacing: -0.02em; margin: 2px 0 4px; line-height: 1.1; }
.gig-limits a { color: var(--ink-2); }
.gig-num .out { font-size: 18px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }

/* Other ways to see the GIG */
.gig-views { margin: 14px 0 6px; }
.view-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.view-tabs button { font: inherit; font-size: 13px; font-weight: 650; padding: 8px 4px; white-space: nowrap; min-height: 40px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink-2); cursor: pointer; }
.view-tabs button[aria-selected="true"] { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }
.view-panel { margin-top: 14px; }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
.people100 { width: 100%; max-width: 520px; height: auto; margin: 0 auto 8px; } /* grows on wide screens (a foldable's inner screen) */
.voxel-wrap { position: relative; width: 100%; border-radius: 14px; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--surface)); }
.voxel-wrap.globe { aspect-ratio: 1; max-width: 420px; margin: 0 auto; background: radial-gradient(circle at 50% 50%, #12203a, #0b1222 70%); }
/* "Line up all 8 billion" / "Clear" under the globe (build 129), in the view switcher's pill style. */
.wrap-row { margin: 12px 0 0; text-align: center; }
.wrap-btn { font: inherit; font-size: 15px; font-weight: 700; min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 1.5px solid var(--accent-fill);
  background: var(--bg); color: var(--accent-ink); cursor: pointer; }
.voxel { width: 100%; height: 100%; display: block; image-rendering: pixelated; image-rendering: crisp-edges; }
.voxel.drag { cursor: grab; touch-action: pan-y; } .voxel.drag:active { cursor: grabbing; }
.wee { position: absolute; transform: translate(-50%, -160%) scale(0); background: #fffdf9; color: #2a2520; font-weight: 800; font-size: 15px; padding: 4px 10px; border-radius: 12px; box-shadow: 0 2px 0 rgba(0,0,0,0.25); pointer-events: none; transition: transform 0.18s ease-out; white-space: nowrap; }
.wee::after { content: ''; position: absolute; left: 50%; bottom: -6px; border: 6px solid transparent; border-top-color: #fffdf9; border-bottom: 0; transform: translateX(-50%); }
.wee.show { transform: translate(-50%, -160%) scale(1); }
.view-text { font-size: 18px; font-weight: 650; margin: 10px 0 4px; }
.view-text .tick { font-variant-numeric: tabular-nums; }
.legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-left: 6px; }
.legend .sw.you { background: #f2b632; box-shadow: 0 0 0 2px rgba(242, 182, 50, 0.35); } .legend .sw.more { background: #c9b8a3; }
.pixel-scene { width: 100%; max-width: 320px; aspect-ratio: 32 / 20; height: auto; border-radius: 10px; margin: 4px 0 10px; }

/* Today / My results */
.nudge { margin: 8px 0 0; padding: 12px 16px; border-left: 4px solid var(--warm); font-weight: 600; }
.nudge a { color: var(--ink); }
.page-title { font-size: 28px; margin: 12px 0 0; }

/* The tab bar: Today · Index · Give · You, pinned to the bottom (above the home indicator). */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); max-width: 640px; margin: 0 auto; box-sizing: border-box; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabbar[hidden] { display: none; }
.tabbar a { display: grid; justify-items: center; gap: 2px; padding: 4px 0; font-size: 11px; font-weight: 650; color: var(--muted); text-decoration: none; }
.tabbar a[aria-current] { color: var(--accent-ink); }
.tabbar svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Every tabbed screen ends with room for the tab bar plus a margin, so its last link or button always scrolls clear
   of the bar (checked on the smallest iPhone in the eval). The questions, reveal and goodnight have no tab bar. */
:root { --tabbar-h: 62px; }
/* The raised Spin knob stands about 30px above the bar (Bret, 2026-10-18): every tab keeps that clear too. */
body:not(.onboarding) { padding-bottom: calc(var(--tabbar-h) + 24px + 34px + env(safe-area-inset-bottom)); }
#app { padding-top: env(safe-area-inset-top); }
/* A comfortable reading width on big screens (a foldable's inner screen, iPad, desktop): the content stays a centered
   column instead of stretching edge to edge; on phones it's the full width. The tab bar is centered to match. */
#app.wrap { max-width: calc(600px + 32px); }
.brand { white-space: nowrap; }

/* Daily card types */
.kind-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 18px; }
.kind-btn { font: inherit; font-weight: 700; font-size: 17px; min-height: 64px; border-radius: 14px; border: 1.5px solid var(--accent-ink); background: var(--surface); color: var(--accent-ink); cursor: pointer; display: grid; place-content: center; gap: 2px; padding: 10px 8px; }
.kind-btn[aria-pressed="true"] { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }
/* Build 104: the pick is filled with a ✓ and "Today's pick"; the other dims (still a button, still readable). */
.kind-btn[aria-pressed="false"] { border-color: var(--line); color: var(--ink-2); font-weight: 600; }
.kind-sub { font-size: min(13px, 3.75vw); font-weight: 500; line-height: 1.25; text-wrap: balance; }
.kind-pick { font-size: 13px; font-weight: 700; }
.kind-panel { position: relative; }
.kind-head { font-weight: 800; color: var(--accent-ink); margin: 0 0 6px; }
.kind-done { font-weight: 800; color: var(--accent-ink); margin: 0 0 6px; outline: none; }
.done-btn { margin: 12px 0 0; }
.secondary.done-btn { width: 100%; }
/* About 3 days a week (Bret, 2026-10-17): "Not today" sits quietly under the gig; a day off is one line. */
.not-today { margin: 4px 0 -8px; text-align: center; }
.not-today .link-btn { color: var(--ink-2); padding: 10px 16px; }
.gig-rest-line { font-size: 18px; line-height: 1.4; margin: 0; }
/* The moment of doing it: a burst of ✦/♡ and "Nice!" over the panel, gone after about 2 s, leaving "Done today". */
.gig-cheer { position: absolute; inset: -6px; display: grid; place-items: center; background: var(--surface); border-radius: 14px; pointer-events: none; animation: cheer-out 0.4s ease-in 1.6s forwards; }
.gig-cheer b { font-size: 34px; font-weight: 800; color: var(--accent-ink); animation: cheer-pop 0.5s cubic-bezier(0.2, 0.8, 0.3, 1.4) both; }
.gig-cheer i { position: absolute; left: 50%; top: 50%; font-style: normal; font-size: 20px; color: #e0a526; animation: cheer-fly 1.1s ease-out both; }
.gig-cheer i:nth-child(1) { --dx: -110px; --dy: -40px; } .gig-cheer i:nth-child(2) { --dx: 110px; --dy: -44px; }
.gig-cheer i:nth-child(3) { --dx: -70px; --dy: 46px; } .gig-cheer i:nth-child(4) { --dx: 76px; --dy: 50px; }
.gig-cheer i:nth-child(5) { --dx: -150px; --dy: 6px; } .gig-cheer i:nth-child(6) { --dx: 150px; --dy: 2px; }
.gig-cheer i:nth-child(7) { --dx: -20px; --dy: -62px; } .gig-cheer i:nth-child(8) { --dx: 26px; --dy: 62px; }
@keyframes cheer-pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cheer-fly { from { transform: translate(-50%, -50%) scale(0.3); opacity: 0; } 30% { opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1); opacity: 0; } }
@keyframes cheer-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .gig-cheer b, .gig-cheer i { animation: none; } .gig-cheer i { display: none; } }
.kind-prompt { font-size: clamp(20px, 5vw, 24px); line-height: 1.35; margin: 0 0 14px; }
/* A situational gig's alternative anyone can do today (Bret, 2026-10-19). */
.kind-or { font-size: 15px; line-height: 1.4; color: var(--ink-2); margin: -6px 0 14px; }
.kind-saved { font-size: 18px; font-style: italic; color: var(--ink-2); margin: 0 0 8px; }
/* Save drops under the field, full width, when the field can't show all of "Write it down (optional)" beside it (Bret,
   build 103: below about 368 points, and at larger zoom). */
.note-form { display: flex; flex-wrap: wrap; gap: 10px; }
.note-form input { flex: 999 1 200px; min-width: 0; }
.note-form .primary { flex: 1 0 auto; width: auto; min-height: 46px; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Today's cards: Things I love, today's gig (the line is in the hero, below) */
.gig-part { padding: 0; }
.part-label { text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 6px; }
.thing-line { font-size: clamp(20px, 5.2vw, 26px); font-weight: 680; line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
.thing-sub { margin: 6px 0 0; color: var(--ink-2); font-size: 16px; }

/* Settings, Give, Notes */
.thing-grid { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.thing-tile { display: grid; gap: 6px; align-content: start; } /* rows keep their height when the tile next door is taller */
.thing-tile img, .thing-noimg { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; }
.thing-noimg { display: grid; place-items: center; background: var(--track); color: var(--accent-ink); font-size: 36px; }
/* A tile without a photo is a button to add one (Bret, 2026-10-19). */
.thing-addphoto { align-content: center; gap: 4px; border: 1.5px dashed var(--accent-ink); font: 700 15px system-ui, -apple-system, sans-serif; cursor: pointer; }
.thing-addphoto span { font-size: 30px; line-height: 1; }
.thing-addphoto input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.add-head { font-size: 17px; margin: 18px 0 0; }
/* 16px, not smaller: iPhone zooms the whole page in when a smaller text field is tapped, and the zoom sticks. */
.thing-tile input, .thing-tile select, .add-thing input, .add-thing select { min-height: 42px; padding: 8px 10px; font-size: 16px; }
.add-thing { display: grid; gap: 10px; margin-top: 8px; }
@media (min-width: 640px) { .add-thing { grid-template-columns: auto 1fr auto auto; align-items: center; } .add-thing .small { grid-column: 1 / -1; } .add-thing .primary { width: auto; } }
.light { margin: 12px 0 0; }
.share-layout { display: grid; gap: 16px; }
@media (min-width: 960px) { .share-screen { max-width: 1120px; } .share-layout { grid-template-columns: 1fr 1fr; align-items: start; } }
.share-preview-wrap { display: grid; place-items: center; padding: 16px; }
.share-preview { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: var(--shadow); }
.share-preview.story { max-width: 360px; }
.share-form h2 { font-size: 18px; margin: 18px 0 8px; }
.share-actions { display: grid; gap: 10px; margin: 16px 0 8px; }
.screen { max-width: 760px; padding-bottom: 8px; }
.screen h1 { font-size: 32px; margin: 16px 0 8px; }
.screen h2 { font-size: 20px; margin: 0 0 8px; }
.as-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
a.primary.as-link { margin-top: 8px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; min-height: 0; }
.backup-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 4px; }
.backup-row > * { flex: 1 1 200px; } /* the web app's Save / Restore (Settings) */
.restore-link { display: inline; color: var(--accent-ink); font-weight: 600; text-decoration: underline; cursor: pointer; } /* welcome screen */
.danger { color: var(--warm); }
.notes { list-style: none; padding: 8px 20px; }
.note { padding: 14px 0; border-top: 1px solid var(--line); }
.note:first-child { border-top: 0; }
.note-date { font-size: 13px; color: var(--muted); margin: 0; }
.note-prompt { color: var(--ink-2); margin: 4px 0; font-size: 15px; }
.note-text { font-size: 18px; margin: 0 0 4px; }

/* About page */
.prose { max-width: 760px; padding-bottom: 24px; }
.prose h1 { font-size: 32px; margin: 16px 0 12px; }
.prose h2 { font-size: 22px; margin: 28px 0 8px; }
.prose h3 { font-size: 17px; margin: 18px 0 4px; }
.prose li { margin-bottom: 6px; }
.table-wrap { overflow-x: auto; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; }
.prose th, .prose td { text-align: left; padding: 8px; border-top: 1px solid var(--line); vertical-align: top; }

/* Make your avatar */
.avatar-builder { display: grid; gap: 4px; }
.avatar-stage { position: sticky; top: env(safe-area-inset-top); z-index: 5; margin: 0 -20px; padding: 8px 20px 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.avatar-preview-wrap { display: flex; justify-content: center; padding: 4px 0; }
.avatar-preview { height: clamp(110px, 19vh, 240px); width: auto; /* the pinned area stays about a third of the screen, even on an iPhone SE */ aspect-ratio: 26 / 31; image-rendering: pixelated; background: var(--track); border-radius: 14px; padding: 8px; box-sizing: content-box; }
.avatar-preview[hidden], .avatar-crowd[hidden] { display: none; }
.avatar-crowd { width: 100%; max-width: 380px; height: auto; } /* the same size as in the 100-people view */
.crowd-toggle { display: flex; justify-content: center; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 4px 0 8px; }
.crowd-toggle input { width: 20px; height: 20px; }
.avatar-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--track); }
.avatar-tabs [role=tab] { flex: 1 1 auto; font: inherit; font-size: 13px; font-weight: 650; padding: 8px 4px; border-radius: 9px; border: 0; background: none; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.avatar-tabs [aria-selected=true] { background: var(--accent-fill); color: var(--on-accent); }
.avatar-panel { padding-top: 6px; min-height: 40vh; }
.avatar-panel[hidden] { display: none; }
.avatar-rules { margin: 6px 0 8px; padding: 10px 14px; border-radius: 12px; background: var(--track); font-size: 15px; line-height: 1.45; }
.avatar-field { margin: 10px 0 0; border: 0; padding: 0; }
.avatar-field legend { font-weight: 650; margin-bottom: 6px; }
.acc-menu { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); display: grid; gap: 10px; }
.acc-menu[hidden] { display: none; }
.acc-title { margin: 0; font-weight: 650; font-size: 15px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { position: relative; display: block; }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch span { display: block; width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--line); cursor: pointer; }
.swatch input:checked + span { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
.swatch input:focus-visible + span { outline: 3px solid var(--warm); outline-offset: 2px; }

/* Reminders (iPhone app): one row each, a line between them. */
.reminder { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); }
.reminder > .switch-row, .note-kinds .switch-row { flex: 1 1 100%; }
.reminder [role=status] { flex-basis: 100%; margin: 0; }
.sound-preview { width: auto; padding: 8px 16px; min-height: 40px; }

.reminder .field { flex-direction: row; align-items: center; gap: 10px; margin: 0; }
.reminder .field > span:first-child { margin: 0; }
.reminder input[type=time], .reminder select { width: auto; font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
/* What the daily notification can show (step 4): one checkbox each, under its time. */
.reminder .note-kinds { flex-basis: 100%; display: grid; gap: 10px; margin: 4px 0 0; padding: 0; border: 0; }
.reminder .note-kinds legend { padding: 0; margin-bottom: 8px; font-size: 13px; color: var(--ink-2); }

/* Touch feel (the iPhone app and home-screen use): no gray tap flash or long-press callout on controls. */
button, .pill, .swatch, .view-tabs button, .kind-btn, .tabbar a { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }

/* The GIG Index reveal, right after the questions */
.reveal { max-width: 560px; margin: 0 auto; padding: 24px 0 32px; text-align: center; }
.reveal-num { font-size: clamp(44px, 13vw, 64px); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.reveal-num .out { font-size: 0.3em; font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
.reveal .people100 { display: block; margin: 18px auto 6px; width: min(100%, 520px, calc(44vh * 0.697)); } /* the whole reveal fits one screen, even an iPhone SE (the grid is 0.697 wide per tall) */
.reveal .view-text { margin: 10px auto 22px; max-width: 420px; }

/* Splash (iPhone app and home-screen install): a sunrise. It opens on the launch screen's first frame (sky + Earth),
   the G·I·G mark rises from behind the horizon until only its foot is hidden, the sun at the top of its circle, as in
   the icon (1.8 s, ease-out), then a warm glow blooms behind the sun (0.4 s), then 7 short gold rays draw outward from
   it, the middle one first and then in pairs going out (0.5 s), while "Got it
   Good" fades in on the Earth; it holds a moment and fades out (main.js; a tap skips it). The
   scene comes from scripts/logo.mjs via build-ios-assets.mjs; lengths here are in its 1000-unit square. */
:root { --splash-bg: #3b2a52; }
.splash { position: fixed; inset: 0; z-index: 100; background: var(--splash-bg); transition: opacity 0.3s ease; cursor: pointer; }
.splash[hidden] { display: none; }
.splash.out { opacity: 0; }
.splash-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.splash-sun { animation: splash-rise 1.8s cubic-bezier(0.1, 0.6, 0.25, 1) both; }
/* The time of day (main.js sets the class and the colors from src/sky.js): as the sun rises, the sky brightens from
   the launch screen's dusk through sunrise colors to the current sky; the mark rises (morning, day, golden hour) or sets
   down into place (evening), always landing as in the icon; at night it rises with a cream moon in the sun's place
   among twinkling stars, without rays. The strokes stay cream in every sky, with no outline (every sky is deep enough
   for 3:1, tests). */
.splash-sky-dawn { animation: splash-fade 1s ease-in-out both; }
.splash-sky-now { animation: splash-fade 0.9s 0.9s ease-in-out both; }
.dawn-0 { stop-color: var(--splash-dawn-top, transparent); } .dawn-1 { stop-color: var(--splash-dawn-mid, transparent); } .dawn-2 { stop-color: var(--splash-dawn-low, transparent); }
.now-0 { stop-color: var(--splash-top); } .now-1 { stop-color: var(--splash-mid); } .now-2 { stop-color: var(--splash-low); }
.glow-0, .glow-1 { stop-color: var(--splash-glow, #ffd45a); }
.splash-mark .gig-strokes { stroke: var(--splash-mark, #f7f2ea); }
.splash-stars { display: none; }
.star { animation: twinkle 2.4s ease-in-out infinite both; } .star.s1 { animation-delay: 0.5s; } .star.s2 { animation-delay: 1.1s; } .star.s3 { animation-delay: 1.7s; }
@keyframes twinkle { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.splash-glow { transform-box: fill-box; transform-origin: center; animation: splash-bloom 0.4s 1.8s ease-out both; }
/* Each of the 7 rays grows out from its base, the end at the sun (scripts/logo.mjs, sunRays). */
.ray { transform-box: fill-box; transform-origin: 50% 100%; animation: splash-ray 0.24s 2.2s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.ray.r1 { animation-delay: 2.29s; } .ray.r2 { animation-delay: 2.38s; } .ray.r3 { animation-delay: 2.47s; }
.splash-name { animation: splash-up 0.4s 2.4s ease-out both; } /* outlined Nunito Black (scripts/logo.mjs) */
@keyframes splash-rise { from { transform: translateY(340px); } to { transform: none; } }
@keyframes splash-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes splash-bloom { from { opacity: 0; transform: scale(0.45); } to { opacity: 1; transform: none; } }
@keyframes splash-ray { from { opacity: 0; transform: scaleY(0); } to { opacity: 1; transform: none; } }
@keyframes splash-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .splash-sun, .splash-glow, .ray, .splash-name, .splash-sky-dawn, .splash-sky-now, .star { animation: none; } .splash { transition: none; }
}

/* "Say goodnight": the splash scene in reverse. The sun sets behind the Earth (2 s), the night sky fades
   in, the stars come out, then the closing card. Reduced motion: the still (sun down, stars out, card shown). */
.goodnight-btn { display: flex; gap: 10px; align-items: center; justify-content: center; border-radius: 16px; padding: 16px; font-weight: 700; font-size: 17px; text-decoration: none; color: #f7f2ea; background: linear-gradient(135deg, #2d2347, #3b4a7a); }
.gn-btn-sub { display: block; font-size: 14px; font-weight: 500; margin-top: 2px; } /* Bret, build 104 */
.goodnight-view { position: fixed; inset: 0; z-index: 90; background: #0b1026; }
.gn .splash-sun { animation: gn-set 2s cubic-bezier(0.45, 0, 0.7, 1) both; }
.gn .splash-sky-now { animation: splash-fade 2.2s ease-in both; }
.gn .splash-rays { animation: gn-out 0.6s ease-in both; }
.gn .ray, .gn .splash-glow { animation: none; }
.gn .splash-name { display: none; }
.gn .splash-stars { display: inline; opacity: 0; animation: splash-fade 1s 1.7s ease-out both; }
.gn-card { position: absolute; left: 16px; right: 16px; top: 66%; max-width: 520px; margin: 0 auto; color: #f7f2ea; text-align: center; display: grid; gap: 10px; animation: splash-up 0.5s 2.3s ease-out both; }
.gn-k { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #cfc6ba; }
.gn-line { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.3; }
.gn-sub { margin: 0; font-size: 14px; color: #cfc6ba; }
/* Like Today's note (build 103): Save drops under the field, full width, when the placeholder can't fit beside it. */
.gn-form { display: flex; flex-wrap: wrap; gap: 8px; }
.gn-form input { flex: 999 1 200px; min-width: 0; background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.25); color: #f7f2ea; }
.gn-form .primary { flex: 1 0 auto; min-height: 46px; padding: 0 20px; }
.gn-form input::placeholder { color: #cfc6ba; }
.gn-close { justify-self: center; color: #f7f2ea; border-color: rgba(247,242,234,0.6); margin-top: 6px; }
/* Build 105 (Bret): a crescent moon comes out with the stars, and the night's one good thing sits softly in the sky
   among them: it drifts up from the card when saved, or is already there when the screen reopens. */
.gn-moon { position: absolute; top: 13%; right: 17%; width: 46px; height: 46px; border-radius: 50%; box-shadow: inset -13px 5px 0 0 #f4ecd2; filter: drop-shadow(0 0 10px rgba(244, 236, 210, 0.45)); animation: splash-fade 1s 1.7s ease-out both; }
.gn-sky-note { position: absolute; left: 24px; right: 24px; top: 31%; max-width: 520px; margin: 0 auto; text-align: center; font-size: 22px; font-style: italic; font-weight: 600; line-height: 1.35; color: rgba(247, 242, 234, 0.82); text-shadow: 0 0 14px rgba(255, 228, 160, 0.35); animation: gn-note-in 1.4s ease-out both; }
.gn-sky-note.reopen { animation-delay: 2.3s; }
@keyframes gn-note-in { from { opacity: 0; transform: translateY(160px); } to { opacity: 1; transform: none; } }
@keyframes gn-set { from { transform: none; } to { transform: translateY(340px); } }
@keyframes gn-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .gn .splash-sun, .gn .splash-sky-now, .gn .splash-rays, .gn .splash-stars, .gn-card, .gn-moon, .gn-sky-note { animation: none; }
  .gn .splash-sun { transform: translateY(340px); } .gn .splash-stars { opacity: 1; } .gn .splash-rays { opacity: 0; }
}

/* A rough day's Today: a greeting on the time-of-day sky, then the gentle cards. */
.greet { display: flex; gap: 12px; align-items: center; padding: 18px 0 44px; }
/* The user's avatar beside the greeting (Bret, builds 101 and 102): round with a ring, 80 points, the pixel avatar
   fitted inside; tap to edit it in You. No avatar yet: a soft figure with a small gold "+" on the circle's lower-right
   edge. The Settings gear sits up top, clear of the greeting; when the greeting can't fit beside the avatar (125% zoom at 320
   points) it drops under it, full width, so the chip stays on one line. */
.greet, .hero-top { position: relative; flex-wrap: wrap; align-items: flex-end; column-gap: 12px; row-gap: 0; }
:is(.greet, .hero-top) > .settings-btn { position: absolute; top: 0; right: 0; }
:is(.greet-text, .hero-greet) { flex: 1 1 170px; min-width: 0; margin-top: 44px; }
.me-avatar { position: relative; flex: none; width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: color-mix(in srgb, var(--surface) 70%, transparent); border: 2px solid var(--line); text-decoration: none; }
.me-avatar canvas { width: 65px; height: 78px; margin-top: 4px; image-rendering: pixelated; clip-path: circle(36px at 50% 46%); }
.me-avatar svg { width: 100%; height: 100%; fill: currentColor; opacity: 0.55; clip-path: circle(50%); }
.me-plus { position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; font-weight: 800; line-height: 1; color: #2b1d05; background: #f0b429; border: 2px solid var(--bg); }
:is(.hero, .greet-photo) .me-avatar { color: #fffaf2; background: rgba(16, 12, 10, 0.4); border-color: rgba(255, 250, 242, 0.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
:is(.hero, .greet-photo) .me-plus { border-color: rgba(16, 12, 10, 0.6); }
.card:has(#avatar-form) { scroll-margin-top: calc(env(safe-area-inset-top) + 12px); }
.greet-h { margin: 0; font-size: min(26px, 6.4vw); /* one line for "Good afternoon, Sam" beside the avatar at 320 points (Bret, build 102) */ line-height: 1.15; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.greet-date { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.settings-btn { flex: none; width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center; color: var(--ink-2); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.settings-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.love-card { position: relative; display: block; width: 100%; aspect-ratio: 2.1 / 1; padding: 0; margin: 0 0 16px; border: 0; border-radius: var(--radius); overflow: hidden; cursor: pointer; background: var(--track); box-shadow: var(--shadow); text-align: left; font: inherit; }
.love-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.love-cap { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 2px; padding: 28px 14px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.6)); color: #fff; }
.love-cap .part-label { color: rgba(255, 255, 255, 0.88); margin: 0; }
.love-cap b { font-size: 16px; line-height: 1.3; }
.love-cap .thing-sub { font-size: 14px; color: rgba(255, 255, 255, 0.9); }
.love-empty { display: grid; gap: 4px; color: var(--ink-2); text-decoration: none; }
.lightbox { position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: calc(env(safe-area-inset-top) + 16px) 16px calc(env(safe-area-inset-bottom) + 16px); background: rgba(10, 10, 12, 0.94); color: #fff; }
.lightbox img { max-width: 100%; max-height: 72vh; border-radius: 14px; object-fit: contain; }
.lightbox p { margin: 0; display: grid; gap: 2px; text-align: center; }
.lightbox .part-label { color: rgba(255, 255, 255, 0.8); }
.lightbox .secondary { color: #fff; border-color: rgba(255, 255, 255, 0.6); width: auto; padding: 10px 22px; }
.privacy-card .privacy { margin: 0 0 6px; }

/* The tip jar (#/tips; src/tips.js). */
.tip-list { display: grid; gap: 10px; margin: 16px 0 12px; }
.tip { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.tip:disabled { opacity: 0.6; }
.tip-name { font-weight: 700; }
.tip-price { font-weight: 800; font-variant-numeric: tabular-nums; }
.tip-cause { grid-column: 1 / -1; font-size: 0.85rem; color: var(--ink-2); }
.tips-thanks { text-align: center; display: grid; justify-items: center; gap: 12px; padding-top: 24px; }
.thanks-burst { width: 180px; height: 180px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, rgba(255, 212, 90, 0.75) 0 30%, rgba(255, 212, 90, 0) 70%); animation: thanks-burst 1.1s cubic-bezier(0.2, 0.8, 0.3, 1.3) both; }
.thanks-burst canvas { width: 78px; height: 93px; image-rendering: pixelated; }
@keyframes thanks-burst { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .thanks-burst { animation: none; } }

/* Bret's principle (Welcome, rough day), and rough-day mode on Today (docs/GENTLE-PLAN.md). */
.principle { margin: 16px 0; padding: 4px 0 4px 14px; border-left: 3px solid var(--accent-fill); color: var(--ink); font-style: italic; line-height: 1.5; }
.rough-chip { margin-top: 8px; font: inherit; font-size: 0.8125rem; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer; }
/* The ⓘ beside the chip (Bret, build 102): a 22-point circle in a 44-point button; the negative margins keep the row
   as tall as the chip. */
.rough-row { display: flex; align-items: center; margin-top: 8px; }
.rough-row .rough-chip { margin-top: 0; white-space: nowrap; }
.rough-info { flex: none; width: 44px; height: 44px; margin: -9px -11px -9px -6px; padding: 0; display: grid; place-items: center; border: 0; background: none; color: var(--ink-2); cursor: pointer; font: inherit; }
.rough-info span { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; font-family: Georgia, 'Times New Roman', serif; font-size: 14px; font-weight: 700; font-style: italic; line-height: 1; }
:is(.hero, .greet-photo) .rough-info { color: #fffaf2; }
:is(.hero, .greet-photo) .rough-info span { background: rgba(16, 12, 10, 0.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-color: rgba(255, 250, 242, 0.7); }
.sheet { position: fixed; inset: 0; z-index: 95; display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px calc(env(safe-area-inset-bottom) + 16px); background: rgba(10, 10, 12, 0.5); }
.sheet-card { width: 100%; max-width: 420px; display: grid; gap: 10px; padding: 22px 20px 18px; border-radius: 22px; background: var(--surface); color: var(--ink); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3); }
.sheet-card h2 { margin: 0; font-size: 20px; }
.sheet-card p { margin: 0 0 6px; color: var(--ink-2); line-height: 1.5; }
.sheet-card .secondary { width: 100%; }
.rough-chip[aria-pressed="true"] { background: var(--surface); color: var(--ink); border-color: var(--accent-fill); }
.rough-card .principle { margin-top: 0; }
.rough-line { font-size: 1.2rem; font-weight: 700; color: var(--ink); line-height: 1.4; margin: 0; }
.hide-love { margin: -6px 0 12px; text-align: right; }
.help-card summary { cursor: pointer; font-weight: 700; color: var(--ink-2); }
.help-card[open] summary { margin-bottom: 8px; }

/* Today (app/today-hero.js): (b) today's Things I love photo as the hero, or (a) the sunrise hero without one. */
.hero { position: relative; margin: calc(-1 * env(safe-area-inset-top)) -16px 0; padding: calc(env(safe-area-inset-top) + 10px) 20px 0; color: #fffaf2; overflow: hidden; display: flex; flex-direction: column; }
.hero-art, .hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-photo { object-fit: cover; }
.hero > :not(.hero-art):not(.hero-open) { position: relative; z-index: 1; }
.hero-top { display: flex; }
.hero-hello { margin: 4px 0 0; font-size: min(20px, 5.9vw); /* one line for "Good afternoon, Sam" beside the avatar at 320 points */ font-weight: 700; text-shadow: 0 1px 10px rgba(20, 10, 30, 0.35); }
/* Over any photo or sky: its own dark glass, so it reads on bright skies and white sand too. */
.hero .rough-chip { color: #fffaf2; font-weight: 650; border-color: rgba(255, 250, 242, 0.7); background: rgba(16, 12, 10, 0.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hero-gear { color: #fffaf2; background: rgba(16, 12, 10, 0.4); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hero-body { text-shadow: 0 1px 14px rgba(20, 10, 30, 0.4); }
.hero-eyebrow { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; opacity: 0.9; }
.hero-label { margin: 6px 0 0; font-size: 14px; font-weight: 600; opacity: 0.9; }
.hero-num { margin: 2px 0 0; font-size: 56px; line-height: 1; font-weight: 800; letter-spacing: -0.03em; color: #ffd45a; }
.hero-action { margin: 8px 0 0; font-size: 16px; font-weight: 600; }
.hero-action span { color: #ffd45a; }
.hero-line { margin: 8px 0 0; font-size: 24px; line-height: 1.25; font-weight: 750; letter-spacing: -0.01em; }
.hero-src { margin: 6px 0 0; color: rgb(255 250 242 / 82%); }
.hero-src a { color: inherit; }
/* (a) sunrise hero: the line up in the sky, the sun and hill below it. */
.hero-a { min-height: min(68vh, 560px); }
.hero-a .hero-body { margin: 28px 0 0; padding-bottom: 190px; text-align: center; }
.hero-a .hero-art { height: 100%; }
.badges { display: grid; grid-auto-flow: column; grid-template-columns: 1.5fr; grid-auto-columns: 1fr; gap: 6px; margin: -30px 0 0; position: relative; z-index: 2; padding: 6px; border-radius: 20px; background: var(--surface); box-shadow: 0 8px 24px rgba(30, 20, 10, 0.14); border: 1px solid var(--line); }
.badge { display: grid; align-content: center; justify-items: center; gap: 0; padding: 6px 4px; border-radius: 14px; color: var(--ink); text-decoration: none; text-align: center; }
.badge b { font-size: 19px; line-height: 1.1; }
.badge small { font-size: 11px; color: var(--muted); line-height: 1.2; }
.badge-ring { grid-auto-flow: column; justify-content: start; gap: 8px; text-align: left; justify-items: start; padding-left: 6px; font-size: 11px; color: var(--muted); line-height: 1.2; }
.badge-ring { white-space: nowrap; }
.badge-ring .ring b { font-size: 8px; } /* .badge b would make it 19px; 8 keeps "90–100" inside the small ring (Bret, 2026-10-19) */
.badge-ring small { display: block; font-size: 12px; font-weight: 700; color: var(--ink); }
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { width: 100%; height: 100%; }
.ring b { position: absolute; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.ring-track { fill: none; stroke: var(--track); stroke-width: 9; }
.ring-fill { fill: none; stroke: #f0b429; stroke-width: 9; stroke-linecap: round; }
.ring-sm { width: 46px; height: 46px; } .ring-sm b { font-size: 11px; }
.ring-lg { width: 92px; height: 92px; } .ring-lg b { font-size: 21px; }
/* (b) your photo, your morning: the photo full width, the line over its lower half, a ring card overlapping it. */
.hero-b { min-height: min(66vh, 560px); justify-content: space-between; background: #222; isolation: isolate; }
.hero-open { position: absolute; inset: 0; z-index: -1; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* Taps anywhere on the photo open it full screen, except on the chip and the lock. */
.hero-b .hero-top, .hero-b .hero-body { pointer-events: none; }
.hero-b .hero-top :is(a, button) { pointer-events: auto; }
.hero-b::before, .hero-b::after { content: ''; position: absolute; left: 0; right: 0; z-index: 0; pointer-events: none; }
.hero-b::before { top: 0; height: 200px; background: linear-gradient(rgba(10, 8, 6, 0.55), transparent); }
.hero-b::after { bottom: 0; height: 70%; background: linear-gradient(transparent, rgba(10, 8, 6, 0.78) 62%); }
.hero-b .hero-body { padding: 24px 0 64px; } /* at least 24 points under the header, even when the greeting stacks under the avatar */
.hero-caption { margin: 12px 0 0; font-size: 13px; font-weight: 600; opacity: 0.85; }
/* Each count stays on one line (Bret's phone, build 100): the counts take the width they need, the ring's words drop
   under the ring when the rest is too narrow (an iPhone SE, or Display Zoom at 320 points), and with no room even for
   that the counts move under the ring. */
.ring-card { position: relative; z-index: 2; margin: -44px 0 0; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 22px; }
.ring-main { flex: 1 1 92px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; color: var(--ink); text-decoration: none; font-size: 13px; color: var(--muted); }
.ring-main > span:last-child { flex: 1 1 96px; }
.ring-main small { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.06em; }
.ring-main span b { display: block; font-size: 20px; color: var(--ink); }
.ring-main .ring b { display: inline; font-size: 16px; } /* .ring-main span b would make it 20px; 16 keeps "90–100" inside the stroke (Bret, 2026-10-19) */
.ring-counts { display: grid; gap: 6px; border-left: 1px solid var(--line); padding-left: 14px; }
.ring-counts a { color: var(--ink-2); text-decoration: none; font-size: 13px; white-space: nowrap; }
.ring-counts b { color: var(--ink); font-size: 16px; }
body:has(.hero, .greet-photo)::before { display: none; } /* the hero (and Rough day's photo header) runs under the status bar */
body:has(.greet-photo), body.plain { background: var(--bg); } /* no sky tint below Rough day's photo header, or on Index, Give and You (Bret, build 100) */
body.plain::before { background: var(--bg); }
/* Once the page scrolls, the status bar gets a blurred backdrop in the page color, so Today's hero text never runs under
   the time and battery (Bret, build 104). body.under-status is set in app/main.js. */
body.under-status::before { display: block; background: var(--status-veil); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }
/* Rough day's header on today's photo (Bret, build 100): about 40% of the hero's height, blurred and darkened so the
   white greeting and chip read on any photo. The photo overhangs its box so the blur has no soft edges. */
.greet-photo { position: relative; margin: calc(-1 * env(safe-area-inset-top)) -16px 16px; padding: env(safe-area-inset-top) 16px 0; min-height: min(26vh, 224px); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; isolation: isolate; background: #222; }
.greet-photo-img { position: absolute; inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px); object-fit: cover; z-index: -1; filter: blur(14px) brightness(0.55); }
.greet-photo .greet { padding: 18px 0 22px; }
.greet-photo :is(.greet-h, .greet-date) { color: #fffaf2; text-shadow: 0 1px 10px rgba(20, 10, 30, 0.35); }
.greet-photo .rough-chip { color: #fffaf2; font-weight: 650; border-color: rgba(255, 250, 242, 0.7); background: rgba(16, 12, 10, 0.5); }
.greet-photo .settings-btn { color: #fffaf2; background: rgba(16, 12, 10, 0.4); }

/* You and Settings (Bret, 2026-10-17): the gear on You opens Settings. */
.screen-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gear { display: grid; place-items: center; width: 44px; height: 44px; margin-top: 8px; border-radius: 22px; color: var(--ink-2); }
.gear svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.back-link { margin: 12px 0 0; }
.web-mark { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 4px; font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none; } /* web welcome only (Bret, 2026-11-15) */
.web-mark img { border-radius: 6px; }
.web-links { margin-top: 10px; } /* web Settings only: gotitgood.app · Get the iPhone app */
.app-version { font-size: 12px; color: var(--muted); opacity: 0.75; margin: -4px 0 12px; }
.back-link a { font-weight: 600; color: var(--accent-ink); text-decoration: none; }

/* Your answers: one row per answer; tapping opens its editor in place. */
.answers { list-style: none; margin: 0; padding: 0; }
.answer { border-top: 1px solid var(--line); }
.answer:first-child { border-top: 0; }
.answer-row { display: grid; grid-template-columns: 1fr auto 16px; align-items: center; gap: 4px 12px; width: 100%; min-height: 52px; padding: 10px 0; background: none; border: 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.answer-label { font-weight: 600; }
.answer-value { color: var(--ink-2); text-align: right; max-width: 52vw; overflow-wrap: anywhere; }
.answer-value.blank { color: var(--accent-ink); }
.answer-value.declined { color: var(--muted); font-style: italic; }
.answer-chev { color: var(--muted); transition: transform 0.2s ease; }
.answer-row[aria-expanded="true"] .answer-chev { transform: rotate(90deg); }
.answer-form { padding: 4px 0 16px; }
.answer-q { font-size: 18px; margin: 0 0 12px; }
.answer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.answer-note { padding: 10px 0; color: var(--muted); border-top: 1px solid var(--line); }
.moved { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); font-weight: 600; transition: opacity 0.6s ease; }
.moved.fade { opacity: 0.55; }
.review .primary { margin-top: 8px; }
.count-nudge { color: var(--accent-ink) !important; font-weight: 600; }
.quick-share { margin: 6px 0 0; text-align: right; }
.pills.matters { margin: 0 0 14px; }
.pill input:disabled + span { opacity: 0.45; cursor: default; }

/* Index v2 (step 5): the topic picker, the fact cards by topic, then Your GIG Index. */
.topic-picker { margin: 8px 0 4px; }
.topic-picker .pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.topic-h { font-size: 22px; margin: 28px 0 10px; }
.fact-card h3 { font-size: 18px; margin: 0 0 10px; }
.fact-card .fact-line { margin: 10px 0 6px; }
.fact-card .fact-src { margin: 6px 0 0; color: var(--muted); }
.your-answer { margin: 6px 0; padding: 8px 12px; border-radius: 10px; background: var(--bg); font-size: 15px; }
.your-answer span { color: var(--ink-2); font-weight: 600; margin-right: 4px; }
.chart { display: block; width: 100%; height: auto; touch-action: pan-y; }
.chart text { font-size: 12px; font-weight: 600; fill: var(--ink-2); }
.chart .c-val { fill: var(--ink); font-size: 13px; }
.chart .c-axis { stroke: var(--line); stroke-width: 1; }
.chart .c-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .c-dot, .chart .c-hover { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .c-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .c-on { fill: var(--accent); }
.chart .c-off { fill: var(--track); }
.chart .c-part { fill: none; stroke-width: 20; }
.chart-read { min-height: 1.4em; margin: 4px 0 0; color: var(--ink-2); }
.pie-legend { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; font-size: 15px; }
.pie-legend .sw, .map-legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.map-legend { display: flex; align-items: center; gap: 2px; margin: 6px 0 0; }
.map-legend .lo { margin-right: 6px; }
.map-legend .hi { margin-left: 6px; }
.map-legend .sw { margin: 0; width: 18px; border-radius: 2px; }
.c-cat-1 { stroke: var(--cat-1); }
.sw.c-cat-1 { background: var(--cat-1); }
.c-cat-2 { stroke: var(--cat-2); }
.sw.c-cat-2 { background: var(--cat-2); }
.c-cat-3 { stroke: var(--cat-3); }
.sw.c-cat-3 { background: var(--cat-3); }
.c-cat-4 { stroke: var(--cat-4); }
.sw.c-cat-4 { background: var(--cat-4); }
.c-cat-5 { stroke: var(--cat-5); }
.sw.c-cat-5 { background: var(--cat-5); }
.c-cat-6 { stroke: var(--cat-6); }
.sw.c-cat-6 { background: var(--cat-6); }
.sw.c-map-0 { background: var(--map-0); }
.sw.c-map-1 { background: var(--map-1); }
.sw.c-map-2 { background: var(--map-2); }
.sw.c-map-3 { background: var(--map-3); }
.sw.c-map-4 { background: var(--map-4); }
.topic-more { margin: 2px 0 0; font-weight: 700; }

/* ---------- Spin for Good (phase 1; Bret, 2026-10-18; approved mockups ~/Desktop/gig-spin-mock) ---------- */
:root { --spin-teal: #17a085; --spin-coral: #e8735a; --spin-gold: #f2b632; --spin-blue: #4a5fa8; --spin-peach: #f2c9ad; --spin-butter: #f3dc9e; --ring-edge: #3b2a52; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ring-edge: #f2b45a; } }
:root[data-theme="dark"] { --ring-edge: #f2b45a; }
/* The knob: a mini wheel in a ring of the splash's sunrise gradient. Ready: a soft gold glow, a very slow turn and an
   occasional shimmer. Done: muted and still until midnight. Rough day: the two-color gentle wheel. Reduce Motion: glow
   only. The thin ring edge keeps it 3:1 against the bar in both themes (purple on light, gold on dark). The edge and the
   inner cream rim are whole points, 2 each, so they draw the same width on every side at 2x and 3x (at 1.5 they came out
   3 px one side, 5 the other); the rim is one circle on the knob over every state, so before and after a spin match
   (Bret, build 130). The ring's darkest stop is a deep terracotta, not the edge's purple, so its bottom-left doesn't
   read as the wheel sitting off-center (Bret, build 131). */
.tabbar .spin-tab { position: relative; align-content: end; color: var(--accent-ink); }
/* The label sits 3pt lower so it doesn't crowd the knob (Bret, 2026-10-19). */
.tabbar .spin-tab > span:last-child { position: relative; top: 3px; }
/* A bump of the tab bar itself behind the knob (same color, blur and top border), so page content passes cleanly
   behind the raised knob instead of showing around it (Bret, 2026-10-18). */
.tabbar .spin-tab::before { content: ''; position: absolute; left: 50%; top: -38px; width: 86px; height: 86px; margin-left: -43px; border-radius: 50%; box-sizing: border-box;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line);
  clip-path: inset(0 0 calc(100% - 33px) 0); pointer-events: none; }
.spin-tab .knob { position: relative; width: 62px; height: 62px; margin-top: -30px; border-radius: 50%; padding: 5px; box-sizing: border-box;
  background: conic-gradient(from 210deg, #8a4636, #b4532a 40%, #f2b45a 60%, #b4532a 80%, #8a4636);
  box-shadow: 0 0 0 2px var(--ring-edge), 0 0 0 5px var(--bg), 0 6px 16px rgb(0 0 0 / 22%); }
.spin-tab .mini { display: block; width: 52px; height: 52px; stroke: none; }
.spin-tab .mini .turn { display: block; width: 100%; height: 100%; }
.spin-tab .knob::before { content: ''; position: absolute; inset: 5px; z-index: 1; border-radius: 50%; box-shadow: inset 0 0 0 2px #fff8ec; pointer-events: none; }
.spin-tab .mini.gentle, .spin-tab.rough .mini.full { display: none; }
.spin-tab.rough .mini.gentle { display: block; }
.spin-tab.ready .knob { box-shadow: 0 0 0 2px var(--ring-edge), 0 0 0 5px var(--bg), 0 0 22px 8px rgb(255 180 60 / 55%), 0 6px 16px rgb(0 0 0 / 22%); }
/* The wheel turns as a picture (icons/spin-wheel.svg in an img): turning live SVG shapes drew its edge as a polygon. */
.spin-tab.ready .mini .turn { animation: spin-idle 40s linear infinite; transform-origin: 26px 26px; }
.spin-tab.ready .knob::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgb(255 255 255 / 55%) 50%, transparent 65%) -60px 0 / 200% 100% no-repeat; animation: spin-shimmer 7s ease-in-out infinite; }
@keyframes spin-idle { to { transform: rotate(360deg); } }
@keyframes spin-shimmer { 0%, 80% { background-position: -60px 0; } 100% { background-position: 60px 0; } }
/* After the spin (Bret, 2026-10-19): the result's icon on its slice color, "Your spin"; after "I did it" on a spun
   Daily Gig, the Share icon with a gold ✓, "Share". */
.spin-tab .mini.result, .spin-tab .mini.share, .spin-tab .did { display: none; }
.spin-tab:not([data-state="ready"]) .mini.full, .spin-tab:not([data-state="ready"]) .mini.gentle { display: none; }
.spin-tab[data-state="result"] .mini.result, .spin-tab[data-state="share"] .mini.share { display: block; }
.spin-tab .mini.result .disc { fill: #17a085; }
.spin-tab[data-kind="photo"] .mini.result .disc { fill: #e8735a; }
.spin-tab[data-kind="line"] .mini.result .disc { fill: #f2b632; }
.spin-tab[data-kind="fact"] .mini.result .disc { fill: #4a5fa8; }
.spin-tab.rough[data-kind="photo"] .mini.result .disc { fill: #f2c9ad; }
.spin-tab.rough[data-kind="line"] .mini.result .disc { fill: #f3dc9e; }
/* The result icons are drawn shapes centered on the disc, not font glyphs: the ☀ glyph's ink sat 2pt below center on
   Bret's iPhone (build 130). */
.spin-tab .mini.result { color: #fff8ec; }
/* The sun on the gold disc is dark brown, as on a rough day: cream on gold was too faint (Bret, build 132). */
.spin-tab.rough .mini.result, .spin-tab[data-kind="line"] .mini.result { color: #5a3a28; }
.spin-tab .mini.result .ic { display: none; }
.spin-tab[data-kind="gig"] .ic.gig, .spin-tab[data-kind="photo"] .ic.photo, .spin-tab[data-kind="line"] .ic.line, .spin-tab[data-kind="fact"] .ic.fact { display: inline; }
.spin-tab[data-state="share"] .did { display: block; position: absolute; right: -3px; top: -3px; width: 22px; height: 22px; border-radius: 50%;
  background: #f2b632; color: #1b1916; font: 800 13px/22px system-ui, sans-serif; text-align: center; box-shadow: 0 0 0 2px var(--bg); }

/* The spin screen: the sunrise sky with slow rays behind the wheel (Today and Index stay calm). */
body.spinning { padding-bottom: 0; }
body.spinning::before { background: #3b2a52; } /* the status bar band takes the sky's top color */
.spin-screen { position: fixed; inset: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; color: #fff; text-align: center;
  padding: calc(env(safe-area-inset-top) + 18px) 16px 0; box-sizing: border-box; --wheel: min(320px, 82vw, 42vh);
  background: linear-gradient(180deg, #3b2a52 0%, #6e3a4c 38%, #b4532a 68%, #f2b45a 100%); }
.spin-screen.rough { background: linear-gradient(180deg, #4a3d5c 0%, #8a6070 45%, #d49a7c 80%, #ead2a8 100%); }
.spin-rays { position: absolute; left: 50%; top: 55%; width: 1400px; height: 1400px; margin: -700px 0 0 -700px; opacity: .13; pointer-events: none; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, #fff 0deg 4deg, transparent 4deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 62%); mask: radial-gradient(circle, #000 18%, transparent 62%); animation: spin-idle 120s linear infinite; }
.spin-screen h1 { margin: 12px 0 2px; font-size: 32px; text-shadow: 0 2px 12px rgb(0 0 0 / 25%); position: relative; }
.spin-sub { margin: 0 0 22px; font-size: 18px; opacity: .92; position: relative; }
.spin-wheel { position: relative; width: var(--wheel); height: var(--wheel); }
.spin-svg { width: 100%; height: 100%; filter: drop-shadow(0 14px 26px rgb(20 8 30 / 45%)); }
.spin-svg text { font: 700 34px system-ui, -apple-system, sans-serif; fill: #fffaf0; }
.spin-svg text.soft { fill: #6b4a33; }
.spin-svg .peg { fill: #ffd46a; stroke: #8a5a00; stroke-width: 1.5; }
.spin-svg .hub { fill: #fff8ec; stroke: #8a5a00; stroke-width: 3; }
.spin-svg .hub-dot { fill: #f2b632; }
.spin-svg .win { filter: brightness(1.25) drop-shadow(0 0 10px #fff3b0); }
.spin-pointer { position: absolute; left: 50%; top: -18px; width: 34px; height: 44px; margin-left: -17px; z-index: 2; transform-origin: 50% 8px; transition: transform .07s ease-out; }
.spin-pointer.flick { transform: rotate(-22deg); transition: none; }
.spin-btn { position: relative; margin-top: 26px; min-width: 210px; padding: 17px 28px; border-radius: 18px; border: 0; font: 800 20px system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #ffd46a, #f2b632); color: #2a1a10; box-shadow: 0 6px 0 #c98a14, 0 12px 24px rgb(0 0 0 / 25%); }
.spin-btn:disabled { opacity: .85; }
.spin-note { position: relative; margin: 16px 0 0; font-size: 14px; opacity: .9; }
.spin-burst { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.spin-card-layer { position: absolute; left: 16px; right: 16px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 40px); z-index: 4; perspective: 900px; max-width: 520px; margin: 0 auto; }
.spin-card { border-radius: 22px; overflow: hidden; background: var(--surface); color: var(--ink); text-align: left; box-shadow: 0 18px 40px rgb(0 0 0 / 35%);
  max-height: calc(100vh - var(--tabbar-h) - env(safe-area-inset-bottom) - env(safe-area-inset-top) - 120px); overflow-y: auto; }
.spin-card.flip { transform-origin: 50% 100%; transform: rotateX(80deg) translateY(40px); opacity: 0; }
.spin-card.flip.in { transform: none; opacity: 1; transition: transform .7s cubic-bezier(.2, .9, .25, 1.15), opacity .3s; }
.spin-card.fade { opacity: 0; }
.spin-card.fade.in { opacity: 1; transition: opacity .6s; }
.spin-card .eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 800; margin: 0 0 6px; color: var(--accent-ink); }
.spin-pad { padding: 16px 18px 0; }
.spin-pad h2 { margin: 0 0 6px; font-size: 22px; line-height: 1.25; }
.spin-pad p { margin: 0 0 6px; color: var(--ink-2); }
.spin-bleed { position: relative; height: min(330px, 40vh); background-size: cover; background-position: center; }
.spin-bleed-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.spin-bleed .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / 0) 40%, rgb(0 0 0 / 72%) 100%); }
.spin-bleed.dark .shade { background: rgb(10 8 14 / 55%); }
.spin-bleed .over { position: absolute; left: 18px; right: 18px; bottom: 16px; color: #fff; }
.spin-bleed .over .eyebrow { color: #ffe08a; }
.spin-bleed .over h2 { margin: 0; font-size: 24px; line-height: 1.2; text-shadow: 0 2px 10px rgb(0 0 0 / 40%); }
.spin-bleed.dark .over { top: 22px; bottom: auto; }
.spin-bleed.dark .over h2 { font-size: 26px; }
.spin-gig-art { display: grid; place-items: center; height: 190px; background: var(--gig-art); }
:root { --gig-art: linear-gradient(180deg, #fdf1e3, #f7e2c4); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --gig-art: linear-gradient(180deg, #3a2a20, #2a1f18); } }
:root[data-theme="dark"] { --gig-art: linear-gradient(180deg, #3a2a20, #2a1f18); } /* warm dark, not cream (Bret, 2026-10-18) */
.spin-gig-art canvas { width: 160px; height: 155px; image-rendering: pixelated; }
.spin-fact { background: color-mix(in srgb, var(--tint) 9%, var(--surface)); }
.spin-fact .chart-wrap { padding: 4px 18px 0; }
.spin-actions { display: flex; gap: 10px; padding: 14px 16px 16px; }
.spin-actions .spin-did { flex: 1; margin: 0; align-self: center; font-weight: 700; color: var(--accent-ink); }
.spin-actions button { flex: 1; padding: 13px; border-radius: 13px; font: 700 16px system-ui, -apple-system, sans-serif; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.spin-actions button.primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }
@media (prefers-reduced-motion: reduce) {
  .spin-tab.ready .mini .turn, .spin-tab.ready .knob::after, .spin-rays { animation: none; }
  .spin-tab.ready .knob::after { display: none; }
  .spin-screen.reduced .spin-rays, .spin-screen.reduced .spin-burst { display: none; }
}
.map-legend { flex-wrap: wrap; }
.map-legend .you-key { display: inline-flex; align-items: center; gap: 6px; margin-left: 18px; color: var(--ink-2); }
.map-legend .sw.you { width: 12px; height: 12px; border-radius: 50%; background: var(--you); }
.pills.matters .rank:not(:empty) { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-right: 6px; border-radius: 9px; background: var(--on-accent); color: var(--accent-fill); font: 800 12px/1 system-ui, -apple-system, sans-serif; }

/* A fact's chart drawn off screen for the Home Screen widget (main.js widgetChart). */
.widget-chart-render { position: absolute; left: -10000px; top: 0; width: 320px; }
/* iCloud sync (1.2): the new-iPhone check before the first question, and the one-time "backed up" card. */
.restoring { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.cloud-note p { margin: 0 0 4px; }
.cloud-note + .ring-card { margin-top: 0; } /* the ring card tucks under the photo (-44px); under this card it would cover Turn off */
/* iOS-style switches (Settings → iCloud, Bret 2026-10-31): a checkbox with role=switch, drawn as a track and a knob. */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; font-weight: 600; }
.switch-row small { display: block; font-weight: 400; font-size: 13px; color: var(--ink-2); }
.switch-row input[role=switch] { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 51px; height: 31px; margin: 0; border-radius: 16px; background: var(--track); cursor: pointer; transition: background .2s; }
.switch-row input[role=switch]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgb(0 0 0 / 25%); transition: transform .2s; }
.switch-row input[role=switch]:not(:checked) { box-shadow: inset 0 0 0 1.5px var(--muted); } /* the off track alone is 1.3:1 */
.switch-row input[role=switch]:checked { background: var(--accent-fill); }
.switch-row input[role=switch]:checked::after { transform: translateX(20px); }
.switch-row input[role=switch]:disabled { opacity: .45; cursor: default; }
.switch-row input[role=switch]:focus-visible { outline: 3px solid var(--warm); outline-offset: 2px; }
.switch-row:has(input:disabled) span { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .switch-row input[role=switch], .switch-row input[role=switch]::after { transition: none; } }
.cloud-status { display: flex; align-items: center; gap: 6px; margin: -4px 0 6px; color: var(--ink-2); }
.cloud-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.cloud-status:empty::before { display: none; }
.cloud-status[data-tone=ok]::before { background: var(--accent); }
.cloud-status[data-tone=warn]::before { background: var(--warm); }
.cloud-foot { margin: 8px 0 0; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); }
.backup-row.pair > * { flex: 1 1 0; text-align: center; } /* Export and Import side by side, even at 320 */
