/* ==========================================================================
   台灣輪班表鬧鐘 - 輪班貓官方旗艦官網 (The Shift Cat Official Website)
   設計風格：正宗手機 APP 輪班貓主題 (Warm Cream & Caramel Shift Cat)
   色彩系統：100% 精準對齊 App 內建 Palette _cat (亮底暖沙紙 + 奶油白面板 + 焦糖琥珀鍵)
   多語響應：工業級全語言防破版 · 手機單行標題與行動鍵剛性約束
   ========================================================================== */

:root {
  /* 基底：APP 原生輪班貓 Palette */
  --cat-bg: #E9E1D3;             /* APP 原生 bg: 溫暖燕麥暖沙紙底色 */
  --cat-panel: #FCFAF5;          /* APP 原生 panel: 純淨溫潤奶油象牙白 */
  --cat-panel-hi: #F3EDE1;       /* APP 原生 panelHi: 奶油蛋塔次級面板 */
  --cat-panel-top: #EDE3D2;      /* APP 原生 panelTop: 頂層暖調 */
  --cat-line: #E3D9C7;           /* APP 原生 line: 柔和暖沙分隔線 */
  --cat-border-card: rgba(110, 82, 55, 0.14); /* 精緻微邊框 */

  /* 核心文字階層：APP 原生文字對比 */
  --text-main: #3B332B;          /* APP 原生 textHi: 醇厚深栗棕 (4.5:1+ 高對比，絕非死黑) */
  --text-muted: #6E6053;         /* APP 原生 textMid: 溫和暖栗焙茶棕 */
  --text-low: #8A7B6D;           /* APP 原生 textLow: 柔和註解說明 */

  /* 語意重點色：APP 原生色彩語言 */
  --cat-cyan: #3E8E8C;           /* APP 原生 work/cyan: 莫蘭迪灰青湖綠 (日班/清爽) */
  --cat-amber: #CE9235;          /* APP 原生 amber/overtime: 溫暖琥珀金 (加班/金幣) */
  --cat-amber-ink: #8E6322;      /* APP 原生 amberInk: 文字用深琥珀 */
  --cat-glow: #F2C078;           /* APP 原生 navGlow: 蜜金貓爪發光色 */
  --cat-rose: #C4695A;           /* APP 原生 leave/red: 溫和肉桂玫瑰粉 */
  --cat-green: #5A7A45;          /* APP 原生 green: 自然鼠尾草綠 */

  /* 行動鍵：APP 原生焦糖琥珀玻璃鍵 (頂亮底暗光學梯度) */
  --cta-top: #A46120;            /* APP 原生 ctaTop: 焦糖亮棕 */
  --cta-bottom: #835016;         /* APP 原生 ctaBottom: 焦糖深琥珀 */
  --cta-ink: #FCFAF5;            /* APP 原生 ctaInk: 奶油白文字 */

  /* 次要按鈕：APP 原生深木摩卡鍵 */
  --slab-top: #6E5237;           /* APP 原生 navSlabTop */
  --slab-bottom: #4A3626;        /* APP 原生 navSlabBottom */

  /* 別名相容 (保證所有子網頁 100% 相同風格) */
  --bg-dark: var(--cat-bg);
  --bg-dark-card: var(--cat-panel);
  --bg-cream: var(--cat-panel);
  --bg-latte: var(--cat-panel-hi);
  --border-light: var(--cat-border-card);
  --border-glow: rgba(206, 146, 53, 0.4);
  --cat-gold: var(--cat-amber);
  --cat-mint: var(--cat-green);
  --cat-pink: var(--cat-rose);
  --cat-teal: var(--cat-cyan);

  /* 全站跨子網頁通用別名映射 */
  --panel: var(--cat-panel);
  --panel-hi: var(--cat-panel-hi);
  --panel-solid: var(--cat-panel);
  --panel-glass: rgba(252, 250, 245, 0.85);
  --line: var(--cat-line);
  --line-hi: var(--cat-amber);
  --hi: var(--text-main);
  --mid: var(--text-muted);
  --low: var(--text-low);
  --dim: var(--text-low);
  --amber: var(--cat-amber);
  --amber-ink: var(--cat-amber-ink);
  --cyan: var(--cat-cyan);
  --r-sm: var(--radius-sm);
  --r: var(--radius-md);
  --r-md: var(--radius-md);
  --r-lg: var(--radius-lg);
  --r-full: var(--radius-full);
  --shadow-sm: 0 4px 12px rgba(110, 82, 55, 0.06);
  --shadow-md: var(--shadow-card);
  --shadow-lg: var(--shadow-float);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* 圓角與陰影 */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-full: 9999px;

  --font-base: 'Outfit', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow-warm: 0 16px 36px rgba(110, 82, 55, 0.10);
  --shadow-card: 0 10px 30px rgba(110, 82, 55, 0.08), 0 2px 8px rgba(110, 82, 55, 0.04);
  --shadow-float: 0 20px 48px rgba(110, 82, 55, 0.16);
}

