/* find.gomoe.net: colour tokens follow site/src/styles.css (cream page, ink outlines, yellow accent). No inline styles anywhere (CSP style-src 'self'). */
:root {
  --bg: #fffbe9; --fg: #14141a; --muted: #5d5d68; --surface: #ffffff; --soft: #fff3c4; --accent: #ffd84d; --line: #14141a;
  --ok: #c9f2d6; --info: #d9e8ff; --r: 16px; --r-s: 12px; --b: 2px; --pop: 2px 2px 0 #14141a; --focus: #4a7dff;
  font-family: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--fg); background: var(--bg); color-scheme: light; -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { line-height: 1.7; font-size: 16px; background: var(--bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2 { margin: 0; line-height: 1.25; font-weight: 900; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 10px 14px; background: var(--accent); border: var(--b) solid var(--line); border-radius: var(--r-s); font-weight: 700; }
.skip:focus { top: 12px; }

.top { border-bottom: var(--b) solid var(--line); }
.bar { display: flex; align-items: center; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; text-decoration: none; }
.brand img { height: 44px; width: 44px; object-fit: contain; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; border: var(--b) solid var(--line); border-radius: 999px; background: var(--accent); font-weight: 700; text-decoration: none; box-shadow: var(--pop); cursor: pointer; text-align: center; }
.btn.white { background: var(--surface); }
.btn:hover { box-shadow: 4px 4px 0 #14141a; }

main { padding-top: 24px; padding-bottom: 40px; }
.hero, .head { margin-bottom: 20px; display: grid; gap: 8px; }
.hero h1, .head h1 { font-size: clamp(28px, 6vw, 44px); }
.lead, .count { color: var(--muted); }
.legend { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.swatch { width: 16px; height: 16px; border: var(--b) solid var(--line); border-radius: 4px; background: var(--ok); display: inline-block; }

.cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.cities a, .districts a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; border: var(--b) solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-weight: 700; }
.n { font-size: 13px; color: var(--muted); font-weight: 500; }
.districts { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 8px; }
.districts a { flex: none; padding: 6px 14px; }
.districts a[aria-current] { background: var(--accent); }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1023px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 699px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.card { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; border: var(--b) solid var(--line); border-radius: var(--r); background: var(--soft); text-decoration: none; box-shadow: var(--pop); min-width: 0; }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card.off { filter: grayscale(1); opacity: .6; }
.rank, .badge { position: absolute; top: 8px; z-index: 1; padding: 2px 10px; border: var(--b) solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 700; line-height: 1.5; }
.rank { left: 8px; }
.badge { right: 8px; background: var(--ok); }
.meta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: grid; padding: 8px 10px; background: rgba(255, 251, 233, .94); border-top: var(--b) solid var(--line); line-height: 1.35; }
.name { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty, .msg { padding: 32px 0; display: grid; gap: 12px; }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.pager a, .pager .cur { min-width: 40px; min-height: 40px; padding: 6px 12px; display: inline-flex; align-items: center; justify-content: center; border: var(--b) solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-weight: 700; }
.pager .cur { background: var(--accent); }
.back { margin-top: 20px; }

.store { display: grid; gap: 16px; padding: 4px 0; }
.store h1 { font-size: clamp(24px, 5vw, 34px); }
.store .cover { width: 100%; max-height: 320px; object-fit: cover; border: var(--b) solid var(--line); border-radius: var(--r); background: var(--soft); }
.store.off .cover { filter: grayscale(1); opacity: .6; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 2px 12px; border: var(--b) solid var(--line); border-radius: 999px; background: var(--info); font-size: 14px; font-weight: 700; }
.block { display: grid; gap: 6px; }
.block h2 { font-size: 18px; }
.pre { white-space: pre-line; }
.map { width: 100%; height: 260px; border: var(--b) solid var(--line); border-radius: var(--r); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.off-label { font-weight: 700; color: var(--muted); }
.nudge summary { list-style: none; }
.nudge summary::-webkit-details-marker { display: none; }
.copy-text { margin-top: 8px; padding: 12px; border: var(--b) dashed var(--line); border-radius: var(--r-s); background: var(--surface); user-select: all; }
.small { font-size: 13px; color: var(--muted); }

.foot { border-top: var(--b) solid var(--line); padding: 20px 0; text-align: center; font-size: 14px; color: var(--muted); }
.foot .wrap { display: grid; gap: 4px; }

dialog#store-dialog { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 20px 16px 24px; border: var(--b) solid var(--line); border-radius: var(--r); background: var(--bg); color: var(--fg); box-shadow: 6px 6px 0 #14141a; overflow-y: auto; }
dialog#store-dialog::backdrop { background: rgba(20, 20, 26, .55); }
.dialog-close { position: sticky; top: 0; float: right; z-index: 2; width: 40px; height: 40px; border: var(--b) solid var(--line); border-radius: 999px; background: var(--surface); font-size: 18px; cursor: pointer; }
.dialog-body { clear: both; }

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