/* ============================================================
   The Official Couples HQ — PWA stylesheet
   Brand tokens from PRD §12. No CDN, no build step: the app must
   render identically with the network switched off.
   ============================================================ */

/* ---------- Fonts (self-hosted; Google Fonts CDN is offline-hostile) ---------- */
@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces-600.woff2') format('woff2-variations');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-400.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --navy: #0b1f3a;
  --navy-deep: #07121e;
  --navy-card: #0f2645;
  --navy-line: #1c3357;
  --gold: #d4af37;
  --aqua: #4fd1b5;
  --teal: #146e76;
  --mauve: #b9a4c9;
  --ink: #eef4f8;
  --muted: #96a7b8;
  --danger: #ff8a8a;

  --tab-h: 68px;
  --max-w: 480px;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 30px;
  --r-pill: 999px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  color-scheme: dark;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}
html {
  -webkit-text-size-adjust: 100%; /* respect dynamic type, block orientation zoom */
}
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--navy-deep);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  touch-action: manipulation;
  /* The app shell owns scrolling: the page itself never scrolls, so the tab bar
     stays pinned and iOS doesn't rubber-band the whole document. */
  overflow: hidden;
}
img {
  display: block;
  max-width: 100%;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
a {
  color: var(--aqua);
  text-decoration: none;
}
:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 2px;
  border-radius: 6px;
}
.display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- App frame ---------- */
#app {
  position: relative;
  width: 100%;
  max-width: var(--max-w);
  /* --app-h is measured from window.innerHeight (see setViewportHeight in
     app.js): correct in a top-level tab, in standalone, and inside an iframe,
     where dvh can resolve against the wrong viewport. dvh is the fallback. */
  height: 100dvh;
  height: var(--app-h, 100dvh);
  margin: 0 auto;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 60%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 520px) {
  body {
    background:
      radial-gradient(1200px 600px at 50% -10%, #12304f 0%, transparent 60%), var(--navy-deep);
  }
  #app {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 40px 80px rgba(0, 0, 0, 0.5);
  }
}

/* ---------- Screens ---------- */
main#view {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: calc(var(--safe-top) + 12px) 20px calc(var(--tab-h) + var(--safe-bottom) + 24px);
  scrollbar-width: none;
}
main#view::-webkit-scrollbar {
  width: 0;
}
.screen {
  animation: fade 0.22s var(--ease);
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Type helpers ---------- */
.kicker {
  color: var(--gold);
  letter-spacing: 0.28em;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}
.eyebrow {
  color: var(--muted);
  letter-spacing: 0.2em;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
h1.title {
  font-size: 1.5rem;
  margin: 2px 0 0;
}
h2.title {
  font-size: 1.4rem;
  margin: 2px 0 0;
}
.sub {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 6px 0 0;
  line-height: 1.5;
}

/* ---------- Header row ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.avatar-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, var(--teal), #08343c);
  box-shadow: 0 0 0 2px rgba(79, 209, 181, 0.7);
  color: var(--aqua);
  font-weight: 600;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

/* ---------- Cards ---------- */
.card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-md);
}
.streak {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-top: 16px;
}
.streak .flame {
  font-size: 1.5rem;
}
.streak strong {
  font-size: 0.9rem;
}
.streak .sub {
  margin-top: 2px;
}

/* hero episode */
.hero {
  display: block;
  width: 100%;
  text-align: left;
  margin-top: 8px;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, var(--navy-card), var(--navy-deep));
  position: relative;
  padding: 20px;
  min-height: 178px;
  transition: transform 0.15s var(--ease);
}
.hero:active {
  transform: scale(0.99);
}
.hero .ep-title {
  font-size: 1.55rem;
  line-height: 1.1;
  margin-top: 6px;
  padding-right: 92px;
}
.hero .coach {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 2px var(--aqua), 0 0 18px rgba(79, 209, 181, 0.5);
}
.hero .coach img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero .playrow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.play-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--aqua);
  color: var(--navy-deep);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.hero .playmeta {
  font-size: 0.78rem;
  color: rgba(238, 244, 248, 0.9);
  font-weight: 500;
}
.hero .resume-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
}
.hero .resume-bar > i {
  display: block;
  height: 100%;
  background: var(--aqua);
}

/* tip */
.tip {
  margin-top: 20px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.06);
  border-radius: var(--r-md);
  padding: 12px 16px;
}
.tip p {
  margin: 4px 0 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: rgba(238, 244, 248, 0.92);
}

/* horizontal rail */
.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
}
.rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 12px 20px 4px;
  margin: 0 -20px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.rail::-webkit-scrollbar {
  height: 0;
}
.rail-item {
  flex: 0 0 auto;
  width: 160px;
  text-align: left;
  scroll-snap-align: start;
}
.rail-thumb {
  height: 96px;
  border-radius: var(--r-sm);
  background: var(--navy-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  padding: 0 12px;
}
.rail-thumb .t {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1.15;
  text-align: center;
  color: rgba(238, 244, 248, 0.9);
}
.rail-thumb .bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
}
.rail-thumb .bar > i {
  display: block;
  height: 100%;
  background: var(--aqua);
}
.rail-meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 6px;
}
.link-btn {
  color: var(--aqua);
  font-size: 0.78rem;
  font-weight: 500;
}

