:root {
  color-scheme: light;
  --brand-navy: #011831;
  --brand-navy-light: #10294f;
  --brand-red: #960420;
  --brand-red-hover: #7a031a;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-secondary: #f2f4f7;
  --text: #011831;
  --text-secondary: #667085;
  --text-muted: #98a2b3;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --success: #16804a;
  --warning: #b7791f;
  --danger: #960420;
  --choice: #011831;
  --on-choice: #ffffff;
  --shadow-sm: 0 2px 10px rgba(1, 24, 49, 0.04);
  --shadow-md: 0 8px 24px rgba(1, 24, 49, 0.06);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
  --tab-h: 52px;
  --dock-h: 72px;
  --header-h: 96px;
  --shell: 480px;
  --visual-viewport-height: 100dvh;
  --vv-offset-top: 0px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #071422;
  --surface: #12263a;
  --surface-secondary: #1a3148;
  --text: #f4f7fa;
  --text-secondary: #a8b3c2;
  --border: #2a4258;
  --choice: #e7edf4;
  --on-choice: #071422;
  --brand-red: #d4273a;
  --brand-red-hover: #f04a58;
  --danger: #f0a8a8;
  --success: #3dbe78;
  --warning: #e2b15a;
  --shadow-sm: none;
  --shadow-md: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: #eef1f4;
  color: var(--text);
  font: 500 16px/1.45 Nunito, "Segoe UI", sans-serif;
}
[data-theme="dark"] body { background: #050d16; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.shell {
  width: min(var(--shell), 100%);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--header-h);
  min-height: var(--header-h);
  padding: 0 18px;
  background: #ffffff;
  overflow: hidden;
  border-bottom: 1px solid rgba(1, 24, 49, 0.05);
}
.brand-mark {
  position: absolute;
  z-index: 0;
  right: -72px;
  top: -58px;
  width: 250px;
  height: auto;
  color: var(--brand-red);
  pointer-events: none;
}
#cow-shape { opacity: 0.045; }
.brand-sheen {
  opacity: 0;
  transform: translateY(-24px);
  animation: cow-flow 16s ease-in-out infinite;
}
@keyframes cow-flow {
  0%, 64% { transform: translateY(-24px); opacity: 0; }
  72% { opacity: 0.55; }
  86% { transform: translateY(168px); opacity: 0.55; }
  94%, 100% { transform: translateY(168px); opacity: 0; }
}
.brand-lockup {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  max-width: calc(100% - 56px);
}
.logo {
  display: block;
  width: 118px;
  height: auto;
  max-width: 100%;
}
.brand-line {
  margin: 1px 0 0;
  max-width: 100%;
  color: var(--brand-navy);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
  white-space: nowrap;
}
.brand-accent {
  display: block;
  width: 36px;
  height: 3px;
  margin-top: 3px;
  border-radius: 999px;
  background: var(--brand-red);
}
.avatar {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  padding: 0;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #eef2f6;
  color: var(--brand-navy);
  font-size: 13px;
  font-weight: 700;
  flex: 0 0 auto;
}
.avatar[hidden] { display: none !important; }
.avatar img,
.avatar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  opacity: 0;
}
.avatar img.ready,
.avatar-photo img.ready {
  opacity: 1;
}
.avatar-photo {
  display: inline-flex;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid #e4e7ec;
  background: #eef2f6;
}
.avatar-lg {
  width: 88px;
  height: 88px;
  font-size: 28px;
}
.card.center .avatar-photo,
.card.center .initials.avatar-lg {
  margin: 0 auto 8px;
}

#app {
  padding: 24px 16px calc(28px + var(--safe-bottom));
}
body.has-tabs #app { padding-bottom: calc(var(--tab-h) + 24px + var(--safe-bottom)); }
body.has-dock #app { padding-bottom: calc(var(--dock-h) + 24px + var(--safe-bottom)); }
body.has-tabs.has-dock #app { padding-bottom: calc(var(--tab-h) + var(--dock-h) + 20px + var(--safe-bottom)); }

