/* ============================================================
   DEMOS SWIPE — production stylesheet
   Adapted from the Claude Design handoff
   (design-references/Demos Swipe App/swipe-app/Demos Swipe.html).
   Changes from the mockup: the phone bezel/status-bar preview
   chrome is gone (the app IS the viewport; desktop gets a
   centered column), no Google Fonts CDN (token font stack falls
   back to system), dev switcher removed, foldnote + no-debate
   states added. Class names preserved from the design.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font-sans);
  background:
    radial-gradient(1200px 680px at 50% -10%, #EEF3EF 0%, rgba(238,243,239,0) 60%),
    var(--color-base);
  color: var(--color-charcoal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: grid;
  place-items: center;
}
a { color: var(--color-forest); }
a:hover { color: var(--color-forest-light); }
.mono { font-family: var(--font-mono); }
:where(h1,h2,h3,h4,h5,h6,p,ul,ol,figure){ margin: 0; }
button { font-family: inherit; }

/* ---- App column (full viewport on phones; centered on desktop) ---- */
.app {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  background: var(--color-base);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 431px) and (min-height: 720px) {
  body { padding: 22px 16px; }
  .app {
    height: calc(100dvh - 44px);
    max-height: 900px;
    border-radius: 30px;
    border: 1px solid var(--color-forest-pale);
    box-shadow: var(--shadow-xl);
  }
}

/* screen host */
.screens { position: relative; flex: 1 1 auto; min-height: 0; }
.screen {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  min-height: 0;
}
.screen.is-active { display: flex; }

/* ---- Shared top chrome (wordmark + language) --------------- */
.topbar {
  flex: 0 0 auto;
  padding: 14px 22px 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.topbar__brand { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; }
.topbar__mark {
  font-size: 19px; font-weight: 800; letter-spacing: -0.02em; color: var(--color-forest);
}
.topbar__mark b { color: var(--color-sage); font-weight: 800; }
.topbar__tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--color-sage);
  border: 1px solid var(--color-forest-pale); border-radius: 999px; padding: 2px 7px;
}
.lang {
  display: inline-flex; gap: 2px; align-items: center;
  font-size: 12px; font-weight: 600;
}
.lang button {
  appearance: none; background: none; border: none; cursor: pointer;
  color: var(--color-sage); padding: 4px 5px; border-radius: 7px;
  font-weight: 600; font-size: 12px;
}
.lang button.on { color: var(--color-forest); background: var(--color-sage-pale); }
.lang .sep { color: var(--color-sage-light); }

/* ---- Progress (honest, finite) ----------------------------- */
.deckhead { flex: 0 0 auto; padding: 2px 22px 0; }
.progress {
  display: flex; align-items: center; gap: 5px;
}
.progress__pips { display: flex; gap: 4px; flex: 1 1 auto; }
.progress__pip {
  height: 4px; flex: 1 1 auto; border-radius: 4px;
  background: var(--color-forest-pale);
  transition: background var(--dur-base) var(--ease-out);
}
.progress__pip.done { background: var(--color-sage); }
.progress__pip.cur { background: var(--color-forest); }
.progress__count {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  color: var(--color-sage); white-space: nowrap; letter-spacing: 0.02em;
}

/* ---- Deck (card stack) ------------------------------------- */
.deck {
  flex: 1 1 auto; min-height: 0;
  position: relative;
  padding: 14px 20px 6px;
  perspective: 1400px;
}
.cardslot { position: absolute; inset: 14px 20px 6px; }

.card {
  position: absolute; inset: 0;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  transform-style: preserve-3d;
  will-change: transform;
}
.card.is-next {
  transform: translateY(16px) scale(0.945);
  box-shadow: var(--shadow-md);
  z-index: 1;
}
.card.is-next2 {
  transform: translateY(30px) scale(0.89);
  box-shadow: var(--shadow-sm);
  z-index: 0;
  opacity: 0.55;
}
.card.is-top { z-index: 3; cursor: grab; }
.card.is-top.dragging { cursor: grabbing; transition: none; }
.card.animate { transition: transform var(--dur-medium) var(--ease-out), opacity var(--dur-medium) var(--ease-out); }
.card.gone-right { transform: translateX(140%) rotate(16deg) !important; opacity: 0; }
.card.gone-left  { transform: translateX(-140%) rotate(-16deg) !important; opacity: 0; }
.card.gone-up    { transform: translateY(-135%) scale(0.9) !important; opacity: 0; }

