/* ==========================================================================
   問仙壇 · 掌心解碼 - 宇宙奢華金光玻璃擬態樣式庫 (Kaiyun Code Style)
   ========================================================================== */

:root {
  /* Cosmic Dark & Gold Palette */
  --bg-dark: #070614;
  --bg-surface: rgba(18, 14, 38, 0.85);
  --bg-card: rgba(26, 21, 56, 0.75);
  --bg-card-hover: rgba(42, 34, 88, 0.9);
  --bg-card-selected: rgba(245, 158, 11, 0.16);
  
  --border: rgba(255, 255, 255, 0.12);
  --border-gold: #F59E0B;
  --border-gold-glow: rgba(245, 158, 11, 0.45);
  --border-accent: #EC4899;
  
  --gold-primary: #F59E0B;
  --gold-bright: #FDE68A;
  --gold-dark: #B45309;
  --gold-gradient: linear-gradient(135deg, #FFFDF7 0%, #FDE68A 30%, #F59E0B 70%, #B45309 100%);
  --cta-gradient: linear-gradient(90deg, #F59E0B 0%, #EF4444 100%);
  --purple-gradient: linear-gradient(135deg, #9333EA 0%, #4F46E5 100%);
  --emerald-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);
  
  --text-main: #FFFFFF;
  --text-secondary: #E2E8F0;
  --text-muted: #94A3B8;
  --text-gold: #FCD34D;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 0 25px rgba(245, 158, 11, 0.35);
  --shadow-purple: 0 0 25px rgba(147, 51, 234, 0.3);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  /* Fonts */
  --font-serif: "Noto Serif TC", "PMingLiU", "Songti TC", serif;
  --font-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", -apple-system, sans-serif;
  --font-cursive: "Ma Shan Zheng", cursive;
}

/* Light Theme overrides if toggled */
:root[data-theme="light"] {
  --bg-dark: #F3E8D0;
  --bg-surface: rgba(251, 244, 228, 0.95);
  --bg-card: #FFFFFF;
  --bg-card-hover: #FDFBF7;
  --bg-card-selected: rgba(143, 34, 51, 0.08);
  --border: rgba(36, 29, 22, 0.14);
  --border-gold: #A97A22;
  --border-gold-glow: rgba(169, 122, 34, 0.3);
  --text-main: #241D16;
  --text-secondary: #4A3E31;
  --text-muted: #7A6E5D;
  --text-gold: #8F2233;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 50% 5%, rgba(99, 102, 241, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(236, 72, 153, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 15% 50%, rgba(245, 158, 11, 0.12) 0%, transparent 35%);
}

::selection {
  background: var(--gold-primary);
  color: #000;
}

/* 購買前儀式過場 */
.celestial-transition {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: 4.5rem clamp(1rem, 6vw, 5rem) 2rem;
  background:
    radial-gradient(circle at 50% 38%, rgba(242, 196, 94, .28), transparent 23rem),
    radial-gradient(circle at 50% 100%, rgba(71, 30, 85, .52), transparent 42rem),
    #060514;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .8s ease, visibility 0s linear .8s;
}

.celestial-transition::before,
.celestial-transition::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.celestial-transition::before {
  z-index: -2;
  background:
    radial-gradient(circle at 14% 20%, rgba(255, 231, 149, .88) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 12%, rgba(255, 231, 149, .68) 0 1px, transparent 2px),
    radial-gradient(circle at 92% 66%, rgba(255, 231, 149, .75) 0 1px, transparent 2px),
    radial-gradient(circle at 8% 78%, rgba(255, 231, 149, .55) 0 1px, transparent 2px);
  background-size: 210px 170px, 280px 235px, 170px 220px, 320px 280px;
  opacity: .82;
}

.celestial-transition::after {
  z-index: 3;
  background: radial-gradient(ellipse at center, transparent 36%, rgba(2, 2, 12, .68) 100%);
}

.celestial-transition.is-visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: opacity .8s ease, visibility 0s;
}

.celestial-transition.is-leaving {
  opacity: 0;
  pointer-events: none;
  transition: opacity .9s ease;
}

.celestial-transition__mist {
  position: absolute;
  z-index: 1;
  width: 74vw;
  height: 18vw;
  min-height: 90px;
  border-radius: 50%;
  filter: blur(30px);
  background: radial-gradient(ellipse, rgba(228, 218, 255, .31), transparent 68%);
  animation: celestialMist 6s ease-in-out infinite alternate;
}

.celestial-transition__mist--one { bottom: 4%; left: -10%; }
.celestial-transition__mist--two { right: -13%; bottom: 16%; animation-delay: -3s; opacity: .65; }

.celestial-figure {
  position: relative;
  z-index: 2;
  width: min(58vw, 500px);
  min-width: 280px;
  transform: translateY(42px) scale(.88);
  opacity: 0;
  filter: drop-shadow(0 0 28px rgba(247, 201, 93, .25));
}

.celestial-figure svg { display: block; width: 100%; height: auto; }

.celestial-figure__aureole {
  position: absolute;
  top: 4%;
  left: 50%;
  width: 65%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 234, 161, .55);
  border-radius: 50%;
  box-shadow: 0 0 22px 8px rgba(255, 202, 79, .21), inset 0 0 32px rgba(255, 235, 174, .18);
}

