/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESET & CUSTOM PROPERTIES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* ── Night (default) ── */
  --bg:             #080818;
  --bg2:            #0d0d2b;
  --surface:        rgba(255, 255, 255, 0.05);
  --surface-hover:  rgba(255, 255, 255, 0.10);
  --border:         rgba(167, 139, 250, 0.20);
  --border-hover:   rgba(167, 139, 250, 0.55);
  --text:           #e8e0ff;
  --text-muted:     #9d8ec0;
  --accent:         #7c3aed;
  --accent2:        #c4b5fd;
  --glow:           rgba(124, 58, 237, 0.55);
  --glow-soft:      rgba(167, 139, 250, 0.25);
  --nav-bg:         rgba(8, 8, 24, 0.88);
  --blur:           16px;

  --font-en:  'Cinzel', Georgia, serif;
  --font-zh:  'Noto Serif TC', 'Georgia', serif;
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --t:        0.28s;
  --r:        12px;
  --rl:       20px;
}

[data-theme="day"] {
  /* ── Day ── */
  --bg:             #f8f2e3;
  --bg2:            #ede5cf;
  --surface:        rgba(255, 255, 255, 0.65);
  --surface-hover:  rgba(255, 255, 255, 0.88);
  --border:         rgba(180, 140, 60, 0.28);
  --border-hover:   rgba(200, 130, 30, 0.65);
  --text:           #2c1f0e;
  --text-muted:     #7a6040;
  --accent:         #b45309;
  --accent2:        #d97706;
  --glow:           rgba(180, 120, 0, 0.45);
  --glow-soft:      rgba(220, 160, 40, 0.20);
  --nav-bg:         rgba(248, 242, 227, 0.90);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BASE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-zh);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
  line-height: 1.7;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 15% 60%, rgba(124, 58, 237, 0.07), transparent),
    radial-gradient(ellipse 50% 40% at 85% 25%, rgba(67, 56, 202, 0.05), transparent);
  transition: opacity 0.5s;
}

[data-theme="day"] body::before {
  background:
    radial-gradient(ellipse 80% 50% at 18% -8%,  rgba(255, 220, 80, 0.30), transparent 58%),
    radial-gradient(ellipse 60% 40% at 78% -12%, rgba(255, 190, 50, 0.20), transparent 55%),
    radial-gradient(ellipse 50% 35% at 50% 110%, rgba(200, 160, 80, 0.06), transparent);
}

#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }

strong, em {
  color: var(--accent2);
  font-style: normal;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   NAVBAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 2rem;
  background: var(--nav-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-bottom: 1px solid var(--border);
  transition:
    background-color 0.5s var(--ease),
    border-color     0.5s var(--ease);
}

/* ── Logo ── */
.nav-logo {
  font-family: var(--font-en);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent2);
  letter-spacing: 0.14em;
  white-space: nowrap;
  transition: color var(--t) var(--ease), text-shadow var(--t) var(--ease);
}

.nav-logo:hover {
  color: var(--text);
  text-shadow: 0 0 16px var(--glow);
}

/* ── Centre Links ── */
.nav-links {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 0.1rem;
  flex-wrap: nowrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.38rem 0.75rem;
  border-radius: var(--r);
  font-size: 0.87rem;
  color: var(--text-muted);
  border: 1px solid transparent;
  white-space: nowrap;
  transition:
    color        var(--t) var(--ease),
    background   var(--t) var(--ease),
    border-color var(--t) var(--ease),
    box-shadow   var(--t) var(--ease);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--border);
  box-shadow: 0 0 12px var(--glow-soft);
}

/* ── 首頁 active（只在 index 頁觸發） ── */
[data-page="index"] .nav-link-home {
  color: var(--accent2);
  background: var(--surface);
  border-color: var(--border);
  animation: home-nav-pulse 2.6s ease-in-out infinite;
}
[data-page="index"] .nav-link-home::before {
  content: '✦ ';
  font-size: 0.6em;
  opacity: 0.8;
  animation: home-star-spin 3s linear infinite;
  display: inline-block;
}

@keyframes home-nav-pulse {
  0%, 100% {
    box-shadow: 0 0 6px var(--glow-soft);
    border-color: var(--border);
  }
  50% {
    box-shadow: 0 0 18px var(--glow), 0 0 6px var(--glow-soft);
    border-color: var(--border-hover);
  }
}

@keyframes home-star-spin {
  0%   { transform: rotate(0deg)   scale(1);    opacity: 0.6; }
  50%  { transform: rotate(180deg) scale(1.25); opacity: 1;   }
  100% { transform: rotate(360deg) scale(1);    opacity: 0.6; }
}

/* ── Right: Social + Toggle ── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-social {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r);
  font-size: 0.88rem;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: all var(--t) var(--ease);
}

.social-link:hover {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface);
  box-shadow: 0 0 10px var(--glow-soft);
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px 0;
  color: var(--text);
  position: relative;
}

.theme-toggle::after {
  content: '主題';
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  opacity: 0.5;
  white-space: nowrap;
  pointer-events: none;
}

.nav-home-tag {
  font-size: 0.92rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  opacity: 0.8;
  margin-left: 0.6rem;
  font-family: var(--font-tc);
  vertical-align: middle;
  transition: color 0.2s, opacity 0.2s;
}
.nav-logo:hover .nav-home-tag {
  color: var(--accent);
  opacity: 1;
}

.toggle-icon-moon,
.toggle-icon-sun {
  font-size: 0.85rem;
  line-height: 1;
  transition: opacity 0.3s var(--ease);
}

[data-theme="night"] .toggle-icon-moon { opacity: 1; }
[data-theme="night"] .toggle-icon-sun  { opacity: 0.28; }
[data-theme="day"]   .toggle-icon-moon { opacity: 0.28; }
[data-theme="day"]   .toggle-icon-sun  { opacity: 1; }

.toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 46px;
  height: 24px;
  border-radius: 12px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

[data-theme="night"] .toggle-track {
  background: rgba(110, 60, 200, 0.35);
  border-color: rgba(160, 110, 240, 0.55);
  box-shadow: inset 0 0 8px rgba(140, 90, 230, 0.2);
}

[data-theme="day"] .toggle-track {
  background: rgba(220, 165, 40, 0.35);
  border-color: rgba(230, 180, 60, 0.65);
  box-shadow: inset 0 0 8px rgba(220, 165, 40, 0.2);
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.35s, box-shadow 0.35s;
}

[data-theme="night"] .toggle-thumb {
  transform: translateX(3px);
  background: #b89fff;
  box-shadow: 0 0 6px rgba(140, 90, 230, 0.7);
}

[data-theme="day"] .toggle-thumb {
  transform: translateX(23px);
  background: #ffc844;
  box-shadow: 0 0 6px rgba(220, 165, 40, 0.7);
}

.theme-toggle:hover .toggle-track {
  box-shadow: 0 0 12px var(--glow);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HERO  (index.html)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 7rem 2rem 3rem;
  gap: 3.5rem;
}

.hero-content {
  text-align: center;
  max-width: 620px;
  width: 100%;
}

.rarity-tag {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  color: var(--accent2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28rem 1.1rem;
  margin-bottom: 1.4rem;
  text-shadow: 0 0 12px var(--glow);
  transition: all 0.5s;
}

.hero-title {
  font-family: var(--font-en);
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.glow-text {
  background: linear-gradient(135deg, var(--accent2) 0%, var(--accent) 50%, var(--accent2) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3.5s ease infinite;
}

@keyframes shimmer {
  0%   { background-position:   0% center; }
  50%  { background-position: 100% center; }
  100% { background-position:   0% center; }
}

.hero-subtitle {
  font-size: 1.02rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.8rem;
}

.hero-profile-card {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1.4rem;
  margin-bottom: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all var(--t) var(--ease);
}

.hero-profile-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 20px var(--glow-soft);
}

.profile-avatar {
  font-size: 1.4rem;
  color: var(--accent2);
  text-shadow: 0 0 12px var(--glow);
}

.hero-profile-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.hero-profile-title {
  font-size: 0.8rem;
  color: var(--accent2);
  margin-top: 0.1rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.65rem 1rem;
  min-width: 76px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all var(--t) var(--ease);
}

.stat-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--glow-soft);
}

.stat-icon  { font-size: 1.1rem; }

.stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.stat-value {
  font-family: var(--font-en);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent2);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2.2rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--accent);
  border-radius: var(--r);
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--t) var(--ease);
  animation: ctaPulse 2.8s ease-in-out infinite;
}

.cta-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px var(--glow);
  border-color: var(--accent2);
  animation: none;
}

.cta-btn:hover::after { transform: translateX(100%); }

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 12px var(--glow); }
  50%       { box-shadow: 0 0 28px var(--glow), 0 0 50px var(--glow-soft); }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PORTAL GRID  (index.html)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.portal-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.1rem;
  max-width: 680px;
  width: 100%;
}

.portal-card {
  flex: 0 0 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 1.6rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    border-color var(--t) var(--ease),
    transform    var(--t) var(--ease),
    box-shadow   var(--t) var(--ease);
}

.portal-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, var(--glow-soft), transparent 70%);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}

.portal-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 10px 32px var(--glow-soft);
}

.portal-card:hover::before { opacity: 1; }

.portal-icon {
  font-size: 1.9rem;
  transition: transform var(--t) var(--ease);
  position: relative;
  z-index: 1;
}

.portal-card:hover .portal-icon { transform: scale(1.22); }

.portal-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  position: relative;
  z-index: 1;
}

.portal-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.flavor-text {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  opacity: 0.55;
  text-align: center;
  animation: floatText 3.5s ease-in-out infinite;
}

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

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GLASS CARD  (shared)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  padding: 1.5rem;
  transition: all var(--t) var(--ease);
}

.glass-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 6px 26px var(--glow-soft);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PAGE WRAPPER  (inner pages)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 7rem 2rem 5rem;
}

.page-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.page-header h1,
.page-title {
  font-family: var(--font-en);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.page-header p,
.page-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

.section-title {
  font-family: var(--font-en);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent2);
  border-left: 3px solid var(--accent);
  padding-left: 0.8rem;
  margin-bottom: 1.4rem;
  letter-spacing: 0.08em;
}

.section-note {
  display: inline-block;
  font-size: 0.88rem;
  color: var(--accent2);
  letter-spacing: 0.08em;
  line-height: 1.7;
  margin: -0.6rem 0 1.4rem 0.2rem;
  padding: 0.35em 1em;
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 8px;
  background: rgba(168, 85, 247, 0.06);
}

.tag {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--t) var(--ease);
}

.tag:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}

.rarity-stars {
  color: var(--accent2);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-shadow: 0 0 8px var(--glow);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ANIMATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.fade-in {
  opacity: 0;
  transform: translateY(22px);
  animation: fadeUp 0.85s var(--ease) forwards;
}

.fade-in-delay {
  opacity: 0;
  transform: translateY(22px);
  animation: fadeUp 0.85s var(--ease) 0.45s forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

[data-scroll] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

[data-scroll].in-view {
  opacity: 1;
  transform: translateY(0);
}

[data-scroll-delay="1"] { transition-delay: 0.10s; }
[data-scroll-delay="2"] { transition-delay: 0.20s; }
[data-scroll-delay="3"] { transition-delay: 0.30s; }
[data-scroll-delay="4"] { transition-delay: 0.40s; }
[data-scroll-delay="5"] { transition-delay: 0.50s; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SECTION GRID  (about + others)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.section-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.75rem;
  cursor: default;
}

.section-card-icon { font-size: 1.9rem; }

.section-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: 0.04em;
}

.section-card-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Skeleton shimmer bars inside cards */
.skeleton-bar {
  height: 11px;
  border-radius: 6px;
  background: linear-gradient(90deg,
    var(--surface)       25%,
    var(--surface-hover) 50%,
    var(--surface)       75%);
  background-size: 200% 100%;
  animation: skShimmer 1.8s ease infinite;
}