/* the flip mechanism — inner rotates */
.card__flip {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transition: transform var(--dur-medium) var(--ease-in-out);
}
.card.flipped .card__flip { transform: rotateY(180deg); }
.card__face, .card__back {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column;
  border-radius: 24px;
  background: var(--color-white);
  border: 1px solid var(--color-forest-pale);
}
.card__back { transform: rotateY(180deg); visibility: hidden; }
.card.flipped .card__face { visibility: hidden; }
.card.flipped .card__back { visibility: visible; }

/* The front face is the drag surface: touch-action:none stops the mobile
   browser from claiming the gesture as a scroll (which would fire
   pointercancel and snap the card back). Scoped to the face so the flip
   side's own vertical scroll (.card__backscroll) still works. user-select
   off so a drag doesn't start selecting the summary text. */
.card__face {
  touch-action: none;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}

/* band: forest = bill, maple = petition */
.card__band {
  flex: 0 0 auto;
  background: var(--color-forest);
  padding: 16px 20px 15px;
  border-radius: 23px 23px 0 0;
}
.card--petition .card__band { background: var(--color-maple); }
.card__bandrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card__kind {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff;
}
.card__kind svg { width: 14px; height: 14px; }
.card__ref {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  color: rgba(255,255,255,0.78); letter-spacing: 0.03em;
}
.card__status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.01em;
  background: rgba(255,255,255,0.94);
  border-radius: 999px; padding: 4px 10px 4px 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  white-space: nowrap;
}
.card__status .dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; }
.card--bill .card__status { color: var(--color-forest-light); }
.card--bill .card__status .dot { background: var(--color-sage); }
.card--petition .card__status { color: var(--color-maple-dark); }
.card--petition .card__status .dot { background: var(--color-maple); }
.card__title {
  color: #fff; font-size: 20px; font-weight: 700; letter-spacing: -0.01em;
  line-height: 1.22; margin-top: 12px; text-wrap: pretty;
}
.card--petition .card__title { font-size: 17px; }

/* face body — the summary is the ballot question */
.card__body {
  flex: 1 1 auto; min-height: 0;
  padding: 18px 20px 16px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.card__lbl {
  font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--color-sage); margin-bottom: 9px; flex: 0 0 auto;
}
.card__means {
  font-size: 16px; line-height: 1.56; color: var(--color-charcoal);
  text-wrap: pretty; overflow: hidden; flex: 1 1 auto;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 9;
}
.card__more {
  flex: 0 0 auto; margin-top: 10px;
  font-size: 12.5px; font-weight: 600; color: var(--color-sage);
  display: none; align-items: center; gap: 6px;
}
.card.has-overflow .card__more { display: inline-flex; }
.card__more svg { width: 14px; height: 14px; }
.card__hint {
  flex: 0 0 auto;
  margin-top: auto; padding-top: 12px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 11.5px; color: var(--color-sage);
  border-top: 1px dashed var(--color-forest-pale);
}
.card__hint svg { width: 14px; height: 14px; }

/* drag direction labels (fade in on the top card) */
.card__verdict {
  position: absolute; top: 20px; z-index: 4;
  font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 12px; border: 2.5px solid currentColor;
  background: rgba(255,255,255,0.9); opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
  pointer-events: none;
  display: inline-flex; align-items: center; gap: 7px;
}
.card__verdict svg { width: 15px; height: 15px; }
.card__verdict--support { right: 18px; color: var(--color-forest); transform: rotate(9deg); }
.card__verdict--oppose  { left: 18px; color: var(--color-charcoal); transform: rotate(-9deg); }
.card__verdict--skip    { left: 50%; transform: translateX(-50%) rotate(0); top: 14px; color: var(--color-sage); }

