/* Wealth Mandala — Design Tokens & Base */
:root {
  --ink: #0A0F1E;
  --ink-deep: #050812;
  --ink-soft: #131A2E;
  --ink-card: rgba(15, 22, 42, 0.55);
  --gold: #C9A84C;
  --gold-bright: #E8C76A;
  --gold-deep: #8B7330;
  --emerald: #10B981;
  --emerald-soft: rgba(16, 185, 129, 0.4);
  --cream: #F5F1E8;
  --cream-mute: rgba(245, 241, 232, 0.62);
  --cream-faint: rgba(245, 241, 232, 0.32);
  --hairline: rgba(201, 168, 76, 0.18);
  --hairline-strong: rgba(201, 168, 76, 0.42);

  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Sacred geometry background pattern */
.bg-flower {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(201, 168, 76, 0.08), transparent 50%),
    radial-gradient(circle at 80% 90%, rgba(16, 185, 129, 0.05), transparent 50%);
  z-index: 0;
}
.bg-flower::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'><g fill='none' stroke='%23C9A84C' stroke-width='0.5' opacity='0.18'><circle cx='200' cy='200' r='40'/><circle cx='200' cy='160' r='40'/><circle cx='200' cy='240' r='40'/><circle cx='234.6' cy='180' r='40'/><circle cx='234.6' cy='220' r='40'/><circle cx='165.4' cy='180' r='40'/><circle cx='165.4' cy='220' r='40'/></g></svg>");
  background-size: 400px 400px;
  opacity: 0.5;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(201, 168, 76, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201, 168, 76, 0.35); }

/* ====================== HEADER ====================== */
.wm-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px;
  border-bottom: 1px solid var(--hairline);
}
.wm-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}
.wm-logo-mark {
  width: 36px; height: 36px;
  flex-shrink: 0;
}
.wm-logo-text {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--cream);
  white-space: nowrap;
}
.wm-logo-text em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}

.wm-header-right {
  display: flex;
  align-items: center;
  gap: 22px;
}
.wm-streak {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(201, 168, 76, 0.06);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.wm-streak-flame {
  width: 14px; height: 14px;
  display: inline-block;
}
.wm-nav {
  display: flex;
  gap: 28px;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--cream-mute);
}
.wm-nav a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
}
.wm-nav a:hover { color: var(--gold-bright); }
.wm-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-deep), var(--gold-bright));
  border: 1px solid var(--hairline-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}

/* Premium banner */
.wm-banner {
  position: relative;
  z-index: 9;
  background: linear-gradient(90deg, rgba(201, 168, 76, 0.08), rgba(16, 185, 129, 0.05), rgba(201, 168, 76, 0.08));
  border-bottom: 1px solid var(--hairline);
  padding: 10px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--cream-mute);
}
.wm-banner strong {
  color: var(--gold-bright);
  font-weight: 500;
  letter-spacing: 0.06em;
}
.wm-banner a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline-strong);
  padding-bottom: 1px;
  cursor: pointer;
}
.wm-banner-close {
  position: absolute;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--cream-faint);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px;
}

/* ====================== MAIN STAGE ====================== */
.wm-stage {
  position: relative;
  z-index: 5;
  min-height: calc(100vh - 130px);
  padding: 40px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.wm-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.wm-eyebrow::before, .wm-eyebrow::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--hairline-strong);
}
.wm-headline {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 400;
  line-height: 1.05;
  text-align: center;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
  color: var(--cream);
  text-wrap: balance;
}
.wm-headline em {
  font-style: italic;
  color: var(--gold-bright);
  font-weight: 400;
}
.wm-mantra {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cream-faint);
  margin-bottom: 4px;
  text-align: center;
}
.wm-mantra span {
  display: inline-block;
  padding: 0 4px;
}
.wm-mantra span + span::before {
  content: '·';
  margin-right: 8px;
  color: var(--gold);
}

/* ====================== MANDALA WORKSPACE ====================== */
.wm-workspace {
  position: relative;
  width: 100%;
  max-width: 1240px;
  display: grid;
  grid-template-columns: 1fr minmax(560px, 720px) 1fr;
  gap: 32px;
  align-items: center;
  margin-top: 24px;
}

/* Slice cards (side rail on desktop) */
.wm-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wm-slice {
  position: relative;
  padding: 18px 20px;
  background: var(--ink-card);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.4s ease, transform 0.4s ease, background 0.4s ease;
  cursor: pointer;
}
.wm-slice:hover {
  border-color: var(--hairline-strong);
  background: rgba(201, 168, 76, 0.05);
}
.wm-slice.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 8px 32px rgba(201, 168, 76, 0.12);
}
.wm-slice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.wm-slice-icon {
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}
.wm-slice-num {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--cream-faint);
}
.wm-slice-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 4px 0 10px;
  color: var(--cream);
}
.wm-slice-title em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
  font-size: 14px;
  margin-left: 8px;
  letter-spacing: 0.04em;
}

