/* Inter (SIL Open Font License), served from this site so the page never waits for another server */
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* ==========================================================================
   National Million Scripture Blitz: one design system, light + dark.
   1 Tokens  2 Base  3 Components  4 Login  5 Dashboard  6 Phone nav + pop-up page  7 Motion
   Change colours, type sizes, radii and spacing ONLY in the tokens below.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --accent: #1f6feb;            /* main brand blue */
  --accent-strong: #1858c4;
  --accent-soft: #e8f0ff;
  --sky: #8ec5ff;
  --page: #eef3fb;
  --surface: #ffffff;
  --surface-2: #f3f7fc;
  --line: #e2e9f3;
  --text: #2b3a4e;
  --strong: #0b1f36;            /* headings and key numbers */
  --muted: #66778c;
  --hero: #0b1f36;              /* dark hero cards in both themes */
  --on-hero: #ffffff;
  --on-hero-muted: #b9cde6;
  --green: #2e9e6b;
  --red: #c9302c;
  --gold: #f2b705;
  --shadow: 0 1px 2px rgba(11, 31, 54, .04), 0 10px 30px rgba(11, 31, 54, .07);
  --shadow-lg: 0 24px 70px rgba(11, 31, 54, .22);
  color-scheme: light;

  /* aliases used by older rules */
  --blue: var(--accent); --blue-700: var(--accent-strong); --blue-50: var(--accent-soft);
  --ink: var(--strong); --frame: var(--surface-2); --bg: var(--page); --on-dark-muted: var(--on-hero-muted);

  /* type scale */
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: .8rem; --fs-sm: .9rem; --fs-md: 1rem; --fs-lg: 1.15rem; --fs-xl: 1.5rem; --fs-2xl: 2rem;
  --fs-hero: clamp(2.1rem, 6vw, 3rem);

  /* shape and space */
  --r-xs: 10px; --r-sm: 14px; --r-md: 22px; --r-lg: 30px; --r-pill: 999px;
  --gap: 16px;
  --control: 48px;
}
html[data-theme="dark"] {
  --accent: #4d8dff; --accent-strong: #8db4ff; --accent-soft: rgba(77, 141, 255, .16);
  --page: #060e1a; --surface: #0e1c2e; --surface-2: #132640; --line: #1d3250;
  --text: #c5d2e4; --strong: #f2f6fd; --muted: #8a9db6; --hero: #0e2a4d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, .55);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --accent: #4d8dff; --accent-strong: #8db4ff; --accent-soft: rgba(77, 141, 255, .16);
    --page: #060e1a; --surface: #0e1c2e; --surface-2: #132640; --line: #1d3250;
    --text: #c5d2e4; --strong: #f2f6fd; --muted: #8a9db6; --hero: #0e2a4d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
    --shadow-lg: 0 24px 70px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

/* ---------- 2. Base ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--page); color: var(--text); font: 400 var(--fs-md)/1.5 var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; transition: background-color .3s, color .3s; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { color: var(--strong); line-height: 1.2; letter-spacing: -.015em; }
h2 { font-size: var(--fs-lg); font-weight: 700; }
h3 { font-size: var(--fs-lg); font-weight: 700; }
button, input, select { font: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
body.on-login { background: radial-gradient(1100px 560px at 85% -10%, #1b4f8f 0%, rgba(27, 79, 143, 0) 62%), #07111f; min-height: 100vh; }
body.on-dash { background: radial-gradient(900px 480px at 85% -8%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 62%), var(--page); min-height: 100vh; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
svg { flex: none; }

/* ---------- 3. Components ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 20px; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-h h2 { display: flex; align-items: center; gap: 8px; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; padding: 5px 12px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-strong); }
.chip svg { width: 14px; height: 14px; }
.chip-dark { background: rgba(255, 255, 255, .12); color: #dbe9ff; }
.pill { display: inline-block; background: var(--strong); color: var(--surface); border-radius: var(--r-pill); padding: 4px 12px; font-size: var(--fs-sm); font-weight: 600; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; min-height: var(--control); margin-top: 16px; padding: 0 22px; border: 0; border-radius: var(--r-sm); background: linear-gradient(135deg, var(--accent), #3b8bff); color: #fff; font-weight: 700; font-size: var(--fs-md); cursor: pointer; box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent); transition: transform .12s, box-shadow .2s, filter .2s; }
.btn:hover { filter: brightness(1.06); box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 45%, transparent); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; box-shadow: none; }
.btn svg { width: 1.15rem; height: 1.15rem; }
.btn.secondary { background: var(--surface-2); color: var(--strong); border: 1px solid var(--line); box-shadow: none; margin-top: 12px; }
.btn.secondary:hover { background: var(--accent-soft); filter: none; }
.btn.small { width: auto; min-height: 34px; margin: 0; padding: 0 12px; font-size: var(--fs-xs); border-radius: 10px; }
.btn.danger { background: linear-gradient(135deg, #d9453f, #b3261e); box-shadow: 0 8px 20px rgba(201, 48, 44, .3); }
.link { background: none; border: 0; color: var(--accent); font-weight: 600; text-decoration: underline; cursor: pointer; padding: 10px 0; min-height: 44px; }
.link:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); color: var(--strong); cursor: pointer; transition: background .2s, transform .12s; }
.icon-btn:hover { background: var(--accent-soft); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 20px; height: 20px; }

/* form controls */
label { display: block; font-weight: 600; font-size: var(--fs-sm); color: var(--strong); margin: 14px 0 6px; }
input, select { width: 100%; min-height: var(--control); padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); color: var(--strong); transition: border-color .2s, box-shadow .2s, background .2s; }
input::placeholder { color: var(--muted); opacity: .8; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.btn:focus-visible, .tab:focus-visible, .link:focus-visible, .icon-btn:focus-visible, .bn:focus-visible, .fab:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
.mobile-row { display: flex; align-items: center; gap: 8px; }
.mobile-row .pre { flex: none; min-height: var(--control); display: grid; place-items: center; padding: 0 16px; background: var(--accent-soft); color: var(--accent-strong); border-radius: var(--r-sm); font-weight: 700; }
.big-input { font-size: var(--fs-xl); font-weight: 700; letter-spacing: .25em; text-align: center; }
.count-input { font-size: var(--fs-xl); font-weight: 800; }
.fixed { min-height: var(--control); display: flex; align-items: center; padding: 0 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); font-weight: 600; color: var(--strong); }
.choice { display: flex; gap: 12px; align-items: center; min-height: var(--control); padding: 6px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); margin-top: 8px; cursor: pointer; background: var(--surface-2); font-weight: 500; color: var(--text); }
.choice input { width: 20px; min-height: 0; height: 20px; padding: 0; accent-color: var(--accent); }

/* messages */
.err { color: var(--red); font-weight: 600; font-size: var(--fs-sm); margin-top: 10px; min-height: 1.2em; }
html[data-theme="dark"] .err { color: #ff8a84; }
.ok { color: var(--green); font-weight: 600; }
.hint { color: var(--muted); font-size: var(--fs-sm); margin-top: 8px; }
.stale, .asof { color: var(--muted); font-size: var(--fs-xs); margin-top: 10px; }
.empty { color: var(--muted); padding: 22px 0; text-align: center; font-size: var(--fs-sm); }
.notice { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: var(--r-xs); margin-bottom: 10px; color: var(--strong); font-size: var(--fs-sm); }

/* segmented tabs */
.tabs { display: flex; gap: 2px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 34px; padding: 0 14px; border: 0; background: transparent; color: var(--muted); border-radius: 10px; cursor: pointer; font-weight: 600; font-size: var(--fs-sm); transition: background .2s, color .2s; }
.tab:hover { color: var(--strong); }
.tab[aria-pressed="true"] { background: var(--surface); color: var(--strong); box-shadow: 0 1px 3px rgba(11, 31, 54, .15); }
html[data-theme="dark"] .tab[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-strong); box-shadow: none; }