/* back of card */
.card__back .card__band { padding: 14px 20px 13px; }
.card__backscroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 20px 18px; }
.card__stage {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--color-warm-gray); margin-bottom: 14px;
}
.card__stage svg { width: 15px; height: 15px; color: var(--color-sage); flex: 0 0 15px; }
.card__stage b { color: var(--color-charcoal); font-weight: 600; }
.twosides { display: flex; flex-direction: column; gap: 10px; }
.side { border-radius: 14px; padding: 12px 14px; }
.side--for { background: var(--color-sage-pale); border: 1px solid var(--color-forest-pale); }
.side--against { background: #F4F5F6; border: 1px solid #E7E8EA; }
.side--note { background: #F4F5F6; border: 1px dashed #E7E8EA; }
.side__lbl {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 6px; display: inline-flex; align-items: center; gap: 6px;
}
.side--for .side__lbl { color: var(--color-forest-light); }
.side--against .side__lbl, .side--note .side__lbl { color: var(--color-warm-gray); }
.side__lbl svg { width: 13px; height: 13px; }
.side p { font-size: 13.5px; line-height: 1.5; color: var(--color-charcoal); text-wrap: pretty; }
.side--note p { color: var(--color-warm-gray); font-style: italic; }
.card__sig {
  margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--color-forest-pale);
  display: flex; align-items: baseline; gap: 8px;
}
.card__sig b { font-size: 20px; font-weight: 700; color: var(--color-maple-dark); font-variant-numeric: tabular-nums; }
.card__sig span { font-size: 12.5px; color: var(--color-warm-gray); }
.card__foldnote {
  margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--color-forest-pale);
  font-size: 13px; line-height: 1.55; color: var(--color-charcoal); text-wrap: pretty;
}
.card__foldnote .card__lbl { margin-bottom: 7px; }
.card__backhint {
  flex: 0 0 auto; padding: 11px 20px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 11.5px; color: var(--color-sage);
  border-top: 1px solid var(--color-forest-pale);
  border-radius: 0 0 23px 23px;
}
.card__backhint svg { width: 14px; height: 14px; }

/* ---- Action row (equal-weight, no red/green) --------------- */
.actions {
  flex: 0 0 auto;
  padding: 12px 26px 8px;
  display: flex; align-items: center; justify-content: center; gap: 18px;
}
.act {
  appearance: none; cursor: pointer; background: var(--color-white);
  border: 1.5px solid var(--color-forest-pale);
  border-radius: 999px;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--color-forest);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.act__ico { display: grid; place-items: center; }
.act__ico svg { display: block; }
.act__t { font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em; }
.act:active { transform: scale(0.93); }
.act:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.act--oppose, .act--support, .act--skip { width: 72px; height: 72px; }
.act--oppose:hover  { border-color: var(--color-charcoal); }
.act--skip:hover    { border-color: var(--color-sage); }
.act--support:hover { border-color: var(--color-forest); }
.act--oppose .act__ico svg  { width: 26px; height: 26px; color: var(--color-charcoal); }
.act--skip .act__ico svg    { width: 24px; height: 24px; color: var(--color-sage); }
.act--support .act__ico svg { width: 26px; height: 26px; color: var(--color-forest); }
.act--skip .act__t { color: var(--color-sage); }
.act--oppose .act__t { color: var(--color-charcoal); }

/* ---- Undo (small, immediately visible) --------------------- */
.undobar {
  flex: 0 0 auto; height: 40px;
  display: flex; align-items: center; justify-content: center;
  padding-bottom: 6px;
}
.undo {
  appearance: none; cursor: pointer; border: none; background: none;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--color-sage);
  padding: 7px 14px; border-radius: 999px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.undo.show { opacity: 1; pointer-events: auto; }
.undo:hover { background: var(--color-sage-pale); color: var(--color-forest); }
.undo svg { width: 15px; height: 15px; }
.undo b { color: var(--color-forest); font-weight: 700; }

