/**
 * ========================================================
 * 天天樂 539168 全站官方樣式庫 (style.css)
 * 涵蓋：全域變數、排版架構、翠綠立體 3D 球號、四大心法專區、
 *       達人英雄天梯榜、0~9 尾數共振、溫度計動態進度條、
 *       贊助金額三等分卡片、頂部 Header 自然捲動隨頁走、
 *       三層操作列無縫吸頂、現代標準 overflow-x:clip 防橫向溢出、
 *       高對比選中變色、六大彩種自適應排版
 * ========================================================
 */

:root {
  --primary-pine: #0f4c3a;
  --primary-pine-dark: #062e23;
  --accent-gold: #f59e0b;
  --accent-gold-light: #fde047;
  --bg-body: #f8fafc;
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-card: #e2e8f0;
  --font-sans: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/*  使用現代標準 overflow-x: clip 杜絕橫向位移露白邊，且 100% 不破壞 position: sticky 吸頂機制 */
html, body {
  overflow-x: clip !important;
  overflow-y: visible !important;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
  box-sizing: border-box;
}

/* ========================================================
    頂部導航列 (隨頁面自然向上捲動移出)
   ======================================================== */
header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-card);
  position: relative;
  z-index: 20;
  width: 100%;
}

.header-inner {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  height: 60px;
  gap: 8px !important;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #0f4c3a 0%, #062e23 100%);
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(15, 76, 58, 0.3);
}

.brand-title {
  font-size: 18px;
  font-weight: 900;
  color: #0f4c3a;
  letter-spacing: -0.5px;
}

