:root {
  --red: #e63946; --orange: #f77f00; --yellow: #fcbf49; --green: #2a9d8f; --blue: #457b9d; --purple: #7b2cbf;
  --rainbow: linear-gradient(90deg, var(--red), var(--orange), var(--yellow), var(--green), var(--blue), var(--purple));
  --ink: #222; --muted: #666; --line: #e6e6e6; --bg: #fafafa; --card: #fff;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 17px; line-height: 1.35; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
.loading { padding: 40px; text-align: center; color: var(--muted); }

/* Header */
.hdr { position: sticky; top: 0; z-index: 5; background: #fff; padding: calc(var(--safe-top) + 10px) 16px 10px; border-bottom: 1px solid var(--line); }
.hdr::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--safe-top) + 6px); background: var(--rainbow); }
.hdr-row { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.hdr h1 { margin: 0; font-size: 22px; font-weight: 800; flex: 1; background: var(--rainbow); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hdr .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.back { border: none; background: #f1f1f1; border-radius: 50%; width: 40px; height: 40px; font-size: 22px; line-height: 1; color: var(--ink); }
.iconbtn { border: none; background: var(--purple); color: #fff; border-radius: 22px; height: 40px; padding: 0 16px; font-weight: 700; }

/* Layout */
.main { padding: 12px 16px calc(var(--safe-bottom) + 84px); max-width: 640px; margin: 0 auto; }
.search { width: 100%; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; margin-bottom: 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.chip { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; color: #fff; }

/* Girl cards */
.card { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 16px; padding: 12px 12px 12px 14px; margin-bottom: 10px; border: 1px solid var(--line); border-left: 8px solid var(--lv, #999); box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.card-main { flex: 1; min-width: 0; }
.card .name { font-weight: 800; font-size: 18px; }
.card .meta { font-size: 13px; color: var(--muted); }
.card .flags { margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.flag { font-size: 11px; font-weight: 800; letter-spacing: 0.3px; padding: 2px 8px; border-radius: 10px; color: #fff; }
.flag.red { background: var(--red); } .flag.orange { background: var(--orange); }
.card-actions { display: flex; gap: 6px; }
.ic { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 19px; background: #f2f2f2; }
.ic.off { opacity: 0.3; pointer-events: none; }

/* Detail */
.hero { background: var(--card); border-radius: 18px; padding: 18px 16px; border: 1px solid var(--line); border-top: 10px solid var(--lv, #999); margin-bottom: 12px; }
.hero .big { font-size: 26px; font-weight: 800; }
.hero .meta { color: var(--muted); }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; }
.actions a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px; border-radius: 14px; background: #f4f0fb; color: var(--purple); font-weight: 700; font-size: 14px; }
.actions a span { font-size: 22px; }
.actions a.off { opacity: 0.35; pointer-events: none; }
.sect { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; }
.sect h3 { margin: 0 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.sect.red { background: #fdecea; border-color: #f5b7b1; } .sect.red h3 { color: var(--red); }
.sect.orange { background: #fff1e0; border-color: #f8cf9d; } .sect.orange h3 { color: #b45309; }
.sect .val { white-space: pre-wrap; }
.sect .empty { color: #aaa; }

/* Forms */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px; background: #fff; }
.field textarea { min-height: 70px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn { width: 100%; border: none; border-radius: 14px; padding: 14px; font-weight: 800; font-size: 17px; color: #fff; background: var(--rainbow); margin-top: 6px; }
.btn.plain { background: #eee; color: var(--ink); }
.btn.danger { background: #fff; color: var(--red); border: 1.5px solid var(--red); }
.err { background: #fdecea; color: #a4161a; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; font-weight: 600; }
.ok { background: #e6f4ea; color: #1e6b3a; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; font-weight: 600; }

/* Sign-in page */
.login { min-height: 100vh; padding: calc(var(--safe-top) + 14px) 12px calc(var(--safe-bottom) + 24px); display: flex; align-items: flex-start; justify-content: center;
  background-color: #1f8a44;
  background-image: radial-gradient(circle at 10px 10px, rgba(255,255,255,0.13) 0 5px, transparent 6px), radial-gradient(circle at 30px 30px, rgba(255,255,255,0.10) 0 4px, transparent 5px);
  background-size: 40px 40px; }
.lcard { width: 100%; max-width: 440px; background: #fbf7ee; border-radius: 22px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.25); border: 3px solid #fff; }
.lhero { display: block; width: 100%; height: auto; }
.lbody { padding: 14px 18px 20px; }
.lintro { margin: 0 0 12px; font-size: 14.5px; color: #333; text-align: center; }
.llabel { display: block; font-weight: 700; font-size: 15px; color: #2a2a2a; margin: 8px 0 4px; font-style: italic; }
.lin { width: 100%; padding: 13px 14px; font-size: 17px; border-radius: 30px; border: 3px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--rainbow) border-box; outline: none; }
.lin:focus { box-shadow: 0 0 0 3px rgba(123,44,191,0.2); }
.lbtn { width: 100%; margin-top: 16px; border: none; border-radius: 18px; padding: 15px; font-size: 22px; font-weight: 800; color: #fff; background: var(--rainbow); box-shadow: 0 5px 14px rgba(0,0,0,0.22); }
.lbtn:active { transform: translateY(1px); }
.llinks { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 18px; }
.lnk { font-size: 16px; font-weight: 600; text-decoration: underline; background: linear-gradient(90deg, #d62828, #f77f00, #2a9d8f, #7b2cbf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login .err, .login .ok { margin-bottom: 10px; }
.lcard { background: #fff; }
.lbody { background: #fbf7ee; }
/* Wide screens (laptop / desktop): plain white page, illustration on the left, form on the right */
@media (min-width: 820px) {
  .login { align-items: center; padding: 24px; background: #fff; }
  .lcard { max-width: 1040px; display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 40px; background: transparent; border: none; box-shadow: none; overflow: visible; border-radius: 0; }
  .lhero { width: 100%; height: auto; }
  .lbody { background: #fbf7ee; border-radius: 22px; padding: 36px 40px; }
  .lin { font-size: 16px; padding: 12px 14px; }
  .lbtn { font-size: 20px; padding: 14px; }
}

/* Lock screen */
.lock { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 24px; text-align: center; }
.lock::before { content: ""; position: fixed; left: 0; right: 0; top: 0; height: calc(var(--safe-top) + 8px); background: var(--rainbow); }
.logo { width: 96px; height: 96px; border-radius: 28px; background: var(--rainbow); display: flex; align-items: center; justify-content: center; font-size: 46px; margin-bottom: 14px; box-shadow: 0 6px 18px rgba(123,44,191,0.25); }
.lock h1 { margin: 0 0 4px; font-size: 26px; }
.lock p { margin: 0 0 18px; color: var(--muted); }
.dots { display: flex; gap: 12px; justify-content: center; margin: 8px 0 18px; min-height: 18px; }
.dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--purple); }
.dot.on { background: var(--purple); }
.pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 12px; }
.pad button { width: 76px; height: 76px; border-radius: 50%; border: none; background: #fff; font-size: 26px; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,0.12); color: var(--ink); }
.pad button:active { background: #eee; }
.pad button.go { background: var(--purple); color: #fff; font-size: 18px; }
.pad button.ghost { background: transparent; box-shadow: none; font-size: 22px; }

/* Home tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { position: relative; text-align: left; border: none; border-radius: 18px; padding: 14px 12px 12px; min-height: 118px; background: var(--c); color: #fff; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 3px 10px rgba(0,0,0,0.12); }
.tile:active { transform: scale(0.98); }
.tile .ticon { font-size: 26px; margin-bottom: 4px; }
.tile .ttitle { font-weight: 800; font-size: 16px; line-height: 1.15; }
.tile .tsub { font-size: 12px; opacity: 0.9; }
.tile.soon { background: #fff; color: var(--c); border: 2px solid var(--c); box-shadow: none; }
.tile .tsoon { position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 800; letter-spacing: 0.5px; background: var(--c); color: #fff; padding: 2px 7px; border-radius: 10px; }

/* Forms & Dues */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.stat { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--c); border-radius: 14px; padding: 8px 6px; text-align: center; }
.stat b { display: block; font-size: 20px; color: var(--c); }
.stat span { font-size: 11px; color: var(--muted); }
.switch { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin: 4px 0 2px; }
.switch input { width: 20px; height: 20px; }
.hint { font-size: 12px; color: var(--muted); margin: 2px 0 10px; }
.frow { background: #fff; border: 1px solid var(--line); border-left: 8px solid var(--lv, #999); border-radius: 16px; padding: 10px 12px; margin-bottom: 10px; }
.frow.done { background: #f3fbf6; }
.fname { font-weight: 800; font-size: 17px; margin-bottom: 6px; }
.fmeta { font-weight: 500; font-size: 12px; color: var(--muted); margin-left: 4px; }
.toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.tg { border: 1.5px solid #ccc; background: #fff; color: #555; border-radius: 20px; padding: 6px 11px; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.tg small { font-weight: 500; font-size: 11px; opacity: 0.9; }
.tg.on { background: var(--green); border-color: var(--green); color: #fff; }
.tg.on.no { background: var(--red); border-color: var(--red); }
.tg.on.yes { background: var(--blue); border-color: var(--blue); }
.tg.on.dues { background: var(--orange); border-color: var(--orange); }

/* Badges & Journeys */
.gcard { background: #fff; border: 1px solid var(--line); border-left: 8px solid var(--lv, #999); border-radius: 16px; margin-bottom: 10px; overflow: hidden; }
.ghead { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; cursor: pointer; }
.ghead .gname { font-weight: 800; font-size: 17px; flex: 1; }
.ghead .gcounts { display: flex; gap: 4px; }
.cnt { font-size: 11px; font-weight: 800; color: #fff; border-radius: 10px; padding: 2px 7px; min-width: 22px; text-align: center; flex: none; line-height: 1.4; }
.cnt.earned { background: var(--green); } .cnt.started { background: var(--orange); } .cnt.next { background: #9e9e9e; }
.ghead .caret { color: #999; font-size: 18px; transition: transform 0.15s; }
.gcard.open .caret { transform: rotate(90deg); }
.gbody { border-top: 1px solid var(--line); padding: 6px 12px 10px 14px; }
.grp { font-size: 11px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; margin: 10px 0 4px; }
.grp.earned { color: var(--green); } .grp.started { color: #b45309; } .grp.next { color: #777; }
.bi { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed #eee; }
.bi:last-child { border-bottom: none; }
.bi .bmain { flex: 1; min-width: 0; }
.bi .bname { font-weight: 700; font-size: 15px; }
.bi .bdetail { font-size: 13px; color: #444; }
.bi .bnote { font-size: 12px; color: var(--muted); }
.bi .bkind { font-size: 10px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; color: #fff; background: #bbb; border-radius: 8px; padding: 1px 6px; margin-right: 4px; vertical-align: 1px; }
.bkind.award { background: var(--purple); } .bkind.journey { background: var(--blue); } .bkind.petal { background: #4fa3e0; } .bkind.skill { background: var(--green); } .bkind.patch { background: var(--orange); }
.st { border: none; border-radius: 16px; padding: 7px 10px; font-size: 12px; font-weight: 800; color: #fff; min-width: 74px; text-align: center; flex: none; }
.st.earned { background: var(--green); } .st.started { background: var(--orange); } .st.next { background: #9e9e9e; }
.st small { display: block; font-weight: 600; font-size: 10px; opacity: 0.95; }
.bedit { border: none; background: #f1f1f1; border-radius: 50%; width: 34px; height: 34px; font-size: 15px; flex: none; }
.addrow { margin-top: 8px; }
.addrow button { border: 1.5px dashed var(--purple); color: var(--purple); background: #fff; border-radius: 12px; padding: 8px 12px; font-weight: 700; font-size: 13px; width: 100%; }
.hscroll { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; -webkit-overflow-scrolling: touch; }
.hscroll button { flex: none; border: 1.5px solid #ccc; background: #fff; color: #555; border-radius: 20px; padding: 6px 12px; font-size: 13px; font-weight: 700; }
.hscroll button.on { background: var(--purple); border-color: var(--purple); color: #fff; }

/* Finances */
.tabs { display: flex; background: #eee; border-radius: 14px; padding: 4px; margin-bottom: 12px; }
.tabs button { flex: 1; border: none; background: transparent; border-radius: 11px; padding: 9px; font-weight: 800; color: #666; }
.tabs button.on { background: #fff; color: var(--purple); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.stats.four { grid-template-columns: repeat(4, 1fr); }
.stats.four .stat b { font-size: 16px; }
.booth { background: #fff; border: 1px solid var(--line); border-left: 8px solid var(--green); border-radius: 16px; padding: 10px 12px; margin-bottom: 10px; }
.booth .bt { display: flex; align-items: baseline; gap: 8px; }
.booth .bnum { font-size: 11px; font-weight: 800; color: #fff; background: var(--green); border-radius: 8px; padding: 1px 7px; }
.booth .bloc { font-weight: 800; font-size: 16px; flex: 1; }
.booth .bamt { font-weight: 800; color: var(--green); }
.booth .bsub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.booth.empty { border-left-color: #ccc; color: #999; text-align: center; font-weight: 700; }
.tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.tbl th { background: #f4f4f4; font-size: 12px; text-align: left; padding: 8px; color: var(--muted); }
.tbl td { padding: 6px 8px; border-top: 1px solid #eee; font-size: 14px; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl tr.total td { font-weight: 800; background: #fafafa; }
.tbl input.num { width: 64px; text-align: right; border: 1.5px solid var(--line); border-radius: 8px; padding: 6px; font-size: 15px; }
.wk { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed #eee; }
.wk label { flex: 1; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.wk input[type=checkbox] { width: 22px; height: 22px; }
.wk input.num { width: 70px; text-align: right; border: 1.5px solid var(--line); border-radius: 8px; padding: 6px; }
.wk small { color: var(--muted); font-weight: 500; }
.bal { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; margin-bottom: 12px; text-align: center; }
.bal .big { font-size: 32px; font-weight: 800; color: var(--green); }
.bal .big.neg { color: var(--red); }
.bal .lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.bal .row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 10px; font-size: 13px; }
.bal .row3 b { display: block; font-size: 15px; }
.tx { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 9px 12px; margin-bottom: 8px; }
.tx .txmain { flex: 1; min-width: 0; }
.tx .memo { font-weight: 700; }
.tx .txsub { font-size: 12px; color: var(--muted); }
.tx .amt { font-weight: 800; text-align: right; }
.tx .amt.cr { color: var(--green); } .tx .amt.db { color: var(--red); }
.tx .after { display: block; font-size: 11px; color: #999; font-weight: 500; }
.cat { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; background: #eee; color: #666; border-radius: 8px; padding: 1px 6px; margin-right: 4px; }

.toolbar { display: flex; gap: 8px; margin: -4px 0 12px; }
.toolbar button, .toolbar a { flex: 1; border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 12px; padding: 9px; font-weight: 700; font-size: 13px; text-align: center; }
.clip { font-size: 12px; color: var(--blue); font-weight: 700; margin-left: 4px; }
.receipts { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 10px; }
.rc { position: relative; width: 84px; }
.rc img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.rc .pdf { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 84px; height: 84px; border-radius: 10px; border: 1px solid var(--line); background: #f6f6f6; font-size: 24px; line-height: 1.1; color: #555; }
.rc .pdf br + * { font-size: 11px; }
.rcx { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; border: none; background: var(--red); color: #fff; font-size: 16px; line-height: 1; }
.filebtn { cursor: pointer; }

/* Troop operations */
.hscroll.dates button.joint { border-color: #c8933a; color: #8a5a10; }
.hscroll.dates button.joint.on { background: #c8933a; border-color: #c8933a; color: #fff; }
.hscroll.dates button.past { opacity: 0.85; }
.selm { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin: 4px 0 10px; }
.arow { width: 100%; display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-left: 8px solid var(--lv, #999); border-radius: 14px; padding: 12px 12px 12px 14px; margin-bottom: 8px; text-align: left; font: inherit; color: var(--ink); }
.arow .ck { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #bbb; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; flex: none; }
.arow.on { background: #eef8f1; border-color: #bfe3cb; }
.arow.on .ck { background: var(--green); border-color: var(--green); }
.arow .an { flex: 1; font-weight: 700; font-size: 17px; }
.srow { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; margin-bottom: 8px; }
.srow.need { border-color: #f8cf9d; background: #fffaf2; }
.srow .smain { flex: 1; min-width: 0; }
.srow .sname { font-weight: 700; }
.cart { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid #ddd; background: #fff; font-size: 18px; flex: none; }
.cart.on { background: var(--orange); border-color: var(--orange); }
.ratio2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.ratio2 div { background: #f4faf6; border-radius: 12px; padding: 10px; text-align: center; }
.ratio2 b { display: block; font-size: 28px; color: var(--green); }
.ratio2 span { font-size: 12px; color: var(--muted); }
.tbl.ratio th small { font-weight: 500; }
.pv.wide { max-width: none; }
.attgrid { width: 100%; border-collapse: collapse; font-size: 11px; }
.attgrid th, .attgrid td { border: 1px solid #888; padding: 3px 2px; text-align: center; }
.pv .attgrid th { background: #2f4f4f; color: #fff; font-weight: normal; line-height: 1.2; text-align: center; }
.pv .attgrid th.joint { background: #c8933a; }
.pv .attgrid td.joint { background: #f6ecd8; }
.pv .attgrid td { text-align: center; }
.pv .attgrid td.nm, .pv .attgrid th.nm { text-align: left; }
.attgrid .nm { text-align: left; padding-left: 6px; white-space: nowrap; font-weight: 600; }
.attgrid td.ck { height: 26px; font-size: 14px; color: #1e6b3a; }

/* Communication & logistics */
.csec { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px 12px; margin-bottom: 12px; border-top: 6px solid var(--purple); }
.chead { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.chead .cicon { font-size: 22px; }
.chead > div { flex: 1; min-width: 0; }
.ctitle { font-weight: 800; font-size: 16px; }
.note { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px dashed #eee; }
.note .nck { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #bbb; background: #fff; color: #fff; font-weight: 800; flex: none; margin-top: 2px; }
.note.done .nck { background: var(--green); border-color: var(--green); }
.note.done .ntext { text-decoration: line-through; color: #999; }
.note .nmain { flex: 1; min-width: 0; }
.note .ntext { font-size: 15px; white-space: pre-wrap; }
.note .nsub { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.due { font-size: 12px; font-weight: 700; color: #457b9d; background: #eef4f9; border-radius: 8px; padding: 1px 7px; }
.due.soon { color: #b45309; background: #fff1e0; }
.due.late { color: #a4161a; background: #fdecea; }
.showdone { border: none; background: none; color: var(--muted); font-size: 12px; font-weight: 700; padding: 6px 0; }
.quick { display: flex; gap: 6px; margin-top: 8px; border-top: 1px dashed #eee; padding-top: 10px; }
.quick input[name=text] { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.quick input[type=date] { width: 44px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 4px; color: transparent; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'><rect x='3' y='5' width='18' height='16' rx='2'/><path d='M3 10h18M8 3v4M16 3v4'/></svg>") center/20px no-repeat; }
.quick input[type=date]:valid { border-color: var(--blue); background-color: #eef4f9; }
.quick button { border: none; background: var(--purple); color: #fff; border-radius: 12px; padding: 0 14px; font-weight: 800; }

/* Leaders & volunteers */
.fa { font-size: 12.5px; font-weight: 700; margin-top: 2px; }
.fa.s-ok, .fa.s-nodate { color: #1e6b3a; } .fa.s-soon { color: #b45309; } .fa.s-expired { color: #a4161a; } .fa.s-none { color: #888; }
.cs { font-weight: 700; }
.cs.s-ok, .cs.s-nodate { color: #1e6b3a; } .cs.s-soon { color: #b45309; } .cs.s-expired { color: #a4161a; }

/* Print view */
.pv { max-width: 8in; margin: 0 auto; padding: 12px 16px 100px; }
.pv h2 { font-size: 15px; margin: 18px 0 4px; padding-bottom: 2px; border-bottom: 2px solid var(--lv, #999); color: var(--lv, #333); }
.pv table { width: 100%; border-collapse: collapse; font-size: 12px; }
.pv th, .pv td { border: 1px solid #999; padding: 3px 6px; text-align: left; vertical-align: top; }
.pv th { background: #eee; }
.pv td.s { font-weight: 700; white-space: nowrap; }
.pv td.s.earned { color: #1e6b3a; } .pv td.s.started { color: #b45309; } .pv td.s.next { color: #777; }
.pv .pvtitle { font-size: 20px; font-weight: 800; margin: 0; }
.pv .pvsub { color: var(--muted); font-size: 12px; margin: 0 0 6px; }
@media print {
  .nav, .hdr, .noprint { display: none !important; }
  body { background: #fff; }
  .pv { padding: 0; max-width: none; }
  .pv h2 { page-break-after: avoid; }
  table { page-break-inside: auto; } tr { page-break-inside: avoid; }
}

/* Bottom nav */
.nav { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); display: flex; padding: 6px 0 calc(var(--safe-bottom) + 6px); z-index: 5; }
.nav button { flex: 1; border: none; background: none; color: #888; font-size: 12px; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.nav button span { font-size: 22px; }
.nav button.on { color: var(--purple); }