/* ---- Generic centered panel (reveal / caught-up / auth) ---- */
.pad { padding: 0 24px; }
.scroller { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.scroller::-webkit-scrollbar { width: 0; }

.big-num {
  font-size: 74px; font-weight: 800; letter-spacing: -0.03em; line-height: 1;
  color: var(--color-forest); font-variant-numeric: tabular-nums;
}
.big-num em { font-style: normal; color: var(--color-sage); }

/* reveal */
.reveal__eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--color-sage); margin-bottom: 16px;
}
.reveal__headline {
  font-size: 22px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25;
  color: var(--color-forest); margin: 14px 0 0; text-wrap: pretty;
}
.reveal__sub { font-size: 14px; line-height: 1.55; color: var(--color-warm-gray); margin-top: 10px; text-wrap: pretty; }
.mpcard {
  margin-top: 18px; display: flex; align-items: center; gap: 13px;
  background: var(--color-white); border: 1px solid var(--color-forest-pale);
  border-radius: 16px; padding: 13px 15px; box-shadow: var(--shadow-xs);
}
.mpcard__av {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--color-forest); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 16px;
}
.mpcard__name { font-size: 14.5px; font-weight: 700; color: var(--color-charcoal); }
.mpcard__meta { font-size: 12.5px; color: var(--color-warm-gray); margin-top: 2px; }
.mpstat {
  margin-top: 12px; display: flex; align-items: center; gap: 15px;
  background: var(--color-forest); color: #fff;
  border-radius: 16px; padding: 15px 17px; box-shadow: var(--shadow-sm);
}
.mpstat__pct { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.mpstat__main { flex: 1 1 auto; min-width: 0; }
.mpstat__lbl { font-size: 13.5px; font-weight: 700; }
.mpstat__meta { font-size: 11.5px; color: var(--color-sage-light); margin-top: 2px; }
.mpstat__bar { margin-top: 9px; height: 6px; background: rgba(255,255,255,0.18); border-radius: 6px; overflow: hidden; }
.mpstat__bar span { display: block; height: 100%; background: var(--color-sage-light); border-radius: 6px; }
.sectionrule {
  display: flex; align-items: center; gap: 12px; margin: 26px 0 14px;
}
/* order keeps the rule line between the label and the trailing action:
   label (0) -> line (1) -> action (2) */
.sectionrule::after {
  content: ""; flex: 1 1 auto; height: 1px;
  background: var(--color-forest-pale); order: 1;
}
.sectionrule span {
  font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--color-sage);
  order: 0;
}
.sectionrule__act {
  order: 2; appearance: none; background: none; border: none; cursor: pointer;
  font-size: 11.5px; font-weight: 700; color: var(--color-sage);
  padding: 4px 6px; border-radius: 8px; flex: 0 0 auto;
}
.sectionrule__act:hover { color: var(--color-forest); background: var(--color-sage-pale); }
.sectionrule__act:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* clear-the-list prompt (offered right after the list is emailed) */
.clearask {
  background: var(--color-sage-pale); border: 1px solid var(--color-forest-pale);
  border-radius: 14px; padding: 14px 15px; margin-top: 4px;
}
.clearask[hidden] { display: none; }
.clearask__q { font-size: 13.5px; font-weight: 700; color: var(--color-forest); text-wrap: pretty; }
.clearask__note { font-size: 12px; line-height: 1.45; color: var(--color-warm-gray); margin-top: 5px; text-wrap: pretty; }
.clearask__row { display: flex; gap: 9px; margin-top: 12px; }
.clearask__row .btn { flex: 1 1 auto; }
.pet {
  background: var(--color-white); border: 1px solid var(--color-forest-pale);
  border-radius: 16px; padding: 15px 16px; margin-bottom: 12px; box-shadow: var(--shadow-xs);
}
.pet__ref {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-maple); margin-bottom: 6px;
}
.pet__title { font-size: 14.5px; font-weight: 600; color: var(--color-charcoal); line-height: 1.35; text-wrap: pretty; }
.pet__row { display: flex; gap: 9px; margin-top: 13px; }