.celestial-figure__aureole::before,
.celestial-figure__aureole::after {
  content: '';
  position: absolute;
  inset: 9%;
  border: 1px dashed rgba(255, 228, 140, .45);
  border-radius: inherit;
}

.celestial-figure__aureole::after { inset: 22%; border-style: solid; opacity: .7; }

.celestial-transition.is-visible .celestial-figure { animation: celestialReveal 3.15s cubic-bezier(.16, .82, .28, 1) forwards; }
.celestial-transition.is-visible .celestial-figure__aureole { animation: celestialHalo 6s linear infinite; }
.celestial-transition.is-visible .celestial-figure__crown { transform-origin: 270px 180px; animation: celestialCrown 3.3s ease-out forwards; }
.celestial-transition.is-visible .celestial-figure__clouds { animation: celestialClouds 5s ease-in-out infinite alternate; }

.celestial-couplet {
  position: absolute;
  z-index: 4;
  top: 50%;
  margin: 0;
  padding: .9rem .45rem;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2.35vw, 1.65rem);
  font-weight: 900;
  line-height: 1.55;
  letter-spacing: .16em;
  color: #ffefbb;
  background: linear-gradient(180deg, rgba(116, 19, 32, .94), rgba(64, 8, 20, .9));
  border: 1px solid rgba(252, 210, 114, .8);
  box-shadow: 0 0 24px rgba(247, 181, 57, .28), inset 0 0 12px rgba(255, 226, 151, .2);
  opacity: 0;
}

.celestial-couplet--right { right: clamp(.8rem, 6vw, 6rem); transform: translateY(-43%) translateX(24px); }
.celestial-couplet--left { left: clamp(.8rem, 6vw, 6rem); transform: translateY(-43%) translateX(-24px); }
.celestial-transition.is-visible .celestial-couplet--right { animation: celestialCoupletRight 1s .85s ease-out forwards; }
.celestial-transition.is-visible .celestial-couplet--left { animation: celestialCoupletLeft 1s 1.05s ease-out forwards; }

.celestial-transition__blessing {
  position: absolute;
  z-index: 4;
  bottom: clamp(3.4rem, 9vh, 6rem);
  left: 50%;
  margin: 0;
  width: max-content;
  max-width: calc(100% - 2rem);
  transform: translateX(-50%) translateY(16px);
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3.2vw, 2.2rem);
  font-weight: 900;
  letter-spacing: .15em;
  color: #fff0bd;
  text-shadow: 0 0 16px rgba(247, 194, 67, .8), 0 2px 4px #2b0715;
  opacity: 0;
}

