/* Palette 與設計規則見 spec 第 6 節,唔好加色 */
:root {
  --bg: #14161c;
  --surface: #1e222c;
  --border: #2c3140;
  --text: #e8eaf0;
  --text-dim: #8a90a0;
  --accent: #e8a33d;
  --attr-fire: #e05555;
  --attr-water: #4a9fd8;
  --attr-wood: #58b368;
  --attr-light: #e8c84a;
  --attr-dark: #9a6bc9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Noto Sans JP", "PingFang HK", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.num { font-variant-numeric: tabular-nums; }
.dim { color: var(--text-dim); }

a { color: inherit; text-decoration: none; }

.container { max-width: 960px; margin: 0 auto; padding: 16px; }

.top-bar { height: 4px; background: var(--accent); }
.admin-chip {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 10;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent);
  border: 1px solid rgba(232, 163, 61, 0.4);
  border-radius: 6px;
  padding: 2px 8px;
  background: var(--bg);
}

/* ---- 首頁 ---- */
.home {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20vh;
  gap: 28px;
}
.home-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.home-title {
  font-size: 30px;
  font-weight: 500;
  margin: 0;
  color: var(--text);
}
.attr-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-fire { background: var(--attr-fire); }
.dot-water { background: var(--attr-water); }
.dot-wood { background: var(--attr-wood); }
.dot-light { background: var(--attr-light); }
.dot-dark { background: var(--attr-dark); }
.search-form {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.search-input {
  width: 100%;
  font-size: 18px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  outline: none;
  transition: border-color 100ms;
}
.search-input:focus { border-color: var(--accent); }
.home-hint {
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}
@media (max-width: 599px) {
  .home-hint span { display: block; }
  .home-hint .hint-sep { display: none; }
}

/* ---- 頁頭 ---- */
.page-head {
  display: flex;
  flex-wrap: wrap;      /* 極窄機(320px)擺唔落就落行,好過逼到重疊/擠爛 */
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  position: relative;   /* 收藏 popover 錨定用(見 .fav-pop) */
}
.back { color: var(--text-dim); font-size: 14px; }
.back:hover { color: var(--accent); }
/* 頁頭左邊一組(戻る + 返首頁)。**要包成一個 flex item**——page-head 係
   space-between,散開擺就會有一個被推去中間,而中間/右邊留返俾
   「← 前 | 次 →」同收藏 chip(2026-08-24 撞過一次)。窄機擺唔落就換行。 */
.head-left { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
/* 返首頁屋仔:視覺同「← 戻る」睇齊(dim → hover accent,靠 currentColor),
   但可撳範圍要夠手指——用 ::after 撐一個 44×44 透明區,**唔用 padding**:
   padding 會令個 flex item 變 44px 高,成條 page-head 跟住高咗。
   .head-left 個 gap 由 14 加到 18,等 44px hit area 唔會蓋到「戻る」個字。 */
.home-btn { position: relative; display: inline-flex; align-items: center; }
.home-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}
.home-ico { display: block; }
.acct-nav { display: flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; }
.acct-nav a { color: var(--text-dim); }
.acct-nav a:hover { color: var(--accent); }

.section-label { color: var(--text-dim); font-size: 13px; margin-bottom: 12px; }

/* ---- 搜尋框「?」提示 popover ---- */
.search-wrap { position: relative; width: 100%; }
/* ⚠️ 用 `input.` 前綴 = specificity 0,1,1,**故意高過** `.filter-input`
   /`.search-input`(0,1,0)。原因:嗰兩個 base class 用 `padding` /`border`
   **shorthand**,而佢哋喺檔案後面,同分數下後者勝 ⇒ 呢啲 modifier 會被
   靜靜地食咗(2026-08-24 實錘:＋ 疊字、「?」冇騰位、accent 邊框冇出現)。
   加 specificity 之後同「邊條規則排前排後」無關,將來 reorder 都唔會再中。 */
input.has-help { padding-right: 40px; }
.help-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--accent);   /* 常駐 accent:成頁唯一求助入口,要見得到 */
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  transition: background-color 100ms;
}
.help-btn:hover { background: rgba(232, 163, 61, 0.18); }
.help-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: min(340px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.65;
  text-align: left;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.help-pop p { margin: 0 0 8px; }
.help-pop p:last-child { margin-bottom: 0; }

/* ---- 帳號收藏(☆):flow 元素(唔准 fixed),popover 照 help-pop 一套 ----
   2026-08-24:原本 fixed 右上,喺客人版帳號頁遮住「次 →」導航掣(iPhone
   實機證實)。而家擺入 .page-head(戻る | ★ | 次 →)或者 .fav-wrap,
   兩者都係 flow,任何闊度都唔會疊到嘢。popover 錨定成行(唔錨 chip),
   所以 320px 窄機都唔會爆出左邊。 */
.fav-wrap { display: flex; justify-content: flex-end; position: relative; }
.fav-root { margin-bottom: 10px; }
.page-head .fav-root { margin-bottom: 0; }
/* 帳號頁:chip 貼喺 h1 嘅 ☆ 右邊。同名/星之間嘅距離由 h1 嘅 flex gap
   (10px)出,唔喺呢度另加 margin,免得兩處相加。 */
.fav-root.in-h1 {
  display: inline-block;
  vertical-align: middle;   /* h1 唔係 flex 嗰陣嘅 fallback */
  margin: 0;                /* 間距由 h1 嘅 flex gap 出 */
}
/* 光學微調(2026-08-24 營運者逐格試出嚟,已收貨):flex 對齊幾何上啱中線,
   但細 chip 擺喺 24px 大字旁邊,睇落仍然墜,實測 -4px 先啱眼。
   **一定要放喺 .fav-chip,唔可以放喺 .fav-root**——.fav-root 一 position:
   relative,popover 就會改為錨住粒 chip(而唔係錨住 h1),窄機一撳就爆出
   右邊(見上面 .fav-pop 註)。粒掣同 popover 係兄弟,郁掣唔影響錨點。 */
.fav-root.in-h1 .fav-chip { position: relative; top: -4px; }
.fav-chip {
  white-space: nowrap;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--bg);
  color: var(--accent);
  font-family: inherit;
  font-size: 12px;
  padding: 3px 10px;
  cursor: pointer;
  transition: background-color 100ms;
}
.fav-chip:hover { background: rgba(232, 163, 61, 0.18); }
.fav-pop {
  /* 錨定成行/成個 h1(唔錨 chip 本身)——錨 chip 嘅話,chip 喺中間或者
     左邊嗰陣 popover 會由嗰點伸出畫面外(320px 機必爆)。錨住個橫向鋪滿
     嘅容器,再配 width ≤ 內容闊度,任何闊度都一定入到畫面。 */
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  width: min(300px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  text-align: left;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.fav-title { color: var(--text-dim); font-size: 12px; margin-bottom: 6px; }
.fav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.fav-link { color: var(--text); }
.fav-link:hover { color: var(--accent); }
.fav-x {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 15px;
  padding: 0 4px;
  cursor: pointer;
}
.fav-x:hover { color: var(--accent); }
.fav-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
#fav-copy-text {
  flex: 1;
  min-width: 0;
  word-break: break-all;
  font-size: 12px;
  color: var(--text-dim);
}
.fav-btn-star {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0 2px;      /* 左邊嘅距離改由 h1 嘅 flex gap 出 */
  vertical-align: middle;   /* h1 唔係 flex 嗰陣嘅 fallback */
}
.fav-btn-star.on { color: var(--accent); }

/* ---- 選購清單 chips ---- */
.mini-search { margin-bottom: 12px; }
/* 結果頁個框要睇落似「下一步」唔似「又一個搜尋框」——客人搜完一隻卡就會
   自動略過搜尋框,而組合搜尋先係成個工具最值錢嗰樣(2026-08-24)。
   手法克制:淨係 accent 邊框 + 框內一個「＋」,唔加底色唔加動畫。
   首頁大框唔郁。 */
input.mini-search-input { margin-bottom: 0; border-color: var(--accent); }
input.has-add { padding-left: 34px; }   /* 騰位俾框內個「＋」,同「?」右邊嗰 40px 同一手法 */
.add-hint {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 16px;
  line-height: 1;
  pointer-events: none;   /* 撳落去係入個框,唔好變咗撳個 icon */
}
.refine-hint {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  margin: -4px 0 12px;    /* 貼實「該当 N アカウント」嗰行 */
}
.pick-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.pick-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 13px;
  max-width: 100%;
}
.chip-icon { width: 20px; height: 20px; border-radius: 4px; flex: none; }
.chip-name {
  max-width: 40vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pick-lead { font-size: 13px; color: var(--text-dim); }
.chip-x { color: var(--text-dim); padding: 0 2px; font-size: 15px; }
.chip-x:hover { color: var(--accent); }
.chip-limit { font-size: 12px; }

.cell-add {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 1;
  width: 18px;
  height: 18px;
  line-height: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--accent);
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 50%;
}
.cell-noadd { opacity: 0.55; }