h1, h2, p { margin: 0; }
.page h1, .sample-kicker {
  font-size: 26px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0;
}
.page { margin-bottom: 16px; }
.page p, .sub, .meta { color: var(--text-secondary); font-size: 15px; }
.welcome { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 24px; }
.hello { font-size: 26px; font-weight: 700; letter-spacing: 0; line-height: 1.15; color: var(--brand-navy); }
.sub { margin-top: 4px; font-size: 15px; }
.role-badge {
  flex: 0 0 auto;
  border: 1px solid var(--brand-red);
  color: var(--brand-red);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 0 0 12px;
  box-shadow: none;
}
.home-card, .empty-home { box-shadow: var(--shadow-sm); }
.card h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; color: var(--brand-navy); }
.kicker {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.progress-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 16px; }
.progress-head .kicker { margin: 0; }
.progress-head b { color: var(--brand-navy); font-size: 15px; }
.empty-home { text-align: center; padding: 28px 20px; }
.empty-home h2 { font-size: 20px; margin: 12px 0 6px; }
.empty-home p { color: var(--text-secondary); font-size: 15px; }
.empty-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--brand-navy);
  background: #eef2f6;
}
.empty-icon svg { width: 22px; height: 22px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  background: var(--surface-secondary);
}
.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.badge.live { color: var(--brand-red); background: rgba(150, 4, 32, 0.08); }
.badge.ok { color: var(--success); background: rgba(22, 128, 74, 0.1); }
.badge.warn { color: var(--warning); background: rgba(183, 121, 31, 0.12); }
.badge.run { color: var(--brand-navy-light); background: var(--surface-secondary); }
[data-theme="dark"] .badge.run { color: var(--text); }

.meter {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-secondary);
  overflow: hidden;
  margin: 8px 0;
}
.meter > span {
  display: block;
  height: 100%;
  background: var(--brand-navy);
  border-radius: inherit;
  transition: width 240ms ease;
}
[data-theme="dark"] .meter > span { background: var(--choice); }
.pct { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.stats div { text-align: center; }
.stats b { display: block; font-size: 22px; }
.stats span { color: var(--text-secondary); font-size: 12px; }

button.primary, button.ghost, button.danger, .dock button, .sheet-panel > button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
button.primary, .dock button.primary {
  background: var(--brand-red);
  color: #fff;
}
button.primary:hover { background: var(--brand-red-hover); }
.dock button.ready { box-shadow: 0 0 0 4px rgba(150, 4, 32, 0.22); }
button.ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
button.danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
button.excel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 66px;
  margin: 14px 0;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--brand-navy);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
}
button.excel-row .excel-label { flex: 1; min-width: 0; }
button.excel-row .excel-ico,
button.excel-row .excel-go { display: inline-flex; flex: 0 0 auto; }
button.excel-row .excel-ico svg { width: 26px; height: 26px; }
button.excel-row .excel-go { color: var(--text-secondary); }
button.excel-row .excel-go svg { width: 18px; height: 18px; }
button.excel-row:active { transform: scale(0.99); background: var(--bg); }
button:disabled { opacity: 0.65; }
button:active { transform: scale(0.98); }
.text-btn {
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--brand-red);
  font-weight: 800;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 800;
}
.back svg { width: 20px; height: 20px; }

.tabbar, .dock, .toasts, .sheet-panel {
  width: min(var(--shell), 100%);
  left: 50%;
  transform: translateX(-50%);
}
.tabbar {
  position: fixed;
  z-index: 20;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(1, 24, 49, 0.04);
  padding-bottom: var(--safe-bottom);
}
.tabbar[data-count="3"] { grid-template-columns: repeat(3, 1fr); }
.tabbar button {
  position: relative;
  min-height: var(--tab-h);
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.tabbar svg { width: 22px; height: 22px; }
.tabbar button.on { color: var(--brand-navy); font-weight: 700; }
.tabbar button.on::before {
  content: "";
  position: absolute;
  top: 0;
  width: 28px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--brand-red);
}
.dock {
  position: fixed;
  z-index: 25;
  bottom: 0;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--border);
}
body.has-tabs .dock { bottom: calc(var(--tab-h) + var(--safe-bottom)); padding-bottom: 10px; }
.tabbar[hidden], .dock[hidden] { display: none !important; }

