@font-face {
  font-family: "LicensePlate";
  src: url("assets/LicensePlate.woff2") format("woff2");
  font-display: swap;
}

:root {
  --ink: #2a2b32;
  --ink-70: rgba(42, 43, 50, .7);
  --ink-20: rgba(42, 43, 50, .2);
  --ink-10: rgba(42, 43, 50, .1);
  --on-ink: #fff;
  --ink-hover: #44454c;
  --on-ink-hover: #fff;
  --disabled-text: rgba(42, 43, 50, .2);
  --accent: #e94949;
  --ev-green: #1ba95b;
  --success-bg: #edf7f0;
  --success-text: #267248;
  --warning-bg: #fbf4e7;
  --warning-text: #8a6422;
  --error-bg: #fcf3f2;
  --error-border: #edd8d5;
  --error-text: #9a3e36;
  --expand-icon: url("assets/expand_more.svg");
  --hairline: rgba(22, 22, 26, .08);
  --page-bg: #f6f6f7;
  --surface: #fff;
  --surface-muted: #f3f4f4;
  --input-bg: rgba(42, 43, 50, .1);
  --input-hover: rgba(42, 43, 50, .2);
  --focus-surface: #fff;
  --loading-surface: rgba(255, 255, 255, .72);
  --page-max-width: 1600px;
  --page-gutter: 16px;
}