/* Custom select */
.wm-select {
  position: relative;
  width: 100%;
}
.wm-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(5, 8, 18, 0.6);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 11px 14px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--cream);
  cursor: pointer;
  text-align: left;
  letter-spacing: 0.01em;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.wm-select-trigger:hover {
  border-color: var(--hairline-strong);
  background: rgba(201, 168, 76, 0.04);
}
.wm-select-trigger .chev {
  width: 12px; height: 12px;
  color: var(--gold);
  transition: transform 0.3s ease;
}
.wm-select.open .wm-select-trigger .chev { transform: rotate(180deg); }

.wm-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: rgba(5, 8, 18, 0.96);
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  backdrop-filter: blur(20px);
  padding: 6px;
  z-index: 50;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}
.wm-select-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--cream);
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
  position: relative;
}
.wm-select-option:hover {
  background: rgba(201, 168, 76, 0.08);
  color: var(--gold-bright);
}
.wm-select-option.selected {
  background: rgba(201, 168, 76, 0.06);
  color: var(--gold-bright);
}
.wm-select-option.locked {
  color: var(--cream-faint);
}
.wm-select-option .opt-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--cream-faint);
  text-transform: uppercase;
}
.wm-select-option .opt-lock {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  color: var(--gold);
  opacity: 0.6;
}
.wm-slice-hint {
  font-size: 11px;
  color: var(--cream-faint);
  margin-top: 8px;
  letter-spacing: 0.02em;
  font-style: italic;
}

/* Select divider + premium teaser */
.wm-select-divider {
  height: 1px;
  background: var(--hairline);
  margin: 6px 8px;
}
.wm-select-teaser {
  margin-top: 4px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: linear-gradient(90deg, rgba(201, 168, 76, 0.08), rgba(201, 168, 76, 0.04));
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--gold-bright);
  cursor: pointer;
  text-align: left;
  letter-spacing: 0.01em;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.wm-select-teaser:hover {
  background: rgba(201, 168, 76, 0.14);
  border-color: var(--gold);
}
.wm-select-teaser .arrow {
  margin-left: auto;
  color: var(--gold);
  font-size: 14px;
}

/* ====================== MANDALA CENTER ====================== */
.wm-center {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wm-mandala-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wm-mandala {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: wm-breathe 6s ease-in-out infinite;
}
@keyframes wm-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.wm-mandala-rotate {
  animation: wm-rotate 240s linear infinite;
  transform-origin: center;
}
@keyframes wm-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Center plate with BEGIN button */
.wm-core {
  position: relative;
  z-index: 4;
  width: 38%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(201, 168, 76, 0.18), transparent 70%),
    radial-gradient(circle at 50% 50%, var(--ink-soft), var(--ink-deep) 80%);
  border: 1px solid var(--hairline-strong);
  box-shadow:
    inset 0 0 32px rgba(201, 168, 76, 0.12),
    0 0 64px rgba(201, 168, 76, 0.18),
    0 0 0 6px rgba(5, 8, 18, 0.8);
}

.wm-reps {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 400;
  color: var(--gold-bright);
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 0 24px rgba(201, 168, 76, 0.4);
}
.wm-reps-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--cream-faint);
  margin-top: 4px;
  margin-bottom: 14px;
}
.wm-reps-toggle {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: rgba(5, 8, 18, 0.6);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  margin-bottom: 18px;
}
.wm-reps-toggle button {
  background: transparent;
  border: none;
  padding: 5px 11px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--cream-faint);
  cursor: pointer;
  border-radius: 999px;
  transition: all 0.3s ease;
}
.wm-reps-toggle button.on {
  background: var(--gold);
  color: var(--ink);
}