.brand-subtitle {
  font-size: 13px;
  font-weight: 800;
  color: #f59e0b;
  margin-left: 2px;
  font-family: var(--font-mono);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.header-nav::-webkit-scrollbar { display: none; }

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-pill:active { transform: scale(0.96); }

.live-pulse-dot {
  display: inline-block;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ==================== 麵包屑與標題 ==================== */
.breadcrumb-nav {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 700;
  margin: 14px 0 6px 0;
}
.breadcrumb-nav a { color: var(--text-muted); text-decoration: none; }
.breadcrumb-nav .separator { margin: 0 6px; }
.breadcrumb-nav .breadcrumb-current { color: #0f4c3a; }

.intro-header { margin-bottom: 12px; }
.tracker-tag {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #10b981;
  margin-bottom: 4px;
}
.main-heading {
  font-size: 24px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.5px;
}
@media (max-width: 640px) { .main-heading { font-size: 20px; } }

/* ==================== 跑馬燈與大捷橫幅 ==================== */
.marquee-card {
  background: #0f4c3a;
  color: #ffffff;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  overflow: hidden;
}
.marquee-badge {
  background: #f59e0b;
  color: #0f172a;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.marquee-content-wrap { overflow: hidden; white-space: nowrap; flex: 1; }
.marquee-track {
  display: inline-block;
  animation: marquee 25s linear infinite;
  font-size: 13.5px;
  font-weight: 700;
}
.marquee-separator { margin: 0 14px; color: #fde047; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.victory-banner-box {
  background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
  border: 1.5px solid #fde047;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}
.victory-banner-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.victory-banner-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.victory-pulse-badge {
  background: #b45309;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 6px;
}
.victory-banner-content { font-size: 13.5px; font-weight: 800; color: #78350f; }
.victory-banner-btn {
  background: #b45309;
  color: #ffffff;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
}

/* ========================================================
    六大主力彩種切換列 (含三四星彩自適應排版)
   ======================================================== */
.tabs-card {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 6px;
  background: #ffffff;
  padding: 6px;
  border-radius: 16px;
  border: 1.5px solid var(--border-card);
  margin-bottom: 16px;
  position: relative;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.tab-btn {
  background: transparent;
  border: none;
  border-radius: 12px;
  padding: 8px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: all 0.18s ease;
  min-height: 48px;
}
.tab-btn .tab-title-text { 
  font-size: 14px; 
  font-weight: 900; 
  color: var(--text-secondary); 
  white-space: nowrap; 
}
.tab-btn .tab-time-badge { 
  font-size: 10.5px; 
  font-weight: 700; 
  color: var(--text-muted); 
  white-space: nowrap; 
}

.tab-btn.active {
  background: linear-gradient(135deg, #0f4c3a 0%, #062e23 100%);
  box-shadow: 0 3px 10px rgba(15, 76, 58, 0.35);
}
.tab-btn.active .tab-title-text { color: #ffffff; }
.tab-btn.active .tab-time-badge { color: #86efac; }

@media (max-width: 860px) {
  .tabs-card {
    display: flex !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 4px 2px !important;
    gap: 6px !important;
    border-radius: 12px;
    margin-bottom: 12px;
  }
  .tabs-card::-webkit-scrollbar { display: none; }
  .tab-btn {
    flex: 0 0 auto !important;
    min-width: 94px !important;
    padding: 6px 8px !important;
    min-height: 42px;
    border-radius: 8px;
  }
  .tab-btn .tab-title-text { font-size: 13px; }
  .tab-btn .tab-time-badge { font-size: 9.5px; }
}

/* ==================== 儀表板區域 (開獎球 + 指標) ==================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 768px) { .dashboard-grid { grid-template-columns: 1fr; } }

.hero-pine-card {
  background: linear-gradient(135deg, #0f4c3a 0%, #062e23 100%);
  color: #ffffff;
  border-radius: 20px;
  padding: 22px 20px;
  box-shadow: 0 8px 24px rgba(15, 76, 58, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.pine-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 6px;
}
.pine-card-badge { font-size: 13px; font-weight: 900; color: #a7f3d0; }
.pine-balls-stage {
  display: flex;
  gap: 10px;
  margin: 16px 0 14px 0;
  flex-wrap: wrap;
  align-items: center;
}
.white-ball {
  width: 48px;
  height: 48px;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e2e8f0 70%, #cbd5e1 100%);
  color: #0f172a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  font-family: var(--font-mono);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), inset 0 2px 4px rgba(255, 255, 255, 0.8);
}
.white-ball.special-ball {
  background: radial-gradient(circle at 35% 30%, #fde047 0%, #f59e0b 70%, #b45309 100%);
  color: #0f172a;
}
@media (max-width: 480px) { .white-ball { width: 40px; height: 40px; font-size: 18px; } }

.pine-card-bottom {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  opacity: 0.75;
  font-weight: 700;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 10px;
  margin-top: 8px;
}

.overview-card {
  background: #ffffff;
  border: 1.5px solid var(--border-card);
  border-radius: 20px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}
.overview-top span { font-size: 11px; font-weight: 900; color: #10b981; letter-spacing: 1px; }
.overview-top h3 { font-size: 19px; font-weight: 900; color: #0f172a; margin-top: 2px; }
.overview-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.metric-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}
.metric-item strong {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: #0f4c3a;
  font-family: var(--font-mono);
}
.metric-item span { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.overview-footer {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
  font-weight: 600;
}

/* ========================================================
    三四星彩雙拼大看板專屬樣式
   ======================================================== */
.digit-lottery-dual-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}
.digit-single-panel {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.digit-panel-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--accent-gold-light);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
}
.digit-balls-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}
.digit-ball {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #f1f5f9 60%, #cbd5e1 100%);
  color: #0f172a;
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
  border: 1.5px solid #ffffff;
}
.digit-panel-meta {
  font-size: 11.5px;
  font-weight: 800;
  color: #e2e8f0;
  font-family: var(--font-mono);
}
@media (max-width: 600px) {
  .digit-lottery-dual-box { grid-template-columns: 1fr; gap: 8px; }
  .digit-ball { width: 34px; height: 34px; font-size: 16px; }
}

/* ========================================================
    四大模式導航 Bar
   ======================================================== */
.model-nav-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
  position: relative;
  z-index: 10;
  padding: 4px 0;
}

.model-nav-btn {
  background: #ffffff;
  border: 1.5px solid var(--border-card);
  border-radius: 13px;
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}
.model-nav-btn:active { transform: scale(0.96); }

.model-nav-btn.lucky.active {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%) !important;
  border-color: #059669 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45) !important;
  transform: translateY(-1px);
}

.model-nav-btn.unlucky.active {
  background: linear-gradient(135deg, #ef4444 0%, #be123c 100%) !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.45) !important;
  transform: translateY(-1px);
}

.model-nav-btn.hero-btn.active {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%) !important;
  border-color: #d97706 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45) !important;
  transform: translateY(-1px);
}

.model-nav-btn.tails-btn.active {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.45) !important;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .model-nav-pills { gap: 5px; padding: 2px 0; margin-bottom: 8px; }
  .model-nav-btn { font-size: 11.5px; padding: 4px 2px; min-height: 40px; border-radius: 10px; }
}

/* ========================================================
    期數控制列
   ======================================================== */
.range-control-wrap {
  background: #ffffff;
  border: 1.5px solid var(--border-card);
  border-radius: 14px;
  padding: 8px 14px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  width: 100%;
  box-sizing: border-box;
}

.ctrl-mode-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-wrap: nowrap;
  gap: 6px;
}

.model-ranking-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.model-ranking-title .title-main {
  font-size: 15px;
  font-weight: 900;
  color: #0f172a;
  white-space: nowrap;
}

.range-btn-group {
  display: flex;
  gap: 4px;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 10px;
  flex-shrink: 0;
}

.range-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 800;
  color: #64748b;
  cursor: pointer;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.range-btn:active { transform: scale(0.96); }

.range-btn.active {
  background: linear-gradient(135deg, #0f4c3a 0%, #062e23 100%) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: 0 3px 10px rgba(15, 76, 58, 0.45) !important;
  border: 1px solid #10b981 !important;
  transform: scale(1.02);
}

@media (max-width: 640px) {
  .range-control-wrap { padding: 6px 10px; margin-bottom: 10px; border-radius: 12px; }
  .range-btn { padding: 4px 8px; font-size: 12px; min-height: 28px; }
}

/* ========================================================
    100 大 AI 模型卡片與 3D 立體球 (完全對齊修復)
   ======================================================== */
.models-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.model-card {
  background: #ffffff;
  border: 1.5px solid var(--border-card);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  transition: all 0.2s;
}
.model-card.lucky {
  border-color: #86efac;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}
.model-card.unlucky {
  border-color: #fca5a5;
  background: linear-gradient(180deg, #ffffff 0%, #fff1f2 100%);
}
.model-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.model-name {
  font-size: 16.5px;
  font-weight: 900;
  color: #0f172a;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

/*  名次膠囊徽章 */
.model-rank-badge {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 6px;
  margin-right: 6px;
  display: inline-block;
  line-height: 1.2;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}
.model-card.unlucky .model-rank-badge {
  background: linear-gradient(135deg, #ef4444 0%, #be123c 100%);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.model-sub {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 2px;
}
.model-tag {
  font-size: 11.5px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  white-space: nowrap;
}
.model-logic-text {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 8px 0 10px 0;
  font-weight: 600;
  min-height: 38px;
}
.model-balls-stage {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 12px 0 14px 0;
}

/*  立體 3D 浮雕號碼球 */
.card-ball-3d {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  font-weight: 900;
  font-family: var(--font-mono);
  background: radial-gradient(circle at 35% 30%, #22c55e 0%, #16654e 65%, #052e16 100%) !important;
  color: #ffffff !important;
  border: 2px solid #86efac !important;
  box-shadow: 0 4px 12px rgba(22, 101, 52, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.7) !important;
  user-select: none;
}
.card-ball-3d.card-ball-unlucky {
  background: radial-gradient(circle at 35% 30%, #ef4444 0%, #991b1b 65%, #450a0a 100%) !important;
  color: #ffffff !important;
  border: 2px solid #fca5a5 !important;
  box-shadow: 0 4px 12px rgba(153, 27, 27, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.7) !important;
}

/*  獨家算力膠囊微浮雕 */
.exclusive-badge-wrap {
  display: flex;
  justify-content: flex-start;
  margin: 6px 0 10px 0;
}
.exclusive-badge-pill {
  font-size: 12px;
  font-weight: 800;
  color: #854d0e;
  background: #fefce8;
  border: 1px solid #fde047;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/*  回測數據雙欄紅綠小卡片 */
.backtest-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  margin-top: 8px;
}
.backtest-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.backtest-rate-pill {
  font-size: 11.5px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.model-card.unlucky .backtest-rate-pill {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecdd3;
}
.backtest-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.stat-cell-green {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 6px 8px;
  text-align: center;
}
.stat-cell-red {
  background: #fef2f2;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  padding: 6px 8px;
  text-align: center;
}

.btn-card-share-line {
  width: 100%;
  height: 38px;
  background: #06C755;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
  margin-top: 10px;
}
.btn-card-share-line:active { transform: scale(0.97); }

/* ==================== 達人英雄天梯榜 ==================== */
.heroes-wrap { margin-bottom: 28px; }
.heroes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.hero-member-card {
  background: #ffffff;
  border: 1.5px solid var(--border-card);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.hero-ball {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fde047 0%, #d97706 70%, #78350f 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  font-family: var(--font-mono);
  box-shadow: 0 4px 10px rgba(180, 83, 9, 0.35);
}

/* ========================================================
    0~9 尾數共振分析 ＆ 溫度計柱狀圖 (全面補齊修復)
   ======================================================== */
.tails-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 768px) { .tails-grid { grid-template-columns: 1fr; } }

.tails-card {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 20px;
}

.tail-badge-box {
  background: #ffffff;
  border: 1.5px solid var(--border-card);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.tail-badge-box.hot { border-color: #f59e0b; background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); }
.tail-badge-box.omission { border-color: #3b82f6; background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); }
.tail-badge-box.streak { border-color: #10b981; background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); }
.tail-badge-box.multi { border-color: #a855f7; background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%); }
.tail-badge-box.kill { border-color: #f43f5e; background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%); }
.tail-badge-title { font-size: 12px; font-weight: 900; margin-bottom: 2px; }
.tail-badge-number { font-size: 26px; font-weight: 900; font-family: var(--font-mono); margin-bottom: 4px; }
.tail-badge-balls { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.tail-ball-pill {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 900;
  font-family: var(--font-mono);
}
.btn-copy-tail {
  margin-top: 10px;
  width: 100%;
  height: 32px;
  background: #06C755;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

/*  核心修復：溫度計長條圖全套樣式 (徹底終結折行堆疊與進度條隱形) */
.temp-row {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 8px !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  width: 100% !important;
}
.temp-label {
  width: 40px !important;
  flex-shrink: 0 !important;
  font-family: var(--font-mono) !important;
  color: var(--text-main) !important;
}
.temp-bar-bg {
  flex: 1 !important;
  height: 10px !important;
  background: #f1f5f9 !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  position: relative !important;
}
.temp-bar-fill {
  height: 100% !important;
  border-radius: 999px !important;
  transition: width 0.4s ease !important;
}
.bg-heat-hot {
  background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%) !important;
}
.bg-heat-warm {
  background: linear-gradient(90deg, #10b981 0%, #f59e0b 100%) !important;
}
.bg-heat-cool {
  background: #94a3b8 !important;
}
.temp-val {
  width: 48px !important;
  flex-shrink: 0 !important;
  text-align: right !important;
  font-family: var(--font-mono) !important;
  color: var(--text-muted) !important;
}

/* ==================== 站主四大心法 VIP 深度專區 ==================== */
.vip-section-wrap { margin-bottom: 32px; }
.vip-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 2px solid #f59e0b;
  border-radius: 22px;
  padding: 24px 20px;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}
.vip-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 14px;
}
.vip-crown-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 999px;
}
.vip-title { font-size: 20px; font-weight: 900; color: #fde047; margin: 4px 0 0 0; }
.vip-user-tag { font-size: 12px; font-weight: 800; color: #cbd5e1; }
.btn-vip-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a;
  border: none;
  padding: 9px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}
.vip-body-container { position: relative; min-height: 240px; }
.vip-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}
.vip-lock-content { max-width: 440px; }
.vip-lock-icon { font-size: 44px; margin-bottom: 8px; }
.vip-lock-content h4 { font-size: 20px; font-weight: 900; color: #fde047; margin-bottom: 8px; }
.vip-lock-content p { font-size: 13.5px; color: #cbd5e1; line-height: 1.6; margin-bottom: 16px; }
.vip-lock-btns { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.vip-footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  margin-top: 14px;
}
.vip-btn-logout {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
}

/* ==================== 彈跳視窗 Modal 基底 ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.active { display: flex; }
.modal-box {
  background: #ffffff;
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px 22px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 900;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.modal-close-btn:hover { background: #e2e8f0; color: #0f172a; }
.btn-pine {
  background: #0f4c3a;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-pine:active { transform: scale(0.97); }

/* ========================================================
    隨喜紅包三等分金額卡片專屬樣式
   ======================================================== */
.amt-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 10px !important;
  margin-bottom: 16px !important;
  width: 100% !important;
}

.amt-pill {
  background: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 14px !important;
  padding: 14px 6px 12px 6px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  outline: none !important;
  width: 100% !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03) !important;
}

.amt-pill:hover {
  border-color: #94a3b8 !important;
  background: #f1f5f9 !important;
  transform: translateY(-2px) !important;
}
.amt-pill:active { transform: scale(0.96) !important; }

.amt-pill.active {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.25) !important;
}

.amt-card-price {
  font-size: 20px !important;
  font-weight: 900 !important;
  font-family: var(--font-mono) !important;
  color: #0f172a !important;
  letter-spacing: -0.5px !important;
  line-height: 1.1 !important;
  display: block !important;
}
.amt-pill.active .amt-card-price { color: #b45309 !important; }

.amt-card-sub {
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #64748b !important;
  white-space: nowrap !important;
  display: block !important;
}
.amt-pill.active .amt-card-sub { color: #92400e !important; }

.amt-hot-badge {
  position: absolute !important;
  top: -10px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #ffffff !important;
  font-size: 10.5px !important;
  font-weight: 900 !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35) !important;
  letter-spacing: 0.3px !important;
  z-index: 2 !important;
}

/* ==================== 頁尾與右下角常駐浮動按鈕 ==================== */
footer {
  margin-top: 40px;
  border-top: 1px solid var(--border-card);
  background: #ffffff;
  padding: 24px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.fab-lead-btn {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 999;
  background: linear-gradient(135deg, #0f4c3a 0%, #062e23 100%);
  color: #ffffff;
  border: 2px solid #86efac;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(15, 76, 58, 0.4);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.fab-lead-btn:active { transform: scale(0.94); }

.toast-popup {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 800;
  z-index: 2000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

/**
 * ========================================================
 * 天天樂 539168 - API 連線容錯與降級狀態專屬樣式 (api-fallback.css)
 * 風格：松樹深綠 (#074a3a) ＋ 翡翠琉璃 ＋ 琥珀警示
 * ========================================================
 */

/* 連線狀態徽章容器 */
#hero-sync-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.3s ease;
  user-select: none;
}

/*  連線正常狀態 */
.sync-status-online {
  color: #10b981;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

/*  快取降級狀態與重試按鈕 */
.sync-status-cached {
  color: #f59e0b;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  transition: all 0.2s ease;
}

.sync-status-cached:hover {
  background: rgba(245, 158, 11, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.sync-status-retry-btn {
  text-decoration: underline;
  margin-left: 4px;
  font-weight: 800;
  color: #fbbf24;
}

/*  連線異常或初次訪問狀態 */
.sync-status-error {
  color: #ef4444;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  transition: all 0.2s ease;
}

.sync-status-error:hover {
  background: rgba(239, 68, 68, 0.22);
  transform: translateY(-1px);
}

/* 動態脈衝呼吸燈（連線中） */
.sync-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
  animation: syncPulseAnim 2s infinite;
}

@keyframes syncPulseAnim {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}



/* ========================================================
 *  三層吸頂聯動導航控制台 (Sticky HUD)
 * 第 1 排：彩種切換列
 * 第 2 排：四大功能切換列 (吉星 / 避雷 / 英雄 / 尾數)
 * 第 3 排：命中 / 避雷 / 尾數 統一實測期數
 * ======================================================== */
.sticky-nav-triple-container {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 6px 0 4px 0;
  margin-bottom: 12px;
  border-bottom: 1.5px solid rgba(203, 213, 225, 0.7);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transition: all 0.25s ease;
}

.sticky-nav-triple-container .tabs-card {
  margin-bottom: 6px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.sticky-nav-triple-container .model-nav-pills {
  margin-bottom: 6px !important;
  padding: 0 !important;
}

.sticky-nav-triple-container .range-control-wrap {
  margin-bottom: 2px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.sticky-nav-triple-container.is-scrolled {
  background: rgba(248, 250, 252, 0.98);
  box-shadow: 0 10px 24px rgba(15, 76, 58, 0.12);
  border-bottom-color: #10b981;
}

@media (max-width: 600px) {
  .sticky-nav-triple-container {
    padding: 4px 0 2px 0;
    margin-bottom: 10px;
  }
  .sticky-nav-triple-container .tabs-card {
    gap: 3px !important;
    padding: 4px !important;
  }
  .sticky-nav-triple-container .tab-btn {
    font-size: 11.5px !important;
    padding: 6px 1px !important;
  }
  .sticky-nav-triple-container .model-nav-pills {
    gap: 4px !important;
  }
  .sticky-nav-triple-container .model-nav-btn {
    font-size: 11.5px !important;
    padding: 7px 4px !important;
  }
  .sticky-nav-triple-container .range-control-wrap {
    padding: 6px 10px !important;
  }
  .sticky-nav-triple-container .range-btn {
    font-size: 12px !important;
    padding: 5px 10px !important;
  }
}

/* v23.0.0 - 首頁快速入口及基本無障礙 */
.quick-start{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:12px 0;}
.quick-start-link{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;padding:13px 7px;min-height:64px;border:1px solid #b5d8ca;border-radius:12px;background:#fff;color:#174b3b;font:700 14px/1.4 inherit;text-decoration:none;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.04);}
.quick-start-link:hover{background:#eef9f3;border-color:#0a8458;}
.quick-start-link span:first-child{font-size:20px;}
.data-transparency-note{font-size:12px;line-height:1.7;color:#52665e;margin:0 0 12px;}
:where(a,button,input,select,textarea,[tabindex]):focus-visible{outline:3px solid #ed8c21!important;outline-offset:3px!important;}
@media(max-width:700px){.quick-start{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.quick-start-link{min-height:62px;font-size:13px;padding:9px 4px;}}
@media(max-width:350px){.quick-start{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important;}}


/* v24.9 全站大一統：經典黃金雙層 Header ＆ 26 大免費抓牌神器純文字專業看盤樣式 (100% 零 Emoji) */
header.site-dual-header {
  background: #ffffff !important;
  border-bottom: none !important;
  padding: 0 !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06) !important;
  margin-bottom: 12px !important;
  width: 100% !important;
}
.header-top-roof {
  padding: 10px 0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
}
.header-top-roof .container.header-inner {
  max-width: 960px !important;
  margin: 0 auto !important;
  padding: 0 12px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 8px !important;
}
.brand-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  text-decoration: none !important;
}
.brand-icon {
  width: 36px !important;
  height: 36px !important;
  background: #0f4c3a !important;
  color: #ffffff !important;
  border-radius: 9px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 900 !important;
  font-size: 19px !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 6px rgba(15, 76, 58, 0.22) !important;
}
.brand-title {
  font-size: 17px !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  letter-spacing: -0.3px !important;
}
.brand-subtitle {
  font-size: 11.5px !important;
  color: #64748b !important;
  font-weight: 700 !important;
  margin-left: 2px !important;
}
.brand-tagline-badge {
  display: inline-flex;
  align-items: center;
  background: #f0fdf4;
  color: #065f46;
  border: 1px solid #a7f3d0;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  margin-left: 8px;
  white-space: nowrap;
}
.header-top-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}
.btn-header-toolbox {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #10b981 0%, #047857 100%) !important;
  color: #ffffff !important;
  border: 1px solid #6ee7b7 !important;
  padding: 7px 14px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.32) !important;
  text-decoration: none !important;
}
.btn-top-action-outline {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #ffffff !important;
  color: #0f4c3a !important;
  border: 1.5px solid #cbd5e1 !important;
  padding: 6px 13px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
}
.btn-top-action-outline:hover {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
}
.btn-top-sponsor {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #fff1f2 !important;
  color: #e11d48 !important;
  border: 1.5px solid #fecdd3 !important;
  font-weight: 900 !important;
  padding: 6px 13px !important;
  font-size: 13px !important;
  border-radius: 999px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  text-decoration: none !important;
}
.header-pine-navbar {
  background: linear-gradient(90deg, #06392b 0%, #0f4c3a 50%, #06392b 100%) !important;
  border-top: 1px solid rgba(110, 231, 183, 0.22) !important;
  border-bottom: 2px solid #f59e0b !important;
}
.header-pine-navbar .container {
  max-width: 960px !important;
  margin: 0 auto !important;
  padding: 0 8px !important;
}
.pine-nav-strip {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 0 !important;
}
.pine-nav-strip::-webkit-scrollbar { display: none; }
.pine-nav-link {
  flex: 1 0 auto !important;
  text-align: center !important;
  color: #f8fafc !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  padding: 9px 10px !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  position: relative !important;
  transition: background 0.15s ease, color 0.15s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
}
.pine-nav-link:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 26%;
  height: 48%;
  width: 1px;
  background: rgba(255, 255, 255, 0.16);
}
.pine-nav-link:hover, .pine-nav-link:active, .pine-nav-link.active-nav {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fde047 !important;
}
.pine-nav-link.is-gold {
  color: #fde047 !important;
  font-weight: 900 !important;
}
.pine-nav-link.is-live {
  color: #fecaca !important;
  font-weight: 900 !important;
}
.live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
}
.subpage-h1-bar {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-left: 5px solid #0f4c3a;
  border-radius: 12px;
  padding: 10px 14px;
  margin: 8px 0 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.subpage-h1-bar h1 {
  font-size: 17px !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  margin: 0 !important;
  line-height: 1.35 !important;
}
.toolbox-item-card .tool-badge-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 5px;
  background: #e2e8f0;
  color: #334155;
  margin-bottom: 2px;
}
.toolbox-item-card .tool-badge-tag.hot {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
@media (max-width: 760px) {
  .brand-tagline-badge { display: none !important; }
  .pine-nav-link { padding: 8px 10px !important; font-size: 13px !important; }
  .btn-header-toolbox, .btn-top-action-outline, .btn-top-sponsor { padding: 6px 10px !important; font-size: 12px !important; }
  .subpage-h1-bar h1 { font-size: 15.5px !important; }
}

/* =========================================================================
 * v27.4.0 網頁美感、等寬數值對齊 (tabular-nums) 與雙端觸控人體工學升級包
 * ========================================================================= */
.ball,
.mini-ball,
.special-ball,
.stat-value,
.win-rate,
.rate-badge,
.period-tag,
.countdown-timer,
.countdown-num,
.tail-badge,
.tail-rate,
.table-num,
.col-ball-cell,
.col-day,
.col-week,
.consensus-circle,
.mini-pick-ball,
.note-ball-pill,
table td,
table th {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

button,
a,
.tab-btn,
.pine-nav-link,
.ball,
.mini-pick-ball,
.consensus-ball-item,
.toolbox-item-card,
.feed-tab-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.card,
.model-card,
.vip-master-card,
.subpage-h1-bar,
.toolbox-item-card {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================================
   v27.4.0 方案 C 野心旗艦版：全網合牌共識橫條 ＆ 跨頁個人化選號籃 ＆ RWD 增強
   ======================================================== */
.home-consensus-bar {
  background: linear-gradient(135deg, #062e23 0%, #0f4c3a 60%, #115e59 100%);
  border: 1.5px solid rgba(253, 224, 71, 0.45);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 6px 20px rgba(15, 76, 58, 0.16);
}
.home-consensus-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.consensus-fire-tag {
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%);
  color: #0f172a;
  font-size: 11.5px;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.consensus-bar-title {
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.2px;
}
.home-consensus-balls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.consensus-pick-ball {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(253, 224, 71, 0.45);
  border-radius: 12px;
  padding: 4px 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), background 0.16s;
}
.consensus-pick-ball:hover {
  transform: translateY(-2px);
  background: rgba(253, 224, 71, 0.22);
}
.consensus-pick-ball:active {
  transform: scale(0.96);
}
.consensus-ball-rank {
  font-size: 10px;
  font-weight: 900;
  color: #fde047;
  font-family: var(--font-mono);
}
.consensus-ball-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fde047 0%, #f59e0b 65%, #b45309 100%);
  color: #0f172a;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.25);
}
.consensus-ball-pts {
  font-size: 11px;
  font-weight: 800;
  color: #a7f3d0;
  font-family: var(--font-mono);
}
.home-consensus-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}
.btn-consensus-add-all {
  background: rgba(253, 224, 71, 0.18);
  color: #fde047;
  border: 1px solid rgba(253, 224, 71, 0.55);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-consensus-add-all:hover {
  background: #fde047;
  color: #0f172a;
}
.btn-consensus-goto {
  background: #ffffff;
  color: #0f4c3a;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

/* 模型卡與名師卡「＋ 收入選號籃」按鈕 */
.btn-card-add-basket {
  background: #f0fdf4;
  color: #0f4c3a;
  border: 1.5px solid #10b981;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.btn-card-add-basket:hover {
  background: #0f4c3a;
  color: #fde047;
}
.btn-card-add-basket:active {
  transform: scale(0.97);
}

/* 跨頁個人化選號籃毛玻璃懸浮列 (Floating Pick Basket Dock) */
.tt-pick-basket-dock {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(130%);
  width: min(94vw, 760px);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1.5px solid rgba(253, 224, 71, 0.55);
  border-radius: 18px;
  padding: 10px 14px;
  z-index: 1500;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
  opacity: 0;
  pointer-events: none;
}
.tt-pick-basket-dock.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.tt-basket-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tt-basket-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tt-basket-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.tt-basket-badge {
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%);
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.tt-basket-balls-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0;
}
.tt-basket-balls-scroll::-webkit-scrollbar {
  display: none;
}
.tt-basket-ball-pill {
  background: #1e293b;
  color: #fde047;
  border: 1px solid rgba(253, 224, 71, 0.45);
  border-radius: 999px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.tt-basket-ball-pill .rm-x {
  font-size: 11px;
  color: #94a3b8;
}
.tt-basket-clear-btn {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.tt-basket-actions-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.tt-basket-act-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  padding: 7px 6px;
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: all 0.15s;
}
.tt-basket-act-btn.primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #34d399;
}
.tt-basket-act-btn.line {
  background: linear-gradient(135deg, #06C755 0%, #059669 100%);
  color: #ffffff;
  border-color: #4ade80;
  box-shadow: 0 2px 10px rgba(6, 199, 85, 0.35);
}
@media (max-width: 600px) {
  .home-consensus-bar {
    padding: 10px 12px;
    gap: 8px;
  }
  .home-consensus-actions {
    width: 100%;
    justify-content: space-between;
  }
  .tt-basket-actions-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* v27.4.0 選號籃已選球號琥珀金光環高亮 ＆ 子頁右下角按鈕防遮擋自動上移 */
.is-in-pick-basket {
  box-shadow: 0 0 0 3px #f59e0b, 0 4px 12px rgba(245, 158, 11, 0.45) !important;
  transform: translateY(-2px);
}
body.has-pick-basket-open .fab-lead-btn {
  bottom: calc(118px + env(safe-area-inset-bottom, 0px)) !important;
}
.tt-basket-actions-row {
  grid-template-columns: repeat(6, 1fr);
}
@media (max-width: 680px) {
  .tt-basket-actions-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================================
   v27.9.11 專業數據等寬對齊 (tabular-nums) 與 A4 列印保護 (@media print)
   ======================================================== */
.white-ball, .card-ball-3d, .digit-ball, .consensus-pick-ball, .tt-basket-ball-pill,
.recent5-balls, .recent5-meta, .model-tag, .amt-card-price, .hero-ball, .ball-3d,
.mini-ball, .big-special-ball, .news-ball-3d, .ladder-ball-pill, .rank-ball-badge,
.cand-ball, table td, table th, #hero-badge-name, #hero-local-date {
  font-variant-numeric: tabular-nums;
}

@media print {
  header, .pine-header, .top-conversion-bar, .tools-nav-bar, .tabs-card,
  #tt-floating-pick-basket, #tt-univ-sponsor-mask, #support-modal, #toolbox-modal,
  .fab-lead-btn, #toast-box, #toast-msg, #tt-basket-mini-toast, .no-print,
  .btn-top-sponsor, .btn-tools-lib, .btn-to-main {
    display: none !important;
  }
  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
  }
  .container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}
