/* Right Thing – warm, hopeful palette: deep teal + sunrise amber + coral */
:root {
  --bg: #fdf8f1;
  --bg-2: #f6eee2;
  --surface: #ffffff;
  --ink: #1d2733;
  --muted: #5d6877;
  --line: #eadfce;
  --primary: #0f766e;
  --primary-2: #0d5f59;
  --primary-ink: #ffffff;
  --accent: #f59e0b;
  --coral: #f2694f;
  --focus: #f59e0b;
  --ok: #15803d;
  --ok-bg: #e9f8ee;
  --warn: #9a3412;
  --warn-bg: #fff1e6;
  --info-bg: #e8f5f3;
  --danger: #c2410c;
  --shadow: 0 1px 2px rgba(60, 40, 10, .06), 0 6px 20px rgba(60, 40, 10, .06);

  /* section accents */
  --moral: #7c3aed;  --moral-bg: #f3edff;
  --advice: #2563eb; --advice-bg: #eaf1ff;
  --community: #059669; --community-bg: #e5f7ef;
  --story: #db2777;  --story-bg: #fdebf4;
  --daily: #ea580c;  --daily-bg: #fff0e3;
  --kindness: #e11d48; --kindness-bg: #ffe9ee;

  --radius: 16px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Fraunces', Georgia, serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1419; --bg-2: #141b22; --surface: #18212b; --ink: #e8edf2; --muted: #9aa7b4; --line: #26323e;
    --primary: #2dd4bf; --primary-2: #5eead4; --primary-ink: #062a27;
    --ok: #4ade80; --ok-bg: #12291b; --warn: #fdba74; --warn-bg: #2c1a0e; --info-bg: #10282a; --danger: #fb923c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --moral: #a78bfa; --moral-bg: #221a38; --advice: #60a5fa; --advice-bg: #142238;
    --community: #34d399; --community-bg: #0f2a22; --story: #f472b6; --story-bg: #2e1424;
    --daily: #fb923c; --daily-bg: #2e1c0e; --kindness: #fb7185; --kindness-bg: #2f1219;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1419; --bg-2: #141b22; --surface: #18212b; --ink: #e8edf2; --muted: #9aa7b4; --line: #26323e;
  --primary: #2dd4bf; --primary-2: #5eead4; --primary-ink: #062a27;
  --ok: #4ade80; --ok-bg: #12291b; --warn: #fdba74; --warn-bg: #2c1a0e; --info-bg: #10282a; --danger: #fb923c;
  --moral: #a78bfa; --moral-bg: #221a38; --advice: #60a5fa; --advice-bg: #142238;
  --community: #34d399; --community-bg: #0f2a22; --story: #f472b6; --story-bg: #2e1424;
  --daily: #fb923c; --daily-bg: #2e1c0e; --kindness: #fb7185; --kindness-bg: #2f1219;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font);
  min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
}
main { flex: 1; padding-top: 24px; padding-bottom: 56px; outline: none; }
a { color: var(--primary); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; }
p { margin: 0 0 .75em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 99; background: var(--surface); padding: 8px 12px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 16px; min-height: 64px; max-width: 1340px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 1.25rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand b { color: var(--primary); }
.brand-mark {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #14b8a6); color: #fde68a; font-weight: 800; font-family: var(--font);
}
.brand-mark.xl { width: 88px; height: 88px; font-size: 2.6rem; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; flex-wrap: nowrap; justify-content: flex-end; }
.nav > a, .nav-auth > a:not(.btn) {
  color: var(--ink); text-decoration: none; font-size: .88rem; font-weight: 500; padding: 8px 9px; border-radius: 10px; white-space: nowrap;
}
.nav a:hover { background: var(--bg-2); }
.nav a.active { background: var(--info-bg); color: var(--primary); font-weight: 600; }
.nav-auth { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.hello { font-size: .85rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 1340px) { .hello { display: none; } }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; font-size: 1.3rem; padding: 4px 12px; color: var(--ink); cursor: pointer; }

@media (max-width: 1220px) {
  .menu-btn { display: block; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav > a { padding: 12px; font-size: 1rem; }
  .nav-auth { margin: 8px 0 0; padding-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 2px solid var(--primary);
  background: var(--primary); color: var(--primary-ink); font: 600 .95rem var(--font); padding: 10px 18px; border-radius: 999px;
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .1s, background .15s;
}
.btn:hover { background: var(--primary-2); border-color: var(--primary-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.ghost:hover { background: var(--info-bg); }
.btn.small { padding: 6px 14px; font-size: .85rem; }
.btn.big { padding: 14px 26px; font-size: 1.05rem; }
.btn.full { width: 100%; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.light { color: #fff; border-color: rgba(255, 255, 255, .8); }
.btn.light:hover { background: rgba(255, 255, 255, .15); }
.link { background: none; border: 0; padding: 4px 6px; color: var(--primary); font: 500 .85rem var(--font); cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--danger); }

/* ---------- cards & general ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.section-title { margin: 36px 0 14px; font-size: 1.4rem; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid2 > div > .section-title { margin-top: 36px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.empty { text-align: center; color: var(--muted); padding: 32px 20px; }
.more { display: inline-block; margin-top: 12px; font-weight: 600; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 28px; color: #fff; padding: 64px 48px;
  background:
    radial-gradient(1200px 400px at 110% 120%, rgba(251, 191, 36, .9), transparent 60%),
    radial-gradient(600px 300px at 85% 10%, rgba(242, 105, 79, .75), transparent 60%),
    linear-gradient(135deg, #0b4f4a 0%, #0f766e 45%, #138a7e 70%, #e08a2c 100%);
}
.hero-glow { position: absolute; width: 420px; height: 420px; right: -60px; top: -60px; border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 230, 138, .55), rgba(253, 230, 138, 0) 70%); }
.hero-in { position: relative; max-width: 720px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: #fde68a; }
.hero-title { font-size: clamp(2.8rem, 8vw, 5.2rem); line-height: .98; margin: 6px 0 20px; color: #fff; }
.hero-title span { color: #fde68a; }
.mission { display: inline-block; font-size: 1.1rem; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); padding: 10px 16px; border-radius: 14px; }
.hero-sub { max-width: 560px; opacity: .95; font-size: 1.05rem; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 32px; }
.hero-cta .btn:not(.ghost) { background: #fde68a; border-color: #fde68a; color: #3b2a05; }
.hero-cta .btn:not(.ghost):hover { background: #fcd34d; }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; }
.hero-stats div { background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .22); border-radius: 14px; padding: 12px 14px; }
.hero-stats dt { font-size: .78rem; opacity: .9; }
.hero-stats dd { margin: 0; font: 800 1.7rem var(--display); }

.today { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.today-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); border-top: 5px solid var(--c); transition: transform .15s; }
.today-card:hover, .sec:hover { transform: translateY(-2px); }
.today-card strong { font-size: 1.1rem; }
.kicker { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c, var(--primary)); }
.big-word { font: 800 2rem var(--display); color: var(--c, var(--daily)); }
.counter b, .live b { color: var(--c, var(--kindness)); font-size: 1.15rem; }
.c-moral { --c: var(--moral); } .c-advice { --c: var(--advice); } .c-community { --c: var(--community); }
.c-story { --c: var(--story); } .c-daily { --c: var(--daily); } .c-kindness { --c: var(--kindness); }

.sections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sec { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); background: linear-gradient(160deg, var(--surface) 55%, color-mix(in srgb, var(--c) 12%, var(--surface))); transition: transform .15s; }
.sec strong { font-size: 1.1rem; color: var(--c); }
.sec span:last-child { color: var(--muted); font-size: .92rem; }
.sec-icon { font-size: 1.8rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--c) 14%, transparent); }
.spot-label { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 18px 0 8px; }

/* ---------- page heads ---------- */
.page-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 24px; border-radius: 22px; margin-bottom: 20px;
  background: linear-gradient(120deg, var(--hbg, var(--info-bg)), var(--surface)); border: 1px solid var(--line); }
.page-head h1 { margin: 0 0 4px; font-size: clamp(1.6rem, 4vw, 2.2rem); color: var(--hc, var(--ink)); }
.page-head p { margin: 0; color: var(--muted); max-width: 640px; }
.page-head > div:nth-child(2) { flex: 1; min-width: 220px; }
.ph-icon { font-size: 2.2rem; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.h-moral { --hbg: var(--moral-bg); --hc: var(--moral); } .h-advice { --hbg: var(--advice-bg); --hc: var(--advice); }
.h-community { --hbg: var(--community-bg); --hc: var(--community); } .h-story { --hbg: var(--story-bg); --hc: var(--story); }
.h-daily { --hbg: var(--daily-bg); --hc: var(--daily); } .h-kindness { --hbg: var(--kindness-bg); --hc: var(--kindness); }
.h-journey { --hbg: color-mix(in srgb, var(--accent) 18%, var(--surface)); --hc: var(--primary); }

/* ---------- moral prizes ---------- */
.prizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.prize { text-align: center; border-radius: 16px; padding: 14px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; }
.prize span { font-size: 1.8rem; } .prize b { font: 800 1.5rem var(--display); }
.p1 { background: linear-gradient(160deg, #fff6d6, var(--surface)); } .p2 { background: linear-gradient(160deg, #eef1f5, var(--surface)); } .p3 { background: linear-gradient(160deg, #fbe8d9, var(--surface)); }
.how { margin-bottom: 16px; } .how summary { cursor: pointer; font-weight: 600; } .how ol { padding-left: 20px; }
.moral-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; padding: 12px 18px; background: var(--moral-bg); color: var(--moral); font-weight: 600; border-color: transparent; }

/* ---------- segmented tabs ---------- */
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg-2); border-radius: 999px; margin: 16px 0; flex-wrap: wrap; max-width: 100%; }
.seg button, .seg a { border: 0; background: none; padding: 8px 14px; border-radius: 999px; font: 500 .9rem var(--font); color: var(--muted); cursor: pointer; text-decoration: none; }
.seg .on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.wrap-seg { border-radius: 18px; }

/* ---------- posts ---------- */
.feed { display: grid; gap: 14px; }
.post { border-left: 5px solid var(--sc, var(--primary)); }
.s-moral { --sc: var(--moral); --sbg: var(--moral-bg); } .s-advice { --sc: var(--advice); --sbg: var(--advice-bg); }
.s-community { --sc: var(--community); --sbg: var(--community-bg); } .s-story { --sc: var(--story); --sbg: var(--story-bg); }
.s-daily { --sc: var(--daily); --sbg: var(--daily-bg); } .s-kindness { --sc: var(--kindness); --sbg: var(--kindness-bg); }
.post-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.by { font-size: .88rem; color: var(--muted); } .by b { color: var(--ink); }
.anon { font-style: italic; }
.pill { font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; text-decoration: none; color: var(--sc); background: var(--sbg); }
.post-title { margin: 4px 0 8px; font-size: 1.15rem; font-family: var(--font); font-weight: 700; }
h1.post-title { font-family: var(--display); font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; }
.post-title a { color: var(--ink); text-decoration: none; } .post-title a:hover { color: var(--sc); }
.body { white-space: pre-wrap; overflow-wrap: anywhere; }
.body.short { font-size: 1.08rem; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--bg-2); color: var(--muted); }
.tag.ok { background: var(--ok-bg); color: var(--ok); } .tag.warn { background: var(--warn-bg); color: var(--warn); } .tag.lock { background: var(--bg-2); color: var(--ink); }
.t-daily { background: var(--daily-bg); color: var(--daily); } .t-advice { background: var(--advice-bg); color: var(--advice); }
.t-kindness { background: var(--kindness-bg); color: var(--kindness); } .t-story { background: var(--story-bg); color: var(--story); }
.t-moral { background: var(--moral-bg); color: var(--moral); }
.inspired, .followup, .feedback, .reflection { border-radius: 12px; padding: 10px 14px; margin: 8px 0; font-size: .93rem; overflow-wrap: anywhere; }
.inspired { background: var(--community-bg); }
.followup { background: var(--ok-bg); }
.feedback { background: var(--moral-bg); }
.reflection { background: color-mix(in srgb, var(--accent) 15%, var(--surface)); }

.actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.spacer { flex: 1; }
.react {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: 500 .85rem var(--font); cursor: pointer; text-decoration: none;
}
.react:hover { border-color: var(--sc, var(--primary)); }
.react.on { background: var(--kindness-bg); border-color: var(--kindness); color: var(--kindness); }
.react .n { font-weight: 700; min-width: 1ch; }
.react [aria-hidden] { font-size: 1rem; line-height: 1; }

/* ---------- comments ---------- */
.comments { margin-top: 8px; }
.comment-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.comment { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.comment .body { margin: 6px 0 0; }
.comment.helpful { border-color: var(--ok); background: linear-gradient(var(--ok-bg), var(--surface) 60%); }
.comment.awarded { border-color: var(--accent); background: linear-gradient(color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface) 70%); }
.award { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #fef3c7; color: #92400e; }
.award.a2 { background: #e5e7eb; color: #374151; } .award.a3 { background: #fde2cf; color: #9a3412; }
.admin-box { margin-top: 10px; padding: 10px; border: 1px dashed var(--line); border-radius: 12px; display: grid; gap: 8px; }
.admin-box input { flex: 1; min-width: 160px; }
.crumbs { margin-bottom: 12px; font-weight: 600; } .crumbs a { text-decoration: none; }

/* ---------- forms ---------- */
.compose { margin: 16px 0; }
.compose h2 { margin-bottom: 8px; }
form { display: grid; gap: 12px; }
form.row { display: flex; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
input, textarea, select {
  font: 400 1rem var(--font); color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%;
}
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }
textarea { resize: vertical; min-height: 64px; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.row label:not(.check) { flex: 1; min-width: 150px; }
.label { margin: 0; font-weight: 600; font-size: .9rem; }
.count { font-size: .8rem; color: var(--muted); } .count.near { color: var(--danger); font-weight: 700; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); padding: 6px 12px; border-radius: 999px; font: 500 .85rem var(--font); cursor: pointer; }
.chip:hover { border-color: var(--daily); } .chip.on { background: var(--daily-bg); border-color: var(--daily); color: var(--daily); }
.nudge { text-align: center; } .nudge .btn { margin: 4px; }
.done-note { background: var(--ok-bg); color: var(--ok); padding: 10px 14px; border-radius: 12px; font-weight: 600; }
.idea { margin-top: 12px; } .idea summary { cursor: pointer; color: var(--primary); font-weight: 600; margin-bottom: 8px; }
.idea input { flex: 1; min-width: 180px; }

.banner { border-radius: 14px; padding: 12px 16px; margin: 12px 0; font-size: .93rem; }
.banner.info { background: var(--info-bg); } .banner.warn { background: var(--warn-bg); color: var(--warn); } .banner.ok { background: var(--ok-bg); color: var(--ok); }
.banner a { color: inherit; font-weight: 700; }

/* ---------- daily & kindness ---------- */
.theme-banner { --c: var(--daily); display: flex; flex-direction: column; gap: 4px; background: linear-gradient(120deg, var(--daily-bg), var(--surface)); }
.challenge { --c: var(--kindness); background: linear-gradient(140deg, var(--kindness-bg), var(--surface) 70%); border-color: color-mix(in srgb, var(--kindness) 35%, var(--line)); }
.challenge h2 { font-size: 1.6rem; color: var(--kindness); margin-top: 6px; }
.live { margin: 14px 0 6px; font-size: 1.05rem; }

/* ---------- journey ---------- */
.recap { margin-bottom: 16px; } .recap p { font-size: 1.15rem; margin: 6px 0 0; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 2px; box-shadow: var(--shadow); }
.tile span { font-size: 1.4rem; } .tile b { font: 800 1.8rem var(--display); color: var(--primary); } .tile small { color: var(--muted); }
.goal { margin-bottom: 14px; }
.bar { height: 10px; background: var(--bg-2); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 999px; }
.goals-form input { width: 90px; }
.next-step { display: block; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--ink); font-weight: 600; text-decoration: none; }
.next-step:hover { background: color-mix(in srgb, var(--accent) 28%, var(--surface)); }
.sub { font-size: 1rem; margin: 18px 0 8px; font-family: var(--font); }
.badges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.badge { position: relative; text-align: center; padding: 16px 12px; border-radius: 16px; border: 1px dashed var(--line); background: var(--surface); opacity: .55; display: grid; gap: 4px; filter: grayscale(.9); }
.badge.earned { opacity: 1; filter: none; border: 1px solid var(--accent); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface)); }
.badge span { font-size: 2rem; } .badge small { color: var(--muted); font-size: .78rem; }
.badge em { font-size: .7rem; font-style: normal; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.hist h3 { font-size: 1.05rem; font-family: var(--font); }
.hist h3 a { color: var(--ink); }
.winners ul { margin: 6px 0; padding-left: 18px; }

/* ---------- auth / admin / prose ---------- */
.auth { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; max-width: 860px; margin: 24px auto; padding: 0; overflow: hidden; }
.auth > div:last-child { padding: 32px 32px 24px 0; }
.auth-side { display: grid; place-content: center; justify-items: center; gap: 12px; color: #fff; padding: 32px;
  background: linear-gradient(150deg, #0b4f4a, #0f766e 55%, #e08a2c); font: 800 1.6rem var(--display); text-align: center; }
.report { border-bottom: 1px solid var(--line); padding: 12px 0; }
.report blockquote { margin: 6px 0 10px; padding: 8px 12px; background: var(--bg-2); border-radius: 10px; overflow-wrap: anywhere; }
.admin-box.row, .card.admin-box { display: flex; align-items: end; }
.ideas { padding-left: 18px; } .ideas .used { opacity: .6; }
.prose { max-width: 760px; } .prose h2 { margin-top: 24px; } .prose ul { padding-left: 20px; } .prose li { margin-bottom: 6px; }
.reflect textarea { margin-bottom: 4px; }

/* ---------- footer & toast ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 24px 0; }
.footer-in { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer p { margin: 8px 0 0; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--ink); color: var(--bg);
  padding: 12px 20px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow); transition: transform .25s; z-index: 50;
  max-width: calc(100vw - 32px); text-align: center; visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.toast.bad { background: var(--danger); color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .today, .sections { grid-template-columns: 1fr 1fr; }
  .tiles, .badges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 640px) {
  main { padding-top: 16px; }
  .hero { padding: 36px 22px; border-radius: 22px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats dd { font-size: 1.4rem; }
  .today, .sections { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .page-head { padding: 18px; }
  .ph-icon { width: 52px; height: 52px; font-size: 1.8rem; }
  .prizes { gap: 8px; } .prize { padding: 10px 6px; } .prize b { font-size: 1.15rem; }
  .react .lbl { display: none; }
  [data-act="template"] { text-align: left; }
  .react[data-act="react"] .lbl { display: inline; }
  .auth { grid-template-columns: 1fr; gap: 0; }
  .auth-side { padding: 24px; font-size: 1.2rem; }
  .auth-side .brand-mark.xl { width: 56px; height: 56px; font-size: 1.6rem; }
  .auth > div:last-child { padding: 20px; }
  .seg { display: flex; }
  .seg button, .seg a { flex: 1 1 auto; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