/* ranked list */
.lb { list-style: none; margin: 0; padding: 0; }
.lb li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.lb li:last-child { border-bottom: 0; }
.lb li.head { color: var(--muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; padding: 4px 8px 8px; }
.lb li.mine { background: var(--accent-soft); border-radius: var(--r-sm); border-bottom-color: transparent; }
.lb li.gap { display: block; text-align: center; color: var(--muted); border: 0; padding: 4px; }
.lb .rk { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: var(--fs-sm); background: var(--surface-2); color: var(--muted); }
.lb .r1 { background: linear-gradient(135deg, #ffd75e, #f2a900); color: #3a2a00; }
.lb .r2 { background: linear-gradient(135deg, #eef3f9, #b4c1d4); color: #1b2a3d; }
.lb .r3 { background: linear-gradient(135deg, #f3cfa8, #cf8a4e); color: #3a200a; }
.lb .nm { font-weight: 600; color: var(--strong); overflow-wrap: anywhere; min-width: 0; }
.lb .sub { display: block; color: var(--muted); font-size: var(--fs-xs); font-weight: 400; }
.lb .meter { display: block; height: 5px; border-radius: 9px; background: var(--surface-2); margin-top: 7px; overflow: hidden; }
.lb li.mine .meter { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.lb .meter i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, var(--accent), #6cb4ff); transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.lb .tot { font-weight: 800; color: var(--strong); font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.lb li.head .tot { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }

/* updates list */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed li.fresh { animation: pop .6s ease; }
.feed li.empty { display: block; text-align: center; border-bottom: 0; }
.av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .8rem; background: linear-gradient(135deg, hsl(var(--h) 70% 52%), hsl(calc(var(--h) + 30) 70% 42%)); }
.feed .l1 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.feed .who2 { font-weight: 600; color: var(--strong); }
.feed .cnt { font-weight: 800; color: var(--accent); font-size: var(--fs-lg); white-space: nowrap; font-variant-numeric: tabular-nums; }
.feed .l2 { color: var(--muted); font-size: var(--fs-sm); }
.feed .l3 { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-xs); margin-top: 4px; flex-wrap: wrap; }
.feed .l3 svg { width: 14px; height: 14px; }
.feed .acts { margin-left: auto; display: flex; gap: 6px; }

/* dialog, toast, overlays */
dialog { border: 0; border-radius: var(--r-md); padding: 24px; max-width: 420px; width: calc(100% - 32px); box-shadow: var(--shadow-lg); background: var(--surface); color: var(--text); }
dialog::backdrop { background: rgba(5, 12, 24, .6); backdrop-filter: blur(2px); }
dialog h3 { margin-bottom: 8px; }
dialog .row { display: flex; gap: 10px; flex-wrap: wrap; }
dialog .row .btn { flex: 1; min-width: 120px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 24px); display: flex; align-items: center; gap: 10px; background: #0b1f36; color: #fff; padding: 12px 18px; border-radius: var(--r-sm); font-weight: 600; font-size: var(--fs-sm); opacity: 0; transition: all .3s cubic-bezier(.2, .8, .2, 1); pointer-events: none; z-index: 80; max-width: calc(100% - 32px); box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, .12); }
#toast::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #3ecf8e; flex: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 90; }
.offline-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: #b45309; color: #fff; text-align: center; font-size: var(--fs-sm); font-weight: 600; padding: 6px 12px; }
.ptr { position: fixed; top: -50px; left: 50%; width: 40px; height: 40px; margin-left: -20px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; z-index: 40; color: var(--accent); transition: top .15s; }
.ptr svg { width: 20px; height: 20px; }
.ptr.spin svg { animation: spin .8s linear infinite; }

/* campaign banner (text lives in campaign.js) */
.banner { color: #fff; }
.banner p, .banner h1, .banner h2 { margin: 0; }
.banner-verse { font-size: var(--fs-lg); }
.banner-ref { color: var(--on-hero-muted); font-size: var(--fs-sm); margin-top: 4px !important; }
.banner-title { color: #fff; font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin-top: 22px !important; }
.banner-dates { color: var(--sky); font-size: var(--fs-xl); font-weight: 800; margin-top: 8px !important; }
.banner-headline { color: #fff; font-size: var(--fs-xl); font-weight: 700; line-height: 1.25; margin-top: 4px !important; }
.banner-tagline { color: var(--on-hero-muted); margin-top: 14px !important; }
.banner-steps { margin-top: 22px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--r-md); padding: 16px 18px; }
.banner-steps h2 { color: var(--sky); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.banner-steps ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.banner-steps li { display: flex; align-items: center; gap: 12px; color: #fff; }
.step-icon { flex: none; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), #4aa0ff); color: #fff; display: grid; place-items: center; }
.step-icon svg { width: 20px; height: 20px; }
.banner-closing { margin-top: 22px !important; font-weight: 700; font-size: var(--fs-lg); color: #fff; }
.banner-slim { background: linear-gradient(155deg, #12376b, #0b1f36); border-radius: var(--r-md); padding: 20px; text-align: center; border: 1px solid rgba(255, 255, 255, .08); }
.banner-logo { display: block; height: 40px; width: auto; margin: 0 auto 14px; }
.banner-slim .banner-title { font-size: var(--fs-md); margin-top: 0 !important; }
.banner-slim .banner-dates { font-size: var(--fs-md); margin-top: 2px !important; }
.banner-slim .banner-verse { font-size: var(--fs-sm); margin-top: 10px !important; color: #fff; }
.banner-slim .banner-ref { font-size: var(--fs-xs); }

/* goal figures shared by the login strip and the dashboard gauge */
.goal-num { color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1.05; }
.goal-of { color: var(--on-hero-muted); font-weight: 600; }
.goal-pct { display: inline-block; background: var(--accent); color: #fff; border-radius: var(--r-pill); padding: 2px 12px; font-weight: 700; font-size: var(--fs-sm); }
.goal-reached { background: var(--green); }
.goal-left { color: var(--on-hero-muted); }
.bar { height: 14px; background: rgba(255, 255, 255, .14); border-radius: var(--r-pill); overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--sky)); border-radius: var(--r-pill); transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.goal.reached .bar > i { background: var(--green); }
.goal-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: var(--fs-sm); color: var(--on-hero-muted); }

/* ---------- 4. Login: always one screen, no scrolling ----------
   html.login-mode scales every rem on this page so the whole login fits on any device (see fitLogin in app.js). */
html.login-mode { font-size: clamp(8px, min(4.6vw, calc((100dvh - 28px) / 52)), 16px); --control: 3rem; }
html.login-mode, html.login-mode body { height: 100%; overflow: hidden; }
.login-outer { height: 100dvh; padding: 14px; max-width: 76rem; margin: 0 auto; display: grid; align-items: center; }
.login-card { display: grid; gap: .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: .8rem; box-shadow: var(--shadow-lg); max-height: 100%; min-height: 0; }
.login-form-panel { order: 2; padding: .8rem 1rem .4rem; display: flex; flex-direction: column; align-items: flex-start; min-height: 0; overflow-y: auto; border-radius: var(--r-md); background: radial-gradient(18rem 12rem at 0% 0%, var(--accent-soft), transparent 70%); }
.login-form-card, .login-goal-strip { width: 100%; max-width: 28rem; }
.login-logo { display: block; height: 2.6rem; width: auto; max-width: 100%; margin-bottom: .6rem; }
html[data-theme="dark"] .login-logo { content: url(/brand/gideons-logo-white.webp); }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] .login-logo { content: url(/brand/gideons-logo-white.webp); } }
.login-header-logo { display: none; }
.login-h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; }
.login-h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), #6cb4ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-sub, .login-form-card h2, .login-goal-strip .goal-line { display: none; }
.login-sub { color: var(--muted); margin-top: .3rem; max-width: 36ch; font-size: .95rem; }
.login-form-card { margin-top: .7rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: .8rem 1rem 1rem; box-shadow: var(--shadow); }
.login-form-card h2 { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.login-form-card label { margin: .6rem 0 .35rem; }
.login-form-card .btn { margin-top: .8rem; }
.login-form-card .hint { margin-top: .5rem; }
.login-form-card .err { margin-top: .4rem; min-height: 0; }
.hint.secure { display: flex; gap: .5rem; align-items: flex-start; }
.hint.secure svg { width: 1rem; height: 1rem; flex: none; margin-top: .12rem; color: var(--accent); }
.login-goal-strip { margin-top: .6rem; background: linear-gradient(135deg, #14325a, var(--hero)); border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--r-md); padding: .6rem .9rem; color: #fff; box-shadow: 0 10px 26px rgba(11, 31, 54, .25); }
.login-goal-strip .goal-line { color: var(--on-hero-muted); font-size: .85rem; }
.login-goal-strip .goal-line::before { content: ""; display: inline-block; width: .5rem; height: .5rem; margin-right: .5rem; border-radius: 50%; background: #3ecf8e; box-shadow: 0 0 0 .2rem rgba(62, 207, 142, .25); }
.login-goal-strip .goal-num { font-size: 1.4rem; }
.login-goal-strip .goal-of { font-size: .95rem; margin-left: .4rem; }
.login-goal-strip .bar { height: .6rem; margin-top: .4rem; }
.login-goal-strip .goal-meta { margin-top: .3rem; font-size: .8rem; }
.login-banner-panel { order: 1; border-radius: var(--r-md); overflow: hidden; position: relative; min-height: 0; background:
  radial-gradient(420px 260px at 100% 0%, rgba(31, 111, 235, .55), rgba(31, 111, 235, 0) 70%),
  radial-gradient(rgba(255, 255, 255, .07) 1.2px, transparent 1.4px) 0 0 / 22px 22px,
  linear-gradient(160deg, #123a66 0%, #0b1f36 70%); }
.login-banner-panel::after { content: ""; position: absolute; right: -8%; bottom: -10%; width: 52%; aspect-ratio: 1; background: url(/brand/emblem-512.png) center / contain no-repeat; opacity: .07; filter: grayscale(1) brightness(2.2); pointer-events: none; }
.login-banner-panel .banner { padding: .9rem 1.1rem; height: 100%; display: flex; flex-direction: column; justify-content: center; position: relative; }
.banner-quote { margin: 0; padding: .1rem 0 .1rem .9rem; border-left: 3px solid var(--accent); }
.login-banner-panel .banner-verse { font-size: 1.05rem; line-height: 1.4; }
.login-banner-panel .banner-ref { font-size: .8rem; }
.login-banner-panel .banner-title { font-size: 1.5rem; margin-top: .5rem !important; background: linear-gradient(90deg, #fff 35%, #a9d1ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-banner-panel .banner-dates { display: inline-flex; align-items: center; gap: .5rem; align-self: flex-start; background: rgba(142, 197, 255, .14); border: 1px solid rgba(142, 197, 255, .32); color: #fff; border-radius: var(--r-pill); padding: .25rem .9rem .25rem .7rem; font-weight: 700; font-size: 1.3rem; margin-top: .3rem !important; }
.date-icon { display: inline-flex; color: var(--sky); }
.date-icon svg { width: 1.05rem; height: 1.05rem; }
.login-banner-panel .banner-headline { font-size: 1.3rem; margin-top: .1rem !important; }
.login-banner-panel .banner-headline strong { color: var(--sky); }
.login-banner-panel .banner-tagline { font-size: .95rem; margin-top: .5rem !important; }
.login-banner-panel .banner-steps { margin-top: .7rem; padding: .6rem .9rem; border-radius: var(--r-sm); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(4px); }
.login-banner-panel .banner-steps h2 { font-size: .75rem; margin-bottom: .4rem; }
.login-banner-panel .banner-steps ul { gap: .4rem; }
.login-banner-panel .banner-steps li { gap: .6rem; font-size: .95rem; }
.login-banner-panel .step-icon { width: 1.8rem; height: 1.8rem; border-radius: .6rem; }
.login-banner-panel .step-icon svg { width: 1rem; height: 1rem; }
.step-num { display: none; }
.login-banner-panel .banner-closing { display: flex; align-items: center; gap: .6rem; align-self: flex-start; margin-top: .7rem !important; font-size: 1rem; background: linear-gradient(90deg, var(--accent), #4aa0ff); border-radius: var(--r-pill); padding: .5rem 1rem; box-shadow: 0 8px 22px rgba(31, 111, 235, .4); }
.closing-icon { display: inline-flex; }
.closing-icon svg { width: 1.1rem; height: 1.1rem; }

/* wide screens (landscape): form and banner side by side */
@media (min-aspect-ratio: 6/5) {
  html.login-mode { font-size: clamp(8px, calc((100dvh - 28px) / 36), 16px); }
  .login-sub, .login-form-card h2, .login-goal-strip .goal-line { display: block; }
  .login-logo { height: 3.2rem; margin-bottom: .9rem; }
  .login-h1 { font-size: 1.9rem; }
  .login-goal-strip { margin-top: .8rem; padding: .8rem 1rem; }
  .login-goal-strip .goal-num { font-size: 1.7rem; }
  .login-card { grid-template-columns: 1fr 1.1fr; align-items: stretch; padding: 1rem; gap: 1rem; }
  .login-form-panel { order: 1; padding: 1rem 2rem; justify-content: center; }
  .login-banner-panel { order: 2; }
  .login-banner-panel .banner { padding: 1.6rem 2rem; gap: 0; }
  .banner-quote { padding-left: 1.1rem; }
  .login-banner-panel .banner-verse { font-size: 1.2rem; }
  .login-banner-panel .banner-title { font-size: 2.3rem; margin-top: 1.1rem !important; }
  .login-banner-panel .banner-dates { font-size: 1.1rem; margin-top: .8rem !important; }
  .login-banner-panel .banner-headline { font-size: 1.55rem; margin-top: .7rem !important; }
  .login-banner-panel .banner-tagline { font-size: 1.05rem; margin-top: .6rem !important; }
  .login-banner-panel .banner-steps { margin-top: 1.1rem; padding: .9rem 1rem 1rem; }
  .login-banner-panel .banner-steps ul { grid-template-columns: repeat(3, 1fr); gap: .7rem; }
  .login-banner-panel .banner-steps li { position: relative; flex-direction: column; align-items: flex-start; gap: .55rem; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--r-sm); padding: .8rem .8rem .9rem; font-size: .95rem; }
  .login-banner-panel .step-icon { width: 2.2rem; height: 2.2rem; }
  .login-banner-panel .step-icon svg { width: 1.15rem; height: 1.15rem; }
  .step-num { display: block; position: absolute; top: .6rem; right: .8rem; font-weight: 800; font-size: 1.4rem; color: rgba(255, 255, 255, .18); }
  .login-banner-panel .banner-closing { margin-top: 1.1rem !important; font-size: 1.1rem; padding: .6rem 1.2rem; }
  .login-form-card { padding: 1rem 1.2rem 1.2rem; }
}

/* phone (portrait): gradient header + sheet, only the essentials */
@media (max-width: 599px) and (orientation: portrait) {
  body.on-login { background: #1f6feb; }
  .login-outer { padding: 0; max-width: none; height: 100dvh; align-items: stretch; }
  .login-card { display: flex; flex-direction: column; gap: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; min-height: 100dvh; max-height: none; }
  .login-banner-panel { order: 1; border-radius: 0; overflow: visible; flex: none; background:
    radial-gradient(18rem 12rem at 100% 0%, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 70%),
    radial-gradient(14rem 10rem at 0% 100%, rgba(10, 32, 54, .35), rgba(10, 32, 54, 0) 70%),
    linear-gradient(160deg, #0b4fc2 0%, #1f6feb 55%, #4a9bff 100%); }
  .login-banner-panel::after, .banner-quote, .login-banner-panel .banner-tagline, .login-banner-panel .banner-steps, .login-banner-panel .banner-closing { display: none; }
  .login-header-logo { display: block; height: 2.7rem; width: auto; margin: 1.3rem auto 0; }
  .login-banner-panel .banner { padding: .8rem 1.2rem 3.2rem; align-items: center; text-align: center; height: auto; }
  .login-banner-panel .banner-title { background: none; -webkit-background-clip: initial; color: #fff; font-size: 1.7rem; margin-top: .3rem !important; }
  .login-banner-panel .banner-dates { align-self: center; margin-top: .7rem !important; background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .35); font-size: 1rem; }
  .date-icon { color: #fff; }
  .login-banner-panel .banner-headline { font-size: 1.1rem; font-weight: 600; margin-top: .7rem !important; }
  .login-banner-panel .banner-headline strong { color: #fff; font-weight: 800; }
  .login-form-panel { order: 2; flex: 1; position: relative; margin-top: -1.8rem; border-radius: 1.8rem 1.8rem 0 0; background: var(--surface); padding: 1.5rem 1.3rem 1.2rem; align-items: stretch; justify-content: flex-start; overflow: visible; }
  .login-form-panel::before { content: ""; position: absolute; left: 1.4rem; right: 1.4rem; top: -.55rem; height: 1rem; border-radius: 1.2rem 1.2rem 0 0; background: rgba(255, 255, 255, .45); z-index: -1; }
  .login-logo { display: none; }
  .login-h1 { text-align: center; font-size: 1.7rem; }
  .login-form-card { max-width: none; margin-top: .9rem; margin-bottom: 1rem; padding: 0; border: 0; box-shadow: none; background: transparent; }
  .field { background: var(--surface); border: 1.5px solid var(--line); border-radius: 1rem; padding: .55rem 1rem .5rem; }
  .field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
  .field label { margin: 0; font-size: .75rem; font-weight: 500; color: var(--muted); }
  .field .mobile-row { gap: .6rem; }
  .field .mobile-row .pre { min-height: 0; padding: 0 .7rem 0 0; background: none; border-right: 1.5px solid var(--line); border-radius: 0; font-size: 1.1rem; color: var(--strong); }
  .field input { min-height: 2.1rem; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; font-size: 1.1rem; }
  .field input:focus { outline: none; box-shadow: none; }
  .field .big-input { text-align: left; letter-spacing: .3em; font-size: 1.3rem; }
  .login-form-card .btn { margin-top: .9rem; min-height: 3.1rem; border-radius: 1rem; background: linear-gradient(90deg, #0b4fc2, #1f6feb 55%, #4a9bff); box-shadow: 0 10px 22px rgba(31, 111, 235, .32); }
  .login-form-card .hint { text-align: left; }
  .login-form-card .link { display: block; width: 100%; text-align: center; }
  .login-goal-strip { max-width: none; margin-top: auto; padding: .8rem 1rem; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); box-shadow: none; color: var(--strong); }
  .login-goal-strip .goal-line { display: block; color: var(--accent-strong); font-weight: 600; font-size: .8rem; }
  .login-goal-strip .goal-num { color: var(--strong); font-size: 1.6rem; }
  .login-goal-strip .goal-of { color: var(--muted); }
  .login-goal-strip .bar { background: color-mix(in srgb, var(--strong) 12%, transparent); }
  .login-goal-strip .goal-meta, .login-goal-strip .goal-left { color: var(--muted); }
}

/* ---------- 5. Dashboard ---------- */
.dash { max-width: 1240px; margin: 0 auto; padding: 0 14px 40px; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -14px; padding: 10px 14px; background: color-mix(in srgb, var(--page) 78%, transparent); backdrop-filter: saturate(1.5) blur(16px); -webkit-backdrop-filter: saturate(1.5) blur(16px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.brand { display: flex; gap: 12px; align-items: center; min-width: 0; }
.logo { width: 46px; height: 46px; border-radius: 50%; flex: none; display: block; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold, #f2b705) 30%, transparent), 0 8px 18px -6px rgba(12, 37, 71, .45); }
.app-name { line-height: 1.15; display: flex; flex-direction: column; }
.app-eyebrow { font-size: .66rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-text, #b07d00); }
.app-title { font-weight: 800; font-size: clamp(1.02rem, 3.8vw, 1.4rem); letter-spacing: -.025em; background: linear-gradient(90deg, var(--strong), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.app-dates { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 5px; color: var(--muted); font-size: var(--fs-xs); }
.app-tag { font-weight: 600; }
.app-range { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-weight: 600; color: var(--accent-strong, var(--accent)); background: var(--accent-soft); }
.app-range svg { width: 12px; height: 12px; }
html[data-theme="dark"] .app-eyebrow { color: #f2c94c; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] .app-eyebrow { color: #f2c94c; } }
.user { display: flex; align-items: center; gap: 8px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); padding: 0 6px; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.live.on { color: var(--green); }
.live.on::before { background: #3ecf8e; box-shadow: 0 0 0 4px rgba(62, 207, 142, .22); animation: pulse 2s infinite; }
.avatar { width: 42px; height: 42px; border-radius: 14px; background: linear-gradient(135deg, var(--accent), #4aa0ff); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: var(--fs-sm); border: 0; cursor: pointer; }
.theme-ic-dark { display: none; }
html[data-theme="dark"] .theme-ic-light { display: none; }
html[data-theme="dark"] .theme-ic-dark { display: block; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] .theme-ic-light { display: none; } html[data-theme="auto"] .theme-ic-dark { display: block; } }

/* welcome banner */
.welcome { position: relative; overflow: hidden; isolation: isolate; margin: 14px 0 var(--gap); padding: 22px 20px 22px; border-radius: var(--r-lg, 24px); color: #fff; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: end;
  background: radial-gradient(520px 280px at 95% -10%, rgba(77, 141, 255, .55), transparent 65%), radial-gradient(360px 220px at 0% 110%, rgba(242, 183, 5, .18), transparent 70%), linear-gradient(150deg, #14407a 0%, #0c2547 80%);
  box-shadow: 0 18px 40px -18px rgba(12, 37, 71, .55); }
.welcome > * { position: relative; z-index: 1; }
.welcome-star { position: absolute; z-index: 0; right: 18px; top: 14px; width: 54px; height: 54px; color: var(--gold, #f2b705); opacity: .95; filter: drop-shadow(0 0 14px rgba(242, 183, 5, .65)); animation: twinkle 3.6s ease-in-out infinite; }
.welcome-star svg { width: 100%; height: 100%; fill: currentColor; stroke: none; }
.welcome-logo { display: block; height: 38px; width: auto; max-width: 78%; margin: 0 0 16px -4px; opacity: .96; }
@media (max-width: 480px) { .welcome-logo { height: 32px; } }
.welcome-date { font-size: var(--fs-sm); font-weight: 600; letter-spacing: .02em; color: rgba(255, 255, 255, .72); }
.welcome h1 { font-size: clamp(1.7rem, 5.2vw, 2.7rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; margin-top: 4px; color: #fff; }
.welcome h1 em { font-style: normal; background: linear-gradient(90deg, #ffe08a, #f2b705); -webkit-background-clip: text; background-clip: text; color: transparent; }
.welcome-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.wpill { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.welcome-cta { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 0; border-radius: 14px; background: #fff; color: #0c2547; font-weight: 700; font-size: var(--fs-sm); cursor: pointer; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5); transition: transform .15s; }
.welcome-cta:hover { transform: translateY(-1px); }
.welcome-cta svg { width: 18px; height: 18px; }
.welcome-day { justify-self: start; display: grid; gap: 2px; padding: 12px 16px; min-width: 150px; border-radius: 18px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.wd-label { font-size: var(--fs-xs); font-weight: 600; color: rgba(255, 255, 255, .7); text-transform: uppercase; letter-spacing: .08em; }
.wd-big { font-size: 2rem; line-height: 1.05; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.wd-of { font-size: var(--fs-sm); color: rgba(255, 255, 255, .75); font-weight: 600; margin-top: -2px; }
.wd-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .18); margin-top: 8px; overflow: hidden; }
.wd-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffe08a, #f2b705); }
@media (max-width: 699px) { .welcome-day { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; justify-self: stretch; padding: 10px 14px; } .wd-big { font-size: 1.4rem; } .wd-bar { flex-basis: 100%; margin-top: 4px; } }
@media (min-width: 700px) { .welcome { grid-template-columns: minmax(0, 1fr) auto; padding: 30px 32px; } .welcome-day { justify-self: end; margin-right: 56px; } }
.snow { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.snow i { position: absolute; top: -10px; left: var(--x); width: var(--z); height: var(--z); border-radius: 50%; background: rgba(255, 255, 255, .75); animation: snowfall var(--d) linear var(--s) infinite; }
@keyframes snowfall { to { transform: translate3d(14px, 320px, 0); opacity: 0; } }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: .95; } 50% { transform: scale(1.12) rotate(8deg); opacity: .75; } }
@media (prefers-reduced-motion: reduce) { .snow i, .welcome-star { animation: none; } }

/* saved moment */
.saved { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 6px 4px 2px; }
.saved h3 { margin: 4px 0 0; font-size: var(--fs-xl); letter-spacing: -.02em; }
.saved-check { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #3ecf8e, #14a36b); box-shadow: 0 0 0 10px rgba(62, 207, 142, .18); animation: saved-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.saved-check svg { width: 40px; height: 40px; stroke-width: 3; stroke-dasharray: 30; animation: draw .5s .25s ease-out both; }
.saved-n { color: var(--muted); }
.saved-n b { color: var(--strong); font-size: 1.5rem; margin-right: 4px; font-variant-numeric: tabular-nums; }
.saved-rank { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: color-mix(in srgb, var(--gold, #f2b705) 20%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gold, #f2b705) 50%, var(--line)); color: var(--strong); font-weight: 600; font-size: var(--fs-sm); }
.saved-rank svg { width: 18px; height: 18px; color: #c88a00; }
.saved-verse { color: var(--muted); font-size: var(--fs-sm); font-style: italic; }
.saved .btn { margin-top: 8px; width: 100%; }
@keyframes saved-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes draw { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .saved-check, .saved-check svg { animation: none; } }

.greet { margin: 22px 2px 18px; }
.greet-date { color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }
.greet h1 { font-size: clamp(1.8rem, 5vw, 2.7rem); font-weight: 800; letter-spacing: -.035em; margin-top: 4px; }
.greet h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), #6cb4ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.greet-sub { color: var(--muted); margin-top: 6px; }

/* layout: main column (goal, camp, ranking) + side column (updates, then the form) */
.layout { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); align-items: start; }
.layout .card, .dash { min-width: 0; }
html, body { overflow-x: clip; }
.col-main, .col-side { display: grid; gap: var(--gap); min-width: 0; }
.row-top { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .row-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1060px) { .row-top { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }

/* hero: national goal */
.hero { position: relative; overflow: hidden; color: #fff; border: 0; display: flex; flex-direction: column; background:
  radial-gradient(520px 260px at 100% 0%, rgba(77, 141, 255, .5), transparent 65%),
  radial-gradient(380px 240px at 0% 100%, rgba(142, 197, 255, .16), transparent 70%),
  linear-gradient(155deg, #12376b 0%, var(--hero) 75%); }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.3px) 0 0 / 20px 20px; mask-image: linear-gradient(#000, transparent 75%); -webkit-mask-image: linear-gradient(#000, transparent 75%); pointer-events: none; }
.hero > * { position: relative; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.gauge-wrap { position: relative; max-width: 360px; width: 100%; margin: 10px auto 0; }
.gauge { width: 100%; display: block; }
.gauge line { stroke: rgba(255, 255, 255, .15); stroke-width: 6; stroke-linecap: round; transition: stroke .5s ease; }
.gauge line.on { stroke: hsl(calc(215 - var(--t) * 14), 92%, calc(58% + var(--t) * 16%)); filter: drop-shadow(0 0 4px rgba(120, 180, 255, .55)); }
.hero.reached .gauge line.on { stroke: #3ecf8e; filter: drop-shadow(0 0 4px rgba(62, 207, 142, .6)); }
.gauge-center { position: absolute; left: 0; right: 0; bottom: 4%; text-align: center; }
.gauge-center .goal-num { font-size: var(--fs-hero); }
.gauge-center .goal-of { font-size: var(--fs-sm); margin: 2px 0 8px; }
.hero.reached .goal-pct { background: var(--green); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; text-align: center; }
.stats div { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--r-sm); padding: 10px 4px; min-width: 0; }
.stats b { display: block; font-size: clamp(.85rem, 4vw, 1.15rem); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stats span { color: var(--on-hero-muted); font-size: var(--fs-xs); }
.hero.loading .goal-num { color: transparent; background: rgba(255, 255, 255, .14); border-radius: 12px; min-width: 6ch; }

/* your camp */
.camp-card { display: flex; flex-direction: column; }
.camp-name { margin-top: 12px; }
.camp-total { font-size: var(--fs-hero); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; margin-top: 10px; font-variant-numeric: tabular-nums; background: linear-gradient(90deg, var(--accent), #6cb4ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.camp-sub { color: var(--muted); font-size: var(--fs-sm); }
.capsule { height: 10px; border-radius: var(--r-pill); background: var(--surface-2); margin-top: 18px; overflow: hidden; border: 1px solid var(--line); }
.capsule i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #6cb4ff); border-radius: var(--r-pill); transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.camp-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: var(--fs-sm); flex-wrap: wrap; }

/* update form (accent card) */
.form-card { position: relative; color: #fff; border: 0; background: radial-gradient(300px 200px at 100% 0%, rgba(255, 255, 255, .22), transparent 70%), linear-gradient(160deg, var(--accent), #0b4fc2); box-shadow: 0 16px 40px color-mix(in srgb, var(--accent) 35%, transparent); }
.form-card h2, .form-card label { color: #fff; }
.form-card input, .form-card select, .form-card .fixed { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); color: #fff; color-scheme: dark; }
.form-card input::placeholder { color: rgba(255, 255, 255, .65); }
.form-card option { color: #0b1f36; background: #fff; }
.form-card input:focus, .form-card select:focus { border-color: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .25); }
.form-card .btn { background: #fff; color: #0b4fc2; box-shadow: 0 10px 24px rgba(5, 20, 50, .3); }
.form-card .btn:hover { filter: none; background: #f0f6ff; }
.form-card .err { color: #ffd9d6; }
.form-card .notice { background: rgba(255, 255, 255, .16); border-left-color: #fff; color: #fff; }
.form-card .stale, .form-card .hint { color: #dbe9ff; }
.foot { margin-top: 24px; }

/* ---------- 6. Phone: bottom bar ---------- */
.bottomnav { display: none; }
@media (max-width: 699px) {
  .dash { padding-bottom: 120px; }
  .live span, .app-tag { display: none; }
  .bottomnav { position: fixed; left: 12px; right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 35; display: grid; grid-template-columns: 1fr 1fr 76px 1fr 1fr; align-items: center; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: 26px; padding: 6px; box-shadow: var(--shadow-lg); }
  .bn { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: .68rem; font-weight: 600; padding: 6px 0; min-height: 52px; cursor: pointer; border-radius: 18px; transition: color .2s; }
  .bn svg { width: 22px; height: 22px; }
  .bn[aria-current="true"] { color: var(--accent); }
  .fab { width: 60px; height: 60px; border-radius: 22px; margin: -30px auto 0; background: linear-gradient(135deg, var(--accent), #4aa0ff); color: #fff; border: 4px solid var(--page); display: grid; place-items: center; box-shadow: 0 12px 26px color-mix(in srgb, var(--accent) 50%, transparent); cursor: pointer; transition: transform .15s; }
  .fab:active { transform: scale(.92); }
  .fab svg { width: 26px; height: 26px; }
  #toast { bottom: 104px; }
  .card { padding: 18px; }
  .lb li { grid-template-columns: 32px 1fr auto; gap: 10px; }
}
@media (max-width: 599px) {
  dialog { margin: auto 0 0; max-width: none; width: 100%; border-radius: 26px 26px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); }
}

/* menu sheet */
.menu-user { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.menu-user .avatar { width: 52px; height: 52px; border-radius: 18px; font-size: var(--fs-lg); cursor: default; flex: none; }
.menu-user b { display: block; color: var(--strong); }
.menu-user div span { color: var(--muted); font-size: var(--fs-sm); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); }
.seg button { min-height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button svg { width: 16px; height: 16px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--strong); box-shadow: 0 1px 3px rgba(11, 31, 54, .18); }
html[data-theme="dark"] .seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-strong); box-shadow: none; }
.menu-label { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 16px 0 8px; }

/* ---------- 7. Motion and skeletons ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { background: var(--accent-soft); } 100% { background: transparent; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(62, 207, 142, .22); } 50% { box-shadow: 0 0 0 7px rgba(62, 207, 142, .08); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { transform: translateX(100%); } }
.dash .card { animation: rise .32s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 35ms); }
.sk { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 10px; min-height: 1em; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 12%, transparent), transparent); animation: shimmer 1.3s infinite; }
.sk-row { display: grid; grid-template-columns: 34px 1fr 54px; gap: 12px; align-items: center; padding: 12px 8px; }
.sk-row .sk:first-child { width: 30px; height: 30px; border-radius: 10px; }
.sk-feed { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 13px 0; }
.sk-feed .sk:first-child { width: 40px; height: 40px; border-radius: 50%; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- 8. Pop-up page (recent updates + update form), call-to-action, pagers, venue ---------- */
.cta-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer; color: #fff; border: 0; padding: 18px 20px; background: radial-gradient(260px 160px at 100% 0%, rgba(255, 255, 255, .24), transparent 70%), linear-gradient(135deg, var(--accent), #0b4fc2); box-shadow: 0 16px 40px color-mix(in srgb, var(--accent) 35%, transparent); transition: transform .15s, box-shadow .2s; font: inherit; }
.cta-card:hover { transform: translateY(-2px); }
.cta-card:active { transform: scale(.99); }
.cta-ic { flex: none; width: 46px; height: 46px; border-radius: 15px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; }
.cta-ic svg { width: 24px; height: 24px; }
.cta-text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.cta-text b { font-size: var(--fs-lg); }
.cta-text span { color: #dbe9ff; font-size: var(--fs-sm); }
.cta-go { flex: none; width: 38px; height: 38px; border-radius: 12px; background: #fff; color: #0b4fc2; display: grid; place-items: center; }
.cta-go svg { width: 20px; height: 20px; }

body.modal-open { overflow: hidden; }
.page-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(5, 12, 24, .6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .22s; }
.page-modal.open { opacity: 1; pointer-events: auto; }
.page-box { width: min(1080px, 100%); max-height: calc(100dvh - 36px); overflow-y: auto; background: var(--page); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-lg); transform: translateY(26px) scale(.985); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.page-modal.open .page-box { transform: none; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.page-head h2 { font-size: var(--fs-xl); letter-spacing: -.02em; }
.page-body { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); align-items: start; }
.page-body .card { animation: none; }
@media (min-width: 900px) { .page-body { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } .form-card { position: sticky; top: 0; } }
@media (max-width: 699px) {
  .page-modal { padding: 0; align-items: stretch; }
  .page-box { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; padding: 16px 14px calc(24px + env(safe-area-inset-bottom)); }
  .page-head h2 { font-size: var(--fs-lg); }
}

.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.pager .btn.small { min-height: 38px; padding: 0 14px; gap: 4px; }
.pager .btn svg { width: 16px; height: 16px; }
.pager-info { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; text-align: center; flex: 1; }
.all-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 12px 0 4px; }
.size-sel { width: auto; min-width: 120px; }
.feed .venue { display: flex; align-items: center; gap: 6px; color: var(--text); }
.feed .venue svg { width: 14px; height: 14px; color: var(--accent); }
.opt { font-weight: 500; opacity: .75; }

/* ---------- 9. Required marks, State picker, phone date box ---------- */
label.req::after { content: " *"; color: #ffd0cd; font-weight: 700; }
.card:not(.form-card) label.req::after, dialog label.req::after { color: var(--red); }
.form-card h2 { margin-bottom: 12px; }
.state-bar { margin: -4px 0 12px; }
.state-bar select { width: 100%; max-width: 100%; text-overflow: ellipsis; }
/* iPhone Safari draws date boxes wider than the card unless they are reset */
input[type="date"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; width: 100%; text-align: left; line-height: 1.2; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; min-height: 1.2em; }

/* ---------- 10. Leaderboard: podium, tools row, top-bar button ---------- */
.lb-card .card-h h2 svg { width: 22px; height: 22px; color: var(--accent); }
.lb-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin: 0 0 14px; }
.lb-tools select, .lb-tools input { min-width: 0; }
@media (max-width: 560px) { .lb-tools { grid-template-columns: minmax(0, 1fr); } }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 4px 0 16px; }
.pod { flex: 1; max-width: 240px; min-width: 0; display: grid; justify-items: center; gap: 4px; text-align: center; padding: 16px 10px 14px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--line); }
.pod-1::before { content: "★"; position: absolute; top: -12px; color: var(--gold); font-size: 1.1rem; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--gold) 70%, transparent)); }
.pod { position: relative; }
.pod-1 { padding-top: 26px; padding-bottom: 20px; border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 20%, var(--surface)), var(--surface-2)); box-shadow: 0 12px 30px color-mix(in srgb, var(--gold) 22%, transparent); }
.pod-2 { background: linear-gradient(180deg, color-mix(in srgb, #9fb0c6 18%, var(--surface)), var(--surface-2)); }
.pod-3 { background: linear-gradient(180deg, color-mix(in srgb, #cf8a4e 16%, var(--surface)), var(--surface-2)); }
.pod.mine { outline: 2px solid var(--accent); outline-offset: 2px; }
.pod .rk { background: var(--surface); color: var(--strong); }
.pod .r1 { background: linear-gradient(135deg, #ffd75e, #f2a900); color: #3a2a00; }
.pod .r2 { background: linear-gradient(135deg, #eef3f9, #b4c1d4); color: #1b2a3d; }
.pod .r3 { background: linear-gradient(135deg, #f3cfa8, #cf8a4e); color: #3a200a; }
.rk.big { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; box-shadow: 0 4px 10px rgba(11, 31, 54, .15); }
.pod-1 .rk.big { width: 56px; height: 56px; font-size: 1.5rem; }
.pod-name { color: var(--strong); font-size: var(--fs-sm); line-height: 1.25; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pod-sub { color: var(--muted); font-size: var(--fs-xs); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pod-total { font-weight: 800; font-size: var(--fs-xl); color: var(--strong); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pod-1 .pod-total { font-size: var(--fs-2xl); }
@media (max-width: 480px) { .podium { gap: 6px; } .pod { padding: 12px 6px; border-radius: 16px; } .pod-1 { padding-top: 20px; } .pod-total { font-size: var(--fs-lg); } .pod-1 .pod-total { font-size: var(--fs-xl); } .rk.big { width: 38px; height: 38px; font-size: 1rem; } .pod-1 .rk.big { width: 48px; height: 48px; } }
.top-cta { display: none; width: auto; margin: 0; min-height: 42px; padding: 0 16px; border-radius: var(--r-sm); font-size: var(--fs-sm); }
@media (min-width: 700px) { .top-cta { display: inline-flex; } }

/* ---------- Christmas season: starlight, lit gauge stars, login snow, milestone pop-up ---------- */
body.on-dash::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(2px 2px at 12% 18%, rgba(242, 183, 5, .55), transparent 60%), radial-gradient(1.5px 1.5px at 78% 9%, rgba(242, 183, 5, .5), transparent 60%),
    radial-gradient(2px 2px at 90% 42%, rgba(77, 141, 255, .5), transparent 60%), radial-gradient(1.5px 1.5px at 6% 63%, rgba(77, 141, 255, .45), transparent 60%),
    radial-gradient(2px 2px at 64% 84%, rgba(242, 183, 5, .45), transparent 60%), radial-gradient(500px 300px at 100% 0%, rgba(242, 183, 5, .07), transparent 70%); }
.topbar { border-bottom: 0; box-shadow: 0 1px 0 color-mix(in srgb, var(--line) 70%, transparent); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, #f2b705 30%, #ffe08a 50%, #f2b705 70%, transparent); opacity: .85; }
.welcome-cta { background: linear-gradient(135deg, #ffe08a, #f2b705); color: #2b2000; box-shadow: 0 10px 24px -8px rgba(242, 183, 5, .6); }
.lb-card .card-h h2 svg { color: #d99a00; }

.gauge .mstar { fill: rgba(255, 255, 255, .22); transition: fill .6s, filter .6s; }
.gauge .mstar.lit { fill: #ffd75e; filter: drop-shadow(0 0 5px rgba(255, 215, 94, .9)); animation: twinkle-s 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes twinkle-s { 0%, 100% { opacity: 1; } 50% { opacity: .7; } }
.hero.reached .gauge .mstar { filter: drop-shadow(0 0 9px rgba(255, 215, 94, 1)); }

.login-star { position: absolute; z-index: 1; top: .7rem; right: .8rem; width: 2rem; height: 2rem; color: #f2b705; filter: drop-shadow(0 0 10px rgba(242, 183, 5, .7)); animation: twinkle 3.6s ease-in-out infinite; pointer-events: none; }
.login-star svg { width: 100%; height: 100%; fill: currentColor; stroke: none; }
.login-banner-panel > .snow { z-index: 0; border-radius: inherit; }
.login-banner-panel > .banner, .login-banner-panel > img { position: relative; z-index: 1; }

.ms { position: relative; overflow: hidden; display: grid; justify-items: center; gap: 8px; text-align: center; padding: 22px 18px 6px; border-radius: 18px; color: #fff; isolation: isolate;
  background: radial-gradient(300px 180px at 50% -10%, rgba(255, 215, 94, .35), transparent 70%), linear-gradient(160deg, #14407a, #0c2547); }
.ms > * { position: relative; z-index: 1; }
.ms > .snow { position: absolute; z-index: 0; }
.ms-star { width: 84px; height: 84px; color: #ffd75e; filter: drop-shadow(0 0 22px rgba(255, 215, 94, .85)); animation: saved-pop .7s cubic-bezier(.2, 1.4, .4, 1) both, twinkle 3.6s 1s ease-in-out infinite; }
.ms-star svg { width: 100%; height: 100%; fill: currentColor; stroke: none; }
.ms-eyebrow { font-size: .7rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: #ffe08a; }
.ms h3 { margin: 0; font-size: clamp(1.7rem, 7vw, 2.3rem); letter-spacing: -.03em; color: #fff; }
.ms-text { color: rgba(255, 255, 255, .85); }
.ms-thanks { color: #ffe08a; font-weight: 700; font-size: var(--fs-sm); }
.ms .btn { margin: 10px 0 12px; width: 100%; background: linear-gradient(135deg, #ffe08a, #f2b705); color: #2b2000; }
@media (prefers-reduced-motion: reduce) { .gauge .mstar.lit, .login-star, .ms-star { animation: none; } }

/* ---------- Glass cards, motion, bold numbers, richer dark mode ---------- */
:root { --glass-bg: color-mix(in srgb, var(--surface) 66%, transparent); --glass-line: rgba(255, 255, 255, .7); --glass-hi: rgba(255, 255, 255, .6); --glow-a: rgba(31, 111, 235, .22); --glow-b: rgba(242, 183, 5, .16); }
html[data-theme="dark"] { --page: #050b16; --surface: #0b1830; --surface-2: #11284a; --line: #1b3358; --glass-bg: rgba(14, 30, 58, .58); --glass-line: rgba(255, 255, 255, .09); --glass-hi: rgba(255, 255, 255, .07); --glow-a: rgba(77, 141, 255, .28); --glow-b: rgba(242, 183, 5, .14); --gold-text: #f2c94c; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] { --page: #050b16; --surface: #0b1830; --surface-2: #11284a; --line: #1b3358; --glass-bg: rgba(14, 30, 58, .58); --glass-line: rgba(255, 255, 255, .09); --glass-hi: rgba(255, 255, 255, .07); --glow-a: rgba(77, 141, 255, .28); --glow-b: rgba(242, 183, 5, .14); --gold-text: #f2c94c; } }

/* colour blobs behind the glass so the blur has something to show */
body.on-dash::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(520px 420px at 8% 38%, var(--glow-a), transparent 70%), radial-gradient(520px 420px at 96% 70%, var(--glow-b), transparent 70%), radial-gradient(420px 320px at 40% 105%, var(--glow-a), transparent 70%); }
body.on-dash { background: var(--page); }

.dash .card:not(.hero):not(.cta-card):not(.form-card), .page-box .card:not(.form-card) { background: var(--glass-bg); border: 1px solid var(--glass-line); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow); }
.page-box { background: color-mix(in srgb, var(--page) 80%, transparent); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.topbar { background: color-mix(in srgb, var(--page) 60%, transparent); backdrop-filter: saturate(1.6) blur(20px); -webkit-backdrop-filter: saturate(1.6) blur(20px); }
.bottomnav { backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); }
.pod { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* motion */
.dash .card { transition: translate .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; }
@media (hover: hover) { .dash .card:hover { translate: 0 -3px; box-shadow: inset 0 1px 0 var(--glass-hi), 0 18px 40px -14px rgba(11, 31, 54, .35); } }
.lb li { transition: background-color .2s, padding-left .2s; }
@media (hover: hover) { .lb li:not(.head):not(.gap):hover { background: var(--accent-soft); border-radius: var(--r-sm); padding-left: 12px; } }
.page-modal.open .page-box .card { animation: rise .4s cubic-bezier(.2, .8, .2, 1) both; }
.welcome { background-size: 140% 140%, 140% 140%, 100% 100%; animation: sky 18s ease-in-out infinite alternate; }
@keyframes sky { 0% { background-position: 0% 0%, 0% 100%, 0 0; } 100% { background-position: 40% 20%, 30% 80%, 0 0; } }
.welcome-cta::after, .btn:not(.secondary):not(.danger)::after { content: none; }
@media (prefers-reduced-motion: reduce) { .welcome, .page-modal.open .page-box .card { animation: none; } .dash .card { transition: none; } }

/* bigger, bolder numbers */
.gauge-center .goal-num { font-size: clamp(2.5rem, 9.5vw, 3.9rem); font-weight: 900; letter-spacing: -.045em; text-shadow: 0 0 28px rgba(255, 215, 94, .35); }
.camp-total { font-size: clamp(2.7rem, 9vw, 3.9rem); font-weight: 900; letter-spacing: -.045em; background: linear-gradient(90deg, var(--accent) 20%, #d99a00); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pod-1 .pod-total { font-size: clamp(1.6rem, 6vw, 2.4rem); font-weight: 900; }
.stats b { font-weight: 800; }
.wd-big { font-weight: 900; }

/* richer dark mode: navy depth, gold accents, glow */
html[data-theme="dark"] .welcome, html[data-theme="dark"] .hero { box-shadow: 0 20px 50px -20px rgba(77, 141, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .08); }
html[data-theme="dark"] .lb-card .card-h h2 svg, html[data-theme="dark"] .saved-rank svg { color: #f2c94c; }
html[data-theme="dark"] .pod-1 { box-shadow: 0 0 40px -6px rgba(242, 183, 5, .4); }
html[data-theme="dark"] .camp-total { background: linear-gradient(90deg, #8db4ff 10%, #f2c94c); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-theme="dark"] .logo { box-shadow: 0 0 0 3px rgba(242, 183, 5, .35), 0 0 22px rgba(242, 183, 5, .25); }
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .welcome, html[data-theme="auto"] .hero { box-shadow: 0 20px 50px -20px rgba(77, 141, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .08); }
  html[data-theme="auto"] .lb-card .card-h h2 svg, html[data-theme="auto"] .saved-rank svg { color: #f2c94c; }
  html[data-theme="auto"] .pod-1 { box-shadow: 0 0 40px -6px rgba(242, 183, 5, .4); }
  html[data-theme="auto"] .camp-total { background: linear-gradient(90deg, #8db4ff 10%, #f2c94c); -webkit-background-clip: text; background-clip: text; color: transparent; }
  html[data-theme="auto"] .logo { box-shadow: 0 0 0 3px rgba(242, 183, 5, .35), 0 0 22px rgba(242, 183, 5, .25); }
}

/* ---------- Login page: night-sky, glass and gold (visual only; sizes are unchanged so the one-screen fit still holds) ---------- */
body.on-login { background: radial-gradient(900px 520px at 88% -8%, rgba(31, 111, 235, .6), transparent 62%), radial-gradient(700px 460px at 0% 105%, rgba(242, 183, 5, .16), transparent 65%), radial-gradient(500px 360px at 50% 50%, rgba(77, 141, 255, .16), transparent 70%), #050d1c; }
body.on-login::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(2px 2px at 10% 22%, rgba(255, 224, 138, .85), transparent 60%), radial-gradient(1.5px 1.5px at 24% 70%, rgba(255, 255, 255, .6), transparent 60%), radial-gradient(2px 2px at 46% 12%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(1.5px 1.5px at 68% 82%, rgba(255, 224, 138, .7), transparent 60%), radial-gradient(2px 2px at 86% 30%, rgba(255, 255, 255, .6), transparent 60%), radial-gradient(1.5px 1.5px at 94% 64%, rgba(255, 224, 138, .7), transparent 60%); animation: twinkle-bg 5s ease-in-out infinite alternate; }
@keyframes twinkle-bg { from { opacity: .55; } to { opacity: 1; } }

.login-card { background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid rgba(255, 255, 255, .55); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 224, 138, .18), inset 0 1px 0 rgba(255, 255, 255, .6); }
html[data-theme="dark"] .login-card { border-color: rgba(255, 255, 255, .1); background: rgba(11, 24, 48, .72); }
.login-form-panel { background: radial-gradient(18rem 12rem at 0% 0%, var(--accent-soft), transparent 70%), radial-gradient(14rem 10rem at 100% 100%, rgba(242, 183, 5, .1), transparent 70%); }
.login-h1 { font-weight: 800; letter-spacing: -.03em; word-spacing: .08em; }
.login-h1 em { background: linear-gradient(90deg, #1f6feb, #d99a00); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-form-card { background: color-mix(in srgb, var(--surface) 75%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.login-form-card .btn { background: linear-gradient(135deg, #ffe08a, #f2b705); color: #2b2000; font-weight: 800; box-shadow: 0 12px 28px -8px rgba(242, 183, 5, .65); }
.login-form-card .btn:hover { box-shadow: 0 14px 32px -6px rgba(242, 183, 5, .8); }
.login-form-card input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, #f2b705 28%, transparent); border-color: #d99a00; }
.login-goal-strip { background: linear-gradient(135deg, #14407a, #0c2547); box-shadow: 0 14px 30px -10px rgba(12, 37, 71, .6), inset 0 1px 0 rgba(255, 255, 255, .1); }
.login-goal-strip .goal-num { font-weight: 900; text-shadow: 0 0 22px rgba(255, 215, 94, .4); }
.login-goal-strip .bar > i { background: linear-gradient(90deg, #ffe08a, #f2b705); }
.login-banner-panel { background-size: auto, 22px 22px, auto; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
@media (max-width: 599px) and (orientation: portrait) {
  body.on-login { background: #0c3a85; }
  .login-card { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; box-shadow: none; }
  .login-banner-panel { background: radial-gradient(18rem 12rem at 100% 0%, rgba(255, 215, 94, .3), transparent 70%), radial-gradient(14rem 10rem at 0% 100%, rgba(5, 13, 28, .5), transparent 70%), linear-gradient(160deg, #0a3f9a 0%, #1f6feb 60%, #3f8cff 100%); }
  .login-form-panel { background: var(--surface); box-shadow: 0 -18px 40px -18px rgba(0, 0, 0, .45); }
  .login-form-card .btn { background: linear-gradient(135deg, #ffe08a, #f2b705); }
  .login-goal-strip { background: linear-gradient(135deg, #14407a, #0c2547); color: #fff; border: 0; }
  .login-goal-strip .goal-line { color: #ffe08a; }
  .login-goal-strip .goal-num { color: #fff; }
  .login-goal-strip .goal-of, .login-goal-strip .goal-meta, .login-goal-strip .goal-left { color: rgba(255, 255, 255, .75); }
  .login-goal-strip .bar { background: rgba(255, 255, 255, .18); }
}
@media (prefers-reduced-motion: reduce) { body.on-login::before { animation: none; } }
/* the gold focus ring belongs on the input itself (desktop) or the rounded field box (phone), never on the plain wrapper */
.field:focus-within { box-shadow: none; border-color: transparent; }
@media (max-width: 599px) and (orientation: portrait) { .field:focus-within { border-color: #d99a00; box-shadow: 0 0 0 4px color-mix(in srgb, #f2b705 28%, transparent); } .field input:focus { box-shadow: none; } }

/* speedometer sweep */
.gauge.sweeping line { transition: none; }
.gauge line.lead { stroke: #ffe08a !important; stroke-width: 8; filter: drop-shadow(0 0 7px rgba(255, 215, 94, .95)) !important; }

/* phones: the sheet must paint ABOVE the blue header (it overlaps it by a little), otherwise the header's gradient covers the sheet's top edge and the "Welcome Back" line */
@media (max-width: 599px) and (orientation: portrait) {
  .login-form-panel { position: relative; z-index: 3; }
  .login-banner-panel { z-index: 1; }
  .login-form-panel::before { z-index: -1; }
}

/* "newer version available" bar */
.update-bar { position: fixed; z-index: 90; top: max(10px, env(safe-area-inset-top)); left: 50%; translate: -50% 0; width: min(560px, calc(100vw - 20px)); display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: 16px; color: #fff; font-weight: 600; font-size: var(--fs-sm);
  background: linear-gradient(135deg, #14407a, #0c2547); border: 1px solid rgba(255, 224, 138, .5); box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .55); animation: bar-in .45s cubic-bezier(.2, 1.2, .4, 1) both; }
.update-bar span { flex: 1; display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.update-bar svg { width: 18px; height: 18px; color: #ffd75e; }
.update-go { border: 0; border-radius: 11px; min-height: 38px; padding: 0 16px; font-weight: 800; cursor: pointer; background: linear-gradient(135deg, #ffe08a, #f2b705); color: #2b2000; }
.update-x { width: 34px; height: 34px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.update-x svg { width: 16px; height: 16px; color: #fff; }
@keyframes bar-in { from { transform: translateY(-120%); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .update-bar { animation: none; } }

/* ---------- "Saved" and milestone pop-ups: night-sky card ---------- */
dialog:has(.saved), dialog:has(.ms) { background: transparent; padding: 0; box-shadow: none; overflow: visible; }
dialog:has(.saved)::backdrop, dialog:has(.ms)::backdrop { background: rgba(3, 8, 20, .72); backdrop-filter: blur(6px); }
@media (max-width: 699px) { dialog:has(.saved), dialog:has(.ms) { padding: 0; } }
.saved { position: relative; overflow: hidden; isolation: isolate; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 30px 22px 22px; border-radius: 26px; color: #fff;
  background: radial-gradient(340px 220px at 50% -8%, rgba(255, 215, 94, .32), transparent 70%), radial-gradient(300px 200px at 100% 100%, rgba(77, 141, 255, .45), transparent 70%), linear-gradient(160deg, #14407a, #0a1f42);
  border: 1px solid rgba(255, 224, 138, .35); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .15); }
.saved > * { position: relative; z-index: 1; }
.saved > .snow { position: absolute; z-index: 0; }
.saved h3 { color: #fff; font-size: 1.5rem; margin: 0; letter-spacing: -.02em; }
.saved-badge { position: relative; width: 84px; height: 84px; display: grid; place-items: center; margin-bottom: 4px; }
.saved-badge .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(62, 207, 142, .7); animation: ring-out 1.6s ease-out infinite; }
.saved-badge .ring.r2 { animation-delay: .8s; }
@keyframes ring-out { from { transform: scale(.7); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }
.saved .saved-check { width: 72px; height: 72px; box-shadow: 0 0 0 6px rgba(62, 207, 142, .22), 0 0 34px rgba(62, 207, 142, .6); }
.saved-eyebrow { font-size: .7rem; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: #ffe08a; margin-top: 4px; }
.saved-num { display: flex; align-items: baseline; justify-content: center; gap: 2px; margin-top: 4px; line-height: 1; }
.saved-plus, .saved-big { font-size: clamp(3rem, 14vw, 4.2rem); font-weight: 900; letter-spacing: -.045em; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #fff3b8, #f2b705); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 18px rgba(242, 183, 5, .45)); }
.saved .saved-n { color: rgba(255, 255, 255, .8); font-size: var(--fs-sm); }
.saved .saved-n b { color: #fff; font-size: var(--fs-md); margin: 0; }
.saved-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.saved-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(6px); }
.saved-chip.gold { color: #2b2000; background: linear-gradient(135deg, #ffe08a, #f2b705); border-color: transparent; }
.saved-chip svg { width: 15px; height: 15px; color: inherit; }
.saved .saved-verse { color: rgba(255, 255, 255, .7); font-size: var(--fs-sm); font-style: italic; margin-top: 8px; }
.saved .btn { margin-top: 12px; background: linear-gradient(135deg, #ffe08a, #f2b705); color: #2b2000; font-weight: 800; box-shadow: 0 12px 28px -8px rgba(242, 183, 5, .65); }
.ms { border-radius: 26px; border: 1px solid rgba(255, 224, 138, .35); }
@media (prefers-reduced-motion: reduce) { .saved-badge .ring { animation: none; opacity: 0; } }

/* ---------- Dark mode: the other pop-ups (confirm, duplicate, delete, menu) get the same night-sky + gold look ---------- */
html[data-theme="dark"] dialog:not(:has(.saved)):not(:has(.ms)) { background: radial-gradient(320px 180px at 50% -10%, rgba(255, 215, 94, .16), transparent 70%), radial-gradient(260px 200px at 100% 100%, rgba(77, 141, 255, .3), transparent 70%), linear-gradient(160deg, #13366b, #0a1d3d); border: 1px solid rgba(255, 224, 138, .3); color: rgba(255, 255, 255, .85); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .12); }
html[data-theme="dark"] dialog:not(:has(.saved)):not(:has(.ms))::backdrop { background: rgba(3, 8, 20, .72); backdrop-filter: blur(6px); }
html[data-theme="dark"] dialog:not(:has(.saved)):not(:has(.ms)) h3 { color: #fff; }
html[data-theme="dark"] dialog:not(:has(.saved)):not(:has(.ms)) .btn:not(.secondary):not(.danger) { background: linear-gradient(135deg, #ffe08a, #f2b705); color: #2b2000; font-weight: 800; box-shadow: 0 12px 28px -8px rgba(242, 183, 5, .6); }
html[data-theme="dark"] dialog:not(:has(.saved)):not(:has(.ms)) .btn.secondary { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: #fff; }
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] dialog:not(:has(.saved)):not(:has(.ms)) { background: radial-gradient(320px 180px at 50% -10%, rgba(255, 215, 94, .16), transparent 70%), radial-gradient(260px 200px at 100% 100%, rgba(77, 141, 255, .3), transparent 70%), linear-gradient(160deg, #13366b, #0a1d3d); border: 1px solid rgba(255, 224, 138, .3); color: rgba(255, 255, 255, .85); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .12); }
  html[data-theme="auto"] dialog:not(:has(.saved)):not(:has(.ms))::backdrop { background: rgba(3, 8, 20, .72); backdrop-filter: blur(6px); }
  html[data-theme="auto"] dialog:not(:has(.saved)):not(:has(.ms)) h3 { color: #fff; }
  html[data-theme="auto"] dialog:not(:has(.saved)):not(:has(.ms)) .btn:not(.secondary):not(.danger) { background: linear-gradient(135deg, #ffe08a, #f2b705); color: #2b2000; font-weight: 800; box-shadow: 0 12px 28px -8px rgba(242, 183, 5, .6); }
  html[data-theme="auto"] dialog:not(:has(.saved)):not(:has(.ms)) .btn.secondary { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: #fff; }
}

/* ---------- Leaderboard: one ranked list, medals for the top 10 ---------- */
.lb { display: grid; gap: 8px; }
.lb li { grid-template-columns: 46px minmax(0, 1fr) auto; padding: 12px 14px 12px 10px; border: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.lb li:last-child { border-bottom: 1px solid var(--line); }
.lb li.head { border: 0; background: none; padding: 2px 14px 2px 10px; }
.lb li.gap { border: 0; background: none; }
.lb li.mine { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.lb li.t1 { background: linear-gradient(90deg, color-mix(in srgb, #f2b705 24%, var(--surface)), color-mix(in srgb, var(--surface-2) 70%, transparent) 75%); border-color: color-mix(in srgb, #f2b705 55%, var(--line)); box-shadow: 0 10px 26px -14px rgba(242, 183, 5, .6); }
.lb li.t2 { background: linear-gradient(90deg, color-mix(in srgb, #9fb0c6 22%, var(--surface)), color-mix(in srgb, var(--surface-2) 70%, transparent) 75%); border-color: color-mix(in srgb, #9fb0c6 55%, var(--line)); }
.lb li.t3 { background: linear-gradient(90deg, color-mix(in srgb, #cf8a4e 20%, var(--surface)), color-mix(in srgb, var(--surface-2) 70%, transparent) 75%); border-color: color-mix(in srgb, #cf8a4e 55%, var(--line)); }
.lb .rk { width: 34px; height: 34px; border-radius: 50%; }
.lb .rk.medal { --mr: #14407a; position: relative; isolation: isolate; width: 38px; height: 38px; margin-bottom: 7px; font-weight: 900; font-size: var(--fs-md); color: #fff; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .5), 0 8px 16px -6px var(--mc, rgba(31, 111, 235, .6)); }
.lb .rk.medal::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 20px; height: 11px; translate: -50% 0; background: var(--mr); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 68%, 0 100%); z-index: -1; }
.lb .rk.medal.r1 { --mr: #c0392b; --mc: rgba(242, 169, 0, .75); background: linear-gradient(135deg, #ffe08a, #f2a900); color: #3a2a00; }
.lb .rk.medal.r2 { --mr: #4a6a9c; --mc: rgba(150, 170, 200, .7); background: linear-gradient(135deg, #f4f7fb, #aab9ce); color: #1b2a3d; }
.lb .rk.medal.r3 { --mr: #8a4a1c; --mc: rgba(207, 138, 78, .7); background: linear-gradient(135deg, #f6d4b0, #cf8a4e); color: #3a200a; }
.lb .rk.medal.rt { background: linear-gradient(135deg, #5a9bff, #1f6feb); }
.lb li.t1 .tot { font-size: 1.3rem; font-weight: 900; }
@media (hover: hover) { .lb li:not(.head):not(.gap):hover { padding-left: 10px; translate: 2px 0; } }
.lb li { transition: translate .2s, background-color .2s; }
html[data-theme="dark"] .lb li { background: rgba(255, 255, 255, .04); }
html[data-theme="dark"] .lb li.mine { background: var(--accent-soft); }
html[data-theme="dark"] .lb li.t1 { background: linear-gradient(90deg, rgba(242, 183, 5, .2), rgba(255, 255, 255, .03) 75%); }
html[data-theme="dark"] .lb li.t2 { background: linear-gradient(90deg, rgba(159, 176, 198, .2), rgba(255, 255, 255, .03) 75%); }
html[data-theme="dark"] .lb li.t3 { background: linear-gradient(90deg, rgba(207, 138, 78, .2), rgba(255, 255, 255, .03) 75%); }
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .lb li { background: rgba(255, 255, 255, .04); }
  html[data-theme="auto"] .lb li.mine { background: var(--accent-soft); }
  html[data-theme="auto"] .lb li.t1 { background: linear-gradient(90deg, rgba(242, 183, 5, .2), rgba(255, 255, 255, .03) 75%); }
  html[data-theme="auto"] .lb li.t2 { background: linear-gradient(90deg, rgba(159, 176, 198, .2), rgba(255, 255, 255, .03) 75%); }
  html[data-theme="auto"] .lb li.t3 { background: linear-gradient(90deg, rgba(207, 138, 78, .2), rgba(255, 255, 255, .03) 75%); }
}

/* iPhone home-screen app: keep everything clear of the status bar / notch */
.topbar { padding-top: calc(10px + env(safe-area-inset-top)); }
@media (max-width: 599px) and (orientation: portrait) {
  .login-header-logo { margin-top: calc(1.3rem + env(safe-area-inset-top)); }
  .login-star { top: calc(.7rem + env(safe-area-inset-top)); }
  .page-box { padding-top: calc(16px + env(safe-area-inset-top)); }
}

/* recent updates: pages slide in like a carousel */
@keyframes feed-in-right { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: none; } }
@keyframes feed-in-left { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }
.feed.from-right { animation: feed-in-right .3s ease; }
.feed.from-left { animation: feed-in-left .3s ease; }
@media (prefers-reduced-motion: reduce) { .feed.from-right, .feed.from-left { animation: none; } }
.feed .who2 { overflow-wrap: anywhere; }

/* keep the big number inside the gauge arc: scale with the arc width, smaller for long numbers */
.gauge-wrap { container-type: inline-size; }
.gauge-center { bottom: 2%; }
.gauge-center .goal-num { font-size: clamp(1.5rem, calc(62cqw / max(var(--len, 5), 4.5) * 1.5), 3.2rem); text-shadow: 0 0 18px rgba(255, 215, 94, .25); }

/* header carries the Gideons branding; the campaign name sits in the blue welcome box */
.brand-logo { display: block; height: 42px; width: auto; max-width: 62vw; }
.brand-logo-dark { display: none; }
html[data-theme="dark"] .brand-logo-light { display: none; }
html[data-theme="dark"] .brand-logo-dark { display: block; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] .brand-logo-light { display: none; } html[data-theme="auto"] .brand-logo-dark { display: block; } }
.welcome-brand { display: flex; flex-direction: column; line-height: 1.15; margin: 0 0 14px; }
.wb-eyebrow { font-size: .7rem; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: #f2c94c; }
.wb-title { font-size: clamp(1.1rem, 3.6vw, 1.6rem); font-weight: 800; letter-spacing: -.02em; color: #fff; }

/* richer header branding: logo on a plate with a gold edge, campaign meta beside it */
.topbar .brand { gap: 14px; flex-wrap: wrap; }
.brand-plate { display: flex; align-items: center; padding: 7px 16px; border-radius: 16px; background: linear-gradient(180deg, #fff, #f4f8ff); border: 1px solid rgba(242, 183, 5, .6); box-shadow: 0 0 0 3px rgba(242, 183, 5, .14), 0 10px 22px -12px rgba(12, 37, 71, .45); }
.brand-logo { height: 40px; }
.topbar .app-dates { flex-direction: column; align-items: flex-start; gap: 5px; margin-top: 0; padding-left: 14px; border-left: 2px solid rgba(242, 183, 5, .7); }
.topbar .app-tag { font-size: .66rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-text, #b07d00); }
html[data-theme="dark"] .brand-plate { background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04)); border-color: rgba(242, 183, 5, .5); box-shadow: 0 0 22px rgba(242, 183, 5, .18); }
html[data-theme="dark"] .topbar .app-tag { color: #f2c94c; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] .brand-plate { background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04)); border-color: rgba(242, 183, 5, .5); box-shadow: 0 0 22px rgba(242, 183, 5, .18); } html[data-theme="auto"] .topbar .app-tag { color: #f2c94c; } }
@media (max-width: 599px) {
  .brand-plate { padding: 5px 11px; border-radius: 13px; }
  .brand-logo { height: 30px; max-width: 46vw; }
  .topbar .app-dates { padding-left: 0; border-left: 0; }
  .topbar .app-tag { display: none; }
}

/* small reminder shown before the update form opens */
.remind { display: grid; justify-items: center; gap: 8px; text-align: center; }
.remind-ic { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #7a5600; background: linear-gradient(135deg, #ffe08a, #f2b705); box-shadow: 0 0 0 8px rgba(242, 183, 5, .18); }
.remind-ic svg { width: 26px; height: 26px; }
.remind h3 { margin: 6px 0 0; font-size: var(--fs-xl); letter-spacing: -.02em; }
.remind p { margin: 0; }
.remind-sub { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 6px !important; }
.remind .btn { width: 100%; }

/* hidden way into the admin portal: a faint dot in the bottom-right corner of the login page */
.admin-dot { position: fixed; right: 4px; bottom: calc(4px + env(safe-area-inset-bottom)); z-index: 5; width: 28px; height: 28px; border-radius: 50%; opacity: .2; transition: opacity .2s; }
.admin-dot::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.admin-dot:hover, .admin-dot:focus-visible { opacity: .8; }
body:not(.on-login) .admin-dot { display: none; }
