:root{
  --bg:#0a0e16; --surface:#121826; --surface-2:#1a2231; --border:#212a3b;
  --text-primary:#eef2f8; --text-secondary:#8b96a8; --text-tertiary:#5b6577;
  --accent-blue:#4c8dff; --accent-cyan:#38e1ff; --accent-green:#2ecc8f;
  --accent-red:#f75f5f; --accent-orange:#f5a524;
}
*{ box-sizing:border-box; }
html,body{ margin:0; height:100%; background:var(--bg); }
body{
  font-family:'Manrope', system-ui, sans-serif;
  font-size:calc(16px * var(--fs, 1));
  color:var(--text-primary);
  -webkit-font-smoothing:antialiased;
}
button{ font-family:inherit; }
a{ color:inherit; }
::-webkit-scrollbar{ width:0; height:0; }

.app{
  max-width:480px;
  margin:0 auto;
  min-height:100vh;
  background:var(--bg);
  display:flex;
  flex-direction:column;
}

.screen{ display:none; flex-direction:column; min-height:100vh; }
.screen.active{ display:flex; }

.topbar{
  flex-shrink:0;
  padding:18px 18px 14px;
  display:flex;
  align-items:center;
  gap:12px;
  border-bottom:1px solid var(--border);
  position:sticky;
  top:0;
  background:var(--bg);
  z-index:5;
}
.badge{
  width:38px; height:38px; border-radius:11px;
  background:var(--accent-cyan);
  display:flex; align-items:center; justify-content:center;
  font-family:'IBM Plex Mono', monospace; font-weight:700; font-size:calc(13px * var(--fs, 1)); color:#08131a;
  flex-shrink:0;
}
.topbar-title{ flex:1; min-width:0; }
.app-name{ font-size:15px; font-weight:700; }
.app-sub{ font-size:10.5px; color:var(--text-tertiary); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.icon-btn{
  width:34px; height:34px; border-radius:50%;
  border:1px solid var(--border); background:transparent;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; flex-shrink:0;
}
.icon-btn-green{ border:none; background:var(--accent-green); }

.scroll{ flex:1 1 auto; overflow-y:auto; }
.center-pad{ display:flex; align-items:center; justify-content:center; padding:40px 24px; }
.pad-all{ padding:18px; }

.plan-tabs{ display:flex; padding:0 14px; border-bottom:1px solid var(--border); }
.plan-tab{
  flex:1; background:none; border:none; padding:12px 0;
  font-size:calc(13px * var(--fs, 1)); font-weight:700; cursor:pointer;
  color:var(--text-tertiary); border-bottom:2px solid transparent;
}
.plan-tab.active{ color:var(--text-primary); border-bottom-color:var(--accent-cyan); }

.mode-note{ padding:14px 18px 4px; display:flex; align-items:center; gap:8px; }
.mode-pill{ white-space:nowrap; flex:none;
  display:inline-block; padding:6px 14px; border-radius:8px; border:1px solid var(--surface-2);
  background:transparent; color:var(--text-secondary); font-size:calc(12px * var(--fs, 1)); font-weight:700; cursor:pointer;
}
.mode-pill.active{ background:var(--accent-cyan); color:#08131a; border-color:var(--accent-cyan); }
.mode-note-text{ font-size:calc(10.5px * var(--fs, 1)); color:var(--text-tertiary); }
.mode-note-line{ padding:6px 18px 0; }

.row-between{ display:flex; align-items:center; justify-content:space-between; padding:0 18px; }
.pad-top{ margin-top:12px; }
.pad-top-sm{ margin-top:6px; }
.muted-label{ font-size:calc(11.5px * var(--fs, 1)); color:var(--text-secondary); }
.accent-text{ color:var(--text-primary); font-weight:700; }

.logic-btn{
  border:1px solid var(--border); background:var(--surface); border-radius:7px;
  padding:4px 10px; font-size:calc(11px * var(--fs, 1)); font-weight:700; color:var(--accent-orange); cursor:pointer;
}

.condition-list{ padding:10px 18px 4px; display:flex; flex-direction:column; gap:8px; }
.condition-row{
  display:flex; align-items:center; justify-content:space-between;
  background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:11px 12px;
}
.condition-label{ font-size:calc(12.5px * var(--fs, 1)); font-weight:700; }
.condition-label.off{ color:var(--text-tertiary); }
.condition-desc{ font-size:calc(10.5px * var(--fs, 1)); color:var(--text-tertiary); margin-top:2px; }

.toggle{
  width:36px; height:20px; border-radius:999px; border:1px solid var(--border);
  background:#232c3d; position:relative; cursor:pointer; padding:0; flex-shrink:0;
}
.toggle .knob{
  position:absolute; top:1px; left:1px; width:16px; height:16px; border-radius:50%;
  background:var(--text-secondary); transition:transform .15s ease, background .15s ease;
}
.toggle.on{ background:var(--accent-cyan); border-color:var(--accent-cyan); }
.toggle.on .knob{ transform:translateX(16px); background:#0a0e16; }

.pad-block{ padding:14px 18px; }
.primary-btn{
  width:100%; border:none; border-radius:12px; padding:13px 0;
  background:var(--accent-blue); color:#fff; font-size:calc(14px * var(--fs, 1)); font-weight:700; cursor:pointer;
}
.primary-btn:disabled{ opacity:.6; cursor:default; }

.divider{ padding:2px 18px 6px; display:flex; align-items:center; gap:8px; color:var(--text-tertiary); font-size:calc(11px * var(--fs, 1)); }
.divider::before, .divider::after{ content:""; flex:1; height:1px; background:var(--border); }

.result-list{ padding:0 18px; }
.result-row{ display:flex; justify-content:space-between; align-items:flex-start; padding:12px 0; border-bottom:1px solid var(--border); }
.result-code{ font-family:'IBM Plex Mono', monospace; font-size:calc(12px * var(--fs, 1)); color:var(--accent-cyan); }
.result-name{ font-size:calc(14px * var(--fs, 1)); font-weight:700; margin-left:8px; }
.result-sub{ margin-top:5px; display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.tag{ font-size:calc(9.5px * var(--fs, 1)); font-weight:700; padding:2px 7px; border-radius:999px; background:var(--surface-2); color:var(--text-secondary); }
.result-right{ text-align:right; }
.result-pct{ font-family:'IBM Plex Mono', monospace; font-size:calc(15px * var(--fs, 1)); font-weight:700; }
.result-pct.pos{ color:var(--accent-green); }
.result-pct.neg{ color:var(--accent-red); }
.result-meta{ margin-top:4px; font-size:calc(10px * var(--fs, 1)); color:var(--text-tertiary); }

.footer-note{ padding:14px 18px 20px; text-align:center; font-size:calc(11px * var(--fs, 1)); color:var(--text-tertiary); }

.bottom-nav{
  flex-shrink:0; display:flex; border-top:1px solid var(--border); background:var(--surface);
  position:sticky; bottom:0;
}
.nav-item{
  flex:1; display:flex; flex-direction:column; align-items:center; gap:4px;
  padding:10px 0 12px; background:none; border:none; cursor:pointer; color:var(--text-secondary);
}
.nav-item span{ font-size:calc(10px * min(var(--fs, 1), 1.1)); }
.nav-item.active{ color:var(--accent-cyan); font-weight:700; }

.empty-state{ text-align:center; max-width:280px; }
.empty-title{ margin-top:14px; font-size:calc(14px * var(--fs, 1)); font-weight:700; }
.empty-desc{ margin-top:8px; font-size:calc(12px * var(--fs, 1)); color:var(--text-tertiary); line-height:1.6; }

.section-label{ font-size:calc(12px * var(--fs, 1)); font-weight:700; color:var(--text-secondary); margin-bottom:10px; }
.notif-list{ display:flex; flex-direction:column; gap:8px; }
.card{ background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:14px; }
.chip{ font-size:calc(11px * var(--fs, 1)); font-weight:700; padding:3px 10px; border-radius:999px; background:var(--surface-2); color:var(--text-primary); }
.small-note{ font-size:calc(10.5px * var(--fs, 1)); color:var(--text-tertiary); line-height:1.6; }

.loading-note{ text-align:center; padding:20px; color:var(--text-tertiary); font-size:calc(12px * var(--fs, 1)); }

.history-link{
  background:none; border:none; padding:0; cursor:pointer;
  font-size:calc(11.5px * var(--fs, 1)); font-weight:700; color:var(--accent-cyan);
}

.history-entry{
  background:var(--surface); border:1px solid var(--border); border-radius:12px;
  padding:14px; margin-bottom:10px;
}
.history-entry-head{ display:flex; justify-content:space-between; align-items:flex-start; }
.history-date{ font-size:calc(12.5px * var(--fs, 1)); font-weight:700; }
.history-meta{ font-size:calc(10.5px * var(--fs, 1)); color:var(--text-tertiary); margin-top:3px; }
.history-count{ font-family:'IBM Plex Mono', monospace; font-size:calc(13px * var(--fs, 1)); font-weight:700; color:var(--accent-green); text-align:right; }
.history-stocks{ margin-top:10px; display:flex; flex-wrap:wrap; gap:6px; }
.history-stock-chip{
  font-size:calc(11px * var(--fs, 1)); padding:4px 9px; border-radius:999px; background:var(--surface-2);
  display:flex; align-items:center; gap:5px; color:var(--text-secondary);
}
.history-stock-chip .code{ font-family:'IBM Plex Mono', monospace; color:var(--accent-cyan); }

.date-select{
  background:var(--surface); border:1px solid var(--border); border-radius:7px;
  padding:5px 8px; font-size:calc(11.5px * var(--fs, 1)); font-weight:700; color:var(--text-primary);
  font-family:inherit; cursor:pointer;
}

/* ---------- 主畫面：條件摘要列 + 調整監控參數按鈕 ---------- */
.summary-bar{ display:flex; align-items:center; justify-content:space-between; padding:0 18px; gap:10px; }
.summary-left{ display:flex; align-items:center; gap:8px; min-width:0; }
.summary-sep{ color:var(--text-tertiary); font-size:calc(11px * var(--fs, 1)); }
.primary-btn-sm{
  border:none; border-radius:10px; padding:9px 14px; background:var(--accent-green);
  color:#08131a; font-size:calc(12.5px * var(--fs, 1)); font-weight:700; cursor:pointer; flex-shrink:0;
  display:flex; align-items:center; gap:6px; white-space:nowrap;
}
.primary-btn-sm:disabled{ opacity:.6; cursor:default; }
.adjust-btn{
  width:100%; display:flex; align-items:center; justify-content:center; gap:8px;
  border:1px solid var(--border); border-radius:12px; padding:12px 0;
  background:var(--surface); color:var(--text-primary); font-size:calc(13px * var(--fs, 1)); font-weight:700; cursor:pointer;
}

/* ---------- 調整監控參數：由下往上滑出的選單 ---------- */
.sheet-overlay{
  position:fixed; inset:0; background:rgba(3,6,12,.6);
  display:flex; align-items:flex-end; justify-content:center;
  opacity:0; pointer-events:none; transition:opacity .18s ease; z-index:50;
}
.sheet-overlay.open{ opacity:1; pointer-events:auto; }
.sheet-panel{
  width:100%; max-width:480px; max-height:82vh; background:var(--surface);
  border-radius:20px 20px 0 0; border:1px solid var(--border); border-bottom:none;
  display:flex; flex-direction:column;
  transform:translateY(100%); transition:transform .2s ease;
}
.sheet-overlay.open .sheet-panel{ transform:translateY(0); }

.sheet-header{
  flex-shrink:0; display:flex; align-items:center; justify-content:space-between;
  padding:16px 16px 12px; border-bottom:1px solid var(--border);
}
.sheet-title-group{ display:flex; align-items:center; gap:10px; }
.sheet-icon{ font-size:calc(20px * var(--fs, 1)); }
.sheet-title{ font-size:calc(14px * var(--fs, 1)); font-weight:700; }
.sheet-subtitle{ font-size:calc(11px * var(--fs, 1)); color:var(--text-tertiary); margin-top:2px; }

.sheet-body{ flex:1 1 auto; overflow-y:auto; padding:10px 16px 16px; }
.sheet-footer{ flex-shrink:0; padding:12px 16px 16px; border-top:1px solid var(--border); }
.ghost-btn{
  width:100%; border:1px solid var(--border); border-radius:10px; padding:10px 0;
  background:transparent; color:var(--text-secondary); font-size:calc(12px * var(--fs, 1)); font-weight:700; cursor:pointer;
}

.cat-group{ margin-top:10px; border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.cat-header{
  width:100%; display:flex; align-items:center; justify-content:space-between;
  padding:13px 14px; background:var(--surface-2); border:none; cursor:pointer;
  color:var(--text-primary); font-size:calc(12.5px * var(--fs, 1)); font-weight:700;
}
.cat-header .chevron{ color:var(--text-tertiary); transition:transform .15s ease; font-size:calc(11px * var(--fs, 1)); }
.cat-group.open .cat-header .chevron{ transform:rotate(180deg); }
.cat-body{ display:none; padding:10px 12px 12px; flex-direction:column; gap:8px; }
.cat-group.open .cat-body{ display:flex; }

.cond-card{ background:var(--bg); border:1px solid var(--border); border-radius:11px; padding:11px 12px; }
.cond-card.disabled{ opacity:.55; }
.cond-card-head{ display:flex; align-items:flex-start; gap:10px; }
.cond-checkbox{
  width:18px; height:18px; margin-top:2px; flex-shrink:0; accent-color:var(--accent-cyan); cursor:pointer;
}
.cond-checkbox:disabled{ cursor:not-allowed; }
.cond-card-text{ min-width:0; }
.cond-card-label{ font-size:calc(12.5px * var(--fs, 1)); font-weight:700; }
.cond-card-desc{ font-size:calc(10.5px * var(--fs, 1)); color:var(--text-tertiary); margin-top:3px; line-height:1.5; }

.cond-params{
  display:grid; grid-template-columns:1fr 1fr; gap:8px 10px; margin-top:10px;
  padding-top:10px; border-top:1px solid var(--border);
}
.param-field{ display:flex; flex-direction:column; gap:4px; }
.param-field label{ font-size:calc(10px * var(--fs, 1)); color:var(--text-tertiary); }
.param-field input{
  background:var(--surface-2); border:1px solid var(--border); border-radius:7px;
  padding:6px 8px; font-size:calc(12px * var(--fs, 1)); color:var(--text-primary); font-family:inherit; width:100%;
}

/* ---------- 登入 / 審核中畫面 ---------- */
.login-card{ text-align:center; max-width:300px; display:flex; flex-direction:column; align-items:center; }
.badge-lg{ width:56px; height:56px; border-radius:16px; font-size:calc(17px * var(--fs, 1)); margin-bottom:16px; }
.login-title{ font-size:calc(17px * var(--fs, 1)); font-weight:800; }
.login-desc{ margin-top:8px; font-size:calc(12px * var(--fs, 1)); color:var(--text-tertiary); line-height:1.7; }
.line-login-btn{
  margin-top:22px; width:100%; border:none; border-radius:12px; padding:13px 0;
  background:#06c755; color:#fff; font-size:calc(14px * var(--fs, 1)); font-weight:700; cursor:pointer;
  display:flex; align-items:center; justify-content:center; gap:8px;
}
.line-login-btn:active{ opacity:.85; }
.google-login-btn{
  margin-top:10px; width:100%; border:1px solid #dadce0; border-radius:12px; padding:12px 0;
  background:#fff; color:#1f1f1f; font-size:calc(14px * var(--fs, 1)); font-weight:700; cursor:pointer;
  display:flex; align-items:center; justify-content:center; gap:8px;
}
.google-login-btn:active{ opacity:.85; }
.pending-avatar{
  width:64px; height:64px; border-radius:50%; background:var(--surface-2);
  margin-bottom:14px; object-fit:cover;
}
.login-card .primary-btn, .login-card .ghost-btn{ max-width:260px; }

/* ---------- 設定頁：帳號卡片 ---------- */
.account-row{ display:flex; align-items:center; gap:12px; }
.account-avatar{
  width:44px; height:44px; border-radius:50%; background:var(--surface-2); object-fit:cover; flex-shrink:0;
}
.account-info{ min-width:0; }
.account-name{ font-size:calc(13.5px * var(--fs, 1)); font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* 分類標題下方的更新時間/資料日期 */
.cat-title{ display:flex; flex-direction:column; align-items:flex-start; text-align:left; gap:3px; }
.cat-sub{ font-size:calc(10.5px * var(--fs, 1)); font-weight:500; color:var(--text-tertiary); }

/* ===== 邀請碼 / 首購優惠 ===== */
.invite-login{ width:100%; margin:14px 0 4px; display:flex; flex-direction:column; gap:6px; }
.invite-input{
  width:100%; box-sizing:border-box; background:var(--bg); border:1px solid var(--border); border-radius:10px;
  color:var(--text-primary); padding:10px 12px; font-size:calc(14px * var(--fs, 1)); letter-spacing:1px; text-transform:uppercase;
}
.invite-input:focus{ outline:none; border-color:var(--accent-cyan); }
.invite-code-big{ font-size:calc(18px * var(--fs, 1)); font-weight:800; letter-spacing:1.5px; margin-top:2px; }
.redeem-row{ display:flex; align-items:center; gap:8px; }
.redeem-input{ width:64px; text-transform:none; letter-spacing:0; }
.offer-banner{
  width:calc(100% - 32px); margin:12px 16px 0; display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:12px 14px; border-radius:12px; border:1px solid rgba(255,196,0,.45);
  background:linear-gradient(135deg, rgba(255,166,0,.18), rgba(255,77,77,.14)); color:var(--text-primary); cursor:pointer; text-align:left;
}
.offer-banner-title{ font-size:calc(13px * var(--fs, 1)); font-weight:800; color:#ffc94d; }
.offer-banner-desc{ font-size:calc(11px * var(--fs, 1)); color:var(--text-secondary); margin-top:2px; }
.offer-countdown{ font-family:'IBM Plex Mono', monospace; font-size:calc(17px * var(--fs, 1)); font-weight:700; color:#ff6b6b; white-space:nowrap; }
#referral-card .row-between{ padding:0; gap:10px; }
#referral-card .ghost-btn{ width:auto; padding:8px 14px; flex-shrink:0; }
#referral-card .small-note{ margin-top:4px; }
#referral-card .ref-block{ padding-top:12px; margin-top:12px; border-top:1px solid var(--border); }
.redeem-unit{ font-size:calc(12px * var(--fs, 1)); color:var(--text-secondary); }

/* App 內禁止長按選取/複製文字（輸入框除外）；「複製邀請碼」按鈕用程式寫入剪貼簿，不受影響 */
html, body, .app{ -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; }
input, textarea, select{ -webkit-user-select:text; user-select:text; -webkit-touch-callout:default; }

/* iPhone 加到主畫面教學 */
.ios-install-tip{ margin-top:16px; width:100%; box-sizing:border-box; text-align:left; background:var(--surface-2); border:1px solid var(--border); border-radius:12px; padding:12px 14px; }
.ios-install-title{ font-size:calc(12.5px * var(--fs, 1)); font-weight:800; margin-bottom:6px; }
.ios-install-step{ font-size:calc(11.5px * var(--fs, 1)); color:var(--text-secondary); line-height:1.8; }

/* 標誌：極速／選股 兩行字 */
.badge{ flex-direction:column; font-family:'Noto Sans TC','PingFang TC','Microsoft JhengHei',sans-serif; font-weight:900; font-size:calc(10.5px * var(--fs, 1)); line-height:1.08; letter-spacing:.5px; }
.badge-lg{ font-size:calc(15px * var(--fs, 1)); }

/* ===== 影片教學 ===== */
.video-btn{
  height:34px; padding:0 11px; border-radius:17px; border:1px solid rgba(56,225,255,.45);
  background:rgba(56,225,255,.1); color:var(--accent-cyan); display:flex; align-items:center; gap:4px;
  font-size:calc(12px * var(--fs, 1)); font-weight:800; cursor:pointer; flex-shrink:0; margin-right:6px;
}
.vip-lock-card{ background:linear-gradient(135deg, rgba(255,166,0,.16), rgba(255,77,77,.12)); border:1px solid rgba(255,196,0,.4); border-radius:12px; padding:14px; margin-bottom:14px; }
.vip-lock-title{ font-size:calc(14px * var(--fs, 1)); font-weight:800; color:#ffc94d; margin-bottom:4px; }
.video-card{ background:var(--surface); border:1px solid var(--border); border-radius:12px; margin-bottom:10px; overflow:hidden; }
.video-card.locked{ opacity:.6; }
.video-head{ display:flex; gap:12px; align-items:center; padding:13px 14px; cursor:pointer; }
.video-index{ width:34px; height:34px; border-radius:50%; background:var(--surface-2); display:flex; align-items:center; justify-content:center; color:var(--accent-cyan); flex-shrink:0; font-size:calc(13px * var(--fs, 1)); }
.video-title{ font-size:calc(13.5px * var(--fs, 1)); font-weight:700; }
.video-desc{ font-size:calc(11px * var(--fs, 1)); color:var(--text-tertiary); margin-top:3px; }
.video-player iframe, .video-player video{ width:100%; aspect-ratio:16/9; border:0; display:block; background:#000; }

.invite-input.locked{ border-color:rgba(46,204,143,.6); color:var(--accent-green); background:rgba(46,204,143,.08); }
.invite-link{ font-size:calc(10.5px * var(--fs, 1)); color:var(--accent-cyan); word-break:break-all; margin-top:4px; }

/* 複製按鈕列 */
.copy-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:10px; }
.copy-value{ font-family:'IBM Plex Mono', monospace; font-size:calc(15px * var(--fs, 1)); font-weight:700; letter-spacing:1px; color:var(--text-primary); }
.copy-btn{
  flex-shrink:0; border:1px solid rgba(56,225,255,.45); background:rgba(56,225,255,.1); color:var(--accent-cyan);
  border-radius:8px; padding:7px 12px; font-size:calc(11.5px * var(--fs, 1)); font-weight:700; cursor:pointer;
}
.copy-btn:disabled{ opacity:.8; }
#referral-card .copy-row .invite-link{ margin-top:0; flex:1; min-width:0; }

/* ===== 即時動態監控（跑馬燈） ===== */
.trigger-count{ color:#34d399; font-weight:800; }
.live-status{ display:flex; align-items:center; gap:8px; padding:10px 18px 6px; font-size:calc(11px * var(--fs, 1)); color:var(--text-tertiary); }
.live-dot{ width:8px; height:8px; border-radius:50%; background:#5b6577; flex:none; }
.live-dot.on{ background:#34d399; box-shadow:0 0 0 0 rgba(52,211,153,.6); animation:livepulse 1.6s infinite; }
@keyframes livepulse{ 0%{ box-shadow:0 0 0 0 rgba(52,211,153,.55);} 70%{ box-shadow:0 0 0 8px rgba(52,211,153,0);} 100%{ box-shadow:0 0 0 0 rgba(52,211,153,0);} }
.feed-head{ display:flex; justify-content:space-between; padding:8px 18px; font-size:calc(10.5px * var(--fs, 1)); font-weight:700; color:var(--text-secondary); background:var(--surface-2); margin:6px 0 0; }
.feed-list{ display:flex; flex-direction:column; }
.feed-row{ padding:10px 18px; border-bottom:1px solid rgba(255,255,255,.05); transition:background 2.5s ease; }
.feed-row.new{ background:rgba(52,211,153,.22); animation:feedin .35s ease-out; }
@keyframes feedin{ from{ transform:translateY(-8px); opacity:0; } to{ transform:none; opacity:1; } }
.feed-line1{ display:flex; align-items:baseline; gap:8px; }
.feed-time{ font-family:ui-monospace,Menlo,Consolas,monospace; font-size:calc(11px * var(--fs, 1)); color:var(--text-tertiary); }
.feed-name{ font-size:calc(14px * var(--fs, 1)); font-weight:800; color:var(--text-primary); }
.feed-code{ font-family:ui-monospace,Menlo,Consolas,monospace; font-size:calc(11px * var(--fs, 1)); color:var(--text-secondary); }
.feed-tags{ margin-top:5px; display:flex; flex-wrap:wrap; gap:5px; }
.feed-empty{ padding:36px 18px; text-align:center; font-size:calc(12px * var(--fs, 1)); color:var(--text-tertiary); line-height:1.7; }
.live-clear{ margin-left:auto; font-size:calc(11px * var(--fs, 1)); }
#btn-live-run.running{ background:#f87171; color:#1a0a0a; }
.param-error{ color:#f87171; font-size:calc(10.5px * var(--fs, 1)); margin-top:4px; min-height:0; }
.param-field input[type=time]{ color-scheme:dark; }

/* ===== 免費版 / VIP 鎖 ===== */
.cond-card.locked{ opacity:.55; cursor:pointer; }
.cond-card.locked .cond-checkbox{ pointer-events:auto; }
.vip-badge{ display:inline-block; margin-left:8px; padding:2px 7px; border-radius:999px; font-size:calc(10px * var(--fs, 1)); font-weight:800;
  background:rgba(250,204,21,.16); color:#facc15; vertical-align:middle; }
.vip-note{ display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px 12px; margin:0 0 12px;
  border-radius:10px; background:rgba(250,204,21,.10); border:1px solid rgba(250,204,21,.35); font-size:calc(11.5px * var(--fs, 1)); color:#fde68a; }
.vip-note-btn{ flex:none; border:none; border-radius:8px; padding:7px 10px; font-size:calc(11px * var(--fs, 1)); font-weight:800; background:#facc15; color:#1a1405; cursor:pointer; }
.vip-lock-panel{ margin:24px 18px; padding:22px 18px; border-radius:14px; text-align:center;
  background:linear-gradient(160deg, rgba(250,204,21,.12), rgba(56,225,255,.06)); border:1px solid rgba(250,204,21,.3); }
.vip-lock-icon{ font-size:calc(28px * var(--fs, 1)); }
.vip-lock-title{ margin-top:8px; font-size:calc(15px * var(--fs, 1)); font-weight:800; color:var(--text-primary); }
.vip-lock-desc{ margin:8px 0 14px; font-size:calc(11.5px * var(--fs, 1)); line-height:1.7; color:var(--text-secondary); }
.vip-modal{ position:fixed; inset:0; background:rgba(0,0,0,.6); display:none; align-items:center; justify-content:center; z-index:200; padding:24px; }
.vip-modal.open{ display:flex; }
.vip-modal-box{ width:100%; max-width:340px; background:var(--surface-1, #121826); border:1px solid rgba(250,204,21,.35);
  border-radius:16px; padding:22px 20px; text-align:center; }
.vip-modal-crown{ font-size:calc(30px * var(--fs, 1)); }
.vip-modal-title{ font-size:calc(18px * var(--fs, 1)); font-weight:800; color:#facc15; margin-top:4px; }
.vip-modal-msg{ margin-top:8px; font-size:calc(12.5px * var(--fs, 1)); color:var(--text-primary); }
.vip-modal-list{ text-align:left; margin:14px 0; padding-left:20px; font-size:calc(12px * var(--fs, 1)); line-height:1.9; color:var(--text-secondary); }
.vip-modal-go{ width:100%; border:none; border-radius:10px; padding:12px; font-size:calc(14px * var(--fs, 1)); font-weight:800; background:#facc15; color:#1a1405; cursor:pointer; }
.vip-modal-close{ width:100%; margin-top:8px; border:none; background:transparent; color:var(--text-tertiary); font-size:calc(12px * var(--fs, 1)); padding:8px; cursor:pointer; }

/* ===== 方案改名 ===== */
.plan-tab{ -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rename-box{ border-color:rgba(56,225,255,.35); }
.rename-title{ color:var(--accent-cyan); }
.rename-input{ width:100%; box-sizing:border-box; margin-top:14px; background:var(--bg); border:1px solid var(--border); border-radius:10px;
  color:var(--text-primary); padding:12px; font-size:calc(15px * var(--fs, 1)); -webkit-user-select:text; user-select:text; }
.rename-hint{ margin:6px 0 14px; font-size:calc(11px * var(--fs, 1)); color:var(--text-tertiary); }
.rename-save{ background:var(--accent-cyan); color:#08131a; }
.rename-actions{ display:flex; gap:8px; }

/* ===== 每日盤後摘要推播時間 ===== */
.summary-time-row{ display:flex; align-items:center; justify-content:space-between; padding:6px 0 2px 12px; }
.summary-time-label{ font-size:calc(12px * var(--fs, 1)); color:var(--text-secondary); }
.summary-time-input{ background:var(--bg); border:1px solid var(--border); border-radius:8px; color:var(--text-primary);
  padding:7px 10px; font-size:calc(14px * var(--fs, 1)); color-scheme:dark; -webkit-user-select:text; user-select:text; }
.summary-time-note{ padding:2px 0 10px 12px; font-size:calc(10.5px * var(--fs, 1)); color:var(--text-tertiary); border-bottom:1px solid var(--border); margin-bottom:4px; }

/* ===== 推播通知 ===== */
.push-card{ background:var(--surface-1, #121826); border:1px solid var(--border); border-radius:12px; padding:12px; margin-bottom:10px; }
.push-status{ font-size:calc(12px * var(--fs, 1)); color:var(--text-secondary); line-height:1.6; }
.push-status.on{ color:#34d399; }
.push-btns{ display:flex; gap:10px; align-items:center; margin-top:10px; flex-wrap:wrap; }
.param-select{ width:100%; background:var(--bg); border:1px solid var(--border); border-radius:8px; color:var(--text-primary);
  padding:9px 10px; font-size:calc(13px * var(--fs, 1)); color-scheme:dark; }

/* ===== 底部中間「調整監控參數」：獨立的紅色圓圈按鈕，跟左右兩個分頁區隔開 ===== */
.bottom-nav{ overflow:visible; align-items:flex-end; }
.nav-item.nav-center{
  flex:0 0 auto; align-self:center; justify-content:center; gap:3px;
  width:86px; height:86px; margin:-26px 6px 8px; padding:0;
  border-radius:50%; border:3px solid #ff4d5e;
  background:radial-gradient(circle at 50% 35%, #3a1016 0%, #1a0b10 75%);
  color:#ff6b78; box-shadow:0 0 0 4px var(--surface), 0 6px 18px rgba(255,77,94,.35);
}
.nav-item.nav-center span{ font-size:10.5px; font-weight:800; line-height:1.2; max-width:66px; text-align:center; color:#ffd7db; }
.nav-item.nav-center svg{ width:22px; height:22px; }
.nav-item.nav-center.active{ color:#ff6b78; }
.nav-item.nav-center:active{ transform:scale(.96); }

/* ---------- 切換帳號 ---------- */
.switch-acc-btn{ margin-top:12px; width:100%; display:flex; justify-content:space-between; align-items:center;
  border:1px solid rgba(79,209,255,.35); background:rgba(79,209,255,.08); color:#4fd1ff; border-radius:10px;
  padding:11px 14px; font-size:calc(14px * var(--fs, 1)); font-weight:700; cursor:pointer; }
.switch-acc-count{ font-size:calc(12px * var(--fs, 1)); color:var(--text-tertiary); font-weight:500; }
.acc-box{ border-color:rgba(79,209,255,.35); text-align:left; }
.acc-title{ color:#eef2f8; text-align:center; margin-bottom:12px; }
.acc-list{ display:flex; flex-direction:column; gap:8px; max-height:50vh; overflow:auto; }
.acc-item{ display:flex; align-items:center; gap:10px; padding:10px; border-radius:10px; background:var(--surface-2, #1a2233);
  border:1px solid transparent; cursor:pointer; }
.acc-item.current{ border-color:#4fd1ff; cursor:default; }
.acc-item img{ width:36px; height:36px; border-radius:50%; object-fit:cover; background:#0b0f16; flex-shrink:0; }
.acc-item .acc-info{ flex:1; min-width:0; }
.acc-item .acc-name{ font-size:calc(14px * var(--fs, 1)); font-weight:700; color:#eef2f8; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.acc-item .acc-meta{ font-size:calc(11.5px * var(--fs, 1)); color:var(--text-tertiary); }
.acc-item .acc-check{ color:#4fd1ff; font-size:calc(12px * var(--fs, 1)); font-weight:700; }
.acc-add{ margin-top:10px; width:100%; border:1px dashed rgba(255,255,255,.25); background:transparent; color:#eef2f8;
  border-radius:10px; padding:11px; font-size:calc(14px * var(--fs, 1)); cursor:pointer; }
.acc-add:disabled{ opacity:.4; cursor:default; }
.acc-hint{ margin-top:8px; font-size:calc(11.5px * var(--fs, 1)); color:var(--text-tertiary); text-align:center; }

.cond-note{ color:#facc15; opacity:.8; font-size:calc(11px * var(--fs, 1)); }

/* App 開著時收到的推播：畫面上方的通知條 */
.inapp-notice{ position:fixed; left:12px; right:12px; top:calc(env(safe-area-inset-top, 0px) + 10px); z-index:500;
  background:#1a2233; border:1px solid rgba(79,209,255,.4); border-radius:14px; padding:12px 14px;
  box-shadow:0 10px 30px rgba(0,0,0,.5); transform:translateY(-140%); transition:transform .35s ease; }
.inapp-notice.show{ transform:translateY(0); }
.inapp-notice-title{ font-size:calc(14px * var(--fs, 1)); font-weight:800; color:#eef2f8; }
.inapp-notice-body{ font-size:calc(12.5px * var(--fs, 1)); color:#b8c2d3; margin-top:3px; white-space:pre-line; }
#push-status{ white-space:pre-line; }

/* ---------- 時間選擇 ---------- */
.time-btn{ background:var(--bg, #0b0f16); border:1px solid var(--border, rgba(255,255,255,.12)); border-radius:8px; color:var(--text-primary, #eef2f8);
  padding:8px 12px; font-size:calc(14px * var(--fs, 1)); font-family:"IBM Plex Mono",monospace; cursor:pointer; min-width:84px; text-align:center; }
.tp-box{ border-color:rgba(79,209,255,.35); }
.tp-title{ color:#eef2f8; }
.tp-preview{ font-size:calc(30px * var(--fs, 1)); font-weight:800; font-family:"IBM Plex Mono",monospace; color:#4fd1ff; margin:6px 0 4px; }
.tp-label{ text-align:left; font-size:calc(11px * var(--fs, 1)); color:var(--text-tertiary); margin:8px 0 4px; }
.tp-grid{ display:grid; gap:5px; }
.tp-hours{ grid-template-columns:repeat(6,1fr); }
.tp-mins{ grid-template-columns:repeat(6,1fr); max-height:190px; overflow:auto; }
.tp-cell{ border:1px solid rgba(255,255,255,.1); background:transparent; color:#cfd6e2; border-radius:8px; padding:7px 0; font-size:calc(13px * var(--fs, 1));
  font-family:"IBM Plex Mono",monospace; cursor:pointer; }
.tp-cell.on{ background:#4fd1ff; border-color:#4fd1ff; color:#08131a; font-weight:800; }
.tp-cell:disabled{ opacity:.25; cursor:default; }
.tp-ok{ margin-top:10px; background:#4fd1ff; color:#08131a; }

/* ---------- 功能介紹 ---------- */
.guide-overlay{ position:fixed; inset:0; background:rgba(0,0,0,.6); z-index:210; display:none; }
.guide-overlay.open{ display:block; }
.guide-panel{ position:absolute; inset:0; background:var(--bg, #0b0f16); display:flex; flex-direction:column; max-width:560px; margin:0 auto; }
.guide-head{ display:flex; align-items:center; justify-content:space-between; padding:calc(env(safe-area-inset-top, 0px) + 14px) 16px 12px;
  border-bottom:1px solid var(--border, rgba(255,255,255,.1)); }
.guide-title{ font-size:calc(18px * var(--fs, 1)); font-weight:800; }
.guide-close{ width:34px; height:34px; border-radius:50%; border:1px solid var(--border, rgba(255,255,255,.12)); background:transparent; color:#eef2f8; font-size:calc(15px * var(--fs, 1)); cursor:pointer; }
.guide-body{ flex:1; overflow:auto; padding:12px 16px calc(env(safe-area-inset-bottom, 0px) + 24px); }
.guide-sec{ border:1px solid var(--border, rgba(255,255,255,.1)); border-radius:12px; margin-bottom:10px; background:var(--surface-1, #121826); }
.guide-sec summary{ list-style:none; padding:13px 14px; font-size:calc(14.5px * var(--fs, 1)); font-weight:800; cursor:pointer; display:flex; align-items:center; gap:8px; }
.guide-sec summary::-webkit-details-marker{ display:none; }
.guide-sec summary::after{ content:"›"; margin-left:auto; color:var(--text-tertiary); transition:transform .2s; font-size:calc(18px * var(--fs, 1)); }
.guide-sec[open] summary::after{ transform:rotate(90deg); }
.guide-sec ul{ margin:0; padding:0 16px 14px 32px; font-size:calc(13px * var(--fs, 1)); line-height:1.85; color:#c6cfdc; }
.guide-sec li b{ color:#eef2f8; }
.guide-tag{ font-size:calc(10.5px * var(--fs, 1)); font-weight:700; padding:2px 8px; border-radius:999px; background:rgba(250,204,21,.16); color:#facc15; }
.guide-group{ font-size:calc(12px * var(--fs, 1)); color:var(--text-tertiary); margin:16px 2px 8px; font-weight:700; }

.video-vip-tag{ margin-left:6px; font-size:calc(10px * var(--fs, 1)); font-weight:800; padding:1px 6px; border-radius:999px; background:rgba(250,204,21,.16); color:#facc15; vertical-align:middle; }

.combo-rules{ white-space:pre-line; line-height:1.7; color:#c6cfdc; margin-top:4px; }

.combo-reset{ grid-column:1 / -1; margin-top:4px; border:1px solid rgba(79,209,255,.4); background:transparent; color:#4fd1ff; border-radius:8px; padding:8px; font-size:calc(12.5px * var(--fs, 1)); font-weight:700; cursor:pointer; }
.combo-reset:disabled{ opacity:.45; cursor:default; border-color:var(--border); color:var(--text-tertiary); }

/* VIP 標籤（首頁 App 名稱旁、設定頁帳號名稱旁） */
.vip-badge{ display:inline-block; margin-left:6px; padding:1px 7px; border-radius:999px; font-size:11px; font-weight:800;
  letter-spacing:.5px; line-height:1.5; vertical-align:middle; color:#1a1405; background:linear-gradient(135deg,#ffe066,#facc15 55%,#e0a800);
  box-shadow:0 0 8px rgba(250,204,21,.35); }

.tag.tag-initial{ background:rgba(250,204,21,.14); color:#facc15; }

/* 即時監控進行中：調整條件的按鈕反灰 */
.is-locked{ opacity:.35; filter:grayscale(1); }

/* VIP 到期日 */
.vip-until { color: #facc15; margin-top: 2px; }

/* 篩選結果最下方的警語 */
.result-disclaimer { color: #ef4444; font-size:calc(11px * var(--fs, 1)); line-height: 1.5; text-align: center; padding: 14px 16px 6px; opacity: .9; }

/* 漲停通知按鈕（推廣夥伴專屬） */
.lu-btn { margin-top: 6px; font-size:calc(11px * var(--fs, 1)); padding: 4px 8px; border-radius: 999px; border: 1px solid rgba(250,204,21,.5);
  background: transparent; color: #facc15; white-space: nowrap; cursor: pointer; }
.lu-btn.on { background: rgba(250,204,21,.15); border-color: #facc15; }
.lu-btn:disabled { opacity: .5; }

/* ===== 抽獎：滾動抽獎畫面＋恭喜中獎（後台與 App 共用） ===== */
.lotto-overlay { position: fixed; inset: 0; z-index: 9999; background: radial-gradient(circle at 50% 30%, #2a1d05 0%, #0b0f17 70%);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 48px 18px 24px; overflow-y: auto; color: #fff; }
.lotto-title { font-size:calc(15px * var(--fs, 1)); color: #facc15; letter-spacing: 2px; margin-bottom: 6px; text-align: center; }
.lotto-sub { font-size:calc(12px * var(--fs, 1)); color: #c9b98a; margin-bottom: 22px; text-align: center; }
.lotto-roller { min-width: 240px; padding: 22px 26px; border-radius: 18px; border: 2px solid #facc15; background: rgba(250,204,21,.08);
  font-size:calc(26px * var(--fs, 1)); font-weight: 800; text-align: center; box-shadow: 0 0 40px rgba(250,204,21,.35); }
.lotto-congrats { font-size:calc(30px * var(--fs, 1)); font-weight: 800; color: #facc15; text-align: center; margin: 8px 0 4px; animation: lotto-pop .6s ease-out; }
.lotto-prize { font-size:calc(14px * var(--fs, 1)); color: #fde68a; text-align: center; margin-bottom: 18px; }
.lotto-winners { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; width: 100%; max-width: 640px; }
.lotto-winner { background: rgba(255,255,255,.06); border: 1px solid rgba(250,204,21,.45); border-radius: 14px; padding: 12px 10px; text-align: center;
  animation: lotto-pop .5s ease-out both; }
.lotto-winner .wn { font-weight: 700; font-size:calc(15px * var(--fs, 1)); }
.lotto-winner .wu { font-size:calc(11px * var(--fs, 1)); color: #c9b98a; margin-top: 3px; }
.lotto-close { margin-top: 22px; padding: 11px 34px; border-radius: 999px; border: 0; background: #facc15; color: #1a1300; font-weight: 800; font-size:calc(15px * var(--fs, 1)); cursor: pointer; }
.lotto-trophy { font-size:calc(64px * var(--fs, 1)); animation: lotto-pop .7s ease-out; }
.confetti { position: fixed; top: -12px; width: 9px; height: 14px; z-index: 10000; pointer-events: none; animation: confetti-fall linear forwards; }
@keyframes confetti-fall { to { transform: translateY(110vh) rotate(720deg); opacity: .8; } }
@keyframes lotto-pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }

/* 切換帳號：用邀請碼加入其他品牌 */
.acc-join { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.acc-join-label { font-size:calc(11.5px * var(--fs, 1)); color: var(--text-secondary); line-height: 1.5; margin-bottom: 6px; }
.acc-join-row { display: flex; gap: 6px; }
.acc-join-row input { flex: 1; min-width: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; color: var(--text-primary); padding: 8px 10px; text-transform: uppercase; }
.acc-join-row button { border: 0; border-radius: 9px; padding: 0 16px; background: var(--accent-cyan); color: #08131a; font-weight: 800; cursor: pointer; }
.acc-join-msg { font-size:calc(12px * var(--fs, 1)); margin-top: 6px; min-height: 14px; }

/* ===== 貼文 ===== */
.post-btn{ margin-right:0; padding:0 9px; }
.topbar .video-btn{ padding:0 9px; margin-right:4px; }
.topbar{ gap:8px; }
.post-compose textarea{ width:100%; box-sizing:border-box; background:var(--surface-2); border:1px solid var(--border); border-radius:10px;
  color:var(--text-primary); padding:10px; font-size:calc(14px * var(--fs, 1)); line-height:1.6; resize:vertical; font-family:inherit; }
.post-compose-bar{ display:flex; align-items:center; gap:8px; margin-top:8px; }
.post-tag-btn{ padding:7px 10px; font-size:calc(12px * var(--fs, 1)); }
.post-count{ margin-left:auto; font-size:calc(11.5px * var(--fs, 1)); color:var(--text-tertiary); }
.post-count.over{ color:#ef4444; }
.post-msg{ margin-top:6px; min-height:14px; }
.post-tags-picked{ display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.post-tag{ font-size:calc(11.5px * var(--fs, 1)); padding:3px 8px; border-radius:999px; background:rgba(56,225,255,.1); color:var(--accent-cyan);
  border:1px solid rgba(56,225,255,.35); cursor:pointer; }
.post-filter{ display:flex; gap:6px; margin:14px 0 10px; align-items:center; }
.post-filter select{ flex:1; min-width:0; background:var(--surface-2); color:var(--text-primary); border:1px solid var(--border); border-radius:8px; padding:6px; font-size:calc(12px * var(--fs, 1)); }
.post-item{ background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:12px 14px; margin-bottom:10px; }
.post-head{ display:flex; align-items:center; gap:8px; }
.post-head img{ width:30px; height:30px; border-radius:50%; object-fit:cover; background:var(--surface-2); }
.post-author{ font-weight:700; font-size:calc(13.5px * var(--fs, 1)); }
.post-role{ font-size:calc(10.5px * var(--fs, 1)); color:var(--text-tertiary); }
.post-time{ margin-left:auto; font-size:calc(11px * var(--fs, 1)); color:var(--text-tertiary); }
.post-body{ margin-top:8px; font-size:calc(14px * var(--fs, 1)); line-height:1.7; white-space:pre-wrap; word-break:break-word; }
.post-foot{ display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; align-items:center; }
.post-del{ margin-left:auto; font-size:calc(11.5px * var(--fs, 1)); color:var(--text-tertiary); background:none; border:none; cursor:pointer; }
.tag-sheet-list{ max-height:55vh; overflow:auto; text-align:left; }
.tag-sheet-group{ font-size:calc(11.5px * var(--fs, 1)); color:var(--text-tertiary); margin:10px 0 4px; }
.tag-sheet-item{ display:flex; gap:8px; align-items:center; font-size:calc(13px * var(--fs, 1)); padding:5px 0; }

/* ===== 彈幕 ===== */
.dm-layer{ position:fixed; left:0; right:0; top:78px; height:34vh; pointer-events:none; overflow:hidden; z-index:30; display:none; }
.dm-layer.on{ display:block; }
.dm-item{ position:absolute; left:100%; white-space:nowrap; font-size:calc(15px * var(--fs, 1)); font-weight:800; padding:3px 10px; border-radius:999px;
  background:rgba(10,14,22,.55); text-shadow:0 1px 2px rgba(0,0,0,.8); will-change:transform; }
.dm-item.long{ color:#ff5a5a; }
.dm-item.short{ color:#2ee59d; }
.dm-item.mine{ border:1px solid rgba(255,255,255,.5); }
.dm-item .dm-tag{ font-size:calc(11px * var(--fs, 1)); margin-right:4px; opacity:.9; }
.dm-fab{ position:fixed; right:14px; bottom:92px; width:44px; height:44px; border-radius:50%; border:none; z-index:40;
  background:var(--accent-cyan); color:#08131a; font-weight:900; font-size:calc(16px * var(--fs, 1)); box-shadow:0 4px 14px rgba(0,0,0,.4); display:none; cursor:pointer; }
.dm-fab.on{ display:block; }
.dm-fab.off{ opacity:.55; }
.dm-compose{ position:fixed; left:10px; right:10px; bottom:90px; z-index:45; background:#141b29; border:1px solid var(--border);
  border-radius:14px; padding:10px; display:none; box-shadow:0 8px 30px rgba(0,0,0,.5); }
.dm-compose.open{ display:block; }
.dm-compose-row{ display:flex; gap:6px; align-items:center; }
.dm-compose-foot{ margin-top:8px; font-size:calc(12px * var(--fs, 1)); color:var(--text-secondary); }
.dm-side{ border:1px solid var(--border); background:transparent; color:var(--text-secondary); border-radius:8px; padding:7px 10px; font-weight:800; cursor:pointer; }
.dm-side.long.active{ background:rgba(255,90,90,.18); border-color:#ff5a5a; color:#ff5a5a; }
.dm-side.short.active{ background:rgba(46,229,157,.15); border-color:#2ee59d; color:#2ee59d; }
#dm-input{ flex:1; min-width:0; background:var(--surface-2); border:1px solid var(--border); border-radius:8px; color:var(--text-primary); padding:8px; font-size:calc(14px * var(--fs, 1)); }
.dm-send{ border:none; border-radius:8px; padding:8px 12px; background:var(--accent-cyan); color:#08131a; font-weight:800; cursor:pointer; }
.dm-toggle{ display:flex; gap:4px; align-items:center; }
.dm-msg{ flex:1; text-align:center; color:#ff6b6b; }
.dm-close{ background:none; border:none; color:var(--text-secondary); cursor:pointer; }

/* ===== 第一次登入導覽 ===== */
.tour{ position:fixed; inset:0; z-index:200; display:none; }
.tour.open{ display:block; }
.tour-hole{ position:fixed; border-radius:12px; box-shadow:0 0 0 9999px rgba(0,0,0,.72); border:2px solid var(--accent-cyan);
  transition:all .25s ease; pointer-events:none; }
.tour-card{ position:fixed; left:16px; right:16px; background:#141b29; border:1px solid var(--accent-cyan); border-radius:14px;
  padding:14px 16px; box-shadow:0 10px 30px rgba(0,0,0,.6); transition:top .25s ease; }
.tour-step{ font-size:calc(11px * var(--fs, 1)); color:var(--accent-cyan); font-weight:800; }
.tour-title{ font-size:calc(16px * var(--fs, 1)); font-weight:800; margin-top:2px; }
.tour-text{ font-size:calc(13px * var(--fs, 1)); line-height:1.7; color:var(--text-secondary); margin-top:6px; }
.tour-btns{ display:flex; justify-content:space-between; margin-top:12px; }
.tour-skip{ background:none; border:none; color:var(--text-tertiary); font-size:calc(12.5px * var(--fs, 1)); cursor:pointer; }
.tour-next{ border:none; border-radius:999px; padding:8px 20px; background:var(--accent-cyan); color:#08131a; font-weight:800; cursor:pointer; }
.post-compose-bar .post-tag-btn{ width:auto; flex:0 0 auto; margin:0; }
.post-count{ white-space:nowrap; }
.post-filter .period-btn{ border:1px solid var(--border); background:transparent; color:var(--text-secondary); border-radius:999px;
  padding:6px 12px; font-size:calc(12px * var(--fs, 1)); font-weight:700; cursor:pointer; white-space:nowrap; }
.post-filter .period-btn.active{ background:rgba(56,225,255,.14); border-color:var(--accent-cyan); color:var(--accent-cyan); }
.post-conds{ margin-top:8px; background:var(--surface-2); border-radius:10px; padding:6px 10px; }
.post-conds summary{ font-size:calc(12px * var(--fs, 1)); color:var(--accent-cyan); cursor:pointer; }
.post-cond{ padding:6px 0; border-top:1px solid var(--border); }
.post-cond:first-of-type{ border-top:none; }
.post-cond-name{ font-size:calc(12.5px * var(--fs, 1)); font-weight:700; }
.post-cond-desc{ font-size:calc(11.5px * var(--fs, 1)); color:var(--text-secondary); white-space:pre-wrap; line-height:1.6; margin-top:2px; }
.post-copy{ font-size:calc(11.5px * var(--fs, 1)); font-weight:800; padding:4px 10px; border-radius:999px; border:1px solid #facc15; background:rgba(250,204,21,.12); color:#facc15; cursor:pointer; }
.copy-plan-row{ display:flex; gap:6px; justify-content:center; margin:12px 0 8px; }
.copy-plan-row .period-btn{ border:1px solid var(--border); background:transparent; color:var(--text-secondary); border-radius:999px; padding:7px 14px; font-weight:700; cursor:pointer; }
.copy-plan-row .period-btn.active{ background:rgba(56,225,255,.14); border-color:var(--accent-cyan); color:var(--accent-cyan); }
.copy-replace{ display:flex; gap:6px; align-items:center; font-size:calc(12px * var(--fs, 1)); color:var(--text-secondary); margin-bottom:8px; text-align:left; }
.copy-result{ text-align:left; margin-bottom:8px; }
.tag-sheet-box{ max-width:420px; }
.tag-sheet-entry{ border-bottom:1px solid var(--border); padding:2px 0 6px; }
.tag-sheet-entry.on{ background:rgba(56,225,255,.05); }
.tag-params{ display:grid; grid-template-columns:1fr 1fr; gap:6px 8px; padding:4px 4px 6px 26px; }
.tag-param{ display:flex; flex-direction:column; gap:3px; font-size:calc(11px * var(--fs, 1)); color:var(--text-secondary); text-align:left; }
.tag-param input, .tag-param select{ background:var(--surface-2); border:1px solid var(--border); border-radius:7px; color:var(--text-primary); padding:6px; font-size:calc(13px * var(--fs, 1)); width:100%; box-sizing:border-box; }
.post-tag.live{ background:rgba(250,204,21,.1); color:#facc15; border-color:rgba(250,204,21,.4); }
.post-cond-group{ font-size:calc(12px * var(--fs, 1)); font-weight:800; color:var(--accent-cyan); margin:8px 0 2px; }
.post-cond-group.live{ color:#facc15; }
.post-cond-params{ display:flex; flex-wrap:wrap; gap:4px; margin-top:4px; }
.post-param{ font-size:calc(11px * var(--fs, 1)); padding:2px 7px; border-radius:6px; background:rgba(255,255,255,.06); color:var(--text-primary); }

/* 貼文互動 */
.post-follow{ margin-left:6px; font-size:calc(11px * var(--fs, 1)); font-weight:800; padding:3px 9px; border-radius:999px; border:1px solid var(--accent-cyan); background:transparent; color:var(--accent-cyan); cursor:pointer; white-space:nowrap; }
.post-follow.on{ border-color:var(--border); color:var(--text-tertiary); }
.post-boost{ font-size:calc(11px * var(--fs, 1)); font-weight:800; color:#facc15; margin-bottom:6px; }
.post-actions{ display:flex; gap:4px; margin-top:10px; padding-top:8px; border-top:1px solid var(--border); }
.post-act{ flex:1; background:none; border:none; color:var(--text-secondary); font-size:calc(13px * var(--fs, 1)); padding:6px 0; cursor:pointer; text-align:center; }
.post-act.on{ color:#ff5a7a; font-weight:800; }
.post-views{ cursor:default; }
.post-comments{ margin-top:8px; background:var(--surface-2); border-radius:10px; padding:8px 10px; }
.cmt{ padding:6px 0; border-bottom:1px solid var(--border); }
.cmt-head{ display:flex; gap:8px; align-items:center; font-size:calc(11.5px * var(--fs, 1)); }
.cmt-name{ font-weight:800; color:var(--text-primary); }
.cmt-time{ color:var(--text-tertiary); }
.cmt-head .post-del{ margin-left:auto; }
.cmt-text{ font-size:calc(13px * var(--fs, 1)); margin-top:2px; white-space:pre-wrap; word-break:break-word; }
.cmt-input{ display:flex; gap:6px; margin-top:8px; }
.cmt-input input{ flex:1; min-width:0; background:var(--bg); border:1px solid var(--border); border-radius:8px; color:var(--text-primary); padding:8px; font-size:calc(13px * var(--fs, 1)); }
.avatar-edit-btn{ margin-left:auto; font-size:calc(11.5px * var(--fs, 1)); padding:5px 10px; border-radius:999px; border:1px solid var(--accent-cyan); background:transparent; color:var(--accent-cyan); cursor:pointer; white-space:nowrap; align-self:center; }
.free-unlock-bar{ margin:10px 16px 0; padding:9px 12px; border-radius:10px; font-size:calc(12.5px * var(--fs, 1)); font-weight:700; color:#facc15;
  background:rgba(250,204,21,.1); border:1px solid rgba(250,204,21,.4); }

.profile-edit-btns{ margin-left:auto; display:flex; flex-direction:column; gap:6px; align-self:center; }
.profile-edit-btns .avatar-edit-btn{ margin-left:0; }
.name-edit-input{ width:100%; box-sizing:border-box; margin:12px 0 4px; padding:10px 12px; border-radius:10px; border:1px solid var(--border, #2a3442);
  background:rgba(255,255,255,.04); color:inherit; font-size:calc(15px * var(--fs, 1)); }
.name-edit-msg{ color:#f87171; min-height:16px; }

.post-own-acts{ margin-left:auto; display:inline-flex; gap:12px; white-space:nowrap; }
.post-own-acts .post-del{ margin-left:0; }
.post-edit{ color:var(--accent-cyan) !important; }
#btn-post-cancel-edit{ padding:6px 10px; font-size:calc(12px * var(--fs, 1)); }
.dm-send:disabled{ opacity:.35; cursor:not-allowed; }
#dm-input:disabled{ opacity:.7; }

.lu-hist-box{ max-height:80vh; display:flex; flex-direction:column; text-align:left; }
.lu-hist-box .vip-modal-title, .lu-hist-box > .small-note{ text-align:center; }
.lu-hist-list{ overflow-y:auto; margin-top:10px; flex:1; }
.lu-hist-day{ margin:12px 0 4px; font-size:calc(12px * var(--fs, 1)); font-weight:800; color:var(--text-secondary); }
.lu-hist-row{ display:flex; justify-content:space-between; gap:8px; padding:8px 0 2px; font-size:calc(13.5px * var(--fs, 1)); border-top:1px solid rgba(255,255,255,.06); }
.lu-hist-stock{ font-weight:700; color:var(--text-primary); }
.lu-hist-st{ white-space:nowrap; color:var(--text-tertiary); }
.lu-hist-row.fired .lu-hist-st{ color:#f87171; font-weight:800; }
.lu-hist-row.pending .lu-hist-st{ color:#facc15; }
.lu-hist-meta{ font-size:calc(11px * var(--fs, 1)); color:var(--text-tertiary); padding-bottom:6px; }

.busy-bar{ position:fixed; left:12px; right:12px; top:calc(env(safe-area-inset-top, 0px) + 10px); z-index:9999; display:none;
  padding:10px 14px; border-radius:12px; font-size:calc(13px * var(--fs, 1)); font-weight:700; text-align:center;
  background:rgba(250,204,21,.95); color:#1a1405; box-shadow:0 6px 20px rgba(0,0,0,.35); }
.busy-bar.show{ display:block; }


/* 2026-10-13：iPhone 瀏海／狀態列（時間、訊號、電量）會蓋住最上面的按鈕 → 上方留出安全區域；
   下方導覽列避開 Home 鍵橫條。Android／網頁版的安全區域是 0，不受影響。 */
.topbar{ padding-top:calc(18px + env(safe-area-inset-top, 0px)); }
#screen-login, #screen-pending{ padding-top:env(safe-area-inset-top, 0px); }
.bottom-nav{ padding-bottom:env(safe-area-inset-bottom, 0px); }
.dm-layer{ top:calc(78px + env(safe-area-inset-top, 0px)); }
.dm-fab{ bottom:calc(92px + env(safe-area-inset-bottom, 0px)); }
.dm-compose{ bottom:calc(90px + env(safe-area-inset-bottom, 0px)); }


/* ===== 服務條款同意書（登入後強制）：小卡片勾選，點條款名稱才跳出內容 ===== */
.terms-gate{ position:fixed; inset:0; z-index:10000; background:rgba(3,6,12,.72); display:flex; align-items:center; justify-content:center;
  padding:calc(env(safe-area-inset-top, 0px) + 16px) 16px calc(env(safe-area-inset-bottom, 0px) + 16px); }
.terms-card{ width:100%; max-width:420px; max-height:100%; overflow:auto; background:var(--surface); border:1px solid var(--border);
  border-radius:16px; padding:18px 16px 12px; box-shadow:0 12px 40px rgba(0,0,0,.5); }
.terms-title{ font-size:calc(17px * var(--fs, 1)); font-weight:800; }
.terms-sub{ font-size:calc(12px * var(--fs, 1)); color:var(--text-tertiary); margin:2px 0 10px; }
.terms-check{ display:flex; gap:10px; align-items:flex-start; font-size:calc(13.5px * var(--fs, 1)); line-height:1.55; padding:7px 0; cursor:pointer; }
.terms-check input{ width:20px; height:20px; flex-shrink:0; margin-top:1px; accent-color:var(--accent-cyan); }
.terms-all{ font-weight:800; font-size:calc(14px * var(--fs, 1)); border-bottom:1px solid var(--border); padding-bottom:9px; margin-bottom:2px; }
.terms-link{ color:var(--accent-cyan); font-weight:700; text-decoration:underline; text-underline-offset:2px; }
.terms-btn{ width:100%; margin-top:10px; padding:13px; border:none; border-radius:12px; background:var(--accent-cyan); color:#04121a; font-size:calc(15px * var(--fs, 1)); font-weight:800; }
.terms-btn:disabled{ opacity:.35; }
.terms-out{ width:100%; margin-top:4px; padding:8px; border:none; background:none; color:var(--text-tertiary); font-size:calc(12.5px * var(--fs, 1)); }
.terms-err{ color:#ef4444; font-size:calc(12px * var(--fs, 1)); }
.terms-reader{ position:fixed; inset:0; z-index:10001; background:rgba(3,6,12,.6); display:flex; align-items:flex-end; justify-content:center; }
.terms-reader-box{ width:100%; max-width:480px; max-height:85vh; display:flex; flex-direction:column; background:var(--bg); border:1px solid var(--border);
  border-radius:16px 16px 0 0; padding:14px 16px calc(env(safe-area-inset-bottom, 0px) + 12px); }
.terms-reader-head{ display:flex; align-items:center; justify-content:space-between; padding-bottom:8px; border-bottom:1px solid var(--border); }
.terms-reader-title{ font-size:calc(16px * var(--fs, 1)); font-weight:800; }
.terms-reader-x{ background:none; border:none; color:var(--text-secondary); font-size:calc(18px * var(--fs, 1)); padding:4px 8px; }
.terms-body{ flex:1; overflow:auto; padding:6px 2px 10px; font-size:calc(13.5px * var(--fs, 1)); line-height:1.75; color:var(--text-secondary); -webkit-user-select:text; user-select:text; }
.terms-body h2{ font-size:calc(15px * var(--fs, 1)); color:var(--text-primary); margin:14px 0 4px; }
.terms-body ol{ padding-left:20px; margin:4px 0; }
.terms-body a{ color:var(--accent-cyan); }
.terms-body .warn{ border:1px solid #f59e0b55; background:#f59e0b14; border-radius:10px; padding:4px 10px; }
.terms-body .muted{ color:var(--text-tertiary); font-size:calc(12px * var(--fs, 1)); }

/* ---------- 盤後選股排序 ---------- */
.sort-bar{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; padding:4px 0 10px; border-bottom:1px solid var(--border); }
.sort-label{ font-size:calc(12px * var(--fs, 1)); color:var(--text-tertiary); margin-right:2px; }
.sort-btn{ border:1px solid var(--border); background:transparent; color:var(--text-secondary); border-radius:999px;
  padding:5px 10px; font-size:calc(12px * var(--fs, 1)); font-weight:700; cursor:pointer; }
.sort-btn.active{ background:var(--accent-cyan); border-color:var(--accent-cyan); color:#08131a; }

/* ---------- 外觀（白底／黑底、字體大小） ---------- */
.look-card{ background:var(--surface-1, var(--surface)); border:1px solid var(--border); border-radius:12px; padding:4px 12px; margin-bottom:10px; }
.look-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 0; }
.look-row + .look-row{ border-top:1px solid var(--border); }
.look-label{ font-size:calc(14px * var(--fs, 1)); font-weight:700; color:var(--text-primary); }
.look-btns{ display:flex; gap:6px; }
.theme-btn, .fs-btn{ width:38px; height:38px; border-radius:50%; border:1px solid var(--border); background:transparent;
  color:var(--text-secondary); display:flex; align-items:center; justify-content:center; cursor:pointer; padding:0; font-weight:800; }
.fs-btn{ width:auto; min-width:38px; padding:0 10px; border-radius:999px; }
.fs-btn.active{ background:var(--accent-cyan); border-color:var(--accent-cyan); color:#08131a; }
:root{ --fs:1; }
:root[data-fs="s"]{ --fs:.9; }
:root[data-fs="l"]{ --fs:1.12; }
:root[data-fs="xl"]{ --fs:1.25; }

:root[data-theme="light"]{
  --bg:#f3f5f9; --surface:#ffffff; --surface-1:#ffffff; --surface-2:#eceff5; --border:#dde2ea;
  --text-primary:#121826; --text-secondary:#4b5566; --text-tertiary:#8a93a3;
  --accent-blue:#2f6fe4; --accent-cyan:#0fb5d8; --accent-green:#139a64;
  --accent-red:#e03b3b; --accent-orange:#d98a00;
  color-scheme:light;
}
:root[data-theme="light"] [stroke="#eef2f8"]{ stroke:#121826; }
:root[data-theme="light"] [stroke="#8b96a8"]{ stroke:#6b7486; }
:root[data-theme="light"] .acc-title,
:root[data-theme="light"] .acc-item .acc-name,
:root[data-theme="light"] .acc-add,
:root[data-theme="light"] .inapp-notice-title,
:root[data-theme="light"] .tp-title,
:root[data-theme="light"] .guide-close,
:root[data-theme="light"] .guide-sec li b{ color:var(--text-primary); }
:root[data-theme="light"] .guide-sec ul,
:root[data-theme="light"] .combo-rules,
:root[data-theme="light"] .tp-cell,
:root[data-theme="light"] .inapp-notice-body{ color:var(--text-secondary); }
:root[data-theme="light"] .inapp-notice,
:root[data-theme="light"] .dm-compose,
:root[data-theme="light"] .tour-card{ background:#ffffff; box-shadow:0 6px 24px rgba(15,23,42,.12); }
:root[data-theme="light"] .acc-item img{ background:#e5e9f0; }
:root[data-theme="light"] .acc-add{ border-color:rgba(15,23,42,.25); }
:root[data-theme="light"] .tp-cell{ border-color:rgba(15,23,42,.12); }
:root[data-theme="light"] .feed-row{ border-bottom-color:rgba(15,23,42,.06); }
:root[data-theme="light"] .lu-hist-row{ border-top-color:rgba(15,23,42,.08); }
:root[data-theme="light"] .post-param,
:root[data-theme="light"] .name-edit-input{ background:rgba(15,23,42,.05); }
:root[data-theme="light"] .toggle{ background:#cfd5df; }
/* 黃色字在白底看不清楚 → 換深一點的金色 */
:root[data-theme="light"] .vip-modal-title,
:root[data-theme="light"] .cond-note,
:root[data-theme="light"] .guide-tag,
:root[data-theme="light"] .video-vip-tag,
:root[data-theme="light"] .tag.tag-initial,
:root[data-theme="light"] .vip-until,
:root[data-theme="light"] .lu-btn,
:root[data-theme="light"] .post-copy,
:root[data-theme="light"] .post-tag.live,
:root[data-theme="light"] .post-cond-group.live,
:root[data-theme="light"] .post-boost,
:root[data-theme="light"] .free-unlock-bar,
:root[data-theme="light"] .lu-hist-row.pending .lu-hist-st{ color:#a16207; }
:root[data-theme="light"] .lu-btn,
:root[data-theme="light"] .post-copy{ border-color:#d4a017; }
:root[data-theme="light"] .vip-note{ color:#854d0e; }

/* 白底／黑底：一個按鈕，點一下切換（黑底時顯示月亮、白底時顯示太陽） */
.theme-toggle span{ display:flex; }
.theme-toggle .ti-sun{ display:none; }
:root[data-theme="light"] .theme-toggle .ti-sun{ display:flex; }
:root[data-theme="light"] .theme-toggle .ti-moon{ display:none; }
.theme-toggle{ color:var(--accent-cyan); border-color:var(--accent-cyan); }

/* ---------- iPhone：用 Apple 登入、刪除帳號、訂閱說明（2026-10） ---------- */
.apple-login-btn{
  margin-top:10px; width:100%; border:0; border-radius:12px; padding:12px 0;
  background:#000; color:#fff; font-size:14px; font-weight:700; cursor:pointer;
  display:flex; align-items:center; justify-content:center; gap:8px;
}
.apple-login-btn:active{ opacity:.85; }
html[data-theme="light"] .apple-login-btn{ background:#000; color:#fff; }
.danger-link-btn{
  display:block; width:100%; margin-top:14px; background:none; border:0;
  color:#ff6b6b; font-size:13px; text-decoration:underline; cursor:pointer;
}
.link-btn{ display:block; width:100%; background:none; border:0; color:var(--muted, #8a93a6); font-size:13px; text-decoration:underline; cursor:pointer; }
.sub-legal-link{ color:inherit; text-decoration:underline; }

/* 條款閱讀視窗：不要被 iPhone 上方鏡頭／瀏海擋住 */
.terms-reader-box{ max-height:calc(100% - env(safe-area-inset-top, 0px) - 24px); }
.terms-reader-x{ min-width:40px; min-height:40px; font-size:calc(20px * var(--fs, 1)); }