html.keyboard-open .tabbar {
  display: none !important;
}
html.keyboard-open .shell { min-height: 0; }
html.keyboard-open #app,
html.keyboard-open body.has-tabs #app,
html.keyboard-open body.has-dock #app,
html.keyboard-open body.has-tabs.has-dock #app {
  padding-bottom: 12px;
}
html.keyboard-open .dock,
html.keyboard-open body.has-tabs .dock {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
  width: min(var(--shell), 100%);
  margin: 0 auto;
  padding: 10px 16px 12px;
}
html.keyboard-open .sheet {
  top: var(--vv-offset-top);
  height: var(--visual-viewport-height);
  bottom: auto;
}
html.keyboard-open .sheet-panel {
  max-height: calc(var(--visual-viewport-height) - 12px);
  padding-bottom: 16px;
}

.dots { display: flex; gap: 6px; align-items: center; margin: 8px 0 4px; }
.dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.dots i.done { background: var(--choice); }
.dots i.now { width: 10px; height: 10px; background: transparent; box-shadow: inset 0 0 0 2px var(--brand-red); }

.scores, .choices { display: flex; gap: 6px; }
.score, .choice {
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  font-size: 18px;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}
.score.on, .choice.on {
  background: var(--choice);
  border-color: var(--choice);
  color: var(--on-choice);
  transform: scale(1.03);
}
.choice.no.on {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
}
.choice { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 15px; letter-spacing: 0.04em; }
.choice svg { width: 18px; height: 18px; }
.scale-hint {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 12px;
}
.criterion.need { border-color: var(--brand-red); box-shadow: 0 0 0 3px rgba(150, 4, 32, 0.12); }
.need-note { color: var(--brand-red); font-size: 13px; font-weight: 700; margin-top: 8px; }

.price-reveal { text-align: center; padding: 8px 0 4px; }
.price { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
label { display: block; font-size: 13px; font-weight: 800; margin: 12px 0 6px; }
input, textarea, .search {
  width: 100%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: 12px;
  padding: 12px;
  min-height: 48px;
}
textarea:focus, input:focus, .search:focus { outline: none; border-color: var(--brand-navy); }
textarea { min-height: 72px; max-height: 160px; resize: vertical; }
.counter { text-align: right; color: var(--text-secondary); font-size: 12px; margin-top: 6px; }
.optional { color: var(--text-secondary); font-weight: 600; text-transform: none; letter-spacing: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 800;
  width: auto;
  letter-spacing: 0;
  text-transform: none;
}
.chip.on { background: var(--choice); color: var(--on-choice); border-color: var(--choice); }

.person {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  min-height: 64px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 700;
}
.person:last-child { border-bottom: 0; }
.initials, .avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.initials {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-secondary);
  font-weight: 800;
  flex: 0 0 auto;
}
.initials.avatar-lg,
.avatar-photo.avatar-lg {
  width: 88px;
  height: 88px;
  font-size: 28px;
}
.person small, .grow p { display: block; color: var(--text-secondary); font-weight: 600; }
.grow { flex: 1; min-width: 0; }
.chev { color: var(--text-secondary); }