/* buttons */
.btn {
  appearance: none; cursor: pointer; border: 1px solid transparent; border-radius: 13px;
  font-size: 14px; font-weight: 700; padding: 12px 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn svg { width: 16px; height: 16px; }
.btn--forest { background: var(--color-forest); color: #fff; }
.btn--forest:hover { background: var(--color-forest-light); color: #fff; }
.btn--maple { background: var(--color-maple); color: #fff; }
.btn--maple:hover { background: var(--color-maple-dark); color: #fff; }
.btn--ghost { background: var(--color-white); color: var(--color-forest); border-color: var(--color-forest-pale); }
.btn--ghost:hover { background: var(--color-sage-pale); border-color: var(--color-sage-light); }
.btn--block { width: 100%; }
.btn--sm { font-size: 12.5px; padding: 9px 13px; border-radius: 11px; }
.btn.is-done { background: var(--color-success); color: #fff; }
.btn[disabled] { opacity: 0.55; cursor: default; }

.trust {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--color-sage-pale); border: 1px solid var(--color-forest-pale);
  border-radius: 14px; padding: 13px 15px; margin-top: 4px;
}
.trust svg { flex: 0 0 18px; width: 18px; height: 18px; color: var(--color-forest); margin-top: 1px; }
.trust p { font-size: 12.5px; line-height: 1.5; color: var(--color-charcoal); text-wrap: pretty; }
.trust b { color: var(--color-forest); font-weight: 700; }

.bridge {
  margin: 22px 0 6px; padding: 15px 0 4px;
  border-top: 1px solid var(--color-forest-pale);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.bridge__t { font-size: 13px; color: var(--color-warm-gray); }
.bridge a { font-size: 13px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.bridge a svg { width: 14px; height: 14px; }

.signout {
  display: block; margin: 4px auto 0; appearance: none; background: none; border: none;
  cursor: pointer; font-size: 12px; font-weight: 600; color: var(--color-sage); padding: 8px;
}
.signout:hover { color: var(--color-forest); }

/* caught-up */
.hero-center {
  flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 34px;
}
.hero-center__art {
  width: 92px; height: 92px; border-radius: 50%;
  background: var(--color-sage-pale); border: 1px solid var(--color-forest-pale);
  display: grid; place-items: center; color: var(--color-forest); margin-bottom: 22px;
}
.hero-center__art svg { width: 44px; height: 44px; }
.hero-center h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.015em; color: var(--color-forest); text-wrap: balance; }
.hero-center p { font-size: 15px; line-height: 1.55; color: var(--color-warm-gray); margin-top: 12px; max-width: 30ch; text-wrap: pretty; }
.notify-slot {
  margin-top: 26px; width: 100%;
  border: 1px dashed var(--color-sage-light); border-radius: 14px;
  padding: 14px; display: flex; align-items: center; gap: 11px; text-align: left;
  color: var(--color-sage);
}
.notify-slot svg { flex: 0 0 20px; width: 20px; height: 20px; }
.notify-slot span { font-size: 12px; line-height: 1.45; }
.notify-slot b { display: block; color: var(--color-forest-light); font-size: 12.5px; }

/* auth + intro */
.auth { flex: 1 1 auto; display: flex; flex-direction: column; padding: 8px 26px 24px; overflow-y: auto; }
.auth__top { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
.invite {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
  font-size: 11.5px; font-weight: 600; color: var(--color-forest-light);
  background: var(--color-sage-pale); border: 1px solid var(--color-forest-pale);
  border-radius: 999px; padding: 5px 12px 5px 9px; margin-bottom: 22px;
}
.invite svg { width: 13px; height: 13px; color: var(--color-sage); }
.auth h1 { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; color: var(--color-forest); line-height: 1.12; text-wrap: balance; }
.auth__sub { font-size: 14.5px; line-height: 1.55; color: var(--color-warm-gray); margin-top: 12px; text-wrap: pretty; }
.field { margin-top: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--color-charcoal); margin-bottom: 6px; }
.field input {
  width: 100%; font-family: var(--font-sans); font-size: 15px; color: var(--color-charcoal);
  background: var(--color-white); border: 1px solid var(--color-forest-pale); border-radius: 12px;
  padding: 13px 14px;
}
.field input::placeholder { color: var(--color-sage); }
.field input:focus { outline: none; border-color: var(--color-sage); box-shadow: var(--focus-ring); }
.auth__err {
  display: none; margin-top: 14px; font-size: 13px; font-weight: 600;
  color: var(--color-maple-dark); background: #FDF2F3; border: 1px solid #F5D5D8;
  border-radius: 12px; padding: 11px 14px;
}
.auth__err.show { display: block; }
.auth__fine { font-size: 11.5px; color: var(--color-sage); text-align: center; margin-top: 16px; line-height: 1.5; }

/* intro */
.intro { flex: 1 1 auto; display: flex; flex-direction: column; padding: 12px 30px 26px; overflow-y: auto; }
.intro__top { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
.intro h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--color-forest); line-height: 1.14; text-wrap: balance; }
.intro__lines { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 18px; }
.intro__lines li { display: flex; gap: 14px; align-items: flex-start; }
.intro__ic {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px;
  background: var(--color-sage-pale); border: 1px solid var(--color-forest-pale);
  display: grid; place-items: center; color: var(--color-forest);
}
.intro__ic svg { width: 20px; height: 20px; }
.intro__lines b { display: block; font-size: 14.5px; color: var(--color-charcoal); font-weight: 700; }
.intro__lines span { font-size: 13px; color: var(--color-warm-gray); line-height: 1.45; }
.intro__skip {
  align-self: center; margin-top: 16px; appearance: none; background: none; border: none; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--color-sage); padding: 8px;
}
.intro__skip:hover { color: var(--color-forest); }

/* offline banner */
.offline {
  flex: 0 0 auto; margin: 0 20px 8px;
  display: none; align-items: center; gap: 9px;
  background: #F4F5F6; border: 1px solid #E7E8EA; border-radius: 12px;
  padding: 10px 13px; font-size: 12.5px; color: var(--color-warm-gray);
}
.offline.show { display: flex; }
.offline svg { width: 16px; height: 16px; color: var(--color-warm-gray); flex: 0 0 16px; }

/* ---- Launch splash / loading -------------------------------
   Forest ground + the reversed lockup, matching the manifest's
   background_color so the OS splash and the app's own launch screen are one
   continuous moment rather than a white flash between two brand screens. */
.splash {
  position: absolute; inset: 0;
  background: var(--color-forest);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 34px; padding: 0 44px;
}
.splash__mark {
  width: min(56%, 210px); height: auto; display: block;
}
.splash__foot {
  display: flex; align-items: center; gap: 10px;
  color: var(--color-sage-light); font-size: 13px; font-weight: 600;
}
.splash__spin {
  width: 15px; height: 15px; border-radius: 50%; flex: 0 0 15px;
  border: 2px solid rgba(181, 201, 187, 0.28);
  border-top-color: var(--color-sage-light);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .splash__spin { animation-duration: 2.4s; }
}

/* share-card preview sheet */
.sheet { position: absolute; inset: 0; z-index: 30; display: flex; align-items: flex-end; }
.sheet[hidden] { display: none; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(26,26,46,0.42); backdrop-filter: blur(2px); animation: fade 0.2s var(--ease-out); }
.sheet__panel {
  position: relative; width: 100%;
  background: var(--color-base); border-radius: 26px 26px 0 0;
  box-shadow: var(--shadow-xl); padding: 10px 22px 24px;
  animation: sheetup 0.28s var(--ease-out);
  max-height: 88%; overflow-y: auto;
}
@keyframes fade { from { opacity: 0; } }
@keyframes sheetup { from { transform: translateY(100%); } }
.sheet__handle { width: 40px; height: 4px; border-radius: 4px; background: var(--color-sage-light); margin: 4px auto 14px; }
.sheet__title { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; color: var(--color-forest); }
.sheet__sub { font-size: 12.5px; line-height: 1.5; color: var(--color-warm-gray); margin-top: 6px; text-wrap: pretty; }
.sharecard {
  margin: 16px 0; border-radius: 18px; padding: 22px 20px 18px;
  background: linear-gradient(155deg, var(--color-forest) 0%, var(--forest-800, #1F2E24) 100%);
  color: #fff; box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.sharecard__top { display: flex; align-items: center; justify-content: space-between; }
.sharecard__brand { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; }
.sharecard__brand b { color: var(--color-sage-light); }
.sharecard__leaf { color: var(--color-sage-light); }
.sharecard__leaf svg { width: 22px; height: 22px; display: block; }
.sharecard__num { font-size: 58px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin: 18px 0 0; font-variant-numeric: tabular-nums; }
.sharecard__num em { font-style: normal; color: var(--color-sage-light); }
.sharecard__line { font-size: 15px; line-height: 1.4; margin-top: 12px; max-width: 26ch; text-wrap: pretty; }
.sharecard__line b { font-weight: 700; }
.sharecard__session {
  display: inline-flex; align-items: center; margin-top: 14px;
  font-size: 12px; font-weight: 600; color: var(--color-sage-light);
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px; padding: 5px 12px; font-variant-numeric: tabular-nums;
}
.sharecard__mp { font-size: 12px; color: var(--color-sage-light); margin-top: 14px; }
.sharecard__foot { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: rgba(255,255,255,0.5); margin-top: 4px; }
.sheet__actions { display: flex; flex-direction: column; gap: 9px; }

/* toast */
.toast { position: absolute; left: 50%; bottom: 22px; transform: translate(-50%, 12px);
  background: var(--color-forest); color: #fff; font-size: 12.5px; font-weight: 600;
  padding: 10px 16px; border-radius: 999px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity var(--dur-base), transform var(--dur-base);
  z-index: 20; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .card.animate, .card__flip, .card, .undo, .toast { transition: none !important; }
  .sheet__backdrop, .sheet__panel { animation: none !important; }
}