.celestial-transition.is-visible .celestial-transition__blessing { animation: celestialBlessing .9s 2.2s ease-out forwards; }

.celestial-transition__skip {
  position: absolute;
  z-index: 5;
  right: 1rem;
  bottom: 1rem;
  border: 1px solid rgba(255, 240, 187, .48);
  border-radius: var(--radius-pill);
  padding: .38rem .85rem;
  color: rgba(255, 240, 187, .88);
  background: rgba(13, 9, 30, .54);
  font: inherit;
  font-size: .78rem;
  cursor: pointer;
  opacity: 0;
}

.celestial-transition.is-visible .celestial-transition__skip { animation: celestialBlessing .6s 1.3s ease-out forwards; }

@keyframes celestialReveal { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes celestialHalo { to { transform: translateX(-50%) rotate(360deg); } }
@keyframes celestialCrown { 0% { opacity: 0; transform: translateY(-12px); } 45% { opacity: 1; transform: translateY(0); } 100% { opacity: 1; } }
@keyframes celestialClouds { to { transform: translateX(10px); opacity: .9; } }
@keyframes celestialMist { to { transform: translateX(8vw) translateY(-14px) scale(1.08); } }
@keyframes celestialCoupletRight { to { opacity: 1; transform: translateY(-43%) translateX(0); } }
@keyframes celestialCoupletLeft { to { opacity: 1; transform: translateY(-43%) translateX(0); } }
@keyframes celestialBlessing { to { opacity: 1; transform: translateX(-50%) translateY(0); } }

@media (max-width: 620px) {
  .app-hero--editorial {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 26px 20px 20px;
  }

  .app-hero--editorial .hero-main-title {
    font-size: clamp(1.85rem, 8.4vw, 2.4rem);
  }

  .hero-art {
    min-height: 220px;
    border-radius: 120px 120px 24px 24px;
  }

  .hero-description { line-height: 1.75; }

  .celestial-transition { padding-inline: .3rem; }
  .celestial-figure { width: min(86vw, 410px); }
  .celestial-couplet { font-size: .92rem; letter-spacing: .08em; padding: .65rem .28rem; }
  .celestial-couplet--right { right: .45rem; }
  .celestial-couplet--left { left: .45rem; }
  .celestial-transition__blessing { bottom: 4.4rem; font-size: 1.28rem; }
}

@media (prefers-reduced-motion: reduce) {
  .celestial-transition, .celestial-transition.is-leaving { transition-duration: .18s; }
  .celestial-transition.is-visible .celestial-figure,
  .celestial-transition.is-visible .celestial-couplet--right,
  .celestial-transition.is-visible .celestial-couplet--left,
  .celestial-transition.is-visible .celestial-transition__blessing,
  .celestial-transition.is-visible .celestial-transition__skip { animation-duration: .18s; animation-delay: 0s; }
}

/* Ambient Cosmic Glows */
.cosmic-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.glow-1 {
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 450px;
  height: 450px;
  background: rgba(139, 92, 246, 0.22);
}

.glow-2 {
  bottom: 40px;
  right: -60px;
  width: 320px;
  height: 320px;
  background: rgba(245, 158, 11, 0.18);
}

.glow-3 {
  top: 45%;
  left: -80px;
  width: 280px;
  height: 280px;
  background: rgba(236, 72, 153, 0.15);
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 900;
  letter-spacing: 0.03em;
  color: var(--text-main);
}

h1 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.35rem); }

p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.mark { font-family: var(--font-cursive); }

/* App Container */
.app-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
}

.app-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-svg-icon {
  width: clamp(34px, 3.5vw, 42px);
  height: clamp(34px, 3.5vw, 42px);
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.45));
}

.brand-text {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}