/* 基礎重設與文字防溢出守衛 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-base);
  color-scheme: light;
  background-color: var(--cat-bg);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  background: radial-gradient(circle at 50% 0%, rgba(252, 250, 245, 0.7) 0%, transparent 60%),
              radial-gradient(circle at 85% 25%, rgba(206, 146, 53, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 15% 45%, rgba(62, 142, 140, 0.06) 0%, transparent 45%),
              var(--cat-bg);
  min-height: 100vh;
}

/* 多語言文字防斷字與防溢出 */
h1, h2, h3, h4, h5, h6, p, span, a, li, label, div {
  overflow-wrap: break-word;
  word-break: normal;
}

/* 容器與版心 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   1. 頂部導航欄 (Cat Navigation)
   ========================================================================== */
.cat-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(243, 237, 225, 0.92);
  border-bottom: 1px solid var(--cat-line);
  box-shadow: 0 4px 20px rgba(110, 82, 55, 0.05);
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  height: 72px;
  gap: 12px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(110, 82, 55, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
}

.brand-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--cat-amber-ink);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  flex-shrink: 0;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--cta-top);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.lang-select-wrap {
  flex-shrink: 0;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: #FCFAF5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238E6322' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat calc(100% - 10px) center;
  color: var(--text-main);
  border: 1px solid var(--cat-line);
  border-radius: var(--radius-full);
  padding: 8px 30px 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  box-shadow: 0 2px 6px rgba(110, 82, 55, 0.06);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lang-select:hover, .lang-select:focus {
  border-color: var(--cta-top);
  box-shadow: 0 4px 12px rgba(164, 97, 32, 0.15);
}

.lang-select option {
  background-color: #FCFAF5;
  color: var(--text-main);
}

.btn-nav-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--cta-top), var(--cta-bottom));
  color: var(--cta-ink);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(131, 80, 22, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-nav-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(131, 80, 22, 0.38);
}

/* ==========================================================================
   2. Hero 旗艦主視覺區 (The Shift Cat Hero)
   ========================================================================== */
.hero-section {
  padding: 60px 0 90px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 48px;
}

.hero-content {
  min-width: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FCFAF5;
  border: 1px solid var(--cat-line);
  color: var(--cat-amber-ink);
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(110, 82, 55, 0.08);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: var(--text-main);
  word-break: break-word;
}

.glow-text {
  background: linear-gradient(135deg, #835016 0%, #A46120 50%, #3E8E8C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
  word-break: break-word;
}

/* 雙平台下載按鈕組 */
.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-card);
  min-width: 220px;
}

.btn-cta-google {
  background: linear-gradient(135deg, var(--cta-top), var(--cta-bottom));
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--cta-ink);
}

.btn-cta-google:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(131, 80, 22, 0.35);
}

.btn-cta-apple {
  background: linear-gradient(135deg, var(--slab-top), var(--slab-bottom));
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--cta-ink);
}

.btn-cta-apple:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(74, 54, 38, 0.35);
}

.cta-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.cta-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cta-sub {
  font-size: 0.72rem;
  color: rgba(252, 250, 245, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
  white-space: nowrap;
}

.cta-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #FCFAF5;
  white-space: nowrap;
}

/* 信任保證標籤 */
.hero-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.trust-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.trust-pill svg {
  color: var(--cat-green);
  flex-shrink: 0;
}

/* 輪班貓主視覺展台 */
.hero-visual-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.hero-cat-showcase {
  position: relative;
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(110, 82, 55, 0.18), var(--shadow-card);
  border: 4px solid #FCFAF5;
  background: #FCFAF5;
  transition: transform 0.4s ease;
}

.hero-cat-showcase:hover {
  transform: scale(1.02);
}

.hero-cat-img {
  width: 100%;
  height: auto;
  display: block;
}

/* 懸浮微卡片 */
.floating-hud-card {
  position: absolute;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(252, 250, 245, 0.95);
  border: 1px solid var(--cat-line);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(110, 82, 55, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: catFloat 4s ease-in-out infinite;
  z-index: 10;
  white-space: nowrap;
}

.f-card-1 {
  top: -15px;
  left: -20px;
}

.f-card-2 {
  bottom: -20px;
  right: -15px;
  animation-delay: -2s;
}

.f-icon {
  font-size: 1.5rem;
}

.f-meta {
  display: flex;
  flex-direction: column;
}

.f-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.f-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cat-amber-ink);
}

@keyframes catFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ==========================================================================
   3. 誰需要輪班貓？ (Target Audience)
   ========================================================================== */