.bar-row { margin: 10px 0; }
.bar-row .top-line { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.bar { height: 8px; border-radius: 999px; background: var(--surface-secondary); overflow: hidden; margin-top: 6px; }
.bar > span { display: block; height: 100%; background: var(--brand-navy); }
[data-theme="dark"] .bar > span { background: var(--choice); }
.hero-score { font-size: 42px; font-weight: 800; letter-spacing: -0.04em; color: var(--brand-navy); }
[data-theme="dark"] .hero-score { color: var(--text); }
.accent { width: 28px; height: 3px; background: var(--brand-red); margin: 8px auto; }

.quote { margin-top: 8px; }
.quote + .quote { border-top: 1px solid var(--border); padding-top: 10px; }

.switch {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin: 0;
  font-weight: 700;
}
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  flex: 0 0 auto;
}
.switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 160ms ease;
}
.switch input:checked + .switch-ui { background: var(--brand-navy); }
[data-theme="dark"] .switch input:checked + .switch-ui { background: var(--choice); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
[data-theme="dark"] .switch input:checked + .switch-ui::after { background: #071422; }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--brand-red); outline-offset: 2px; }

.empty { text-align: center; padding: 28px 12px; }
.empty h2 { margin-bottom: 6px; }
.sample-num { color: var(--text-secondary); font-weight: 800; font-size: 13px; }
.sample-line { display: flex; gap: 12px; align-items: center; }
.sample-line .grow { flex: 1; }

.drawer {
  position: fixed;
  z-index: 15;
  top: var(--header-h);
  bottom: calc(var(--tab-h) + var(--safe-bottom));
  left: 50%;
  width: min(var(--shell), 100%);
  transform: translateX(-50%);
}
html.keyboard-open .drawer { bottom: 0; }
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 24, 49, 0.1);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 180ms ease;
}
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  width: min(78vw, 310px);
  max-height: calc(100% - 24px);
  overflow: visible;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}
.drawer-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--brand-navy);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}
.drawer-panel > * {
  opacity: 0;
  transform: translateX(110%);
  transition: opacity 460ms cubic-bezier(0.22, 1, 0.36, 1), transform 460ms cubic-bezier(0.22, 1, 0.36, 1);
}
.drawer.open .drawer-panel > * {
  opacity: 1;
  transform: none;
}
.drawer.open .drawer-panel > *:nth-child(1) { transition-delay: 60ms; }
.drawer.open .drawer-panel > *:nth-child(2) { transition-delay: 170ms; }
.drawer.open .drawer-panel > *:nth-child(3) { transition-delay: 280ms; }
.drawer.open .drawer-panel > *:nth-child(4) { transition-delay: 390ms; }
.drawer.open .drawer-panel > *:nth-child(5) { transition-delay: 500ms; }
.drawer.open .drawer-panel > *:nth-child(6) { transition-delay: 610ms; }
.drawer-rule {
  height: 1px;
  margin: 10px 4px;
  background: rgba(1, 24, 49, 0.16);
}
.drawer-row.drawer-nav {
  min-height: 56px;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(1, 24, 49, 0.06);
}
.drawer-row:last-child { border-bottom: 0; }
.drawer-row svg { width: 22px; height: 22px; flex: 0 0 auto; }
.drawer-row span { flex: 1; min-width: 0; }
.drawer-row svg:last-child { width: 18px; height: 18px; margin-left: auto; color: var(--text-muted); }
.drawer-kicker {
  display: inline-block;
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff;
  color: var(--brand-navy);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 6px 18px rgba(1, 24, 49, 0.06);
}
.drawer-row.drawer-social {
  min-height: 54px;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(1, 24, 49, 0.06);
}
.drawer-copy { display: flex; flex-direction: column; justify-content: center; gap: 1px; line-height: 1.15; }
.drawer-copy small { color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.drawer-copy b { color: var(--brand-navy); font-size: 15px; font-weight: 600; }
body.drawer-lock {
  position: fixed;
  width: 100%;
  overflow: hidden;
}

.sheet { position: fixed; inset: 0; z-index: 40; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(1, 24, 49, 0.45); }
.sheet-panel {
  position: absolute;
  bottom: 0;
  max-height: min(88vh, 720px);
  overflow: auto;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + var(--safe-bottom));
  box-shadow: var(--shadow-md);
}
.sheet-panel h2 { margin-bottom: 8px; }
.sheet-panel p { color: var(--text-secondary); margin-bottom: 12px; }
.sheet-panel button + button { margin-top: 8px; }