.brand-name {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
  white-space: nowrap;
}

/* Live Online Capsule */
.top-live-capsule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  color: var(--text-gold);
  white-space: nowrap;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Nav Tabs */
.app-nav-tabs {
  display: none;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

@media (min-width: 900px) {
  .app-nav-tabs {
    display: flex;
  }
}

.app-tab-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: clamp(0.78rem, 1.1vw, 0.88rem);
  padding: 6px clamp(10px, 1.2vw, 14px);
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.app-tab-btn:hover {
  color: var(--text-main);
}

.app-tab-btn.active {
  background: var(--bg-card);
  color: var(--gold-bright);
  border: 1px solid var(--border-gold-glow);
  box-shadow: var(--shadow-sm);
}

/* User Top Bar Capsule (Logged-in Avatar + Name + Points vs Login button) */
.user-topbar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.14);
  border: 1.5px solid var(--border-gold);
  color: var(--gold-bright);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: clamp(0.78rem, 1.1vw, 0.84rem);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.user-topbar-btn:hover {
  background: rgba(245, 158, 11, 0.25);
  box-shadow: var(--shadow-gold);
}

.user-avatar-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
}

/* Buttons */
.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--cta-gradient);
  color: #FFFFFF;
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.6);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--gold-primary);
  color: var(--gold-bright);
  background: rgba(245, 158, 11, 0.08);
}

.btn-gold {
  background: var(--gold-gradient);
  color: #1A1310;
  font-weight: 800;
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn-sm { padding: 6px 12px; font-size: 0.82rem; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }

/* Hero Banner */
.app-hero {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 44px) clamp(18px, 4vw, 36px);
  margin: 16px clamp(12px, 3vw, 24px) 0;
  box-shadow: var(--shadow-md);
  text-align: center;
  overflow: hidden;
}

.app-hero--editorial {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(260px, .88fr);
  align-items: stretch;
  gap: clamp(20px, 4vw, 56px);
  min-height: 360px;
  padding: clamp(28px, 5vw, 64px);
  isolation: isolate;
  text-align: left;
  background:
    linear-gradient(118deg, rgba(10, 9, 19, .98) 0%, rgba(18, 15, 34, .94) 56%, rgba(52, 26, 42, .72) 100%),
    radial-gradient(circle at 80% 20%, rgba(183, 129, 49, .18), transparent 32%),
    var(--bg-card);
}

.app-hero--editorial::before {
  z-index: -1;
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(247, 201, 93, .08) 48.1% 48.25%, transparent 48.35%),
    radial-gradient(circle at 10% 16%, rgba(247, 201, 93, .18), transparent 20%),
    radial-gradient(circle at 88% 76%, rgba(117, 48, 68, .34), transparent 34%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 620px;
}

.hero-kicker {
  margin: 0 0 10px;
  color: rgba(253, 230, 138, .7);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .18em;
}

.app-hero--editorial .hero-main-title {
  max-width: 610px;
  font-size: clamp(2.05rem, 4vw, 3.65rem);
  line-height: 1.23;
  letter-spacing: .025em;
  margin: 0;
}

.hero-description {
  max-width: 570px;
  margin-top: 18px;
  color: rgba(235, 234, 243, .84);
  font-size: clamp(.93rem, 1.4vw, 1.04rem);
  line-height: 1.9;
}

.hero-assurance-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hero-assurance-list span {
  border: 1px solid rgba(253, 230, 138, .26);
  border-radius: 999px;
  padding: 5px 10px;
  color: rgba(253, 230, 138, .88);
  font-size: .73rem;
  font-weight: 700;
}

.hero-art {
  position: relative;
  min-height: 290px;
  overflow: hidden;
  border: 1px solid rgba(253, 230, 138, .28);
  border-radius: 160px 160px 30px 30px;
  background:
    linear-gradient(180deg, rgba(10, 8, 18, .12), rgba(10, 8, 18, .88)),
    url('../../assets/generated/hero-wenxian-v1.png') center / cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04), 0 22px 48px rgba(0, 0, 0, .36);
}

