/* Pitch 商業案例牆：設計 token 對齊 cards.kevinliu.tw／bizcase（深青頂欄、淺灰底、白色細線面板） */
:root {
  --bg: #eef1f5; --bg2: #e4e8ee; --panel: #ffffff;
  --ink: #141a22; --ink2: #4b5563; --ink3: #8a94a3;
  --rule: #dfe3ea; --rule2: #c9d0da;
  --hero: #0f2d33; --hero-ink: #e9f4f5; --hero-muted: #8fb6ba; --hero-line: rgba(233,244,245,.28);
  --acc: #0e7c86; --acc-ink: #ffffff; --tint: #e6f2f3;
  --warn: #d9822b; --tint2: #fbeee0; --pos: #1f7a3d; --neg: #c0392b; --star: #e0a52b;
  --radius: 10px; --r-sm: 6px;
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(20,26,34,.06), 0 6px 20px rgba(20,26,34,.06);
}
:root[data-theme="dark"] {
  --bg: #0b1a1e; --bg2: #102529; --panel: #142d33;
  --ink: #e6eef0; --ink2: #b7c6c9; --ink3: #7f969a;
  --rule: #1f3d43; --rule2: #2b5057;
  --hero: #0a1f23; --hero-ink: #e9f4f5; --hero-muted: #8fb6ba; --hero-line: rgba(233,244,245,.2);
  --acc: #2aa3ad; --tint: #133f45; --tint2: #3a2a14;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; }
a { color: var(--acc); text-decoration: none; }
button { font: inherit; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.wrap { max-width: 1600px; margin: 0 auto; padding: 0 16px; }

/* ---- 頂欄 ---- */
.top { background: var(--hero); color: var(--hero-ink); position: sticky; top: 0; z-index: 20; }
.top-in { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--hero-ink); flex-shrink: 0; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; background: var(--hero-ink); color: var(--hero); font-weight: 900; border-radius: var(--r-sm); }
.brand-name { font-weight: 700; letter-spacing: .02em; }
.brand-sub { color: var(--hero-muted); font-size: 13px; }
.nav { display: flex; gap: 2px; margin-left: 8px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--hero-muted); padding: 8px 10px; border-bottom: 2px solid transparent; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.nav a.active { color: var(--hero-ink); border-bottom-color: var(--hero-ink); }
.nav a.nav-submit { color: var(--hero-ink); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { background: transparent; color: var(--hero-ink); border: 1px solid var(--hero-line); border-radius: var(--r-sm); width: 40px; height: 40px; cursor: pointer; font-size: 18px; }
.me-btn { color: var(--hero-ink); border: 1px solid var(--hero-line); border-radius: var(--r-sm); padding: 0 12px; height: 40px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.me-btn img { width: 26px; height: 26px; border-radius: 50%; }

@media (max-width: 640px) {
  .brand-sub { display: none; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; background: var(--hero); border-top: 1px solid var(--hero-line); justify-content: space-around; padding-bottom: env(safe-area-inset-bottom); z-index: 20; }
  .nav a { flex: 1; justify-content: center; border-bottom: 0; border-top: 2px solid transparent; font-size: 14px; }
  .nav a.active { border-top-color: var(--hero-ink); }
  body { padding-bottom: 64px; }
}

/* ---- 通用元件 ---- */
main { padding-top: 16px; padding-bottom: 32px; min-height: 60vh; }
.page-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 8px 0 12px; }
.page-h h1 { font-size: 22px; margin: 0; }
.page-h .sub { color: var(--ink3); font-size: 14px; }
.panel { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; }
.panel + .panel { margin-top: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--rule2); background: var(--panel); color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--acc); }
.btn.primary { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); font-weight: 700; }
.btn.warn { color: var(--neg); }
.btn.sm { min-height: 40px; padding: 0 12px; font-size: 14px; }
.btn.on { background: var(--tint); border-color: var(--acc); color: var(--acc); }
.btn:disabled { opacity: .5; cursor: default; }
.chips { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1px solid var(--rule2); background: var(--panel); color: var(--ink2); border-radius: var(--r-sm); padding: 0 12px; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; font-size: 14px; }
.chip.on { background: var(--hero); color: var(--hero-ink); border-color: var(--hero); }
.chip .n { font-family: var(--mono); font-size: 12px; opacity: .7; }
.tag { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 4px; background: var(--tint); color: var(--acc); font-weight: 500; }
.tag.week { font-family: var(--mono); }
.tag.st-pending { background: var(--tint2); color: var(--warn); }
.tag.st-approved { background: #e3f2e7; color: var(--pos); }
.tag.st-rejected, .tag.st-blocked { background: #fbe4e1; color: var(--neg); }
.tag.st-draft, .tag.st-archived { background: var(--bg2); color: var(--ink3); }
:root[data-theme="dark"] .tag.st-approved { background: #14331f; }
:root[data-theme="dark"] .tag.st-rejected, :root[data-theme="dark"] .tag.st-blocked { background: #3a1a17; }
.muted { color: var(--ink3); font-size: 14px; }
.small { font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.empty { text-align: center; color: var(--ink3); padding: 48px 16px; }
.avatar { width: 22px; height: 22px; border-radius: 50%; vertical-align: middle; }
.callout { border-left: 3px solid var(--acc); background: var(--tint); padding: 10px 12px; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 12px 0; }
.callout.warn { border-color: var(--warn); background: var(--tint2); }
hr.rule { border: 0; border-top: 1px solid var(--rule); margin: 16px 0; }

/* ---- 表單 ---- */
label.f { display: block; margin: 12px 0 4px; font-weight: 500; font-size: 14px; }
label.f .hint { color: var(--ink3); font-weight: 400; margin-left: 6px; }
input[type=text], input[type=url], input[type=email], input[type=number], input[type=date], textarea, select { width: 100%; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--rule2); border-radius: var(--r-sm); padding: 10px 12px; min-height: 44px; }
textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--acc); outline-offset: 0; border-color: var(--acc); }
.counter { font-family: var(--mono); font-size: 12px; color: var(--ink3); text-align: right; margin-top: 4px; }
.counter.over { color: var(--neg); }
.counter.warn { color: var(--warn); }
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-row label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule2); border-radius: var(--r-sm); padding: 0 12px; min-height: 44px; cursor: pointer; }
.radio-row label.on { border-color: var(--acc); background: var(--tint); }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; font-size: 14px; }
.check input { margin-top: 5px; width: 18px; height: 18px; }
.err { color: var(--neg); font-size: 14px; margin-top: 6px; }
.editor { border: 1px solid var(--rule2); border-radius: var(--r-sm); overflow: hidden; }
.editor .toolbar { display: flex; gap: 2px; padding: 4px; border-bottom: 1px solid var(--rule); background: var(--bg2); flex-wrap: wrap; align-items: center; }
.editor .toolbar button { min-width: 40px; min-height: 40px; border: 0; background: transparent; color: var(--ink2); border-radius: 4px; cursor: pointer; font-size: 14px; }
.editor .toolbar button:hover { background: var(--panel); color: var(--acc); }
.editor .toolbar #preview-btn { padding: 0 12px; }
.editor textarea { border: 0; border-radius: 0; min-height: 260px; }
.editor .preview { padding: 12px 14px; min-height: 120px; }
.cover-pick { min-height: 44px; }
.cover-th { position: relative; width: 120px; aspect-ratio: 1; border: 1px solid var(--rule); border-radius: var(--r-sm); overflow: hidden; background: var(--bg2); }
.cover-th img { width: 100%; height: 100%; object-fit: contain; }
.cover-th .x { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.upload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 8px; }
.upload-grid .th { position: relative; aspect-ratio: 4/5; border: 1px solid var(--rule); border-radius: var(--r-sm); overflow: hidden; background: var(--bg2); }
.upload-grid .th img { width: 100%; height: 100%; object-fit: cover; }
.upload-grid .th .x { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.upload-grid .th .pos { position: absolute; left: 4px; bottom: 4px; font-family: var(--mono); font-size: 11px; background: rgba(0,0,0,.6); color: #fff; padding: 1px 6px; border-radius: 3px; }
.upload-grid .add { display: grid; place-items: center; color: var(--ink3); cursor: pointer; font-size: 28px; }

/* ---- 案例牆 ---- */
.wallbar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.wallbar .row2 { display: flex; gap: 8px; align-items: center; }
.wallbar #q { flex: 1; min-width: 0; }
.wallbar #cat-sel { width: auto; flex: 0 0 auto; min-width: 110px; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1400px) { .grid { grid-template-columns: repeat(5, 1fr); } }
.card { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .12s; position: relative; }
.card:hover { transform: translateY(-2px); }
.card.seen { opacity: .82; }
.card .cover { aspect-ratio: 1; background: var(--bg2); color: var(--hero-ink); position: relative; overflow: hidden; }
.card .cover img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* 沒封面的卡：用文字排成一張「圖卡」，分類眉標＋大標題＋一句話 */
.card .cover .ph { position: absolute; inset: 0; padding: 14px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; background: linear-gradient(160deg, var(--hero), #1c4a52); }
.card .cover .ph.t1 { background: linear-gradient(160deg, #1b2431, #35506a); }
.card .cover .ph.t2 { background: linear-gradient(160deg, #3a2a14, #6b4a1e); }
.card .cover .ph i { font-style: normal; font-size: 11px; letter-spacing: .12em; color: var(--hero-muted); font-family: var(--mono); }
.card .cover .ph span { font-weight: 900; font-size: 17px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex-shrink: 0; }
.card .cover .ph em { font-style: normal; font-size: 12px; line-height: 1.45; color: var(--hero-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 600px) { .card .cover .ph { padding: 18px; gap: 10px; } .card .cover .ph span { font-size: 24px; -webkit-line-clamp: 4; } .card .cover .ph em { font-size: 14px; -webkit-line-clamp: 3; } }
.card .cover .seen-mark { position: absolute; top: 8px; right: 8px; font-size: 12px; background: rgba(0,0,0,.55); color: #fff; padding: 2px 8px; border-radius: 4px; }
.card .cb { padding: 10px 12px 8px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card h3 { margin: 0; font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .hook { color: var(--ink2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .cf { display: flex; align-items: center; gap: 8px; color: var(--ink3); font-size: 12px; margin-top: auto; padding-top: 6px; min-width: 0; }
.card .cf .who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .cf .tag { white-space: nowrap; }
@media (min-width: 600px) { .card h3 { font-size: 16px; } .card .hook { font-size: 14px; } .card .cf { font-size: 13px; } }
.card .cf .sp { margin-left: auto; display: inline-flex; gap: 8px; font-family: var(--mono); flex-shrink: 0; white-space: nowrap; }
.card .cf .bk { color: var(--star); }

/* ---- 彈窗 ---- */
.modal-bg { position: fixed; inset: 0; background: rgba(8,20,24,.72); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 720px) { .modal-bg { align-items: center; padding: 24px; } }
.modal { background: var(--panel); color: var(--ink); width: 100%; max-width: 1080px; max-height: 96vh; border-radius: var(--radius) var(--radius) 0 0; display: flex; flex-direction: column; overflow: hidden; }
@media (min-width: 720px) { .modal { border-radius: var(--radius); max-height: 92vh; } }
.modal-h { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--rule); flex-shrink: 0; }
.modal-h .pos { font-family: var(--mono); font-size: 13px; color: var(--ink3); }
.modal-h .x { margin-left: auto; min-width: 44px; }
.modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 0 16px; }
.mc { padding: 12px 16px 0; }
.mc h2 { margin: 6px 0 4px; font-size: 22px; line-height: 1.35; }
.mc .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--ink3); font-size: 13px; }
.mc .hook { font-size: 17px; font-weight: 700; margin: 12px 0; line-height: 1.5; }
/* 文章雙欄：桌機左 3/4 內文、右 1/4 側欄；手機側欄縮成內文上方一塊 */
.mc.two-col { display: grid; grid-template-columns: 1fr; gap: 0 28px; }
.mc-side { order: -1; display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; align-items: start; padding: 4px 0 12px; border-bottom: 1px solid var(--rule); margin-bottom: 8px; }
.mc-side .side-cover { grid-row: 1 / span 3; width: 96px; height: 96px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--rule); }
.mc-side .side-credit { grid-column: 2; }
.mc-side .side-author { display: flex; gap: 8px; align-items: center; grid-column: 2; }
.mc-side .side-kv { display: flex; gap: 12px; margin: 0; font-size: 13px; grid-column: 2; flex-wrap: wrap; }
.mc-side .side-kv dt { color: var(--ink3); display: inline; }
.mc-side .side-kv dd { display: inline; margin: 0 0 0 4px; }
.mc-side #side-toc, .mc-side #side-takeaways { grid-column: 1 / -1; }
.mc-side .side-h { font-size: 12px; letter-spacing: .08em; color: var(--ink3); margin: 8px 0 4px; font-family: var(--mono); }
.mc-side .toc { margin: 0; padding-left: 18px; font-size: 14px; }
.mc-side .toc li.l3 { margin-left: 12px; font-size: 13px; }
.mc-side .toc a { color: var(--ink2); }
.mc-side .takeaways { margin: 0; padding-left: 18px; font-size: 14px; }
@media (min-width: 900px) {
  .mc.two-col { grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr); }
  .mc-side { order: 0; display: block; position: sticky; top: 0; align-self: start; border-bottom: 0; border-left: 1px solid var(--rule); padding: 4px 0 0 20px; margin: 0; }
  .mc-side .side-cover { width: 100%; height: auto; aspect-ratio: 1; display: block; }
  .mc-side .side-author { margin-top: 10px; }
  .mc-side .side-kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 10px 0; }
  .mc-side .side-kv dt, .mc-side .side-kv dd { display: block; margin: 0; }
}
.mc .cover-img { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: var(--bg2); border-radius: var(--r-sm); margin: 12px 0; }
.mc .src { color: var(--ink3); font-size: 14px; margin: 14px 0 6px; }
.revs { border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 8px 10px; margin: 6px 0 10px; display: flex; flex-direction: column; gap: 8px; }
.rev { border-top: 1px solid var(--rule); padding-top: 6px; }
.rev:first-of-type { border-top: 0; padding-top: 0; }
.rev-body { white-space: pre-line; }
.md p { margin: 0 0 10px; }
.md h1, .md h2, .md h3, .md h4 { margin: 18px 0 6px; line-height: 1.35; }
.md h1 { font-size: 20px; } .md h2 { font-size: 18px; } .md h3 { font-size: 16px; } .md h4 { font-size: 15px; }
.md img { display: block; max-width: 100%; height: auto; border-radius: var(--r-sm); border: 1px solid var(--rule); margin: 8px 0; }
.md blockquote { margin: 10px 0; padding: 6px 12px; border-left: 3px solid var(--acc); background: var(--tint); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.md ul, .md ol { padding-left: 22px; margin: 6px 0 10px; }
.md code { font-family: var(--mono); font-size: 13px; background: var(--bg2); padding: 1px 5px; border-radius: 3px; }
.md pre { overflow-x: auto; background: var(--bg2); padding: 10px; border-radius: var(--r-sm); }
.md table { border-collapse: collapse; font-size: 14px; }
.md th, .md td { border: 1px solid var(--rule); padding: 4px 8px; }
.md hr { border: 0; border-top: 1px solid var(--rule); margin: 14px 0; }
.actions { display: flex; gap: 8px; padding: 12px 0; border-top: 1px solid var(--rule); flex-wrap: wrap; margin-top: 12px; }
.actions .btn { flex: 1; min-width: 72px; max-width: 220px; }
.actions .btn .n { font-family: var(--mono); }
.comments { padding: 0; }
.comments h4 { margin: 12px 0 8px; font-size: 15px; }
.comment { border-top: 1px solid var(--rule); padding: 8px 0; font-size: 15px; }
.comment .who { color: var(--ink3); font-size: 12px; display: flex; gap: 8px; align-items: center; }
.comment .who .del { margin-left: auto; background: none; border: 0; color: var(--ink3); cursor: pointer; min-height: 32px; }
.comment-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
/* ---- 抽一張 ---- */
.flash { max-width: 640px; margin: 0 auto; }
.flash .card { cursor: default; }
.flash .card:hover { transform: none; }
.flash .fbar { display: flex; gap: 8px; margin: 12px 0; }
.flash .fbar .btn { flex: 1; }
.flash .progress { font-family: var(--mono); font-size: 13px; color: var(--ink3); text-align: center; }

/* ---- 列表（我的、管理） ---- */
.list { display: flex; flex-direction: column; gap: 8px; }
.li { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.li .t { font-weight: 700; }
.li .m { color: var(--ink3); font-size: 13px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.li .m .num { color: var(--ink2); }
.li .ops { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; min-height: 44px; color: var(--ink2); cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--acc); border-bottom-color: var(--acc); font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.stat { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 12px; }
.stat .v { font-family: var(--mono); font-size: 24px; font-weight: 600; }
.stat .k { color: var(--ink3); font-size: 13px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.tbl th { color: var(--ink3); font-weight: 500; font-size: 12px; }
.tbl-wrap { overflow-x: auto; }

/* ---- 許願板 ---- */
.wish { display: grid; grid-template-columns: 56px 1fr; gap: 12px; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 12px; }
.wish .vote { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.wish .vote button { width: 52px; min-height: 52px; border: 1px solid var(--rule2); background: var(--panel); border-radius: var(--r-sm); cursor: pointer; font-family: var(--mono); font-size: 15px; line-height: 1.1; color: var(--ink2); }
.wish .vote button.on { background: var(--tint); border-color: var(--acc); color: var(--acc); font-weight: 600; }
.wish .t { font-weight: 700; }
.wish .d { color: var(--ink2); font-size: 14px; white-space: pre-wrap; }
.wish .note { margin-top: 6px; }
.tag.ws-open { background: var(--bg2); color: var(--ink2); }
.tag.ws-planned { background: var(--tint); color: var(--acc); }
.tag.ws-building { background: var(--tint2); color: var(--warn); }
.tag.ws-done { background: #e3f2e7; color: var(--pos); }
.tag.ws-declined { background: #fbe4e1; color: var(--neg); }

/* ---- 其他 ---- */
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r-sm); z-index: 60; font-size: 14px; max-width: 90vw; box-shadow: var(--shadow); }
@media (min-width: 641px) { .toast { bottom: 24px; } }
.foot { border-top: 1px solid var(--rule); background: var(--bg2); }
.foot-in { display: flex; gap: 8px 16px; justify-content: space-between; flex-wrap: wrap; padding: 18px 16px; color: var(--ink3); font-size: 13px; }
.foot-brand { color: var(--ink2); font-weight: 700; }
.login-box { max-width: 420px; margin: 32px auto; text-align: center; }
.login-box .gbtn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px; border: 1px solid var(--rule2); border-radius: var(--r-sm); background: var(--panel); color: var(--ink); font-weight: 500; }
.login-box .gbtn svg { width: 20px; height: 20px; }
.kbd { font-family: var(--mono); font-size: 12px; border: 1px solid var(--rule2); border-radius: 3px; padding: 0 5px; color: var(--ink3); }
details.dev { margin-top: 24px; font-size: 13px; color: var(--ink3); }

/* ---- 封面產生器 ---- */
.cm { max-width: 1040px; }
.cm-body { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 12px 16px 16px; }
@media (min-width: 900px) { .cm-body { grid-template-columns: minmax(0, 1fr) 360px; } }
.cm-left { text-align: center; }
.cm-left canvas { width: 100%; max-width: 520px; aspect-ratio: 1; height: auto; border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--hero); }
.cm-right input[type=range] { width: 100%; min-height: 40px; }
.cm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; max-height: 260px; overflow-y: auto; }
.cm-th { position: relative; border: 2px solid transparent; border-radius: var(--r-sm); padding: 0; background: var(--bg2); cursor: pointer; overflow: hidden; aspect-ratio: 1; }
.cm-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-th span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; background: rgba(0,0,0,.55); color: #fff; padding: 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-th.on { border-color: var(--acc); }
