/* Urbexpedition — shared styles. Night palette: concrete greys with a sodium-vapor streetlight accent. */
:root {
  --bg: #0f1113;
  --panel: #171a1d;
  --panel-2: #1f2327;
  --line: #2c3136;
  --fg: #e6e2da;
  --muted: #8d918f;
  --accent: #e8a33d;
  --accent-ink: #1a1206;
  --ok: #7fb58a;
  --warn: #e0c25a;
  --bad: #d9705f;
  --info: #7fa6c9;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* One text font across the site: what used to be the monospace (numbers, small labels) now uses the body font,
     with even-width digits so counts and distances still line up. Headings keep the display font. */
  --mono: var(--body);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.6 var(--body); min-height: 100vh; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
h1, h2 { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; line-height: 1; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(36px, 6vw, 56px); overflow-wrap: anywhere; }
h2 { font-size: 28px; }
h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
p { margin: 0; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* ---- Site nav ---- */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 1000;
  display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap;
  padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { font: 800 24px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; color: var(--fg); text-decoration: none; }
.brand span { color: var(--accent); }
.brand { display: inline-flex; align-items: center; }
.brand-mark { width: 34px; height: 34px; flex: none; margin: -6px 4px -6px -4px; }
.nav-links { display: flex; gap: 2px; flex-wrap: wrap; }
.nav-links a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 6px; font-size: 14px; }
.nav-links a:hover { color: var(--fg); background: var(--panel-2); }
.nav-links a { position: relative; }
.nav-links a[aria-current="page"] { color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.nav-links a[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 1px; height: 2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 8px 1px color-mix(in srgb, var(--accent) 70%, transparent); }
.nav-account { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Invite friends: a glowing tab so the invite link is one tap away (desktop: in the links; phones: a short pill by the avatar). */
.nav-invite { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: .01em; text-decoration: none;
  color: var(--accent-ink, #14100a); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff) 0%, var(--accent) 60%, color-mix(in srgb, var(--accent) 80%, #000) 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 70%, #fff); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent), 0 0 14px 2px color-mix(in srgb, var(--accent) 45%, transparent);
  animation: invGlow 2.4s ease-in-out infinite; white-space: nowrap; }
.nav-links a.nav-invite { color: var(--accent-ink, #14100a); padding: 5px 11px; margin-left: 4px; }
.nav-links a.nav-invite:hover, .nav-invite:hover, .nav-invite:focus-visible { color: var(--accent-ink, #14100a); background: linear-gradient(180deg, #fff3 0%, transparent 100%), var(--accent); filter: brightness(1.08); outline: none; }
.nav-links a.nav-invite[aria-current="page"]::after { display: none; }
.nav-invite svg { width: 15px; height: 15px; }
.nav-invite-sm { display: none; }
@keyframes invGlow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent), 0 0 10px 1px color-mix(in srgb, var(--accent) 35%, transparent); }
  50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent), 0 0 22px 4px color-mix(in srgb, var(--accent) 60%, transparent); } }
.reduce-motion .nav-invite { animation: none; }
@media (prefers-reduced-motion: reduce) { .nav-invite { animation: none; } }
.acct { display: flex; align-items: center; gap: 8px; color: var(--fg); text-decoration: none; font-size: 14px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font: 600 13px var(--mono); color: var(--accent-ink); background: var(--accent);
}
.avatar.lg { width: 72px; height: 72px; font-size: 26px; }
.badge-tier { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }
.badge-tier.premium { border-color: var(--accent); color: var(--accent); }

.demo-switch { display: inline-flex; align-items: center; gap: 6px; font: 500 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--bg); }
.seg button { border: 0; background: none; padding: 3px 10px; border-radius: 999px; font: 500 12px var(--body); color: var(--muted); text-transform: none; letter-spacing: 0; }
.seg button[aria-pressed="true"] { background: var(--panel-2); color: var(--fg); }
.seg button[data-tier="premium"][aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ---- Common pieces ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--fg);
  border: 1px solid var(--line); background: var(--panel-2); padding: 8px 13px; border-radius: 6px; font-size: 14px;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn { background: none; border: 0; color: var(--muted); padding: 2px 7px; border-radius: 4px; }
.icon-btn:hover { color: var(--fg); background: var(--panel-2); }
.icon-btn:disabled { opacity: .3; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; font: 500 11px var(--mono); text-transform: uppercase;
  letter-spacing: .06em; padding: 2px 8px; border-radius: 4px; border: 1px solid currentColor; white-space: nowrap; align-self: start;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-abandoned { color: var(--ok); }
.st-demolishing { color: var(--bad); }
.st-reused { color: var(--info); }
.st-uncertain { color: var(--warn); }
.st-demolished { color: var(--muted); }
.st-pending { color: var(--warn); }
.st-approved { color: var(--ok); }
.st-rejected { color: var(--bad); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.notice { border: 1px dashed var(--line); border-radius: 8px; padding: 14px; background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.notice b { color: var(--accent); }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--fg); color: var(--bg); padding: 9px 14px; border-radius: 6px; font-size: 14px; z-index: 3000; max-width: calc(100% - 32px);
}

/* ---- Content pages ---- */
.page { max-width: 1040px; margin: 0 auto; padding-inline: 16px; padding-block: 40px 64px; display: flex; flex-direction: column; gap: 32px; }
.page-head { display: flex; flex-direction: column; gap: 10px; }
.page-head p { color: var(--muted); max-width: 62ch; font-size: 16px; }
.prose { max-width: 68ch; display: flex; flex-direction: column; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }

.rule-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rule-list li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.rule-list li:last-child { border-bottom: 1px solid var(--line); }
.rule-list .n { font: 800 26px/1 var(--display); color: var(--accent); }
.rule-list b { display: block; margin-bottom: 2px; }
.rule-list p { color: var(--muted); }

table.compare { width: 100%; border-collapse: collapse; font-size: 15px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.compare th, .compare td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font: 800 22px/1 var(--display); text-transform: uppercase; letter-spacing: .03em; background: var(--panel); }
.compare thead th.prem { color: var(--accent); }
.compare tbody th { font-weight: 500; color: var(--muted); width: 38%; }
.compare tr:last-child td, .compare tr:last-child th { border-bottom: 0; }
@media (max-width: 480px) { table.compare { font-size: 13px; } .compare th, .compare td { padding: 9px 8px; overflow-wrap: break-word; hyphens: auto; } .compare tbody th { width: 34%; } .compare thead th { font-size: 17px; } }
h1, h2, h3 { overflow-wrap: break-word; }
.yes { color: var(--ok); }
.no { color: var(--muted); }

/* forms */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 500; }
.field .help { font-size: 13px; color: var(--muted); }
.input, .form select, .form textarea {
  width: 100%; padding: 9px 11px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg);
}
.form textarea { min-height: 110px; resize: vertical; }
/* Text boxes inside any .field or dialog get the site look too (low specificity, so page styles still win). */
:where(.field, .modal) :where(textarea, input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=submit], [type=button]), select) {
  width: 100%; padding: 9px 11px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); }
:where(.field, .modal) textarea { resize: vertical; min-height: 64px; }
:where(fieldset.field) { border: 0; padding: 0; margin: 0; min-width: 0; }
:where(fieldset.field) > legend { font-size: 13px; font-weight: 500; padding: 0; margin-bottom: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 4px; accent-color: var(--accent); }
.check > span { min-width: 0; }
.warn-text { color: var(--bad); font-size: 13px; }
.pick-map { height: 300px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }

/* profiles */
.explorer { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: var(--fg); }
.explorer:hover h2 { color: var(--accent); }
.explorer h2 { font-size: 22px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.stat { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--panel); }
.stat .v { font: 800 32px/1 var(--display); }
.stat .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: none; padding: 3px 10px; border-radius: 999px; font-size: 12px; color: var(--muted); }
.chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.rowlist { display: flex; flex-direction: column; }
.rowlist > * { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* ranks */
.rank { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .07em; padding: 2px 7px; border-radius: 4px; white-space: nowrap; border: 1px solid; }
.rank-scout      { color: var(--muted); border-color: var(--line); }
.rank-pathfinder { color: var(--fg); border-color: var(--muted); }
.rank-explorer   { color: var(--accent); border-color: var(--accent); }
.rank-veteran    { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.rank-legend     { color: var(--accent-ink); background: var(--fg); border-color: var(--fg); }
.progress { height: 8px; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); }
.count-dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font: 600 11px var(--mono); }
.rankup {
  position: fixed; left: 50%; top: calc(80px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 3000;
  width: min(420px, calc(100% - 32px)); background: var(--panel); border: 1px solid var(--accent); border-radius: 10px;
  padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 16px 50px rgba(0,0,0,.6); font-size: 16px;
}
.rankup button { align-self: flex-start; }

.ladder { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ladder li { display: grid; grid-template-columns: minmax(190px, auto) 1fr auto; gap: 6px 16px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.ladder li:last-child { border-bottom: 1px solid var(--line); }
.ladder .lname { font: 800 26px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.ladder li.done .lname { color: var(--accent); }
.ladder li.here { background: linear-gradient(90deg, rgba(232,163,61,.08), transparent); }
.ladder .reward { font-weight: 600; }
.ladder .state { font: 500 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; text-align: right; }
@media (max-width: 560px) { .ladder li { grid-template-columns: 1fr auto; } .ladder li > div:nth-child(2) { grid-column: 1 / -1; grid-row: 2; } }

.queue-item { border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--panel); }
.queue-item .meta { color: var(--muted); font-size: 13px; }
.queue-item .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.queue-item select { padding: 7px 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); }
.flag { color: var(--bad); font-size: 13px; }

/* nav bell, photos */
.bell { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; color: var(--muted); text-decoration: none;  background: transparent; border: 0; padding: 0; font: inherit; cursor: pointer; }
.bell:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bell[aria-expanded="true"] { color: var(--fg); background: var(--panel-2); }
.bell:hover, .bell[aria-current="page"] { color: var(--fg); background: var(--panel-2); }
.bell .count-dot { position: absolute; top: -2px; right: -4px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.photos button, .photos .thumb { padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--bg); aspect-ratio: 1; position: relative; }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos .rm { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; line-height: 1; }
.lightbox { position: fixed; inset: 0; z-index: 4000; background: rgba(5,6,7,.92); display: grid; place-items: center; padding: 24px; gap: 12px; grid-template-rows: 1fr auto; }
.lightbox:has(.photo-credit) { grid-template-rows: 1fr auto auto; }
.photo-credit { font-size: 12px; color: rgba(255,255,255,.75); text-align: center; max-width: 640px; overflow-wrap: anywhere; }
.photo-credit a { color: inherit; text-decoration: underline; }
.photo-credit-sm { display: block; font-size: 10px; line-height: 1.25; color: var(--muted); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.alert-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.alert-row .ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); font-size: 15px; }
.alert-row.unread .ic { background: var(--accent); color: var(--accent-ink); }
.alert-row.k-demolition .ic { background: var(--bad); color: var(--bg); }
.switch { display: flex; gap: 12px; align-items: flex-start; }
.switch input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); }