.hero-art::before,
.hero-art::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(253, 230, 138, .38);
  border-radius: 50%;
  pointer-events: none;
}

.hero-art::before { inset: 12%; }
.hero-art::after { inset: 23%; border-style: dashed; animation: slow-orbit 28s linear infinite; }

.hero-art__seal {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
  width: 54px;
  height: 74px;
  border: 1px solid rgba(253, 230, 138, .66);
  color: rgba(255, 237, 180, .9);
  background: rgba(86, 24, 34, .58);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .32);
  font-family: var(--font-serif);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .16em;
  text-align: center;
}

@keyframes slow-orbit { to { transform: rotate(360deg); } }

.app-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.22) 0%, transparent 60%);
  pointer-events: none;
}

.hero-slogan-capsule {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--gold-bright);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-main-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

/* Workspace */
.app-workspace {
  flex: 1;
  padding: 20px clamp(12px, 3vw, 24px) 100px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.app-view {
  display: none;
  animation: fadeIn 0.25s ease forwards;
}

.app-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Themes Matrix Cards */
.themes-matrix-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin-top: 20px;
}

.theme-hub-card {
  position: relative;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.theme-card-art {
  position: relative;
  height: 108px;
  margin: 0 -20px 4px;
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 24px 24px;
  background-image:
    linear-gradient(180deg, rgba(7, 8, 18, .04), rgba(7, 8, 18, .35)),
    url('../../assets/generated/theme-atlas-wenxian-v1.png');
  background-size: 100% 100%, 300% 200%;
  background-position: center, 0% 0%;
}

.theme-card-art::before,
.theme-card-art::after {
  display: none;
}

.theme-hub-card[data-theme='love'] .theme-card-art { background-position: center, 0% 0%; }
.theme-hub-card[data-theme='work'] .theme-card-art { background-position: center, 50% 0%; }
.theme-hub-card[data-theme='career'] .theme-card-art { background-position: center, 100% 0%; }
.theme-hub-card[data-theme='wealth'] .theme-card-art { background-position: center, 0% 100%; }
.theme-hub-card[data-theme='family'] .theme-card-art { background-position: center, 50% 100%; }
.theme-hub-card[data-theme='children'] .theme-card-art { background-position: center, 100% 100%; }

.theme-hub-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-gold);
  background: var(--bg-card-hover);
}

.theme-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.theme-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-bright);
}

.theme-icon-box svg {
  width: 24px;
  height: 24px;
}

.theme-quota-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 800;
}

.theme-quota-pill.has-points {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border: 1px solid #10B981;
}

.theme-quota-pill.zero-points {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.theme-hub-card h3 {
  font-size: 1.15rem;
  margin: 0;
}

.theme-hub-card .theme-tag {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-gold);
}

.theme-hub-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.theme-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* ============ Member Dashboard & Wallet Center (會員中心與獨立點數資產) ============ */
.member-dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.member-profile-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 32px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow-gold);
  position: relative;
  overflow: hidden;
}

.member-profile-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.member-avatar-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.member-large-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #1A1310;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 900;
  box-shadow: var(--shadow-gold);
  border: 2px solid #FFF;
}

.member-info-col h3 {
  font-size: 1.35rem;
  color: #FFF;
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-tier-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid var(--border-gold);
  color: var(--gold-bright);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.member-email-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.member-points-summary-box {
  display: flex;
  align-items: baseline;
  gap: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: var(--radius-md);
}

.member-total-points-num {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--gold-bright);
}

/* Individual Per-Theme Quota Assets Matrix */
.member-themes-quota-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.theme-quota-assets-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.theme-quota-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.18s ease;
}

.theme-quota-card:hover {
  border-color: var(--border-gold);
  background: var(--bg-card-hover);
}