.skeleton-bar + .skeleton-bar { margin-top: 0.45rem; }
.skeleton-bar.w-80 { width: 80%; }
.skeleton-bar.w-55 { width: 55%; }
.skeleton-bar.w-35 { width: 35%; }

@keyframes skShimmer {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FILTER TABS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-tab {
  padding: 0.38rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t) var(--ease);
}

.filter-tab:hover,
.filter-tab.active {
  border-color: var(--accent2);
  color: var(--accent2);
  background: var(--surface-hover);
  box-shadow: 0 0 12px var(--glow-soft);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CHARACTER CARDS  (characters.html)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.char-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  transition: all var(--t) var(--ease);
  cursor: default;
}

.char-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--glow-soft);
}

.char-img-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--bg2), var(--surface-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  transition: filter var(--t) var(--ease);
}

.char-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.char-card:hover .char-img-wrap { filter: brightness(1.1); }

.char-info { padding: 0.9rem 1rem 1rem; }

.char-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.char-series {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   KNOWLEDGE GRID  (knowledge.html)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.knowledge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.1rem;
  padding: 2.5rem 1.5rem;
}

.knowledge-card-icon {
  font-size: 3rem;
  transition: transform var(--t) var(--ease);
}

.knowledge-card:hover .knowledge-card-icon { transform: scale(1.15); }

.knowledge-card-title {
  font-family: var(--font-en);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--accent2);
  letter-spacing: 0.08em;
}

.knowledge-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.knowledge-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HOBBIES  (hobbies.html)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.hobby-section {
  margin-bottom: 3rem;
}

.hobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1rem;
}

.hobby-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  text-align: center;
}

.hobby-icon { font-size: 1.8rem; }
.hobby-name { font-size: 0.9rem; font-weight: 700; }
.hobby-sub  { font-size: 0.75rem; color: var(--text-muted); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GALLERY  (gallery.html)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ARCANA PLAYGROUND
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.arcana-playground {
  max-width: 780px;
  margin: 0 auto 3rem;
}
.arcana-playground-label {
  font-family: var(--font-en);
  font-size: 0.68rem;
  letter-spacing: 0.35em;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.6rem;
  opacity: 0.6;
}
.arcana-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem;
}
@media (max-width: 600px) { .arcana-panels { grid-template-columns: 1fr; } }

.arcana-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  padding: 1.8rem 1.4rem 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.arcana-panel-title {
  font-family: var(--font-en);
  font-size: 0.88rem;
  letter-spacing: 0.14em;
  color: var(--accent2);
}

/* Tarot */
.tarot-deck-wrap { perspective: 900px; }

.tarot-card {
  width: 136px;
  height: 216px;
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.tarot-card.is-flipped { transform: rotateY(180deg); }

.tarot-card-back-face,
.tarot-card-front-face {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-hover);
  gap: 0.5rem;
}
.tarot-card-back-face {
  background: linear-gradient(145deg,rgba(80,30,160,0.65),rgba(30,10,70,0.92),rgba(80,30,160,0.65));
}
.tarot-back-symbol {
  font-size: 2.4rem;
  animation: arcPulse 2.4s ease-in-out infinite;
}
.tarot-back-hint {
  font-size: 0.68rem;
  color: rgba(200,155,255,0.65);
  letter-spacing: 0.12em;
  font-family: var(--font-tc);
}
.tarot-card-front-face {
  transform: rotateY(180deg);
  background: linear-gradient(155deg,rgba(28,12,58,0.96),rgba(48,22,98,0.92));
  padding: 0.8rem;
  gap: 0.3rem;
}
.tarot-card-num {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: rgba(200,155,255,0.55);
  font-family: var(--font-en);
}
.tarot-card-sym { font-size: 2rem; line-height: 1; }
.tarot-card-zh  { font-size: 1rem; color: var(--accent2); font-weight: 700; letter-spacing: 0.06em; }
.tarot-card-en  { font-size: 0.6rem; color: rgba(180,135,255,0.55); letter-spacing: 0.08em; text-align: center; font-family: var(--font-en); }

.tarot-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.75;
  max-width: 200px;
  min-height: 3.5em;
  font-family: var(--font-tc);
  opacity: 0;
  transition: opacity 0.5s 0.4s;
}
.tarot-desc.visible { opacity: 1; }

.tarot-reset {
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.3rem 1.1rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-tc);
  opacity: 0;
  transition: opacity 0.4s 0.6s, border-color 0.2s, color 0.2s;
  pointer-events: none;
}
.tarot-reset.visible { opacity: 1; pointer-events: auto; }
.tarot-reset:hover   { border-color: var(--accent); color: var(--accent); }

@keyframes arcPulse {
  0%,100% { opacity: 0.55; transform: scale(1); }
  50%     { opacity: 1;    transform: scale(1.08); }
}

/* Magic Circle */
.magic-circle-wrap {
  position: relative;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.magic-circle-wrap canvas { display: block; border-radius: 50%; }
.circle-hint {
  position: absolute;
  font-size: 0.7rem;
  color: rgba(190,145,255,0.5);
  letter-spacing: 0.16em;
  font-family: var(--font-tc);
  pointer-events: none;
  transition: opacity 0.4s;
}
.circle-hint.hidden { opacity: 0; }
.circle-oracle {
  font-size: 0.8rem;
  color: var(--accent2);
  letter-spacing: 0.1em;
  text-align: center;
  font-family: var(--font-tc);
  min-height: 1.4rem;
  opacity: 0;
  transition: opacity 0.6s;
}
.circle-oracle.visible { opacity: 1; }

.gallery-columns {
  columns: 3 200px;
  gap: 1rem;
  margin-bottom: 3rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all var(--t) var(--ease);
  cursor: pointer;
}

.gallery-item:hover {
  border-color: var(--border-hover);
  transform: scale(1.02);
  box-shadow: 0 6px 22px var(--glow-soft);
}

.gallery-img-ph {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg2), var(--surface-hover));
  font-size: 2rem;
  color: var(--text-muted);
  font-family: var(--font-en);
  letter-spacing: 0.05em;
  font-size: 1rem;
}

.gallery-item-info {
  padding: 0.7rem 0.85rem;
}

.gallery-item-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
}

.gallery-item-cat {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   THEME TRANSITION OVERLAY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.theme-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 998;
  pointer-events: none;
  opacity: 0;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  background: transparent;
  transition:
    opacity          0.32s ease,
    backdrop-filter  0.32s ease,
    -webkit-backdrop-filter 0.32s ease;
}

.theme-transition-overlay.active {
  opacity: 1;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.05);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DAY MODE — LIGHT BEAMS (魔法書庫光束)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.day-beams {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}

[data-theme="day"] .day-beams {
  opacity: 1;
}

.day-beams span {
  position: absolute;
  top: -5%;
  height: 120%;
  background: linear-gradient(to bottom,
    rgba(255, 235, 120, 0.24) 0%,
    rgba(255, 215, 80, 0.10)  45%,
    transparent               100%);
  filter: blur(30px);
  border-radius: 50%;
  transform-origin: top center;
}

.day-beams span:nth-child(1) {
  left: 8%;
  width: 130px;
  animation: beamSway1 14s ease-in-out infinite;
}

.day-beams span:nth-child(2) {
  left: 30%;
  width: 80px;
  opacity: 0.72;
  background: linear-gradient(to bottom, rgba(255, 245, 160, 0.20) 0%, transparent 100%);
  filter: blur(22px);
  animation: beamSway2 18s ease-in-out infinite 3s;
}

.day-beams span:nth-child(3) {
  left: 57%;
  width: 150px;
  animation: beamSway1 16s ease-in-out infinite 6s;
}

.day-beams span:nth-child(4) {
  left: 81%;
  width: 95px;
  opacity: 0.78;
  background: linear-gradient(to bottom, rgba(255, 220, 100, 0.18) 0%, transparent 100%);
  filter: blur(26px);
  animation: beamSway2 12s ease-in-out infinite 1.5s;
}

@keyframes beamSway1 {
  0%, 100% { transform: rotate(-7deg) scaleX(1);    opacity: 0.82; }
  50%       { transform: rotate( 5deg) scaleX(1.15); opacity: 1;    }
}

@keyframes beamSway2 {
  0%, 100% { transform: rotate(5deg)  scaleX(1);   opacity: 0.78; }
  50%       { transform: rotate(-6deg) scaleX(0.9); opacity: 1;    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DAY MODE — PAPER TEXTURE & BREATHING
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
[data-theme="day"] body {
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      transparent 27px,
      rgba(150, 110, 30, 0.042) 27px,
      rgba(150, 110, 30, 0.042) 28px
    );
}

[data-theme="day"] .glass-card {
  animation: cardBreathe 8s ease-in-out infinite;
}

@keyframes cardBreathe {
  0%, 100% { box-shadow: 0 4px 18px rgba(150, 110, 30, 0.08); }
  50%       { box-shadow: 0 7px 30px rgba(190, 140, 40, 0.18); }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SCROLLBAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent2); }