/* ---------- Course cards ---------- */
.course {
  display: block;
  width: 100%;
  text-align: left;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 16px;
  transition: transform 0.15s var(--ease);
}
.course:active {
  transform: scale(0.99);
}
.course-head {
  height: 78px;
  display: flex;
  align-items: center;
  padding: 0 16px;
}
.course-head.aqua {
  background: linear-gradient(90deg, rgba(79, 209, 181, 0.3), var(--navy-card));
}
.course-head.teal {
  background: linear-gradient(90deg, rgba(20, 110, 118, 0.6), var(--navy-card));
}
.course-head.mauve {
  background: linear-gradient(90deg, rgba(185, 164, 201, 0.4), var(--navy-card));
}
.course-head span {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.15;
}
.course-body {
  background: var(--navy-card);
  padding: 12px 16px 14px;
}
.course-body p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(238, 244, 248, 0.8);
}
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 8px;
  gap: 10px;
}
.progress {
  height: 6px;
  margin-top: 8px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.progress > i {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--aqua);
  transition: width 0.3s var(--ease);
}
.cta-inline {
  color: var(--aqua);
  font-size: 0.76rem;
  font-weight: 500;
  margin-top: 8px;
  display: inline-block;
}

/* ---------- Lesson list ---------- */
.list {
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-top: 12px;
}
.list > * + * {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  font-size: 0.88rem;
}
.row .grow {
  flex: 1 1 auto;
  min-width: 0;
}
.row .muted {
  color: var(--muted);
  font-size: 0.78rem;
}
.row .tick {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: transparent;
  font-size: 12px;
}
.row .tick.on {
  background: var(--aqua);
  border-color: var(--aqua);
  color: var(--navy-deep);
}
.row.locked {
  opacity: 0.55;
}

/* ---------- Books ---------- */
.shelf {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 18px;
}
.book {
  text-align: left;
}
.book .cover {
  aspect-ratio: 10 / 16;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  background: var(--navy-card);
  position: relative;
}
.book .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.book .name {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.35;
}
.book.wide {
  grid-column: span 2;
  justify-self: center;
  width: 50%;
}
.lock-badge {
  position: absolute;
  inset: 0;
  background: rgba(7, 18, 30, 0.66);
  display: grid;
  place-items: center;
  backdrop-filter: blur(1px);
}

/* ---------- Paywall ---------- */
.price-card {
  margin-top: 20px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(79, 209, 181, 0.4);
  background: linear-gradient(180deg, var(--navy-card), var(--navy-deep));
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.price-card::after {
  content: '';
  position: absolute;
  top: -32px;
  right: -32px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(79, 209, 181, 0.12);
  filter: blur(28px);
}
.price {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}
.price .amount {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 3rem;
  line-height: 1;
}
.price .per {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.plan-toggle {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.06);
  margin: 0 auto 16px;
  max-width: 280px;
}
.plan-toggle button {
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.plan-toggle button[aria-pressed='true'] {
  background: rgba(79, 209, 181, 0.16);
  color: var(--aqua);
  box-shadow: inset 0 0 0 1px rgba(79, 209, 181, 0.4);
}
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--r-pill);
  background: var(--aqua);
  color: var(--navy-deep);
  font-weight: 600;
  transition: transform 0.15s var(--ease), opacity 0.15s var(--ease);
}
.btn:active {
  transform: scale(0.99);
}
.btn[disabled] {
  opacity: 0.6;
  pointer-events: none;
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.btn.gold {
  background: var(--gold);
  color: #22190a;
}
.checklist {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}
.checklist div {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.88rem;
  line-height: 1.4;
}
.checklist .mark {
  color: var(--aqua);
}

/* ---------- Overlay host (player + sheets) ----------
   Fixed and centred so overlays line up with the app column on desktop, and
   click-through when empty so it never swallows taps on the page beneath. */
#overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
#overlay > * {
  pointer-events: auto;
}

