/* Let's Change Something — fresh leaf green, sunny yellow buttons, clean paper.
   One bold element: every activity's coloured cause tile + its progress bar toward "enough people". */
@font-face { font-family: 'Baloo Da 2'; font-weight: 600; font-display: swap; src: url(fonts/baloo-da-2-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20B9; }
@font-face { font-family: 'Baloo Da 2'; font-weight: 800; font-display: swap; src: url(fonts/baloo-da-2-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20B9; }
@font-face { font-family: 'Baloo Da 2'; font-weight: 600; font-display: swap; src: url(fonts/baloo-da-2-bengali-600-normal.woff2) format('woff2'); unicode-range: U+0980-09FF, U+200C-200D, U+25CC; }
@font-face { font-family: 'Baloo Da 2'; font-weight: 800; font-display: swap; src: url(fonts/baloo-da-2-bengali-800-normal.woff2) format('woff2'); unicode-range: U+0980-09FF, U+200C-200D, U+25CC; }
@font-face { font-family: 'Hind Siliguri'; font-weight: 400; font-display: swap; src: url(fonts/hind-siliguri-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20B9; }
@font-face { font-family: 'Hind Siliguri'; font-weight: 600; font-display: swap; src: url(fonts/hind-siliguri-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20B9; }
@font-face { font-family: 'Hind Siliguri'; font-weight: 400; font-display: swap; src: url(fonts/hind-siliguri-bengali-400-normal.woff2) format('woff2'); unicode-range: U+0980-09FF, U+200C-200D, U+25CC; }
@font-face { font-family: 'Hind Siliguri'; font-weight: 600; font-display: swap; src: url(fonts/hind-siliguri-bengali-600-normal.woff2) format('woff2'); unicode-range: U+0980-09FF, U+200C-200D, U+25CC; }

:root {
  --leaf: #1F8A55;         /* brand, headers */
  --leaf-deep: #146B41;
  --leaf-soft: #E3F3EA;
  --sun: #FFC233;          /* main buttons */
  --sun-ink: #3A2A00;
  --sun-soft: #FFF3D1;
  --danger: #B3261E;
  --danger-soft: #FBE6E4;
  --paper: #F4F7F3;
  --card: #FFFFFF;
  --ink: #15241C;
  --muted: #5A6B62;
  --line: #DFE7E1;
  --head-ink: #FFFFFF;
  --head-sub: #D3EEDD;
  --shadow: 0 1px 2px rgba(21,36,28,.06), 0 6px 18px rgba(21,36,28,.07);
  --head: 'Baloo Da 2', 'Trebuchet MS', sans-serif;
  --body: 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans Bengali', sans-serif;
  --sat: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --sab: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --sal: var(--safe-area-inset-left, env(safe-area-inset-left, 0px));
  --sar: var(--safe-area-inset-right, env(safe-area-inset-right, 0px));
  --nav-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --leaf: #1E7A4C; --leaf-deep: #13563A; --leaf-soft: #173225;
    --sun-soft: #3A3115; --danger: #F07A70; --danger-soft: #3A1A18;
    --paper: #0F1813; --card: #18241D; --ink: #E7F0EA; --muted: #A2B5AA; --line: #2A3A31;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--body); }
body { min-height: 100vh; overscroll-behavior-y: contain; -webkit-text-size-adjust: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--head); font-weight: 800; line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0 0 10px; }
[hidden] { display: none !important; }
a { color: inherit; }
.ico { width: 22px; height: 22px; flex: none; display: inline-block; vertical-align: middle; }
#main { max-width: 640px; margin: 0 auto; padding-bottom: calc(var(--nav-h) + var(--sab) + 24px); min-height: 100vh; }
#main.nonav { padding-bottom: calc(var(--sab) + 24px); }
.boot { min-height: 80vh; display: grid; place-items: center; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: var(--sat); background: var(--leaf); z-index: 60; pointer-events: none; }

/* logo */
.logo { width: 40px; height: 40px; border-radius: 50%; background: var(--leaf); color: #fff; display: inline-grid; place-items: center; font: 800 15px/1 var(--head); letter-spacing: -.5px; position: relative; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.logo::after { content: ""; position: absolute; width: 9px; height: 6px; border-radius: 9px 0; background: var(--sun); top: 7px; right: 8px; transform: rotate(-25deg); }
.logo.xl { width: 96px; height: 96px; font-size: 36px; box-shadow: none; }
.logo.xl::after { width: 22px; height: 14px; top: 16px; right: 18px; }

/* headers */
.top { background: var(--leaf); color: var(--head-ink); padding: calc(var(--sat) + 18px) calc(var(--sar) + 18px) 20px calc(var(--sal) + 18px); }
.top h1 { font-size: 28px; }
.top .sub { color: var(--head-sub); font-size: 15px; margin-top: 2px; }
.bar { position: sticky; top: 0; z-index: 5; background: var(--leaf); color: var(--head-ink); display: flex; align-items: center; gap: 4px; padding: calc(var(--sat) + 6px) calc(var(--sar) + 8px) 6px calc(var(--sal) + 4px); min-height: calc(var(--sat) + 56px); }
.bar h1 { font-size: 20px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iconbtn { background: none; border: 0; color: inherit; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.iconbtn:active { background: rgba(255,255,255,.14); }
.brandrow { display: flex; align-items: center; gap: 10px; font: 800 15px/1.1 var(--head); color: var(--head-sub); }
.home-top .hello { margin-top: 16px; font-size: 15px; color: var(--head-sub); }
.home-top h1 { font-size: 27px; margin-top: 2px; }
.impact { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.impact div { background: rgba(255,255,255,.13); border-radius: 14px; padding: 10px 6px 8px; text-align: center; }
.impact b { display: block; font: 800 22px/1.05 var(--head); font-variant-numeric: tabular-nums; }
.impact span { font-size: 11.5px; color: var(--head-sub); font-weight: 600; line-height: 1.2; display: block; margin-top: 2px; }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 16px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px; font-size: 14.5px; font-weight: 600; white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--leaf); color: #fff; border-color: var(--leaf); }

/* section heads */
.sec { font-family: var(--head); font-weight: 800; font-size: 20px; padding: 18px 6px 2px; display: flex; align-items: baseline; gap: 8px; }
.sec span { font-family: var(--body); font-weight: 600; font-size: 13.5px; color: var(--muted); }
.list { padding: 4px 12px; display: grid; gap: 12px; }

/* activity card */
.act { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.act-main { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start; width: 100%; padding: 14px 14px 10px; background: none; border: 0; text-align: left; }
.act-main:active { background: var(--paper); }
.act-em { width: 64px; height: 64px; border-radius: 18px; background: var(--c, var(--leaf)); display: grid; place-items: center; font-size: 32px; box-shadow: inset 0 -5px 0 rgba(0,0,0,.12); }
.act-body { min-width: 0; }
.cause { font-size: 12.5px; font-weight: 700; color: var(--c, var(--leaf)); text-transform: none; }
@media (prefers-color-scheme: dark) { .cause { filter: brightness(1.45); } }
.act h3 { font-size: 19px; margin-top: 1px; }
.meta { color: var(--muted); font-size: 14px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.meta span { display: inline-flex; align-items: center; gap: 4px; }
.meta .ico { width: 15px; height: 15px; }
.prog { padding: 0 14px 12px; }
.prog .track { height: 10px; border-radius: 6px; background: var(--leaf-soft); overflow: hidden; }
.prog .track i { display: block; height: 100%; border-radius: 6px; background: var(--c, var(--leaf)); transition: width .4s ease; min-width: 6px; }
.prog .lbl { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 13.5px; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.prog .lbl b { color: var(--ink); }
.act-actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; padding: 0 14px 14px; }
.act-actions .btn { min-height: 46px; font-size: 15px; }
.chosen { margin: 0 14px 14px; border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; font-size: 14.5px; background: var(--leaf-soft); color: var(--leaf-deep); }
@media (prefers-color-scheme: dark) { .chosen { color: #9FE0BC; } }
.chosen .linkbtn { padding: 0; font-size: 14px; }
.banner-line { margin: 0 14px 14px; border-radius: 12px; padding: 10px 12px; font-weight: 700; font-size: 14.5px; background: var(--sun-soft); display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.faces { display: flex; align-items: center; }
.faces .av { margin-left: -8px; border: 2px solid var(--card); }
.faces .av:first-child { margin-left: 0; }
.tag { font-size: 12.5px; border-radius: 7px; padding: 2px 8px; background: var(--leaf-soft); color: var(--leaf-deep); font-weight: 700; white-space: nowrap; }
.tag.sun { background: var(--sun-soft); color: #7A5600; }
.tag.grey { background: var(--line); color: var(--muted); }
@media (prefers-color-scheme: dark) { .tag { color: #9FE0BC; } .tag.sun { color: #FFD66B; } }
.hidden-list summary { list-style: none; cursor: pointer; padding: 14px 6px; color: var(--muted); font-weight: 700; }
.hidden-list summary::-webkit-details-marker { display: none; }
.mini { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 8px; }
.mini .em { font-size: 22px; }
.mini .t { flex: 1; min-width: 0; font-weight: 700; }

/* avatars */
.av { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: #3E6B55; flex: none; }
.av.f { background: #B5487E; } .av.o { background: #6A5BB8; }
.av.md { width: 44px; height: 44px; font-size: 16px; }
.av.lg { width: 84px; height: 84px; font-size: 30px; }

/* buttons */
.btn { border: 0; border-radius: 14px; padding: 12px 18px; font-weight: 700; font-size: 16px; background: var(--leaf); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; text-decoration: none; }
.btn.sun { background: var(--sun); color: var(--sun-ink); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.white { background: #fff; color: var(--leaf-deep); }
.btn.danger { background: transparent; color: var(--danger); border: 1.5px solid var(--danger-soft); }
.btn.small { padding: 7px 14px; min-height: 40px; font-size: 14.5px; border-radius: 11px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > .btn { flex: 1; }
.linkbtn { background: none; border: 0; color: var(--leaf-deep); font-weight: 700; padding: 8px 0; text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { .linkbtn { color: #8ED8AE; } }
.linkbtn.center { display: block; margin: 10px auto 0; }
.linkbtn.red { color: var(--danger); }

/* bottom navigation */
#tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; background: var(--card); border-top: 1px solid var(--line); display: flex; justify-content: center; align-items: stretch; padding: 0 var(--sar) var(--sab) var(--sal); }
#tabs button { flex: 1; max-width: 120px; border: 0; background: none; height: var(--nav-h); font-size: 12px; font-weight: 700; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; position: relative; }
#tabs button.on { color: var(--leaf); }
@media (prefers-color-scheme: dark) { #tabs button.on { color: #8ED8AE; } }
#tabs button.on::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--sun); }
#tabs .plus { flex: none; width: 74px; }
#tabs .plus span.disc { width: 54px; height: 54px; border-radius: 18px; background: var(--sun); color: var(--sun-ink); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(255,194,51,.45); margin-top: -18px; }
#tabs .plus span.disc .ico { width: 28px; height: 28px; }
#tabs .dot { position: absolute; top: 8px; left: calc(50% + 6px); background: var(--sun); color: var(--sun-ink); border-radius: 9px; font-size: 11px; padding: 0 6px; line-height: 17px; font-weight: 800; }

/* cards & forms */
.pad { padding: 16px; }
.card { background: var(--card); border-radius: 18px; padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card h2 { font-size: 20px; margin-bottom: 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
label.f, div.f { display: block; font-weight: 700; font-size: 15px; margin: 18px 0 8px; }
label.f .muted, div.f .muted { font-weight: 500; }
.in { width: 100%; border: 1.5px solid var(--line); border-radius: 13px; padding: 12px 14px; background: var(--card); font-size: 16px; min-height: 50px; }
.in:focus { border-color: var(--leaf); outline: none; }
textarea.in { min-height: 92px; resize: vertical; }
.hint { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0; font-size: 15.5px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--leaf); flex: none; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg button { border: 2px solid var(--line); background: var(--card); border-radius: 14px; padding: 10px 6px; font-weight: 700; font-size: 15px; min-height: 54px; }
.seg button.on { border-color: var(--leaf); background: var(--leaf); color: #fff; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.tile { border: 2px solid var(--line); background: var(--card); border-radius: 14px; padding: 10px; display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 700; text-align: left; min-height: 58px; line-height: 1.2; }
.tile .em { width: 36px; height: 36px; border-radius: 11px; background: var(--c); display: grid; place-items: center; font-size: 19px; flex: none; }
.tile.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--card)); }
.emojis { display: flex; flex-wrap: wrap; gap: 6px; }
.emojis button { width: 48px; height: 48px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); font-size: 24px; }
.emojis button.on { border-color: var(--leaf); background: var(--leaf-soft); }
.stepper { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stepper button { width: 52px; height: 52px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); font-size: 24px; font-weight: 800; }
.stepper output { font: 800 30px/1 var(--head); min-width: 40px; text-align: center; }
.err { color: var(--danger); font-size: 15px; margin-top: 10px; font-weight: 600; }
.note { background: var(--leaf-soft); border-radius: 14px; padding: 12px 14px; font-size: 14.5px; }
.note.sun { background: var(--sun-soft); }
.progress { display: flex; gap: 6px; margin-top: 12px; }
.progress i { flex: 1; height: 5px; border-radius: 3px; background: rgba(255,255,255,.25); }
.progress i.on { background: var(--sun); }
.sticky-act { position: sticky; bottom: 0; z-index: 4; background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -6px 16px rgba(21,36,28,.06); padding: 12px 16px calc(var(--sab) + 12px); margin-top: 8px; }
.sticky-act .btn:disabled { opacity: 1; background: var(--line); color: var(--muted); }
.sticky-act .act-actions { padding: 0; }
.sticky-act.agree .check { margin: 4px 0 10px; font-size: 14.5px; line-height: 1.4; }

/* activity detail */
.hero { background: var(--c, var(--leaf)); color: #fff; padding: 6px 20px 24px; }
.hero .em { width: 72px; height: 72px; border-radius: 22px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 40px; }
.hero .cz { font-size: 14px; font-weight: 700; opacity: .9; margin-top: 12px; }
.hero h2 { font-size: 28px; margin-top: 2px; }
.hero .pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; background: #fff; color: #15241C; border-radius: 999px; padding: 5px 12px; font-weight: 800; font-size: 14px; }
.hero .facts { margin-top: 12px; display: grid; gap: 6px; font-size: 15.5px; }
.hero .facts div { display: flex; gap: 8px; align-items: flex-start; }
.bignum { display: flex; align-items: baseline; gap: 6px; }
.bignum b { font: 800 40px/1 var(--head); font-variant-numeric: tabular-nums; }
.bignum span { color: var(--muted); font-weight: 600; }
.people { display: grid; gap: 2px; margin-top: 10px; }
.person { display: flex; align-items: center; gap: 12px; padding: 7px 2px; border: 0; background: none; width: 100%; text-align: left; border-radius: 12px; min-height: 52px; }
.person .nm { font-weight: 700; flex: 1; min-width: 0; }
.person .nm .muted { font-weight: 500; font-size: 13.5px; display: block; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--line); max-width: 100%; }
.impactbig { display: flex; gap: 14px; align-items: center; }
.impactbig .em { font-size: 44px; }

/* chat */
.chat { display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow-y: auto; padding: 4px 2px 8px; }
.msg { max-width: 82%; padding: 9px 12px; border-radius: 16px 16px 16px 4px; background: var(--paper); align-self: flex-start; word-wrap: break-word; }
.msg.me { align-self: flex-end; background: var(--leaf); color: #fff; border-radius: 16px 16px 4px 16px; }
.msg .who { font-size: 12.5px; font-weight: 800; color: var(--leaf-deep); }
@media (prefers-color-scheme: dark) { .msg .who { color: #8ED8AE; } }
.msg .t { font-size: 11px; opacity: .65; margin-top: 2px; text-align: right; }
.composer { display: flex; gap: 8px; margin-top: 10px; }
.composer .in { flex: 1; min-width: 0; }
.composer .btn { min-width: 52px; padding: 0 14px; }

/* ideas */
.idea { display: flex; gap: 14px; align-items: flex-start; }
.idea .cnt { text-align: center; min-width: 60px; background: var(--sun-soft); border-radius: 12px; padding: 8px 4px; }
.idea .cnt b { display: block; font: 800 26px/1 var(--head); }
.idea .cnt span { font-size: 11.5px; font-weight: 700; color: var(--muted); }

/* me */
.profile-head { display: flex; gap: 16px; align-items: center; }
.profile-head h2 { font-size: 24px; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stats3 div { background: var(--paper); border-radius: 12px; padding: 10px 6px; text-align: center; }
.stats3 b { display: block; font: 800 22px/1 var(--head); }
.stats3 span { font-size: 12px; color: var(--muted); font-weight: 600; }
.menu { display: grid; }
.menu button { display: flex; align-items: center; gap: 14px; width: 100%; background: none; border: 0; border-top: 1px solid var(--line); padding: 13px 2px; text-align: left; font-size: 16px; font-weight: 600; min-height: 56px; }
.menu button:first-child { border-top: 0; }
.menu button .em { width: 36px; height: 36px; border-radius: 10px; background: var(--leaf-soft); display: grid; place-items: center; font-size: 18px; flex: none; }
.menu button .go { margin-left: auto; color: var(--muted); }
.menu button.red { color: var(--danger); }
.admin-card { background: var(--leaf-deep); color: #fff; }
.admin-card .muted { color: var(--head-sub); }

/* empty */
.empty { text-align: center; padding: 34px 22px; }
.empty .big { font-size: 52px; line-height: 1; margin-bottom: 10px; }
.empty h2 { font-size: 23px; margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 34ch; margin: 0 auto 16px; }

/* sheet */
#sheet { position: fixed; inset: 0; z-index: 20; background: rgba(8,20,13,.5); display: flex; align-items: flex-end; justify-content: center; }
#sheet .panel { background: var(--card); width: 100%; max-width: 640px; border-radius: 22px 22px 0 0; padding: 10px 18px calc(20px + var(--sab)); max-height: 90vh; overflow-y: auto; animation: up .2s ease-out; }
#sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
#sheet h2 { font-size: 22px; margin-bottom: 10px; }
#sheet .opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: none; padding: 15px 4px; font-size: 16px; font-weight: 600; border-bottom: 1px solid var(--line); min-height: 54px; }
#sheet .opt.red { color: var(--danger); }
@keyframes up { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--sab) + 18px); z-index: 30; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 12px; font-size: 15px; font-weight: 600; max-width: 90vw; box-shadow: var(--shadow); }
#banner { background: var(--sun); color: var(--sun-ink); padding: calc(var(--sat) + 10px) 16px 10px; font-size: 14.5px; font-weight: 700; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
#banner:not([hidden]) + #main .top, #banner:not([hidden]) + #main .bar { padding-top: 18px; min-height: 0; }
#ptr { position: fixed; top: calc(var(--sat) + 8px); left: 50%; transform: translate(-50%, -90px); z-index: 9; opacity: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--leaf); transition: transform .15s; }
#ptr.on { opacity: 1; }
#ptr.spin .ico { animation: s .8s linear infinite; }

/* welcome */
.gate { min-height: 100vh; background: var(--leaf); color: #fff; padding: calc(var(--sat) + 36px) calc(var(--sar) + 22px) calc(var(--sab) + 26px) calc(var(--sal) + 22px); display: flex; flex-direction: column; }
.gate h1 { font-size: 40px; margin-top: 16px; letter-spacing: -.5px; }
.gate .lede { font-size: 18px; color: var(--head-sub); margin: 6px 0 0; max-width: 32ch; }
.how { margin-top: 22px; display: grid; gap: 10px; }
.how div { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.1); border-radius: 14px; padding: 10px 12px; font-size: 15.5px; }
.how b { width: 30px; height: 30px; border-radius: 50%; background: var(--sun); color: var(--sun-ink); display: grid; place-items: center; font-size: 15px; flex: none; }
.preview { margin-top: 18px; display: grid; gap: 8px; }
.preview .p { background: #fff; color: #15241C; border-radius: 14px; padding: 10px 12px; display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; }
.preview .p .e { width: 40px; height: 40px; border-radius: 12px; background: var(--c); display: grid; place-items: center; font-size: 21px; }
.preview .p b { display: block; font-size: 15px; line-height: 1.25; }
.preview .p .track { height: 6px; border-radius: 4px; background: #E3F3EA; margin-top: 5px; overflow: hidden; }
.preview .p .track i { display: block; height: 100%; background: var(--c); }
.preview .p small { color: #5A6B62; font-weight: 600; font-size: 12.5px; }
.gate .cta { margin-top: auto; padding-top: 22px; }
.gate .fine { font-size: 13px; color: var(--head-sub); margin-top: 10px; text-align: center; }
.iab { background: var(--sun); color: var(--sun-ink); border-radius: 14px; padding: 12px 14px; margin-top: 16px; font-weight: 700; font-size: 15px; }
.iab .btn { margin-top: 10px; background: var(--sun-ink); color: #fff; }

/* terms, waiting, intro */
.terms-sum { display: grid; gap: 12px; }
.terms-sum div { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; }
.terms-sum .em { font-size: 22px; width: 30px; text-align: center; flex: none; line-height: 1.3; }
details.full { margin-top: 14px; }
details.full summary { font-weight: 800; cursor: pointer; padding: 10px 0; color: var(--leaf-deep); list-style: none; display: flex; align-items: center; gap: 8px; }
@media (prefers-color-scheme: dark) { details.full summary { color: #8ED8AE; } }
details.full summary::-webkit-details-marker { display: none; }
details.full summary::before { content: "▸"; transition: transform .15s; }
details.full[open] summary::before { transform: rotate(90deg); }
.legal { font-size: 14.5px; }
.legal h3 { font-size: 17px; margin: 18px 0 6px; }
.legal p { margin: 0 0 8px; }
.lang { display: inline-flex; background: rgba(255,255,255,.16); border-radius: 10px; padding: 3px; margin-top: 12px; }
.lang button { background: none; border: 0; color: #fff; font-weight: 700; padding: 6px 14px; border-radius: 8px; font-size: 14px; }
.lang button.on { background: #fff; color: var(--leaf-deep); }
.wait { text-align: center; padding: calc(var(--sat) + 56px) calc(var(--sar) + 24px) 40px calc(var(--sal) + 24px); }
.wait h1 { font-size: 28px; margin: 18px 0 8px; }
.wait p { color: var(--muted); max-width: 34ch; margin: 0 auto; }
.wait .big { font-size: 64px; }
.spin { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--leaf); border-radius: 50%; animation: s .8s linear infinite; margin: 30px auto; }
@keyframes s { to { transform: rotate(360deg); } }
.intro { min-height: 100vh; display: flex; flex-direction: column; padding: calc(var(--sat) + 20px) calc(var(--sar) + 22px) calc(var(--sab) + 22px) calc(var(--sal) + 22px); }
.intro .skip { align-self: flex-end; }
.intro .art { flex: 1; display: grid; place-items: center; }
.intro .art .disc { width: 210px; height: 210px; border-radius: 50%; background: var(--leaf); display: grid; place-items: center; font-size: 96px; box-shadow: inset 0 -12px 0 rgba(0,0,0,.12); }
.intro h1 { font-size: 30px; text-align: center; }
.intro p { text-align: center; color: var(--muted); font-size: 17px; max-width: 30ch; margin: 10px auto 0; }
.intro .dots { display: flex; gap: 8px; justify-content: center; margin: 26px 0 18px; }
.intro .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.intro .dots i.on { background: var(--sun); width: 26px; border-radius: 5px; }

/* certificate preview */
.cert-img { width: 100%; border-radius: 12px; box-shadow: var(--shadow); display: block; max-width: 100%; }

/* celebration */
.pop { animation: pop .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.confetti i { position: absolute; width: 8px; height: 12px; margin: -6px 0 0 -4px; border-radius: 2px; animation: burst 1.1s cubic-bezier(.15,.7,.3,1) forwards; }
.confetti i.round { width: 9px; height: 9px; border-radius: 50%; }
@keyframes burst { 0% { transform: translate(0,0) rotate(0); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(var(--dx), calc(var(--dy) + 90px)) rotate(var(--rot)); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .confetti { display: none; } }
.in.invalid { border-color: var(--danger) !important; }
.fielderr { margin: 6px 2px 0; font-weight: 600; }
