/* Clean Water prototype — one stylesheet, light and dark.
   Dark is declared twice: for the phone's own setting, and for More → Settings (data-theme). */

:root {
  color-scheme: light;
  --bg: #eef4f6;
  --surface: #ffffff;
  --surface-2: #e4eef1;
  --ink: #0d2530;
  --ink-2: #3f5c67;
  --muted: #647d87;
  --line: #d3e1e6;
  --brand: #0b4f6c;
  --brand-ink: #ffffff;
  --brand-soft: #d7ecf2;
  --top-bg: #0b4f6c;
  --top-ink: #ffffff;
  --hero-a: #0b4f6c;
  --hero-b: #13806f;
  --hero-ink: #ffffff;
  --link: #0a6688;
  --ok: #1d7a45;
  --ok-soft: #dcf1e4;
  --warn: #8a5a00;
  --warn-soft: #fff1cf;
  --danger: #b3261e;
  --danger-soft: #fbe3e1;
  --ribbon: #ffcf4d;
  --ribbon-ink: #3b2a00;
  --shadow: 0 1px 2px rgba(13, 37, 48, .06), 0 4px 16px rgba(13, 37, 48, .06);
  --radius: 14px;
  --tabs-h: 64px;
  --top-h: 56px;
  --ribbon-h: 28px;
  /* report types: categorical slots, fixed order (dataviz reference palette); every pin also
     carries its emoji, so the type is never told by colour alone */
  --t-illness: #6250d6;
  --t-sewage: #eb6834;
  --t-use: #2a78d6;
  --t-test: #1baf7a;
  --t-wildlife: #008300;
  --t-other: #6b7b80;
  --bar: #2a78d6;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #0b171c;
    --surface: #12232a;
    --surface-2: #19303a;
    --ink: #e5f0f3;
    --ink-2: #a8c1c9;
    --muted: #84a0a9;
    --line: #24414c;
    --brand: #4fb6d3;
    --brand-ink: #062430;
    --brand-soft: #173a47;
    --top-bg: #0e3442;
    --top-ink: #e5f0f3;
    --hero-a: #0f4559;
    --hero-b: #125a50;
    --hero-ink: #e9f6f8;
    --link: #7fd0e6;
    --ok: #6fd39a;
    --ok-soft: #15352a;
    --warn: #f0c35a;
    --warn-soft: #3a2f12;
    --danger: #ff8a80;
    --danger-soft: #3d1c1a;
    --ribbon: #6b5410;
    --ribbon-ink: #fff3cc;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    --t-illness: #9085e9;
    --t-sewage: #d95926;
    --t-use: #3987e5;
    --t-test: #199e70;
    --t-wildlife: #008300;
    --t-other: #8a9a9f;
    --bar: #3987e5;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b171c;
  --surface: #12232a;
  --surface-2: #19303a;
  --ink: #e5f0f3;
  --ink-2: #a8c1c9;
  --muted: #84a0a9;
  --line: #24414c;
  --brand: #4fb6d3;
  --brand-ink: #062430;
  --brand-soft: #173a47;
  --top-bg: #0e3442;
  --top-ink: #e5f0f3;
  --hero-a: #0f4559;
  --hero-b: #125a50;
  --hero-ink: #e9f6f8;
  --link: #7fd0e6;
  --ok: #6fd39a;
  --ok-soft: #15352a;
  --warn: #f0c35a;
  --warn-soft: #3a2f12;
  --danger: #ff8a80;
  --danger-soft: #3d1c1a;
  --ribbon: #6b5410;
  --ribbon-ink: #fff3cc;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  --t-illness: #9085e9;
  --t-sewage: #d95926;
  --t-use: #3987e5;
  --t-test: #199e70;
  --t-wildlife: #008300;
  --t-other: #8a9a9f;
  --bar: #3987e5;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-top: calc(var(--ribbon-h) + var(--top-h) + env(safe-area-inset-top));
  padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
a { color: var(--link); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
small, .muted { color: var(--muted); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* ── frame ─────────────────────────────────────────────────────── */
.ribbon {
  position: fixed; inset: 0 0 auto 0; z-index: 1001;
  height: calc(var(--ribbon-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0;
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, var(--ribbon) 0 14px, color-mix(in srgb, var(--ribbon) 82%, #000 0%) 14px 28px);
  color: var(--ribbon-ink); font-size: .78rem; text-decoration: none; white-space: nowrap; overflow: hidden;
}
.ribbon strong { text-transform: uppercase; letter-spacing: .06em; }
.ribbon span { overflow: hidden; text-overflow: ellipsis; }
.top {
  position: fixed; left: 0; right: 0; top: calc(var(--ribbon-h) + env(safe-area-inset-top)); z-index: 1000;
  height: var(--top-h);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 8px 0 14px;
  background: var(--top-bg); color: var(--top-ink);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.logo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .14); }
.brandText { display: flex; flex-direction: column; min-width: 0; }
.brandText strong { font-size: 1.05rem; letter-spacing: .01em; }
.brandText small { color: inherit; opacity: .8; font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconBtn { border: 0; background: transparent; color: inherit; font-size: 1.4rem; width: 44px; height: 44px; border-radius: 10px; cursor: pointer; }
.iconBtn:hover { background: rgba(255, 255, 255, .12); }

#view { display: block; max-width: 760px; margin: 0 auto; padding: 16px 16px 28px; outline: none; }
#view.full { max-width: none; padding: 0; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  height: calc(var(--tabs-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
}
.tabs a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600;
}
.tabs a span { font-size: 1.25rem; line-height: 1; }
.tabs a.on { color: var(--brand); }
.tabs a.tabReport span {
  display: grid; place-items: center; width: 46px; height: 46px; margin-top: -18px;
  border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: 1.7rem; font-weight: 700;
  box-shadow: var(--shadow); border: 3px solid var(--surface);
}

/* ── building blocks ───────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.card.flat { box-shadow: none; }
.sectionHead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 22px 2px 10px; }
.sectionHead h2 { margin: 0; }
.sectionHead a { font-size: .9rem; white-space: nowrap; }
.eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.lede { font-size: 1.05rem; color: var(--ink-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.big { min-height: 56px; font-size: 1.1rem; width: 100%; border-radius: 16px; }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: .9rem; border-radius: 10px; }
.btn.danger { color: var(--danger); }
.btn.ghost { background: transparent; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }
.stack > * + * { margin-top: 10px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.example { background: var(--warn-soft); color: var(--warn); }
.badge.local { background: var(--brand-soft); color: var(--link); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }

.note { border-left: 4px solid var(--brand); background: var(--brand-soft); padding: 10px 12px; border-radius: 0 10px 10px 0; font-size: .92rem; margin: 0 0 14px; }
.note.warn { border-color: var(--warn); background: var(--warn-soft); }
.note > :last-child { margin-bottom: 0; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 2px; color: inherit; text-decoration: none; }
.item .ico { flex: 0 0 40px; height: 40px; display: grid; place-items: center; font-size: 1.3rem; border-radius: 12px; background: var(--surface-2); }
.item .body { flex: 1; min-width: 0; }
.item .title { font-weight: 650; }
.item .meta { font-size: .84rem; color: var(--muted); }
.item .chev { color: var(--muted); align-self: center; }

.dayHead { position: sticky; top: calc(var(--ribbon-h) + var(--top-h) + env(safe-area-inset-top)); z-index: 2; background: var(--bg); padding: 8px 2px 4px; font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* ── Now ───────────────────────────────────────────────────────── */
.hero { background: linear-gradient(160deg, var(--hero-a) 0%, var(--hero-b) 100%); color: var(--hero-ink); border: 0; }
.hero h1 { font-size: 1.45rem; }
.hero p { color: inherit; opacity: .92; }
.hero .btn.big { background: #ffffff; color: #0b4f6c; border: 0; }
.quickTypes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.quickTypes a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 12px; background: rgba(255, 255, 255, .14); color: inherit; text-decoration: none; font-size: .8rem; font-weight: 600; text-align: center; }
.quickTypes a span { font-size: 1.4rem; }

.status { position: relative; overflow: hidden; }
.statusTop { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.statusDot { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; background: var(--warn-soft); }
.spots { display: grid; grid-template-columns: 1fr auto; gap: 0; margin: 0 0 12px; }
.spots > div { padding: 8px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.spots > div:nth-child(-n+2) { border-top: 0; }
.spots .s { text-align: right; }
.stamp { position: absolute; top: 12px; right: -34px; transform: rotate(35deg); background: var(--warn-soft); color: var(--warn); font-size: .7rem; font-weight: 800; letter-spacing: .12em; padding: 2px 40px; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { position: relative; padding: 0 0 14px 40px; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: .85rem; }
.steps li::after { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps li.done::before { content: "✓"; background: var(--ok-soft); color: var(--ok); }
.steps li.now::before { background: var(--brand); color: var(--brand-ink); }
.steps li strong { display: block; }
.steps li span { font-size: .88rem; color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.tile .label { font-size: .8rem; color: var(--muted); }
.tile .value { font-size: 1.6rem; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; }

/* ── Report ────────────────────────────────────────────────────── */
.typeGrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .typeGrid { grid-template-columns: repeat(3, 1fr); } }
.typeBtn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  min-height: 112px; padding: 14px; border-radius: 16px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  border-top: 5px solid var(--c, var(--brand));
}
.typeBtn:hover { border-color: var(--c); }
.typeBtn .e { font-size: 1.9rem; line-height: 1; }
.typeBtn strong { font-size: 1rem; }
.typeBtn small { font-size: .8rem; line-height: 1.3; }

.formHead { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.formHead .e { font-size: 2rem; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); }
.formHead h1 { margin: 0; font-size: 1.25rem; }
.capture { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 10px; }
.capBtn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 64px; border-radius: 14px; border: 1px dashed var(--line); background: var(--surface); font-weight: 650; cursor: pointer; font-size: 1rem; }
.capBtn span { font-size: 1.5rem; }
.capBtn.rec { border-style: solid; border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
textarea, input[type=text], input[type=email], input[type=number], input[type=date], input[type=datetime-local], select {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); min-height: 44px;
}
textarea { min-height: 84px; resize: vertical; }
label.field { display: block; margin: 0 0 12px; }
label.field > span { display: block; font-size: .88rem; font-weight: 650; margin-bottom: 4px; color: var(--ink-2); }
.media { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.media .m { position: relative; }
.media img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; display: block; }
.media audio { height: 40px; max-width: 240px; }
.media .x { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--ink); color: var(--surface); font-size: .8rem; cursor: pointer; }

.line { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.line .k { flex: 0 0 26px; font-size: 1.15rem; text-align: center; }
.line .v { flex: 1; min-width: 0; }
.line .v > strong, .line .v > div > strong:first-child { display: block; font-size: .9rem; color: var(--ink-2); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.chip { min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .9rem; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.group { margin: 0 0 12px; }
.group > strong { font-size: .88rem; color: var(--ink-2); }

details.more { border-top: 1px solid var(--line); padding: 10px 0 0; }
details.more > summary { cursor: pointer; font-weight: 650; padding: 6px 0; list-style: none; }
details.more > summary::before { content: "▸ "; color: var(--muted); }
details.more[open] > summary::before { content: "▾ "; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 6px 0 0; }
.seg button { min-height: 52px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: .82rem; line-height: 1.2; padding: 6px; cursor: pointer; }
.seg button[aria-pressed="true"] { border: 2px solid var(--brand); background: var(--brand-soft); font-weight: 700; }

.saveBar { position: sticky; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); margin: 16px -16px 0; padding: 14px 16px 8px; z-index: 5; background: linear-gradient(to top, var(--bg) 72%, transparent); }
.saveBar .btn { box-shadow: var(--shadow); }
.saveBar small { display: block; text-align: center; margin-top: 6px; }

/* ── Map ───────────────────────────────────────────────────────── */
.mapWrap { position: fixed; left: 0; right: 0; top: calc(var(--ribbon-h) + var(--top-h) + env(safe-area-inset-top)); bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); }
#map { position: absolute; inset: 0; background: var(--surface-2); }
.mapBar { position: absolute; left: 8px; right: 8px; top: 8px; z-index: 500; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.mapBar::-webkit-scrollbar { display: none; }
.mapBar .chip { box-shadow: var(--shadow); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.mapBar .chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; }
.mapBar .chip[aria-pressed="false"] { opacity: .55; text-decoration: line-through; }
.mapBar .chip[aria-pressed="true"] { background: var(--surface); color: var(--ink); border-color: var(--line); }
.mapHint { position: absolute; left: 50%; transform: translateX(-50%); bottom: 30px; z-index: 500; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .85rem; box-shadow: var(--shadow); white-space: nowrap; max-width: calc(100% - 100px); overflow: hidden; text-overflow: ellipsis; }
.mapBtns { position: absolute; right: 10px; bottom: 74px; z-index: 500; display: flex; flex-direction: column; gap: 8px; }
.mapBtns button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); font-size: 1.2rem; cursor: pointer; }
.pin { width: 34px; height: 34px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--c); border: 2px solid var(--surface); box-shadow: 0 2px 6px rgba(0,0,0,.3); display: grid; place-items: center; }
.pin span { transform: rotate(45deg); font-size: 16px; line-height: 1; }
.pin.sample { opacity: .78; border-style: dashed; }
.spotDot { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); }
.leaflet-container { font: inherit; }
.leaflet-popup-content { margin: 12px 14px; font-size: .92rem; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
.popTypes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.popTypes a { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; border-radius: 10px; background: var(--surface-2); color: var(--ink); text-decoration: none; font-size: .72rem; font-weight: 600; text-align: center; line-height: 1.2; }
.popTypes a span { font-size: 1.3rem; }
.holdRing { position: fixed; left: -28px; top: -28px; width: 56px; height: 56px; border-radius: 50%; pointer-events: none; z-index: 2000; border: 4px solid var(--brand); opacity: .9; animation: holdfill .5s linear forwards; }
@keyframes holdfill { from { transform: var(--at) scale(.3); opacity: .3; } to { transform: var(--at) scale(1); opacity: .95; } }

/* ── Evidence (charts) ─────────────────────────────────────────── */
.bars { display: grid; grid-template-columns: minmax(110px, auto) 1fr auto; gap: 8px 10px; align-items: center; font-size: .9rem; }
.bars .bt { height: 18px; position: relative; }
.bars .bt i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: var(--bar); max-width: 100%; min-width: 2px; }
.bars .n { font-variant-numeric: tabular-nums; color: var(--ink-2); text-align: right; }
.cols { display: flex; align-items: flex-end; gap: 2px; height: 140px; border-bottom: 1px solid var(--line); padding-top: 18px; }
.cols .c { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; }
.cols .c i { width: 100%; max-width: 24px; background: var(--bar); border-radius: 4px 4px 0 0; min-height: 0; }
.cols .c b { position: absolute; font-size: .72rem; font-weight: 600; color: var(--ink-2); transform: translateY(-16px); }
.colLabels { display: flex; gap: 2px; font-size: .7rem; color: var(--muted); margin-top: 4px; }
.colLabels span { flex: 1; text-align: center; overflow: hidden; white-space: nowrap; }
.tip { position: fixed; z-index: 3000; pointer-events: none; background: var(--ink); color: var(--surface); padding: 6px 10px; border-radius: 8px; font-size: .82rem; box-shadow: var(--shadow); max-width: 240px; }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data th, table.data td { text-align: left; padding: 6px 4px; border-top: 1px solid var(--line); }
table.data td.n, table.data th.n { text-align: right; font-variant-numeric: tabular-nums; }

/* ── sheets & toast ────────────────────────────────────────────── */
.veil { position: fixed; inset: 0; z-index: 2500; background: rgba(5, 20, 26, .55); display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--surface); border-radius: 20px 20px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: var(--shadow); }
@media (min-width: 640px) { .veil { align-items: center; padding: 16px; } .sheet { border-radius: 20px; } }
.sheet h2 { font-size: 1.3rem; }
.sheet .points { list-style: none; padding: 0; margin: 0 0 14px; }
.sheet .points li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .95rem; }
.sheet .points li:first-child { border-top: 0; }
.sheet .points li > span:first-child { flex: 0 0 26px; font-size: 1.2rem; }
#toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 14px); transform: translateX(-50%) translateY(20px); z-index: 3000; background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 12px; font-size: .92rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); }
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── content pages ─────────────────────────────────────────────── */
.prose h2 { margin-top: 22px; }
.prose ul { padding-left: 1.2rem; margin: 0 0 .75rem; }
.prose li { margin: 0 0 .35rem; }
.src { font-size: .8rem; color: var(--muted); }
.news .item .title a { color: inherit; text-decoration: none; }
.news .item .title a:hover { text-decoration: underline; }
.tabsInline { display: flex; gap: 6px; margin: 0 0 14px; overflow-x: auto; }
.tabsInline a { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.tabsInline a.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.photoBig { width: 100%; max-height: 360px; object-fit: contain; border-radius: 12px; background: var(--surface-2); }
.noscript { padding: 20px; }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.empty .e { font-size: 2.4rem; }
[id] { scroll-margin-top: calc(var(--ribbon-h) + var(--top-h) + env(safe-area-inset-top) + 12px); }