.audience-section {
  padding: 80px 0;
  background: rgba(243, 237, 225, 0.6);
  border-top: 1px solid var(--cat-line);
  border-bottom: 1px solid var(--cat-line);
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 50px;
}

.section-tag {
  display: inline-block;
  color: var(--cat-amber-ink);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin-bottom: 16px;
  color: var(--text-main);
  word-break: break-word;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  word-break: break-word;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
}

.audience-card {
  background: var(--cat-panel);
  border: 1px solid var(--cat-line);
  padding: 26px;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: 0 4px 16px rgba(110, 82, 55, 0.05);
  min-width: 0;
}

.audience-card:hover {
  transform: translateY(-4px);
  border-color: var(--cat-amber);
  box-shadow: 0 12px 28px rgba(110, 82, 55, 0.12);
}

.aud-emoji {
  font-size: 2.2rem;
  margin-bottom: 14px;
}

.aud-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
  word-break: break-word;
}

.aud-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  word-break: break-word;
}

/* ==========================================================================
   4. 六大王牌特權 Bento Grid (Bento Privileges)
   ========================================================================== */
.bento-section {
  padding: 100px 0;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.bento-card {
  background: var(--cat-panel);
  border: 1px solid var(--cat-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.bento-card:hover {
  transform: translateY(-6px);
  border-color: var(--cat-amber);
  box-shadow: var(--shadow-float);
}

.bento-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--cat-panel-hi);
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--cat-line);
}

.bento-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.bento-card:hover .bento-img {
  transform: scale(1.04);
}

.bento-content {
  padding: 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.bento-pill {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cat-amber-ink);
  background: var(--cat-panel-hi);
  border: 1px solid var(--cat-line);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  align-self: flex-start;
  margin-bottom: 14px;
  word-break: break-word;
}

.bento-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--text-main);
  word-break: break-word;
}

.bento-desc {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.65;
  word-break: break-word;
}

/* 跨 2 欄特色大卡 (折疊機專區) */
.bento-card.span-2 {
  grid-column: span 2;
}

.bento-card.span-2 .bento-media {
  aspect-ratio: 16 / 9;
}

/* ==========================================================================
   5. 貓爪即時加班費互動算曆 HUD (Interactive Paw Calculator)
   ========================================================================== */
.hud-section {
  padding: 90px 0;
  background: radial-gradient(circle at 50% 50%, rgba(206, 146, 53, 0.08) 0%, transparent 70%),
              rgba(243, 237, 225, 0.8);
  border-top: 1px solid var(--cat-line);
  border-bottom: 1px solid var(--cat-line);
}

.hud-calc-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
  background: var(--cat-panel);
  border: 1px solid var(--cat-line);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-float);
}

.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.calc-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.calc-label-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.calc-label-row span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}

.calc-val-badge {
  background: var(--cat-panel-hi);
  color: var(--cat-amber-ink);
  border: 1px solid var(--cat-line);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
}

/* 貓爪滑桿 */
.cat-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--cat-line);
  outline: none;
  transition: background 0.2s;
}

.cat-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cta-top);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(164, 97, 32, 0.4);
  transition: transform 0.15s ease;
}

.cat-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.cat-checkbox-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--cat-panel-hi);
  border-radius: var(--radius-md);
  border: 1px solid var(--cat-line);
  cursor: pointer;
  gap: 12px;
}

.cat-checkbox-row span {
  flex: 1 1 auto;
  word-break: break-word;
}

.cat-checkbox {
  width: 22px;
  height: 22px;
  accent-color: var(--cta-top);
  cursor: pointer;
  flex-shrink: 0;
}

/* 算曆結果大卡 */
.calc-result-panel {
  background: var(--cat-panel-hi);
  border: 1px solid var(--cat-line);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: inset 0 2px 8px rgba(110, 82, 55, 0.04);
  min-width: 0;
}

.result-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.result-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cat-amber-ink);
  letter-spacing: 0.05em;
  word-break: break-word;
}

.result-meta {
  font-size: 0.85rem;
  color: var(--cat-green);
  font-weight: 600;
  word-break: break-word;
}

.result-hero-amount {
  text-align: center;
  padding: 24px 0;
  background: var(--cat-panel);
  border: 1px dashed var(--cat-line);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(110, 82, 55, 0.05);
}

.amount-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  word-break: break-word;
}

.amount-number {
  font-size: clamp(2.4rem, 6vw, 3rem);
  font-weight: 800;
  color: var(--cta-top);
  letter-spacing: -0.02em;
}

.amount-currency {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-left: 6px;
}

.result-breakdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.92rem;
}

.breakdown-label {
  color: var(--text-muted);
  flex: 1 1 auto;
  word-break: break-word;
}

.breakdown-val {
  font-weight: 700;
  color: var(--text-main);
  flex-shrink: 0;
  text-align: right;
  white-space: nowrap;
}

