:root {
  --bg: #0f1115;
  --surface: #171a20;
  --surface-2: #1e222a;
  --border: #2a2f3a;
  --text: #eef0f3;
  --text-2: #b4bac5;
  --muted: #7d8492;
  --accent: #3987e5;
  --pos: #2fbf7f;
  --neg: #e66767;
  --pos-bg: rgba(47, 191, 127, 0.14);
  --neg-bg: rgba(230, 103, 103, 0.14);
  --grid: #262a33;
  --radius: 12px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --border: #e1e4ea;
  --text: #111317;
  --text-2: #4b5160;
  --muted: #7a8090;
  --accent: #2a78d6;
  --pos: #12935b;
  --neg: #d03b3b;
  --pos-bg: rgba(18, 147, 91, 0.10);
  --neg-bg: rgba(208, 59, 59, 0.10);
  --grid: #eceef2;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.brand-mark { color: var(--accent); }
.topbar-right { display: flex; gap: 8px; align-items: center; }

.frame { max-width: 1280px; margin: 0 auto; padding: 16px; }

.btn, .icon-btn, select, input, textarea {
  font: inherit; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
}
.btn { padding: 6px 12px; cursor: pointer; }
.btn:hover, .icon-btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--neg); }
.icon-btn { width: 34px; height: 34px; cursor: pointer; }
select, input, textarea { padding: 6px 10px; }
textarea { width: 100%; resize: vertical; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px;
}
.section { margin-top: 16px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.section-head h2 { margin: 0; font-size: 16px; }

/* --- 總覽 --- */
.overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.stat .label { color: var(--muted); font-size: 12px; }
.stat .value { font-size: 20px; font-weight: 700; margin-top: 2px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 16px; }
.acc-card { display: block; transition: border-color .15s, transform .15s; }
.acc-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.acc-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.acc-name { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.type-head { margin: 22px 0 -4px; padding-left: 10px; border-left: 3px solid var(--accent); }
.view-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font: inherit; font-size: 14px; cursor: pointer; }
.chip small { margin-left: 2px; opacity: .7; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-type { border-style: dashed; }
.chip-type.on { border-style: solid; }
/* 建議本金 / 0.01 手 */
.rec-line { margin-top: 8px; padding: 6px 10px; border-radius: 8px; font-size: 13px; color: var(--text-2);
  background: rgba(212, 167, 44, .1); border: 1px solid rgba(212, 167, 44, .35); }
.rec-line b { color: var(--text); }
.rec-line b.neg { color: var(--neg); }
.rec-line .rec-note { display: block; margin-top: 2px; font-size: 11px; color: var(--text-3, var(--text-2)); opacity: .75; }

/* 精簡 / 完整 切換 + 精簡列 */
.list-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.list-tools + .section-head { margin-top: 14px; }
.type-filter { display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.type-filter::-webkit-scrollbar { display: none; }
.type-filter button { flex: none; padding: 4px 11px; border-radius: 999px; border: 1px dashed var(--border); background: transparent;
  color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; }
.type-filter button small { opacity: .7; }
.type-filter button.on { border-style: solid; border-color: var(--accent); color: var(--accent); font-weight: 700; }
.mode-switch { display: flex; flex: none; gap: 0; }
.mode-switch button { padding: 5px 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font: inherit; font-size: 13px; cursor: pointer; }
.mode-switch button:first-child { border-radius: 999px 0 0 999px; }
.mode-switch button:last-child { border-radius: 0 999px 999px 0; border-left: 0; }
.mode-switch button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.crows { display: grid; gap: 6px; margin-top: 16px; }
.crow { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: inherit;
  text-decoration: none; transition: border-color .15s; }
.crow:hover { border-color: var(--accent); }
.crow-rank { text-align: center; }
.crow-rank .rank { margin: 0; }
.crow-main { display: grid; gap: 2px; min-width: 0; }
.crow-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow-sub { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow-sub .dot { flex: none; }
.crow-num { display: grid; justify-items: end; min-width: 58px; font-variant-numeric: tabular-nums; }
.crow-num small { color: var(--muted); font-size: 11px; }
.crow-num b { font-size: 15px; }
.rank { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 6px; font-size: 12px; vertical-align: 2px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.rank-1 { background: #d4a72c; border-color: #d4a72c; color: #1a1300; }
.rank-2 { background: #a9b4c2; border-color: #a9b4c2; color: #111; }
.rank-3 { background: #b87333; border-color: #b87333; color: #fff; }
.acc-sub { color: var(--muted); font-size: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; color: var(--text-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--pos); box-shadow: 0 0 0 3px var(--pos-bg); }
.acc-equity { margin-top: 10px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.acc-equity .big { font-size: 24px; font-weight: 700; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 10px; margin-top: 12px; }
.kv div > span:first-child { display: block; color: var(--muted); font-size: 12px; }
.kv div b { font-weight: 600; }
.acc-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; gap: 8px; flex-wrap: wrap; }

/* --- 明細 --- */
.detail-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.detail-head h1 { margin: 0; font-size: 20px; }
.key-stats { display: flex; gap: 24px; flex-wrap: wrap; margin-left: auto; }
.key-stats > div { display: grid; gap: 2px; }
.key-stats span { font-size: 12px; color: var(--muted); }
.key-stats b { font-size: 22px; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .key-stats { width: 100%; margin-left: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
  .key-stats b { font-size: 16px; }
}
.back { color: var(--muted); font-size: 13px; }
.back:hover { color: var(--text); }
.intro { white-space: pre-wrap; color: var(--text-2); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 7px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; text-align: right; }
th { color: var(--muted); font-weight: 500; position: sticky; top: 0; background: var(--surface); }
th:first-child, td:first-child, td.l, th.l { text-align: left; }
tbody tr:hover { background: var(--surface-2); }
.empty { color: var(--muted); padding: 14px 4px; }

/* --- 月曆 --- */
.cal-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pill { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(88px, 1fr)); gap: 6px; margin-top: 12px; }
.cal-scroll { overflow-x: auto; }
.cal-dow { color: var(--muted); font-size: 12px; text-align: center; padding-bottom: 2px; }
.cal-cell {
  min-height: 74px; border-radius: 8px; padding: 6px 8px; border: 1px solid var(--border);
  background: var(--surface-2); display: flex; flex-direction: column; justify-content: space-between;
  cursor: pointer; text-align: left; font: inherit; color: inherit;
}
.cal-cell.blank { visibility: hidden; cursor: default; }
.cal-cell.p { background: var(--pos-bg); }
.cal-cell.n { background: var(--neg-bg); }
.cal-cell.sel { outline: 2px solid var(--accent); outline-offset: -1px; }
.cal-cell.today .cal-day { color: var(--accent); font-weight: 700; }
.cal-day { font-size: 12px; color: var(--muted); }
.cal-pnl { font-weight: 700; font-size: 14px; }
.cal-n { font-size: 11px; color: var(--muted); }
.cal-fl { font-size: 11px; color: var(--neg); }

/* --- 走勢圖 --- */
.chart-box { position: relative; height: 240px; }
.chart-box svg { width: 100%; height: 100%; display: block; }
.chart-box .axis text { fill: var(--muted); font-size: 11px; }
.chart-box .gridline { stroke: var(--grid); stroke-width: 1; }
.chart-box .zero { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-box .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.chart-box .area { fill: var(--accent); opacity: .10; }
.chart-box .cross { stroke: var(--muted); stroke-width: 1; }
.chart-box .marker { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: transparent; padding: 4px 10px; cursor: pointer; color: var(--text-2); font: inherit; }
.seg button.on { background: var(--surface-2); color: var(--text); font-weight: 600; }

.tooltip {
  position: fixed; z-index: 50; pointer-events: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; font-size: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.25); min-width: 140px;
}
.tooltip .t-row { display: flex; justify-content: space-between; gap: 14px; }

/* --- 登入/管理 --- */
.login { max-width: 360px; margin: 10vh auto 0; display: grid; gap: 12px; }
.login h1 { margin: 0; font-size: 20px; }
.admin-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.share-list { margin-top: 10px; display: grid; gap: 6px; }
.share-item { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.share-item code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }

/* --- 導覽 / 表單 --- */
.nav { display: flex; gap: 2px; margin-right: 6px; }
.nav a { padding: 6px 10px; border-radius: 8px; color: var(--text-2); }
.nav a:hover { color: var(--text); }
.nav a.on { background: var(--surface-2); color: var(--text); font-weight: 600; }
.small { font-size: 12px; }
.tag { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.form-grid label, label.block { display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.block { margin-top: 12px; }
.block > .label { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; margin-bottom: 12px; }
.check { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); cursor: pointer; }
.check:has(input:checked) { border-color: var(--accent); }
.type-checks { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); margin: 6px 0 0; }
.share-rows { display: grid; gap: 10px; }
.share-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.share-row:last-child { border-bottom: 0; }
.share-main { display: grid; gap: 3px; min-width: 0; }
.share-main code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; font-size: 12px; justify-self: start; }
.share-head h1 { margin: 0 0 6px; font-size: 20px; }

/* --- 帳號卡片：淨值右上、浮動置中、今日盈虧醒目 --- */
.acc-card { display: grid; gap: 12px; }
.acc-title { min-width: 0; }
.acc-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.acc-label { color: var(--muted); font-size: 12px; }
.acc-eq { text-align: right; flex-shrink: 0; }
.acc-eq-val { font-size: 20px; font-weight: 700; line-height: 1.2; }
.acc-float { text-align: center; padding: 6px 0 2px; }
.acc-float-val { font-size: 32px; font-weight: 800; line-height: 1.25; letter-spacing: .5px; }
.acc-today {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border);
}
.acc-today.p { background: var(--pos-bg); border-color: color-mix(in srgb, var(--pos) 40%, transparent); }
.acc-today.n { background: var(--neg-bg); border-color: color-mix(in srgb, var(--neg) 40%, transparent); }
.acc-today-label { display: grid; font-weight: 600; }
.acc-today-label small { color: var(--muted); font-weight: 400; font-size: 11px; }
.acc-today-val { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.acc-today-val b { font-size: 24px; font-weight: 800; }
.acc-today-val .pct { font-size: 16px; font-weight: 700; }
.acc-card .kv { margin-top: 0; }
.acc-card .acc-foot { margin-top: 0; }
.pct { margin-left: 6px; font-size: 12px; font-weight: 600; }
.kv .pct { margin-left: 0; display: block; }
.stat .value { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; }
.stat .pct { font-size: 13px; margin-left: 0; }

/* --- 卡片主題背景 (色調漸層 + 右上角線條圖案) --- */
.themed { position: relative; overflow: hidden; isolation: isolate; }
.themed::before, .themed::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.themed::before {
  background:
    radial-gradient(120% 90% at 100% 0%, hsl(var(--card-hue) 75% 50% / .20), transparent 60%),
    linear-gradient(180deg, hsl(var(--card-hue) 60% 50% / .06), transparent 70%);
}
/* 圖案放右上角、往卡片中心淡出，避免壓到數字 */
.themed::after {
  background: var(--card-art) right -34px top -34px / 170px 170px no-repeat;
  opacity: .45;
  -webkit-mask-image: radial-gradient(circle at 100% 0%, #000 18%, transparent 62%);
  mask-image: radial-gradient(circle at 100% 0%, #000 18%, transparent 62%);
}
:root[data-theme="light"] .themed::before { opacity: .75; }
:root[data-theme="light"] .themed::after { opacity: .6; }
.acc-card.themed:hover { border-color: hsl(var(--card-hue) 70% 55%); }
.themed .acc-today:not(.p):not(.n) { background: color-mix(in srgb, var(--surface-2) 85%, transparent); }

/* --- 策略說明 --- */
.strategy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.strategy-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.strategy-box h3 { margin: 0 0 6px; font-size: 14px; color: var(--accent); }
.strategy-box .intro { line-height: 1.8; }

/* --- 觀看人數 / 跟單聯絡 --- */
.viewers { color: var(--pos); white-space: nowrap; }
.contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; border-color: #05a84a; }
.contact h2 { margin: 0 0 4px; }
.contact-id { color: var(--text); user-select: all; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-actions .btn { padding: 9px 16px; font-weight: 600; text-decoration: none; }
.broker-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.broker { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: var(--surface-2); min-width: 0; }
.broker-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.broker-name { font-size: 18px; font-weight: 700; }
.broker-score { display: flex; flex-direction: column; align-items: center; text-decoration: none; padding: 4px 10px; border-radius: 10px;
  color: #e8b339; border: 1px solid rgba(232,179,57,.45); background: rgba(232,179,57,.1); flex: none; }
:root[data-theme="light"] .broker-score { color: #9a6b00; border-color: rgba(154,107,0,.4); background: rgba(232,179,57,.14); }
.broker-score b { font-size: 22px; line-height: 1.1; }
.broker-score span { font-size: 11px; }
.broker-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 6px; }
.broker-facts { margin: 0 0 12px; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.broker-guides { margin-top: 10px; }
.broker-howto { margin-top: 12px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.broker-howto summary { cursor: pointer; font-weight: 600; }
.broker-howto ol { margin: 10px 0 2px; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.broker-note { margin: 10px 0 0; }
.btn-line { background: #05a84a; border-color: #05a84a; color: #fff; }
.btn-line:hover { background: #048f3f; border-color: #048f3f; }

/* --- 客戶端警語 --- */
.disclaimer { border-top: 1px solid var(--border); margin-top: 24px; color: var(--muted); font-size: 12px; line-height: 1.7; white-space: pre-wrap; }
.disclaimer .frame { padding-top: 14px; padding-bottom: 24px; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .6); }
.modal-card { max-width: 560px; width: 100%; max-height: 85vh; overflow: auto; display: grid; gap: 14px; }
.modal-card h2 { margin: 0; font-size: 18px; color: var(--neg); }
.modal-card > .btn-primary { position: sticky; bottom: 0; box-shadow: 0 -10px 16px var(--surface); }
.modal-card .intro { line-height: 1.8; }
.modal-contact { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid #05a84a; border-radius: 10px; }

@media (max-width: 640px) {
  .nav a { padding: 6px 6px; }
  .frame { padding: 12px 16px; }
  .cards { grid-template-columns: 1fr; }
  .kv { grid-template-columns: repeat(2, 1fr); }
  .stat .value { font-size: 17px; }
  .calendar { grid-template-columns: repeat(7, minmax(64px, 1fr)); }
  .cal-pnl { font-size: 12px; }
  /* 分類標籤改成左右滑動，不擠成多排 */
  .view-tabs { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .view-tabs::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  /* 跟單按鈕在手機上變成底部整條 */
  .follow-bar { left: 12px; right: 12px; bottom: 12px; text-align: center; }
}

.rank-metric { margin-left: 8px; font-size: 13px; font-weight: 700; vertical-align: 1px; }

/* --- 沒有持倉 --- */
.acc-float-val.idle { font-size: 22px; font-weight: 700; color: var(--muted); line-height: 1.75; }

/* --- 每月報酬 --- */
.monthly td b { font-size: 15px; }

/* --- 公告 / 狀態備註 / 本週戰報 --- */
.notice { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; padding: 12px 16px; border-radius: var(--radius);
  border: 1px solid rgba(232, 179, 57, .45); background: rgba(232, 179, 57, .12); color: var(--text); font-size: 15px;
  line-height: 1.6; white-space: pre-line; }
.notice-icon { flex: none; font-size: 18px; line-height: 1.4; }
.acc-float-val.idle.paused { color: #e8b339; }
:root[data-theme="light"] .acc-float-val.idle.paused { color: #9a6b00; }
/* --- 公告專區 --- */
.posts-strip { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.posts-strip .section-head { margin-bottom: 4px; }
.post-line { display: flex; align-items: center; gap: 8px; padding: 9px 4px; border-top: 1px solid var(--border);
  color: var(--text); text-decoration: none; }
.post-line:hover .post-line-title { text-decoration: underline; }
.post-line > .muted { flex: none; }
.post-line-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.post-tag { flex: none; display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.post-tag.pin { color: #e8b339; background: rgba(232, 179, 57, .14); }
.post-tag.draft { color: var(--muted); background: var(--surface-2); }
.post { display: grid; gap: 10px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.post-title { margin: 0; font-size: 19px; }
.post-img { display: block; width: 100%; max-width: 640px; height: auto; border-radius: 10px; }
.post-body { white-space: pre-line; line-height: 1.8; }
.collab-pw { font-family: Consolas, monospace; font-size: 16px; letter-spacing: .5px; margin-right: 8px; user-select: all; }
.post-admin { border-top: 1px solid var(--border); padding-top: 10px; }
:root[data-theme="light"] .post-tag.pin { color: #9a6b00; }
.notice-link { font-weight: 700; color: #e8b339; }
.notice-img { display: block; width: 100%; height: auto; border-radius: 10px; margin-bottom: 14px; }
.acc-note { display: inline-block; justify-self: start; margin-top: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px;
  font-weight: 600; color: #e8b339; background: rgba(232, 179, 57, .13); border: 1px solid rgba(232, 179, 57, .35); }
:root[data-theme="light"] .acc-note { color: #9a6b00; }
.week-table td:nth-child(2), .week-table th:nth-child(2) { text-align: left; white-space: normal; min-width: 120px; }
.week-table td b { font-size: 15px; }
.week-note { font-size: 12px; color: #e8b339; font-weight: 600; }
:root[data-theme="light"] .week-note { color: #9a6b00; }

/* --- 明細頁固定的跟單按鈕 (客戶端) --- */
.follow-bar { position: fixed; right: 20px; bottom: 20px; z-index: 50; padding: 12px 22px; border-radius: 999px;
  font-size: 16px; font-weight: 700; text-decoration: none; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.frame:has(.follow-bar) { padding-bottom: 84px; }
.key-stats small { font-size: 12px; }
