/**
 * ========================================================
 * 天天樂 539168 - 全站子頁面共用樣式庫 (subpage-common.css)
 * 適用：18+ 款實戰工具頁面、歷史走勢、民俗開運等
 * 風格：松樹深綠 (#0f4c3a) ＋ 翡翠琉璃 ＋ 琥珀高奢
 * 版本：v20261016_v12
 * ========================================================
 */

:root {
  --primary-pine: #0f4c3a;
  --primary-pine-dark: #064e3b;
  --primary-pine-light: #16654e;
  --accent-gold: #fde047;
  --accent-badge: #f59e0b;
  --bg-page: #f8fafc;
  --border-color: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --font-base: "Noto Sans TC", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body { background-color: var(--bg-page); color: var(--text-main); font-family: var(--font-base); font-size: 15px; line-height: 1.5; padding-bottom: 110px; }
a { text-decoration: none; color: inherit; }

/* 頂部強效導流橫幅 */
.top-conversion-bar {
  background: linear-gradient(135deg, #093327 0%, var(--primary-pine) 50%, var(--primary-pine-light) 100%);
  color: #ffffff;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 900;
  text-align: center;
  position: relative;
  z-index: 10;
  box-shadow: 0 3px 10px rgba(15, 76, 58, 0.2);
  border-bottom: 1.5px solid #34d399;
  line-height: 1.5;
}
.top-conversion-bar a {
  color: var(--accent-gold);
  text-decoration: underline;
  margin-left: 4px;
  display: inline-block;
  transition: transform 0.15s;
}
.top-conversion-bar a:hover { transform: scale(1.02); }

.container { max-width: 900px; margin: 0 auto; padding: 0 12px; }

/*  頁首全域吸頂導航 (18+ 款實戰工具頁面一致吸頂體驗) */
header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1.5px solid var(--border-color);
  padding: 10px 0;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  transition: all 0.2s ease;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.brand-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.brand-icon { width: 36px; height: 36px; background: var(--primary-pine); color: #fff; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 19px; flex-shrink: 0; box-shadow: 0 2px 6px rgba(15, 76, 58, 0.2); }
.brand-text-col { min-width: 0; }
.brand-title { font-size: 17px; font-weight: 900; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.3px; }
.brand-subtitle { font-size: 11.5px; color: var(--text-muted); font-weight: 700; margin-top: 1px; }

.header-actions { display: flex; align-items: center; gap: 6px; }

/*  工具庫按鈕 */
.btn-tools-lib {
  background: #f1f5f9;
  color: #0f4c3a;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  border: 1.5px solid #a7f3d0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.btn-tools-lib:hover { background: #ecfdf5; }

/* 回到天天樂按鈕 */
.btn-to-main {
  background: linear-gradient(135deg, var(--primary-pine) 0%, var(--primary-pine-dark) 100%);
  color: #ffffff;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap !important;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(15, 76, 58, 0.28);
  transition: all 0.15s ease;
}
.btn-to-main:active { transform: scale(0.96); }
.btn-to-main .arrow { color: var(--accent-gold); font-weight: 900; }

/* 實戰工具快捷橫列 */
.tools-nav-bar {
  display: flex;
  gap: 6px;
  margin: 10px 0 4px 0;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.tools-nav-bar::-webkit-scrollbar { display: none; }
.tool-nav-item {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 900;
  color: #334155;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}
.tool-nav-item.active {
  background: #ecfdf5;
  color: #0f4c3a;
  border-color: #10b981;
}

/*  五大彩種切換列 (強制單行橫排 5 等分) */
.tabs-wrap { 
  display: grid; 
  grid-template-columns: repeat(5, 1fr) !important; 
  gap: 6px; 
  margin: 10px 0 14px 0; 
}
.tab-btn { 
  background: #ffffff; 
  border: 1.5px solid var(--border-color); 
  border-radius: 10px; 
  padding: 10px 2px; 
  font-weight: 900; 
  font-size: 14px; 
  color: #475569; 
  cursor: pointer; 
  text-align: center; 
  transition: 0.15s; 
  font-family: inherit; 
  white-space: nowrap; 
}
.tab-btn.active { 
  background: var(--primary-pine); 
  color: #ffffff; 
  border-color: var(--primary-pine); 
  box-shadow: 0 4px 12px rgba(15,76,58,0.25); 
}

/*  實戰工具箱彈窗 */
.toolbox-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(5px);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.toolbox-modal-mask.active { display: flex; }
.toolbox-modal-card {
  background: #ffffff;
  border-radius: 20px;
  max-width: 540px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 22px 18px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  position: relative;
}
.toolbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
}
.toolbox-header h3 { font-size: 18px; font-weight: 900; color: #0f172a; }
.toolbox-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.toolbox-item-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.15s;
}
.toolbox-item-card:hover {
  background: #ecfdf5;
  border-color: #10b981;
  transform: translateY(-2px);
}
.toolbox-item-card .icon { font-size: 22px; }
.toolbox-item-card .name { font-size: 14.5px; font-weight: 900; color: #0f172a; }
.toolbox-item-card .desc { font-size: 11px; color: #64748b; font-weight: 700; }

/*  右下角常駐浮動按鈕：回到天天樂 */
.fab-lead-btn {
  position: fixed;
  bottom: 24px;
  right: 20px;
  background: linear-gradient(135deg, var(--primary-pine) 0%, var(--primary-pine-light) 100%);
  color: #ffffff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(15, 76, 58, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  letter-spacing: 0.3px;
}
.fab-lead-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(15, 76, 58, 0.5); }

/* Toast 提示 */
.toast-box { 
  position: fixed; 
  bottom: 30px; 
  left: 50%; 
  transform: translateX(-50%); 
  background: rgba(15,23,42,0.92); 
  color: #fff; 
  padding: 10px 22px; 
  border-radius: 999px; 
  font-size: 14px; 
  font-weight: 800; 
  z-index: 2000; 
  display: none; 
}

/*  全站子頁面手機版防水平溢位與 RWD 響應式護盾 (v23.5) */
body {
  overflow-x: clip;
  max-width: 100vw;
  width: 100%;
}
.container, main, section, article {
  max-width: 100%;
  min-width: 0;
}
.brand-subtitle {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 600px) {
  .container { padding: 0 10px; }
  header { padding: 8px 0; }
  .header-inner { gap: 6px; }
  .brand-icon { width: 32px; height: 32px; font-size: 16px; border-radius: 8px; }
  .brand-title { font-size: 15px; }
  .brand-subtitle { font-size: 10.5px; max-width: 155px; }
  .header-actions { gap: 4px; flex-shrink: 0; }
  .btn-tools-lib { padding: 6px 9px; font-size: 12px; }
  .btn-to-main { padding: 6px 10px; font-size: 12px; }
  .tabs-wrap { gap: 4px !important; }
  .tab-btn { font-size: 11.5px !important; padding: 8px 2px !important; }
  .fab-lead-btn { bottom: 16px; right: 14px; padding: 10px 16px; font-size: 13px; }
}
@media (max-width: 380px) {
  .brand-subtitle { max-width: 120px; }
  .tab-btn { font-size: 10.5px !important; letter-spacing: -0.3px; }
}


/* 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.4.0 全站控制元件大瘦身：隱藏右下角重疊浮動鈕，收納底部工具導覽列 */
.fab-lead-btn, .btn-row-lead {
  display: none !important;
}
.bottom-tools-nav-wrap {
  margin: 22px auto 12px auto;
  max-width: 960px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.bottom-tools-nav-label {
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  margin-bottom: 6px;
}

/* v27.4.0 全站子頁面手機版彩種切換列升級為 3 欄舒適大字網格（告別 10.5px 擠壓小字） */
@media (max-width: 640px) {
  .tabs-wrap {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
  .tab-btn {
    font-size: 13.5px !important;
    padding: 9px 4px !important;
    min-height: 42px !important;
    letter-spacing: 0 !important;
  }
}

/* ========================================================
   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;
  }
}