/* avatars, modals, profile banner, leaderboard, settings */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xl { width: 108px; height: 108px; font-size: 38px; border: 4px solid var(--bg); }
.modal-back { position: fixed; inset: 0; z-index: 3500; background: rgba(5,6,7,.75); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { width: min(460px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.reasons { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.install-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.banner { height: 120px; border-radius: 10px; position: relative; overflow: hidden; }
/* Photo frames: a ring drawn around the avatar. */
.pfp { position: relative; display: inline-grid; place-items: center; border-radius: 50%; flex: none; }
.pfp::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; pointer-events: none; }
.pfp.f-scout::after { border: 2px solid var(--muted); }
.pfp.f-pathfinder::after { border: 2px dashed var(--fg); }
.pfp.f-explorer::after { border: 3px solid var(--accent); }
.pfp.f-veteran::after { border: 2px solid var(--accent); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.pfp.f-legend::after { inset: -7px; background: repeating-conic-gradient(var(--accent) 0 8deg, var(--fg) 8deg 10deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); }
.pfp.f-caution::after { inset: -6px; background: repeating-linear-gradient(45deg, #f2c230 0 5px, #15171a 5px 10px);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); }
.pfp.f-monthly::after { inset: -6px; background: conic-gradient(#f7d774, #b8862b, #fff1b8, #c99a3a, #f7d774);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); }
.pfp.f-monthly::before { content: "★"; position: absolute; z-index: 1; bottom: -5px; right: -5px; width: 14px; height: 14px; border-radius: 50%;
  display: grid; place-items: center; font-size: 8px; line-height: 1; color: #3a2a06; background: #f7d774; box-shadow: 0 0 0 2px var(--bg); }
.pfp.f-monthly:has(.avatar.lg)::before, .pfp.f-monthly:has(.avatar.xl)::before { width: 24px; height: 24px; font-size: 13px; bottom: -4px; right: -2px; }
/* Passport frames: an inked rubber-stamp ring, and a gold one for every stamp verified */
.pfp.f-passport::after { inset: -6px; border-radius: 50%; border: 2px dashed #b3473a; box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 3.5px #b3473a; transform: rotate(-8deg); }
.pfp.f-passport::before, .pfp.f-goldstamp::before { content: "✓"; position: absolute; z-index: 1; bottom: -5px; right: -5px; width: 15px; height: 15px; border-radius: 50%;
  display: grid; place-items: center; font-size: 9px; line-height: 1; font-weight: 700; color: #fff; background: #b3473a; box-shadow: 0 0 0 2px var(--bg); transform: rotate(-12deg); }
.pfp.f-goldstamp::after { inset: -6px; border-radius: 50%; border: 2px solid #e2b84c; box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 3.5px #c99a3a, 0 0 8px rgba(226, 184, 76, .45); }
.pfp.f-goldstamp::before { content: "★"; color: #3a2a06; background: linear-gradient(135deg, #fff1b8, #e2b84c 55%, #b8862b); }
.pfp.f-passport:has(.avatar.lg)::before, .pfp.f-passport:has(.avatar.xl)::before, .pfp.f-goldstamp:has(.avatar.lg)::before, .pfp.f-goldstamp:has(.avatar.xl)::before { width: 24px; height: 24px; font-size: 13px; bottom: -4px; right: -2px; }
.profile-top { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin-top: -54px; padding-inline: 18px; position: relative; }
.profile-top > :where(:not(.avatar):not(.pfp)) { padding-top: 64px; }
@media (max-width: 560px) {
  .profile-top { align-items: flex-end; }
  .profile-top .profile-actions { padding-top: 0; margin-left: auto; }
  .profile-top .name-block { order: 3; flex: 1 1 100% !important; padding-top: 0; }
  .profile-top h1 { font-size: clamp(26px, 8vw, 40px); }
}
.featured { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.featured > * { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; background: var(--panel); text-decoration: none; color: var(--fg); min-width: 0; }
.featured a:hover { border-color: var(--accent); }
.board { width: 100%; border-collapse: collapse; }
.board td, .board th { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.board th { font: 600 12px var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.board .rank-n { font: 800 24px/1 var(--display); width: 56px; color: var(--muted); }
.board tr:nth-child(-n+3) .rank-n { color: var(--accent); }
.board .score { font: 800 26px/1 var(--display); text-align: right; }
.board tr.you { background: rgba(232,163,61,.08); }
.board .who { display: flex; gap: 10px; align-items: center; min-width: 0; }
.board .who a { color: var(--fg); font-weight: 600; text-decoration: none; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches label { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); cursor: pointer; }
.swatches input { position: absolute; opacity: 0; pointer-events: none; }
.swatches span.sw { width: 44px; height: 44px; border-radius: 8px; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.swatches input:checked + span.sw { border-color: var(--fg); }
.swatches input:focus-visible + span.sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.swatches .sw-custom { position: relative; overflow: hidden; }
.swatches .sw-custom input[type=color] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: auto; cursor: pointer; border: 0; padding: 0; }
.danger { border-color: var(--bad); }
.btn.danger { color: var(--bad); }
.btn.danger-fill { background: var(--bad); border-color: var(--bad); color: #1a0c0a; font-weight: 600; }

/* settings: pattern/frame tiles, theme cards */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.tiles label { display: flex; flex-direction: column; gap: 6px; align-items: center; font-size: 13px; text-align: center; cursor: pointer; }
.tiles label.locked { cursor: default; color: var(--muted); }
.tiles label small { font-size: 11px; color: var(--muted); line-height: 1.3; }
.tiles input { position: absolute; opacity: 0; pointer-events: none; }
.tiles .tile { width: 100%; height: 56px; border-radius: 8px; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.tiles input:checked + .tile { border-color: var(--fg); }
.tiles input:focus-visible + .tile { outline: 2px solid var(--accent); outline-offset: 2px; }
.frames-pick .frame-tile { height: 78px; display: grid; place-items: center; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.frames-pick label.locked .frame-tile { opacity: .45; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.theme-card { display: flex; flex-direction: column; gap: 6px; font-size: 13px; cursor: pointer; }
.theme-card input { position: absolute; opacity: 0; pointer-events: none; }
.theme-swatch { display: block; height: 76px; border-radius: 8px; border: 1px solid; padding: 10px; position: relative; }
.theme-swatch > span { display: flex; flex-direction: column; gap: 5px; height: 100%; border-radius: 5px; border: 1px solid; padding: 7px; }
.theme-swatch i { display: block; height: 5px; border-radius: 3px; }
.theme-swatch b { display: block; height: 10px; width: 46%; border-radius: 3px; margin-top: auto; }
.theme-card input:checked + .theme-swatch { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-card input:focus-visible + .theme-swatch { outline: 2px dashed var(--accent); outline-offset: 2px; }
.color-in { width: 64px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
#look-preview { border-radius: 10px; overflow: visible; }

/* Explorer of the Month card */
.prize { border: 1px solid var(--accent); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--panel)), var(--panel) 60%); }
.prize-head { display: flex; flex-direction: column; gap: 8px; }
.prize-head p { max-width: 70ch; }
.prize-places { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.prize-place { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.prize-place .muted { font-size: 12px; }
.mini-trophies { display: inline-flex; gap: 1px; vertical-align: -3px; }
.trophy-case { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.trophy { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 14px 8px 12px; border-radius: 10px;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--accent) 10%, var(--panel)), var(--panel) 70%); border: 1px solid var(--line); }
.trophy b { font-size: 14px; }
.trophy span { font-size: 12px; color: var(--muted); }
.trophy.is-hidden { opacity: .45; border-style: dashed; }
.prize-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1fr); gap: 18px; }
.prize-body > div { min-width: 0; }
.big-n { font: 800 44px/1 var(--display); margin-top: 6px; }
.who { display: flex; gap: 10px; align-items: center; min-width: 0; }
@media (max-width: 640px) { .prize-body { grid-template-columns: 1fr 1fr; } .prize-body > div:first-child { grid-column: 1 / -1; } }
.eyebrow { font: 500 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

/* built-in backup map */
.demo-town { display: flex; align-items: center; gap: 5px; pointer-events: none; font: 500 11px var(--body); color: var(--muted); white-space: nowrap; text-shadow: 0 1px 2px var(--bg); }
.demo-town i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.demo-town.big { color: var(--fg); font-size: 12px; font-weight: 600; }
.demo-town.big i { width: 7px; height: 7px; background: var(--fg); }
.demo-map-note { pointer-events: none; position: absolute; top: auto; bottom: 10px; max-width: calc(100% - 64px); left: 50%; transform: translateX(-50%); z-index: 6; background: var(--panel); border: 1px solid var(--line);
  color: var(--muted); font-size: 12px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; max-width: calc(100% - 100px); overflow: hidden; text-overflow: ellipsis; }

/* demo tour */
.tour { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 2500; }
.tour.open { width: min(320px, calc(100vw - 32px)); max-height: min(78vh, 680px); overflow-y: auto; background: var(--panel); border: 1px solid var(--accent);
  border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.45); }
@media (min-width: 761px) { .tour.on-map { left: 376px; } }
/* When the tour is open on a wide screen, slide page content right so the panel never covers it. */
@media (min-width: 900px) { body.tour-open .page { margin-left: max(352px, calc((100% - 1040px) / 2)); margin-right: auto; } }
/* Phones: leave room under the page for the tour button, and hide it while a spot panel is open. */
@media (max-width: 760px) { body:has(#tour:not(.open)) .site-foot { padding-bottom: 84px; } }
@media (max-width: 760px) { body:has(#detail:not([hidden])) #tour:not(.open) { display: none; } }
.tour-pill { border: 1px solid var(--accent); background: var(--panel); color: var(--fg); padding: 9px 14px; border-radius: 999px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.tour-pill:hover { background: var(--panel-2); }
.tour-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tour-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.tour-steps li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; padding: 5px 6px; border-radius: 6px; font-size: 14px; }
.tour-steps li a { color: var(--fg); text-decoration: none; }
.tour-steps li a:hover { color: var(--accent); text-decoration: underline; }
.tour-steps li .muted { font-size: 12px; }
.tour-steps .tick { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 12px; margin-top: 1px; }
.tour-steps li.ok .tick { background: var(--ok); border-color: var(--ok); color: var(--bg); font-weight: 700; }
.tour-steps li.ok a { color: var(--muted); text-decoration: line-through; }
.tour-steps li.next { background: var(--panel-2); }
.tour-steps li.next .tick { border-color: var(--accent); }
.tour-tools { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.tour-tools .btn { justify-content: center; }

/* comments */
.comments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.comments li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; overflow-wrap: anywhere; }
.comments .c-head { font-size: 13px; }
.comments .c-head a { color: var(--fg); font-weight: 600; text-decoration: none; }
.c-tools { margin-top: 2px; }
.c-form { display: flex; flex-direction: column; gap: 6px; }
.c-form textarea { width: 100%; min-height: 64px; resize: vertical; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); }
.c-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; font-size: 12px; cursor: pointer; }
/* badges */
.badge-medal { --b-bg: color-mix(in srgb, var(--accent) 22%, var(--panel)); --b-edge: var(--accent); --b-ink: var(--accent); flex: none; }
.badge-medal.locked { --b-bg: var(--panel-2); --b-edge: var(--line); --b-ink: var(--muted); }
.badge-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.badge-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.badge-card b { font-size: 14px; }
.badge-card span { font-size: 12px; color: var(--muted); }
.badge-card.locked b { color: var(--muted); }
.badge-card .progress { width: 100%; margin-top: 4px; }

/* sign in / sign up */
.gate { max-width: 560px; margin: 40px auto; gap: 14px; }
.auth-wrap { max-width: 480px; margin: 0 auto; width: 100%; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin: -20px -20px 0; }
.auth-tabs button { background: none; border: 0; padding: 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; }
.auth-tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.handle-field { position: relative; }
.handle-field .at { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.handle-field input { padding-left: 26px; }
.ok-text { color: var(--ok); font-size: 13px; }

.imp-table td { vertical-align: top; }
.imp-table select { padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); }

.site-foot { border-top: 1px solid var(--line); padding: 20px 16px; color: var(--muted); font-size: 13px; text-align: center; }

@media (max-width: 640px) {
  .nav { position: static; }
  .form { grid-template-columns: 1fr; }
  .nav-account .acct-name { display: none; }
}

/* ---------- Explorer tools ---------- */
.fresh { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.fresh::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.stale-tag { color: var(--warn); }
.hazards { display: flex; flex-wrap: wrap; gap: 6px; }
.hazard { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 8px; border-radius: 4px; border: 1px solid var(--warn); color: var(--warn); }
.hz-ic { flex: none; display: block; }
.hazard .hz-ic { width: 14px; height: 14px; }
.hz-chip { display: inline-flex; align-items: center; gap: 6px; }
.hz-chip .hz-ic { color: var(--warn); }
.hz-chip[aria-pressed="true"] .hz-ic { color: currentColor; }
.kv.kv-tight { padding: 0; border: 0; grid-template-columns: 96px 1fr; }
.bonus { font: 600 11px var(--mono); color: var(--accent-ink); background: var(--accent); padding: 1px 6px; border-radius: 4px; }
.side-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--line); }

/* Timeline */
.tl-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.tl-strip figure { margin: 0; flex: 0 0 auto; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.tl-strip button { padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: none; width: 120px; aspect-ratio: 4 / 3; }
.tl-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-strip b { color: var(--fg); }
.compare-wrap { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.compare-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare-wrap img.before { clip-path: inset(0 calc(100% - var(--p)) 0 0); }
.compare-wrap::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--p); width: 2px; background: var(--accent); pointer-events: none; }
div.compare { display: flex; flex-direction: column; gap: 6px; }
div.compare input { width: 100%; accent-color: var(--accent); margin: 0; }
.cmp-l, .cmp-r { position: absolute; top: 8px; font-size: 12px; background: rgba(0,0,0,.6); color: #fff; padding: 2px 6px; border-radius: 4px; }
.cmp-l { left: 8px; } .cmp-r { right: 8px; }
/* Faint viewer code over thumbnails (the full view bakes it into the image) */
.wm { position: relative; }
.wm::after { content: attr(data-wm); position: absolute; inset: 3px 4px auto auto; font: 600 9px var(--mono); color: rgba(255,255,255,.55); text-shadow: 0 0 2px rgba(0,0,0,.6); pointer-events: none; }
.lb-note { margin: 0; color: #cfcfcf; font-size: 12px; text-align: center; max-width: 60ch; }

/* Weather + videos */
.wx { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.wx li { display: grid; grid-template-columns: 40px 1fr auto auto; gap: 10px; align-items: baseline; }
.videos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.videos li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.vid-site { font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .06em; border: 1px solid var(--line); padding: 2px 6px; border-radius: 4px; color: var(--muted); }
.vid-form { display: flex; gap: 6px; flex-wrap: wrap; }
.vid-form .input { flex: 1 1 160px; min-width: 0; }

/* Safety check-in bar (all pages) */
.safety-bar { position: sticky; top: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 8px 16px; background: var(--panel-2); border-bottom: 2px solid var(--ok); font-size: 14px; }
.safety-bar.s-overdue { border-bottom-color: var(--warn); }
.safety-bar.s-notified { border-bottom-color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, var(--panel)); }
.sb-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sb-actions .btn { padding: 6px 12px; }

/* Passport stamps */
.stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.stamps figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); text-align: center; }
.stamp { color: var(--line); }
.stamp.on { color: var(--accent); }

/* Graveyard */
.graves { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.grave { display: flex; flex-direction: column; gap: 10px; }
.grave .art { aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); filter: grayscale(.85) contrast(1.05); }
.grave .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grave .years { font: 500 13px var(--mono); color: var(--muted); }
.candle { display: inline-flex; align-items: center; gap: 6px; }

/* Shared list rows */
.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mini-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mini-list li > :first-child { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.mini-list li > :last-child:not(:first-child) { flex-shrink: 0; margin-left: auto; white-space: nowrap; }
.mini-list li:last-child { border-bottom: 0; }
.dlg-body { display: flex; flex-direction: column; gap: 10px; }
fieldset.hazard-pick { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.hazard-pick legend { font-weight: 500; font-size: 14px; margin-bottom: 6px; padding: 0; }
.more-history summary { cursor: pointer; font-weight: 500; }
.email-preview { white-space: pre-wrap; font: 13px/1.5 var(--mono); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 12px; margin: 0; max-height: 50vh; overflow: auto; }

/* Bot check (Cloudflare Turnstile) on the sign-in page */
.captcha-slot { min-height: 65px; max-width: 100%; overflow: hidden; }

/* Premium plan picker */
.plans { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.plan { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--panel-2); }
.plan:has(input:checked) { border-color: var(--accent); }
.plan input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.plan-body { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex: 1; flex-wrap: wrap; }
.plan-name { font-weight: 600; }
.plan-save { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 2px 8px; }
.plan-price { font-size: 18px; }

/* ---- Toggle switches and filter chips (map filters, settings) ---- */
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.toggle { position: relative; width: 42px; height: 24px; flex: none; }
.toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.toggle span { position: absolute; inset: 0; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); transition: background .15s; pointer-events: none; }
.toggle span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.toggle input:checked + span { background: color-mix(in srgb, var(--accent) 35%, var(--panel-2)); border-color: var(--accent); }
.toggle input:checked + span::after { transform: translateX(18px); background: var(--accent); }
.toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchips button { border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 999px; padding: 5px 11px; font-size: 13px; }
.fchips button[aria-pressed="true"] { border-color: var(--accent); color: var(--fg); background: color-mix(in srgb, var(--accent) 16%, var(--bg)); }

/* ---- Fewer animations (Settings → Preferences, or the system setting) ---- */
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }

/* Settings → Preferences */
.pref-list { display: flex; flex-direction: column; }
.pref-list .pref { padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pref-list .pref:first-child { border-top: 0; }

/* Follows and social links */
.follow-counts { display: flex; gap: 14px; flex-wrap: wrap; align-items: baseline; font-size: 14px; }
.btn.social { display: inline-flex; gap: 6px; align-items: center; }
.social-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); background: var(--panel-2); }
.social-ic:hover { color: var(--accent); border-color: var(--accent); }

/* Small badge medals beside a name (profile header, Lamplighter cards). */
/* Hover (or focus) tooltips: <span class="tip" data-tip="…"> */
.tip { position: relative; display: inline-flex; align-items: center; cursor: default; outline-offset: 2px; }
.tip::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 9px); transform: translateX(-50%) translateY(4px); z-index: 60; width: max-content; max-width: 240px;
  padding: 7px 10px; border-radius: 8px; background: var(--fg); color: var(--bg); font: 500 12.5px/1.35 var(--body); letter-spacing: 0; text-transform: none; text-align: center; white-space: normal;
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.tip::before { content: ""; position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--fg); opacity: 0; pointer-events: none; transition: opacity .15s; }
.tip:hover::after, .tip:focus-visible::after, .tip:hover::before, .tip:focus-visible::before { opacity: 1; }
.tip:hover::after, .tip:focus-visible::after { transform: translateX(-50%) translateY(0); }
.badge-pins .tip { cursor: help; }
.profile-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 14px; }
.profile-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 860px) { .profile-row { grid-template-columns: 1fr; } }
.badge-pins { display: inline-flex; gap: 3px; align-items: center; vertical-align: middle; }
.badge-pins svg { display: block; }

/* What's new */
.whatsnew { width: min(560px, 100%); gap: 16px; }
.whatsnew .wn-head { display: flex; gap: 14px; align-items: center; }
.whatsnew .wn-head .brand-mark { width: 48px; height: 48px; color: var(--fg); flex: none; }
.whatsnew .wn-head h2 { margin: 2px 0 0; }
.wn-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: min(56vh, 520px); overflow-y: auto; }
.wn-list li { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; border-left: 2px solid var(--accent); }
.wn-list span { color: var(--muted); font-size: 14px; }
.wn-list li.wn-earlier { border-left-color: var(--line); }
.wn-earlier summary { cursor: pointer; font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wn-earlier .wn-list { max-height: none; overflow: visible; margin-top: 10px; }

/* Account menu */
.acct-menu { position: relative; }
.acct { background: none; border: 0; padding: 4px 6px; border-radius: 8px; cursor: pointer; font: inherit; }
.acct:hover, .acct[aria-expanded="true"] { background: var(--panel-2); }
.acct .caret { color: var(--muted); }
.acct-drop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 3000; min-width: 230px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.45); display: flex; flex-direction: column; }
.acct-drop[hidden] { display: none; }
.acct-drop a, .acct-drop button { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 8px;
  color: var(--fg); text-decoration: none; font: inherit; font-size: 14px; background: none; border: 0; text-align: left; cursor: pointer; }
.acct-drop a:hover, .acct-drop button:hover, .acct-drop a:focus-visible, .acct-drop button:focus-visible { background: var(--panel-2); outline: none; }
.acct-drop-head { display: flex; gap: 10px; align-items: center; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.acct-drop-head div { display: flex; flex-direction: column; }
.acct-drop-head span { color: var(--muted); font-size: 12px; }
.acct-drop-sep { height: 1px; background: var(--line); margin: 4px 0; }
#acct-signout { color: var(--bad); }

/* Error box: bottom corner, never blocks the page */
.error-box { position: fixed; right: 16px; bottom: 16px; z-index: 4000; width: min(400px, calc(100% - 32px)); background: var(--panel); border: 1px solid var(--bad);
  border-radius: 14px; padding: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.55); display: flex; flex-direction: column; gap: 12px; animation: ebIn .25s ease-out; }
.error-box .eb-top { display: flex; gap: 12px; align-items: flex-start; }
.error-box .eb-top p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.error-box .eb-x { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; }
.error-box .eb-acts { display: flex; gap: 8px; flex-wrap: wrap; }
@keyframes ebIn { from { transform: translateY(12px); opacity: 0 } to { transform: none; opacity: 1 } }
.mascot { flex: none; overflow: visible; }
@media (prefers-reduced-motion: no-preference) {
  .mascot .m-wings { transform-origin: 60px 64px; animation: flutter 2.6s ease-in-out infinite; }
  @keyframes flutter { 0%, 100% { transform: scaleX(1) } 45% { transform: scaleX(.86) } 55% { transform: scaleX(1.02) } }
}

.changelog.unread { border-color: var(--accent); }
.results { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.results button { text-align: left; padding: 9px 12px; background: var(--panel); border: 0; border-bottom: 1px solid var(--line); color: var(--fg); cursor: pointer; font: inherit; font-size: 14px; }
.results button:last-child { border-bottom: 0; }
.results button:hover:not([disabled]) { background: var(--panel-2); }

.foot-social { display: flex; gap: 10px; justify-content: center; align-items: center; margin-bottom: 8px; }
.foot-social a { color: var(--muted); display: inline-flex; padding: 6px; border-radius: 8px; border: 1px solid var(--line); }
.foot-social a:hover { color: var(--accent); border-color: var(--accent); }
.fine-print { display: block; margin-top: 14px; color: var(--muted); font-size: 11px; user-select: none; }
.foot-line { margin: 0 0 14px; }
.foot-links { display: grid; grid-template-columns: repeat(3, auto); gap: 10px 48px; justify-content: center; text-align: left; line-height: 1.9; }
.foot-links h4 { margin: 0 0 2px; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.foot-links a, .foot-links .linkish { display: block; font-size: 13px; text-decoration: none; }
.foot-links a:hover, .foot-links .linkish:hover { text-decoration: underline; }
@media (max-width: 760px) { .foot-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; justify-content: stretch; line-height: 2.2; } .foot-links a, .foot-links .linkish { font-size: 14px; } }

/* Rank-up celebration */
.rank-party { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--accent) 22%, rgba(5,6,8,.92)), rgba(5,6,8,.95) 60%);
  animation: rpIn .3s ease-out; overflow: hidden; }
.rank-party.out { animation: rpOut .28s ease-in forwards; }
.rp-rays { position: absolute; width: 160vmax; height: 160vmax; left: 50%; top: 45%; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--accent) 22%, transparent) 0deg 6deg, transparent 6deg 18deg);
  mask: radial-gradient(circle, #000 0, transparent 55%); -webkit-mask: radial-gradient(circle, #000 0, transparent 55%); animation: rpSpin 18s linear infinite; }
.rp-sparks { position: absolute; left: 50%; top: 45%; }
.rp-sparks i { position: absolute; width: var(--s); height: var(--s); border-radius: 2px; background: var(--accent); opacity: 0; transform: translate(0, 0) rotate(0deg);
  animation: rpSpark 1.1s cubic-bezier(.15,.7,.3,1) calc(.45s + var(--d)) forwards; }
.rp-sparks i:nth-child(3n) { background: #fff3d6; border-radius: 50%; }
.rp-card { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; max-width: 420px; }
.rp-kicker { font: 500 12px var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--accent); animation: rpFade .4s ease-out .1s both; }
.rp-stamp { animation: rpSlam .55s cubic-bezier(.2,1.6,.4,1) .3s both; }
.rp-stamp .rank { font-size: 34px; padding: 10px 22px; border-width: 3px; letter-spacing: .12em; }
.rp-card h2 { font-size: clamp(34px, 7vw, 56px); margin: 6px 0 0; animation: rpFade .4s ease-out .7s both; }
.rp-card p { color: var(--fg); opacity: .85; margin: 0; animation: rpFade .4s ease-out .85s both; }
.rp-card .btn { animation: rpFade .4s ease-out 1s both; margin-top: 8px; }
.rank-party.calm, .rank-party.calm * { animation: none !important; }
.rank-party.calm .rp-rays { display: none; }
@keyframes rpIn { from { opacity: 0 } }
@keyframes rpOut { to { opacity: 0 } }
@keyframes rpSpin { to { transform: translate(-50%, -50%) rotate(360deg) } }
@keyframes rpSlam { 0% { transform: scale(3) rotate(-12deg); opacity: 0 } 60% { opacity: 1 } 100% { transform: scale(1) rotate(-3deg); opacity: 1 } }
@keyframes rpFade { from { opacity: 0; transform: translateY(10px) } }
@keyframes rpSpark { 0% { opacity: 1; transform: translate(0, 0) rotate(0) } 100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(400deg) } }

/* Easter egg reward */
.egg-pop { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 4500; width: min(440px, calc(100% - 24px)); display: flex; gap: 14px; align-items: center;
  background: var(--panel); border: 1px solid var(--accent); border-radius: 16px; padding: 14px 16px; box-shadow: 0 20px 60px rgba(0,0,0,.6); animation: eggIn .5s cubic-bezier(.2,1.4,.4,1); }
.egg-pop b#egg-t { display: block; font: 800 22px/1.1 var(--display); text-transform: uppercase; margin: 2px 0 4px; }
.egg-pop p { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
@keyframes eggIn { from { transform: translate(-50%, 40px) scale(.9); opacity: 0 } }

/* More frames: free ones, and animated Premium ones */
.pfp.f-rust::after { border: 3px solid #b5582f; box-shadow: inset 0 0 0 1px rgba(0,0,0,.4); }
.pfp.f-concrete::after { border: 4px solid #8d918f; border-style: double; }
.pfp.f-night::after { border: 2px solid #2c3446; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #5b6b8f; }
.pfp.f-flicker::after { border: 3px solid var(--accent); box-shadow: 0 0 10px 1px var(--accent); animation: frFlicker 4s steps(1, end) infinite; }
.pfp.f-ember::after { inset: -6px; background: conic-gradient(from 0deg, #ff7a2a, #ffd27a, #c2412d, #ff7a2a);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); animation: frSpin 3s linear infinite; }
.pfp.f-static::after { inset: -6px; background: repeating-conic-gradient(#ddd 0 3deg, #444 3deg 7deg, #999 7deg 9deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); animation: frSpin .35s steps(4) infinite; }
.pfp.f-aurora::after { inset: -6px; background: conic-gradient(#5cc8e6, #93c46b, #e8a33d, #b06ab3, #5cc8e6);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); animation: frSpin 6s linear infinite; filter: blur(.3px); }
@keyframes frSpin { to { transform: rotate(360deg) } }
@keyframes frFlicker { 0%, 100% { opacity: 1 } 62% { opacity: .2 } 64% { opacity: 1 } 66% { opacity: .35 } 69% { opacity: 1 } }
/* Animated banner patterns (Premium) */
@keyframes bnRain { to { background-position: -10px 40px } }
@keyframes bnFog { to { background-position: 360px 0, -360px 0 } }
@keyframes bnFlicker { 0%, 100% { filter: none } 70% { filter: brightness(.75) } 71% { filter: none } 73% { filter: brightness(.8) } 75% { filter: none } }
@keyframes bnEmbers { to { background-position: 10px -70px, -6px -106px } }
@keyframes bnScan { to { background-position: 0 40px, 0 0 } }
.tile .lock, .pattern-lock { font-size: 11px; }
@media (max-width: 700px) { .acct-drop { left: 0; right: auto; width: min(300px, calc(100vw - 24px)); } }

/* ---- Frames, October 2026: two free, four animated Premium, and one for staff ---- */
.pfp.f-blueprint::after { inset: -6px; background: repeating-conic-gradient(#5cc8e6 0 6deg, transparent 6deg 12deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  box-shadow: 0 0 0 1px rgba(92,200,230,.35); }
.pfp.f-tape::after { inset: -6px; background: conic-gradient(from 20deg, #b9bcbf 0 70deg, #8e9296 70deg 75deg, #cfd2d4 75deg 160deg, #8e9296 160deg 165deg, #b9bcbf 165deg 250deg, #8e9296 250deg 255deg, #c4c7c9 255deg 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); }
.pfp.f-neon::after { border: 2px solid #ff4fd8; box-shadow: 0 0 6px #ff4fd8, 0 0 14px rgba(255,79,216,.6), inset 0 0 6px rgba(255,79,216,.6), 0 0 0 4px rgba(79,231,255,.0);
  animation: frNeon 3.2s steps(1, end) infinite; }
.pfp.f-neon::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 1px solid #4fe7ff; box-shadow: 0 0 8px #4fe7ff; pointer-events: none; animation: frNeon 4.1s steps(1, end) infinite reverse; }
.pfp.f-moth::after { inset: -6px; background: conic-gradient(from 0deg, transparent 0 300deg, rgba(232,163,61,.15) 300deg, #ffd58a 352deg, transparent 360deg), radial-gradient(farthest-side, transparent calc(100% - 4px), rgba(232,163,61,.38) calc(100% - 3px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); animation: frSpin 2.6s linear infinite; }
.pfp.f-moth::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; pointer-events: none; z-index: 1;
  background: radial-gradient(circle at 50% 3px, #f2dfbd 0 3px, transparent 3.5px), radial-gradient(circle at calc(50% - 4px) 4px, #e8a33d 0 3px, transparent 3.5px), radial-gradient(circle at calc(50% + 4px) 4px, #e8a33d 0 3px, transparent 3.5px);
  animation: frSpin 2.6s linear infinite; filter: drop-shadow(0 0 4px rgba(255,200,110,.9)); }
.pfp.f-radar::after { inset: -6px; background: conic-gradient(from 0deg, rgba(87,214,120,0) 0 270deg, rgba(87,214,120,.9) 360deg), radial-gradient(farthest-side, transparent calc(100% - 2px), #57d678 calc(100% - 1px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); animation: frSpin 1.8s linear infinite; }
.pfp.f-glitch::after { border: 3px solid #fff; box-shadow: -2px 0 0 #ff2d55, 2px 0 0 #2de1ff; animation: frGlitch 2.4s steps(1, end) infinite; }
.pfp.f-staff::after { inset: -6px; background: conic-gradient(var(--accent) 0 25%, #fff 0 27%, var(--accent) 0 50%, #fff 0 52%, var(--accent) 0 75%, #fff 0 77%, var(--accent) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); }
.pfp.f-staff::before { content: "✓"; position: absolute; z-index: 1; bottom: -5px; right: -5px; width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center;
  font: 800 9px/1 var(--body, sans-serif); background: var(--accent); color: var(--accent-ink, #111); box-shadow: 0 0 0 2px var(--bg); }
.pfp.f-staff:has(.avatar.lg)::before, .pfp.f-staff:has(.avatar.xl)::before { width: 24px; height: 24px; font-size: 13px; bottom: -4px; right: -2px; }
@keyframes frNeon { 0%, 100% { opacity: 1 } 47% { opacity: .35 } 48% { opacity: 1 } 51% { opacity: .5 } 52% { opacity: 1 } }
@keyframes frGlitch { 0%, 100% { box-shadow: -2px 0 0 #ff2d55, 2px 0 0 #2de1ff; transform: none }
  20% { box-shadow: 3px 0 0 #ff2d55, -3px 0 0 #2de1ff; transform: translate(1px, -1px) } 22% { box-shadow: -2px 0 0 #ff2d55, 2px 0 0 #2de1ff; transform: none }
  64% { box-shadow: -4px 1px 0 #ff2d55, 4px -1px 0 #2de1ff; transform: translate(-1px, 1px) skewX(4deg) } 66% { transform: none } }
@keyframes bnStorm { 0%, 61%, 63%, 66%, 100% { background-image: linear-gradient(rgba(220,235,255,0), rgba(220,235,255,0)), linear-gradient(170deg, rgba(0,0,0,.35), transparent 60%) }
  62%, 65% { background-image: linear-gradient(rgba(225,238,255,.55), rgba(225,238,255,.25)), linear-gradient(170deg, rgba(0,0,0,.1), transparent 60%) } }
@keyframes bnDust { to { background-position: 30px -104px, -18px -58px } }
@keyframes bnSearch { from { background-position: 100% 0 } to { background-position: 0 0 } }
@keyframes bnAurora { to { background-position: 300% 0 } }
.reduce-motion .pfp::after, .reduce-motion .pfp::before, .reduce-motion .banner { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .pfp::after, .pfp::before, .banner { animation: none !important; } }

/* Site-wide announcement bar */
.site-notice { --sn: var(--info, #5c9ee6); position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 16px; font-size: 14.5px; line-height: 1.4;
  background: linear-gradient(90deg, color-mix(in srgb, var(--sn) 22%, var(--panel)) 0%, color-mix(in srgb, var(--sn) 8%, var(--panel)) 70%);
  border-bottom: 1px solid color-mix(in srgb, var(--sn) 35%, var(--line)); box-shadow: inset 3px 0 0 var(--sn); animation: snIn .45s cubic-bezier(.2,.8,.2,1); }
.site-notice.good { --sn: var(--accent); }
.site-notice.warn { --sn: var(--bad); }
.site-notice .sn-ic { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--sn);
  background: color-mix(in srgb, var(--sn) 18%, var(--bg)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--sn) 45%, transparent), 0 0 14px color-mix(in srgb, var(--sn) 30%, transparent); }
.site-notice .sn-body { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.site-notice .sn-msg { color: var(--fg); font-weight: 500; overflow-wrap: anywhere; }
.site-notice .sn-when { font: 500 11px var(--mono); letter-spacing: .04em; color: color-mix(in srgb, var(--sn) 70%, var(--fg)); white-space: nowrap; }
.site-notice .sn-cta { flex: none; padding: 6px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
  color: var(--bg); background: var(--sn); transition: filter .15s, transform .1s; }
.site-notice .sn-cta:hover { filter: brightness(1.12); }
.site-notice .sn-cta:active { transform: translateY(1px); }
.site-notice .sn-x { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--muted); }
.site-notice .sn-x:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 8%, transparent); }
.site-notice.closing { animation: snOut .22s ease-in forwards; }
.site-notice.preview { animation: none; border: 1px solid color-mix(in srgb, var(--sn) 35%, var(--line)); border-radius: 8px; overflow: hidden; }
@media (max-width: 600px) {
  .site-notice { flex-wrap: wrap; padding: 10px 8px 10px 14px; gap: 8px 10px; font-size: 14px; }
  .site-notice .sn-body { flex: 1 1 calc(100% - 90px); }
  .site-notice .sn-cta { order: 3; margin-left: 40px; }
}
@keyframes snIn { from { transform: translateY(-100%); opacity: 0 } }
@keyframes snOut { to { opacity: 0; transform: translateY(-6px) } }
.reduce-motion .site-notice, .reduce-motion .site-notice.closing { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .site-notice, .site-notice.closing { animation: none !important; } }

/* ---- Rank-up scenes (one per rank) ---- */
.rank-party .rs { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; color: var(--fg); }
/* Pathfinder: the trail draws in, the flag pops, the compass needle swings and settles */
.rp-pathfinder .rp-rays { opacity: .35; }
.rs-trail .trail { stroke-dashoffset: 900; animation: rsTrail 1.6s cubic-bezier(.5,0,.2,1) .1s forwards; }
.rs-trail .flag { transform-box: fill-box; opacity: 0; animation: rsPop .5s cubic-bezier(.2,1.6,.4,1) 1.5s forwards; }
.rs-compass { position: absolute; top: calc(45% - 250px); left: 50%; width: 84px; margin-left: -42px; color: var(--fg); animation: rpFade .4s ease-out .1s both; }
.rs-compass .needle { transform-origin: 50px 50px; animation: rsNeedle 2.2s cubic-bezier(.3,1.6,.4,1) .2s both; }
@keyframes rsTrail { to { stroke-dashoffset: 0 } }
@keyframes rsPop { from { opacity: 0; transform: translate(352px, 206px) scale(.2) } to { opacity: 1; transform: translate(352px, 206px) scale(1) } }
@keyframes rsNeedle { 0% { transform: rotate(-200deg) } 40% { transform: rotate(60deg) } 65% { transform: rotate(-25deg) } 85% { transform: rotate(10deg) } 100% { transform: rotate(0) } }
/* Explorer: total dark, then a flashlight circle sweeps in and stops on the badge */
.rp-explorer .rp-rays { opacity: 0; animation: rpIn .6s ease-out 1.5s forwards; }
.rs-dark { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(circle var(--beam, 150px) at var(--fx, 10%) var(--fy, 80%), transparent 0 60%, rgba(4,5,7,.97) 100%);
  animation: rsSweep 1.7s cubic-bezier(.6,0,.3,1) forwards; }
@keyframes rsSweep { 0% { --fx: 8%; --fy: 85%; --beam: 120px } 35% { --fx: 80%; --fy: 30%; --beam: 140px } 70% { --fx: 46%; --fy: 52%; --beam: 160px } 100% { --fx: 50%; --fy: 45%; --beam: 140vmax } }
@property --fx { syntax: "<percentage>"; inherits: false; initial-value: 10%; }
@property --fy { syntax: "<percentage>"; inherits: false; initial-value: 80%; }
@property --beam { syntax: "<length>"; inherits: false; initial-value: 150px; }
/* Veteran: the streetlight stutters on above the card, moths circle its light */
.rp-veteran .rp-rays { opacity: 0; animation: rsFlick 1s steps(1, end) .4s forwards; }
.rs-lamp { position: absolute; top: calc(45% - 280px); left: 50%; width: 110px; margin-left: -64px; color: var(--fg); }
.rs-lamp .cone, .rs-lamp .pool, .rs-lamp .bulb { opacity: 0; animation: rsFlick 1s steps(1, end) .4s forwards; }
.rs-moths { position: absolute; top: calc(45% - 252px); left: calc(50% + 14px); width: 0; height: 0; }
.rs-moths i { position: absolute; width: 18px; height: 12px; margin: -6px -9px; animation: rsOrbit var(--t) linear var(--o) infinite; opacity: 0; animation-fill-mode: both; }
.rs-moths i svg { display: block; width: 100%; height: 100%; animation: flutter .18s ease-in-out infinite; }
.rp-veteran .rs-moths { animation: rpIn .3s 1.2s both; }
@keyframes rsFlick { 0% { opacity: 0 } 10% { opacity: 1 } 18% { opacity: .1 } 30% { opacity: .9 } 38% { opacity: 0 } 55% { opacity: 1 } 62% { opacity: .4 } 72%, 100% { opacity: 1 } }
@keyframes rsOrbit { 0% { opacity: .9; transform: rotate(0) translateX(var(--r)) rotate(90deg) } 100% { opacity: .9; transform: rotate(360deg) translateX(var(--r)) rotate(90deg) } }
/* Legend: gold everything */
.rp-legend { --accent: #f2c14e; }
.rp-legend .rp-stamp .rank { position: relative; overflow: hidden; display: inline-block; isolation: isolate; background: linear-gradient(135deg, #f7d774, #b8862b 45%, #fff1b8 55%, #c99a3a); color: #2a1d05; border-color: #fff1b8; }
.rp-legend .rp-stamp .rank::after { content: ""; position: absolute; inset: -20% auto -20% -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.85), transparent); transform: skewX(-20deg); animation: rsShine 1.6s ease-in-out 1s infinite; }
.rs-rings { position: absolute; left: 50%; top: 45%; }
.rs-rings i { position: absolute; width: 20px; height: 20px; margin: -10px; border-radius: 50%; border: 3px solid #f2c14e; box-shadow: 0 0 24px #f2c14e; opacity: 0; animation: rsRing 1.4s cubic-bezier(.1,.6,.3,1) forwards; }
.rs-rings i:nth-child(2) { animation-delay: .25s; } .rs-rings i:nth-child(3) { animation-delay: .5s; }
.rs-embers i { position: absolute; top: -10px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; background: #ffd27a; box-shadow: 0 0 8px #ffb347; animation: rsFall var(--t) linear var(--d) infinite; opacity: 0; }
@keyframes rsRing { 0% { opacity: 1; transform: scale(.2) } 100% { opacity: 0; transform: scale(40) } }
@keyframes rsFall { 0% { opacity: 0; transform: translate(0, 0) } 10% { opacity: 1 } 100% { opacity: 0; transform: translate(30px, 105vh) } }
@keyframes rsShine { 0% { left: -60% } 60%, 100% { left: 130% } }
.rank-party.calm .rs, .rank-party.calm .rs-dark, .rank-party.calm .rs-moths, .rank-party.calm .rs-embers { display: none; }

/* Notification emblems */
.emblem { --em: var(--accent); width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--em);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--em) 26%, var(--panel-2)), var(--panel-2) 70%);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--em) 55%, transparent), 0 2px 8px rgba(0,0,0,.25); position: relative; }
.emblem svg { width: 20px; height: 20px; }
.emblem.unread { color: var(--bg); background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--em) 70%, #fff), var(--em) 70%); box-shadow: 0 0 0 3px color-mix(in srgb, var(--em) 25%, transparent), 0 4px 14px color-mix(in srgb, var(--em) 35%, transparent); }
.emblem.unread::after { content: ""; position: absolute; top: -1px; right: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.alert-row { grid-template-columns: 38px 1fr auto; }

/* ---- Polish: atmosphere and motion (all off with Reduce motion) ---- */
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--fg); }
html { scrollbar-color: color-mix(in srgb, var(--accent) 35%, var(--panel-2)) transparent; }
body::before { content: ""; position: fixed; inset: 0; z-index: 9990; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
main.page { animation: pageIn .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px) } }
.card { transition: border-color .25s, box-shadow .25s, transform .25s; }
a.card:hover, .card.hoverable:hover, .badge-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--accent) 45%, transparent); transform: translateY(-2px); }
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::after { content: ""; position: absolute; inset: 0 auto 0 -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); transition: left .6s; pointer-events: none; }
.btn.primary:hover::after { left: 130%; }
.reduce-motion main.page, .reduce-motion .card, .reduce-motion .btn.primary::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { main.page { animation: none; } .btn.primary::after { display: none; } }
@media print { body::before { display: none; } }
body:has(#map)::before { display: none; }

/* Easter eggs you can see: Lumen flying by, a ghost peeking onto the map */
.egg-lumen { position: fixed; z-index: 4400; top: var(--y, 30vh); left: -90px; width: 72px; height: 72px; padding: 0; border: 0; background: none; cursor: pointer;
  filter: drop-shadow(0 0 14px rgba(255,200,110,.75)); animation: lumenFly 13s linear forwards; }
.egg-lumen svg { width: 100%; height: 100%; animation: flutter .22s ease-in-out infinite; }
.egg-lumen:hover { filter: drop-shadow(0 0 22px #ffe6a8); }
.egg-lumen.still { left: auto; right: 18px; top: auto; bottom: 90px; animation: lumenStay 9s linear forwards; }
.egg-lumen.caught, .egg-ghost.caught { animation: eggCaught .45s ease-in forwards !important; }
@keyframes lumenFly { 0% { transform: translate(0, 0) } 20% { transform: translate(24vw, -40px) } 40% { transform: translate(46vw, 30px) } 55% { transform: translate(58vw, -10px) }
  70% { transform: translate(74vw, 40px) } 100% { transform: translate(calc(100vw + 120px), -30px) } }
@keyframes lumenStay { 0%, 100% { opacity: 0 } 8%, 92% { opacity: 1 } }
@keyframes eggCaught { to { transform: scale(1.8); opacity: 0 } }
.egg-ghost { position: absolute; left: 0; bottom: 70px; z-index: 9; width: 64px; height: 76px; padding: 0; border: 0; background: none; cursor: pointer;
  filter: drop-shadow(0 0 12px rgba(220,230,255,.7)); animation: ghostPeek 7s ease-in-out forwards; }
.egg-ghost svg { width: 100%; height: 100%; }
@keyframes ghostPeek { 0% { transform: translateX(-80px) rotate(-8deg); opacity: 0 } 12% { transform: translateX(-18px) rotate(10deg); opacity: 1 } 30% { transform: translateX(-22px) rotate(4deg) translateY(-6px) }
  50% { transform: translateX(-14px) rotate(12deg) } 80% { transform: translateX(-20px) rotate(6deg) translateY(-4px); opacity: 1 } 100% { transform: translateX(-90px) rotate(-6deg); opacity: 0 } }
.reduce-motion .egg-lumen:not(.still) { animation: lumenStay 9s linear forwards; left: auto; right: 18px; top: auto; bottom: 90px; }
.egg-hints { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.egg-hint { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; background: var(--panel); }
.egg-hint .eh-ic { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); font-size: 16px; }
.egg-hint.found { border-style: solid; border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.egg-hint.found .eh-ic { background: var(--accent); color: var(--accent-ink); }
.egg-hint b { display: block; font-size: 14px; } .egg-hint span.m { font-size: 13px; color: var(--muted); }

/* ---------- Phone navigation: slim top bar, tab bar at the bottom, "More" sheet ---------- */
.tabbar, .msheet, .msheet-back { display: none; }
@media (max-width: 760px) {
  :root { --tabbar-h: 60px; }
  .nav { flex-wrap: nowrap; padding: 8px 12px; gap: 10px; }
  .nav .brand { font-size: 20px; min-width: 0; flex: 0 1 auto; overflow: hidden; }
  .nav .brand span { overflow: hidden; text-overflow: ellipsis; }
  .nav .brand-mark { width: 28px; height: 28px; }
  .nav > .nav-links, .nav-account > .demo-switch, .nav-account > .bell, .nav-account > .alerts-menu, .nav-account .badge-tier, .nav-account .acct-staff, .nav-account .caret,
  .nav-account > .btn.primary { display: none; }
  .nav-account { flex-wrap: nowrap; gap: 8px; }
  .nav-account > .nav-invite-sm { display: inline-flex; padding: 4px 10px; font-size: 12px; }
  .nav-account .acct { padding: 2px; }
  .nav-account .acct .avatar { width: 34px; height: 34px; }
  @media (max-width: 520px) { .nav-account .acct .rank { display: none; } }
  body.has-tabbar { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 2600;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
    background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--line); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
  .tb-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0;
    color: var(--muted); text-decoration: none; font: 500 11px/1.1 var(--body, inherit); background: none; border: 0; padding: 6px 2px; cursor: pointer; }
  .tb-item span:not(.count-dot) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tb-item[aria-current="page"], .tb-item[aria-expanded="true"] { color: var(--accent); }
  .tb-item[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 2px; border-radius: 0 0 2px 2px; background: var(--accent); }
  .tb-item .count-dot { position: absolute; top: 4px; left: calc(50% + 6px); }
  .tb-item:active { transform: scale(.94); }
  .msheet-back:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 2700; background: rgba(5,6,7,.6); animation: msFade .2s ease-out; }
  .msheet:not([hidden]) { display: flex; flex-direction: column; gap: 14px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 2800;
    max-height: min(82vh, 760px); overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    background: var(--panel); border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.45); animation: msUp .28s cubic-bezier(.2,.8,.2,1); }
  .msheet::before { content: ""; align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin-top: -4px; }
  .ms-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .ms-head b { font: 700 18px var(--display); letter-spacing: .03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ms-demo { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
  .ms-group h3 { margin: 0 0 8px; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  .ms-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ms-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; padding: 10px 6px;
    border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--fg); text-decoration: none; font: 500 12.5px/1.2 inherit; text-align: center; cursor: pointer; }
  .ms-tile span:not(.count-dot) { overflow-wrap: anywhere; }
  .ms-tile svg { color: var(--accent); }
  .ms-tile[aria-current="page"] { border-color: var(--accent); }
  .ms-tile .count-dot { position: absolute; top: 6px; right: 6px; }
  .ms-cta, .ms-signout { display: flex; gap: 8px; flex-wrap: wrap; }
  .ms-cta .btn { flex: 1 1 140px; justify-content: center; text-align: center; }
  .ms-signout { align-items: center; justify-content: center; gap: 8px; color: var(--muted); }
  html.ms-open, html.ms-open body { overflow: hidden; }
  /* Things that sit at the bottom of the screen move up above the tab bar */
  body.has-tabbar .toast { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom, 0px)); }
  body.has-tabbar .tour { bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom, 0px)); }
  body.has-tabbar .egg-pop, body.has-tabbar .error-box { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom, 0px)); }
  /* A spot card on the map slides up over the tab bar, which steps aside while it's open */
  body:has(#detail:not([hidden])) .tabbar { transform: translateY(105%); }
  html:has(.modal-back) .tabbar { z-index: 1; }
}
@keyframes msUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes msFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .msheet, .msheet-back { animation: none !important; } }
.reduce-motion .msheet, .reduce-motion .msheet-back { animation: none !important; }

/* ---- Spruce-up: sodium-lamp glow, warmer edges ---- */
.nav { background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 96%, #fff) 0%, var(--panel) 100%); box-shadow: 0 1px 0 rgba(0,0,0,.35), 0 8px 24px -16px rgba(0,0,0,.8); }
.page-head { position: relative; isolation: isolate; padding-bottom: 6px; }
.page-head:not(.profile-head)::before { content: ""; position: absolute; z-index: -1; left: -140px; top: -120px; width: 620px; height: 360px; max-width: 120vw; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent 75%); }
.page-head:not(.profile-head)::after { content: ""; display: block; width: 56px; height: 3px; border-radius: 2px; margin-top: 6px; background: var(--accent); box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 60%, transparent); }
.card { box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 1px 2px rgba(0,0,0,.25); }
.card h2 { letter-spacing: .03em; }
.btn { transition: border-color .2s, box-shadow .2s, background-color .2s, transform .1s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary:hover, .btn.primary:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent), 0 6px 20px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea { transition: border-color .2s, box-shadow .2s; }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); outline: none; }
.table-wrap { background: var(--panel); box-shadow: inset 0 1px 0 rgba(255,255,255,.035); }
.compare thead th { padding-block: 16px; border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); }
.compare thead th.prem, .compare td:last-child { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.compare tbody tr { transition: background-color .15s; }
.compare tbody tr:hover { background: var(--panel-2); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--accent) 30%, var(--panel-2)); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--accent) 55%, var(--panel-2)); }
@media (max-width: 760px) { .page-head::before { left: -80px; top: -90px; width: 420px; height: 280px; } .tb-item[aria-current="page"]::before { box-shadow: 0 0 10px 1px color-mix(in srgb, var(--accent) 70%, transparent); } }
.reduce-motion .btn, .reduce-motion .compare tbody tr { transition: none !important; }
@media print { .page-head::before { display: none; } }

/* ---- Easier to use: native file pickers match the buttons; bigger touch targets on phones ---- */
input[type=file] { color: var(--muted); font-size: 14px; max-width: 100%; }
input[type=file]::file-selector-button { font: 500 14px var(--body); color: var(--fg); background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 13px; margin-right: 10px; cursor: pointer; transition: border-color .2s; }
input[type=file]::file-selector-button:hover { border-color: var(--accent); }
@media (max-width: 760px) {
  .seg button { padding: 7px 12px; min-height: 32px; }
  .check input, .switch input, input[type=checkbox]:not(.toggle input) { width: 20px; height: 20px; flex: none; }
  .site-foot { line-height: 2.1; }
  .foot-social a { padding: 9px; }
  .maplibregl-ctrl-group button { width: 38px; height: 38px; }
  .chip { min-height: 34px; }
}

/* ---- Settings jump bar ---- */
.jump { position: sticky; top: var(--jump-top, 0px); z-index: 900; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: -12px -16px 0; padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%); }
.jump::-webkit-scrollbar { display: none; }
.jump a { flex: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 13px; white-space: nowrap; background: var(--panel); }
.jump a:hover { color: var(--fg); border-color: var(--muted); }
.jump a[aria-current="true"] { color: var(--accent); border-color: var(--accent); }
main.page:has(.jump) > section, main.page:has(.jump) > form { scroll-margin-top: calc(var(--jump-top, 0px) + 64px); }
html:has(.jump) { scroll-behavior: smooth; }
.reduce-motion:has(.jump) { scroll-behavior: auto; }
@media (prefers-reduced-motion: reduce) { html:has(.jump) { scroll-behavior: auto; } }
@media (max-width: 760px) { .jump a { padding: 8px 13px; } }
.pick-views { margin: 10px 10px 0 0 !important; box-shadow: 0 2px 8px rgba(0,0,0,.35); }

/* ---- Hover previews the "selected" highlight on toggle, chip and segment buttons ---- */
.seg button, .chip, .fchips button { transition: background-color .15s, color .15s, border-color .15s; }
.seg button:not([aria-pressed="true"]):hover { background: var(--panel-2); color: var(--fg); }
.seg button[data-tier="premium"]:not([aria-pressed="true"]):hover { background: color-mix(in srgb, var(--accent) 28%, transparent); color: var(--fg); }
.chip:not([aria-pressed="true"]):hover { border-color: var(--accent); color: var(--accent); }
.fchips button:not([aria-pressed="true"]):hover { border-color: var(--accent); color: var(--fg); background: color-mix(in srgb, var(--accent) 10%, var(--bg)); }
.jump a:not([aria-current="true"]):hover { border-color: var(--accent); color: var(--accent); }
.reduce-motion .seg button, .reduce-motion .chip, .reduce-motion .fchips button { transition: none !important; }

/* ---- Staff badges (Admin / Moderator) shown next to a name ---- */
.staff-tag { display: inline-flex; align-items: center; font: 600 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 7px; border-radius: 4px; border: 1px solid currentColor; white-space: nowrap; vertical-align: middle; }
.staff-tag.staff-admin { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.staff-tag.staff-moderator { color: var(--info); background: color-mix(in srgb, var(--info) 14%, transparent); }
.acct-staff:empty { display: none; }
.acct-staff .staff-tag { vertical-align: middle; }

/* Phone touch-ups: a space between a name and its staff badge, and bigger tap areas on small text links. */
a + .staff-tag { margin-left: 6px; }
@media (pointer: coarse) {
  .linkish { padding: 9px 6px; margin: -9px -6px; }
  input[type=checkbox], input[type=radio] { min-width: 22px; min-height: 22px; }
}

.demo-map-note { left: 10px; transform: none; }
#map .demo-map-note { left: 50%; transform: translateX(-50%); }

/* Settings tabs: one group at a time. Chips across the top on phones, a column on the left on wide screens. */
.tab-off { display: none !important; }
@media (min-width: 900px) {
  main.set-page { display: grid; grid-template-columns: 210px minmax(0, 1fr); column-gap: 32px; row-gap: 24px; align-items: start; }
  main.set-page > .page-head { grid-column: 1 / -1; }
  main.set-page > .set-tabs { grid-column: 1; grid-row: 2 / span 40; position: sticky; top: calc(var(--jump-top, 0px) + 16px); flex-direction: column; margin: 0; padding: 0; overflow: visible; background: none; border: 0; box-shadow: none; backdrop-filter: none; }
  main.set-page > .set-tabs a { border: 0; background: none; border-radius: 8px; padding: 10px 12px; font-size: 15px; color: var(--muted); }
  main.set-page > .set-tabs a:hover { background: var(--panel-2); color: var(--fg); }
  main.set-page > .set-tabs a[aria-current="true"] { background: var(--panel); color: var(--fg); box-shadow: inset 3px 0 0 var(--accent); }
  main.set-page > :not(.page-head):not(.set-tabs) { grid-column: 2; }
}

/* ---------- Top-bar dropdowns (desktop) ---------- */
.nav-links { align-items: center; }
.nav-dd { position: relative; }
.nav-dd-btn { display: inline-flex; align-items: center; gap: 3px; background: none; border: 0; color: var(--muted); padding: 6px 8px 6px 10px; border-radius: 6px; font: inherit; font-size: 14px; cursor: pointer; }
.nav-dd-btn svg { transition: transform .15s; opacity: .8; }
.nav-dd-btn:hover, .nav-dd-btn[aria-expanded="true"] { color: var(--fg); background: var(--panel-2); }
.nav-dd-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-dd-btn.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.nav-dd-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 3000; width: 330px; padding: 6px; display: flex; flex-direction: column; gap: 2px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 22px 50px -18px rgba(0,0,0,.7); }
.nav-dd-menu[hidden] { display: none; }
.dd-item { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px; border-radius: 8px; color: var(--fg); text-decoration: none; }
.dd-item svg { color: var(--accent); margin-top: 1px; }
.dd-item b { display: block; font-weight: 600; font-size: 14.5px; }
.dd-item small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; margin-top: 2px; }
.dd-item:hover, .dd-item:focus-visible { background: var(--panel-2); outline: none; }
.dd-item[aria-current="page"] { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.nav-links a::after { pointer-events: none; }
.nav-dd-menu .dd-item::after { display: none; }

/* ---------- Find a page ---------- */
.pf-back { align-items: flex-start; padding-top: min(14vh, 120px); }
.pf { width: min(560px, calc(100vw - 24px)); padding: 0; overflow: hidden; display: flex; flex-direction: column; max-height: min(70vh, 620px); gap: 0; }
.pf-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.pf-input input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--fg); font-size: 17px; }
.pf-input kbd { font: 500 11px var(--mono); border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; color: var(--muted); }
.pf-list { overflow-y: auto; padding: 6px; }
.pf-g { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.pf-item { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--fg); text-decoration: none; }
.pf-item svg { color: var(--accent); }
.pf-item b { display: block; font-weight: 600; font-size: 15px; }
.pf-item small { display: block; color: var(--muted); font-size: 12.5px; }
.pf-item[aria-selected="true"] { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--accent); }
@media (max-width: 760px) { .pf-input kbd { display: none; } .pf-back { padding-top: 10px; } }

/* ---------- Phone "More" sheet: search box ---------- */
.ms-find { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--muted); }
.ms-find input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--fg); font-size: 16px; padding: 11px 0; }
.ms-find:focus-within { border-color: var(--accent); }
.ms-none { margin: 0; font-size: 14px; }
.ms-group[hidden], .ms-tile[hidden] { display: none !important; }
@media (min-width: 761px) { .ms-find, .ms-none { display: none; } }
.toy-hint { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; font-size: 14px; background: var(--panel-2); }
.pf-input input, .pf-input input:focus, .ms-find input, .ms-find input:focus { border: 0 !important; box-shadow: none !important; outline: none !important; padding-left: 0; padding-right: 0; }
.pf-input:focus-within { color: var(--accent); }
html.ms-open #tour:not(.open), html:has(.pf-back) #tour:not(.open) { display: none; }

/* Alerts dropdown from the bell in the top bar */
.alerts-menu { position: relative; }
.alerts-drop { position: absolute; right: -8px; top: calc(100% + 8px); z-index: 3000; width: 340px; max-width: calc(100vw - 24px); background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.45); padding: 6px; display: flex; flex-direction: column; }
.alerts-drop[hidden] { display: none; }
.bell-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.bell-head .linkish { font-size: 13px; }
.bell-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; color: inherit; text-decoration: none; text-align: left;
  background: none; border: 0; font: inherit; cursor: pointer; width: 100%; }
.bell-row:hover, .bell-row:focus-visible { background: var(--panel-2); outline: none; }
.bell-row .emblem { width: 30px; height: 30px; }
.bell-row .emblem svg { width: 16px; height: 16px; }
.bell-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; }
.bell-text b { font-weight: 600; }
.bell-body { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.bell-time { color: var(--muted); font-size: 12px; }
.bell-empty { color: var(--muted); font-size: 14px; margin: 6px 10px 10px; }
.bell-more { display: block; text-align: center; padding: 10px; margin-top: 4px; border-top: 1px solid var(--line); color: var(--accent); font-weight: 600; text-decoration: none; border-radius: 0 0 8px 8px; }
.bell-more:hover, .bell-more:focus-visible { background: var(--panel-2); outline: none; }


/* ---------- Passport stamp moment (after a verified visit) ---------- */
.stamp-moment { position: fixed; inset: 0; z-index: 4500; display: grid; place-items: center; padding: 16px; background: rgba(5,6,8,.62);
  animation: smFade .2s ease-out; }
.stamp-moment.out { animation: smFade .25s ease-in reverse forwards; }
.sm-card { width: min(340px, 100%); display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 22px 20px 18px; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.sm-page { position: relative; width: 100%; height: 190px; display: grid; place-items: center; border-radius: 10px; overflow: hidden;
  background: repeating-linear-gradient(0deg, transparent 0 23px, color-mix(in srgb, var(--fg) 6%, transparent) 23px 24px),
              radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 9%, var(--bg)), var(--bg) 70%);
  border: 1px dashed color-mix(in srgb, var(--fg) 18%, transparent); animation: smShake .32s .42s ease-out; }
.sm-page .stamp { color: var(--accent); position: relative; z-index: 1; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 35%, transparent));
  animation: smSlam .48s cubic-bezier(.2,1.4,.4,1) both; }