::selection { background: var(--accent); color: #fff; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   NAV LOGO — IMAGE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.nav-logo { display: flex; align-items: center; }

.nav-logo-img {
  height: 64px;
  width: auto;
  object-fit: contain;
  transition: filter var(--t) var(--ease);
}

.nav-logo:hover .nav-logo-img {
  filter: drop-shadow(0 0 10px var(--glow)) brightness(1.1);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HERO AVATAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.hero-avatar-wrap {
  position: relative;
  width: 138px;
  height: 138px;
  margin: 0 auto 1.6rem;
  animation: avatarFloat 4s ease-in-out infinite;
}

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

.hero-avatar {
  width:  138px;
  height: 138px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 2px solid var(--border-hover);
  box-shadow:
    0 0 24px var(--glow-soft),
    0 0 60px rgba(124, 58, 237, 0.10);
}

.hero-avatar-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid var(--border);
  pointer-events: none;
  animation: ringPulse 2.8s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% { opacity: 0.30; transform: scale(1);    }
  50%       { opacity: 0.80; transform: scale(1.06); }
}

/* ── Avatar Orbit Dots ── */
.orbit-ring {
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  pointer-events: none;
}

.orbit-ring-1 { animation: orbitSpin 6s linear infinite 0s; }
.orbit-ring-2 { animation: orbitSpin 6s linear infinite -2s; }
.orbit-ring-3 { animation: orbitSpin 6s linear infinite -4s; }

@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}

.orbit-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent2);
  box-shadow: 0 0 8px var(--glow), 0 0 18px var(--glow-soft);
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  animation: dotTwinkle 2.2s ease-in-out infinite;
}

.orbit-ring-2 .orbit-dot { animation-delay: -0.73s; }
.orbit-ring-3 .orbit-dot { animation-delay: -1.46s; }

@keyframes dotTwinkle {
  0%, 100% { opacity: 0.65; box-shadow: 0 0 7px var(--glow), 0 0 14px var(--glow-soft); }
  50%       { opacity: 1;   box-shadow: 0 0 14px var(--glow), 0 0 28px var(--glow); }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MOUSE EFFECT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.mouse-orb {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-soft) 0%, transparent 65%);
  pointer-events: none;
  z-index: 1;
  top: -150px;
  left: -150px;
  mix-blend-mode: screen;
  will-change: transform;
}

[data-theme="day"] .mouse-orb {
  background: radial-gradient(circle, rgba(200, 150, 30, 0.10) 0%, transparent 65%);
  mix-blend-mode: multiply;
}

.mouse-star {
  position: fixed;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent2);
  box-shadow: 0 0 6px var(--glow);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  animation: mouseStarFade 0.65s ease-out forwards;
}

@keyframes mouseStarFade {
  0%   { opacity: 0.85; transform: translate(-50%, -50%) scale(1); }
  100% {
    opacity: 0;
    transform: translate(
      calc(-50% + var(--dx, 0px)),
      calc(-50% + var(--dy, 0px))
    ) scale(0.1);
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HERO TEXT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.hero-zh-name {
  font-family: var(--font-zh);
  font-size: clamp(0.88rem, 2vw, 1.12rem);
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.55em;
  margin-bottom: 1.4rem;
}

.hero-slogan {
  font-size: 1rem;
  color: var(--text);
  letter-spacing: 0.07em;
  margin-bottom: 0.3rem;
}

.hero-slogan-en {
  font-family: var(--font-en);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.16em;
  margin-bottom: 1.45rem;
  font-style: italic;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BADGES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.42rem;
  margin-bottom: 1.05rem;
}

.badge {
  display: inline-block;
  padding: 0.22rem 0.72rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
  transition: all var(--t) var(--ease);
}

.badge:hover {
  border-color: var(--accent2);
  color: var(--accent2);
  box-shadow: 0 0 10px var(--glow-soft);
}

.hero-intro {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 0.9rem;
}

.hero-interests {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 1.8rem;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ABOUT — DATA ROWS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.data-rows { display: flex; flex-direction: column; }

.data-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.42rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem;
  align-items: baseline;
}

.data-row:last-child { border-bottom: none; }

.data-label {
  flex: 0 0 68px;
  color: var(--text-muted);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.data-value { color: var(--text); flex: 1; line-height: 1.55; }

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.55rem;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CHARACTERS — GAME INFO PANEL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.char-section { margin-bottom: 0; }
.char-section + .char-section { margin-top: 3rem; }

.game-info-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  padding: 1.1rem 1.5rem;
  margin-bottom: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.game-info-item { flex: 0 0 auto; }

.game-info-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.game-info-value { font-size: 0.84rem; color: var(--text); line-height: 1.6; }

.uid-code {
  font-family: var(--font-en);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: 0.06em;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CHARACTERS — GALLERY FRAME
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.char-gallery {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 2.4rem 3rem;
}

.char-gallery-label {
  font-family: var(--font-en);
  font-size: 0.68rem;
  letter-spacing: 0.35em;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.4rem;
  opacity: 0.65;
}

.gallery-frame {
  position: relative;
  background: var(--bg2);
  border-radius: var(--rl);
  padding: 6px;
  border: 1px solid var(--border-hover);
  box-shadow:
    0 0 0 5px var(--bg),
    0 0 0 6px var(--border),
    0 0 55px var(--glow-soft);
  transition: box-shadow 0.5s;
}

.gallery-viewport {
  border-radius: calc(var(--rl) - 4px);
  overflow: hidden;
  background: var(--bg);
  height: 400px;
}

.gallery-track {
  display: flex;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.gallery-slide {
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-slide img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1rem 0.55rem;
  background: linear-gradient(to top, rgba(8, 8, 24, 0.82), transparent);
  color: #e8e0ff;
  font-size: 0.82rem;
  letter-spacing: 0.07em;
  text-align: center;
  pointer-events: none;
}

[data-theme="day"] .gallery-slide-caption {
  background: linear-gradient(to top, rgba(44, 31, 14, 0.75), transparent);
  color: #2c1f0e;
}

.char-gallery--wide {
  max-width: 860px;
}
.char-gallery--wide .gallery-viewport {
  height: 520px;
}

.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--nav-bg);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t) var(--ease);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}

.gallery-btn:hover {
  border-color: var(--border-hover);
  color: var(--accent2);
  box-shadow: 0 0 18px var(--glow-soft);
}

.gallery-prev { left: -1.5rem; }
.gallery-next { right: -1.5rem; }

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.3rem;
}

.gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all var(--t) var(--ease);
}

.gallery-dot.active {
  background: var(--accent2);
  transform: scale(1.45);
  box-shadow: 0 0 10px var(--glow-soft);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   KNOWLEDGE — ENTRY CARDS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
  margin-bottom: 3rem;
}

.entry-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.4rem 1.5rem;
}

.entry-icon { font-size: 1.55rem; }

.entry-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--accent2);
}

.entry-sub { font-size: 0.8rem; color: var(--text-muted); line-height: 1.55; }

.entry-tags { display: flex; flex-wrap: wrap; gap: 0.28rem; margin-top: 0.2rem; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   NORSE FEATURE — 北歐神話特輯
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.norse-feature {
  position: relative;
  padding: 2.2rem 2rem 2rem;
  margin-bottom: 2.5rem;
  overflow: visible;
}

.norse-badge {
  position: absolute;
  top: -13px;
  left: 1.8rem;
  background: linear-gradient(135deg, #5b21b6, #a855f7);
  color: #fff;
  font-family: var(--font-en);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0.3em 1.2em;
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(168,85,247,0.5);
  white-space: nowrap;
}

.norse-feature-content {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 2rem;
  align-items: start;
}

.norse-feature-title {
  font-family: var(--font-en);
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--accent2);
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}

.norse-feature-en {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.22em;
  margin-bottom: 1rem;
}

.norse-feature-desc {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.9;
  margin-bottom: 1.2rem;
}

.norse-feature-img-wrap {
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.norse-feature-img-wrap:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 32px rgba(168,85,247,0.28);
}

.norse-feature-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 700px) {
  .norse-feature-content { grid-template-columns: 1fr; }
}

.norse-pdf-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.3rem 1.8rem;
  margin-bottom: 2.5rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.norse-pdf-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(168,85,247,0.25);
}

.norse-pdf-card-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.norse-pdf-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent2);
  margin-bottom: 0.25rem;
}

.norse-pdf-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.norse-pdf-card-arrow {
  margin-left: auto;
  font-size: 1.4rem;
  color: var(--accent2);
  opacity: 0.7;
  transition: transform var(--t) var(--ease);
}

.norse-pdf-card:hover .norse-pdf-card-arrow {
  transform: translateX(5px);
  opacity: 1;
}

/* gallery video */
.gallery-item video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  object-fit: cover;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GALLERY — REAL IMAGE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.gallery-img {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.gallery-item { overflow: hidden; }
.gallery-item:hover .gallery-img { transform: scale(1.04); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HOBBY CARD — STATUS BADGE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.hobby-status {
  display: inline-block;
  font-size: 0.68rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.hobby-status.main  {
  border-color: rgba(167,139,250,0.5);
  background: rgba(124,58,237,0.12);
  color: var(--accent2);
}

.hobby-status.sub   {
  border-color: rgba(100,180,250,0.4);
  background: rgba(50,120,240,0.08);
  color: #7dd3fc;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CONTACT PAGE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.75rem;
}

.contact-card-icon { font-size: 2rem; }

.contact-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent2);
}

.contact-warning-note {
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-radius: var(--r);
  padding: 0.9rem 1.1rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 0.3rem;
}

.contact-social-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.contact-social-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--t) var(--ease);
  cursor: pointer;
}

.contact-social-btn:hover {
  border-color: var(--accent2);
  color: var(--text);
  box-shadow: 0 0 16px var(--glow-soft);
  transform: translateY(-2px);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HOBBY CARD — GAME LOGO
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.hobby-logo-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--bg2), var(--surface-hover));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.6rem;
  overflow: hidden;
  flex-shrink: 0;
}

