/* 奶蛙雷達 — night pond map, cream field-note cards */

@property --r { syntax: '<length>'; initial-value: 0px; inherits: false; }

:root {
  --ink: #0b1210;
  --ink-2: #111a16;
  --ink-3: #19261f;
  --glass: rgba(11, 18, 15, .92);
  --line: rgba(246, 231, 193, .13);
  --line-2: rgba(246, 231, 193, .22);
  --yellow: #ffd23f;
  --yellow-2: #f0b01a;
  --green: #7ee081;
  --cream: #f6e7c1;
  --paper: #f4e9c8;
  --paper-2: #e9dbae;
  --paper-ink: #2b2315;
  --red: #ff4d5e;
  --text: #e8efe9;
  --muted: #8da398;
  --font-display: 'Huninn', 'Noto Sans TC', system-ui, sans-serif;
  --font-body: 'Noto Sans TC', system-ui, -apple-system, 'PingFang TC', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.2, 1.5, .4, 1);
  --pad: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
/* the map handles its own pinch and wheel zoom; the page itself never scales */
html, body { touch-action: pan-x pan-y; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overscroll-behavior: none; }
body {
  background: var(--ink);
  color: var(--text);
  font: 400 14px/1.5 var(--font-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }
kbd {
  font: 600 11px/1 var(--font-mono);
  padding: 3px 6px; border-radius: 6px;
  border: 1px solid var(--line-2); color: var(--muted);
  background: rgba(255, 255, 255, .04);
}
.ico { width: 20px; height: 20px; flex: none; fill: currentColor; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.m-only { display: none !important; }
.grip { display: none; }

/* ───────── map shell ───────── */
#map { position: fixed; inset: 0; background: var(--ink); }
#vignette { position: fixed; inset: 0 auto auto 0; width: 0; height: 0; z-index: 1; pointer-events: none; }
#vignette::before, #vignette::after { content: ''; position: fixed; left: 0; right: 0; pointer-events: none; }
#vignette::before { top: 0; height: 18vh; background: linear-gradient(180deg, rgba(4, 8, 6, .55), transparent); }
#vignette::after { bottom: 0; height: 20vh; background: linear-gradient(0deg, rgba(4, 8, 6, .5), transparent); }
#grain { display: none; }
#fx { position: fixed; inset: 0; z-index: 55; pointer-events: none; }

.maplibregl-canvas { outline: none; }
.maplibregl-ctrl-attrib {
  background: rgba(11, 18, 16, .55) !important; color: var(--muted) !important;
  font-size: 10px; border-radius: 8px 0 0 0;
}
.maplibregl-ctrl-attrib a { color: var(--muted) !important; }
/* on wide screens the right panel and the report button would sit on top of the map credit: park it beside the panel, above both */
@media (min-width: 861px) { .maplibregl-ctrl-bottom-right { right: calc(var(--pad) + 328px + 14px); bottom: calc(var(--pad) + 86px); } }
@media (min-width: 861px) and (max-width: 1180px) { .maplibregl-ctrl-bottom-right { right: calc(var(--pad) + 296px + 14px); } }
/* the author pill lives in the map's bottom-left corner; on wide screens that corner is under the left panel, so it moves to the panel's right edge */
.maplibregl-ctrl-bottom-left { z-index: 3; bottom: env(safe-area-inset-bottom); }
.author-ctrl { margin: 0 0 8px 8px !important; background: none !important; box-shadow: none !important; }
@media (min-width: 861px) { .maplibregl-ctrl-bottom-left { left: calc(var(--pad) + 300px); bottom: calc(var(--pad) - 6px); } }
.author-spot { position: relative; display: block; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--yellow); background: rgba(11, 18, 16, .72); border: 1px solid rgba(255, 210, 63, .6); border-radius: 999px; padding: 3px 11px; cursor: pointer; }
.author-spot:hover, .author-spot:focus-visible { color: #2a1d00; background: var(--yellow); }
.author-spot .as-short { display: none; }
@media (max-width: 860px) { .author-spot { padding: 3px 8px; } .author-spot .as-long { display: none; } .author-spot .as-short { display: inline; } }
@media (pointer: coarse) { .author-spot::after { content: ''; position: absolute; inset: -12px -2px; } } /* a finger-sized target around the small pill */
.vs { margin: 4px 0 14px; font-size: 13px; }
.vs h4 { font-size: 13.5px; font-weight: 700; line-height: 1.4; margin-bottom: 6px; }
.vs-scroll { max-height: 230px; overflow: auto; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(43, 35, 21, .18); }
.vs table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.vs th, .vs td { padding: 6px 10px; text-align: right; }
.vs th:first-child, .vs td:first-child { text-align: left; }
.vs thead th { position: sticky; top: 0; background: #efe2b8; font-weight: 700; box-shadow: 0 1px 0 rgba(43, 35, 21, .25); }
.vs tbody tr:nth-child(even) { background: rgba(43, 35, 21, .05); }
.vs-note { margin: 8px 0 0 !important; font-size: 12.5px; line-height: 1.6 !important; color: rgba(43, 35, 21, .75); }
.vs-link { display: inline-block; margin-top: 8px; font-weight: 700; font-size: 13px; color: #2b2315; text-underline-offset: 3px; }
.author-card { text-align: center; width: min(100%, 380px); }
.author-mascot { width: 64px; height: 70px; margin: 0 auto 4px; }
.author-card h3 { margin-bottom: 8px; }
.author-card .perm-actions { justify-content: center; }
.author-card .btn { width: 100%; justify-content: center; text-decoration: none; }
.maplibregl-ctrl-bottom-right { z-index: 3; }

/* ───────── shared glass ───────── */
.pill, .panel {
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .05);
}
[data-glow] { position: relative; }
[data-glow]::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 210, 63, .12), transparent 62%);
  opacity: 0; transition: opacity .35s;
}
[data-glow]:hover::after { opacity: 1; }
.panel > *, .pill > * { position: relative; z-index: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 12px;
  font-weight: 700; letter-spacing: .02em; white-space: nowrap;
  transition: transform .2s var(--spring), background .2s, border-color .2s, box-shadow .2s;
}
.btn:active { transform: scale(.96); }
.btn.ghost { border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); }
.btn.ghost:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 210, 63, .5); }
.btn.primary {
  background: var(--yellow); color: #2a1d00;
  box-shadow: 0 6px 0 #b98a10, 0 14px 30px rgba(255, 210, 63, .25);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #b98a10, 0 18px 36px rgba(255, 210, 63, .32); }
.btn.primary:active { transform: translateY(4px); box-shadow: 0 2px 0 #b98a10; }
.btn.wide { width: 100%; }
.btn.big { height: 52px; font-size: 16px; border-radius: 14px; }
.link { color: inherit; text-decoration: underline; text-underline-offset: 3px; font-size: 12.5px; opacity: .8; }
.link:hover { opacity: 1; }

.round {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; color: var(--cream);
  transition: transform .25s var(--spring), color .2s, border-color .2s;
}
.round:hover { transform: translateY(-2px) scale(1.06); color: var(--yellow); border-color: rgba(255, 210, 63, .45); }
.round:active { transform: scale(.94); }
.round[aria-pressed='true'] { color: var(--yellow); border-color: rgba(255, 210, 63, .6); }

/* ───────── top bar ───────── */
#topbar {
  position: fixed; top: var(--pad); left: calc(var(--pad) + env(safe-area-inset-left)); right: calc(var(--pad) + env(safe-area-inset-right)); z-index: 20;
  display: flex; align-items: center; gap: 12px; pointer-events: none;
}
#topbar > * { pointer-events: auto; }
/* The name keeps the width it needs; the search box is what gives way on a narrow screen. */
.brand { display: flex; flex: none; align-items: center; gap: 10px; height: 52px; padding: 0 20px 0 8px; border-radius: 26px; }
.brand-mascot { flex: none; width: 40px; height: 44px; margin-top: -4px; transition: transform .3s var(--spring); }
.brand-mascot:hover { transform: rotate(-8deg) scale(1.12); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.brand-text strong { font: 400 21px/1.1 var(--font-display); color: var(--yellow); letter-spacing: .04em; text-shadow: 2px 2px 0 #3a1d1a; white-space: nowrap; }
.brand-text span { font-size: 11px; color: var(--muted); letter-spacing: .08em; }
body.is-admin .brand-text span::after { content: '・管理員'; color: var(--yellow); }

.search {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px;
  border-radius: 26px; flex: 0 1 520px; min-width: 0; margin: 0 auto;
  transition: border-color .25s, box-shadow .25s;
}
.search:focus-within { border-color: rgba(255, 210, 63, .6); box-shadow: 0 0 0 4px rgba(255, 210, 63, .12), 0 18px 50px rgba(0, 0, 0, .42); }
.search .ico { color: var(--muted); }
.search input {
  flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none;
  font-size: 15px; color: var(--text);
}
.search input::placeholder { color: #6b8177; }
.search input::-webkit-search-cancel-button { display: none; }
.results {
  position: absolute; top: 60px; left: 0; right: 0; z-index: 5;
  background: rgba(13, 21, 17, .96); border: 1px solid var(--line-2); border-radius: 18px; padding: 6px;
  max-height: 60vh; overflow: auto; box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  animation: drop-in .25s var(--ease-out);
}
.results li {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; cursor: pointer;
}
.results li.on, .results li:hover { background: rgba(255, 210, 63, .12); }
.results .r-name { font-weight: 500; }
.results .r-name mark { background: none; color: var(--yellow); }
.results .r-meta { margin-left: auto; font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.results .r-badge { font: 600 11px/1 var(--font-mono); background: var(--yellow); color: #2a1d00; padding: 3px 6px; border-radius: 6px; }
.results .r-kind {
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: rgba(246, 231, 193, .08); color: var(--cream); font-size: 14px;
}
.results .r-empty { padding: 14px; color: var(--muted); text-align: center; cursor: default; }
.results .r-empty:hover { background: none; }

.top-right { display: flex; align-items: center; gap: 10px; }
.live {
  display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 21px;
  font-size: 13px; white-space: nowrap;
}
.live b { font: 600 15px var(--font-mono); color: var(--yellow); min-width: 1.4ch; text-align: right; }
.live-unit { color: var(--muted); font-size: 12px; }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.live-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: rgba(255, 77, 94, .7); animation: live 1.8s ease-out infinite; }

/* ───────── latest tip-off ───────── */
.intel {
  position: fixed; z-index: 19; top: 76px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 5px 12px 5px 8px; border-radius: 20px;
  width: min(560px, calc(100vw - 690px)); min-width: 250px; text-align: left; font-size: 13px; line-height: 1.35;
  transition: opacity .4s, transform .3s var(--spring), border-color .2s;
  animation: intel-in .8s var(--spring) both .3s;
}
.intel:hover { border-color: rgba(255, 210, 63, .5); transform: translateX(-50%) translateY(-2px); }
.intel-stamp {
  flex: none; font: 400 12px/1 var(--font-display); letter-spacing: .14em; color: #ff6b73;
  border: 2px solid #ff6b73; border-radius: 6px; padding: 4px 4px 4px 7px; transform: rotate(-4deg);
}
.intel.fresh .intel-stamp { animation: stamp-thud 2.8s ease-in-out infinite; }
.intel-text { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.intel-text b { color: var(--yellow); font-weight: 700; }
.intel.old .intel-text { color: var(--muted); }
.intel .ico { flex: none; width: 16px; height: 16px; color: var(--muted); }
body.booting .intel, body.picking .intel, body.replaying .intel { opacity: 0 !important; pointer-events: none !important; }
@keyframes intel-in { from { opacity: 0; transform: translateX(-50%) translateY(-14px) scale(.9); } }
@keyframes stamp-thud { 0%, 82%, 100% { transform: rotate(-4deg) scale(1); } 90% { transform: rotate(-4deg) scale(1.18); } }

/* ───────── side panels ───────── */
.panel {
  position: fixed; top: 80px; bottom: var(--pad); z-index: 10; width: 300px;
  border-radius: 24px; display: flex; flex-direction: column; overflow: hidden;
  transition: transform .6s var(--ease-out), opacity .4s;
}
#left { left: var(--pad); }
#right { right: var(--pad); width: 328px; }
body.booting .panel { opacity: 0; }
body.booting #left { transform: translateX(-40px); }
body.booting #right { transform: translateX(40px); }
.panel-scroll { overflow-y: auto; flex: 1; min-height: 0; scrollbar-width: thin; scrollbar-color: rgba(246, 231, 193, .2) transparent; overscroll-behavior: contain; }
.panel-scroll::-webkit-scrollbar { width: 6px; }
.panel-scroll::-webkit-scrollbar-thumb { background: rgba(246, 231, 193, .18); border-radius: 3px; }
#left .panel-scroll { padding: 6px 18px 18px; }
.panel-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; z-index: 3; color: var(--muted); border-radius: 50%; }

.sec { padding: 14px 0 16px; border-bottom: 1px solid var(--line); }
.sec:last-child { border-bottom: 0; }
.sec h2 { font: 400 15px/1.3 var(--font-display); color: var(--cream); letter-spacing: .06em; margin-bottom: 10px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; }
.mini-actions { display: flex; gap: 2px; }
.mini-actions button { font-size: 12px; color: var(--muted); padding: 2px 8px; border-radius: 8px; transition: color .2s, background .2s; }
.mini-actions button:hover { color: var(--yellow); background: rgba(255, 210, 63, .1); }

.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.chip {
  position: relative; height: 34px; border-radius: 11px; font-size: 13px; color: var(--text);
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
  display: flex; align-items: center; justify-content: space-between; padding: 0 10px 0 12px;
  transition: all .25s var(--ease-out);
}
.chip.all { grid-column: 1 / -1; justify-content: center; gap: 8px; }
.chip small { font: 600 11px var(--font-mono); color: var(--muted); }
.chip:hover { border-color: rgba(255, 210, 63, .5); transform: translateY(-1px); }
.chip.on { background: var(--yellow); color: #2a1d00; border-color: var(--yellow); font-weight: 700; }
.chip.on small { color: rgba(42, 29, 0, .65); }

.cat-list { display: grid; gap: 4px; }
.cat {
  display: grid; grid-template-columns: 34px 1fr auto 30px; align-items: center; gap: 10px;
  width: 100%; text-align: left; padding: 7px 8px; border-radius: 14px;
  transition: background .2s, opacity .3s, transform .25s var(--ease-out);
}
.cat:hover { background: rgba(255, 255, 255, .05); transform: translateX(3px); }
.cat-badge {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c); color: #1a1305; --cut: var(--c);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .06), 0 4px 10px rgba(0, 0, 0, .35);
  transition: filter .3s, transform .35s var(--spring);
}
.cat-badge .ico { width: 20px; height: 20px; }
.cat:hover .cat-badge { transform: rotate(-10deg) scale(1.1); }
.cat-name { display: block; font-weight: 500; line-height: 1.25; }
.cat-desc { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.cat-n { font: 600 12px var(--font-mono); color: var(--muted); min-width: 2ch; text-align: right; }
.cat-tick {
  width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-2);
  display: grid; place-items: center; color: transparent; transition: all .25s var(--spring);
}
.cat-tick .ico { width: 14px; height: 14px; }
.cat[aria-pressed='true'] .cat-tick { background: var(--c); border-color: var(--c); color: #1a1305; }
.cat[aria-pressed='false'] { opacity: .5; }
.cat[aria-pressed='false'] .cat-badge { filter: grayscale(1) brightness(.7); }

.seg { position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); border: 1px solid var(--line); border-radius: 13px; padding: 3px; background: rgba(0, 0, 0, .2); }
.seg button { position: relative; z-index: 1; height: 30px; font-size: 12.5px; color: var(--muted); border-radius: 10px; transition: color .25s; white-space: nowrap; }
.seg button.on { color: #2a1d00; font-weight: 700; }
.seg .thumb, .tabs .thumb {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n, 2));
  transform: translateX(calc(var(--i) * 100%)); border-radius: 10px; background: var(--yellow);
  transition: transform .45s var(--spring);
}

.switches { display: grid; gap: 2px; }
.sw { display: flex; align-items: center; gap: 12px; padding: 7px 4px; cursor: pointer; border-radius: 10px; }
.sw:hover { background: rgba(255, 255, 255, .04); }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw i {
  position: relative; flex: none; width: 38px; height: 22px; border-radius: 11px; background: rgba(246, 231, 193, .14);
  transition: background .3s; order: 2; margin-left: auto;
}
.sw i::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--cream);
  transition: transform .35s var(--spring), background .3s;
}
.sw input:checked + i { background: var(--green); }
.sw input:checked + i::after { transform: translateX(16px); background: #fff; }
.sw input:focus-visible + i { outline: 2px solid var(--yellow); outline-offset: 2px; }
.sw span { flex: 1; font-weight: 500; }
.sw small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }

.progress { margin-bottom: 12px; }
.progress-top { display: flex; align-items: baseline; justify-content: space-between; }
.progress-top span { font-size: 13px; color: var(--muted); }
.progress-top b { font: 600 15px var(--font-mono); color: var(--yellow); }
.bar { height: 10px; border-radius: 5px; background: rgba(246, 231, 193, .1); overflow: hidden; margin: 2px 0 8px; }
.bar i {
  display: block; height: 100%; width: 0; border-radius: 5px;
  background: linear-gradient(90deg, var(--yellow-2), var(--yellow), #fff1a8);
  transition: width .8s var(--ease-out);
}
.progress p { font-size: 12px; color: var(--muted); }

/* right panel */
#right { padding-top: 14px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 14px; }
.stat { padding: 10px 6px 8px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); text-align: center; }
.stat b { display: block; font: 400 24px/1.1 var(--font-display); color: var(--yellow); white-space: nowrap; }
.stat span { font-size: 11px; color: var(--muted); }
.hot {
  display: flex; align-items: center; gap: 8px; margin: 10px 14px 0; padding: 8px 12px; border-radius: 12px; font-size: 12.5px;
  background: linear-gradient(90deg, rgba(255, 138, 61, .18), rgba(255, 138, 61, .04)); border: 1px solid rgba(255, 138, 61, .3);
}
.hot .ico { color: #ff8a3d; width: 16px; height: 16px; animation: flicker 1.6s ease-in-out infinite; }
.hot b { color: var(--cream); }
.tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; --n: 2; margin: 12px 14px 8px; border: 1px solid var(--line); border-radius: 13px; padding: 3px; background: rgba(0, 0, 0, .2); }
.tabs button { position: relative; z-index: 1; height: 32px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--muted); border-radius: 10px; transition: color .25s; }
.tabs button .ico { width: 16px; height: 16px; }
.tabs button.on { color: #2a1d00; font-weight: 700; }
#right .panel-scroll { padding: 0 8px 12px; }

.feed { display: grid; gap: 2px; }
.fi {
  display: grid; grid-template-columns: 38px 1fr auto; gap: 11px; align-items: start; width: 100%; text-align: left;
  padding: 10px 10px; border-radius: 15px; transition: background .2s, transform .3s var(--ease-out);
  animation: feed-in .5s var(--ease-out) both; animation-delay: calc(var(--d, 0) * 40ms);
}
.fi:hover { background: rgba(255, 255, 255, .06); transform: translateX(-3px); }
.fi.flash { animation: flash 1.8s ease-out; }
.fi-ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #1a1305; --cut: var(--c); box-shadow: 0 0 0 3px rgba(255, 255, 255, .05); }
.fi-title { font-weight: 700; font-size: 14px; line-height: 1.3; }
.fi-title em { font-style: normal; font-weight: 500; font-size: 11.5px; color: var(--c); margin-left: 6px; }
.fi-note { font-size: 12.5px; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 1px; }
.fi-side { text-align: right; font: 400 11px/1.4 var(--font-mono); color: var(--muted); white-space: nowrap; }
.fi-side span { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: 3px; color: var(--cream); }
.fi-side .ico { width: 12px; height: 12px; }
.fi.fresh .fi-side time { color: var(--yellow); }
.fi-side .fi-t { margin-top: 0; justify-content: flex-end; color: inherit; }
.fi-side .cam { color: var(--yellow); width: 13px; height: 13px; }
/* a report with a photo shows the photo; one without keeps the round dashed icon and a 疑似 tag */
.fi { position: relative; }
.fi.has-photo .fi-ico { position: relative; width: 46px; height: 46px; border-radius: 11px; overflow: visible; box-shadow: 0 0 0 2px rgba(255, 247, 224, .85), 0 3px 8px rgba(0, 0, 0, .5); }
.fi.has-photo .fi-ico img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 11px; }
.fi-cat { position: absolute; right: -6px; bottom: -6px; width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #1a1305; border: 2px solid #1b2420; }
.fi-cat .ico { width: 11px; height: 11px; }
.fi.no-photo .fi-ico { background: transparent; color: var(--c); border: 2px dashed var(--c); box-shadow: none; }
.fi.no-photo > * { opacity: var(--fade, 1); } /* on the children: the row's own entrance animation owns its opacity */
.fi.has-photo { grid-template-columns: 46px 1fr auto; }
.sus { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; font: 600 10.5px/16px var(--font-body); color: var(--yellow); border: 1px dashed rgba(255, 210, 63, .65); vertical-align: 1px; white-space: nowrap; }
.paper .sus { color: #8a5a00; border-color: rgba(138, 90, 0, .65); }
.fi.seen { box-shadow: inset 3px 0 0 #7ee081; }
.fi.seen .fi-eye { color: #7ee081; font-weight: 700; }
.day-btn { display: flex; width: auto; margin: 10px 14px 0; color: var(--yellow); border-color: rgba(255, 210, 63, .5); }
.day-btn .ico { width: 18px; height: 18px; }
.hist-btn { margin-top: 8px; color: var(--cream); border-color: var(--line-2); text-decoration: none; }
/* a day of the frog: today's reports as a timeline on paper */
.day-card { width: min(100%, 520px); }
.day-lead { font-size: 14px; line-height: 1.65; }
.day-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.day-chips span { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(43, 35, 21, .09); }
.tl { list-style: none; margin: 0; padding: 0; }
.tl-part { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; font: 400 17px/1.2 var(--font-display); }
.tl-part::after { content: ''; flex: 1; border-top: 1.5px dashed rgba(43, 35, 21, .28); }
.tl-item { position: relative; padding: 0 0 14px 76px; }
.tl-item::before { content: ''; position: absolute; left: 61px; top: 18px; bottom: -2px; border-left: 2px solid rgba(43, 35, 21, .2); }
.tl-item:last-child::before { display: none; }
.tl-time { position: absolute; left: 0; top: 4px; width: 46px; text-align: right; font: 600 12.5px/1.3 var(--font-mono); color: rgba(43, 35, 21, .72); }
.tl-dot { position: absolute; left: 54px; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--c); border: 3px solid #fbf3d9; box-shadow: 0 0 0 2px rgba(43, 35, 21, .35); }
.tl-item.has-photo .tl-dot { left: 52px; top: 3px; width: 20px; height: 20px; border-radius: 6px; border-bottom-width: 5px; }
.tl-item.no-photo .tl-dot { background: transparent; border: 2px dashed rgba(43, 35, 21, .55); box-shadow: none; width: 16px; height: 16px; left: 54px; }
.tl-card { display: block; width: 100%; text-align: left; border-radius: 12px; color: inherit; }
.tl-card:hover .tl-title { text-decoration: underline; text-underline-offset: 3px; }
.tl-item.has-photo .tl-card { overflow: hidden; background: #fffdf4; border: 1px solid rgba(43, 35, 21, .2); box-shadow: 0 7px 18px rgba(43, 35, 21, .16); }
.tl-photo { position: relative; display: block; }
.tl-photo img { display: block; width: 100%; max-height: 230px; object-fit: cover; background: rgba(43, 35, 21, .1); }
.tl-photo b { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(26, 19, 5, .78); color: #fff1a8; font: 700 12px/1.5 var(--font-mono); }
.tl-item.has-photo .tl-body { padding: 9px 12px 11px; }
.tl-item.no-photo .tl-card { padding: 2px 0; opacity: var(--fade, 1); }
.tl-item.gone .tl-card { opacity: .5; }
.tl-body { display: grid; gap: 2px; }
.tl-title { font-weight: 700; font-size: 14.5px; line-height: 1.4; }
.tl-title em { font-style: normal; font-weight: 600; font-size: 12px; margin-left: 6px; }
.tl-note { font-size: 13.5px; line-height: 1.5; color: rgba(43, 35, 21, .82); }
.tl-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12px; color: rgba(43, 35, 21, .6); }
.tl-seen { display: inline-flex; align-items: center; gap: 4px; color: #1f6a35; font-weight: 700; }
.tl-seen .ico { width: 13px; height: 13px; }
.feed-note { margin: 0 6px 8px; padding: 8px 10px; font-size: 12px; line-height: 1.55; color: var(--muted); border-radius: 10px; border: 1px dashed var(--line-2); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 2px 2px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.lg { position: relative; width: 14px; height: 14px; margin: 2px; flex: none; background: var(--yellow); border: 2px dashed #fff7e0; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .5); filter: saturate(.55); }
.lg-seen { width: 18px; height: 18px; margin: 0; border-style: solid; filter: none; box-shadow: 0 0 0 3px #3ecf64; }
.lg-photo { width: 18px; height: 18px; margin: 0; filter: none; border-style: solid; border-radius: 5px; border-bottom-width: 5px; transform: rotate(-4deg); }
.lg-photo::after { content: ''; position: absolute; left: -6px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: #1a1305; border: 1.5px solid #fff7e0; }
.sec-photo { margin-top: 8px; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; font: 400 17px var(--font-display); color: var(--cream); margin-bottom: 4px; }

.board { display: grid; gap: 4px; padding: 4px 6px; }
.bd { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .03); animation: feed-in .5s var(--ease-out) both; animation-delay: calc(var(--d, 0) * 50ms); }
.bd-rank { font: 400 22px var(--font-display); color: var(--muted); text-align: center; }
.bd:nth-child(1) .bd-rank { color: var(--yellow); }
.bd:nth-child(2) .bd-rank { color: #d6dde0; }
.bd:nth-child(3) .bd-rank { color: #e0a070; }
.bd-name { font-weight: 700; }
.bd-name small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); }
.bd-pts { font: 600 14px var(--font-mono); color: var(--yellow); }
.bd.me { border: 1px solid rgba(255, 210, 63, .45); background: rgba(255, 210, 63, .08); }

/* ───────── paper cards ───────── */
.paper {
  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .27  0 0 0 0 .1  0 0 0 .1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  position: fixed; z-index: 30; color: var(--paper-ink);
  background: var(--noise), linear-gradient(180deg, #f8efd2, var(--paper) 40%, var(--paper-2));
  border-radius: 6px 6px 14px 14px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .1), 0 30px 70px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(120, 90, 30, .12);
}
.paper::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, .5), transparent 60%);
}
.tape {
  position: absolute; top: -13px; left: 50%; width: 112px; height: 28px; z-index: 3;
  background: rgba(255, 210, 63, .8); transform: translateX(-50%) rotate(-2.5deg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  clip-path: polygon(0 0, 4% 25%, 0 50%, 4% 75%, 0 100%, 100% 100%, 96% 75%, 100% 50%, 96% 25%, 100% 0);
}
.paper-close {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; color: var(--paper-ink); opacity: .6; z-index: 4; transition: opacity .2s, transform .25s var(--spring), background .2s;
}
.paper-close:hover { opacity: 1; background: rgba(43, 35, 21, .08); transform: rotate(90deg); }

#detail {
  top: 80px; right: var(--pad); width: 340px; max-height: calc(100% - 94px); overflow-y: auto; overflow-x: hidden;
  transform: translateX(calc(100% + 40px)) rotate(3deg); opacity: 0; pointer-events: none;
  transition: transform .65s var(--spring), opacity .3s;
  scrollbar-width: none;
}
#detail::-webkit-scrollbar { display: none; }
body.has-detail #detail { transform: none; opacity: 1; pointer-events: auto; }
@media (min-width: 861px) { body.has-detail #right { opacity: 0; pointer-events: none; transform: translateX(36px); } }
#detail-body { padding: 26px 22px 20px; position: relative; }

.d-top { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 10px; padding-right: 30px; }
.stamp {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font: 400 15px/1 var(--font-display); color: var(--cd); letter-spacing: .08em;
  border: 2.5px solid var(--cd); border-radius: 9px; padding: 6px 10px 6px 8px;
  transform: rotate(-4deg); mix-blend-mode: multiply; opacity: .94;
  animation: stamp .55s var(--spring) both .15s;
}
.stamp .ico { width: 18px; height: 18px; --cut: var(--paper); }
.stamp.sm { font-size: 12px; padding: 3px 8px; border-width: 2px; }
.d-title { font: 400 22px/1.25 var(--font-display); margin: 14px 0 2px; }
.d-where { font-size: 12.5px; color: rgba(43, 35, 21, .7); display: flex; align-items: center; gap: 5px; }
.d-where .ico { width: 14px; height: 14px; }
.d-photo { margin: 14px -6px 0; padding: 7px 7px 26px; background: #fffdf4; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); transform: rotate(-1.4deg); position: relative; }
.d-photo img { display: block; width: 100%; max-height: 220px; object-fit: cover; }
.d-photo span { position: absolute; left: 0; right: 0; bottom: 5px; text-align: center; font: 400 12px var(--font-display); color: rgba(43, 35, 21, .6); }
.d-note {
  margin: 14px 0 0; padding: 2px 4px; font-size: 15px; line-height: 28px; min-height: 56px;
  background-image: repeating-linear-gradient(transparent 0 27px, rgba(120, 90, 30, .18) 27px 28px);
}
.d-note.none { color: rgba(43, 35, 21, .45); font-style: italic; }
.d-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 16px; padding-top: 14px; border-top: 1.5px dashed rgba(43, 35, 21, .25); }
.d-meta dt { font-size: 11.5px; color: rgba(43, 35, 21, .6); }
.d-meta dd { font-weight: 700; font-size: 13.5px; }
.d-meta dd small { font: 400 11px var(--font-mono); font-weight: 400; display: block; color: rgba(43, 35, 21, .6); }
.mood { display: inline-flex; gap: 1px; font: 400 17px/1 var(--font-display); }
.mood i { font-style: normal; color: #a87500; opacity: .2; }
.mood i.on { opacity: 1; }
.d-votes { display: flex; align-items: center; gap: 16px; margin-top: 16px; font-size: 13px; }
.d-votes span { display: inline-flex; align-items: center; gap: 5px; }
.d-votes b { font: 600 15px var(--font-mono); }
.d-votes .ico { width: 16px; height: 16px; }
.d-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.d-actions .btn { height: 42px; border-radius: 12px; }
.d-actions .btn.primary { box-shadow: 0 5px 0 #b98a10; }
.d-actions .btn.primary:active { box-shadow: 0 1px 0 #b98a10; transform: translateY(4px); }
.d-actions .btn.primary[disabled] { background: #d9cfae; color: rgba(43, 35, 21, .6); box-shadow: 0 3px 0 #bfb48f; cursor: default; transform: none; }
.paper .btn.ghost { border-color: rgba(43, 35, 21, .3); background: rgba(43, 35, 21, .04); color: var(--paper-ink); }
.paper .btn.ghost:hover { background: rgba(43, 35, 21, .1); border-color: rgba(43, 35, 21, .6); }
.paper .btn.ghost.on { background: var(--green); border-color: #2e8a48; color: #0c3a1b; }
.d-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.d-row2 .btn { height: 38px; font-size: 13px; }
.d-demo { margin-top: 14px; font-size: 11.5px; color: rgba(43, 35, 21, .55); text-align: center; }

/* ───────── map tools + dock ───────── */
#map-tools { position: fixed; z-index: 12; right: var(--pad); bottom: 100px; display: grid; gap: 8px; transition: right .6s var(--ease-out), opacity .4s; }
body.booting #map-tools { opacity: 0; }
@media (min-width: 861px) { #map-tools { right: calc(var(--pad) + 328px + 14px); bottom: var(--pad); display: flex; } }
#north-ico { transition: transform .2s linear; }

#dock {
  position: fixed; z-index: 25; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px;
  transition: opacity .4s, transform .6s var(--ease-out);
}
body.booting #dock { opacity: 0; transform: translate(-50%, 40px); }
#fab {
  position: relative; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 26px 0 12px; border-radius: 32px;
  background: var(--yellow); color: #2a1d00; font: 400 21px/1 var(--font-display); letter-spacing: .06em;
  box-shadow: 0 7px 0 #b98a10, 0 22px 44px rgba(255, 210, 63, .28), inset 0 2px 0 rgba(255, 255, 255, .5);
  transition: transform .25s var(--spring), box-shadow .25s;
}
#fab:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 10px 0 #b98a10, 0 28px 54px rgba(255, 210, 63, .38), inset 0 2px 0 rgba(255, 255, 255, .5); }
#fab:active { transform: translateY(5px); box-shadow: 0 2px 0 #b98a10, 0 8px 20px rgba(255, 210, 63, .25); }
#fab kbd { border-color: rgba(42, 29, 0, .3); color: rgba(42, 29, 0, .6); background: rgba(255, 255, 255, .35); margin-left: 2px; }
.fab-pulse { position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--yellow); animation: fab-pulse 2.6s ease-out infinite; pointer-events: none; }
.fab-pulse.p2 { animation-delay: 1.3s; }
.fab-mascot { width: 42px; height: 46px; margin-top: -8px; margin-bottom: 0; pointer-events: none; }
#fab:hover .mascot { animation: jig .22s ease-in-out infinite; }
#fab:hover .m-mouth, #fab:hover .m-tongue { animation: mouth .22s ease-in-out infinite alternate; }
.round-big {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: var(--cream);
  background: var(--glass); border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
}

/* ───────── picker ───────── */
body.picking .panel, body.picking #topbar, body.picking #dock, body.picking #map-tools, body.picking #detail { opacity: 0 !important; pointer-events: none !important; }
body.picking #left { transform: translateX(-30px); }
body.picking #right { transform: translateX(30px); }
#picker { position: fixed; inset: 0; z-index: 35; pointer-events: none; animation: fade-in .4s; }
#picker > * { pointer-events: auto; }
.pk-top { position: absolute; top: calc(var(--pad) + 6px); left: 50%; transform: translateX(-50%); text-align: center; width: min(92vw, 460px); display: grid; gap: 10px; justify-items: center; }
.pk-hint { font: 400 22px/1.2 var(--font-display); color: var(--cream); text-shadow: 0 2px 0 rgba(0, 0, 0, .6), 0 0 24px rgba(0, 0, 0, .8); animation: pk-hint 2.4s ease-in-out infinite; }
.pk-place {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px 9px 14px; border-radius: 22px;
  background: var(--glass); border: 1px solid var(--line-2); box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
  transition: border-color .3s, background .3s;
}
.pk-place .ico { color: var(--green); width: 18px; height: 18px; transition: color .3s; }
.pk-place span { font-size: 12.5px; color: var(--muted); }
.pk-place b { font-weight: 700; }
.pk-place[data-state='out'] { border-color: var(--red); background: rgba(60, 14, 20, .8); }
.pk-place[data-state='out'] .ico { color: var(--red); }
.pk-warn { font-size: 13px; color: #ffb0b8; background: rgba(60, 14, 20, .85); padding: 6px 14px; border-radius: 12px; animation: shake .45s; }
.pk-reticle { position: absolute; left: 50%; top: 50%; width: 132px; height: 132px; margin: -66px 0 0 -66px; pointer-events: none; color: var(--yellow); transition: color .3s; }
.pk-reticle svg { width: 100%; height: 100%; overflow: visible; }
.pk-reticle .r-ring { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-dasharray: 4 6; transform-origin: 60px 60px; animation: spin 14s linear infinite; }
.pk-reticle .r-ring.r2 { stroke-dasharray: none; opacity: .5; animation: reticle-ping 1.8s ease-out infinite; }
.pk-reticle .r-br { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transform-origin: 60px 60px; animation: breathe 1.8s ease-in-out infinite; }
.pk-reticle .r-frog { fill: currentColor; transform-origin: 60px 64px; animation: frog-hop 1.2s ease-in-out infinite; }
.pk-reticle .r-pupil { fill: var(--ink); }
.pk-reticle.moving .r-frog { animation: none; transform: translateY(-4px) scale(1.15); }
.pk-reticle.out { color: var(--red); animation: shake .45s; }
.pk-bar { position: absolute; left: 50%; bottom: calc(var(--pad) + 14px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 10px; align-items: center; animation: rise .5s var(--ease-out); }
.pk-bar .btn { height: 50px; padding: 0 22px; border-radius: 25px; }
.pk-bar .btn.ghost { background: var(--glass); }
.pk-bar .btn.primary[disabled] { background: #5a5640; color: #a9a58a; box-shadow: 0 6px 0 #3f3c2c; cursor: not-allowed; }

/* ───────── report form ───────── */
#report-wrap { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; }
.scrim { position: absolute; inset: 0; background: rgba(4, 8, 6, .74); animation: fade-in .3s; }
#report {
  position: relative; width: min(100%, 480px); max-height: calc(100dvh - 32px); overflow-y: auto; overflow-x: hidden;
  padding: 30px 24px 22px; animation: paper-in .6s var(--spring) both; scrollbar-width: none;
}
#report::-webkit-scrollbar { display: none; }
#report h3, .modal-card h3 { font: 400 25px/1.2 var(--font-display); margin-bottom: 14px; }
#report fieldset { border: 0; margin-bottom: 16px; min-width: 0; }
#report legend { font-weight: 700; font-size: 13.5px; margin-bottom: 8px; display: flex; justify-content: space-between; width: 100%; }
#report legend b { font: 400 14px var(--font-display); color: #a87500; }
.rp-where { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 16px; border-radius: 10px; background: rgba(43, 35, 21, .07); border: 1.5px dashed rgba(43, 35, 21, .3); }
.rp-where .ico { color: #1f8a3c; }
.rp-where div { flex: 1; min-width: 0; }
.rp-where b { display: block; line-height: 1.3; }
.rp-where small { font: 400 11px var(--font-mono); color: rgba(43, 35, 21, .6); }
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tcard { position: relative; }
.tcard input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tcard label {
  display: grid; justify-items: center; gap: 6px; padding: 12px 4px 10px; border-radius: 12px; text-align: center; cursor: pointer;
  background: rgba(43, 35, 21, .05); border: 2px solid transparent; transition: all .25s var(--spring); height: 100%;
}
.tcard:hover label { background: rgba(43, 35, 21, .09); }
.tcard:hover .cat-badge { transform: translateY(-2px) rotate(-8deg); }
.tcard .cat-badge { width: 38px; height: 38px; box-shadow: 0 3px 8px rgba(43, 35, 21, .3); }
.tcard b { font-size: 13px; line-height: 1.2; }
.tcard small { font-size: 10.5px; line-height: 1.25; color: rgba(43, 35, 21, .6); display: block; }
.tcard input:checked + label { border-color: var(--cd); background: rgba(255, 255, 255, .6); transform: translateY(-3px) rotate(-1.2deg); box-shadow: 0 8px 18px rgba(43, 35, 21, .2); }
.tcard input:checked + label::after {
  content: ''; position: absolute; top: -7px; right: -5px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--cd) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 12.6l4 4L18 8' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 70% no-repeat;
  animation: pop .4s var(--spring);
}
.tcard input:focus-visible + label { outline: 2px solid var(--paper-ink); outline-offset: 2px; }
.mood-wrap { position: relative; padding: 0 4px; }
.mood-faces { display: flex; justify-content: space-between; font-size: 20px; margin-top: 2px; }
.mood-faces span { transition: transform .3s var(--spring); }
.mood-faces span.on { transform: scale(1.5) translateY(-2px); }
input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: none; cursor: pointer; --p: 75%; }
input[type='range']::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #e0a000 var(--p), rgba(43, 35, 21, .18) var(--p)); }
input[type='range']::-moz-range-track { height: 8px; border-radius: 4px; background: rgba(43, 35, 21, .18); }
input[type='range']::-moz-range-progress { height: 8px; border-radius: 4px; background: #e0a000; }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--paper-ink); box-shadow: 0 3px 0 rgba(43, 35, 21, .35); transition: transform .2s var(--spring); }
input[type='range']::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--paper-ink); }
input[type='range']:active::-webkit-slider-thumb { transform: scale(1.2); }
.when-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.when-chips button {
  height: 32px; padding: 0 13px; border-radius: 16px; font-size: 13px; border: 1.5px solid rgba(43, 35, 21, .3);
  transition: all .25s var(--spring);
}
.when-chips button:hover { background: rgba(43, 35, 21, .08); }
.when-chips button.on { background: var(--paper-ink); color: var(--paper); border-color: var(--paper-ink); transform: translateY(-1px); }
.rp-field { display: block; margin-bottom: 14px; }
.rp-field > span { display: flex; justify-content: space-between; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.rp-field em { font: 400 11px var(--font-mono); font-style: normal; color: rgba(43, 35, 21, .55); align-self: center; }
.rp-field textarea, .rp-field input {
  width: 100%; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .55); border: 1.5px solid rgba(43, 35, 21, .25);
  outline: none; resize: none; color: var(--paper-ink); transition: border-color .2s, box-shadow .2s;
}
.rp-field textarea:focus, .rp-field input:focus { border-color: var(--paper-ink); box-shadow: 0 0 0 3px rgba(255, 210, 63, .55); }
.rp-field ::placeholder { color: rgba(43, 35, 21, .4); }
.rp-photos legend em { font: 400 11px var(--font-mono); font-style: normal; color: rgba(43, 35, 21, .55); align-self: center; }
.photo-row { display: flex; gap: 8px; padding: 6px; margin: -6px; border-radius: 14px; transition: background .2s, outline-color .2s; outline: 2px dashed transparent; }
.photo-row.drag { background: rgba(255, 210, 63, .35); outline-color: var(--paper-ink); }
.photo-add, .photo-thumb { flex: none; width: 84px; height: 84px; border-radius: 12px; position: relative; }
.photo-add {
  display: grid; place-content: center; justify-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--paper-ink);
  border: 2px dashed rgba(43, 35, 21, .4); background: rgba(43, 35, 21, .04); transition: transform .25s var(--spring), background .2s, border-color .2s;
}
.photo-add:hover { background: rgba(255, 210, 63, .45); border-color: var(--paper-ink); transform: translateY(-2px) rotate(-1.5deg); }
.photo-add[hidden] { display: none; }
.photo-thumb { overflow: hidden; border: 2px solid var(--paper-ink); background: #fff; box-shadow: 0 4px 0 rgba(43, 35, 21, .25); animation: pop .4s var(--spring) both; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .7); color: #fff; display: grid; place-items: center; }
.photo-thumb button .ico { width: 12px; height: 12px; }
.photo-thumb.busy::after { content: ''; position: absolute; inset: 0; background: rgba(255, 255, 255, .7) center / 28px no-repeat url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='9' fill='none' stroke='%232b2315' stroke-width='3' stroke-dasharray='28 20' stroke-linecap='round'><animateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='.8s' repeatCount='indefinite'/></circle></svg>"); }
.photo-hint { font-size: 11.5px; color: rgba(43, 35, 21, .6); margin-top: 8px; line-height: 1.5; }
/* 本蛙現身 cannot be sent without a photo: the add button turns urgent and says why */
.spot-need { margin-top: 10px; font-size: 13px; font-weight: 700; line-height: 1.5; color: #a8260f; }
.photo-add.need { border-color: #a8260f; background: rgba(168, 38, 15, .1); animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(-3px) rotate(-1.5deg); } }
@media (prefers-reduced-motion: reduce) { .photo-add.need { animation: none; } }
#rp-submit { width: 100%; }

/* detail: photo strip + lightbox */
.d-photos { display: grid; gap: 8px; margin: 16px -4px 0; }
.d-photos.n1 { grid-template-columns: 1fr; }
.d-photos.n2 { grid-template-columns: 1fr 1fr; }
.d-photos.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.d-photos.n3 .shot:first-child { grid-row: 1 / 3; }
.shot { position: relative; padding: 6px 6px 18px; background: #fffdf4; box-shadow: 0 5px 14px rgba(0, 0, 0, .28); transform: rotate(var(--rot, 0deg)); transition: transform .3s var(--spring), box-shadow .3s; cursor: zoom-in; overflow: hidden; }
.shot:nth-child(1) { --rot: -1.6deg; }
.shot:nth-child(2) { --rot: 1.4deg; }
.shot:nth-child(3) { --rot: -.8deg; }
.shot:hover { transform: rotate(0) scale(1.03); box-shadow: 0 10px 24px rgba(0, 0, 0, .35); z-index: 2; }
.shot img { display: block; width: 100%; height: 100%; min-height: 90px; max-height: 240px; object-fit: cover; background: #e9dfc0; }
.d-photos.n3 .shot img { max-height: none; }
.shot:focus-visible { outline: 2px solid var(--paper-ink); outline-offset: 2px; }

#lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; animation: fade-in .25s; }
.lb-scrim { position: absolute; inset: 0; background: rgba(4, 8, 6, .92); }
#lb-img { position: relative; max-width: min(94vw, 1100px); max-height: 84vh; border-radius: 6px; box-shadow: 0 30px 90px rgba(0, 0, 0, .7); animation: lb-in .45s var(--spring); }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--cream); background: rgba(255, 255, 255, .1); transition: background .2s, transform .25s var(--spring); }
.lb-btn:hover { background: rgba(255, 210, 63, .9); color: #2a1d00; transform: scale(1.1); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; margin-top: -24px; }
.lb-next { right: 16px; top: 50%; margin-top: -24px; }
.lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font: 600 13px var(--font-mono); color: var(--cream); }
#lightbox.single .lb-prev, #lightbox.single .lb-next, #lightbox.single .lb-count { display: none; }
@keyframes lb-in { from { opacity: 0; transform: scale(.85); } }
#rp-submit.busy { pointer-events: none; opacity: .85; }
#rp-submit.shake { animation: shake .45s; }

/* ───────── replay HUD ───────── */
#replay-hud {
  position: fixed; z-index: 28; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(92vw, 520px);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 12px 14px 12px 12px;
  background: var(--glass); border: 1px solid var(--line-2); border-radius: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5); animation: rise .6s var(--spring);
}
.rh-top { width: 42px; height: 42px; border-radius: 14px; background: var(--yellow); color: #2a1d00; display: grid; place-items: center; }
.rh-top .ico { animation: flicker 1.4s infinite; }
.rh-meta { display: flex; justify-content: space-between; align-items: baseline; }
.rh-meta b { font: 600 13px var(--font-mono); color: var(--yellow); }
.rh-meta span { font: 400 12px var(--font-mono); color: var(--muted); }
.rh-line { height: 4px; border-radius: 2px; background: rgba(246, 231, 193, .12); margin: 6px 0; overflow: hidden; }
.rh-line i { display: block; height: 100%; width: 0; background: var(--yellow); border-radius: 2px; transition: width .5s var(--ease-out); }
#rh-text { font-size: 13.5px; line-height: 1.35; max-width: 34ch; }
body.replaying #dock, body.replaying #map-tools { opacity: 0; pointer-events: none; }

/* ───────── toasts ───────── */
#toasts { position: fixed; z-index: 60; left: 50%; bottom: 104px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 18px 11px 12px; border-radius: 18px; font-weight: 500;
  background: rgba(14, 23, 18, .94); border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  animation: toast-in .5s var(--spring) both; transition: opacity .35s, transform .35s;
}
.toast.out { opacity: 0; transform: translateY(10px) scale(.96); }
.toast i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: #2a1d00; font: 400 14px var(--font-display); font-style: normal; flex: none; }
.toast.err i { background: var(--red); color: #fff; }
.toast.ok i { background: var(--green); }
.toast b { color: var(--yellow); font-family: var(--font-mono); font-weight: 600; }

/* ───────── modal (about) ───────── */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; }
.modal-card { position: relative; width: min(100%, 440px); padding: 32px 26px 24px; animation: paper-in .6s var(--spring) both; max-height: calc(100dvh - 32px); overflow: auto; }
.modal-card p { margin-bottom: 12px; line-height: 1.7; }
.how { counter-reset: step; display: grid; gap: 8px; margin: 14px 0 16px; }
.how li { counter-increment: step; position: relative; padding-left: 38px; line-height: 1.6; }
.how li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--paper-ink); color: var(--paper); display: grid; place-items: center; font: 400 14px var(--font-display);
}
.how b { background: rgba(255, 210, 63, .7); padding: 0 4px; border-radius: 4px; }
.about-by { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 10px 14px 10px 10px; border-radius: 14px; border: 1.5px dashed rgba(43, 35, 21, .3); color: inherit; text-decoration: none; }
.about-by:hover, .about-by:focus-visible { border-style: solid; background: rgba(255, 210, 63, .22); }
.about-by .ico { flex: none; box-sizing: content-box; width: 22px; height: 22px; padding: 8px; border-radius: 12px; color: #fff; background: linear-gradient(45deg, #f9a03f, #e1306c 45%, #833ab4 80%, #5851db); }
.about-by span { display: flex; flex-direction: column; font-size: 14.5px; line-height: 1.4; }
.about-by small { font-size: 12.5px; color: rgba(43, 35, 21, .65); }
.fine { font-size: 12.5px; color: rgba(43, 35, 21, .65); }
.perm-ico { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 12px; background: var(--yellow); color: #2a1d00; box-shadow: 0 4px 0 #b98a10; animation: pop .5s var(--spring) both .15s; }
.perm-ico .ico { width: 28px; height: 28px; }
.perm-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.perm-actions .btn { flex: 1 1 auto; }
#perm.again .modal-card { animation: shake .45s; }
.keys { font-size: 12.5px; color: rgba(43, 35, 21, .7); margin: 0; }
.modal-card kbd { color: var(--paper-ink); border-color: rgba(43, 35, 21, .35); background: rgba(255, 255, 255, .5); }

/* Instagram share sheet */
.btn.ig { color: #fff; background: linear-gradient(45deg, #f9a03f, #e1306c 45%, #833ab4 80%, #5851db); box-shadow: 0 5px 0 #5b1f63, 0 14px 28px rgba(131, 58, 180, .28); }
.btn.ig:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #5b1f63, 0 18px 34px rgba(131, 58, 180, .34); }
.btn.ig:active { transform: translateY(4px); box-shadow: 0 1px 0 #5b1f63; }
.btn.ig[disabled] { opacity: .55; cursor: default; transform: none; box-shadow: 0 5px 0 #5b1f63; }
.btn.ig .ico { width: 22px; height: 22px; }
.share-card { width: min(100%, 460px); }
.share-card h3 { margin-bottom: 4px; }
.share-lead { font-size: 13.5px; line-height: 1.55; margin-bottom: 12px !important; color: rgba(43, 35, 21, .78); }
.share-stage { position: relative; display: grid; place-items: center; min-height: 160px; margin: 0 0 12px; padding: 14px; border-radius: 12px; background: #0b1210; box-shadow: inset 0 0 0 1px rgba(246, 231, 193, .12); }
#share-canvas { display: block; max-width: 100%; max-height: min(46dvh, 520px); width: auto; height: auto; border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); transition: opacity .3s; }
.share-stage.busy #share-canvas { opacity: .25; }
.share-busy { position: absolute; inset: 0; display: none; place-content: center; justify-items: center; gap: 10px; color: var(--cream); font-size: 13px; }
.share-stage.busy .share-busy { display: grid; }
.share-busy .spin { width: 30px; height: 30px; border-radius: 50%; border: 4px solid rgba(246, 231, 193, .2); border-top-color: var(--yellow); animation: spin .9s linear infinite; }
.share-seg { border-color: rgba(43, 35, 21, .3); background: rgba(43, 35, 21, .06); margin-bottom: 12px; }
.share-seg button { color: var(--paper-ink); height: 36px; font-size: 13.5px; }
.share-seg button.on { color: #2a1d00; }
.share-photos { display: flex; gap: 8px; margin-bottom: 12px; }
.share-photos button { position: relative; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; border: 2px solid rgba(43, 35, 21, .25); padding: 0; transition: transform .25s var(--spring), border-color .2s; }
.share-photos button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.share-photos button[aria-checked='true'] { border-color: var(--paper-ink); transform: translateY(-3px) rotate(-2deg); box-shadow: 0 5px 0 rgba(43, 35, 21, .25); }
#share-go { display: flex; width: 100%; justify-content: center; }
.share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.share-row .btn { height: 44px; }
.share-row .btn .ico { width: 18px; height: 18px; }
#share .fine { margin: 12px 0 0; line-height: 1.6; }
@media (max-width: 860px) {
  #share { place-items: end center; padding: 0; }
  #share .share-card { border-radius: 18px 18px 0 0; max-height: 94dvh; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}

/* first-visit tour: a spotlight hole plus one note card that moves to each control */
#tour { position: fixed; inset: 0; z-index: 90; }
.tour-hole {
  position: fixed; left: 50%; top: 42%; width: 0; height: 0; border-radius: 18px; pointer-events: none;
  box-shadow: 0 0 0 100vmax rgba(4, 8, 6, .8), 0 0 0 3px var(--yellow), 0 0 28px 4px rgba(255, 210, 63, .45);
  transition: left .5s var(--ease-out), top .5s var(--ease-out), width .5s var(--ease-out), height .5s var(--ease-out), border-radius .5s;
}
.tour-card { width: min(320px, calc(100vw - 24px)); padding: 28px 20px 18px; z-index: 2; animation: paper-in .6s var(--spring) both; }
.tour-card.moves { transition: left .5s var(--ease-out), top .5s var(--ease-out); }
.tour-card h3 { font: 400 22px/1.25 var(--font-display); margin-bottom: 6px; }
.tour-card p { line-height: 1.65; font-size: 14px; }
.tour-dots { display: flex; gap: 6px; margin-bottom: 12px; }
.tour-dots i { width: 8px; height: 8px; border-radius: 4px; background: rgba(43, 35, 21, .22); transition: width .35s var(--spring), background .25s; }
.tour-dots i.on { width: 22px; background: var(--paper-ink); }
.tour-actions { display: flex; gap: 10px; margin-top: 16px; }
.tour-actions .btn { flex: 1; height: 44px; }
.tour-actions .btn.primary { flex: 1.4; }

/* delete + unsent-draft dialogs, and the shared-link states in the detail card */
.btn.danger { background: #b3402a; color: #fff; border: 1px solid #8f2f1d; box-shadow: 0 4px 0 #7a2616; }
.btn.danger:hover { background: #c4492f; }
.btn.danger:active { transform: translateY(3px); box-shadow: 0 1px 0 #7a2616; }
.btn.danger[disabled] { opacity: .6; cursor: default; transform: none; }
.paper .btn.ghost.danger-text { color: #9a2f1c; }
.link.danger { color: #9a2f1c; opacity: .9; }
.d-owner { margin-top: 12px; text-align: center; }
.del-card { display: grid; justify-items: start; gap: 6px; padding: 12px 14px; margin: 4px 0 14px; border: 1px dashed rgba(43, 35, 21, .4); border-radius: 12px; background: rgba(255, 255, 255, .35); }
.del-card b { font-size: 16px; }
.del-card small { color: rgba(43, 35, 21, .7); line-height: 1.5; overflow-wrap: anywhere; }
.del-err { color: #9a2f1c; font-weight: 700; font-size: 13.5px; margin-top: 4px; }
.d-state .d-title { margin-top: 12px; }
.d-state .d-actions { margin-top: 16px; }
.d-state .spin { display: block; width: 34px; height: 34px; border-radius: 50%; border: 4px solid rgba(43, 35, 21, .15); border-top-color: var(--paper-ink); animation: spin .9s linear infinite; }

/* ───────── markers & map labels ───────── */
/* stacking: photo pins above seen pins above the rest, newest first inside each group (--z comes from js/map.js),
   so a fresh no-photo pin can never cover a photo pin you want to open */
.fm { cursor: pointer; z-index: var(--z, 1); transition: opacity .3s; }
.fm.hidden { pointer-events: none; }
.fm-in {
  position: relative; width: 46px; height: 54px; transform-origin: 50% 100%;
  transition: transform .3s var(--spring), opacity .35s, filter .35s;
  animation: drop .8s var(--spring) both; animation-delay: var(--delay, 0s);
}
.fm-badge {
  position: absolute; top: 0; left: 3px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--c); border: 3px solid #fff7e0; color: #1a1305; --cut: var(--c);
  box-shadow: 0 7px 14px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .3), 0 0 22px -2px var(--c);
  display: grid; place-items: center; z-index: 2;
}
.fm-badge .ico { width: 22px; height: 22px; }
/* A report with a photo is a square print with a thick bottom edge and a camera tab;
   one without stays a round badge. Shape and tab carry it, so colour is free for the category. */
.fm-cam {
  position: absolute; left: -5px; top: -6px; z-index: 3; width: 22px; height: 22px; border-radius: 50%; display: none; place-items: center;
  background: #1a1305; color: #fff1a8; border: 2px solid #fff7e0; box-shadow: 0 2px 5px rgba(0, 0, 0, .55);
}
.fm-cam .ico { width: 11px; height: 11px; }
.fm.photo .fm-cam { display: grid; }
.fm.photo .fm-badge { border-radius: 10px; border-bottom-width: 9px; transform: rotate(-4deg); }
.fm.photo .fm-badge .ico { margin-top: -2px; }
/* No photo = 疑似: a smaller, paler badge with a dashed edge, no extra tab (it also fades with age, see Store.fade).
   Others saw it too = a solid green ring, no number on the map (the count lives in the list and the detail card). */
.fm:not(.photo) .fm-badge {
  top: 8px; left: 7px; width: 32px; height: 32px; border-style: dashed; border-width: 2.5px; border-color: rgba(255, 247, 224, .9); filter: saturate(.55) brightness(.92);
}
.fm:not(.photo) .fm-badge .ico { width: 18px; height: 18px; }
.fm.seen .fm-badge { filter: none; box-shadow: 0 7px 14px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .3), 0 0 0 4px #3ecf64, 0 0 24px 2px var(--c); }
.fm.seen:not(.photo) .fm-badge { border-style: solid; }
.fm-tail { position: absolute; left: 50%; top: 31px; width: 13px; height: 13px; background: #fff7e0; border-radius: 3px; transform: translateX(-50%) rotate(45deg); z-index: 1; }
.fm-ring { position: absolute; left: 50%; top: 20px; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 2.5px solid var(--c); opacity: 0; display: none; pointer-events: none; }
.fm.fresh .fm-ring { display: block; will-change: transform, opacity; animation: sonar 2.6s ease-out infinite; }
.fm.fresh .fm-ring.r2 { animation-delay: 1.3s; }
.fm:hover .fm-in { transform: translateY(-5px) scale(1.14); }
.fm:hover, .fm.hl { z-index: 400000; }
.fm.sel { z-index: 400001; }
.fm.sel .fm-in { transform: scale(1.3); animation: none; }
.fm.sel .fm-badge { box-shadow: 0 7px 14px rgba(0, 0, 0, .5), 0 0 0 4px rgba(255, 210, 63, .7), 0 0 30px 2px var(--c); }
.fm.old .fm-in { filter: saturate(.55) brightness(.82); }
.fm.gone .fm-in { filter: grayscale(1) brightness(.7); opacity: .75; }
.fm.found .fm-badge::after {
  content: ''; position: absolute; right: -9px; top: -9px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 12.6l4 4L18 8' fill='none' stroke='%230c3a1b' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 80% no-repeat;
  border: 2px solid #fff7e0;
}
.fm.hidden .fm-in { transform: scale(0); opacity: 0; animation: none; }
.fm.hl .fm-in { transform: translateY(-8px) scale(1.25); }
.fm-tip {
  position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, 6px); margin-bottom: 2px; padding: 5px 10px; border-radius: 9px; white-space: nowrap;
  background: rgba(11, 18, 16, .94); border: 1px solid var(--line-2); font-size: 12px; font-weight: 500; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .25s var(--spring); z-index: 5;
}
.fm-tip small { color: var(--muted); margin-left: 6px; font: 400 11px var(--font-mono); }
.fm:hover .fm-tip, .fm.hl .fm-tip { opacity: 1; transform: translate(-50%, 0); }

.cl {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 16px; cursor: pointer;
  font: 400 14px/1 var(--font-display); letter-spacing: .08em; color: #2a1d00; background: var(--yellow); border: 2px solid #fff3b8;
  box-shadow: 0 4px 0 #b98a10, 0 10px 24px rgba(0, 0, 0, .5); white-space: nowrap; transform-origin: 50% 100%;
  animation: label-pop .7s var(--spring) both; transition: transform .25s var(--spring), opacity .4s;
}
.cl:hover { transform: translateY(-3px) scale(1.06); }
.cl small { font: 600 11px var(--font-mono); background: #2a1d00; color: var(--yellow); padding: 2px 6px; border-radius: 8px; letter-spacing: 0; }
.cl.dim { opacity: 0; pointer-events: none; }
.bl {
  font: 500 11.5px/1.1 var(--font-body); color: #f3e8c4; white-space: nowrap; pointer-events: none; letter-spacing: .02em;
  text-shadow: 0 0 3px #0b1210, 0 0 3px #0b1210, 0 0 6px #0b1210, 0 1px 8px #0b1210;
  transition: opacity .3s; animation: fade-in .5s both;
}
.bl.major { font-size: 12.5px; font-weight: 700; color: #fff6d8; }
.bl.off { opacity: 0; }
.bl.kind-landmark, .bl.kind-park { color: #bff0c0; }
.bl.kind-food { color: #ffd2a8; }
.bl.kind-art { color: #e6cfff; }
.bl.kind-dorm { color: #bcd7ff; }
body.no-labels .bl { display: none; }
.target {
  width: 60px; height: 60px; pointer-events: none;
}
.target i { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--yellow); animation: sonar 1.6s ease-out infinite; }
.target i:nth-child(2) { animation-delay: .5s; }
.target i:nth-child(3) { inset: 24px; background: var(--yellow); border: 0; animation: none; box-shadow: 0 0 18px var(--yellow); }
.walker { position: absolute; left: 0; top: 0; width: 46px; height: 50px; pointer-events: none; will-change: transform; contain: layout style; }
.walker::before { content: ''; position: absolute; left: 6px; right: 6px; bottom: -3px; height: 9px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); }
.walker .mascot { animation: walk .5s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.walker.flip .mascot { scale: -1 1; }
.tip {
  position: fixed; z-index: 15; pointer-events: none; padding: 6px 11px; border-radius: 10px; font-size: 12.5px; font-weight: 500;
  background: rgba(11, 18, 16, .92); border: 1px solid var(--line-2); transform: translate(14px, 14px); white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .4);
}
.tip small { color: var(--muted); margin-left: 6px; }

/* ───────── mascot ───────── */
.mascot { width: 100%; height: 100%; overflow: visible; display: block; }
.mascot .m-body, .mascot .m-head, .mascot .m-eyebump, .mascot .m-foot { fill: #f9c92e; }
.mascot .m-foot { fill: #e0a91a; }
.mascot .m-belly { fill: #f6e8bd; }
.mascot .m-eye { fill: #7ee081; stroke: #2a3a1a; stroke-width: 2; }
.mascot .m-pupil { fill: #14210f; }
.mascot .m-mouth { fill: #3b1a18; transform-box: fill-box; transform-origin: 50% 0; }
.mascot .m-tongue { fill: #e5566c; transform-box: fill-box; transform-origin: 50% 100%; }
.mascot .m-blush { fill: #ff8aa0; opacity: .55; }
.mascot .m-hand { fill: #8a8470; }
.mascot .m-finger { stroke: #5f5a4a; stroke-width: 2.4; stroke-linecap: round; fill: none; }
.mascot .m-outline { fill: none; stroke: rgba(80, 50, 0, .35); stroke-width: 2; }
.mascot.laugh { animation: jig .2s ease-in-out infinite; transform-origin: 50% 90%; }
.mascot.laugh .m-mouth, .mascot.laugh .m-tongue { animation: mouth .2s ease-in-out infinite alternate; }

/* ───────── splash ───────── */
#splash {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(70% 60% at 50% 45%, #16281f 0%, #0b1210 55%, #060a08 100%);
  --r: 0px; -webkit-mask-image: radial-gradient(circle at 50% 46%, transparent var(--r), #000 calc(var(--r) + 3px));
  mask-image: radial-gradient(circle at 50% 46%, transparent var(--r), #000 calc(var(--r) + 3px));
}
#splash.out { animation: iris 1.15s cubic-bezier(.65, 0, .25, 1) forwards; pointer-events: none; }
#splash.gone { display: none; }
.sp-rings { position: absolute; left: 50%; top: 46%; }
.sp-rings i { position: absolute; width: 90vmin; height: 90vmin; margin: -45vmin 0 0 -45vmin; border-radius: 50%; border: 1.5px solid rgba(255, 210, 63, .5); animation: sp-ring 4s cubic-bezier(.2, .6, .3, 1) infinite; opacity: 0; }
.sp-rings i:nth-child(2) { animation-delay: 1s; }
.sp-rings i:nth-child(3) { animation-delay: 2s; }
.sp-rings i:nth-child(4) { animation-delay: 3s; }
.sp-center { position: relative; display: grid; justify-items: center; gap: 4px; margin-top: -4vh; }
.sp-mascot { width: min(34vw, 150px); aspect-ratio: 200 / 220; animation: sp-in .9s var(--spring) both; }
.sp-mascot .mascot { animation: bob 1.4s ease-in-out infinite alternate; }
.sp-title { display: flex; gap: .06em; font: 400 clamp(48px, 11vw, 76px)/1.1 var(--font-display); color: var(--yellow); text-shadow: 4px 4px 0 #3a1d1a, 0 0 40px rgba(255, 210, 63, .35); margin-top: 8px; }
.sp-title span { display: inline-block; animation: letter .7s var(--spring) both; }
.sp-title span:nth-child(1) { animation-delay: .35s; }
.sp-title span:nth-child(2) { animation-delay: .47s; }
.sp-title span:nth-child(3) { animation-delay: .59s; }
.sp-title span:nth-child(4) { animation-delay: .71s; }
.sp-sub { color: var(--muted); letter-spacing: .5em; text-indent: .5em; font-size: 13px; animation: fade-in 1s .9s both; }
.sp-bar { width: min(64vw, 280px); height: 6px; border-radius: 3px; background: rgba(246, 231, 193, .12); overflow: hidden; margin-top: 22px; animation: fade-in .6s 1s both; }
.sp-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--yellow-2), var(--yellow)); transition: width .5s var(--ease-out); box-shadow: 0 0 14px var(--yellow); }
.sp-msg { min-height: 20px; max-width: 88vw; text-align: center; font: 400 12px/1.6 var(--font-mono); color: var(--muted); animation: fade-in .6s 1.1s both; }
.sp-msg.sp-tip { color: var(--yellow); font-family: var(--font-body); font-weight: 500; font-size: 13.5px; }
#sp-skip { position: absolute; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); height: 34px; font-size: 12.5px; color: var(--muted); animation: fade-in .6s 1.4s both; }

/* ───────── keyframes ───────── */
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 24px); } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-6px); } }
@keyframes live { 0% { transform: scale(1); opacity: .8; } 70%, 100% { transform: scale(3.2); opacity: 0; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(0); } 40% { transform: scale(1.18) rotate(-6deg); } 70% { transform: scale(.94) rotate(4deg); } }
@keyframes feed-in { from { opacity: 0; transform: translateX(18px); } }
@keyframes flash { 0% { background: rgba(255, 210, 63, .5); transform: scale(1.03); } 100% { background: transparent; transform: none; } }
@keyframes stamp { from { opacity: 0; transform: rotate(-4deg) scale(2.2); } 60% { transform: rotate(-4deg) scale(.92); } }
@keyframes pop { from { transform: scale(0); } }
@keyframes paper-in { from { opacity: 0; transform: translateY(40px) rotate(-2deg) scale(.96); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(18px) scale(.9); } }
@keyframes fab-pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.35, 1.7); opacity: 0; } }
@keyframes jig { 0%, 100% { transform: translateY(0) rotate(-2.5deg); } 50% { transform: translateY(-3%) rotate(2.5deg); } }
@keyframes mouth { from { transform: scaleY(.7); } to { transform: scaleY(1.08); } }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-5%); } }
@keyframes walk { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-14%) rotate(6deg); } }
@keyframes drop { 0% { opacity: 0; transform: translateY(-90px) scale(.5); } 55% { opacity: 1; transform: translateY(0) scale(1.12, .88); } 75% { transform: translateY(-9px) scale(.96, 1.05); } 100% { transform: none; } }
@keyframes sonar { 0% { transform: scale(.8); opacity: .8; } 100% { transform: scale(3); opacity: 0; } }
@keyframes label-pop { from { opacity: 0; transform: translateY(14px) scale(.4); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(.92); } }
@keyframes reticle-ping { 0% { transform: scale(.7); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes frog-hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px) scale(1.06); } }
@keyframes pk-hint { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes iris { from { --r: 0px; } to { --r: 150vmax; } }
@keyframes sp-ring { 0% { transform: scale(.08); opacity: .7; } 100% { transform: scale(1.1); opacity: 0; } }
@keyframes sp-in { from { opacity: 0; transform: translateY(40px) scale(.4) rotate(-12deg); } }
@keyframes letter { from { opacity: 0; transform: translateY(40px) scale(.3) rotate(-18deg); } }

/* ───────── responsive ───────── */
@media (max-width: 1180px) {
  .live-unit { display: none; }
  #right { width: 296px; }
  #map-tools { right: calc(var(--pad) + 296px + 14px) !important; }
}
@media (max-width: 860px) {
  :root { --pad: 10px; }
  .m-only { display: grid !important; }
  #topbar { gap: 8px; }
  .intel { top: 64px; left: var(--pad); right: calc(var(--pad) + 52px); width: auto; min-width: 0; transform: none; font-size: 12.5px; }
  .intel:hover { transform: none; }
  @keyframes intel-in { from { opacity: 0; transform: translateY(-14px) scale(.94); } }
  .brand { padding: 0 14px 0 6px; height: 46px; }
  .brand-text span, .live, #btn-about, #btn-sound { display: none; }
  .brand-text strong { font-size: 18px; }
  .search { height: 46px; margin: 0; flex: 1; }
  .search kbd { display: none; }
  .results { top: 54px; }
  .panel { top: auto; bottom: 0; left: 0 !important; right: 0 !important; width: auto !important; max-height: 68dvh; height: 68dvh; border-radius: 26px 26px 0 0; transform: translateY(105%); z-index: 22; }
  #right { padding-top: 22px; }
  body.show-left #left, body.show-right #right { transform: none; }
  body.booting .panel { transform: translateY(105%); }
  #left .panel-scroll { padding-top: 14px; }
  .panel-close { top: 6px; right: 8px; width: 44px; height: 44px; }
  .paper-close { top: 6px; right: 6px; width: 44px; height: 44px; }
  /* the detail sheet rests at about two thirds so the pin stays visible above it; pull the grip up for the rest */
  #detail { --pt: 0px; top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 64dvh; border-radius: 18px 18px 0 0; transform: translateY(105%); overscroll-behavior: contain; transition: transform .65s var(--spring), opacity .3s, max-height .38s var(--ease-out); }
  #detail.tall { max-height: 90dvh; }
  #detail-body { padding: 30px 18px calc(18px + env(safe-area-inset-bottom)); }
  #map-tools { right: calc(var(--pad) + env(safe-area-inset-right)) !important; bottom: auto; top: 70px; }
  #map-tools .pill { width: 44px; height: 44px; }
  /* bottom-sheet grip: drag down to close */
  .grip { display: block; height: 34px; touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; }
  .grip::after { content: ''; position: absolute; left: 50%; top: 9px; width: 42px; height: 5px; margin-left: -21px; border-radius: 3px; background: rgba(246, 231, 193, .3); }
  .panel > .grip { position: absolute; z-index: 4; top: 0; left: 64px; right: 64px; }
  /* the grip owns the sheet's top padding: a negative top margin would be clamped back into the padding box by sticky */
  .paper > .grip { position: sticky; top: 0; z-index: 5; width: calc(100% - 128px); margin: 0 auto calc(var(--pt, 0px) - 34px); }
  .paper > .grip::after { background: rgba(43, 35, 21, .3); }
  #report { --pt: 30px; padding-top: 0; }
  #share .share-card { --pt: 32px; padding-top: 0; }
  /* the send button stays under the thumb while the form scrolls */
  #report { padding-bottom: 0; overscroll-behavior: contain; }
  .rp-bar { position: sticky; bottom: 0; z-index: 3; margin: 6px -24px 0; padding: 16px 24px calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(233, 219, 174, 0), #ebddb2 38%); }
  #dock { bottom: calc(16px + env(safe-area-inset-bottom)); gap: 10px; }
  #fab { height: 58px; padding-right: 22px; font-size: 19px; }
  #fab kbd { display: none; }
  #toasts { bottom: 96px; }
  #report-wrap { place-items: end center; padding: 0; }
  #report { max-height: 92dvh; border-radius: 18px 18px 0 0; }
  .pk-hint { font-size: 19px; }
  .pk-bar { gap: 8px; }
  .pk-bar .btn { padding: 0 16px; height: 48px; }
  /* the map credit rides above the report dock and the picker buttons, so neither covers it or the 作者 link */
  .maplibregl-ctrl-bottom-right { bottom: calc(84px + env(safe-area-inset-bottom)); }
  #replay-hud { bottom: calc(14px + env(safe-area-inset-bottom)); }
  body.show-left #dock, body.show-right #dock, body.has-detail #dock { opacity: 0; pointer-events: none; }
  .type-grid { gap: 6px; }
}
@media (max-width: 380px) {
  .brand { gap: 6px; padding: 0 10px 0 4px; }
  .brand-mascot { width: 34px; }
  .brand-text strong { font-size: 17px; }
  .search { gap: 8px; padding: 0 12px; }
  .tcard small { display: none; }
  #rp-submit { font-size: 15px; }
  #dock { gap: 8px; }
  #fab { gap: 8px; padding: 0 16px 0 8px; font-size: 17px; white-space: nowrap; }
  .round-big { width: 48px; height: 48px; }
}
/* Fingers need bigger targets than a mouse pointer does. */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .chip { height: 40px; }
  .seg button { height: 38px; }
  .tabs button { height: 40px; }
  .when-chips button { height: 40px; padding: 0 15px; }
  .sw { padding: 10px 4px; }
  .cat { padding: 9px 8px; }
  .mini-actions button { padding: 9px 12px; }
  .fi { padding: 12px 10px; }
  .photo-thumb button { top: 0; right: 0; width: 32px; height: 32px; border-radius: 0 0 0 12px; }
  .d-actions .btn { height: 48px; }
  .d-row2 .btn { height: 44px; }
  .link { padding: 10px 6px; }
  .share-seg button { height: 40px; }
}
@media (max-width: 860px) and (orientation: landscape) {
  /* a phone on its side has little height: sheets give up some of it */
  #detail { max-height: 78dvh; }
  .panel { height: 82dvh; max-height: 82dvh; }
  .intel { display: none; }
}
/* Lite mode: set automatically on phones, weak CPUs and sustained low FPS.
   Drops everything that forces the GPU to re-composite the map each frame. */
body.lite .pill, body.lite .panel, body.lite .round-big, body.lite .pk-place, body.lite .pk-bar .btn.ghost,
body.lite #replay-hud, body.lite .scrim { -webkit-backdrop-filter: none; backdrop-filter: none; }
body.lite .pill, body.lite .panel, body.lite .round-big, body.lite #replay-hud { background: rgba(11, 18, 15, .93); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
body.lite .scrim { background: rgba(4, 8, 6, .78); }
body.lite #grain, body.lite [data-glow]::after, body.lite .fm.fresh .fm-ring, body.lite .fab-pulse, body.lite .sp-rings { display: none; }
body.lite #vignette { background: linear-gradient(180deg, rgba(4, 8, 6, .5), transparent 16%, transparent 84%, rgba(4, 8, 6, .45)); }
body.lite .fm-badge { box-shadow: 0 4px 8px rgba(0, 0, 0, .55); }
body.lite .walker { filter: none; }
body.lite .results { box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .fm.fresh .fm-ring { display: none; }
}
