[hidden] { display: none !important; }
:root {
  --ink: #1b1f2e;
  --muted: #5d6478;
  --paper: #f6f3ee;
  --card: #ffffff;
  --line: #e4e0d8;
  --dusk-1: #1d2340;
  --dusk-2: #4a3f6b;
  --dusk-3: #c9785d;
  --dusk-4: #f0b77a;
  --accent: #3b4a8c;
  --good: #2e7d4f;
  --fair: #9a6a12;
  --poor: #a23d33;
  --radius: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
a { color: var(--accent); }

.hero {
  position: relative;
  min-height: 260px;
  background: linear-gradient(180deg, var(--dusk-1) 0%, var(--dusk-2) 45%, var(--dusk-3) 80%, var(--dusk-4) 100%);
  color: #fff;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.hero:not(.has-scene)::after { /* reed line (pages without the scene) */
  content: "";
  position: absolute; inset: auto 0 0 0; height: 34px;
  background: #1a1a22;
  clip-path: polygon(0 60%, 4% 30%, 6% 55%, 10% 20%, 13% 50%, 18% 35%, 22% 60%, 27% 25%, 30% 55%, 36% 40%, 40% 62%, 45% 28%, 49% 55%, 55% 38%, 60% 60%, 64% 30%, 68% 52%, 74% 36%, 79% 60%, 83% 26%, 87% 52%, 92% 34%, 96% 58%, 100% 40%, 100% 100%, 0 100%);
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero.has-scene { min-height: clamp(330px, 56vh, 480px); background: #273042; touch-action: pan-y; }
.hero.falcon-cursor { cursor: none; }
/* A soft scrim behind the title so it stays readable over the sky and reeds. */
.hero.has-scene .hero-text { z-index: 2; pointer-events: none; text-shadow: 0 1px 12px rgb(12 12 22 / .55); }
.hero.has-scene .hero-text a { pointer-events: auto; }
.hero.has-scene .hero-text::before {
  content: ""; position: absolute; z-index: -1; left: -120px; right: 10%; top: -60px; bottom: -20px;
  background: radial-gradient(closest-side at 40% 62%, rgb(14 14 26 / .5), rgb(14 14 26 / .22) 55%, rgb(14 14 26 / 0) 100%);
}
@media (max-width: 759px) { .hero.has-scene .hero-text::before { left: -60px; right: -60px; } }
.hero-text { position: relative; z-index: 1; padding: 24px 20px 52px; max-width: 760px; margin: 0 auto; width: 100%; }
.eyebrow { margin: 0; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
h1 { margin: 4px 0 2px; font-size: clamp(1.8rem, 6vw, 2.6rem); line-height: 1.1; }
.lede { margin: 0; font-size: 1.1rem; opacity: .95; }

main { max-width: 760px; margin: -20px auto 0; padding: 0 14px 24px; position: relative; z-index: 2; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: 0 1px 3px rgb(0 0 0 / .05); }
.grid { display: grid; gap: 14px; }
.grid .card { margin: 0; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; margin-bottom: 14px; } }
.label { margin: 0 0 6px; font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.banner { background: #fff4df; border: 1px solid #f0d9a8; border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; }

.roost h2 { margin: 0; font-size: clamp(2rem, 8vw, 2.8rem); line-height: 1.05; }
.section-name { margin: 4px 0 0; font-size: 1.15rem; }
.section-name:empty { display: none; }
.badge { display: inline-block; margin: 12px 0 0; padding: 4px 10px; border-radius: 999px; font-size: .9rem; font-weight: 600; background: #eef0f8; color: var(--accent); }
.badge[data-level="confirmed"] { background: #e6f3ea; color: var(--good); }
.badge[data-level="unconfirmed"] { background: #fbf1df; color: var(--fair); }
.badge[data-level="stale"] { background: #f1efeb; color: var(--muted); }
.badge::before { margin-right: 6px; }
.badge[data-level="confirmed"]::before { content: "✓"; }
.badge[data-level="unconfirmed"]::before { content: "?"; }
.badge[data-level="stale"]::before { content: "◷"; }
.note { margin: 10px 0 0; padding: 10px 12px; background: var(--paper); border-radius: 10px; }
#roost-updated { margin: 8px 0 0; font-size: .9rem; }

.times { margin: 0; display: grid; gap: 8px; }
.times div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.times dt { color: var(--muted); }
.times dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.countdown { margin: 10px 0 0; font-weight: 600; color: var(--accent); }
.countdown:empty { display: none; }

.rating { margin: 0; font-size: 1.5rem; font-weight: 700; }
.rating[data-rating="good"] { color: var(--good); }
.rating[data-rating="fair"] { color: var(--fair); }
.rating[data-rating="poor"] { color: var(--poor); }
.rating[data-rating="good"]::before { content: "● "; }
.rating[data-rating="fair"]::before { content: "◐ "; }
.rating[data-rating="poor"]::before { content: "○ "; }
.figures { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.figures li { background: var(--paper); border-radius: 8px; padding: 3px 9px; font-size: .9rem; font-variant-numeric: tabular-nums; }

.park { padding: 10px 0; border-top: 1px solid var(--line); }
.park:first-child { border-top: 0; padding-top: 0; }
.park h3 { margin: 0 0 2px; font-size: 1.02rem; }
.park p { margin: 0 0 6px; }
.tips { margin: 8px 0 0; padding-left: 18px; }
.tips li { margin-bottom: 4px; }
.site-h { margin: 14px 0 4px; font-size: .95rem; }
.site-h:first-child { margin-top: 0; }

/* ---- Hotline call-to-action (shown when reports are old, missing or unconfirmed) ---- */
.hotline-cta { margin-top: 14px; padding: 14px; border-radius: 14px; background: #f4f2fa; }
.hotline-cta p { margin: 0 0 10px; font-size: .95rem; }
.call {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 12px; text-decoration: none; font-size: .97rem;
  background: var(--accent); color: #fff; font-weight: 700;
}
.call svg { width: 20px; height: 20px; flex: none; }
.call b { white-space: nowrap; }
.call span { margin-left: auto; font-weight: 600; opacity: .85; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hotline-cta.subtle { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; background: none; padding: 0; }
.hotline-cta.subtle p { margin: 0; }
.hotline-cta.subtle .call { display: inline-flex; gap: 6px; background: none; color: var(--accent); padding: 0; }
.hotline-cta.subtle .call svg { width: 16px; height: 16px; }
.hotline-cta.subtle .call span { margin-left: 0; }

/* ---- Split roosts ---- */
.others { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.others-title { margin: 0 0 6px; font-weight: 600; font-size: .95rem; }
.others ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.others li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; background: var(--paper); border-radius: 10px; font-size: .95rem; }
.others li span:last-child { color: var(--muted); white-space: nowrap; }

/* ---- Report ---- */
.report { padding: 22px; }
.report-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.report-head h2 { margin: 0; font-size: 1.35rem; line-height: 1.2; }
.report-head p { margin: 2px 0 0; }
.live-dot { flex: none; width: 10px; height: 10px; margin-top: 9px; border-radius: 50%; background: #e0563f; box-shadow: 0 0 0 0 rgb(224 86 63 / .5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgb(224 86 63 / 0); } 100% { box-shadow: 0 0 0 0 rgb(224 86 63 / 0); } }

.step { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.step legend { padding: 0; margin-bottom: 10px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.opt { margin-left: 6px; font-weight: 500; text-transform: none; letter-spacing: 0; opacity: .8; }

/* Visually hidden radios; the styled element after them shows the state. */
.tile input, .chips input, .segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { position: relative; }
.tile-body {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px;
  height: 100%; padding: 16px 8px 14px; border-radius: 16px; cursor: pointer;
  background: #f4f2fa; border: 2px solid transparent; color: var(--ink);
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.tile-body svg { width: 40px; height: 40px; margin-bottom: 6px; color: var(--dusk-2); }
.tile-body strong { font-size: .98rem; line-height: 1.2; }
.tile-body small { color: var(--muted); font-size: .8rem; line-height: 1.25; }
.tile:hover .tile-body { background: #ecE9f6; }
.tile-body:active { transform: scale(.97); }
.tile input:checked + .tile-body { background: #fff; border-color: var(--accent); box-shadow: 0 6px 18px rgb(59 74 140 / .18); }
.tile input:checked + .tile-body svg { color: var(--accent); }
.tile input:focus-visible + .tile-body, .chips input:focus-visible + span, .segmented input:focus-visible + span { outline: 3px solid var(--dusk-4); outline-offset: 2px; }
@media (max-width: 420px) {
  .tile-body { padding: 12px 4px 10px; }
  .tile-body small { display: none; }
  .tile-body svg { width: 34px; height: 34px; }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -22px; padding: 2px 22px 4px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips label { position: relative; flex: none; }
.chips span {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: .94rem; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.chips span:hover { border-color: #c9c4d8; }
.chips input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.chips .here { font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #e6f3ea; color: var(--good); }
.chips input:checked + span .here { background: rgb(255 255 255 / .22); color: #fff; }

.segmented { display: inline-grid; grid-template-columns: repeat(3, 1fr); padding: 4px; gap: 4px; background: #f1eff7; border-radius: 999px; width: 100%; max-width: 360px; }
.segmented label { position: relative; }
.segmented span { display: block; text-align: center; padding: 8px 0; border-radius: 999px; font-weight: 600; cursor: pointer; transition: background .15s, box-shadow .15s; }
.segmented input:checked + span { background: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .12); color: var(--accent); }
.step[hidden] { display: none; }

#turnstile-box { margin: 4px 0 12px; }
#turnstile-box:empty { display: none; }
button { font: inherit; cursor: pointer; }
.send {
  width: 100%; padding: 15px 20px; border: 0; border-radius: 14px; font-weight: 700; font-size: 1.02rem; color: #fff;
  background: linear-gradient(135deg, var(--dusk-1), var(--accent) 60%, var(--dusk-2));
  box-shadow: 0 8px 20px rgb(29 35 64 / .25); transition: transform .1s, opacity .15s, box-shadow .15s;
}
.send:active { transform: translateY(1px); }
.send:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }
.send[aria-busy="true"] { opacity: .7; cursor: wait; }
#f-msg { margin: 10px 0 0; font-weight: 600; }
#f-msg:empty { display: none; }
#f-msg[data-ok="0"] { color: var(--poor); }
.hotline { font-weight: 700; white-space: nowrap; }

.done { display: flex; gap: 14px; align-items: flex-start; padding: 6px 0; color: var(--good); }
.done svg { width: 48px; height: 48px; flex: none; }
.done strong { display: block; color: var(--ink); font-size: 1.1rem; }
.done p { margin: 2px 0 8px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.reports { list-style: none; padding: 0; margin: 0; }
.reports li { padding: 8px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
.reports li:first-child { border-top: 0; }
.reports .age { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

footer { max-width: 760px; margin: 0 auto; padding: 8px 20px 40px; color: var(--muted); font-size: .92rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---- Stay up to date ---- */
.stay-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.stay .label + .stay-item { border-top: 0; padding-top: 2px; }
.stay-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; overflow: hidden; }
.stay-icon img { width: 40px; height: 40px; }
.stay-icon.tg { background: #229ed9; color: #fff; }
.stay-icon.tg svg { width: 22px; height: 22px; }
.stay-text { flex: 1; min-width: 0; display: grid; }
.stay-text span { color: var(--muted); font-size: .9rem; }
.share-ico { width: 15px; height: 15px; vertical-align: -2px; }
.stay-btn { flex: none; border: 0; border-radius: 999px; padding: 8px 16px; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; font-size: .92rem; }

/* ---- How it works ---- */
.how details { border-top: 1px solid var(--line); padding: 10px 0; }
.how details:first-of-type { border-top: 0; padding-top: 2px; }
.how summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.how summary::-webkit-details-marker { display: none; }
.how summary::after { content: "+"; color: var(--muted); font-weight: 600; }
.how details[open] summary::after { content: "−"; }
.how details p, .how details ol { margin: 8px 0 0; color: #333849; }
.how ol { padding-left: 20px; }
.how li { margin-bottom: 6px; }
.how-foot { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }

/* ---- Install banner (phones, second visit) ---- */
.install-banner {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20;
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 16px;
  background: #fff; box-shadow: 0 10px 30px rgb(20 20 40 / .25); max-width: 520px; margin: 0 auto;
}
.install-banner img { width: 40px; height: 40px; border-radius: 10px; }
.install-banner div { flex: 1; min-width: 0; display: grid; font-size: .92rem; }
.install-banner span { color: var(--muted); font-size: .85rem; }
.install-banner button { border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 700; background: var(--accent); color: #fff; }
.install-banner .x { background: none; color: var(--muted); font-size: 1.4rem; padding: 4px 8px; }
body.has-banner { padding-bottom: 90px; }