.hobby-logo-wrap::after {
  content: attr(data-abbr);
  font-family: var(--font-en);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.10em;
  pointer-events: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
}

/* any img inside logo-wrap fills the space */
.hobby-logo-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* 更多提示標籤 */
.more-notice {
  text-align: center;
  padding: 1.6rem 0 0.8rem;
}

.more-notice span {
  display: inline-block;
  padding: 0.55em 2em;
  border: 1.5px solid var(--accent2);
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.07);
  box-shadow: 0 0 22px rgba(168, 85, 247, 0.22);
  font-family: var(--font-zh);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent2);
}

/* 推角清單框 */
.char-list-box {
  max-width: 660px;
  margin: 1.5rem auto 3rem;
  padding: 2rem 2.2rem;
}

.char-list-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: 0.1em;
  margin-bottom: 1.3rem;
}

.char-list-entries {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.char-list-row {
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  font-size: 0.88rem;
  line-height: 1.65;
}

.char-list-series {
  color: var(--accent2);
  font-weight: 700;
  font-size: 0.82rem;
  min-width: 72px;
  flex-shrink: 0;
}

.char-list-names {
  color: var(--text);
}

.char-list-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.75;
  border-left: 2px solid var(--border);
  padding: 0.3rem 0.8rem;
  margin-top: 0.1rem;
}

.char-list-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0;
}

.char-list-special {
  background: rgba(168, 85, 247, 0.06);
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: 12px;
  padding: 1rem 1.3rem;
  margin-top: 0.3rem;
}

.char-list-special-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent2);
  margin-bottom: 0.3rem;
}

.char-list-special-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HOBBY CARD — MEDIA COVER (動漫 / 電影)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.hobby-media-card {
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.hobby-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(160deg, var(--bg2) 0%, var(--surface-hover) 100%);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.hobby-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.42s var(--ease), filter 0.3s var(--ease);
}

.hobby-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: rgba(4, 4, 20, 0.45);
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.55rem;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.hobby-play-overlay span {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-en);
}

.hobby-cover-wrap:hover .hobby-play-overlay { opacity: 1; }
.hobby-cover-wrap:hover .hobby-cover-img    { transform: scale(1.05); filter: brightness(0.78); }

/* cover placeholder hint */
.hobby-cover-wrap::before {
  content: attr(data-hint);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0.42;
  letter-spacing: 0.08em;
  pointer-events: none;
  z-index: 0;
  text-align: center;
  white-space: nowrap;
}

.hobby-media-info {
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   WORKS SECTION (同人作品展示)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.works-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.works-section-title {
  font-family: var(--font-en);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent2);
  margin-bottom: 1.2rem;
  letter-spacing: 0.06em;
  border-left: 3px solid var(--accent);
  padding-left: 0.8rem;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 1rem;
}

.work-card {
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all var(--t) var(--ease);
}

.work-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 28px var(--glow-soft);
}

.work-img-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg2), var(--surface-hover));
}

.work-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s var(--ease);
}

.work-card:hover .work-img { transform: scale(1.06); }

.work-info {
  padding: 0.6rem 0.75rem 0.75rem;
}

.work-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.18rem;
}

.work-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LIGHTBOX
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(4, 4, 18, 0.90);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s var(--ease), visibility 0.28s var(--ease);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lb-img {
  max-width: 100%;
  max-height: 84vh;
  object-fit: contain;
  border-radius: var(--r);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75);
  transition: opacity 0.18s;
  display: block;
}

#lb-video-wrap {
  display: none;
  width: min(90vw, 960px);
  aspect-ratio: 16 / 9;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75);
}

#lb-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: rgba(13, 13, 43, 0.80);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t) var(--ease);
  z-index: 9001;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(13, 13, 43, 0.96);
  border-color: var(--border-hover);
  box-shadow: 0 0 18px var(--glow-soft);
}

.lightbox-close {
  top: 1.2rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
}

.lightbox-prev { left: 1.2rem; }
.lightbox-next { right: 1.2rem; }

.lightbox-caption {
  position: fixed;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.84rem;
  color: var(--text-muted);
  background: rgba(13, 13, 43, 0.80);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.32rem 1.2rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  max-width: 80vw;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HAMBURGER BUTTON（全局，桌面隱藏）
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  z-index: 201;
}
.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform 0.32s cubic-bezier(0.4,0,0.2,1),
              opacity   0.32s,
              width     0.32s;
}
/* X 動畫 */
.nav-open .nav-hamburger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-open .nav-hamburger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── 900px：tablet — 導航二行橫捲 ─────────────── */
@media (max-width: 900px) {
  .navbar {
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    padding: 0.55rem 1rem;
    gap: 0.35rem;
  }

  .nav-links {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    gap: 0.05rem;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }

  .nav-right { justify-self: end; }

  .nav-link { font-size: 0.8rem; padding: 0.32rem 0.5rem; }

  .knowledge-grid { grid-template-columns: 1fr; }
  .portal-card    { flex: 0 0 160px; }
  .hero           { gap: 2.5rem; }

  /* 平板直式：UID 截圖高度縮小 */
  .char-gallery--wide .gallery-viewport { height: 380px; }
  .char-gallery { padding: 0 1.2rem 2.5rem; }

  /* 2排 navbar 約 118px，確保內容不被遮住 */
  .page-wrapper { padding-top: 8rem; }
}

/* ── 768px：手機 — hamburger 選單 ─────────────── */
@media (max-width: 768px) {
  /* Navbar 變單行（保留 position: fixed 來自基礎樣式） */
  .navbar {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto;
    padding: 0.65rem 1.1rem;
    gap: 0.5rem;
  }

  /* Nav links 收起，點 hamburger 後展開 */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--nav-bg);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border-bottom: 1px solid var(--border);
    padding: 0;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.38s cubic-bezier(0.4,0,0.2,1),
                opacity    0.28s ease,
                padding    0.38s ease;
    z-index: 199;
    grid-column: auto;
  }
  .nav-open .nav-links {
    max-height: 520px;
    opacity: 1;
    pointer-events: auto;
    padding: 0.5rem 0.8rem 1rem;
    gap: 0.15rem;
  }
  .nav-links li { width: 100%; }
  .nav-links .nav-link {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    font-size: 0.92rem;
    padding: 0.55rem 0.6rem;
    border-radius: var(--r);
  }

  /* social 隱藏、hamburger 顯示 */
  .nav-social    { display: none; }
  .nav-hamburger { display: flex; }

  /* nav-right 靠右排 */
  .nav-right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  /* page padding 縮小 */
  .page-wrapper { padding: 5.5rem 0.9rem 2.5rem; }

  /* UID 截圖高度縮小（手機橫向 / 小型平板） */
  .char-gallery--wide .gallery-viewport { height: 280px; }
  .char-gallery { padding: 0 0.8rem 2.5rem; }

  /* hero */
  .hero { flex-direction: column; gap: 2rem; text-align: center; }
  .hero-avatar-ring { margin: 0 auto; }

  /* portal grid */
  .portal-card { flex: 0 0 148px; }

  /* section title */
  .section-title { font-size: 0.82rem; letter-spacing: 0.28em; }

  /* norse feature */
  .norse-feature-content { grid-template-columns: 1fr; }
  .norse-feature-img-wrap { max-width: 280px; margin: 0 auto; }

  /* arcana panels */
  .arcana-panels { grid-template-columns: 1fr; }

  /* tarot result 三張牌 */
  .tarot-modal .tm-result-card { width: auto; min-width: 130px; flex: 1 1 130px; }
  .tarot-modal .tm-result-cards { gap: 0.8rem; }

  /* tarot grid 抽牌格 */
  .tarot-modal .tm-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.45rem;
  }

  /* step 4 header */
  .tarot-modal .tm-draw-title { font-size: 1.1rem; }
}

/* ── 600px ────────────────────────────────────── */
@media (max-width: 600px) {
  .gallery-columns { columns: 2 150px; }
  .portal-card     { flex: 0 0 130px; }
  .hero-title      { font-size: 2rem; }
  .hero-stats      { gap: 0.5rem; }
  .stat-item       { padding: 0.55rem 0.75rem; min-width: 65px; }

  /* 知識 entry grid */
  .entry-grid { grid-template-columns: 1fr; }

  /* char gallery height */
  .gallery-viewport { height: 280px !important; }

  /* contact grid 強制單欄 */
  .contact-grid { grid-template-columns: 1fr !important; }
}

/* ── 480px：小手機 ────────────────────────────── */
@media (max-width: 480px) {
  /* typography */
  .page-title    { font-size: clamp(1.6rem, 8vw, 2.4rem); }
  .page-subtitle { font-size: 0.76rem; }
  .page-header   { padding-top: 1.6rem; padding-bottom: 1.2rem; }

  /* gallery masonry 單欄 */
  .gallery-columns { columns: 1 !important; }

  /* portal */
  .portal-card { flex: 0 0 120px; }

  /* hero stats */
  .stat-item { padding: 0.45rem 0.6rem; min-width: 58px; }
  .stat-num  { font-size: 1.2rem; }

  /* entry cards */
  .entry-card .entry-tags { gap: 0.3rem; }
  .tag { font-size: 0.66rem; padding: 0.18rem 0.5rem; }

  /* tarot modal */
  .tarot-modal .tm-result-card { min-width: 110px; }
  .tarot-modal .tm-main-title  { font-size: clamp(1.6rem, 7vw, 2.4rem); }
  .tarot-modal .tm-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 0.35rem;
  }
  .tarot-modal .tm-grid-card { height: 88px; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MUSIC SECTION — 最愛歌單
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@keyframes vinylSpin {
  to { transform: rotate(360deg); }
}

/* ── 分隔規則標題 ── */
.music-rule {
  position: relative;
  text-align: center;
  font-family: var(--font-en);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: 0.2em;
  margin: 0.5rem 0 1.6rem;
  text-shadow: 0 0 16px var(--glow-soft);
}

.music-rule::before,
.music-rule::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 80px);
  height: 1px;
}

.music-rule::before {
  left: 0;
  background: linear-gradient(to right, transparent, var(--border-hover));
}

.music-rule::after {
  right: 0;
  background: linear-gradient(to left, transparent, var(--border-hover));
}

/* ── Vinyl decoration + subtitle ── */
.music-fav-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.8rem;
  text-align: center;
}

