/* HorseFairs.ie — brand sheet: Deep Field Green, Peat Brown, Saddle Tan, Oat Cream, Fair Red, Fair Gold.
   Headlines: Merriweather (self-hosted). Body: Inter (self-hosted). Fairs are red, events are peat brown. */

@font-face { font-family: "Merriweather"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fonts/merriweather-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Merriweather"; font-weight: 900; font-style: normal; font-display: swap; src: url("/assets/fonts/merriweather-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fonts/inter-latin-700-normal.woff2") format("woff2"); }

:root {
  --field: #F4EBD9;      /* Oat Cream (page) */
  --paper: #FFFDF8;      /* cards */
  --hedge: #1B5E3B;      /* Deep Field Green (primary) */
  --hedge-2: #14492E;
  --peat: #5B3A29;       /* Peat Brown (secondary) */
  --tan: #C18B56;        /* Saddle Tan (accent) */
  --ink: #1F2A22;
  --muted: #6B5F50;
  --line: #E2D5BD;
  --red: #C63D2F;        /* Fair Red (alerts/buttons) */
  --red-2: #A93125;
  --red-soft: #F8E1DC;
  --blue: #5B3A29;       /* events use Peat Brown */
  --blue-soft: #EFE2D5;
  --gold: #F1B82D;       /* Fair Gold (highlights) */
  --gold-soft: #FCEFC7;
  --ok: #1B5E3B;
  --warn: #8A5A00;
  --danger: #A93125;
  --radius-s: 6px;
  --radius-m: 14px;
  --shadow: 0 1px 2px rgba(91, 58, 41, .08), 0 4px 14px rgba(91, 58, 41, .06);
  --display: "Merriweather", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1240px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1rem/1.6 var(--body);
  color: var(--ink);
  background: var(--field);
  min-height: 100vh;
}
img { max-width: 100%; height: auto; }
a { color: var(--hedge); text-underline-offset: 2px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--ink); padding: .5rem 1rem; z-index: 99; }
.skip:focus { left: 1rem; }
.hp { position: absolute; left: -9999px; }
[hidden] { display: none !important; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.narrow-wide { max-width: 1040px; }
main { padding: 22px 0 48px; }

/* ---------- Header (cream, like the brand banner) ---------- */
.site-head {
  background: var(--field);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top);
}
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--hedge); text-decoration: none; min-width: 0; }
.brand-mark { width: 36px; height: 50px; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-word { font: 900 1.55rem/1.05 var(--display); color: var(--hedge); letter-spacing: -.01em; }
.brand-tld { color: var(--tan); font-weight: 700; font-size: .8em; }
.brand-tag { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand:hover { color: var(--hedge); }
.nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--hedge); text-decoration: none; padding: 9px 12px; border-radius: var(--radius-s); font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(27, 94, 59, .09); color: var(--hedge); }
.nav .nav-add { background: var(--red); color: #fff; margin-left: 4px; }
.nav .nav-add:hover, .nav .nav-add[aria-current="page"] { background: var(--red-2); color: #fff; }
.nav-user { display: inline-flex; gap: 2px; }
@media (max-width: 1000px) { .brand-tag { display: none; } }
@media (max-width: 640px) {
  .head-row { min-height: 60px; }
  .brand-mark { width: 29px; height: 40px; }
  .brand-word { font-size: 1.2rem; }
  .nav a { padding: 7px 8px; font-size: .85rem; }
  .nav .nav-add { padding: 7px 10px; }
  .nav a[href="/fairs.html"], .nav a[href="/"] { display: none; }
}
.nav-ico { width: 18px; height: 18px; vertical-align: -4px; margin-right: 5px; }
@media (max-width: 640px) {
  .nav { flex-wrap: nowrap; }
  .nav .nav-txt { display: none; }
  .nav-ico { width: 22px; height: 22px; margin: 0; vertical-align: -6px; }
  .nav .nav-add span { display: none; }
  .nav .nav-add { font-size: .8rem; padding: 8px 10px; white-space: nowrap; }
}
@media (max-width: 360px) { .brand-word { font-size: 1rem; } .brand-mark { width: 25px; height: 34px; } }

/* ---------- Home hero (brand banner) ---------- */
.hero { background: var(--field); border-bottom: 1px solid var(--line); overflow: hidden; margin: -22px 0 22px; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; min-height: 170px; }
.hero-text { padding: 26px 0 24px; max-width: 560px; }
.hero-title { font: 900 clamp(1.8rem, 4.2vw, 2.75rem)/1.12 var(--display); color: var(--hedge); margin: 0 0 8px; letter-spacing: -.015em; }
.hero-lede { font-size: 1.1rem; font-weight: 600; color: var(--hedge); margin: 0 0 6px; }
.hero-sub { font-size: .9rem; color: var(--muted); margin: 0; }
.hero-art { display: block; width: min(574px, 48vw); height: auto; align-self: flex-end; }
@media (max-width: 760px) {
  .hero-row { flex-direction: column; align-items: stretch; gap: 0; min-height: 0; }
  .hero-text { padding: 18px 0 6px; }
  .hero-art { width: 100%; max-width: 574px; margin-left: auto; }
}
.cal-hint { margin: 0 0 8px; font-size: .9rem; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cal-hint .dot { margin: 0 0 0 6px; }

.flash { background: var(--gold-soft); border-bottom: 1px solid var(--gold); padding: 10px 0; font-weight: 700; }
.flash-err { background: var(--red-soft); border-color: var(--red); }
.offline-bar { background: var(--ink); color: #fff; padding: 6px 0; font-size: .9rem; }

/* ---------- Type ---------- */
.page-title { font: 900 clamp(1.65rem, 3.8vw, 2.4rem)/1.18 var(--display); color: var(--hedge); margin: 0 0 .4em; letter-spacing: -.01em; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 62ch; margin: 0 0 1.25rem; }
.section-title { font: 700 1.25rem/1.3 var(--display); color: var(--hedge); margin: 2rem 0 .75rem; }
.side-title { font: 900 1.15rem/1.3 var(--display); color: var(--hedge); margin: 0 0 .75rem; }
.prose p, .prose li { max-width: 68ch; }
.prose h2 { font: 700 1.25rem/1.3 var(--display); color: var(--hedge); margin: 2rem 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.empty { color: var(--muted); }
.note { background: var(--gold-soft); border-left: 4px solid var(--gold); padding: 10px 14px; border-radius: var(--radius-s); }
.note-warn { background: var(--red-soft); border-color: var(--red); }
.err { color: var(--danger); font-weight: 700; }
.err-box { background: var(--red-soft); border-left: 4px solid var(--red); padding: 10px 16px; border-radius: var(--radius-s); margin-bottom: 1rem; }
.err-box ul { margin: .25rem 0; padding-left: 1.2rem; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 7px 0; border-bottom: 1px solid var(--line); }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 700 1rem/1 var(--body); color: #fff; background: var(--hedge);
  border: 2px solid var(--hedge); border-radius: 10px;
  padding: 11px 16px; min-height: 44px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--hedge-2); color: #fff; }
.btn-ghost { background: transparent; color: var(--hedge); }
.btn-ghost:hover { background: var(--paper); color: var(--hedge); }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-2); border-color: var(--red-2); color: #fff; }
.btn-icon { width: 18px; height: 18px; flex: none; }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-lg { font-size: 1.1rem; padding: 14px 22px; }
.btn-sm { min-height: 34px; padding: 6px 10px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: progress; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .875rem; }
.link-btn:hover { color: var(--red); }
.icon-btn { background: none; border: 0; font-size: 1.8rem; line-height: 1; width: 44px; height: 44px; cursor: pointer; color: var(--ink); border-radius: var(--radius-s); }
.icon-btn:hover { background: var(--field); }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label, fieldset legend, .rate-label { font-weight: 700; }
.hint { font-size: .875rem; color: var(--muted); margin: 0; }
input[type=text], input[type=email], input[type=url], input[type=search], input[type=date], input[type=time], input[type=password], input[type=number], input:not([type]), input[type=tel], select, textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 2px solid var(--line); border-radius: var(--radius-s);
  padding: 10px 12px; min-height: 46px; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--hedge); outline: none; box-shadow: 0 0 0 3px var(--gold-soft); }
textarea { resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
fieldset > legend { font: 700 1.1rem/1.3 var(--display); color: var(--hedge); margin-bottom: .6rem; padding: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field-wide { grid-column: 1 / -1; }
.field-btns { flex-direction: row; align-items: flex-end; gap: 8px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: .95rem; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--hedge); }
.radios label { display: flex; gap: 10px; align-items: center; padding: 6px 0; font-weight: 400; }
.radios input { width: 20px; height: 20px; accent-color: var(--hedge); }
.search-row input { flex: 1; min-width: 0; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px; box-shadow: var(--shadow); }
.card.danger { border-color: var(--red); margin-top: 2rem; }
.auth { margin-top: 2rem; }
.code-input { font: 700 2rem/1 var(--body); letter-spacing: .3em; text-align: center; }
.form-msg { font-size: .95rem; color: var(--muted); }
.cf-turnstile { min-height: 65px; margin: 8px 0; }

/* ---------- Tags ---------- */
.tag { display: inline-block; font: 700 .78rem/1 var(--body); padding: 4px 7px; border-radius: 3px; vertical-align: middle; }
.tag-fair { background: var(--red-soft); color: var(--red); }
.tag-event { background: var(--blue-soft); color: var(--blue); }
.tag-lg { font-size: .9rem; padding: 6px 9px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot-fair { background: var(--red); }
.dot-event { background: var(--blue); }
.unv { font-size: .78rem; color: var(--warn); border: 1px dashed var(--warn); border-radius: 3px; padding: 1px 5px; margin-left: 4px; white-space: nowrap; }
.feat { font-size: .78rem; background: var(--gold); color: var(--ink); border-radius: 3px; padding: 2px 6px; margin-left: 4px; font-weight: 700; }
.live { color: var(--ok); }
.warn { color: var(--danger); }
.pill { font-size: .75rem; padding: 2px 8px; border-radius: 99px; background: var(--field); border: 1px solid var(--line); }
.pill-approved { background: #dff0e3; border-color: #9ccaa7; }
.pill-pending { background: var(--gold-soft); border-color: var(--gold); }
.pill-rejected, .pill-disabled { background: var(--red-soft); border-color: #e3a3a6; }

/* ---------- Calendar layout ---------- */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 980px) { .cal-layout { grid-template-columns: 1fr; } }
.cal { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px; box-shadow: var(--shadow); }
.cal-intro .page-title { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .2em; }
.cal-intro .lede { font-size: 1rem; margin-bottom: 1rem; }

.cal-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding-top: 4px; }
/* The memorable thing: the month in big wood-type, like a fair poster */
.cal-month {
  margin: 0; text-align: center; white-space: nowrap;
  font: 900 clamp(1.5rem, 4.4vw, 2.6rem)/1.15 var(--display);
  color: var(--hedge); letter-spacing: -.01em;
}
.cal-year { color: var(--tan); }
.cal-nav { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font: 600 .95rem/1 var(--body); color: var(--hedge); padding: 10px 12px; border: 1px solid var(--line); background: var(--paper); border-radius: 99px; min-height: 44px; }
.cal-nav span[aria-hidden] { font-size: 1.6rem; line-height: .6; }
.cal-nav:hover { border-color: var(--hedge); color: var(--hedge); }
@media (max-width: 560px) { .cal-nav-txt { display: none; } }
.cal-legend { display: flex; gap: 16px; align-items: center; font-size: .85rem; color: var(--muted); margin: 10px 0 8px; }
.cal-today { margin-left: auto; font-weight: 700; }

.cal-grid { border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; background: var(--line); display: grid; gap: 1px; }
.cal-grid.is-loading { opacity: .6; }
.cal-dow, .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-dow span { background: var(--hedge); color: #fff; text-align: center; font: 600 .8rem/1 var(--body); padding: 9px 0; letter-spacing: .03em; }
.day { position: relative; background: #fff; min-height: 104px; padding: 4px 5px 6px; display: flex; flex-direction: column; gap: 3px; }
.day-out { background: #FAF4E8; }
.day-out .day-num { color: #9aa59d; }
.day-past:not(.day-out) { background: #fafbf8; }
.day-num { font: 700 1.05rem/1 var(--display); color: var(--ink); }
.day-today { box-shadow: inset 0 0 0 3px var(--gold); }
.day-today .day-num { background: var(--gold); border-radius: 99px; padding: 3px 7px; align-self: flex-start; }
.day-has { cursor: pointer; }
.day-has:hover { background: #f8faf5; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; position: relative; z-index: 2; }
.chip a {
  display: block; font-size: .76rem; font-weight: 700; line-height: 1.2;
  padding: 3px 5px; border-radius: 3px; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chip-fair a { background: var(--red); color: #fff; }
.chip-event a { background: var(--blue); color: #fff; }
.chip-cont a { opacity: .78; border-left: 3px solid rgba(255,255,255,.6); }
.chip-off a { text-decoration: line-through; opacity: .6; }
.chip a:hover { filter: brightness(1.12); color: #fff; }
.chip-more { font-size: .74rem; color: var(--muted); font-weight: 700; padding-left: 2px; }
.day-open { position: absolute; inset: 0; background: transparent; border: 0; cursor: pointer; z-index: 1; }
.day-open:focus-visible { outline-offset: -3px; }

/* Phones: cells shrink to dots, tap opens the day sheet */
@media (max-width: 640px) {
  .cal { padding: 12px; border-radius: 0; margin: 0 -16px; border-left: 0; border-right: 0; }
  .day { min-height: 58px; padding: 3px; align-items: center; }
  .day-num { font-size: 1.2rem; }
  .chips { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 3px; z-index: 0; }
  .chip a { width: 9px; height: 9px; padding: 0; border-radius: 50%; font-size: 0; pointer-events: none; }
  .chip-cont a { border: 0; opacity: .55; }
  .chip-more { font-size: .65rem; }
  .day-open { z-index: 3; }
  .cal-dow span { font-size: .8rem; }
}

.month-list { margin-top: 8px; }
.month-list .section-title { font-size: 1.25rem; }
.month-list li { font-size: .95rem; }

/* ---------- Sidebar ---------- */
.side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
@media (max-width: 980px) { .side { position: static; } }
.side-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px; box-shadow: var(--shadow); }
.side-box .btn-block { margin-top: 14px; }
.side-search { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px; }
.side-search label { display: block; font-weight: 700; margin-bottom: 8px; }
.side-search input { flex: 1; min-width: 0; }
.side-search .row { flex-wrap: nowrap; }

.up-list { list-style: none; margin: 0; padding: 0; }
.up { display: grid; grid-template-columns: 58px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.up:last-child { border-bottom: 0; }
.up-featured { background: linear-gradient(90deg, var(--gold-soft), transparent 70%); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: var(--radius-s); }
.up-date, .date-badge { display: flex; flex-direction: column; align-items: center; border: 2px solid var(--red); border-radius: 10px; width: 58px; height: 66px; background: #fff; overflow: hidden; flex: none; }
.up-w { display: block; width: 100%; background: var(--red); color: #fff; text-align: center; font: 700 .68rem/1 var(--body); letter-spacing: .06em; padding: 4px 0 3px; }
.up-on { border-color: var(--hedge); }
.up-on .up-w { background: var(--hedge); }
.up-d { font: 900 1.45rem/1.15 var(--display); color: var(--red); margin-top: 3px; }
.up-on .up-d, .up-on .up-m { color: var(--hedge); }
.up-m { font: 700 .68rem/1 var(--body); color: var(--red); letter-spacing: .08em; }
.up-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.up-name { font: 700 .98rem/1.3 var(--display); color: var(--hedge); text-decoration: none; }
.up-name:hover { text-decoration: underline; color: var(--hedge); }
.up-meta, .up-when { font-size: .85rem; color: var(--muted); }

.sponsor { margin-bottom: 16px; text-align: center; }
.sponsor img { display: block; margin: 0 auto; border-radius: var(--radius-s); max-height: 90px; width: auto; }
.sponsor-label, .ad-label { display: block; font-size: .72rem; color: var(--muted); margin-top: 4px; }
.ad { min-height: 280px; background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius-m); padding: 8px; }
.ad-inline { min-height: 120px; margin: 24px 0; }
.ad-label { margin: 0 0 4px; }

/* ---------- Sheets & modals ---------- */
dialog { border: 0; padding: 0; color: var(--ink); background: var(--paper); }
dialog::backdrop { background: rgba(15, 25, 19, .55); }
.sheet, .modal { width: min(560px, calc(100vw - 24px)); border-radius: var(--radius-m); max-height: 88vh; }
.sheet-inner, .modal-inner { padding: 18px 20px 22px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.sheet-head h2 { font: 900 1.25rem/1.25 var(--display); color: var(--hedge); margin: 0; }
.sheet-list { list-style: none; margin: 0; padding: 0; }
.sheet-list li a { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding: 12px; border: 2px solid var(--line); border-radius: var(--radius-s); margin-bottom: 8px; text-decoration: none; color: var(--ink); }
.sheet-list li a:hover { border-color: var(--hedge); }
.sheet-list .s-name { font-weight: 700; font-size: 1.05rem; }
.sheet-list .s-meta { grid-column: 2; font-size: .85rem; color: var(--muted); }
@media (max-width: 640px) {
  .sheet { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 14px 14px 0 0; padding-bottom: env(safe-area-inset-bottom); }
}
@media (prefers-reduced-motion: no-preference) {
  .sheet[open] { animation: sheet-up .22s ease-out; }
  @keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } }
}

/* ---------- Listing page ---------- */
.crumbs { font-size: .875rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.lhead { margin-bottom: 16px; }
.ltitle { font: 900 clamp(1.75rem, 4.6vw, 2.7rem)/1.15 var(--display); color: var(--hedge); margin: 10px 0 4px; letter-spacing: -.01em; }
.lplace { font-size: 1.15rem; color: var(--muted); margin: 0; }
.lrating { margin: 6px 0 0; font-size: .95rem; }
.stars { --r: 0; display: inline-block; font-size: 1.1rem; letter-spacing: 2px; background: linear-gradient(90deg, var(--gold) calc(var(--r) / 5 * 100%), var(--line) 0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stars::before { content: "★★★★★"; }
.lgrid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
@media (max-width: 980px) { .lgrid { grid-template-columns: 1fr; } }
.lside { display: flex; flex-direction: column; gap: 16px; }

.facts { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px 20px; box-shadow: var(--shadow); }
.when-date { font: 900 clamp(1.3rem, 3.4vw, 1.8rem)/1.25 var(--display); margin: 0 0 4px; color: var(--hedge); }
.when-time { font-size: 1.05rem; margin: 0 0 6px; }
.when-past { color: var(--warn); font-weight: 700; }
.ok-badge { color: var(--ok); font-weight: 700; margin: 6px 0; }
.ok-badge::before { content: "✓ "; }
.unv-badge { color: var(--warn); font-weight: 700; margin: 6px 0; }
.status { font-weight: 700; padding: 8px 12px; border-radius: var(--radius-s); background: var(--red-soft); color: var(--danger); margin: 0 0 10px; }
.fact-list { display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px; margin: 14px 0; }
.fact-list dt { font-weight: 700; color: var(--muted); }
.fact-list dd { margin: 0; }
.fact-list-wide { grid-template-columns: 150px 1fr; }
@media (max-width: 480px) { .fact-list, .fact-list-wide { grid-template-columns: 1fr; gap: 2px; } .fact-list dd { margin-bottom: 10px; } }
.eir { font-weight: 700; letter-spacing: .03em; }
.fact-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.map-wrap { margin: 18px 0; }
.map { height: 320px; border: 1px solid var(--line); border-radius: var(--radius-m); background: #dfe6da; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.map.leaflet-container { display: block; }
.map-fallback { color: var(--muted); padding: 1rem; text-align: center; }
.map-edit { height: 340px; margin: 10px 0; }
.map-hint { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }
@media (max-width: 640px) { .map { height: 300px; } }
.map-recenter { background: #fff; border: 2px solid rgba(0,0,0,.25); border-radius: 4px; padding: 6px 10px; font: 700 .85rem var(--body); cursor: pointer; }
.pop-dirs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pop-dirs .btn { color: #fff; }
.pop-dirs .btn-ghost { color: var(--hedge); }
.leaflet-container .leaflet-control-zoom a { width: 36px; height: 36px; line-height: 36px; font-size: 20px; }
.dir { position: relative; }
.dir summary { list-style: none; }
.dir summary::-webkit-details-marker { display: none; }
.dir summary::after { content: ""; border: 5px solid transparent; border-top-color: currentColor; margin: 5px 0 0 4px; }
.dir-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 190px; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius-s); box-shadow: 0 8px 24px rgba(15,25,19,.2); padding: 4px; }
.dir-menu a { display: block; padding: 12px 14px; font-weight: 700; text-decoration: none; color: var(--ink); border-radius: 3px; }
.dir-menu a:hover, .dir-menu a:focus { background: var(--field); }

.year-line { list-style: none; display: flex; gap: 0; padding: 6px 0 0; margin: 0 0 10px; overflow-x: auto; background: linear-gradient(var(--ink), var(--ink)) left 10px / 100% 3px no-repeat; }
.year-line li { flex: none; }
.year-line a { display: flex; flex-direction: column; padding: 20px 16px 8px; text-decoration: none; color: var(--ink); border-right: 1px solid var(--line); position: relative; }
.year-line a::before { content: ""; position: absolute; top: -1px; left: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); }
.year-line .cur a::before { background: var(--gold); }
.year-line .past a { color: var(--muted); }
.yl-y { font: 900 1.15rem/1.1 var(--display); }
.yl-d { font-size: .8rem; }
.year-line .cur a { background: var(--paper); }

.sub-list { list-style: none; padding: 0; margin: 0 0 12px; }
.sub-list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-left: 4px solid var(--blue); background: var(--paper); margin-bottom: 6px; border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.sub-list li span { color: var(--muted); font-size: .9rem; white-space: nowrap; }

.media-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.media-head .section-title { margin-bottom: 0; }
.media-y { font: 700 1.05rem/1.2 var(--display); color: var(--peat); margin: 1.25rem 0 .6rem; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.img-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.img-grid a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-s); background: #dfe6da; }
.img-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid-grid { list-style: none; padding: 0; margin: 0 0 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.vid { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius-s); overflow: hidden; aspect-ratio: 16/9; background: var(--ink); cursor: pointer; }
.vid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid-play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; background: rgba(23,34,27,.75); border: 3px solid #fff; }
.vid-play::after { content: ""; position: absolute; left: 25px; top: 18px; border-left: 20px solid #fff; border-top: 12px solid transparent; border-bottom: 12px solid transparent; }
.vid-dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.7); color: #fff; font-size: .8rem; padding: 2px 6px; border-radius: 3px; }
.vid iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cap { font-size: .875rem; margin: 6px 0 0; }
.by { color: var(--muted); }

.rate { margin-bottom: 18px; }
.rate-stars { display: flex; gap: 2px; }
.rate-stars button { font-size: 2.1rem; line-height: 1; background: none; border: 0; padding: 4px; color: var(--line); cursor: pointer; min-width: 44px; min-height: 44px; }
.rate-stars button.on, .rate-stars button:hover, .rate-stars button:hover ~ button.on { color: var(--gold); }
.rate-stars:hover button { color: var(--gold); }
.rate-stars button:hover ~ button { color: var(--line); }
.rate-msg { font-size: .9rem; color: var(--muted); margin: 4px 0 0; min-height: 1.2em; }
.comment-form textarea { margin: 6px 0 10px; }
.comments { list-style: none; padding: 0; margin: 18px 0 0; }
.comments li { padding: 12px 0; border-top: 1px solid var(--line); }
.c-meta { margin: 0 0 4px; font-size: .9rem; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.c-meta time { color: var(--muted); }
.c-body p { margin: 0 0 .5em; }

.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 8px 0 0; max-width: 68ch; }
.contrib details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 16px; margin-bottom: 12px; }
.contrib summary { font-weight: 700; cursor: pointer; }
.contrib form { margin-top: 12px; }
.contrib-links { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: .9rem; }
.updated { font-size: .85rem; color: var(--muted); }

/* Upload progress */
.progress { margin: 14px 0; }
.bar { height: 12px; background: var(--field); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--hedge), var(--ok)); transition: width .2s; }
.progress-txt { font-size: .9rem; margin: 6px 0; font-weight: 700; }
.file-list { list-style: none; padding: 0; margin: 0; max-height: 200px; overflow: auto; font-size: .85rem; }
.file-list li { display: grid; grid-template-columns: 1fr 70px 80px; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); }
.file-list .fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .fb { height: 6px; background: var(--field); border-radius: 9px; overflow: hidden; }
.file-list .fb i { display: block; height: 100%; width: 0; background: var(--hedge); }
.file-list .fs { text-align: right; color: var(--muted); }
.file-list .done .fs { color: var(--ok); font-weight: 700; }
.file-list .fail .fs { color: var(--danger); font-weight: 700; }

/* Lightbox */
.lightbox { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; background: rgba(10,16,12,.95); display: none; align-items: center; justify-content: center; }
.lightbox[open] { display: flex; }
.lightbox figure { margin: 0; max-width: 92vw; text-align: center; }
.lightbox img { max-height: 82vh; max-width: 92vw; object-fit: contain; }
.lightbox figcaption { color: #e9ede4; margin-top: 8px; font-size: .9rem; }
.lb-close { position: absolute; top: 10px; right: 10px; color: #fff; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.12); border: 0; color: #fff; font-size: 2.4rem; width: 52px; height: 72px; cursor: pointer; border-radius: var(--radius-s); }
.lb-prev { left: 8px; } .lb-next { right: 8px; }

/* ---------- Submit form ---------- */
.submit-form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 22px; }
.type-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.type-pick legend { grid-column: 1 / -1; }
@media (max-width: 560px) { .type-pick { grid-template-columns: 1fr; } }
.type-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 2px solid var(--line); border-radius: var(--radius-m); cursor: pointer; background: #fff; }
.type-card input { position: absolute; opacity: 0; }
.type-card:has(input:checked) { border-color: var(--hedge); box-shadow: inset 0 0 0 1px var(--hedge); background: #F3F8F4; }
.type-example { margin: -8px 0 18px; }
.type-card:has(input:focus-visible) { outline: 3px solid var(--gold); }
.type-name { font: 900 1.1rem/1.2 var(--display); color: var(--hedge); }
.type-desc { font-size: .9rem; color: var(--muted); }
.suggest { list-style: none; margin: 4px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-s); background: #fff; }
.suggest:empty { display: none; }
.suggest li button { display: block; width: 100%; text-align: left; padding: 10px 12px; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; cursor: pointer; }
.suggest li button:hover, .suggest li button:focus { background: var(--field); }
.parent-chosen { padding: 10px 12px; background: var(--blue-soft); border-radius: var(--radius-s); }

/* ---------- Misc pages ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.county-jump { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.county-jump a { padding: 6px 10px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-s); text-decoration: none; font-weight: 700; font-size: .9rem; }
.county-jump span { color: var(--muted); font-weight: 400; }
.az li { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.legal .tbl-wrap { overflow-x: auto; margin: 10px 0 16px; }
.tbl { width: 100%; border-collapse: collapse; background: var(--paper); font-size: .92rem; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { background: var(--field); font-weight: 700; }
.ok-card { border-color: var(--ok); }
.contact-cols aside { padding-top: 4px; }

/* Reminders */
.rem-box .small { margin: 0 0 12px; color: var(--muted); }
.reminders .rem-areas label { padding: 5px 0; }
.county-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 10px; max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 10px; margin: 6px 0 14px; background: #fff; }
.county-grid label { display: flex; gap: 6px; align-items: center; font-size: .92rem; padding: 4px 0; }
.county-grid input { width: 18px; height: 18px; accent-color: var(--hedge); }
@media (max-width: 420px) { .county-grid { grid-template-columns: 1fr 1fr; } }

/* AI finds */
.cand { border-left: 5px solid var(--line); }
.cand-high { border-left-color: var(--ok); }
.cand-medium { border-left-color: var(--gold); }
.cand-low { border-left-color: var(--red); }
.cand-imgs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.cand-imgs legend { font: 700 1rem var(--body); margin-bottom: 6px; }
.cand-imgs label { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; font-size: .8rem; }
.cand-imgs img { width: 140px; height: 100px; object-fit: cover; border-radius: var(--radius-s); background: var(--field); }
.agent-help pre { white-space: pre-wrap; font-size: .8rem; background: var(--field); padding: 10px; border-radius: var(--radius-s); overflow-x: auto; }

/* Year hub + guides */
.hub-years, .hub-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.hub-years a, .hub-jump a, .hub-none { padding: 6px 11px; border-radius: var(--radius-s); background: var(--paper); border: 1px solid var(--line); text-decoration: none; font-weight: 700; font-size: .95rem; }
.hub-years a[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }
.hub-jump a span { color: var(--red); font-weight: 700; }
.hub-none { color: #a3ada6; font-weight: 400; }
.hub-prov { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .9rem; }
.hub-month .section-title a { text-decoration: none; color: var(--ink); }
.hub-tbl td.hub-d { white-space: nowrap; font-weight: 700; }
@media (max-width: 640px) {
  .hub-tbl thead { display: none; }
  .hub-tbl tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .hub-tbl td { display: block; border: 0; padding: 2px 8px; }
  .hub-tbl td:nth-child(4) { color: var(--muted); font-size: .85rem; }
}
.guide-list { list-style: none; padding: 0; margin: 0; }
.guide-list li { background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: var(--radius-m); padding: 14px 18px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 2px; }
.guide-list strong { font: 700 1.1rem/1.3 var(--display); color: var(--hedge); }
.guide-list span { color: var(--muted); }
.guide h2 { font: 700 1.3rem/1.3 var(--display); color: var(--hedge); margin: 2rem 0 .5rem; }
.g-lede { font-size: 1.15rem; }
.g-check { list-style: none; padding-left: 0; }
.g-check li { padding-left: 30px; position: relative; margin-bottom: 6px; }
.g-check li::before { content: "✓"; position: absolute; left: 4px; color: var(--ok); font-weight: 700; }
.g-note { font-size: .9rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 12px; }
.g-up { margin: 28px 0; }
@media (max-width: 860px) { .nav .nav-guides { display: none; } }

/* How-to-use guide */
.howto-pdf { display: flex; gap: 8px; flex-wrap: wrap; }
.howto-toc ol { columns: 2; column-gap: 24px; padding-left: 1.3rem; margin: 18px 0 22px; }
.howto-toc li { margin-bottom: 4px; break-inside: avoid; }
@media (max-width: 560px) { .howto-toc ol { columns: 1; } }
.howto-sec { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); margin-bottom: 10px; }
.howto-sec summary { cursor: pointer; padding: 14px 18px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.howto-sec summary::-webkit-details-marker { display: none; }
.howto-sec summary::after { content: "+"; font: 700 1.6rem/1 var(--display); color: var(--red); }
.howto-sec[open] summary::after { content: "−"; }
.howto-sec summary h2 { font: 700 1.1rem/1.3 var(--display); color: var(--hedge); margin: 0; }
.howto-sec .prose { padding: 0 18px 14px; }
.howto-sec li { margin-bottom: 6px; }
.side-help { font-size: .9rem; text-align: center; margin: 12px 0 0; }

/* Ownership */
.owner-badge { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 0; padding: 4px 10px; border-radius: 99px; background: #E3F0E7; color: var(--hedge); font-weight: 600; font-size: .85rem; }
.claim-box { border-color: var(--tan); }
.manage-box { border-color: var(--hedge); background: #F3F8F4; }
.manage-box .row, .claim-box .row { margin: 0; }
.admin-box { border-style: dashed; }
.claim-ref { font: 900 2rem/1.1 var(--display); color: var(--red); letter-spacing: .08em; margin: 4px 0 12px; }
.claim-ref-sm { font: 700 .85rem var(--body); background: var(--red-soft); color: var(--red); padding: 3px 8px; border-radius: 6px; letter-spacing: .05em; vertical-align: middle; }
.claim-note { flex: 1 1 260px; min-width: 0; }
input.ro { background: var(--field); color: var(--muted); }

/* Admin */
.admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; background: var(--hedge); padding: 8px 10px; border-radius: var(--radius-m); margin: 0 0 18px; }
.admin-nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: .92rem; padding: 7px 11px; border-radius: 8px; }
.admin-nav a:hover, .admin-nav a[aria-current] { background: rgba(255,255,255,.14); color: #fff; }
.admin-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--paper); color: var(--hedge); font: 900 .9rem var(--display); padding: 4px 10px 4px 6px; border-radius: 8px; margin-right: 6px; }
.admin-out { margin-left: auto; }
.admin-out .link-btn { color: #DCE8DF; }
.dash { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0 0 18px; }
.dash-card { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); text-decoration: none; color: var(--muted); box-shadow: var(--shadow); }
.dash-n { font: 900 1.8rem/1 var(--display); color: var(--line); }
.dash-has { border-color: var(--red); color: var(--ink); }
.dash-has .dash-n { color: var(--red); }
.status-list { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 24px; }
@media (max-width: 640px) { .status-list { columns: 1; } }
.status-list li { display: flex; align-items: center; gap: 8px; padding: 5px 0; break-inside: avoid; }
.st-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); flex: none; }
.st-ok .st-dot { background: var(--hedge); }
.settings-form fieldset.card { margin-bottom: 14px; }
.settings-form legend { float: left; width: 100%; margin-bottom: 10px; }
.settings-form legend + * { clear: both; }
.settings-save { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--field) 35%); padding: 18px 0 12px; }
.admin-login { text-align: left; }
.admin-login-logo { margin: 0 0 6px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 3px solid var(--ink); margin-bottom: 16px; }
.tabs a { padding: 8px 12px; text-decoration: none; font-weight: 700; border-radius: var(--radius-s) var(--radius-s) 0 0; }
.tabs a[aria-current] { background: var(--ink); color: #fff; }
.count { background: var(--red); color: #fff; border-radius: 99px; padding: 1px 7px; font-size: .8rem; }
.mod-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; margin-bottom: 12px; }
.mod-card h2 { font: 700 1.05rem/1.3 var(--display); color: var(--hedge); margin: 0 0 4px; }
.mod-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mod-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-s); background: var(--field); }
.mod-vid { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: var(--radius-s); }
form.inline { display: inline; }
.diff ins { background: #dff0e3; text-decoration: none; }

/* ---------- Footer ---------- */
.site-foot { background: var(--hedge); color: #DCE8DF; padding: 36px 0 calc(16px + env(safe-area-inset-bottom)); margin-top: 48px; }
.site-foot a { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1.4fr 1fr; gap: 28px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand { font: 900 1.4rem/1 var(--display); color: #fff; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.foot-brand .brand-tld { color: var(--tan); }
.foot-badge { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: var(--paper); }
.foot-tag { color: #fff; font-weight: 600; margin: 0 0 8px; }
.foot-admin { opacity: .75; }
.foot-head { font: 700 1rem/1.2 var(--display); color: var(--gold); margin: 0 0 10px; }
.foot-counties a { display: inline-block; margin: 0 8px 6px 0; font-size: .9rem; }
.foot-links { list-style: none; padding: 0; margin: 0; }
.foot-links li { margin-bottom: 6px; }
.foot-legal { border-top: 1px solid var(--hedge-2); margin-top: 20px; padding-top: 14px; font-size: .85rem; }

/* ---------- Install the app: slim top banner + full-screen guide ---------- */
.pwa-top { display: flex; align-items: stretch; background: var(--gold); color: var(--ink); border-bottom: 1px solid #b8891a; padding-top: env(safe-area-inset-top); }
.pwa-top-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 7px 4px 7px 12px; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.pwa-top-main img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.pwa-top-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.pwa-top-text strong { font-size: .95rem; }
.pwa-top-text span { font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pwa-top-cta { flex: none; background: var(--hedge); color: #fff; font-weight: 700; font-size: .9rem; padding: 8px 14px; border-radius: var(--radius-s); }
.pwa-top-close { flex: none; width: 48px; background: none; border: 0; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pwa-top-close:hover, .pwa-top-main:hover .pwa-top-cta { filter: brightness(1.1); }
@media (prefers-reduced-motion: no-preference) {
  .pwa-top { animation: pwa-down .35s ease-out; }
  @keyframes pwa-down { from { transform: translateY(-100%); } }
}

html.pwa-lock, html.pwa-lock body { overflow: hidden; }
.pwa-guide { display: none; position: fixed; inset: 0; z-index: 100; background: #0f1d16; color: #fff; flex-direction: column; }
.pwa-guide.open { display: flex; }
.pwa-guide-head { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); }
.pwa-guide-head div { display: flex; flex-direction: column; }
.pwa-guide-head strong { font: 900 1.05rem/1.2 var(--display); }
.pwa-guide-head span { font-size: .85rem; color: rgba(255,255,255,.65); }
.pwa-guide-close { display: flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 99px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); color: #fff; font: 700 .9rem var(--body); cursor: pointer; min-height: 44px; }
.pwa-guide-close:hover { background: rgba(255,255,255,.22); }
.pwa-guide-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 16px; }
.pwa-guide-stage svg, .pwa-guide-img { max-width: min(100%, 340px); max-height: 100%; width: auto; height: 100%; object-fit: contain; border-radius: 16px; user-select: none; -webkit-user-drag: none; }
.pwa-guide-foot { flex: none; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 20px; padding-bottom: max(18px, env(safe-area-inset-bottom)); text-align: center; }
.pwa-guide-t { font: 900 1.3rem/1.25 var(--display); margin: 0; color: #fff; }
.pwa-guide-p { margin: 0; max-width: 42ch; color: #d6e0d9; min-height: 2.6em; }
.pwa-guide-dots { display: flex; gap: 7px; }
.pwa-guide-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.3); }
.pwa-guide-dots i.on { background: var(--gold); transform: scale(1.3); }
.pwa-guide-nav { display: flex; gap: 10px; width: 100%; max-width: 340px; }
.pwa-btn { flex: 1; min-height: 48px; border-radius: var(--radius-s); font: 700 1rem var(--body); cursor: pointer; border: 2px solid transparent; }
.pwa-btn-next { background: #fff; color: var(--hedge); }
.pwa-btn-back { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.pwa-btn-back:disabled { opacity: .35; cursor: default; }
.pwa-btn-gold { flex: none; width: 100%; max-width: 340px; background: var(--gold); color: var(--ink); }
@media (max-height: 620px) { .pwa-guide-t { font-size: 1.3rem; } .pwa-guide-p { min-height: 0; font-size: .9rem; } }

/* Leaflet pin */
.hf-pin { background: none; border: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .site-head, .site-foot, .side, .lside, .media, .community, .contrib, .ad, .sponsor, .pwa-top, .pwa-guide, .no-print, .offline-bar, .skip { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  main { padding: 0; }
  .howto-sec { border: 0; border-top: 2px solid #17221b; border-radius: 0; break-inside: avoid-page; background: none; }
  .howto-sec summary { padding: 10px 0 4px; }
  .howto-sec summary::after { display: none; }
  .howto-sec .prose { padding: 0 0 6px; }
  .howto-toc { break-after: page; }
  a { color: inherit; }
}