.wm-begin {
  position: relative;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: var(--ink);
  border: none;
  padding: 14px 36px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.32em;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow:
    0 0 0 1px var(--gold-bright),
    0 0 32px rgba(232, 199, 106, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.wm-begin:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px var(--gold-bright),
    0 0 48px rgba(232, 199, 106, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.wm-time {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cream-mute);
  margin-top: 12px;
}

/* Below-mandala actions */
.wm-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
}
.wm-save {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid var(--hairline-strong);
  color: var(--cream);
  padding: 11px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-weight: 500;
}
.wm-save:hover {
  background: rgba(201, 168, 76, 0.06);
  border-color: var(--gold);
}
.wm-save .lock { color: var(--gold); width: 12px; height: 12px; }
.wm-save-hint {
  font-size: 11px;
  color: var(--cream-faint);
  font-style: italic;
}
.wm-save-hint a { color: var(--gold); text-decoration: none; cursor: pointer; }

/* ====================== PRACTICE OVERLAY ====================== */
.wm-practice {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--ink-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.wm-practice-bg {
  position: absolute;
  inset: -10%;
  background-size: cover;
  background-position: center;
  filter: brightness(0.35) saturate(1.1);
  animation: wm-kenburns 30s ease-in-out infinite alternate;
}
@keyframes wm-kenburns {
  0% { transform: scale(1.0) translate(0, 0); }
  100% { transform: scale(1.15) translate(-2%, 1%); }
}
.wm-practice-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 30%, rgba(5, 8, 18, 0.85) 80%);
  pointer-events: none;
}
.wm-practice-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px;
}
.wm-practice-mandala {
  width: 380px;
  height: 380px;
  position: relative;
  margin-bottom: 36px;
}
.wm-practice-mandala svg {
  width: 100%; height: 100%;
}
.wm-practice-mandala .center-orb {
  position: absolute;
  inset: 38%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--gold-bright), var(--gold) 50%, var(--gold-deep) 80%);
  box-shadow: 0 0 64px rgba(232, 199, 106, 0.6);
  animation: wm-pulse 1s ease-in-out infinite;
}
@keyframes wm-pulse {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.08); opacity: 1; }
}
.wm-mantra-text {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
  font-style: italic;
  color: var(--cream);
  line-height: 1.3;
  letter-spacing: 0.01em;
  max-width: 720px;
  text-wrap: balance;
  animation: wm-mantra-pulse 4s ease-in-out infinite;
}
@keyframes wm-mantra-pulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}
.wm-mantra-text em {
  color: var(--gold-bright);
  font-style: italic;
}
.wm-practice-meta {
  display: flex;
  gap: 32px;
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--cream-faint);
  text-transform: uppercase;
}
.wm-practice-meta span strong {
  display: block;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  font-style: normal;
  color: var(--gold-bright);
  letter-spacing: 0;
  margin-top: 4px;
}
.wm-end {
  position: absolute;
  bottom: 32px;
  right: 40px;
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--cream-mute);
  padding: 8px 18px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}
.wm-end:hover { color: var(--gold); border-color: var(--hairline-strong); }

/* ====================== REVEAL OVERLAY ====================== */
.wm-reveal {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: radial-gradient(circle at center, #1a1408 0%, var(--ink-deep) 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: wm-reveal-in 1s ease-out;
}
@keyframes wm-reveal-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.wm-burst {
  position: absolute;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(232, 199, 106, 0.6), rgba(201, 168, 76, 0.2) 30%, transparent 60%);
  border-radius: 50%;
  animation: wm-burst-anim 3s ease-out forwards;
  pointer-events: none;
}
@keyframes wm-burst-anim {
  0% { transform: scale(0.2); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}
.wm-reveal-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 560px;
  padding: 40px;
  animation: wm-reveal-content-in 1.6s ease-out 0.6s both;
}
@keyframes wm-reveal-content-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.wm-reveal-mark {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.wm-reveal-headline {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 400;
  font-style: italic;
  color: var(--cream);
  line-height: 1.1;
  margin: 0 0 14px;
}
.wm-reveal-headline em { color: var(--gold-bright); }
.wm-reveal-sub {
  font-size: 14px;
  color: var(--cream-mute);
  letter-spacing: 0.04em;
  margin-bottom: 32px;
}
.wm-affirm-input {
  width: 100%;
  background: rgba(5, 8, 18, 0.5);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 16px 18px;
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  color: var(--cream);
  text-align: center;
  margin-bottom: 28px;
  transition: border-color 0.3s ease;
}
.wm-affirm-input:focus {
  outline: none;
  border-color: var(--gold);
}
.wm-affirm-input::placeholder {
  color: var(--cream-faint);
  font-style: italic;
}
.wm-reveal-stats {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin-bottom: 32px;
  padding: 22px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.wm-reveal-stat {
  text-align: center;
}
.wm-reveal-stat .v {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  color: var(--gold-bright);
  display: block;
  line-height: 1;
}
.wm-reveal-stat .l {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cream-faint);
  margin-top: 6px;
}
.wm-reveal-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
}
.wm-reveal-btn {
  padding: 12px 24px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.wm-reveal-btn.primary {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: var(--ink);
  border: none;
  box-shadow: 0 0 24px rgba(232, 199, 106, 0.3);
}
.wm-reveal-btn.primary:hover { transform: translateY(-1px); }
.wm-reveal-btn.ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--hairline-strong);
}
.wm-reveal-btn.ghost:hover { background: rgba(201, 168, 76, 0.06); }

