/* Best Friend Fix — prototype styles.
   Deliberately large touch targets and high contrast: the target users
   include elderly people who need help, so nothing tiny or clever. */

:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #16202e;
  --muted: #5b6675;
  --border: #dbe1ea;
  --primary: #2563eb;
  --primary-press: #1d4ed8;
  --danger: #dc2626;
  --ok: #16a34a;
  --warn: #b45309;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(20, 32, 46, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f151e;
    --surface: #182230;
    --text: #eef2f8;
    --muted: #9aa7b8;
    --border: #2a3648;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 28px; height: 28px; display: block; border-radius: 7px; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.tag {
  font-size: 12px; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px;
}

#main {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.view { animation: fade 0.2s ease; }
.hidden { display: none !important; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.headline {
  font-size: clamp(20px, 5.6vw, 26px);
  line-height: 1.25;
  margin: 8px 0 6px;
  letter-spacing: -0.02em;
}
.sub { color: var(--muted); font-size: 16px; margin: 0 0 22px; }

.choice { display: grid; gap: 14px; }

.big-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 22px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.06s ease, background 0.15s ease;
}
.big-btn:active { transform: scale(0.985); }
.big-btn.primary { background: var(--primary); color: #fff; border-color: transparent; }
.big-btn.primary:active { background: var(--primary-press); }
.big-btn-emoji { font-size: 30px; }
.big-btn-text { font-size: 20px; font-weight: 650; }
.big-btn-hint { font-size: 14px; opacity: 0.85; }

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

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.link-row { display: flex; gap: 8px; margin-bottom: 14px; }
.link-input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}
.mini-btn {
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}
.share-btn { padding: 16px; }

.passcode-card { text-align: center; }
.passcode {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
}

.passcode-input {
  width: 100%;
  text-align: center;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.2em;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  color: var(--text);
  margin-bottom: 14px;
}
.passcode-input:focus { outline: none; border-color: var(--primary); }

.status { font-size: 15px; margin: 14px 0; text-align: center; }
.status.waiting { color: var(--warn); }
.status.error { color: var(--danger); font-weight: 600; }
.status.ok { color: var(--ok); }

.text-btn {
  display: block;
  margin: 8px auto 0;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 15px;
  text-decoration: underline;
  cursor: pointer;
}

/* ---- Live session ----------------------------------------------------------
   .stage wraps the screen + control bar + settings popover, and is the element
   that goes fullscreen — so the bar stays reachable in both modes. Docked under
   the screen normally; floats over the bottom of the video in fullscreen. */
#view-session {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(1100px, 94vw);
  margin-left: 50%;
  transform: translateX(-50%);
}

.stage { position: relative; display: flex; flex-direction: column; }

.screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}
#remote-video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }

.stage-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; color: #cbd5e1;
}
.spinner {
  width: 42px; height: 42px;
  border: 4px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Compact control bar ---- */
.control-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
}
.cb-btn {
  flex: none;
  height: 36px;
  min-width: 38px;
  padding: 0 9px;
  font-size: 16px;
  line-height: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
.cb-btn:hover { border-color: var(--primary); }
.cb-btn:active { transform: scale(0.97); }
.cb-btn.cb-wide { font-size: 13px; font-weight: 600; padding: 0 12px; }
.cb-btn.muted { background: var(--warn); color: #fff; border-color: transparent; }
.cb-btn.cb-end {
  font-size: 14px; font-weight: 700; padding: 0 14px;
  background: var(--danger); color: #fff; border-color: transparent;
}
.cb-icon { flex: none; font-size: 15px; opacity: 0.75; }
.cb-spacer { flex: 1 1 auto; }

.meter {
  flex: 1 1 60px;
  min-width: 42px;
  max-width: 130px;
  height: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.meter-fill {
  height: 100%; width: 0%;
  background: var(--muted);
  border-radius: 999px;
  transition: width 0.08s linear;
}
.meter-fill.active { background: var(--ok); }

/* ---- Device settings popover (toggled by the gear) ---- */
.audio-panel {
  position: absolute;
  right: 8px;
  bottom: 60px;
  z-index: 5;
  width: min(320px, calc(100% - 16px));
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(20,32,46,0.22);
}
.dev-row { display: flex; align-items: center; gap: 10px; }
.dev-label { flex: none; width: 84px; font-size: 13px; font-weight: 600; color: var(--muted); }
.dev-select {
  flex: 1; min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}
.audio-hint { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.4; }

.mic-problem {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #fff4e5;
  border: 1px solid #f5c98a;
  color: #7a4a00;
  font-size: 14px;
  line-height: 1.45;
}
@media (prefers-color-scheme: dark) {
  .mic-problem { background: #3a2a12; border-color: #6b4a1c; color: #ffd9a0; }
}

/* ---- Fullscreen: same bar, floating over the bottom of the video ---- */
.stage:fullscreen { width: 100vw; height: 100vh; background: #000; }
.stage:fullscreen .screen {
  flex: 1; height: 100%; aspect-ratio: auto;
  border-radius: 0; box-shadow: none;
}
.stage:fullscreen .control-bar {
  position: absolute;
  left: 16px; right: 16px; bottom: 16px;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,0.94);
  color: #16202e;
  box-shadow: 0 6px 28px rgba(0,0,0,0.45);
}
.stage:fullscreen .control-bar .cb-btn { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.12); color: #16202e; }
.stage:fullscreen .control-bar .cb-btn.cb-end { background: var(--danger); color: #fff; border-color: transparent; }
.stage:fullscreen .control-bar .meter { background: rgba(0,0,0,0.08); border-color: rgba(0,0,0,0.12); }
.stage:fullscreen .audio-panel { bottom: 72px; right: 16px; }
.stage:fullscreen .mic-problem { position: absolute; left: 16px; right: 16px; bottom: 72px; margin: 0; }

@media (max-width: 560px) {
  .cb-btn { min-width: 34px; padding: 0 7px; font-size: 15px; }
  .cb-btn.cb-end { padding: 0 10px; font-size: 13px; }
  .meter { max-width: 80px; }
}

/* ---- Remote control ---- */
.cb-btn.cb-active { background: var(--ok); color: #fff; border-color: transparent; }
.screen.controlling { cursor: crosshair; }
.screen.controlling::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border: 3px solid var(--ok); border-radius: inherit;
}
.control-banner {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #fdecec;
  border: 1px solid #f3b4b4;
  color: #8a1c1c;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}
@media (prefers-color-scheme: dark) {
  .control-banner { background: #3a1616; border-color: #6d2626; color: #ffb9b9; }
}
.stage:fullscreen .control-banner { position: absolute; left: 16px; right: 16px; top: 16px; margin: 0; }

/* ---- In-app browser escape banner ---- */
.iab-banner {
  margin: 0;
  padding: 16px 18px;
  background: #fff4e5;
  border-bottom: 1px solid #f5c98a;
  color: #7a4a00;
}
.iab-title { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.iab-text { margin: 0 0 12px; font-size: 14px; line-height: 1.45; }
.iab-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.iab-btn {
  flex: 1 1 130px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid #e0b070;
  border-radius: 12px;
  background: #fff;
  color: #7a4a00;
  cursor: pointer;
}
.iab-btn.primary { background: var(--primary); color: #fff; border-color: transparent; }
.iab-hint { margin: 10px 0 0; font-size: 13px; line-height: 1.4; opacity: 0.9; }
@media (prefers-color-scheme: dark) {
  .iab-banner { background: #3a2a12; border-color: #6b4a1c; color: #ffd9a0; }
  .iab-btn { background: #241a0c; color: #ffd9a0; border-color: #6b4a1c; }
}

/* ---- Host share screen ---- */
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; margin-right: 7px;
  border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 13px; font-weight: 700; vertical-align: -5px;
}
#host-link { width: 100%; margin-bottom: 12px; }
.wide-btn {
  display: block; width: 100%; margin-top: 10px; padding: 13px;
  font-size: 15px; font-weight: 600;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg); color: var(--text); cursor: pointer;
}
.wide-btn:hover { border-color: var(--primary); }
.code-note { margin: 12px 0 0; font-size: 13px; color: var(--muted); line-height: 1.4; }

/* ---- Download page ---- */
.dl-btn { text-decoration: none; margin-bottom: 18px; }
.notice {
  padding: 14px 16px; margin-bottom: 26px;
  background: #fff4e5; border: 1px solid #f5c98a; border-radius: var(--radius);
  color: #7a4a00; font-size: 15px; line-height: 1.5;
}
.sec-title { font-size: 20px; margin: 30px 0 12px; letter-spacing: -0.01em; }
.body-text { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0 0 14px; }
.warn-text {
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.step-card { padding: 16px; }
.step-head { margin: 0 0 12px; font-size: 16px; font-weight: 650; }
.step-note { margin: 12px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* Simplified pictures of the real dialogs, so nothing is a surprise. */
.mock { border-radius: 12px; padding: 14px; font-size: 13px; }
.mock-light { background: var(--bg); border: 1px solid var(--border); }
.mock-blue { background: #1f5fa8; color: #fff; }
.mock-title { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.mock-line { margin: 0; line-height: 1.45; }
.mock-dim { color: var(--muted); }
.mock-link { margin: 10px 0 0; text-decoration: underline; font-size: 13px; }
.mock-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.mock-btn {
  padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: #fff; color: #16202e; border: 1px solid var(--border);
}
.mock-btn.hot { background: var(--ok); color: #fff; border-color: transparent; }
.done-card { text-align: center; background: #e8f6ec; border-color: #a8dcb8; }
.done-text { margin: 0; font-size: 16px; font-weight: 600; color: #14532d; }
@media (prefers-color-scheme: dark) {
  .notice { background: #3a2a12; border-color: #6b4a1c; color: #ffd9a0; }
  .done-card { background: #14301f; border-color: #2d5f3f; }
  .done-text { color: #a7e9bf; }
  .mock-btn { background: var(--surface); color: var(--text); }
}
.get-app { margin: 18px 0 0; font-size: 14px; color: var(--muted); text-align: center; line-height: 1.5; }
.get-app a { color: var(--primary); font-weight: 600; }

/* ===== Landing page ======================================================= */
#view-landing { width: min(1080px, 94vw); margin-left: 50%; transform: translateX(-50%); }

.btn {
  display: inline-block; border: 1px solid transparent; border-radius: 12px;
  padding: 14px 24px; font-size: 16px; font-weight: 650; font-family: inherit;
  cursor: pointer; text-decoration: none; text-align: center;
  transition: transform .06s ease, background .15s ease;
}
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-press); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); }
.btn-lg { padding: 17px 34px; font-size: 17px; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 36px; align-items: center;
  padding: 44px 0 52px;
}
.hero-title { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 14px; }
.hero-sub { font-size: clamp(16px, 1.7vw, 19px); line-height: 1.55; color: var(--muted); margin: 0 0 24px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin: 14px 0 0; font-size: 13.5px; color: var(--muted); }

/* Hero visual — swap this whole block for an illustration later */
.hero-visual { display: flex; flex-direction: column; align-items: center; }
.demo { display: flex; gap: 14px; width: 100%; }
.demo-pane { flex: 1; min-width: 0; }
.demo-screen {
  position: relative; aspect-ratio: 4/3; border-radius: 10px;
  background: #1e293b; border: 3px solid #cbd5e1; overflow: hidden;
}
.demo-screen.is-yours { background: #334155; border-color: var(--primary); }
.demo-label { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.demo-label.is-yours { color: var(--primary); font-weight: 650; }
.demo-caption { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.demo-cursor {
  position: absolute; width: 13px; height: 18px; left: 0; top: 0;
  background: #fff; clip-path: polygon(0 0, 0 78%, 26% 60%, 44% 100%, 62% 92%, 44% 55%, 74% 55%);
  animation: demoMove 6s ease-in-out infinite;
}
.demo-click {
  position: absolute; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ok); animation: demoClick 6s ease-in-out infinite;
}
@keyframes demoMove {
  0%,8%    { transform: translate(18%, 62%); }
  38%,46%  { transform: translate(64%, 22%); }
  76%,100% { transform: translate(18%, 62%); }
}
@keyframes demoClick {
  0%,40%   { opacity: 0; transform: translate(64%, 22%) scale(.4); }
  48%      { opacity: .85; transform: translate(64%, 22%) scale(1.6); }
  56%,100% { opacity: 0; transform: translate(64%, 22%) scale(1.8); }
}
@media (prefers-reduced-motion: reduce) {
  .demo-cursor, .demo-click { animation: none; }
  .demo-cursor { transform: translate(40%, 40%); }
}

/* Sections */
.sec-title { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.02em; margin: 0 0 8px; }
.sec-title.center { text-align: center; margin-bottom: 26px; }
.band {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 40px 28px; margin: 0 0 30px;
}
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; }
.step-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 16px; margin-bottom: 10px;
}
.step-title { font-size: 18px; margin: 0 0 6px; }
.step-body { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0; }

.trust { padding: 10px 0 34px; }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.trust-item { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.trust-title { font-size: 16px; margin: 0 0 6px; line-height: 1.35; }
.trust-body { font-size: 14.5px; line-height: 1.55; color: var(--muted); margin: 0; }

.cta-band { text-align: center; }
.cta-sub { font-size: 16px; line-height: 1.55; color: var(--muted); max-width: 620px; margin: 0 auto 22px; }

.faq { padding: 6px 0 20px; }
.qa {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 20px; margin-bottom: 10px;
}
.qa summary { cursor: pointer; font-size: 16px; font-weight: 650; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; float: right; color: var(--muted); font-weight: 400; }
.qa[open] summary::after { content: "\2212"; }
.qa p { margin: 12px 0 0; font-size: 15px; line-height: 1.6; color: var(--muted); }

.foot {
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
  padding: 26px 0 10px; border-top: 1px solid var(--border); font-size: 14.5px;
}
.foot a { color: var(--primary); font-weight: 600; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot-dim { color: var(--muted); margin-left: auto; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 26px; padding: 26px 0 34px; }
  .hero-visual { order: -1; }
  .band { padding: 28px 18px; border-radius: 18px; }
  .btn { width: 100%; }
  .hero-actions { flex-direction: column; }
}
.hero-copy { min-width: 0; }

/* ---- Feedback form ---- */
.fb-set { border: 0; padding: 0; margin: 0 0 22px; }
.chk {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 14px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg); font-size: 15.5px; cursor: pointer;
}
.chk:hover { border-color: var(--primary); }
.chk input { width: 19px; height: 19px; accent-color: var(--primary); flex: none; cursor: pointer; }
.fb-text {
  width: 100%; padding: 13px 14px; font-family: inherit; font-size: 15.5px;
  line-height: 1.5; border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg); color: var(--text); resize: vertical;
}
.fb-text:focus, .link-input:focus { outline: none; border-color: var(--primary); }
.fb-count { margin: 6px 0 20px; font-size: 12.5px; color: var(--muted); text-align: right; }
.fb-opt { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.fb-note { margin: 9px 0 22px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fb-submit { width: 100%; }

/* ---- Feedback thank-you ---- */
.thanks { text-align: center; background: #e8f6ec; border-color: #a8dcb8; }
.thanks-title { margin: 0 0 10px; font-size: 21px; font-weight: 700; color: #14532d; }
.thanks-body { margin: 0 0 10px; font-size: 15.5px; line-height: 1.55; color: #1c5b34; }
.thanks-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
@media (prefers-color-scheme: dark) {
  .thanks { background: #14301f; border-color: #2d5f3f; }
  .thanks-title { color: #a7e9bf; }
  .thanks-body { color: #8fd4a8; }
}

/* ---- "You're in control" section ---- */
.control {
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center;
  padding: 10px 0 40px;
}
.control-copy { min-width: 0; }
.ctrl-list { list-style: none; padding: 0; margin: 18px 0 0; }
.ctrl-list li {
  position: relative; padding-left: 30px; margin-bottom: 15px;
  font-size: 16.5px; line-height: 1.5;
}
.ctrl-list li::before {
  content: ""; position: absolute; left: 0; top: 4px;
  width: 15px; height: 15px; border-radius: 4px; background: var(--primary);
}
.control-shot { min-width: 0; }

/* Mockup of the real in-session control bar */
.shot {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface);
}
.shot-screen { display: block; width: 100%; height: auto; background: #1e3a5f; }
.shot-bar { display: flex; align-items: center; gap: 7px; padding: 9px 10px; background: var(--surface); }
.sb-btn {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  height: 32px; min-width: 34px; padding: 0 8px; font-size: 14px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--bg);
}
.sb-btn.sb-wide { font-size: 12px; font-weight: 650; padding: 0 10px; }
.sb-btn.sb-end { background: var(--danger); color: #fff; border-color: transparent; font-weight: 700; font-size: 12.5px; }
.sb-mark { outline: 2px solid var(--ok); outline-offset: 2px; }
.sb-ico { flex: none; font-size: 13px; opacity: .75; }
.sb-sp { flex: 1 1 auto; }
.sb-meter {
  flex: 1 1 40px; max-width: 70px; height: 7px; border-radius: 99px;
  background: var(--bg); border: 1px solid var(--border); overflow: hidden;
}
.sb-meter i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }

.shot-key { list-style: none; padding: 0; margin: 16px 0 0; }
.shot-key li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14.5px; color: var(--muted); margin-bottom: 9px;
}
.shot-key strong { color: var(--text); }
.key-chip {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 26px; padding: 0 7px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
  outline: 2px solid var(--ok); outline-offset: 1px;
}
.key-chip.key-end { background: var(--danger); color: #fff; border-color: transparent; font-weight: 700; font-size: 11.5px; }

@media (max-width: 760px) {
  .control { grid-template-columns: 1fr; gap: 24px; }
}

/* ---- Adjustments: control section + thank-you ---- */
/* Top-align the two columns so the bullets sit level with the screen. */
.control { align-items: start; }
.control-copy { padding-top: 4px; }

/* Mic button carries its own small label, so the bar explains itself. */
.sb-btn.sb-mic { flex-direction: column; gap: 0; height: 36px; padding: 2px 8px; line-height: 1; }
.sb-btn.sb-mic small { font-size: 8px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.sb-btn.sb-mic b { font-size: 12px; font-weight: 400; }

/* Thank-you panel in the site's blue rather than green. */
.thanks { background: #eaf1fd; border-color: #bcd4f7; }
.thanks-title { color: #1e40af; }
.thanks-body { color: #3f5a80; }
@media (prefers-color-scheme: dark) {
  .thanks { background: #16243a; border-color: #2f4a76; }
  .thanks-title { color: #cfe0fb; }
  .thanks-body { color: #a8c5f5; }
}

/* Closing panel on the download page — match the blue used on the thank-you. */
.done-card { background: #eaf1fd; border-color: #bcd4f7; }
.done-text { color: #1e40af; }
@media (prefers-color-scheme: dark) {
  .done-card { background: #16243a; border-color: #2f4a76; }
  .done-text { color: #cfe0fb; }
}

/* ---- Route to the download page ---- */
.topbar-link {
  font-size: 14px; font-weight: 650; color: var(--primary); text-decoration: none;
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px;
  white-space: nowrap;
}
.topbar-link:hover { background: var(--bg); }

.tip-card { background: var(--bg); }
.tip-title { margin: 0 0 6px; font-size: 15.5px; font-weight: 650; }
.tip-text { margin: 0 0 14px; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.tip-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); text-align: center; }

/* ---- Hero leads with the download; the two hats stay as a quiet fallback ---- */
.btn-sm { padding: 10px 18px; font-size: 14.5px; }
.hero-alt-lead { margin: 20px 0 10px; font-size: 13.5px; color: var(--muted); }
.hero-actions-alt { gap: 10px; }

/* Inside the desktop app the person already has it, so the download button and
   its explanations are hidden and the two hats become the primary choice. */
.is-agent .hero-get { display: none; }
.is-agent .hero-actions-alt .btn { padding: 14px 24px; font-size: 16px; }

.step-cta { display: inline-block; margin-top: 14px; }
.hat-mock { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.hat-btn {
  border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px;
  background: var(--surface); color: var(--text);
  font-size: 14px; font-weight: 650; text-align: center;
}
.hat-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