.vinyl-disc-deco {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center,
      var(--accent)  0%,
      var(--accent)  9%,
      var(--accent2) 9%,
      var(--accent2) 26%,
      var(--accent)  26%,
      var(--accent)  28%,
      transparent    28%
    ),
    repeating-radial-gradient(
      circle at center,
      #08081a 0px, #08081a 2px,
      #16163a 2px, #16163a 4px
    );
  animation: vinylSpin 6s linear infinite;
  box-shadow:
    0 0 36px var(--glow-soft),
    0 10px 40px rgba(0, 0, 0, 0.55);
}

[data-theme="day"] .vinyl-disc-deco {
  background:
    radial-gradient(circle at center,
      var(--accent)  0%,
      var(--accent)  9%,
      var(--accent2) 9%,
      var(--accent2) 26%,
      var(--accent)  26%,
      var(--accent)  28%,
      transparent    28%
    ),
    repeating-radial-gradient(
      circle at center,
      #2a1800 0px, #2a1800 2px,
      #3e2c00 2px, #3e2c00 4px
    );
}

.vinyl-disc-deco::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.music-fav-sub {
  font-size: 0.84rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── 3-column embed grid ── */
.music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.music-card {
  padding: 0.65rem;
}

.music-card iframe {
  display: block;
  width: 100%;
  border-radius: 8px;
}

@media (max-width: 680px) {
  .music-grid { grid-template-columns: 1fr; }
  .music-rule::before,
  .music-rule::after { width: calc(50% - 70px); }
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STAGGER REVEAL — grid children
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.hobby-grid > .glass-card,
.music-grid > .glass-card {
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
}

.hobby-grid > .glass-card.stagger-in,
.music-grid > .glass-card.stagger-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* portal grid per-card stagger (handled via JS animation) */
@keyframes portalAppear {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LITLINK CARD  (index.html)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.litlink-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1.4rem;
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  color: var(--text);
  text-decoration: none;
  transition: all var(--t) var(--ease);
  position: relative;
  overflow: hidden;
}

.litlink-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(167,139,250,0.06) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.55s;
}

.litlink-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px var(--glow-soft);
}

.litlink-card:hover::before { transform: translateX(100%); }

.litlink-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.litlink-text { flex: 1; }

.litlink-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: 0.04em;
}

.litlink-sub {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.litlink-arrow {
  font-size: 1.25rem;
  color: var(--accent2);
  opacity: 0.65;
  transition: transform var(--t) var(--ease), opacity var(--t) var(--ease);
  flex-shrink: 0;
}

.litlink-card:hover .litlink-arrow {
  transform: translateX(5px);
  opacity: 1;
}

/* Discord 複製提示 */
#discord-tip {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px) scale(0.95);
  background: #5865F2;
  color: #fff;
  padding: 0.75em 2em;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 6px 32px rgba(88,101,242,0.55), 0 2px 8px rgba(0,0,0,0.4);
  border: 1.5px solid rgba(255,255,255,0.25);
  transition: opacity 0.22s, transform 0.22s;
}

#discord-tip.discord-tip-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

#discord-tip.discord-tip-hide {
  opacity: 0;
  transform: translateX(-50%) translateY(20px) scale(0.95);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ARCANA LAUNCH BUTTON
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.arcana-launch-btn {
  background: linear-gradient(135deg, rgba(80,30,160,0.45), rgba(30,10,70,0.65));
  border: 1px solid rgba(167,123,250,0.35);
  border-radius: 14px;
  padding: 1.6rem 2.2rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  transition: all 0.32s var(--ease);
  font-family: var(--font-tc);
  width: 100%;
}
.arcana-launch-btn:hover {
  border-color: rgba(167,123,250,0.7);
  box-shadow: 0 0 32px rgba(100,40,220,0.22);
  transform: translateY(-3px);
}
.arcana-launch-icon { font-size: 2.8rem; line-height: 1; animation: arcPulse 2.4s ease-in-out infinite; }
.arcana-launch-title {
  font-size: 1.08rem;
  color: var(--accent2);
  font-weight: 700;
  letter-spacing: 0.14em;
  font-family: var(--font-en);
}
.arcana-launch-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  opacity: 0.75;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TAROT MODAL OVERLAY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.tarot-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #04020f;
  overflow: hidden;
  display: none;
}
.tarot-modal.is-open { display: block; }

.tm-close {
  position: fixed;
  top: 1rem; right: 1.3rem;
  z-index: 10001;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(20,10,44,0.8);
  border: 1px solid rgba(120,80,200,0.3);
  color: rgba(200,170,255,0.6);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(6px);
}
.tm-close:hover { border-color: rgba(167,123,250,0.8); color: #a77bfa; }

.tm-hud {
  position: fixed;
  top: 1rem; left: 1.3rem;
  z-index: 10001;
  display: flex; gap: 0.5rem;
}
.tm-hud-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(20,10,44,0.8);
  border: 1px solid rgba(120,80,200,0.25);
  color: rgba(200,170,255,0.6);
  font-size: 0.95rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(6px);
}
.tm-hud-btn:hover { border-color: rgba(167,123,250,0.7); color: #a77bfa; }

/* Steps */
.tarot-modal .tm-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5.5rem 1.5rem 2.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
  overflow-y: auto;
  text-align: center;
  font-family: 'Noto Serif TC', serif;
  color: rgba(220,210,255,0.88);
  -webkit-overflow-scrolling: touch;
}
.tarot-modal .tm-step.active { opacity: 1; pointer-events: auto; }
.tarot-modal #tm-step4 { justify-content: flex-start; }