.sm-ink { position: absolute; left: 50%; top: 50%; width: 170px; height: 170px; margin: -85px 0 0 -85px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent) 0 40%, transparent 70%); transform: scale(.2); opacity: 0;
  animation: smInk .6s .4s ease-out forwards; }
.sm-text { display: flex; flex-direction: column; gap: 3px; }
.sm-text small { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.sm-text b { font: 800 24px/1.05 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.sm-text span { color: var(--muted); font-size: 14px; }
.sm-ok { min-width: 120px; justify-content: center; }
@keyframes smFade { from { opacity: 0; } }
@keyframes smSlam { 0% { transform: scale(2.6) rotate(-22deg); opacity: 0; } 55% { opacity: 1; } 75% { transform: scale(.92) rotate(-6deg); } 100% { transform: scale(1) rotate(-8deg); } }
@keyframes smInk { 0% { transform: scale(.2); opacity: .9; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes smShake { 0%, 100% { transform: none; } 30% { transform: translateY(3px); } 60% { transform: translateY(-1px); } }
.reduce-motion .stamp-moment, .reduce-motion .sm-page, .reduce-motion .sm-page .stamp, .reduce-motion .sm-ink { animation: none; }
.reduce-motion .sm-page .stamp { transform: rotate(-8deg); }
@media (prefers-reduced-motion: reduce) { .stamp-moment, .sm-page, .sm-page .stamp, .sm-ink { animation: none !important; } .sm-page .stamp { transform: rotate(-8deg); } }

/* Phones with the bottom tab bar: every page is in the More sheet, so the footer keeps just the legal links. */
@media (max-width: 760px) {
  body.has-tabbar .foot-links > div:not(:last-child) { display: none; }
  body.has-tabbar .foot-links { display: block; }
  body.has-tabbar .foot-links > div:last-child { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
  body.has-tabbar .foot-links > div:last-child h4 { display: none; }
  body.has-tabbar .foot-links > div:last-child a { font-size: 13px; }
}
/* Long chip lists (hazards on Add spot) show the common ones first. */
.chips.folded > [data-more] { display: none; }
.chips.folded > [data-more][aria-pressed="true"] { display: inline-flex; }

/* ---------- Welcome intro (features.js Welcome) ---------- */
.wi-open, .wi-open body { overflow: hidden; }
.wi { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 56px 16px 48px;
  background: radial-gradient(120% 90% at 50% 30%, color-mix(in srgb, var(--accent) 10%, var(--bg)), var(--bg) 70%);
  opacity: 0; transition: opacity .5s ease; }
.wi.in { opacity: 1; } .wi.out { opacity: 0; pointer-events: none; }
.wi-top { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 16px; display: flex; gap: 8px; z-index: 2; }
.wi-skip, .wi-sound { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 16px; font-size: 14px; }
.wi-sound { padding: 6px 12px; }
.wi-sound.wake { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); animation: wiNudge 2s ease-in-out infinite; }
@keyframes wiNudge { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent); } }
.wi-skip:hover, .wi-sound:hover { color: var(--fg); border-color: var(--muted); }
.wi-stage { position: relative; width: min(600px, 100%); height: min(560px, calc(100vh - 120px)); }
.wi-scene { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px;
  opacity: 0; transform: translateY(18px) scale(.98); transition: opacity .55s ease, transform .7s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.wi-scene.on { opacity: 1; transform: none; pointer-events: auto; }
.wi-scene.past { transform: translateY(-14px) scale(.98); }
.wi-scene h2 { font: 800 clamp(30px, 7vw, 46px)/1 var(--display); text-transform: uppercase; letter-spacing: .01em; margin: 14px 0 0; }
.wi-scene p { color: var(--muted); margin: 0; max-width: 400px; font-size: 16px; }
.wi-visual { position: relative; width: 100%; height: min(300px, 46vh); display: grid; place-items: center; }
.wi-dots { position: absolute; bottom: max(18px, env(safe-area-inset-bottom)); display: flex; gap: 8px; }
.wi-dots i { width: 22px; height: 3px; border-radius: 3px; background: var(--line); transition: background .4s; }
.wi-dots i.on { background: var(--accent); }
.wi-go { margin-top: 12px; font-size: 17px; padding: 12px 34px; }

/* 1: a flashlight finds the name */
.wi-logo { font: 900 clamp(34px, 10vw, 62px)/1 var(--display); letter-spacing: .02em; position: relative; z-index: 1; white-space: nowrap; }
.wi-logo b { color: var(--accent); font-weight: 900; }
.wi-scene.on .wi-logo:not(.big) { animation: wiReveal 2.2s ease forwards; }
@keyframes wiReveal { 0% { opacity: .05; filter: blur(4px); } 45% { opacity: .2; } 70%, 100% { opacity: 1; filter: none; text-shadow: 0 0 30px color-mix(in srgb, var(--accent) 45%, transparent); } }
.wi-beam { position: absolute; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 35%, transparent), transparent);
  mix-blend-mode: screen; left: -10%; top: 10%; }
.wi-scene.on .wi-beam { animation: wiSweep 2.4s ease-in-out forwards; }
@keyframes wiSweep { 0% { transform: translate(0, 40px); opacity: 0; } 20% { opacity: 1; } 60% { transform: translate(260px, -30px); } 100% { transform: translate(130px, 0) scale(1.5); opacity: .7; } }
.wi-dust { position: absolute; inset: 0; pointer-events: none; }
.wi-dust i { position: absolute; left: var(--x); top: var(--y); width: 2px; height: 2px; border-radius: 50%; background: var(--fg); opacity: 0; animation: wiDust 3s ease-in-out infinite; animation-delay: var(--d); }
@keyframes wiDust { 0%, 100% { opacity: 0; transform: translateY(0); } 50% { opacity: .5; transform: translateY(-14px); } }
.wi-logo.big { font-size: clamp(36px, 10.5vw, 68px); }
.wi-scene.on .wi-logo.big { animation: wiPop .9s cubic-bezier(.2, 1.4, .4, 1) both; text-shadow: 0 0 40px color-mix(in srgb, var(--accent) 40%, transparent); }
@keyframes wiPop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }

