:root {
  /* —— Midnight / black (base) —— */
  --bg: #0b1026;
  --bg-deep: #0b1026;
  --bg-ink: #141b33;
  --bg-elevated: #1c2545;

  /* —— Gold (primary brand / CTA) —— */
  --gold: #e8c547;
  --gold-soft: #f0d878;
  --gold-deep: #c9a227;

  /* —— Silver (secondary chrome) —— */
  --silver: #c8cdd6;
  --silver-soft: #e8eaef;
  --silver-deep: #8b929e;
  --line-silver: rgba(200, 205, 214, 0.28);

  /* —— Aged wood / teak (warm sections) —— */
  --wood: #3d2918;
  --wood-mid: #2a1c12;
  --wood-deep: #1a120c;
  --wood-highlight: #6b4a2e;
  --wood-glow: rgba(107, 74, 46, 0.35);

  /* —— Marble (premium panels) —— */
  --marble: #f2efe8;
  --marble-soft: #faf8f4;
  --marble-vein: #9a958c;
  --marble-ink: #1a1814;
  --marble-muted: #5c574e;

  /* —— Text & status —— */
  --text: #f3ede0;
  --text-muted: #b8b0a0;
  --alert: #e85d75;
  --good: #5ecf9b;
  --neutral: #d4c48a;
  --caution: #e85d75;
  --line: rgba(232, 197, 71, 0.18);
  --radius: 18px;
  --font-display: "Chakra Petch", "Sarabun", sans-serif;
  --font-body: "Sarabun", "Chakra Petch", sans-serif;
  --shadow-glow: 0 0 40px rgba(232, 197, 71, 0.12);
  --shadow-silver: 0 0 28px rgba(200, 205, 214, 0.14);

  /* Texture stacks (reuse in utilities + modules) */
  --texture-wood:
    repeating-linear-gradient(
      92deg,
      transparent 0 2px,
      rgba(26, 18, 12, 0.22) 2px 3px,
      transparent 3px 7px
    ),
    repeating-linear-gradient(
      88deg,
      transparent 0 11px,
      rgba(107, 74, 46, 0.12) 11px 12px
    ),
    linear-gradient(165deg, #3d2918 0%, #2a1c12 42%, #1a120c 100%);

  --texture-marble:
    radial-gradient(ellipse 80% 35% at 18% 22%, rgba(154, 149, 140, 0.28), transparent 55%),
    radial-gradient(ellipse 55% 40% at 78% 68%, rgba(154, 149, 140, 0.2), transparent 50%),
    linear-gradient(118deg, transparent 40%, rgba(154, 149, 140, 0.18) 46%, transparent 52%),
    linear-gradient(162deg, transparent 58%, rgba(140, 136, 128, 0.14) 62%, transparent 68%),
    linear-gradient(165deg, #faf8f4 0%, #f2efe8 48%, #e8e4dc 100%);

  --texture-silver:
    linear-gradient(135deg, #e8eaef 0%, #c8cdd6 45%, #8b929e 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 60% at 10% -10%, rgba(232, 197, 71, 0.14), transparent 55%),
    radial-gradient(ellipse 55% 45% at 88% 8%, rgba(107, 74, 46, 0.22), transparent 52%),
    radial-gradient(ellipse 70% 50% at 90% 0%, rgba(88, 120, 220, 0.14), transparent 50%),
    radial-gradient(ellipse 80% 40% at 50% 100%, rgba(200, 205, 214, 0.06), transparent 55%),
    linear-gradient(180deg, #0b1026 0%, #10182f 45%, #0b1026 100%);
  background-attachment: fixed;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image:
    linear-gradient(rgba(243, 237, 224, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 237, 224, 0.5) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  z-index: 0;
}

a {
  color: var(--gold-soft);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select {
  font: inherit;
}

.page-wrap {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold);
  margin: 0 0 0.5rem;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.75rem 1.35rem;
  min-height: 44px;
  min-width: 44px;
  width: auto;
  height: auto;
  overflow: visible;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.25;
  text-indent: 0;
  white-space: normal;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

/* .btn { display } must not defeat HTML hidden — UA [hidden] alone is not enough */
.btn[hidden],
#btn-line[hidden] {
  display: none !important;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-soft) 0%, var(--gold) 40%, var(--gold-deep) 100%);
  color: #1a1404;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  box-shadow: 0 0 48px rgba(232, 197, 71, 0.28);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-silver);
  color: var(--silver-soft);
}

.btn-ghost:hover {
  border-color: var(--silver);
  color: var(--text);
  box-shadow: var(--shadow-silver);
  text-decoration: none;
}

/* Midnight panel (default) */
.surface {
  background: linear-gradient(160deg, rgba(28, 37, 69, 0.92), rgba(20, 27, 51, 0.88));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

/* Warm aged-wood panel — dashboard / travel / login warmth */
.surface-wood {
  background: var(--texture-wood);
  border: 1px solid rgba(107, 74, 46, 0.45);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow:
    inset 0 1px 0 rgba(240, 216, 120, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.28);
  color: var(--text);
}

.surface-wood p,
.surface-wood .muted {
  color: rgba(243, 237, 224, 0.78);
}

/* Premium marble panel — pricing / subscribe */
.surface-marble {
  background: var(--texture-marble);
  border: 1px solid rgba(154, 149, 140, 0.45);
  border-radius: var(--radius);
  padding: 1.25rem;
  color: var(--marble-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 14px 32px rgba(0, 0, 0, 0.22);
}

.surface-marble h1,
.surface-marble h2,
.surface-marble h3,
.surface-marble strong {
  color: var(--marble-ink);
}

.surface-marble p,
.surface-marble .muted,
.surface-marble small {
  color: var(--marble-muted);
}

.surface-marble .btn-ghost {
  background: #1a1814;
  border-color: #1a1814;
  color: #f7f1e6;
}

.surface-marble .btn-ghost:hover {
  background: #2c2418;
  border-color: var(--gold-deep);
  color: #fff8e8;
  box-shadow: none;
}

/* Silver chrome accent strip / badge helper */
.chrome-silver {
  border-color: var(--line-silver);
  box-shadow: inset 0 1px 0 rgba(232, 234, 239, 0.18), var(--shadow-silver);
}

.muted {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes soft-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(232, 197, 71, 0.35);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(232, 197, 71, 0);
  }
}

@keyframes draw-in {
  from {
    opacity: 0;
    stroke-dashoffset: 240;
  }
  to {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

.anim-fade-up {
  animation: fade-up 0.7s ease both;
}

.anim-fade-up-delay {
  animation: fade-up 0.7s ease 0.12s both;
}

.anim-pulse {
  animation: soft-pulse 2.4s ease-in-out infinite;
}

/* Watch / tiny glance */
@media (max-width: 280px) {
  .page-wrap {
    width: calc(100% - 0.5rem);
  }

  .app-nav,
  .hide-on-glance {
    display: none !important;
  }

  .glance-only {
    display: block !important;
  }
}

.glance-only {
  display: none;
}

/* AR glance stretch stub — keep overlays dense & high-contrast */
@media (display-mode: fullscreen) {
  .ar-glance {
    backdrop-filter: blur(8px);
  }
}