/* ====================== MODAL ====================== */
.wm-modal-bg {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 8, 18, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: wm-fade 0.3s ease;
}
@keyframes wm-fade { from { opacity: 0; } to { opacity: 1; } }
.wm-modal {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 0%, rgba(201, 168, 76, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(15, 22, 42, 0.95), rgba(5, 8, 18, 0.98));
  border: 1px solid var(--hairline-strong);
  border-radius: 20px;
  padding: 40px 36px 32px;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(201, 168, 76, 0.12),
    0 32px 96px rgba(0,0,0,0.7),
    0 0 64px rgba(201, 168, 76, 0.08);
  animation: wm-modal-in 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.wm-modal::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'><g fill='none' stroke='%23C9A84C' stroke-width='0.5' opacity='0.12'><circle cx='200' cy='200' r='40'/><circle cx='200' cy='160' r='40'/><circle cx='200' cy='240' r='40'/><circle cx='234.6' cy='180' r='40'/><circle cx='234.6' cy='220' r='40'/><circle cx='165.4' cy='180' r='40'/><circle cx='165.4' cy='220' r='40'/></g></svg>");
  background-size: 360px 360px;
  background-position: center;
  pointer-events: none;
  opacity: 0.5;
}
.wm-modal > * { position: relative; }
@keyframes wm-modal-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.wm-modal-mark {
  width: 56px; height: 56px;
  margin: 0 auto 20px;
}
.wm-modal h2 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--cream);
}
.wm-modal h2 em { color: var(--gold-bright); font-style: italic; }
.wm-modal h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  margin: 0 0 8px;
  color: var(--cream);
}
.wm-modal p {
  color: var(--cream-mute);
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 300;
}
.wm-modal-perks {
  text-align: left;
  margin: 0 0 24px;
  padding: 20px 22px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
  background: rgba(5, 8, 18, 0.5);
  border: 1px solid var(--hairline);
  border-radius: 12px;
}
.wm-modal-perks li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: var(--cream);
  line-height: 1.4;
}
.wm-modal-perks .check {
  color: var(--gold-bright);
  width: 14px; height: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}
.wm-modal-perks .dim { color: var(--cream-faint); font-size: 12px; }

/* Plan toggle */
.wm-plan-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.wm-plan-toggle button {
  background: rgba(5, 8, 18, 0.6);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 14px 12px;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.3s ease;
  color: var(--cream);
}
.wm-plan-toggle button:hover { border-color: var(--hairline-strong); }
.wm-plan-toggle button.on {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.06);
  box-shadow: 0 0 0 1px var(--gold), 0 0 24px rgba(201, 168, 76, 0.15);
}
.wm-plan-toggle .plan-name {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-mute);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.wm-plan-toggle button.on .plan-name { color: var(--gold-bright); }
.wm-plan-toggle .save {
  font-size: 9px;
  background: var(--emerald);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.08em;
  font-family: var(--mono);
}
.wm-plan-toggle .plan-price {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--cream);
  font-weight: 500;
}
.wm-plan-toggle button.on .plan-price { color: var(--gold-bright); }
.wm-plan-toggle .plan-price small {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--cream-faint);
  margin-left: 2px;
  font-weight: 400;
}

/* Promo strip */
.wm-promo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 18px;
}

