:root {
  color-scheme: light;
  --paper: #f8f7ef;
  --ink: #183e35;
  --muted: #51665d;
  --rule: #c6cfc3;
  --serif: "Songti SC","STSong","Source Han Serif SC","SimSun",Georgia,serif;
  font-family: "Microsoft YaHei","PingFang SC",system-ui,sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, a { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
button { border: 0; background: none; cursor: pointer; }
a { text-underline-offset: .25em; }
button:focus-visible, a:focus-visible { outline: 3px solid #a9582d; outline-offset: 3px; }
.page { width: min(1300px, calc(100% - clamp(32px,9vw,140px))); margin: auto; }
.mast { border-bottom: 1px solid var(--rule); }
.mast-inner, .brand, .tools, .modes, .actions, .detail-head, .detail-tools { display: flex; align-items: center; }
.mast-inner { min-height: 64px; justify-content: space-between; }
.brand { gap: 9px; font: 700 1.35rem var(--serif); text-decoration: none; }
.home-link { color: var(--muted); font-size: .9rem; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 2rem; padding: clamp(28px,4.4vw,64px) 0 clamp(22px,3vw,39px); }
.eyebrow { display: flex; align-items: center; gap: .55rem; margin: 0 0 .55rem; font-size: .86rem; color: #596d59; font-weight: 650; letter-spacing: .1em; }
.eyebrow::before { content: ""; width: 23px; height: 2px; background: #a55d38; }
h1, h2, .plate-name { font-family: var(--serif); }
h1 { margin: 0; font-size: clamp(2.45rem,4.3vw,4.1rem); font-weight: 650; line-height: 1.14; letter-spacing: .02em; }
.lead { max-width: 26em; font-size: 1rem; line-height: 1.8; color: var(--muted); margin: 0; }
.tools { flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 11px 0; border-top: 1px solid #9bada0; border-bottom: 1px solid var(--rule); }
.scope-filters { display: flex; flex-wrap: wrap; gap: 3px; }
.modes { gap: 3px; padding: 3px; background: #e5ebdf; border-radius: 7px; }
.tools button { font-size: .91rem; min-height: 40px; padding: 0 .95rem; border-radius: 5px; }
.modes button[aria-pressed="true"], .filter[aria-pressed="true"] { background: var(--ink); color: #fffef3; }
.filter { display: inline-flex; align-items: center; gap: .35rem; }
.filter span { font-variant-numeric: tabular-nums; }
.map-note { font-size: .9rem; color: var(--muted); margin: 15px 0 0; }
.plates { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px 18px; margin: 22px 0 36px; }
.plate { min-width: 0; border: 1px solid #bccabd; border-radius: 8px; overflow: hidden; background: #fffef6; scroll-margin: 20px; }
.plate.picked { border-color: #365f48; box-shadow: 0 0 0 1px #365f48; }
.art-btn { padding: 0; border: 0; width: 100%; display: block; position: relative; border-bottom: 1px solid #c8d3c6; cursor: zoom-in; }
.art-btn:focus-visible { outline-offset: -4px; }
.art { display: block; width: 100%; aspect-ratio: 1.58; position: relative; overflow: hidden; background: #e6efe8; }
.art > svg, #detail-art > svg { display: block; width: 100%; height: 100%; }
.art [data-map-slot] { position: absolute; inset: 0; }
.art-btn .zoom { position: absolute; bottom: 7px; right: 8px; width: 23px; height: 23px; padding: 4px; border-radius: 50%; background: #f4f7e8df; color: #465c50; }
.art-btn:hover .zoom { color: #fff; background: #315446; }
.approval-mark { position: absolute; top: 7px; left: 8px; padding: 2px 6px; color: #264938; background: #f7f9eae8; border-radius: 3px; font-size: .8rem; }
.plates[data-scope="approved"] .approval-mark { display: none; }
.plate-foot { display: flex; gap: 7px; align-items: center; padding: 6px 9px 6px 12px; min-height: 53px; }
.plate-id { color: #785239; font: 600 .87rem/1 ui-monospace,Consolas,monospace; }
.plate-name { margin: 0; font-size: clamp(.97rem,1.3vw,1.19rem); line-height: 1.35; font-weight: 700; }
.pick { margin-left: auto; display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; }
.pick span { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #8fa498; border-radius: 50%; font: 450 19px/1 system-ui,sans-serif; }
.picked .pick span { color: white; background: #305440; border-color: #305440; font-size: 15px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.empty button { text-decoration: underline; text-underline-offset: .24em; }
body.with-tray main { padding-bottom: 86px; }
.tray { position: fixed; bottom: 0; inset-inline: 0; background: #fafbf2f5; border-top: 1px solid #a9b9ab; z-index: 2; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); }
.tray-inner, .picks { display: flex; align-items: center; gap: 12px; }
.tray-inner { justify-content: space-between; }
.picks { min-width: 0; flex-wrap: wrap; column-gap: 16px; row-gap: 3px; }
.picks strong { font-size: .95rem; }
#pick-ids { color: var(--muted); font: .87rem/1.5 ui-monospace,Consolas,monospace; overflow-wrap: anywhere; }
.actions { flex-shrink: 0; gap: 8px; }
.actions button, .detail-tools button { min-height: 44px; border-radius: 5px; padding: 8px 14px; font-size: .9rem; border: 1px solid #afc1b2; }
.solid { color: #fffdf3; background: #284f3c; }
.actions button:disabled { opacity: .58; cursor: default; }
#feedback:not(:empty) { position: fixed; left: 50%; bottom: 94px; transform: translateX(-50%); padding: 9px 16px; border-radius: 6px; background: #193e32; color: white; font-size: .91rem; z-index: 5; max-width: 90vw; width: max-content; }
dialog { padding: 0; max-width: min(720px, calc(100vw - 24px)); width: 100%; max-height: 92dvh; color: inherit; border-radius: 9px; border: 1px solid #97ac9e; background: #faf9f1; }
dialog::backdrop { background: #1a342ab3; }
.detail-head, .detail-tools { justify-content: space-between; gap: 12px; padding: 9px 16px; }
.detail-head h2 { margin: 0; font-size: 1.3rem; }
.detail-head button { font: 1.7rem/1 sans-serif; width: 44px; height: 44px; }
#detail-art { aspect-ratio: 1.72; position: relative; overflow: hidden; max-height: 57dvh; }
#detail-art .ba-map-mini { position: absolute; inset: 0; }
.detail-tools a { font-size: .9rem; }
@media(max-width: 980px) { .plates { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(max-width: 700px) {
  .intro { display: block; }
  .lead { margin-top: .8rem; }
  .plates { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 14px; }
  .plate-foot { gap: 5px; padding: 2px 3px 2px 8px; }
  .pick { width: 36px; height: 44px; }
  .tray-inner { align-items: start; flex-wrap: wrap; gap: 6px; }
  .picks { display: block; }
  #pick-ids { display: block; max-height: 2.9em; overflow: auto; }
  .actions { gap: 4px; }
  .actions button { padding: 6px 8px; }
}
@media(max-width: 430px) {
  .mast-inner { min-height: 52px; }
  .plate-name { font-size: .94rem; }
  .plates { gap: 9px; }
  .plate-id { font-size: .78rem; }
  .tools button { padding: 0 .65rem; min-height: 44px; }
  .tray-inner { align-items: center; }
  .actions button { font-size: .81rem; }
  .pick { width: 30px; }
  #feedback:not(:empty) { bottom: 98px; }
}
