/* ============================================================
   IBE 小酒館 新手訓練場（塔羅前導班練習工具）— 共用視覺系統
   2026-10 改版：跟主站一樣的清晨／夜晚雙主題，由 ../theme.js 依時間切換。
   這裡沿用原本的變數名稱（--neon、--ink…），各練習頁的樣式不用改名，
   只是把顏色換成新配色：清晨＝灰藍灰紫、夜晚＝深藍＋鵝黃。
   ============================================================ */

:root,
:root[data-theme="dawn"] {
  --bg: #F1F2F7;
  --bg-panel: rgba(255, 255, 255, 0.92);
  --bg-panel-alt: #F4F5F9;
  --bg-panel-deep: #E8EAF2;
  --line: rgba(94, 104, 144, 0.32);
  --line-soft: rgba(94, 104, 144, 0.18);
  --neon: #5E6890;
  --neon-bright: #454B66;
  --neon-glow: rgba(94, 104, 144, 0.16);
  --on-neon: #FFFFFF;
  --ink: #2B3044;
  --ink-dim: #4A5068;
  --ink-faint: #6B7190;
  --neon-violet: #6C5A9C;
  --neon-violet-soft: #ECE8F5;
  --amber: #A97A28;
  --sun: #F2DE9B;
  --header-bg: rgba(241, 242, 247, 0.9);
  --shadow: 0 16px 40px rgba(43, 48, 68, 0.12);
  --sky: linear-gradient(180deg, #DCE0EC 0%, #E8E9F2 40%, #F1EEF0 72%, #F6EBCB 100%);
  --sky-glow: rgba(242, 222, 155, 0.55);
  --star-opacity: 0;

  /* 數字解讀的動態圖（canvas）用色 */
  --anim-neon: #6C76A8;
  --anim-neon-bright: #4F5888;
  --anim-core: #FFFFFF;
  --anim-halo: #DCE0F0;
  --anim-violet: #8A7CC0;
  --anim-violet-bright: #A89BD6;
  --anim-violet-halo: #E6E1F5;
}

:root[data-theme="night"] {
  --bg: #181B2C;
  --bg-panel: rgba(22, 25, 44, 0.84);
  --bg-panel-alt: rgba(233, 234, 242, 0.06);
  --bg-panel-deep: rgba(233, 234, 242, 0.1);
  --line: rgba(242, 222, 155, 0.32);
  --line-soft: rgba(233, 234, 242, 0.16);
  --neon: #F2DE9B;
  --neon-bright: #F2DE9B;
  --neon-glow: rgba(242, 222, 155, 0.16);
  --on-neon: #1E2238;
  --ink: #E9EAF2;
  --ink-dim: #C3C7DA;
  --ink-faint: #A2A8C2;
  --neon-violet: #C2B4EC;
  --neon-violet-soft: rgba(194, 180, 236, 0.14);
  --amber: #E9C27A;
  --sun: #F2DE9B;
  --header-bg: rgba(24, 27, 44, 0.88);
  --shadow: 0 20px 48px rgba(8, 10, 20, 0.5);
  --sky: linear-gradient(180deg, #121526 0%, #1A1E3A 38%, #2E3258 64%, #554F7A 84%, #8C7690 100%);
  --sky-glow: rgba(242, 222, 155, 0.32);
  --star-opacity: 1;

  --anim-neon: #F2DE9B;
  --anim-neon-bright: #F6E7B4;
  --anim-core: #FFFDF5;
  --anim-halo: #FFF3CF;
  --anim-violet: #B9A8E6;
  --anim-violet-bright: #D3C8F2;
  --anim-violet-halo: #E9E3FA;
}

:root {
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --font-display: "Noto Serif TC", "Songti TC", serif;
  --font-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-mono: "Space Mono", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 0 48px;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--bg);
  line-height: 1.7;
  transition: background-color .6s ease, color .6s ease;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* 只在某個主題顯示 */
:root[data-theme="dawn"] .only-night,
:root:not([data-theme]) .only-night { display: none !important; }
:root[data-theme="night"] .only-dawn { display: none !important; }

/* -------------------- 固定天空背景（跟主站相同） -------------------- */
.sky {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: var(--sky);
}
.sky::after {
  content: ""; position: absolute; left: 50%; bottom: -300px;
  width: 600px; height: 600px; margin-left: -300px; border-radius: 50%;
  background: radial-gradient(circle, var(--sky-glow) 0%, rgba(242,222,155,0) 70%);
}
.sky .star {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: #F1F2F7; opacity: calc(var(--star-opacity) * var(--o, .6));
}

/* -------------------- 主站導覽列 -------------------- */
.ibe-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line-soft);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.ibe-header-in {
  max-width: 1200px; margin: 0 auto; padding: 0 16px; min-height: 64px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px;
}
.ibe-brand { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; }
.ibe-brand span { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: 0.08em; white-space: nowrap; }
.ibe-nav { display: flex; flex-wrap: nowrap; align-items: center; gap: 2px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.ibe-nav::-webkit-scrollbar { display: none; }
.ibe-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; font-size: 15px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.ibe-nav a.here { font-weight: 700; }
.ibe-nav a.ibe-cta { margin-left: 6px; padding: 8px 18px; border-radius: 999px; background: var(--sun); color: #2B3044; font-weight: 500; }
.ibe-theme-toggle {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%;
  border: 1px solid var(--line-soft); background: transparent; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}

/* -------------------- 主舞台容器 -------------------- */
.stage {
  position: relative;
  width: calc(100% - 32px);
  max-width: 460px;
  margin: 28px auto 0;
  background: var(--bg-panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 34px 22px 28px;
  box-shadow: var(--shadow);
}

/* 右上角圓印：練習編號 */
.seal {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-panel-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--neon-bright);
  letter-spacing: 0.5px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
  margin: 0 0 10px;
}

h1.display {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  font-size: 1.6rem;
  letter-spacing: 3px;
  margin: 0 0 8px;
}

.subtitle {
  text-align: center;
  color: var(--ink-dim);
  font-size: 0.88rem;
  line-height: 1.8;
  margin: 0 0 26px;
  padding: 0 6px;
}

/* 星羅盤分隔線（訊號/段落分隔用） */
.divider {
  display: flex;
  justify-content: center;
  margin: 26px 0;
  opacity: 0.9;
}
.divider svg circle,
.divider svg line { vector-effect: non-scaling-stroke; }

/* -------------------- 按鈕 -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 1.5px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  padding: 14px 22px;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  width: 100%;
  background: var(--neon);
  color: var(--on-neon);
  font-weight: 700;
  box-shadow: 0 10px 22px var(--neon-glow);
}
.btn-primary:hover { background: var(--neon-bright); box-shadow: 0 12px 26px var(--neon-glow); }

.btn-secondary {
  width: 100%;
  background: transparent;
  color: var(--ink-dim);
  border: 1px solid var(--line-soft);
}
.btn-secondary:hover { color: var(--ink); border-color: var(--neon); }

.btn-row { display: flex; flex-direction: column; gap: 12px; margin: 24px 0 4px; }

/* -------------------- 訊息卡（三個工具的解讀結果共用樣式） -------------------- */
.message-card {
  background: var(--bg-panel-alt);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  margin-bottom: 18px;
}
.message-card .section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--neon-bright);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.message-card .section-content {
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.85;
  text-align: justify;
}
.message-card .section-box {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--line-soft);
}
.message-card .section-box:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

/* 頁尾：2026-10-31 起改用主站頁尾（../theme-chrome.css） */

/* ============================================================
   2026-10-31 內頁版型
   頁首：左邊標題、右邊說明（跟新手訓練場入口同一套）；
   下面是一整塊寬的練習面板，各頁再依內容自己排欄位。
   ============================================================ */
.ibe-nav a.bi { flex-direction: column; justify-content: center; gap: 1px; line-height: 1.2; padding: 6px 12px; }
.ibe-nav a.bi small { font-size: 10px; letter-spacing: .18em; color: var(--ink-faint); }
.seal { display: none; }

.practice { width: calc(100% - 32px); max-width: 1080px; margin: 0 auto; }

.practice-head { padding: 28px 0 24px; display: grid; gap: 14px; }
.crumb { display: inline-block; margin-bottom: 20px; font-size: 13px; letter-spacing: .12em; color: var(--ink-dim); text-decoration: none; border-bottom: 1px solid var(--line-soft); padding-bottom: 2px; }
.crumb:hover { color: var(--ink); border-color: var(--neon); }
.practice-head .eyebrow { text-align: left; font-family: var(--font-body); font-size: 13px; letter-spacing: .3em; margin: 0 0 8px; }
.practice-head h1.display { text-align: left; font-weight: 600; font-size: var(--fs-page); letter-spacing: var(--ls-title); line-height: 1.35; margin: 0; }
.practice-head .subtitle { text-align: left; padding: 0; margin: 0; font-size: .95rem; line-height: 1.95; color: var(--ink-dim); }

.practice .stage {
  width: 100%; max-width: none; margin: 0;
  padding: 26px 20px 24px;
  border-radius: 24px;
}
.practice .stage .divider { display: none; }

.practice { padding-bottom: 72px; }
body { padding-bottom: 0; }

/* 按鈕列：手機滿版直排，桌機置中橫排 */
.practice .btn-row .btn { width: 100%; }

@media (min-width: 900px) {
  .practice-head {
    grid-template-columns: 1.15fr 1fr; align-items: end; gap: 24px 56px;
    padding: 56px 0 36px;
  }
  .practice-head .subtitle { font-size: 1rem; padding-bottom: 6px; }
  .practice .stage { padding: 44px 48px 40px; }
  .practice .btn-row { flex-direction: row; justify-content: center; }
  .practice .btn-row .btn { width: auto; min-width: 200px; }
}

/* 主站頁首／頁尾用主站自己的線條色，讓全站一致 */
:root[data-theme="dawn"] .site-header, :root[data-theme="dawn"] .site-footer, :root:not([data-theme]) .site-header, :root:not([data-theme]) .site-footer { --line: #DDE0EB; }
:root[data-theme="night"] .site-header, :root[data-theme="night"] .site-footer { --line: rgba(233, 234, 242, 0.14); }