.wm-modal-cta {
  width: 100%;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: var(--ink);
  border: none;
  padding: 16px 20px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.12em;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 14px;
  box-shadow: 0 0 32px rgba(232, 199, 106, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.wm-modal-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 48px rgba(232, 199, 106, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Trust signals */
.wm-trust {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-faint);
  margin-bottom: 18px;
}
.wm-trust span { display: inline-flex; align-items: center; gap: 5px; }

.wm-modal-dismiss {
  background: transparent;
  border: none;
  color: var(--cream-faint);
  font-size: 11px;
  letter-spacing: 0.12em;
  cursor: pointer;
  padding: 8px;
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-underline-offset: 4px;
}
.wm-modal-dismiss:hover { color: var(--cream-mute); }

.wm-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: transparent;
  border: none;
  color: var(--cream-faint);
  cursor: pointer;
  font-size: 22px;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: all 0.3s ease;
}
.wm-modal-close:hover { color: var(--gold); background: rgba(201, 168, 76, 0.08); }

/* Modal: Loading state */
.wm-modal-loading {
  padding: 60px 20px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.wm-spinner {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(201, 168, 76, 0.2);
  border-top-color: var(--gold-bright);
  animation: wm-spin 0.9s linear infinite;
  margin-bottom: 28px;
}
@keyframes wm-spin { to { transform: rotate(360deg); } }
.wm-modal-loading h3 {
  margin: 0 0 12px;
  line-height: 1.3;
  max-width: 320px;
  text-wrap: balance;
}
.wm-modal-loading p {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cream-faint);
  margin: 0;
}

/* Modal: Success state */
.wm-modal-success {
  position: relative;
  padding: 8px 0 0;
}
.wm-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 20px;
}
.wm-confetti span {
  position: absolute;
  top: -10px;
  width: 6px;
  height: 14px;
  border-radius: 1px;
  animation: wm-confetti-fall 2.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  opacity: 0.8;
}
@keyframes wm-confetti-fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(120vh) rotate(540deg); opacity: 0; }
}

/* ====================== MOBILE ====================== */
@media (max-width: 1080px) {
  .wm-workspace {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
  .wm-rail {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }
  .wm-rail .wm-slice {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
  }
  .wm-nav { gap: 18px; font-size: 12px; }
  .wm-header { padding: 18px 24px; }
}
@media (max-width: 960px) {
  .wm-nav { display: none; }
}
@media (max-width: 720px) {
  .wm-header { padding: 16px 20px; }
  .wm-nav { display: none; }
  .wm-stage { padding: 24px 16px 60px; }
  .wm-headline { font-size: 32px; }
  .wm-mantra { font-size: 9px; letter-spacing: 0.2em; }
  .wm-banner { padding: 8px 16px; font-size: 11px; flex-wrap: wrap; }
  .wm-banner-close { right: 8px; }
  .wm-rail .wm-slice { flex: 1 1 100%; }
  .wm-reps { font-size: 44px; }
  .wm-mantra-text { font-size: 24px; }
  .wm-reveal-headline { font-size: 38px; }
  .wm-practice-mandala { width: 280px; height: 280px; }
  .wm-modal { padding: 32px 22px 24px; border-radius: 16px; }
  .wm-modal h2 { font-size: 26px; }
  .wm-modal-perks { padding: 16px 16px; }
  .wm-modal-perks li { font-size: 12px; }
  .wm-plan-toggle .plan-price { font-size: 22px; }
  .wm-modal-cta { font-size: 12px; padding: 14px 16px; }
}

/* ====================== SMALL MOBILE (< 400px) ====================== */
@media (max-width: 400px) {
  .wm-headline { font-size: 26px; }
  .wm-eyebrow { font-size: 8px; letter-spacing: 0.2em; }
  .wm-stage { padding: 16px 12px 48px; }
  .wm-practice-mandala { width: 240px; height: 240px; }
  .wm-reps { font-size: 36px; }
  .wm-core { width: 42%; }
  .wm-begin { padding: 12px 28px; font-size: 11px; }
  .wm-reveal-headline { font-size: 30px; }
  .wm-modal { padding: 24px 16px 20px; max-width: 100%; margin: 0 8px; }
  .wm-modal h2 { font-size: 22px; }
  .wm-plan-toggle { flex-direction: column; }
  .wm-plan-toggle button { width: 100%; }
}

/* ====================== TOUCH TARGETS ====================== */
@media (pointer: coarse) {
  /* Ensure all interactive elements are at least 44px */
  .wm-select-trigger { min-height: 44px; }
  .wm-select-option { min-height: 44px; padding: 12px 14px; }
  .wm-reps-toggle button { min-height: 44px; min-width: 44px; padding: 8px 14px; }
  .wm-begin { min-height: 48px; }
  .wm-save { min-height: 44px; }
  .wm-avatar { min-width: 44px; min-height: 44px; }
  .wm-streak { min-height: 44px; }
  .wm-banner-close { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .wm-end { min-height: 44px; }
  .wm-modal-close { min-width: 44px; min-height: 44px; }
  .wm-modal-cta { min-height: 48px; }
  .wm-plan-toggle button { min-height: 56px; }
  .wm-reveal-btn { min-height: 44px; }
}

/* ====================== PWA STANDALONE ====================== */
@media (display-mode: standalone) {
  /* Extra top padding for iOS safe area */
  .wm-header { padding-top: max(22px, env(safe-area-inset-top)); }
  body { padding-bottom: env(safe-area-inset-bottom); }
}