[data-theme="dark"] {
  --ink: #f1f3f5;
  --ink-70: rgba(241, 243, 245, .7);
  --ink-20: rgba(241, 243, 245, .2);
  --ink-10: rgba(241, 243, 245, .1);
  --on-ink: #17191d;
  --ink-hover: #d8dce2;
  --on-ink-hover: #17191d;
  --disabled-text: rgba(241, 243, 245, .3);
  --hairline: rgba(241, 243, 245, .14);
  --page-bg: #17191d;
  --surface: #22252b;
  --surface-muted: #2b2f36;
  --input-bg: rgba(241, 243, 245, .1);
  --input-hover: rgba(241, 243, 245, .2);
  --focus-surface: #30343c;
  --loading-surface: rgba(23, 25, 29, .78);
  --success-bg: #193528;
  --success-text: #82d6a5;
  --warning-bg: #3d321d;
  --warning-text: #e6c16d;
  --error-bg: #422524;
  --error-border: #754340;
  --error-text: #f2a19b;
  --expand-icon: url("assets/expand_more_dark.svg");
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--page-bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

button, select, input { font-family: inherit; }
select { background-color: var(--surface); color: var(--ink); }
option, optgroup { background-color: var(--surface); color: var(--ink); }

/* ── 導覽列 ─────────────────────────────────────────── */
.nav-container { position: fixed; top: 0; left: 0; width: 100%; z-index: 100; }
.nav-container-box {
  background: var(--surface);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
  padding: 0 16px;
}
.nav {
  max-width: 1600px;
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: var(--ink); color: var(--on-ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
}
.logo-text { font-weight: 700; font-size: 17px; letter-spacing: .5px; }
.nav-actions { margin-left: auto; display: flex; align-items: center; }
.nav-height { height: 61px; }
.nav-list { display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; list-style: none; }
.nav-list-item a {
  display: inline-flex; align-items: center; color: var(--ink-70); text-decoration: none;
  font-size: 15px; padding: 6px 0; transition: color .2s;
}
.nav-list-item a:hover { color: var(--ink); }
.nav-list-item.active a { color: var(--ink); font-weight: 700; }

.cart-button {
  background: var(--surface); width: 48px; height: 48px; border: none; border-radius: 8px;
  display: flex; justify-content: center; align-items: center; cursor: pointer;
  transition: all .3s; color: var(--ink);
}
.cart-button:hover { background: var(--ink-10); }
.cart-button-inner { position: relative; display: flex; }
.cart-button-inner .counting {
  position: absolute; display: flex; width: 20px; height: 20px; top: -4px; right: -12px;
  background: var(--accent); color: #fff; border-radius: 8px;
  justify-content: center; align-items: center; font-size: 13px; line-height: 1;
  transform: scale(0); opacity: 0; transition: all .3s;
}
.cart-button-inner .counting.active { transform: scale(100%); opacity: 1; }

/* ── 版面 ───────────────────────────────────────────── */
.main-wrapper { width: 100%; max-width: var(--page-max-width); margin: 0 auto; padding: 0 var(--page-gutter) 64px; }
.page-title { font-size: 28px; font-weight: 700; margin: 24px 0 8px; }

.filter {
  margin: 16px 0 0; background: var(--surface); border-radius: 8px;
  padding: 16px 32px 16px; border: 1px solid var(--hairline);
}
.filter h2 { margin: 0 0 16px; font-size: 20px; }
.primary-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.filter-field { display: grid; gap: 6px; min-width: 0; }
.filter-field .select { width: 100%; max-width: 100%; }
.advanced-filters { margin-top: 16px; border-top: 1px solid var(--hairline); }
.advanced-filters > summary { padding: 16px 0; cursor: pointer; font-weight: 700; min-height: 44px; }
.advanced-filter-count { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--ink-70); }
.advanced-filter-count.active { font-weight: 700; color: var(--ink); }
.advanced-filter-content { padding-top: 4px; }
.advanced-filter-content > .search-hint { margin-bottom: 16px; }
.filter :is(summary, select, button):focus-visible { outline: 2px solid var(--ink-70); outline-offset: 3px; }
.filter-row {
  display: flex; width: 100%; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px;
}
.filter-title { font-weight: 700; white-space: nowrap; }
.filter-title:first-child { width: 72px; }

.select {
  cursor: pointer; padding: 10px 32px 10px 16px; font-size: 14px; border-radius: 12px;
  background-color: var(--ink-10); border: none; color: var(--ink); appearance: none;
  background-image: var(--expand-icon);
  background-repeat: no-repeat; background-size: 20px; background-position: right 4px center;
  transition: background-color .3s; max-width: 320px;
}
.select:hover { background-color: var(--input-hover); }
.select:focus { outline: none; }

.number-search {
  display: grid; gap: 8px; grid-template-columns: 72px 200px 240px;
  align-items: center; margin-bottom: 12px; color: var(--ink);
}
.plate-number { display: inline-block; width: 72px; white-space: nowrap; font-weight: 700; }
.text-input {
  padding: 10px 16px; font-size: 14px; border-radius: 12px; border: none;
  background: var(--ink-10); color: var(--ink); width: 100%;
}
.text-input:focus { outline: 2px solid var(--ink-20); background: var(--focus-surface); }
.number-search-buttons { display: grid; width: 100%; gap: 8px; grid-template-columns: repeat(3, 1fr); }
.number-search-button { display: inline-flex; }
.number-search-button input { position: absolute; opacity: 0; width: 0; height: 0; }
.number-search-button label {
  cursor: pointer; user-select: none; width: 100%; text-align: center;
  padding: 9px 16px; font-size: 14px; border-radius: 12px;
  border: 1px solid var(--ink-20); transition: all .2s;
}
.number-search-button input:checked + label { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.number-search-button input:focus-visible + label { outline: 2px solid var(--ink-70); }
.number-search label.plate-number { cursor: pointer; }
.alpha-search { grid-template-columns: 72px 200px 312px; }
.alpha-search-buttons { grid-template-columns: repeat(4, 1fr); }
.plate-search-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.plate-search-fields > .filter-field { min-width: 0; }
.plate-search-fields .number-search {
  grid-template-columns: minmax(0, 1fr) minmax(0, 312px); min-width: 0; margin-bottom: 0;
}
.plate-search-fields .text-input { min-width: 0; }
.plate-search-fields .number-search-buttons { min-width: 0; }
.plate-search-fields .number-search-buttons:not(.alpha-search-buttons) { grid-template-columns: repeat(4, 1fr); }
.alpha-exclude-row { grid-template-columns: 72px 200px minmax(0, 1fr); }
.search-hint { margin: 0; font-size: 13px; line-height: 1.6; color: var(--ink-70); }
.search-hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
  background: var(--ink-10); border-radius: 6px; padding: 1px 5px; color: var(--ink);
}

.plate-categories { color: var(--ink); display: flex; gap: 4px; align-items: flex-start; margin-bottom: 12px; flex-wrap: wrap; }
.plate-categories-title { font-weight: 700; width: 72px; display: inline-flex; margin-right: 4px; }
.plate-categories-items { display: flex; flex-wrap: wrap; gap: 0; flex: 1; }
.chip {
  cursor: pointer; border: 1px solid var(--ink-20); background: var(--surface); color: var(--ink);
  border-radius: 12px; padding: 8px 16px; font-size: 14px; margin: 0 8px 8px 0;
  transition: all .2s; white-space: nowrap;
}
.chip:hover { border-color: var(--ink-70); }
.chip.active { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.chip-empty { border-style: dashed; opacity: .58; }

/* 通知入口獨立於篩選選項，避免被 number-search 的窄欄位擠壓。 */
.subscription-prompt {
  display: flex; align-items: center; gap: 14px; margin-top: 20px;
  padding-top: 20px; border-top: 1px solid var(--hairline);
}
.subscription-prompt-icon {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none;
  background: var(--surface-muted); border-radius: 12px; color: var(--ink);
}
.subscription-prompt-icon svg { width: 23px; height: 23px; }
.subscription-prompt-copy { min-width: 0; flex: 1; }
.subscription-prompt-copy strong { font-size: 14px; font-weight: 600; }
.subscription-prompt-copy p { margin: 4px 0 0; font-size: 12px; line-height: 1.7; color: var(--ink-70); }
.subscription-prompt-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 16px;
  flex: none; min-height: 46px; border: 1px solid var(--ink); border-radius: 12px;
  padding: 11px 18px; background: var(--ink); color: var(--on-ink); font-size: 14px;
  cursor: pointer; transition: background-color .15s;
}
.subscription-prompt-button:hover { background: var(--ink-hover); color: var(--on-ink-hover); }
.subscription-prompt-button:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.subscription-prompt-button svg { flex: none; }
@media (prefers-reduced-motion: reduce) { .subscription-prompt-button { transition: none; } }

/* ── 車牌列表 ───────────────────────────────────────── */
.plates-list-wrapper {
  margin: 16px 0 0; border: 1px solid var(--hairline); border-radius: 16px;
  padding: 32px; background: var(--surface);
}
.plates-list-info {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px;
}
.plates-list-info h2 { margin: 0; font-weight: 700; font-size: 24px; }
.last-updated p { margin: 0; color: var(--ink-70); font-size: 14px; }
.filter-sort { display: flex; align-items: center; gap: 4px; }
.filter-sort label { font-size: 0; width: 0; height: 0; overflow: hidden; }
/* 吉數開關是 filter-sort 內唯一要顯示文字的 label，覆寫上面的隱藏規則。 */
.filter-sort .lucky-toggle {
  display: inline-flex; align-items: center; gap: 8px; margin-right: 4px;
  cursor: pointer; user-select: none; white-space: nowrap;
  padding: 10px 16px; border-radius: 12px; background: var(--ink-10);
  font-size: 14px; width: auto; height: auto; overflow: visible;
  color: var(--ink); transition: background-color .3s;
}
.filter-sort .lucky-toggle:hover { background: var(--input-hover); }
.filter-sort .lucky-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.filter-sort .lucky-toggle:has(input:checked) { background: var(--ink); color: var(--on-ink); }
.filter-sort select {
  cursor: pointer; padding: 10px 32px 10px 16px; font-size: 14px; border-radius: 12px;
  background-color: var(--ink-10); border: none; color: var(--ink); appearance: none;
  background-image: var(--expand-icon); background-repeat: no-repeat;
  background-size: 20px; background-position: right 4px center; transition: background-color .3s;
  min-width: 174px; margin-right: 4px;
}
.filter-sort select:hover { background-color: var(--input-hover); }
.filter-sort select:focus { outline: none; }
.list-summary { color: var(--ink-70); font-size: 14px; margin-left: auto; }
.plates-list-container {
  display: grid; grid-template-columns: repeat(auto-fill, 205px);
  gap: 8px; justify-content: space-between;
}

.plate {
  display: flex; flex-wrap: wrap; text-align: left; border-radius: 12px; padding: 8px 16px;
  position: relative; border: 1px solid var(--ink-20); overflow: hidden;
  transition: all .3s; cursor: pointer; background: var(--surface); width: 205px;
  container-type: inline-size;
}
.plate:after {
  content: ""; position: absolute; width: 100%; height: 100%;
  border: 1.5px solid var(--ink); border-radius: 10px; left: 0; top: 0;
  opacity: 0; transition: all .3s; pointer-events: none;
}
.plate p { width: 100%; margin: 0; text-align: left; font-size: 14px; }
.plate .plate-row {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; flex-wrap: nowrap; position: relative;
}
.plate .plate-location { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plate .plate-number {
  margin: 4px 0 4px; font-size: 38px; font-family: "LicensePlate", sans-serif;
  line-height: 1; letter-spacing: 1px; width: 100%;
}
.plate .plate-meta { color: var(--ink-70); font-size: 12px; }
.plate .add {
  padding: 0; display: flex; width: 26px; height: 26px; border: none; border-radius: 50%;
  justify-content: center; align-items: center; background: var(--ink-10); color: var(--ink);
  transform: translateX(8px); transition: all .3s; position: absolute; right: -3px;
  cursor: pointer; font-size: 16px; line-height: 1;
}
.plate:hover { border-color: var(--ink-70); }
.plate:hover .add { background: var(--input-hover); }
.plate.selected { border-color: var(--ink); }
.plate.selected:after { opacity: 1; }
.plate.selected .add { background: var(--ink); color: var(--on-ink); transform: translateX(0); }

/* 吉數標註：數字總和落在民間數理吉數表時多顯示一列，僅供參考。
   刻意單行不換行：最長一條「11 大吉｜穩健、貴人、漸進成功」13 個全形字，
   固定 12px 在 205px 卡片（內容寬約 171px）剛好超寬被截成「…」。字級改用
   容器查詢單位依卡片寬度縮放（.plate 已設 container-type），並用負外邊距
   多借 16px 寬，手機窄卡與桌機都能單行顯示完整意義。 */
.plate.lucky { border-color: rgba(233, 73, 73, .55); }
/* 已選取狀態優先顯示選取外框，避免吉數紅框蓋住亮／暗色主題的選取線。 */
.plate.lucky.selected { border-color: var(--ink); }
.plate .plate-lucky {
  color: var(--accent); font-weight: 700; margin-top: 2px; margin-inline: -8px;
  /* .plate 是 flex：flex:1 讓吉數列填滿整行（含負外邊距借出的寬度），
     text-align 置中才有作用，同時維持單行不截斷。 */
  flex: 1 1 auto; width: auto; text-align: center;
  font-size: 12px;
  font-size: clamp(8.5px, 7cqi, 12px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 車種配色：營業車紅字、電動車綠字、微型電動二輪車綠帶 */
.car-business .plate-number { color: #cf4549; }
.car-ev { border-color: rgba(27, 169, 91, .45); }
.car-ev .plate-number { color: var(--ev-green); }
.car-micro-ev { position: relative; }
.car-micro-ev:before {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 30px; background: var(--ev-green);
}
.car-micro-ev .plate-row, .car-micro-ev .plate-number, .car-micro-ev .plate-meta, .car-micro-ev .plate-lucky { z-index: 10; position: relative; }
.car-micro-ev .plate-row { margin-top: 24px; }

.load-sentinel { height: 1px; }
.empty { display: flex; min-height: 160px; }
.empty span {
  display: flex; width: 100%; height: 100%; min-height: 160px;
  justify-content: center; align-items: center; margin: 8px 0; color: var(--ink-70);
}

/* ── 已選車牌面板 ───────────────────────────────────── */
.selected-plates {
  position: fixed; display: flex; right: 0; top: 61px; width: 100%;
  height: calc(100vh - 61px); max-width: 418px; z-index: 110;
  padding: 16px 24px; justify-content: center; align-items: center;
  transition: all .3s; transform: translateX(100%); pointer-events: none;
}
.selected-plates.active { transform: translateX(0); pointer-events: auto; }
.selected-plates-inner {
  position: relative; background: var(--surface); padding: 16px; width: 100%; height: 100%;
  border-radius: 16px; overflow: hidden; transition: box-shadow .3s;
}
.selected-plates.active .selected-plates-inner { box-shadow: 0 0 48px 16px hsla(0, 0%, 80%, .5); }
.selected-plates-inner-box {
  padding-top: 60px; padding-bottom: 72px; width: 100%; height: 100%; overflow-y: auto;
}
.selected-plates-title {
  position: absolute; top: 0; left: 0; display: flex; height: 68px; width: 100%;
  align-items: center; justify-content: space-between; padding: 16px 16px 12px;
  z-index: 101; background: var(--surface);
}
.selected-plates-title-left { display: flex; align-items: center; }
.selected-plates-title .title { display: block; font-size: 20px; font-weight: 700; }
.selected-plates-title .count {
  transition: all .3s; background: var(--accent); width: 22px; height: 22px; color: #fff;
  border-radius: 8px; justify-content: center; align-items: center; line-height: 1;
  transform: scale(0); display: none; opacity: 0; font-size: 12px; margin-left: 8px;
}
.selected-plates-title .count.active { transform: scale(100%); opacity: 1; display: flex; }
.clear-button {
  border: none; border-radius: 4px; padding: 4px 8px; margin-left: 8px; background: none;
  color: var(--ink-70); font-size: 14px; cursor: pointer; transition: all .2s;
}
.clear-button:hover { color: var(--ink); }
.close-button { display: flex; align-items: center; }
.close-button button {
  border: none; border-radius: 4px; padding: 8px; background: none; color: var(--ink);
  cursor: pointer; display: flex; transition: all .2s;
}
.close-button button:hover { color: var(--ink-70); }
.selected-plates-container { display: grid; gap: 8px; width: 100%; grid-template-columns: 1fr; }
.selected-plates-container .plate { width: auto; cursor: default; }
.selected-plate-group-title { font-size: 13px; color: var(--ink-70); margin-top: 8px; }

.save-plates {
  position: absolute; bottom: 0; left: 0; width: 100%;
  display: flex; gap: 8px; justify-content: center; padding: 12px 16px 16px; background: var(--surface); z-index: 101;
}
.save-plates-btn {
  background: var(--ink); color: var(--on-ink); flex: 1; min-width: 0; height: 48px; border: none;
  border-radius: 16px; font-size: 15px; cursor: pointer; transition: all .3s;
}
.save-plates-btn:hover { filter: brightness(90%); }
.save-plates-btn.disabled { background: var(--ink-10); color: var(--disabled-text); cursor: default; }
.save-plates-btn.disabled:hover { filter: none; }
.save-plates-btn.ghost { background: var(--ink-10); color: var(--ink); }
.save-plates-btn.ghost.disabled { color: var(--disabled-text); }

/* ── 官方網站 iframe 檢視器 ─────────────────────────── */
/* 官方頁 CSP frame-ancestors 'self'，iframe 只能載入本站反代的同源路徑，
   見 tools/local.py 與 deploy/nginx。關閉時必須完全 display:none，
   避免隱藏容器影響行動版橫向溢出檢查。 */
.viewer {
  margin: 0; border: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  position: fixed; inset: 0; z-index: 150; background: rgba(20, 20, 24, .55);
  display: flex; align-items: center; justify-content: center; padding: 12px;
}
.viewer-inner {
  background: var(--surface); width: 100%; height: 100%; max-width: 1400px;
  border-radius: 16px; overflow: hidden; display: flex; flex-direction: column;
}
.viewer-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--hairline); flex: none;
}
.viewer-bar-text { min-width: 0; }
.viewer-title { font-size: 17px; font-weight: 700; }
.viewer-status {
  margin: 2px 0 0; font-size: 13px; color: var(--ink-70);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.viewer-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.viewer-btn {
  border: none; border-radius: 10px; padding: 9px 14px; background: var(--ink-10);
  color: var(--ink); font-size: 14px; text-decoration: none; cursor: pointer; transition: all .2s;
}
.viewer-btn:hover { background: var(--ink-20); }
.viewer-body { display: flex; flex: 1; min-height: 0; position: relative; }
.viewer-side {
  width: 320px; flex: none; border-right: 1px solid var(--hairline);
  overflow-y: auto; padding: 12px 16px;
}
.viewer-side-note { font-size: 12.5px; color: var(--ink-70); line-height: 1.6; margin: 0 0 12px; }
.viewer-group { border: 1px solid var(--hairline); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.viewer-group-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.viewer-group-title { font-size: 13.5px; font-weight: 700; }
.viewer-group-sub { font-size: 12px; color: var(--ink-70); margin: 2px 0 0; }
.viewer-plates { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.viewer-plate {
  width: 100%; text-align: left; border: 1px solid var(--hairline); border-radius: 8px;
  padding: 8px 10px; background: var(--ink-10); color: var(--ink); cursor: pointer;
  font-size: 15px; font-weight: 700; letter-spacing: 1px; transition: all .15s;
}
.viewer-plate:hover { background: var(--ev-green); color: #fff; border-color: var(--ev-green); }
.viewer-frame { flex: 1; min-width: 0; border: none; width: 100%; height: 100%; background: var(--surface); }
/* 買號／定位進行時覆蓋整個 body（含側欄與 iframe），明確表達「處理中」。 */
.viewer-loading {
  position: absolute; inset: 0; z-index: 20; background: var(--loading-surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  backdrop-filter: blur(1px);
}
.viewer-loading[hidden] { display: none; }
.viewer-spinner {
  width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--ink-20);
  border-top-color: var(--ev-green); animation: viewer-spin .8s linear infinite;
}
.viewer-loading-text { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
@keyframes viewer-spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  background: var(--ink); color: var(--on-ink); padding: 12px 20px; border-radius: 12px;
  font-size: 14px; z-index: 200; box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

/* ── 頁尾 ───────────────────────────────────────────── */
.my-footer {
  background: var(--surface); border-top: 1px solid var(--hairline);
  padding: 40px 16px 24px; margin-top: 32px;
}
.footer-wrap {
  max-width: 1600px; margin: 0 auto; display: grid; gap: 32px;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
}
.footer-logo { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.footer-logo .logo-mark { width: 26px; height: 26px; font-size: 14px; border-radius: 7px; }
.footer-description p { margin: 0; color: var(--ink-70); font-size: 14px; line-height: 1.7; }
.footer-links-title { display: block; font-weight: 700; margin-bottom: 12px; }
.footer-links-container { display: flex; flex-direction: column; gap: 8px; }
.footer-links-container a { color: var(--ink-70); font-size: 14px; text-decoration: none; }
.footer-links-container a:hover { color: var(--ink); text-decoration: underline; }
.footer-meta p { margin: 0; color: var(--ink-70); font-size: 14px; line-height: 1.7; }
.my-footer hr { border: none; border-top: 1px solid var(--hairline); margin: 24px auto 16px; max-width: 1600px; }
.copyright { max-width: 1600px; margin: 0 auto; color: var(--ink-70); font-size: 13px; }
.copyright p { margin: 0; line-height: 1.7; }

@media (max-width: 720px) {
  .subscription-prompt { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; }
  .subscription-prompt-button { grid-column: 1 / -1; width: 100%; margin-top: 2px; }
  .filter { padding: 16px; }
  .primary-filters { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .plate-search-fields { grid-template-columns: minmax(0, 1fr); }
  .plate-search-fields .number-search { grid-template-columns: minmax(0, 1fr); }
  .plate-search-fields .number-search-buttons { grid-column: 1; }
  .number-search { grid-template-columns: 72px 1fr; }
  .search-hint { grid-column: 1 / -1; }
  .plates-list-wrapper { padding: 16px; }
  .filter-sort { width: 100%; flex-wrap: wrap; }
  .filter-sort select { min-width: 0; max-width: 100%; flex: 1 1 174px; margin-right: 0; }
  .plates-list-container { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .plate { width: auto; }
  .nav-list { gap: 16px; }
  .nav-list-item a { font-size: 14px; }
  .footer-wrap { grid-template-columns: 1fr; gap: 24px; }
  .list-summary { margin-left: 0; }
  .viewer { padding: 0; }
  .viewer-inner { border-radius: 0; }
  .viewer-body { flex-direction: column; }
  .viewer-side { width: 100%; max-height: 34vh; border-right: none; border-bottom: 1px solid var(--hairline); }
  .viewer-status { max-width: 46vw; }
  .viewer-bar { flex-wrap: wrap; }
  .viewer-actions { flex-wrap: wrap; }
}