/* ---------- Player ---------- */
.player {
  position: relative;
  width: 100%;
  max-width: var(--max-w);
  height: 100%;
  background: var(--navy-deep);
  display: flex;
  flex-direction: column;
  padding: calc(var(--safe-top) + 8px) 20px calc(var(--safe-bottom) + 20px);
  overflow-y: auto;
  animation: rise 0.24s var(--ease);
}
@keyframes rise {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  padding: 6px 0;
}
.stage {
  margin-top: 10px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, var(--navy-card), var(--navy-deep));
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
}
.stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.stage .card-art {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stage .card-art .ep-title {
  font-size: 1.6rem;
  line-height: 1.12;
  margin-top: 6px;
}
.stage .byline {
  display: flex;
  align-items: center;
  gap: 12px;
}
.stage .byline .coach {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 2px var(--aqua), 0 0 18px rgba(79, 209, 181, 0.45);
  flex: 0 0 auto;
}
.stage .byline .coach img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stage .byline .who {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.35;
}
.stage .byline .who b {
  color: rgba(238, 244, 248, 0.9);
  font-weight: 500;
}
.scrub {
  margin-top: 20px;
}
input[type='range'].seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
}
input[type='range'].seek::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: var(--r-pill);
  background: linear-gradient(
    to right,
    var(--aqua) var(--pct, 0%),
    rgba(255, 255, 255, 0.12) var(--pct, 0%)
  );
}
input[type='range'].seek::-moz-range-track {
  height: 6px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.12);
}
input[type='range'].seek::-moz-range-progress {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--aqua);
}
input[type='range'].seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
input[type='range'].seek::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: var(--aqua);
}
.times {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: -2px;
}
.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 18px;
}
.controls .big {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--aqua);
  color: var(--navy-deep);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(79, 209, 181, 0.25);
}
.controls .side {
  color: rgba(238, 244, 248, 0.85);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
}
.player-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.chip {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(238, 244, 248, 0.9);
}
.chip[aria-pressed='true'] {
  color: var(--aqua);
  border-color: rgba(79, 209, 181, 0.5);
  background: rgba(79, 209, 181, 0.12);
}
.desc {
  margin-top: 20px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(238, 244, 248, 0.85);
}

/* ---------- Profile ---------- */
.profile-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 12px;
}
.profile-head .big-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, var(--teal), #08343c);
  box-shadow: 0 0 0 2px var(--aqua);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--aqua);
}
.badge {
  margin-top: 8px;
  font-size: 0.74rem;
  color: var(--aqua);
  background: rgba(79, 209, 181, 0.1);
  border: 1px solid rgba(79, 209, 181, 0.3);
  border-radius: var(--r-pill);
  padding: 5px 12px;
}
.badge.warn {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.35);
}
.switch {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.16);
  flex: 0 0 auto;
  transition: background 0.2s var(--ease);
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s var(--ease);
}
.switch[aria-checked='true'] {
  background: var(--aqua);
}
.switch[aria-checked='true']::after {
  transform: translateX(18px);
}

/* ---------- Tab bar ---------- */
nav.tabs {
  position: relative;
  flex: 0 0 auto;
  z-index: 50;
  height: calc(var(--tab-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex;
  background: rgba(7, 18, 30, 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
nav.tabs button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  position: relative;
}
nav.tabs button[aria-current='page'] {
  color: var(--aqua);
}
nav.tabs .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--aqua);
  opacity: 0;
}
nav.tabs button[aria-current='page'] .dot {
  opacity: 1;
}
nav.tabs .pip {
  position: absolute;
  top: 10px;
  right: calc(50% - 18px);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 2px rgba(7, 18, 30, 0.9);
}

/* ---------- Toast / banners ---------- */
.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.78rem;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}
.banner.info {
  background: rgba(79, 209, 181, 0.12);
  color: var(--aqua);
  border-color: rgba(79, 209, 181, 0.25);
}
.banner button {
  margin-left: auto;
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: underline;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + var(--safe-bottom) + 16px);
  transform: translate(-50%, 12px);
  z-index: 90;
  background: rgba(15, 38, 69, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: var(--r-pill);
  font-size: 0.8rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  max-width: calc(var(--max-w) - 40px);
  text-align: center;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Sheet (install help, checkout, sign-in) ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: auto;
  background: rgba(4, 10, 18, 0.66);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade 0.2s var(--ease);
}
.sheet {
  width: 100%;
  max-width: var(--max-w);
  background: linear-gradient(180deg, var(--navy-card), var(--navy-deep));
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 20px calc(var(--safe-bottom) + 24px);
  animation: rise 0.24s var(--ease);
  max-height: 88dvh;
  overflow-y: auto;
}
.grabber {
  width: 40px;
  height: 4px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.2);
  margin: 6px auto 14px;
}
.sheet h3 {
  margin: 0 0 6px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.2rem;
}
.sheet p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}
.field {
  margin-top: 14px;
}
.field label {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink);
  font-size: 16px; /* 16px stops iOS zoom-on-focus */
}
.field input:focus {
  outline: none;
  border-color: var(--aqua);
}
.steps {
  margin: 14px 0 0;
  padding-left: 18px;
  color: rgba(238, 244, 248, 0.85);
  font-size: 0.85rem;
  line-height: 1.7;
}

/* ---------- Empty / stub states ---------- */
.stub {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}
footer.attrib {
  text-align: center;
  color: var(--muted);
  font-size: 0.7rem;
  margin-top: 26px;
  line-height: 1.6;
}