.card-combo { flex-wrap: wrap; gap: 6px; }
.card-owns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  justify-content: flex-end;
}
.own { color: var(--text-dim); }
.own-missing { color: var(--attr-fire); }
.empty-inline {
  color: var(--text-dim);
  font-size: 14px;
  margin: 18px 0;
}

/* ---- 帳號頁確認區(選中寵物置頂)---- */
.confirm-zone { margin-bottom: 12px; }
.confirm-cells {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.confirm-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 8px 6px;
  width: 92px;
  min-width: 0;
}
.confirm-icon { width: 40px; height: 40px; }
img.confirm-icon { opacity: 1; border-radius: 4px; }
.confirm-ph {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 10px;
}
.confirm-name {
  font-size: 11px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.confirm-count { font-size: 11px; color: var(--accent); }
.confirm-missing { border-color: var(--border); opacity: 0.6; }
.confirm-missing .confirm-count { color: var(--text-dim); }

/* ---- 預覽層帳號頁尾巴(模糊佔位格 + ＋N体)---- */
/* 公開層 grid 入面嘅分隔 banner:擺喺「最後一個有圖」同「第一個冇圖」之間
   ——即係客人真正產生疑問嗰一刻(碌落去見到解釋,再落去先係冇圖嗰批,
   「解釋 → 現象」而唔係「先困惑再搵答案」)。
   ⛔ 唔用 accent 底色/框:視覺重量要似「分隔線」唔似「廣告/彈窗」。
   grid-column: 1 / -1 = 橫跨成行,唔理幾多欄都啱。 */
.grid-divider {
  grid-column: 1 / -1;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 10px;
  margin: 2px 0;
}
.gd-ja { font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.gd-zh { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.preview-contact {
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
  margin: 18px 0;
}

/* ---- 帳號頁排序 chips / diff ---- */
.sort-chips { margin-bottom: 12px; }
.diff-panel { font-size: 13px; }
.diff-row { color: var(--text-dim); margin: 2px 0; }
.diff-panel summary { cursor: pointer; }

/* ---- 寵物 grid ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 12px;
}
.cell {
  position: relative;
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  text-align: center;
  transition: border-color 100ms;
}
a.cell:hover { border-color: var(--accent); }
.icon {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  opacity: 0;
  transition: opacity 200ms;
}
.icon.loaded { opacity: 1; }
.placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 11px;
  overflow: hidden;
}
.cell .name {
  font-size: 11px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell-sub { font-size: 10px; margin-top: 2px; }
/* MP 賣價:次要資訊,唔可以搶過寵物名同 icon。10px 同 .cell-sub 一致——
   之前冇規則承繼緊 body 16px,六位數(150,000)直頂爆格。唔用 15万 式簡寫:
   2,403 個值唔係整萬,簡寫會蝕精度(MP 係賣價要準)。 */
.cell .mp {
  font-size: 10px;
  line-height: 1.3;
  margin-top: 1px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
}
/* 所持数(2 隻或以上先出)。以前係右上角一個淨數字嘅 badge,客人唔知係咩,
   而且壓住 icon;而家行 flow 排喺名下面,寫足「所持数N」。
   ⚠️ 手機格仔最窄 60px(減 padding 剩 48px):10px × 4 個漢字 + 一位數
   ≈ 45px 啱啱入到,所以 **nowrap 唔准 wrap**,亦唔加空格。 */
.cell-own {
  font-size: 10px;
  margin-top: 2px;
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

/* ---- 寵物 header(搜尋結果揀定嗰隻)---- */
.monster-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.head-icon { width: 64px; height: 64px; flex: none; }
img.head-icon { opacity: 1; }
.monster-name { font-size: 18px; font-weight: 600; }
.meta { color: var(--text-dim); font-size: 13px; margin-top: 2px; }

/* ---- 帳號卡列表 ---- */
.card-list { display: flex; flex-direction: column; gap: 12px; }
.card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  transition: border-color 100ms;
}
.card:hover { border-color: var(--accent); }
.card-name { font-size: 18px; font-weight: 600; }
.card-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; }

.tag {
  font-size: 11px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}
.tag-sale { color: var(--accent); border-color: var(--accent); }
.tag-hold { color: #e08a3c; border-color: #e08a3c; }  /* GT 商談中(gt_status overlay) */
.tag-sold { color: var(--text-dim); border-color: var(--text-dim); }  /* 已售出(sold_at) */
/* GT 話成交咗但未人手標售出——單向提示,唔自動寫入(見 CLAUDE.md 決策紀錄) */
.tag-warn { color: var(--attr-light); border-color: var(--attr-light); }
.btn-mini { padding: 2px 8px; font-size: 12px; }
/* 售出表單:平台 / 實收淨額 兩個窄 input + 掣,窄機一齊落行 */
.sold-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sold-plat { max-width: 110px; }
.sold-price { max-width: 170px; }
.sold-meta { font-size: 11px; margin-left: 6px; }
/* VPS(只讀副本)嘅提示:寫入掣唔出,話返俾人知去邊度改 */
.readonly-hint { font-size: 13px; }

/* ---- 帳號頁 ---- */
.account-head { margin-bottom: 12px; }
/* position: relative = 收藏 popover 嘅錨(h1 橫向鋪滿內容闊度,所以 popover
   由左邊起、向右伸,永遠爆唔出右邊)。
   display: flex + align-items: center = 帳號名、☆ 掣、★ N chip 三者垂直置中
   對齊。2026-08-24:原本靠 inline `vertical-align: middle`,佢係對齊
   「baseline + 半個 x-height」,喺 24px 大字旁邊擺粒細嘢,計出嚟嘅點低過
   文字視覺中線 ~2-3px,所以 chip 睇落墜住。改用 flex 由 layout 計中線,
   **唔使填 magic number,h1 字號幾大都自動啱**(手機/桌面/將來改字號通用)。
   flex-wrap: wrap 保住長帳號名換行時唔會斷版。 */
.account-name {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 4px;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  /* flex 會食走 tag 之間嘅空白字元,所以間距一律由 gap 出(唔靠各自
     padding/margin 拼湊),三件嘢(名 / ☆ / ★N)之間統一 10px */
  gap: 4px 10px;
}
.fav-root.in-h1 .fav-pop {
  left: 0;
  right: auto;
  font-weight: 400;      /* h1 係 700,popover 內文唔好跟住粗 */
  font-size: 13px;
}

/* 窄 bar:冇 card 底,控制項一行擺,高度同 filter 框睇齊 */
.admin-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.inline-form { display: flex; align-items: center; gap: 8px; }
/* input+儲存 黐實唔准分行(手機 stray「儲存」假象根治位) */
.note-form { display: flex; flex-wrap: nowrap; flex: 1; min-width: 200px; max-width: 340px; gap: 8px; }
.note-input {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  outline: none;
  transition: border-color 100ms;
}
.note-input:focus { border-color: var(--accent); }
.btn {
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: border-color 100ms;
}
.btn:hover { border-color: var(--accent); }

.filter-input {
  width: 100%;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  outline: none;
  transition: border-color 100ms;
}
.filter-input:focus { border-color: var(--accent); }

/* ---- Admin 頁 ---- */
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  margin-bottom: 18px;
}
.admin-nav a { color: var(--text-dim); }
.admin-nav a:hover { color: var(--accent); }

.admin-title { font-size: 18px; font-weight: 600; margin: 0 0 14px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.panel-line { margin: 4px 0; font-size: 14px; }

.alert {
  background: var(--surface);
  border: 1px solid var(--attr-fire);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
}
/* 已跳過清單:號可能有幾十個,唔好推長成頁 */
.skip-table { margin-top: 6px; display: block; max-height: 260px; overflow-y: auto; }
.skip-table td, .skip-table th { padding: 4px 10px; }

.paths-input {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 8px 0;
  outline: none;
  resize: vertical;
  transition: border-color 100ms;
}
.paths-input:focus { border-color: var(--accent); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 12px;
}
.chip {
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  transition: border-color 100ms;
}
.chip:hover { border-color: var(--accent); }
.chip.on { color: var(--accent); border-color: var(--accent); }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.acct-filter { max-width: 300px; }
.admin-table th, .admin-table td {
  text-align: left;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
}
.admin-table th { color: var(--text-dim); font-weight: 500; }
.admin-table .row-link:hover { color: var(--accent); }
.row-dim { color: var(--text-dim); }

.btn-accent {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}
.btn-accent:hover { border-color: var(--accent); opacity: 0.9; }

/* ---- 帳號頁 grid 手機版(<600px):5 欄收緊;桌面/平板唔郁 ---- */
@media (max-width: 599px) {
  #monster-grid {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
  }
  #monster-grid .cell { padding: 4px; }
  /* 名保留(營運者 2026-07-29 揀版本 A),11px + 收窄行高 */
  #monster-grid .cell .name {
    font-size: 11px;
    line-height: 1.15;
    margin-top: 2px;
  }
  /* 「所持数N」手機收到 9px:格仔淨返 ~52px 可用,10px 遇到兩位數
     (全庫最大 35)會啱啱好爆界。9px × 4 漢字 + 兩位數 ≈ 46px,安全。 */
  #monster-grid .cell-own { font-size: 9px; }
}

/* ---- 空狀態 ---- */
.empty {
  color: var(--text-dim);
  text-align: center;
  margin-top: 15vh;
  font-size: 15px;
}

/* ---- 全開放模式(public_full_box)---- */
/* 粒掣:specificity 用 button.btn-danger(0,1,1)贏 .btn 個 border shorthand,
   同排前排後無關(2026-08-24 CSS 陷阱嗰單教訓)。只喺「開」嘅方向出紅色。 */
button.btn-danger {
  color: var(--attr-fire);
  border-color: rgba(224, 85, 85, 0.55);
}
button.btn-danger:hover { border-color: var(--attr-fire); }
/* Admin 常駐橫額:客人層唔會 render(base.html 用 is_admin 守)。
   唔用 fixed——全站淨返 .admin-chip 一個 fixed,呢個行 flow 排喺 nav 上面。 */
.full-box-banner {
  font-size: 13px;
  color: var(--attr-fire);
  border: 1px solid rgba(224, 85, 85, 0.45);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  padding-right: 84px;      /* 唔好俾固定嘅 ADMIN chip 蓋住尾巴 */
}
.full-box-banner a { color: var(--attr-fire); text-decoration: underline; }

/* ---- 訪客紀錄(/admin/visits)---- */
.admin-sub { font-size: 15px; font-weight: 600; margin: 22px 0 8px; }
.visit-cards { display: flex; flex-wrap: wrap; gap: 12px; }
.visit-card { flex: 1 1 180px; min-width: 160px; }
.visit-label { font-size: 13px; color: var(--text-dim); }
.visit-pv { font-size: 26px; line-height: 1.2; }
.visit-uniq { font-size: 15px; margin-top: 6px; }
.visit-note { font-size: 11px; margin-top: 4px; }
/* UA 好長,唔可以撐爆張表 */
.visit-ua { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 熱門搜尋:兩個榜並排,窄機自動落行 */
.visit-two { display: flex; flex-wrap: wrap; gap: 18px; }
.visit-two > div { flex: 1 1 320px; min-width: 0; }
.visit-colhead { font-size: 12px; margin-bottom: 4px; }
.visit-ids { font-size: 11px; }

/* ---- 魔法石(帳號頁 meta 行)---- */
/* 買家睇嘅兩個數之一(D-014),所以同「モンスター総数」同一行、accent 加重。
   超過 30 日就轉 dim:舊數自然睇落弱,⛔ 但唔准隱藏(隱藏會令人以為係 0)。 */
.stones { color: var(--accent); font-weight: 700; }
.stones.stones-old { color: var(--text-dim); font-weight: 400; }
