/* Golden hour (chosen 2026-10-24, purple warmed to aubergine the same day): a dusky aubergine-to-orange sunset with
   nearly square corners. Berry means all-gender (and yes), orange means gendered (and no), grey is unknown; red is
   only for a flag. */
:root {
  --bg: #fff6ee;
  --surface: #ffffff;
  --surface-2: #fbeee4;
  --ink: #2e1420;
  --muted: #7d6370;
  --line: #efdacd;
  --accent: #8c2f55;                 /* links, chosen buttons in a group */
  --accent-ink: #ffffff;
  --sunset: linear-gradient(90deg, #4a1838, #b8434f 55%, #f0913a);
  --sunset-btn: linear-gradient(90deg, #6b2346, #e06a35);
  --sunset-ink: #ffffff;
  --first: #e06a35;                  /* the nearest restroom's border */
  --all: #8c2f55;
  --gen: #e8862f;
  --bad: #c62828;
  --unk: #9b8f96;
  --code: #2e1420;
  --code-ink: #ffd27a;
  --r: 3px;                          /* cards, sheets, banners */
  --r-sm: 3px;                       /* buttons, tags, inputs */
  --shadow: 0 1px 2px rgb(46 20 32 / 7%), 0 4px 14px rgb(46 20 32 / 7%);
  --f: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1016;
    --surface: #2a1820;
    --surface-2: #35202a;
    --ink: #fbeee6;
    --muted: #c2a3ac;
    --line: #47293a;
    --accent: #e39ab6;
    --accent-ink: #1e1016;
    --sunset: linear-gradient(90deg, #3a1230, #8f3346 55%, #d27a2c);
    --sunset-btn: linear-gradient(90deg, #b0507a, #f08a3c);
    --sunset-ink: #1e1016;
    --first: #f08a3c;
    --all: #d77fa3;
    --gen: #f3a04f;
    --bad: #ff6b6b;
    --unk: #918590;
    --code: #ffd27a;
    --code-ink: #1e1016;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.45 var(--f); -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
button { font: inherit; }

.bar {
  position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--sunset); color: #fff;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; color: #fff; text-decoration: none; white-space: nowrap; }
.bar .btn { background: transparent; border-color: rgb(255 255 255 / 45%); color: #fff; }
.bar .btn.ghost { border-color: transparent; }
@media (max-width: 420px) {
  .bar { padding-left: 12px; padding-right: 12px; }
  .brand { font-size: 17px; gap: 6px; }
  .bar-r .btn { padding: 0 10px; }
}
.badge { font: 700 11px var(--f); letter-spacing: .06em; text-transform: uppercase; color: #fff; border: 1px solid rgb(255 255 255 / 70%); border-radius: var(--r-sm); padding: 1px 7px; }
.bar-r { display: flex; gap: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn.primary { background: var(--sunset-btn); border-color: transparent; color: var(--sunset-ink); }
.btn.ghost { border-color: transparent; background: none; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible, .seg button:focus-visible, input:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }

main { max-width: 1100px; margin: 0 auto; }
.mapwrap { position: relative; }
#map { height: 42vh; min-height: 260px; background: var(--surface-2); }
.here-btn { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); box-shadow: var(--shadow); }
.panel { padding: 14px 16px 24px; display: grid; gap: 12px; }
@media (min-width: 900px) {
  main { display: grid; grid-template-columns: 1fr 440px; height: calc(100vh - 61px); }
  .mapwrap { order: 2; }
  #map { height: 100%; }
  .panel { overflow: auto; }
}

.where { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.where .acts { display: flex; gap: 8px; }
.banner { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--bad) 40%, var(--line)); border-radius: var(--r); padding: 10px 14px; }
.list { display: grid; gap: 10px; }
.none { color: var(--muted); text-align: center; padding: 24px 8px; }
.credit { font-size: 12px; color: var(--muted); margin: 4px 0 0; }

.rr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 8px; scroll-margin: 80px; }
.rr.first { border: 2px solid var(--first); }
.rr.sel { outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.rr.gone { opacity: .7; }
.rr-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; cursor: pointer; background: none; border: 0; padding: 0; color: inherit; text-align: left; width: 100%; }
.rr-h b { font-size: 17px; }
.rr.first .rr-h b { font-size: 19px; }
.far { white-space: nowrap; color: var(--muted); font-size: 14px; }
.rr.first .far { color: var(--ink); font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tg { font-size: 13px; font-weight: 500; border-radius: var(--r-sm); padding: 3px 10px; border: 1px solid var(--line); background: var(--surface-2); }
.tg.yes { background: color-mix(in srgb, var(--all) 18%, var(--surface)); border-color: color-mix(in srgb, var(--all) 55%, var(--line)); }
.tg.no { background: color-mix(in srgb, var(--gen) 18%, var(--surface)); border-color: color-mix(in srgb, var(--gen) 55%, var(--line)); }
.tg.unk { color: var(--muted); border-style: dashed; background: none; }
.tg.flag { background: color-mix(in srgb, var(--bad) 18%, var(--surface)); border-color: var(--bad); font-weight: 600; }
.tg.code { font-family: ui-monospace, Menlo, monospace; font-weight: 700; background: var(--code); border-color: var(--code); color: var(--code-ink); }
.meta { font-size: 13px; color: var(--muted); }
.note { font-size: 14px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }

.ed { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.seg span { font-size: 13px; color: var(--muted); min-width: 84px; }
.seg button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-sm); padding: 0 12px; min-height: 38px; cursor: pointer; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
input[type=text] { font: 16px var(--f); color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 12px; min-height: 44px; min-width: 0; flex: 1 1 160px; }

dialog { border: 0; padding: 0; border-radius: var(--r); background: var(--surface); color: var(--ink); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: 0 10px 40px rgb(0 0 0 / 30%); }
dialog::backdrop { background: rgb(20 17 31 / 45%); }
.sheet { padding: 18px 20px 22px; display: grid; gap: 12px; }
.sheet-h { display: flex; justify-content: space-between; align-items: center; }
.sheet-h h2 { margin: 0; font-size: 20px; }
.x { border: 0; background: none; font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.prose h3 { font-size: 15px; margin: 16px 0 4px; }
.prose p, .prose ul { margin: 6px 0; }
.prose ul { padding-left: 20px; }
.stack { display: grid; gap: 10px; }
.hint { font-size: 14px; color: var(--muted); margin: 0; }
.linkbox { font-family: ui-monospace, Menlo, monospace; font-size: 13px; word-break: break-all; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; }

.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r-sm); font-size: 14px; text-align: center; max-width: calc(100vw - 32px); box-shadow: var(--shadow); }
.maplibregl-ctrl-attrib { font-size: 11px; }