.toasts {
  position: fixed;
  z-index: 50;
  bottom: calc(var(--tab-h) + 12px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px;
  pointer-events: none;
}
.toast {
  background: #fff;
  color: var(--brand-navy);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  box-shadow: var(--shadow-md);
}
.toast.bad { color: var(--brand-red); }

.netbar {
  border: 1px solid var(--brand-red);
  background: var(--surface);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}
.netbar p { color: var(--text-secondary); margin-top: 4px; }

.sk span {
  display: block;
  height: 12px;
  border-radius: 8px;
  margin: 8px 0;
  background: linear-gradient(90deg, var(--surface-secondary), var(--border), var(--surface-secondary));
  background-size: 200% 100%;
  animation: shimmer 1.1s linear infinite;
}
.sk span:first-child { width: 40%; height: 18px; }
.spin {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.check {
  width: 64px;
  height: 64px;
  margin: 8px auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-secondary);
  color: var(--brand-red);
}
.check svg { width: 32px; height: 32px; }
.center { text-align: center; }
.stack > * + * { margin-top: 8px; }
.card.appear { animation: rise 180ms ease; }

:focus-visible { outline: 2px solid var(--brand-red); outline-offset: 2px; }

@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 360px) {
  #app { padding-left: 12px; padding-right: 12px; }
  .card { padding: 12px; }
  .scores, .choices { gap: 4px; }
  .hello, .page h1 { font-size: 24px; }
  .top { padding-left: 16px; padding-right: 16px; }
  .logo { width: 108px; }
  .brand-line { font-size: 14px; }
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: #fff;
  pointer-events: auto;
}
.splash-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(280px, 86vw);
}
.splash-logo {
  display: block;
  height: 72px;
  width: auto;
  max-width: 100%;
  opacity: 0;
  transform: translateY(8px) scale(0.97);
}
.splash-title {
  margin: 14px 0 0;
  color: var(--brand-navy);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: center;
  opacity: 0;
  transform: translateY(6px);
}
.splash-line {
  display: block;
  width: 48px;
  height: 2px;
  margin-top: 12px;
  border-radius: 2px;
  background: var(--brand-red);
  transform: scaleX(0);
  transform-origin: left center;
}
.splash.run .splash-logo {
  opacity: 1;
  transform: none;
  transition: opacity 400ms cubic-bezier(0.22, 1, 0.36, 1), transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}
.splash.run .splash-title {
  opacity: 1;
  transform: none;
  transition: opacity 320ms cubic-bezier(0.22, 1, 0.36, 1) 160ms, transform 320ms cubic-bezier(0.22, 1, 0.36, 1) 160ms;
}
.splash.run .splash-line {
  transform: scaleX(1);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1) 280ms;
}
.splash.out {
  opacity: 0;
  transform: scale(1.01);
  pointer-events: none;
  transition: opacity 240ms cubic-bezier(0.22, 1, 0.36, 1), transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
.shell,
.tabbar,
.dock {
  transition: opacity 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
body.booting .shell,
body.booting .tabbar,
body.booting .dock {
  opacity: 0;
  pointer-events: none;
}
body.ready .top {
  animation: header-in 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes header-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .score.on, .choice.on, button:active { transform: none; }
  .splash-logo,
  .splash-title,
  .splash-line,
  .splash.out {
    transform: none !important;
  }
  .splash.run .splash-logo,
  .splash.run .splash-title,
  .splash.run .splash-line,
  .splash.out,
  .shell,
  .tabbar,
  .dock {
    transition: opacity 160ms linear !important;
  }
  .splash.run .splash-line { transform: none !important; opacity: 1; }
}