/* 2: the dark map lights up */
.wi-map { width: 100%; height: 100%; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--panel) 80%, black); }
.wi-grid path { stroke: var(--line); stroke-width: 1; opacity: .6; }
.wi-river { fill: none; stroke: #23405a; stroke-width: 9; stroke-linecap: round; }
.wi-road { fill: none; stroke: #3a3f45; stroke-width: 3; }
.wi-radius { fill: color-mix(in srgb, var(--accent) 7%, transparent); stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 6; }
.wi-scene.on .wi-radius { animation: wiRing 1s ease-out both .2s; transform-origin: 200px 124px; }
@keyframes wiRing { from { transform: scale(0); opacity: 0; } to { transform: none; opacity: 1; } }
.wi-home circle { fill: var(--accent); }
.wi-pin path { fill: var(--accent); } .wi-pin-glow { fill: var(--accent); opacity: .25; }
.wi-pin { opacity: 0; }
.wi-scene.on .wi-pin { animation: wiPin .5s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: var(--d); }
.wi-scene.on .wi-pin-glow { animation: wiGlow 1.6s ease-in-out infinite; animation-delay: var(--d); transform-box: fill-box; transform-origin: center; }
@keyframes wiPin { from { opacity: 0; transform: translateY(-20px) scale(.4); } to { opacity: 1; } }
@keyframes wiGlow { 0%, 100% { transform: scale(.8); opacity: .35; } 50% { transform: scale(1.5); opacity: 0; } }
.wi-chip { position: absolute; bottom: 12px; right: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 6px 14px; border-radius: 999px; font-size: 14px; }
.wi-scene.on .wi-chip { animation: wiTap 1.2s ease 1s 2; }
@keyframes wiTap { 0%, 100% { transform: none; } 40% { transform: scale(.92); } }

/* 3: a spot card slides up */
.wi-card { width: min(340px, 92%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-align: left; box-shadow: 0 20px 50px #0008; }
.wi-card img { display: block; width: 100%; height: clamp(90px, 16vh, 150px); object-fit: cover; }
.wi-card-body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.wi-card-body b { font: 800 22px/1.05 var(--display); text-transform: uppercase; }
.wi-tags, .wi-acts { display: flex; flex-wrap: wrap; gap: 5px; }
.wi-tags span { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.wi-tags .ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.wi-tags .warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.wi-acts span { font-size: 12px; padding: 5px 10px; border-radius: 8px; background: var(--panel-2); }
.wi-scene.on .wi-card { animation: wiCard .8s cubic-bezier(.2, .9, .2, 1) both; }
.wi-scene.on .wi-tags span { animation: wiPin .4s ease both; }
.wi-scene.on .wi-tags span:nth-child(2) { animation-delay: .5s; } .wi-scene.on .wi-tags span:nth-child(3) { animation-delay: .8s; } .wi-scene.on .wi-tags span:nth-child(4) { animation-delay: 1.1s; }
@keyframes wiCard { from { opacity: 0; transform: translateY(60px) rotate(-2deg); } to { opacity: 1; transform: none; } }

/* 4: the stamp lands, points and rank */
.wi-pass { display: grid; justify-items: center; gap: 10px; width: min(320px, 92%); }
.wi-stamp { color: var(--accent); }
.wi-scene.on .wi-stamp { animation: wiStamp .55s cubic-bezier(.3, 1.5, .5, 1) both .2s; }
@keyframes wiStamp { from { opacity: 0; transform: scale(2.4) rotate(14deg); } 70% { opacity: 1; } to { opacity: 1; transform: none; } }
.wi-pts { font: 800 24px var(--display); color: var(--ok); opacity: 0; }
.wi-scene.on .wi-pts { animation: wiFloat 1.4s ease both .8s; }
@keyframes wiFloat { from { opacity: 0; transform: translateY(14px); } 30%, 100% { opacity: 1; transform: none; } }
.wi-rank { width: 100%; }
.wi-rank-names { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.wi-bar { height: 8px; border-radius: 8px; background: var(--panel-2); overflow: hidden; }
.wi-bar i { display: block; height: 100%; width: 8%; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, white)); border-radius: 8px; }
.wi-scene.on .wi-bar i { animation: wiFill 1.8s cubic-bezier(.3, .8, .3, 1) both 1.1s; }
@keyframes wiFill { from { width: 8%; } to { width: 78%; } }

/* 5: the Graveyard, and a candle */
.wi-grave { position: relative; width: min(320px, 92%); }
.wi-grave img { display: block; width: 100%; border-radius: 14px; filter: grayscale(.85) brightness(.7); border: 1px solid var(--line); }
.wi-scene.on .wi-grave img { animation: wiFade 2.4s ease both; }
@keyframes wiFade { from { filter: grayscale(0) brightness(1); } to { filter: grayscale(.85) brightness(.7); } }
.wi-candle { position: absolute; left: 50%; bottom: -16px; translate: -50% 0; width: 22px; height: 46px; }
.wi-candle b { position: absolute; bottom: 0; left: 0; width: 22px; height: 36px; border-radius: 4px 4px 3px 3px; background: linear-gradient(90deg, #e9e2cf, #fbf6e8 45%, #cfc6ad); }
.wi-flame { position: absolute; left: 6px; bottom: 34px; width: 10px; height: 16px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fff6cf, #ffbe45 55%, #ff7a1c); box-shadow: 0 0 24px 8px #ffae4255; opacity: 0; }
.wi-scene.on .wi-flame { animation: wiLight .5s ease both 1.1s, wiFlicker 1.4s ease-in-out infinite 1.6s; }
@keyframes wiLight { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }
@keyframes wiFlicker { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.08, .94) rotate(2deg); } }

.reduce-motion .wi *, .reduce-motion .wi-scene { animation: none !important; transition-duration: .01s !important; }
.reduce-motion .wi-pin, .reduce-motion .wi-pts, .reduce-motion .wi-flame { opacity: 1; } .reduce-motion .wi-bar i { width: 78%; }
@media (prefers-reduced-motion: reduce) {
  .wi *, .wi-scene { animation: none !important; transition-duration: .01s !important; }
  .wi-pin, .wi-pts, .wi-flame { opacity: 1; } .wi-bar i { width: 78%; }
}