.theme-quota-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.theme-quota-card-balance {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--gold-bright);
}

.theme-quota-card-balance.zero {
  color: #F87171;
}

/* Pricing Section Container */
.pricing-section-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 20px;
}

.pricing-cards-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

@media (min-width: 800px) {
  .pricing-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.plan-card {
  position: relative;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.plan-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-gold);
}

.plan-card.active {
  border-color: var(--gold-primary);
  background: var(--bg-card-selected);
  box-shadow: 0 0 0 2px var(--gold-primary) inset, var(--shadow-gold);
}

.plan-ribbon {
  position: absolute;
  top: -1px;
  right: 18px;
  background: var(--cta-gradient);
  color: #FFF;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.plan-title {
  font-size: 1.15rem;
  font-weight: 800;
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.plan-price {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 2.2rem;
  color: var(--gold-bright);
}

.plan-price sup {
  font-size: 1rem;
  color: var(--text-muted);
}

.plan-old-price {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.plan-desc-note {
  font-size: 0.82rem;
  color: var(--text-gold);
  background: rgba(245, 158, 11, 0.1);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-gold);
}

.plan-bullets {
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex: 1;
}

.plan-bullets li {
  display: flex;
  gap: 8px;
}

.plan-bullets li::before {
  content: "✦";
  color: var(--gold-primary);
}

.plan-theme-picker-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 10px;
}

.plan-theme-picker-box h4 {
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--gold-bright);
}

.theme-checkbox-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}

.theme-check-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  cursor: pointer;
}

.theme-check-pill.checked {
  border-color: var(--gold-primary);
  background: rgba(245, 158, 11, 0.2);
  color: var(--gold-bright);
  font-weight: 700;
}

/* Guided Wizard Styles */
.reading-modal-card {
  background: #0F0B1E;
  color: #FFF;
  border: 1.5px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 32px);
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 0 50px rgba(245, 158, 11, 0.35);
  position: relative;
}

.wizard-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.wizard-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.wizard-stepper-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-gold);
  font-weight: 800;
  margin-bottom: 6px;
}

.wizard-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.wizard-progress-bar {
  height: 100%;
  background: var(--cta-gradient);
  transition: width 0.3s ease;
}

.wizard-step-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
  animation: fadeIn 0.25s ease;
}

.wizard-question-title {
  font-size: 1.15rem;
  color: #FFFFFF;
  font-family: var(--font-serif);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wizard-question-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.wizard-options-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

@media (min-width: 500px) {
  .wizard-options-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.wizard-option-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.18s ease;
}

.wizard-option-card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--gold-primary);
  transform: translateY(-2px);
}

.wizard-option-card.selected {
  background: rgba(245, 158, 11, 0.18);
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 1px var(--gold-primary) inset, var(--shadow-gold);
  color: var(--gold-bright);
}

.wizard-option-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wizard-option-icon {
  font-size: 1.3rem;
}

.wizard-option-text {
  font-size: 0.95rem;
  font-weight: 700;
}

.wizard-option-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.wizard-option-check {
  font-size: 1rem;
  color: var(--gold-primary);
  opacity: 0;
}

.wizard-option-card.selected .wizard-option-check {
  opacity: 1;
}

.wizard-option-card.has-custom-input {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.wizard-option-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.wizard-custom-input-box {
  width: 100%;
  margin-top: 4px;
}

.wizard-custom-text-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.wizard-custom-text-input:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
  background: rgba(0, 0, 0, 0.65);
}

.wizard-custom-text-input::placeholder {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.8rem;
}

.prompt-tags-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.prompt-tag-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.prompt-tag-btn:hover {
  border-color: var(--gold-primary);
  color: var(--gold-bright);
  background: rgba(245, 158, 11, 0.12);
}

.wizard-upload-box {
  border: 2px dashed rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  background: rgba(245, 158, 11, 0.05);
  cursor: pointer;
  transition: all 0.18s ease;
  display: block;
}