/* ==========================================================================
   6. 終極行動召喚區 (Final CTA Banner)
   ========================================================================== */
.final-cta-section {
  padding: 100px 0;
  text-align: center;
}

.final-cta-card {
  background: linear-gradient(135deg, var(--cat-panel), var(--cat-panel-hi));
  border: 2px solid var(--cat-line);
  border-radius: var(--radius-lg);
  padding: 60px 30px;
  max-width: 860px;
  margin: 0 auto;
  box-shadow: var(--shadow-float);
  position: relative;
  overflow: hidden;
}

.cta-cat-badge {
  font-size: 3.5rem;
  margin-bottom: 16px;
  animation: pawPulse 2.5s infinite;
}

@keyframes pawPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.final-cta-title {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.3;
  color: var(--text-main);
  word-break: break-word;
}

.final-cta-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 36px;
  word-break: break-word;
}

.final-cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   7. 頁尾 (Cat Footer)
   ========================================================================== */
.cat-footer {
  background: var(--cat-panel-top);
  border-top: 1px solid var(--cat-line);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 12px;
  max-width: 360px;
  word-break: break-word;
}

.footer-col-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  word-break: break-word;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: color 0.2s;
  word-break: break-word;
}

.footer-link:hover {
  color: var(--cta-top);
}

.footer-bottom {
  border-top: 1px solid var(--cat-line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   8. 工業級雙端與多語言響應式 (Bulletproof RWD & Multi-Language Guard)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-badge, .hero-cta-group, .hero-trust-row {
    justify-content: center;
  }
  .hero-desc {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-card.span-2 {
    grid-column: span 2;
  }
  .hud-calc-grid {
    grid-template-columns: 1fr;
  }
  .floating-hud-card {
    display: none;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 14px;
  }

  /* 頂部導航欄手機端剛性約束：標題與按鈕絕對一行呈現 */
  .cat-nav {
    height: 60px;
  }
  .nav-container {
    height: 60px;
    gap: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap !important;
  }
  .nav-brand {
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }
  .brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
  }
  .brand-info {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }
  .brand-name {
    font-size: clamp(0.82rem, 3.4vw, 1rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
  }
  .brand-sub {
    display: none !important; /* 手機端嚴格隱藏副標，確保單行純淨不遮擋 */
  }

  .nav-links {
    display: none !important; /* 手機端隱藏錨點清單 */
  }

  .nav-actions {
    gap: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
  }

  /* 手機端語言選單鎖死為 34px 地球圖示膠囊，永遠不被長外文撐爆 */
  .lang-select-wrap {
    width: 34px;
    height: 32px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
  }
  .lang-select {
    width: 34px;
    height: 32px;
    min-width: 34px;
    max-width: 34px;
    padding: 0;
    text-indent: -9999px;
    background: var(--cat-panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238E6322' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='2' y1='12' x2='22' y2='12'%3E%3C/line%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'%3E%3C/path%3E%3C/svg%3E") no-repeat center center;
    border-radius: var(--radius-full);
    border: 1px solid var(--cat-line);
    cursor: pointer;
  }

  .btn-nav-download {
    padding: 6px 12px;
    font-size: 0.82rem;
    height: 32px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Hero 區塊手機排版加固 */
  .hero-section {
    padding: 36px 0 60px;
  }
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .btn-cta {
    width: 100%;
    justify-content: center;
    min-width: unset;
  }

  /* Bento 網格手機端單欄自適應 */
  .bento-section {
    padding: 60px 0;
  }
  .bento-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .bento-card.span-2 {
    grid-column: span 1;
  }
  .bento-card.span-2 .bento-media {
    aspect-ratio: 1 / 1;
  }

  /* 算曆與 CTA */
  .hud-section {
    padding: 60px 0;
  }
  .hud-calc-grid {
    padding: 20px;
  }
  .final-cta-section {
    padding: 60px 0;
  }
  .final-cta-card {
    padding: 40px 18px;
  }
  .final-cta-buttons {
    flex-direction: column;
    width: 100%;
  }
  .final-cta-buttons .btn-cta {
    width: 100%;
  }

  /* 頁尾分流 */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* 極小螢幕 (如 iPhone SE / 折疊機外螢幕 <= 380px) */
@media (max-width: 380px) {
  .nav-container {
    gap: 6px;
  }
  .brand-icon {
    width: 30px;
    height: 30px;
  }
  .brand-name {
    font-size: 0.82rem;
  }
  .lang-select-wrap {
    display: none; /* 超小窄螢幕收起頂部語言下拉，由頁尾切換，確保標題與按鈕 100% 寬裕同行！ */
  }
  .btn-nav-download {
    padding: 5px 10px;
    font-size: 0.76rem;
  }
}