/* Buttons */
.tarot-modal .tm-btn {
  background: linear-gradient(135deg, #4c1d95, #6d28d9);
  border: 1px solid rgba(167,123,250,0.45);
  border-radius: 50px;
  padding: 0.88rem 2.8rem;
  font-family: 'Noto Serif TC', serif;
  font-size: 1rem;
  color: rgba(220,210,255,0.92);
  cursor: pointer;
  letter-spacing: 0.12em;
  margin-top: 1.5rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.tarot-modal .tm-btn:hover { box-shadow: 0 0 30px rgba(109,40,217,0.6); transform: translateY(-2px); }
.tarot-modal .tm-btn-sec {
  background: rgba(20,10,44,0.6);
  border: 1px solid rgba(120,80,200,0.3);
  border-radius: 50px;
  padding: 0.68rem 2rem;
  font-family: 'Noto Serif TC', serif;
  font-size: 0.9rem;
  color: rgba(200,170,255,0.7);
  cursor: pointer;
  letter-spacing: 0.1em;
  transition: all 0.25s;
}
.tarot-modal .tm-btn-sec:hover { border-color: rgba(167,123,250,0.6); color: #a77bfa; }

/* Step 1 */
.tarot-modal .tm-s1-wrap { text-align: center; max-width: 520px; position: relative; z-index: 1; }
.tarot-modal .tm-main-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem,6vw,3.2rem);
  font-weight: 900;
  background: linear-gradient(135deg,#d4a843,#a77bfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}
.tarot-modal .tm-main-sub {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: rgba(212,168,67,0.6);
  letter-spacing: 0.25em;
  margin-bottom: 1.6rem;
}
.tarot-modal .tm-main-desc {
  font-size: 0.9rem;
  color: rgba(220,210,255,0.6);
  line-height: 2.1;
  letter-spacing: 0.04em;
}
.tarot-modal .tm-ring-bg {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  opacity: 0.13;
}
.tarot-modal .tm-ring-abs {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  pointer-events: none;
  opacity: 0.1;
}

/* Step 2 */
.tarot-modal .tm-book {
  display: flex;
  max-width: 800px;
  width: 100%;
  background: rgba(18,8,42,0.88);
  border: 1px solid rgba(120,80,200,0.2);
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.8), 0 0 40px rgba(60,10,140,0.12);
  min-height: 380px;
}
.tarot-modal .tm-page {
  flex: 1; padding: 2.4rem 1.8rem;
  display: flex; flex-direction: column; gap: 0.9rem;
  text-align: left;
}
.tarot-modal .tm-page + .tm-page { border-left: 1px solid rgba(120,80,200,0.18); justify-content: center; align-items: center; }
.tarot-modal .tm-page-orn {
  font-family: 'Cinzel', serif; font-size: 0.68rem;
  color: rgba(212,168,67,0.35); letter-spacing: 0.2em; text-align: center;
}
.tarot-modal .tm-page-title {
  font-family: 'Cinzel', serif; font-size: 1.4rem;
  color: #d4a843; text-align: center; letter-spacing: 0.1em;
}
.tarot-modal .tm-page-desc { font-size: 0.83rem; color: rgba(220,210,255,0.5); text-align: center; letter-spacing: 0.05em; }
.tarot-modal .tm-wish-input {
  width: 100%; min-height: 130px;
  background: rgba(10,5,28,0.7);
  border: 1px solid rgba(120,80,200,0.25);
  border-radius: 8px; padding: 1rem;
  font-family: 'Noto Serif TC', serif; font-size: 0.9rem;
  color: rgba(220,210,255,0.85);
  resize: vertical; outline: none; transition: border-color 0.2s;
  box-sizing: border-box;
}
.tarot-modal .tm-wish-input:focus { border-color: rgba(167,123,250,0.6); }
.tarot-modal .tm-wish-hint { font-size: 0.7rem; color: rgba(180,160,220,0.38); text-align: center; letter-spacing: 0.05em; line-height: 1.7; }
.tarot-modal .tm-rune-deco { opacity: 0.35; display: flex; flex-direction: column; gap: 0.7rem; align-items: center; }
.tarot-modal .tm-rune-line { font-size: 1rem; color: #d4a843; letter-spacing: 0.3em; }
.tarot-modal .tm-arcana-deco { font-family: 'Cinzel', serif; font-size: 0.75rem; color: rgba(212,168,67,0.5); letter-spacing: 0.25em; margin-top: 0.5rem; }
@media (max-width: 620px) {
  .tarot-modal .tm-book { flex-direction: column; }
  .tarot-modal .tm-page + .tm-page { border-left: none; border-top: 1px solid rgba(120,80,200,0.18); }
}

/* Step 3 */
.tarot-modal .tm-breathe-wrap {
  display: flex; align-items: center; gap: 3.5rem;
  max-width: 680px; width: 100%; position: relative; z-index: 1;
}
@media (max-width: 580px) { .tarot-modal .tm-breathe-wrap { flex-direction: column; gap: 2rem; } }
.tarot-modal .tm-deck { position: relative; width: 110px; height: 170px; flex-shrink: 0; }
.tarot-modal .tm-deck-card {
  position: absolute;
  width: 98px; height: 158px;
  border-radius: 8px;
  background: linear-gradient(145deg,#3b1a8a,#1a0d42);
  border: 1px solid rgba(120,80,200,0.38);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.tarot-modal .tm-deck-card:nth-child(1) { top: 10px; left: 10px; }
.tarot-modal .tm-deck-card:nth-child(2) { top: 5px;  left: 5px; }
.tarot-modal .tm-deck-card:nth-child(3) { top: 0;    left: 0; }
.tarot-modal .tm-breathe-text { flex: 1; text-align: left; }
.tarot-modal .tm-breathe-title {
  font-family: 'Cinzel', serif; font-size: 1.6rem;
  color: #d4a843; letter-spacing: 0.1em; margin-bottom: 1.2rem;
}
.tarot-modal .tm-breathe-lines p {
  font-size: 0.9rem; color: rgba(220,210,255,0.6);
  letter-spacing: 0.05em; line-height: 2.1; margin: 0;
}
@media (max-width: 580px) { .tarot-modal .tm-breathe-text { text-align: center; } }

/* Step 4 */
.tarot-modal .tm-draw-header { margin-bottom: 1.2rem; }
.tarot-modal .tm-draw-title {
  font-family: 'Cinzel', serif; font-size: 1.3rem;
  color: #d4a843; letter-spacing: 0.12em; margin-bottom: 1rem;
}
.tarot-modal .tm-slots-bar { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }
.tarot-modal .tm-slot { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; }
.tarot-modal .tm-slot-label { font-size: 0.68rem; color: rgba(220,210,255,0.4); letter-spacing: 0.16em; font-family: 'Cinzel', serif; }
.tarot-modal .tm-slot-mini {
  width: 38px; height: 28px;
  background: rgba(20,10,44,0.7);
  border: 1px dashed rgba(120,80,200,0.22);
  border-radius: 4px; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}
.tarot-modal .tm-slot-mini.filled { border-style: solid; border-color: rgba(167,123,250,0.5); background: rgba(60,20,140,0.4); }
.tarot-modal .tm-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 0.6rem;
  max-width: 700px; width: 100%; padding: 0.5rem;
}
.tarot-modal .tm-grid-card {
  height: 106px; border-radius: 7px;
  background: linear-gradient(145deg,#2d1468,#1a0d42);
  border: 1px solid rgba(120,80,200,0.28);
  cursor: pointer; position: relative;
  transition: all 0.25s;
}
.tarot-modal .tm-grid-card:hover:not(.selected) {
  transform: translateY(-4px);
  border-color: rgba(167,123,250,0.65);
  box-shadow: 0 6px 20px rgba(80,20,160,0.35);
}
.tarot-modal .tm-card-back {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: rgba(167,123,250,0.4);
  backface-visibility: hidden; transition: opacity 0.4s;
}
.tarot-modal .tm-card-face {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; border-radius: 7px; padding: 0.3rem;
  opacity: 0; transition: opacity 0.4s 0.18s;
}
.tarot-modal .tm-grid-card.flipped .tm-card-back { opacity: 0; }
.tarot-modal .tm-grid-card.flipped .tm-card-face { opacity: 1; }
.tarot-modal .tm-grid-card.selected { border-color: rgba(167,123,250,0.75); }
.tarot-modal .tm-cf-num { font-size: 0.52rem; color: rgba(200,155,255,0.42); letter-spacing: 0.1em; font-family: 'Cinzel', serif; }
.tarot-modal .tm-cf-sym { font-size: 1.1rem; line-height: 1; }
.tarot-modal .tm-cf-zh  { font-size: 0.58rem; color: #a77bfa; font-weight: 700; letter-spacing: 0.04em; }
.tarot-modal .tm-card-face.reversed { transform: rotate(180deg); }

/* Step 5 */
.tarot-modal .tm-result-header { margin-bottom: 1.2rem; position: relative; z-index: 1; }
.tarot-modal .tm-result-title { font-family: 'Cinzel', serif; font-size: 1.5rem; color: #d4a843; letter-spacing: 0.12em; }
.tarot-modal .tm-result-echo { font-size: 0.86rem; color: rgba(212,168,67,0.52); letter-spacing: 0.08em; margin-top: 0.4rem; }
.tarot-modal .tm-result-cards {
  display: flex; gap: 1.2rem; justify-content: center;
  flex-wrap: wrap; max-width: 680px; position: relative; z-index: 1;
  margin: 0 auto;
}
.tarot-modal .tm-result-card { width: 175px; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.tarot-modal .tm-rc-label { font-size: 0.66rem; color: rgba(220,210,255,0.38); letter-spacing: 0.18em; font-family: 'Cinzel', serif; }
.tarot-modal .tm-rc-body {
  width: 100%;
  background: linear-gradient(145deg,rgba(28,12,58,0.9),rgba(48,22,98,0.8));
  border: 1px solid rgba(120,80,200,0.32);
  border-radius: 10px; padding: 1.2rem 0.8rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
}
.tarot-modal .tm-rc-body.is-reversed { transform: rotate(180deg); }
.tarot-modal .tm-rc-num { font-size: 0.72rem; color: rgba(212,168,67,0.85); letter-spacing: 0.22em; font-family: 'Cinzel', serif; font-weight: 600; text-shadow: 0 0 8px rgba(212,168,67,0.4); }
.tarot-modal .tm-rc-sym { font-size: 1.8rem; line-height: 1; }
.tarot-modal .tm-rc-zh  { font-size: 0.88rem; color: #a77bfa; font-weight: 700; }
.tarot-modal .tm-rc-en  { font-size: 0.6rem; color: rgba(180,135,255,0.48); letter-spacing: 0.07em; font-family: 'Cinzel', serif; }
.tarot-modal .tm-rc-pos { font-size: 0.6rem; color: rgba(220,210,255,0.42); letter-spacing: 0.1em; }
.tarot-modal .tm-rc-desc { font-size: 0.74rem; color: rgba(220,210,255,0.58); text-align: center; line-height: 1.65; letter-spacing: 0.03em; }
.tarot-modal .tm-div-notice {
  font-size: 0.66rem; color: rgba(220,210,255,0.2);
  letter-spacing: 0.05em; margin: 0.8rem 0; max-width: 480px;
  position: relative; z-index: 1;
}

/* Step 6 */
.tarot-modal .tm-reading-wrap {
  max-width: 700px; width: 100%;
  background: rgba(18,8,42,0.82);
  border: 1px solid rgba(120,80,200,0.18);
  border-radius: 12px; padding: 2.4rem 2rem;
}
.tarot-modal .tm-reading-header { text-align: center; margin-bottom: 1.8rem; }
.tarot-modal .tm-reading-orn { font-family: 'Cinzel', serif; font-size: 0.68rem; color: rgba(212,168,67,0.3); letter-spacing: 0.3em; }
.tarot-modal .tm-reading-title { font-family: 'Cinzel', serif; font-size: 1.35rem; color: #d4a843; letter-spacing: 0.12em; margin: 0.5rem 0; }
.tarot-modal .tm-reading-body {
  font-size: 0.86rem; color: rgba(220,210,255,0.72);
  line-height: 2; letter-spacing: 0.02em;
  text-align: left;
  overflow-y: visible;
}
.tarot-modal .tm-reading-actions { display: flex; gap: 1rem; justify-content: center; margin-top: 1.6rem; flex-wrap: wrap; }

/* History overlay */
.tarot-modal .tm-hist-overlay {
  position: fixed; inset: 0; z-index: 10100;
  background: rgba(0,0,0,0.72);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.tarot-modal .tm-hist-overlay.open { opacity: 1; pointer-events: auto; }
.tarot-modal .tm-hist-box {
  background: rgba(16,7,40,0.97);
  border: 1px solid rgba(120,80,200,0.28);
  border-radius: 12px; padding: 2rem;
  max-width: 540px; width: 90%; max-height: 78vh;
  display: flex; flex-direction: column; gap: 1rem;
  backdrop-filter: blur(12px);
}
.tarot-modal .tm-hist-hdr {
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Cinzel', serif; font-size: 0.96rem;
  color: #d4a843; letter-spacing: 0.1em;
}
.tarot-modal .tm-hist-x {
  background: none; border: none;
  color: rgba(200,170,255,0.5); font-size: 1.1rem; cursor: pointer; transition: color 0.2s;
}
.tarot-modal .tm-hist-x:hover { color: #a77bfa; }
.tarot-modal .tm-hist-list { overflow-y: auto; display: flex; flex-direction: column; gap: 0.8rem; }
.tarot-modal .tm-hist-item {
  background: rgba(28,15,55,0.6);
  border: 1px solid rgba(120,80,200,0.18);
  border-radius: 8px; padding: 0.9rem;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.tarot-modal .tm-hist-date { font-size: 0.7rem; color: rgba(212,168,67,0.5); letter-spacing: 0.07em; }
.tarot-modal .tm-hist-wish { font-size: 0.8rem; color: rgba(220,210,255,0.6); font-style: italic; }
.tarot-modal .tm-hist-cards { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.tarot-modal .tm-hist-tag {
  font-size: 0.66rem;
  background: rgba(60,20,140,0.38);
  border: 1px solid rgba(120,80,200,0.22);
  border-radius: 20px; padding: 0.12rem 0.55rem;
  color: rgba(200,170,255,0.62);
}
.tarot-modal .tm-hist-del {
  align-self: flex-end;
  background: none; border: 1px solid rgba(200,60,60,0.22);
  border-radius: 4px; padding: 0.18rem 0.55rem;
  font-size: 0.66rem; color: rgba(220,100,100,0.5); cursor: pointer; transition: all 0.2s;
}
.tarot-modal .tm-hist-del:hover { border-color: rgba(220,100,100,0.6); color: rgba(220,100,100,0.9); }
.tarot-modal .tm-hist-empty { text-align: center; font-size: 0.8rem; color: rgba(180,160,220,0.38); padding: 2rem; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TAROT — 飛牌動畫 + 3D 翻牌 (覆蓋前面的 opacity 方式)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* 飛牌進場 */
@keyframes tmFlyIn {
  0% {
    opacity: 0;
    transform: translateY(-260px) rotate(var(--init-rot, 0deg)) scale(0.12);
  }
  65% { opacity: 1; }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

.tarot-modal .tm-grid-card {
  perspective: 800px;
  animation: tmFlyIn 0.52s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--card-delay, 0ms);
  cursor: pointer;
}

/* 3D 翻牌容器 */
.tarot-modal .tm-card-inner {
  position: absolute;
  inset: 0;
  border-radius: 7px;
  transform-style: preserve-3d;
  transition: transform 0.68s cubic-bezier(0.4, 0, 0.2, 1);
}
.tarot-modal .tm-grid-card.flipped .tm-card-inner {
  transform: rotateY(180deg);
}

/* 牌背 */
.tarot-modal .tm-card-back {
  position: absolute; inset: 0;
  border-radius: 7px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: linear-gradient(150deg, #1e0960, #0a0430, #2a0e74);
  border: 1px solid rgba(130, 80, 220, 0.4);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  /* 覆蓋前面的 opacity transition */
  opacity: 1 !important;
  transition: none;
}
/* 牌背圖片 + 發光動畫 */
.tarot-modal .tm-back-img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 7px;
  display: block;
  animation: cardBackGlow 3s ease-in-out infinite alternate;
}
@keyframes cardBackGlow {
  from { filter: drop-shadow(0 0 4px rgba(200,160,255,0.35)) drop-shadow(0 0 10px rgba(140,80,255,0.2)); }
  to   { filter: drop-shadow(0 0 10px rgba(220,180,255,0.7)) drop-shadow(0 0 22px rgba(180,120,255,0.45)); }
}

/* 牌面（正面） */
.tarot-modal .tm-card-face {
  position: absolute; inset: 0;
  border-radius: 7px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: rotateY(180deg);
  overflow: hidden;
  padding: 0;
  /* 覆蓋前面的 opacity: 0 */
  opacity: 1 !important;
  transition: none;
}
.tarot-modal .tm-card-face img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.tarot-modal .tm-card-face.reversed img {
  transform: rotate(180deg);
}

/* 禁用舊的 opacity toggle */
.tarot-modal .tm-grid-card.flipped .tm-card-back,
.tarot-modal .tm-grid-card.flipped .tm-card-face { opacity: 1 !important; }

/* 選中後加邊框光暈 */
.tarot-modal .tm-grid-card.selected { box-shadow: 0 0 0 2px rgba(167,123,250,0.7), 0 0 18px rgba(110,40,210,0.4); }

/* ── Zoom overlay — 翻牌放大預覽 ── */
.tarot-modal .tm-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 10300;
  background: rgba(3, 1, 12, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.38s;
}
.tarot-modal .tm-zoom-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.tarot-modal .tm-zoom-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  animation: tmZoomPop 0.52s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes tmZoomPop {
  from { transform: scale(0.1) rotateY(90deg); opacity: 0; }
  to   { transform: scale(1) rotateY(0deg);    opacity: 1; }
}
.tarot-modal .tm-zoom-img {
  max-height: min(64vh, 450px);
  max-width: min(78vw, 280px);
  width: auto;
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(167,123,250,0.3),
    0 0 50px rgba(130,60,220,0.5),
    0 0 110px rgba(80,20,160,0.25);
  display: block;
  transition: transform 0.3s;
}
.tarot-modal .tm-zoom-img.reversed { transform: rotate(180deg); }
.tarot-modal .tm-zoom-name {
  font-family: 'Cinzel', serif;
  font-size: clamp(1rem, 3vw, 1.35rem);
  color: #d4a843;
  letter-spacing: 0.14em;
  text-align: center;
  text-shadow: 0 0 20px rgba(212,168,67,0.4);
}
.tarot-modal .tm-zoom-pos {
  font-size: 0.8rem;
  color: rgba(220,210,255,0.5);
  letter-spacing: 0.2em;
}
.tarot-modal .tm-zoom-hint {
  font-size: 0.62rem;
  color: rgba(180,160,220,0.28);
  letter-spacing: 0.1em;
}

/* ── Result cards with real images ── */
.tarot-modal .tm-rc-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 0.8rem 1rem;
}
.tarot-modal .tm-rc-img {
  width: 100%;
  max-height: 190px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}
.tarot-modal .tm-rc-img.reversed { transform: rotate(180deg); }
.tarot-modal .tm-rc-info {
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
}
/* 覆蓋前面的 rotate(180deg)，改由 img 自己處理 */
.tarot-modal .tm-rc-body.is-reversed { transform: none; }

/* 覆蓋舊的 .tm-card-face.reversed { rotate(180deg) } — 現在由 img 內部旋轉處理 */
.tarot-modal .tm-card-face.reversed { transform: rotateY(180deg); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STEP 6 — 完整解讀捲軸修正
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* Step 2 — 願望輸入頁：改 block 讓 book 撐開真實高度，overflow-y 才會正確捲動 */
#tm-step2 {
  display: block !important;
  overflow-y: auto;
  padding: 3.5rem 1.5rem 4rem;
}
#tm-step2 > .tm-book {
  margin: 0 auto;
}

/* Step 5 — 結果頁：同理改 block，確保底部按鈕不被 flex 壓縮截斷 */
#tm-step5 {
  display: block !important;
  overflow-y: auto;
  padding: 4rem 1.5rem 4rem;
  text-align: center;
}
#tm-step5 .tm-div-notice {
  margin-left: auto;
  margin-right: auto;
}

/* 完整解讀：reading-wrap 自己捲動，不依賴外層 flex/block overflow */
#tm-step6 {
  display: block !important;
  overflow-y: auto;
  padding: 5.5rem 1.5rem 3rem;
}
#tm-step6 .tm-reading-wrap {
  margin: 0 auto 2rem;
  max-height: calc(100dvh - 11rem);
  overflow-y: auto;
}
#tm-step6 .tm-reading-wrap::-webkit-scrollbar { width: 4px; }
#tm-step6 .tm-reading-wrap::-webkit-scrollbar-track { background: transparent; }
#tm-step6 .tm-reading-wrap::-webkit-scrollbar-thumb {
  background: rgba(120,80,200,0.45); border-radius: 2px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TAROT PANEL REDESIGN — 命運之書
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.arcana-panel--tarot {
  background: linear-gradient(160deg, rgba(22,8,55,0.72), rgba(10,4,28,0.88));
  border-color: rgba(130,80,220,0.2);
  gap: 1.4rem;
  padding: 2rem 1.6rem;
  transition: border-color 0.35s, box-shadow 0.35s;
}
.arcana-panel--tarot:hover {
  border-color: rgba(167,123,250,0.42);
  box-shadow: 0 0 28px rgba(80,20,160,0.12);
}

/* 迷你牌疊 */
.tdp-stack {
  position: relative;
  width: 86px; height: 136px;
  flex-shrink: 0;
  margin: 0 auto;
}
.tdp-card {
  position: absolute;
  width: 80px; height: 128px;
  border-radius: 9px;
  background: linear-gradient(150deg, #1c0855, #0d052e, #280d6a);
  border: 1px solid rgba(120,75,215,0.38);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tdp-c3 { transform: rotate(-10deg) translate(-10px, 5px); }
.tdp-c2 { transform: rotate(-4deg)  translate(-4px,  2px); }
.tdp-c1 {
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
  box-shadow: 0 6px 22px rgba(70,15,150,0.45);
}
.arcana-panel--tarot:hover .tdp-c3 { transform: rotate(-15deg) translate(-17px, 7px); }
.arcana-panel--tarot:hover .tdp-c2 { transform: rotate(-6deg)  translate(-7px,  2px); }
.arcana-panel--tarot:hover .tdp-c1 { transform: translateY(-7px) scale(1.04); }

.tdp-sym {
  font-size: 2rem;
  color: rgba(150,95,255,0.38);
  animation: arcPulse 2.8s ease-in-out infinite;
}

/* 文字區 */
.tdp-text {
  text-align: center;
  display: flex; flex-direction: column; gap: 0.32rem;
}
.tdp-label {
  font-family: var(--font-en);
  font-size: 0.56rem;
  letter-spacing: 0.42em;
  color: rgba(212,168,67,0.42);
}
.tdp-title {
  font-family: var(--font-en);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent2);
  line-height: 1.2;
}
.tdp-sub {
  font-size: 0.63rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  opacity: 0.6;
  font-family: var(--font-tc);
}

/* 開始按鈕 */
.tdp-cta {
  background: linear-gradient(135deg, rgba(65,22,135,0.6), rgba(38,10,86,0.78));
  border: 1px solid rgba(167,123,250,0.3);
  border-radius: 50px;
  padding: 0.55rem 2rem;
  font-family: var(--font-tc);
  font-size: 0.84rem;
  color: rgba(210,196,255,0.8);
  cursor: pointer;
  letter-spacing: 0.18em;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}
.tdp-cta:hover {
  border-color: rgba(167,123,250,0.65);
  box-shadow: 0 0 22px rgba(100,40,220,0.28);
  transform: translateY(-2px);
  color: rgba(225,215,255,1);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   WISH PRESETS & VALIDATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.tm-wish-presets {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
  justify-content: center; margin: 0 0 0.7rem;
}
.tm-preset {
  background: rgba(28,8,64,0.55);
  border: 1px solid rgba(120,80,200,0.32);
  border-radius: 20px; padding: 0.28rem 0.85rem;
  font-family: 'Noto Serif TC', serif; font-size: 0.72rem;
  color: rgba(196,166,255,0.72); cursor: pointer;
  transition: all 0.2s; letter-spacing: 0.05em;
  white-space: nowrap;
}
.tm-preset:hover {
  background: rgba(60,18,130,0.6);
  border-color: rgba(167,123,250,0.65);
  color: rgba(224,208,255,0.95);
  transform: translateY(-1px);
}
.tm-wish-error {
  font-size: 0.7rem; color: rgba(240,80,80,0.85);
  min-height: 1.3em; letter-spacing: 0.05em;
  text-align: center; margin: 0.25rem 0;
  transition: opacity 0.3s;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TAROT — 日間主題覆蓋
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
[data-theme="day"] .tarot-modal {
  background: #fdf6ec;
}

/* 關閉 & HUD 按鈕 */
[data-theme="day"] .tarot-modal .tm-close,
[data-theme="day"] .tarot-modal .tm-hud-btn {
  background: rgba(255, 247, 225, 0.92);
  border-color: rgba(180, 130, 50, 0.38);
  color: rgba(100, 65, 15, 0.72);
}
[data-theme="day"] .tarot-modal .tm-close:hover,
[data-theme="day"] .tarot-modal .tm-hud-btn:hover {
  border-color: rgba(170, 110, 15, 0.85);
  color: #9a6a08;
}

/* 各步驟內文 */
[data-theme="day"] .tarot-modal .tm-step {
  color: rgba(60, 35, 10, 0.85);
}
[data-theme="day"] .tarot-modal .tm-main-desc {
  color: rgba(80, 52, 16, 0.62);
}

/* 主按鈕 */
[data-theme="day"] .tarot-modal .tm-btn {
  background: linear-gradient(135deg, #b07810, #d4a030);
  border-color: rgba(180, 120, 15, 0.55);
  color: rgba(255, 248, 225, 0.96);
}
[data-theme="day"] .tarot-modal .tm-btn:hover {
  box-shadow: 0 0 30px rgba(200, 140, 20, 0.45);
}
/* 次要按鈕 */
[data-theme="day"] .tarot-modal .tm-btn-sec {
  background: rgba(255, 244, 215, 0.75);
  border-color: rgba(180, 130, 45, 0.38);
  color: rgba(110, 72, 12, 0.82);
}
[data-theme="day"] .tarot-modal .tm-btn-sec:hover {
  border-color: rgba(170, 110, 15, 0.72);
  color: #9a6a08;
}

/* Step 2 — 願望之書 */
[data-theme="day"] .tarot-modal .tm-book {
  background: rgba(255, 249, 232, 0.97);
  border-color: rgba(180, 130, 50, 0.24);
  box-shadow: 0 24px 64px rgba(140, 90, 10, 0.1), 0 0 40px rgba(200, 150, 30, 0.06);
}
[data-theme="day"] .tarot-modal .tm-page + .tm-page {
  border-left-color: rgba(180, 130, 50, 0.2);
}
[data-theme="day"] .tarot-modal .tm-page-desc {
  color: rgba(80, 55, 15, 0.58);
}
[data-theme="day"] .tarot-modal .tm-wish-input {
  background: rgba(255, 248, 228, 0.85);
  border-color: rgba(180, 130, 50, 0.3);
  color: rgba(60, 35, 10, 0.88);
}
[data-theme="day"] .tarot-modal .tm-wish-input::placeholder {
  color: rgba(130, 90, 30, 0.42);
}
[data-theme="day"] .tarot-modal .tm-wish-input:focus {
  border-color: rgba(170, 110, 15, 0.68);
}
[data-theme="day"] .tarot-modal .tm-wish-hint {
  color: rgba(120, 85, 25, 0.44);
}
[data-theme="day"] .tm-preset {
  background: rgba(255, 240, 200, 0.7);
  border-color: rgba(180, 130, 50, 0.35);
  color: rgba(100, 65, 12, 0.78);
}
[data-theme="day"] .tm-preset:hover {
  background: rgba(255, 225, 150, 0.75);
  border-color: rgba(170, 110, 20, 0.7);
  color: rgba(90, 58, 8, 0.95);
}

/* Step 3 — 牌堆 & 深呼吸文字 */
[data-theme="day"] .tarot-modal .tm-deck-card {
  background: linear-gradient(145deg, #e8d8a8, #d4c080);
  border-color: rgba(180, 130, 50, 0.5);
}
[data-theme="day"] .tarot-modal .tm-breathe-lines p {
  color: rgba(72, 48, 14, 0.68);
}

/* Step 4 — 抽牌格 */
[data-theme="day"] .tarot-modal .tm-slot-label {
  color: rgba(80, 55, 15, 0.52);
}
[data-theme="day"] .tarot-modal .tm-slot-mini {
  background: rgba(255, 244, 215, 0.85);
  border-color: rgba(180, 130, 50, 0.3);
}
[data-theme="day"] .tarot-modal .tm-slot-mini.filled {
  border-color: rgba(170, 115, 15, 0.7);
  background: rgba(255, 215, 100, 0.28);
}
[data-theme="day"] .tarot-modal .tm-grid-card {
  background: linear-gradient(145deg, #eeddb8, #e2cc96);
  border-color: rgba(180, 130, 50, 0.38);
}
[data-theme="day"] .tarot-modal .tm-grid-card:hover:not(.selected) {
  border-color: rgba(170, 110, 15, 0.75);
  box-shadow: 0 6px 20px rgba(180, 120, 15, 0.22);
}
[data-theme="day"] .tarot-modal .tm-grid-card.selected {
  box-shadow: 0 0 0 2px rgba(170, 110, 15, 0.75), 0 0 18px rgba(200, 140, 25, 0.3);
}

/* 牌背（日間） */
[data-theme="day"] .tarot-modal .tm-card-back {
  background: linear-gradient(150deg, #dfc870, #c8a030, #e8d880);
  border-color: rgba(180, 130, 40, 0.55);
}
[data-theme="day"] .tarot-modal .tm-back-img {
  animation: cardBackGlowDay 3s ease-in-out infinite alternate;
}
@keyframes cardBackGlowDay {
  from { filter: drop-shadow(0 0 4px rgba(200,150,50,0.4)) drop-shadow(0 0 10px rgba(200,140,30,0.2)); }
  to   { filter: drop-shadow(0 0 10px rgba(230,180,60,0.7)) drop-shadow(0 0 22px rgba(200,140,30,0.5)); }
}

/* Step 5 — 三張牌結果 */
[data-theme="day"] .tarot-modal .tm-rc-label {
  color: rgba(80, 55, 15, 0.48);
}
[data-theme="day"] .tarot-modal .tm-rc-body {
  background: linear-gradient(145deg, rgba(255, 248, 226, 0.97), rgba(248, 234, 196, 0.93));
  border-color: rgba(180, 130, 50, 0.35);
}
[data-theme="day"] .tarot-modal .tm-rc-zh  { color: #8a5c0c; }
[data-theme="day"] .tarot-modal .tm-rc-en  { color: rgba(140, 95, 20, 0.58); }
[data-theme="day"] .tarot-modal .tm-rc-pos { color: rgba(80, 55, 15, 0.52); }
[data-theme="day"] .tarot-modal .tm-rc-desc { color: rgba(70, 46, 12, 0.68); }
[data-theme="day"] .tarot-modal .tm-div-notice { color: rgba(80, 55, 15, 0.3); }

/* Step 6 — 完整解讀 */
[data-theme="day"] .tarot-modal .tm-reading-wrap {
  background: rgba(255, 249, 232, 0.97);
  border-color: rgba(180, 130, 50, 0.22);
}
[data-theme="day"] .tarot-modal .tm-reading-body {
  color: rgba(60, 36, 10, 0.8);
}
[data-theme="day"] .tarot-modal .tm-reading-orn { color: rgba(160, 110, 20, 0.4); }

/* Zoom 放大預覽 */
[data-theme="day"] .tarot-modal .tm-zoom-overlay {
  background: rgba(235, 210, 155, 0.88);
}
[data-theme="day"] .tarot-modal .tm-zoom-pos  { color: rgba(80, 55, 15, 0.62); }
[data-theme="day"] .tarot-modal .tm-zoom-hint { color: rgba(100, 70, 18, 0.42); }
[data-theme="day"] .tarot-modal .tm-zoom-img  {
  box-shadow:
    0 0 0 1px rgba(180, 130, 50, 0.38),
    0 0 50px rgba(200, 140, 25, 0.32),
    0 0 110px rgba(180, 115, 15, 0.14);
}

/* 歷史紀錄 */
[data-theme="day"] .tarot-modal .tm-hist-overlay {
  background: rgba(190, 160, 90, 0.55);
}
[data-theme="day"] .tarot-modal .tm-hist-box {
  background: rgba(255, 249, 232, 0.99);
  border-color: rgba(180, 130, 50, 0.32);
}
[data-theme="day"] .tarot-modal .tm-hist-x { color: rgba(120, 80, 18, 0.62); }
[data-theme="day"] .tarot-modal .tm-hist-x:hover { color: #8a5c0c; }
[data-theme="day"] .tarot-modal .tm-hist-item {
  background: rgba(255, 242, 210, 0.68);
  border-color: rgba(180, 130, 50, 0.22);
}
[data-theme="day"] .tarot-modal .tm-hist-wish { color: rgba(80, 55, 15, 0.68); }
[data-theme="day"] .tarot-modal .tm-hist-tag {
  background: rgba(255, 218, 100, 0.32);
  border-color: rgba(180, 130, 50, 0.3);
  color: rgba(100, 65, 10, 0.75);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ARCANA PLAYGROUND — 日間主題覆蓋
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* 命運之書面板 */
[data-theme="day"] .arcana-panel--tarot {
  background: linear-gradient(160deg, rgba(255, 246, 220, 0.85), rgba(248, 234, 195, 0.92));
  border-color: rgba(180, 130, 50, 0.28);
}
[data-theme="day"] .arcana-panel--tarot:hover {
  border-color: rgba(170, 115, 20, 0.55);
  box-shadow: 0 0 28px rgba(200, 140, 20, 0.1);
}

/* 迷你牌疊 — 日間金色 */
[data-theme="day"] .tdp-card {
  background: linear-gradient(150deg, #dfc870, #c8a030, #e8d880);
  border-color: rgba(180, 130, 40, 0.55);
}
[data-theme="day"] .tdp-c1 {
  box-shadow: 0 6px 22px rgba(180, 120, 15, 0.35);
}
[data-theme="day"] .tdp-sym {
  color: rgba(140, 95, 15, 0.5);
}

/* 標籤與副標 */
[data-theme="day"] .tdp-label {
  color: rgba(160, 105, 15, 0.52);
}

/* 開始占卜按鈕 */
[data-theme="day"] .tdp-cta {
  background: linear-gradient(135deg, rgba(180, 115, 15, 0.65), rgba(150, 90, 8, 0.82));
  border-color: rgba(180, 120, 20, 0.42);
  color: rgba(255, 245, 215, 0.88);
}
[data-theme="day"] .tdp-cta:hover {
  border-color: rgba(180, 120, 20, 0.78);
  box-shadow: 0 0 22px rgba(200, 140, 20, 0.25);
  color: rgba(255, 248, 225, 1);
}