.wizard-upload-preview {
  max-width: 140px;
  max-height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--gold-primary);
  margin: 10px auto 0;
  display: block;
}

.wizard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 20px;
}

/* Auth Modal Styles (登入/註冊彈窗) */
.auth-tabs-row {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.auth-tab-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 8px 16px;
  cursor: pointer;
  position: relative;
}

.auth-tab-btn.active {
  color: var(--gold-bright);
}

.auth-tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold-primary);
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.auth-form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.auth-form-input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: #FFF;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}

.auth-form-input:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 1px var(--gold-primary);
}

.decoding-stage {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.decoding-spinner-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(245, 158, 11, 0.2);
  border-top-color: var(--gold-primary);
  border-right-color: #EC4899;
  animation: spin-ring 1s linear infinite;
}

@keyframes spin-ring {
  to { transform: rotate(360deg); }
}

.decoding-progress-bar {
  width: 100%;
  max-width: 360px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.decoding-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--cta-gradient);
  transition: width 0.3s ease;
}

/* Full Decoded Reading Report */
.report-content-box {
  display: grid;
  gap: 20px;
  animation: fadeIn 0.4s ease;
}

.report-header-badge {
  text-align: center;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 16px;
}

.report-portrait-container {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 520px) {
  .report-portrait-container {
    grid-template-columns: 160px 1fr;
  }
}

.report-portrait-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 2px solid var(--gold-primary);
  box-shadow: var(--shadow-gold);
}

.report-dimension-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.report-dim-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

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

.report-dim-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gold-bright);
}

.report-advice-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 0.92rem;
  line-height: 1.7;
}

/* Real Manifestation Stories Section */
.report-manifestation-section {
  margin-top: 10px;
  border-top: 1px solid rgba(245, 158, 11, 0.35);
  padding-top: 18px;
  display: grid;
  gap: 14px;
}

.manifestation-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.manifestation-tag {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 800;
  color: #FCD34D;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid var(--border-gold);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.manifestation-header h4 {
  font-size: 1.05rem;
  color: var(--text-gold);
  margin-top: 4px;
}

.manifestation-cards-list {
  display: grid;
  gap: 12px;
}

.manifestation-story-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid var(--gold-primary);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.15s ease;
}

.manifestation-story-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--gold-primary);
}

.story-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.story-card-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: #FFFFFF;
}

.story-card-user {
  font-size: 0.78rem;
  color: var(--text-gold);
  font-weight: 700;
}

.story-card-summary {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.story-card-result-badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.76rem;
  font-weight: 800;
  color: #34D399;
  background: rgba(16, 185, 129, 0.15);
  padding: 3px 8px;
  border-radius: 4px;
}

.story-full-details {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.story-full-details summary {
  cursor: pointer;
  color: var(--gold-bright);
  font-weight: 700;
}

.story-full-details p {
  margin-top: 8px;
  white-space: pre-line;
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* Mobile Bottom Dock */
.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(11, 9, 29, 0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
}

@media (min-width: 860px) {
  .app-bottom-nav {
    display: none;
  }
}

.app-bottom-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 0;
  cursor: pointer;
}

.app-bottom-tab svg {
  width: 20px;
  height: 20px;
}

.app-bottom-tab.active {
  color: var(--gold-bright);
}

.app-bottom-tab.active svg {
  transform: scale(1.1);
  color: var(--gold-bright);
}

/* Modal Backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(7, 6, 20, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.app-textarea {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: #FFF;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  width: 100%;
}

@media (max-width: 620px) {
  .app-hero--editorial {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 26px 20px 20px;
  }

  .app-hero--editorial .hero-main-title {
    font-size: clamp(1.85rem, 8.4vw, 2.4rem);
  }

  .hero-art {
    min-height: 220px;
    border-radius: 120px 120px 24px 24px;
  }

  .hero-description { line-height: 1.75; }
}

/* ==========================================================================
   Palm Camera Dialog & Hand Recognition Contour Styles
   ========================================================================== */
.camera-dialog {
  width: min(680px, calc(100% - 28px));
  margin: auto;
  padding: 0;
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  border-radius: var(--radius-lg);
  color: var(--text-main);
  background: #0C0818;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.75), 0 0 40px rgba(245, 158, 11, 0.25);
  overflow: hidden;
}

.camera-dialog::backdrop {
  background: rgba(4, 4, 16, 0.85);
  backdrop-filter: blur(8px);
}

.camera-dialog-inner {
  padding: clamp(16px, 3vw, 24px);
  background: radial-gradient(circle at 50% 8%, rgba(139, 92, 246, 0.2), transparent 45%), #0C0818;
}

.camera-dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.camera-dialog-heading h2 {
  margin: 0;
  color: #FFF;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 800;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.camera-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #FFF;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  border-radius: 10px;
  transition: all 0.18s ease;
}

.camera-close:hover {
  color: var(--gold-bright);
  border-color: var(--border-gold);
  background: rgba(245, 158, 11, 0.18);
}

.camera-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  background: #060412;
  border-radius: 16px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
}

.camera-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-guides {
  position: absolute;
  inset: 4%;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.palm-guide {
  position: absolute;
  top: 2%;
  left: 50%;
  width: auto;
  height: 96%;
  overflow: visible;
  filter: drop-shadow(0 0 14px rgba(7, 6, 20, 0.7));
  transform: translateX(-50%);
  transition: transform 0.25s ease;
}

.camera-guides.is-mirrored .palm-guide {
  transform: translateX(-50%) scaleX(-1);
}

.palm-guide-outline {
  fill: rgba(168, 85, 247, 0.08);
  stroke: rgba(252, 211, 77, 0.9);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill 0.25s ease, stroke 0.25s ease, filter 0.25s ease;
}

.camera-guides.is-positioned .palm-guide-outline {
  fill: rgba(245, 158, 11, 0.18);
  stroke: #F59E0B;
  filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.85));
}

.camera-guides.is-ready .palm-guide-outline {
  fill: rgba(16, 185, 129, 0.25);
  stroke: #10B981;
  filter: drop-shadow(0 0 24px rgba(16, 185, 129, 0.95));
}

.camera-guide-label {
  position: absolute;
  bottom: 5%;
  max-width: calc(100% - 24px);
  padding: 8px 16px;
  color: #FFF;
  border: 1px solid rgba(245, 158, 11, 0.5);
  background: rgba(7, 6, 20, 0.78);
  backdrop-filter: blur(8px);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-align: center;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.camera-focus-countdown {
  position: absolute;
  top: 42%;
  left: 50%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  color: #FFF;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.88), 0 0 24px rgba(245, 158, 11, 0.6);
}

.camera-focus-countdown[hidden] {
  display: none !important;
}

.camera-focus-countdown strong {
  font-size: clamp(64px, 20vw, 100px);
  font-weight: 900;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.camera-focus-countdown small {
  color: #FDE68A;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.camera-error {
  min-height: 22px;
  margin: 12px 0 16px;
  color: #FCD34D;
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: center;
}

.camera-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.camera-actions .primary-button,
.camera-actions .secondary-button {
  min-height: 42px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 800;
  font-size: 0.92rem;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.camera-actions .primary-button {
  border: none;
  color: #FFF;
  background: var(--cta-gradient);
  box-shadow: var(--shadow-gold);
}

.camera-actions .primary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.6);
}

.camera-actions .secondary-button {
  border: 1px solid var(--border);
  color: #FFF;
  background: rgba(255, 255, 255, 0.08);
}

.camera-actions .secondary-button:hover {
  border-color: var(--border-gold);
  color: var(--gold-bright);
}

