/* ULYA Mystic Luxury Interactive Prototype (Levels 1 + 2 + 3).
   Enhances tactility, living cosmos light, ceremonial Tarot fan, and glass chat sanctuary
   without altering existing DOM IDs, security boundaries, or ULYA brand canon. */

:root {
  --aura-primary: rgba(132, 184, 242, .22);
  --aura-secondary: rgba(207, 177, 121, .16);
  --aura-accent: #e6d1a4;
  --aura-ring: rgba(168, 208, 248, .5);
}

:root[data-ulya-tone="gentle"] {
  --aura-primary: rgba(132, 184, 242, .24);
  --aura-secondary: rgba(207, 177, 121, .18);
  --aura-accent: #e6d1a4;
  --aura-ring: rgba(168, 208, 248, .52);
}

:root[data-ulya-tone="direct"] {
  --aura-primary: rgba(66, 146, 244, .26);
  --aura-secondary: rgba(128, 190, 255, .14);
  --aura-accent: #f0ce8d;
  --aura-ring: rgba(108, 176, 255, .56);
}

:root[data-ulya-tone="humor"] {
  --aura-primary: rgba(232, 162, 66, .26);
  --aura-secondary: rgba(246, 204, 122, .18);
  --aura-accent: #f7c97e;
  --aura-ring: rgba(242, 186, 98, .62);
}

/* 1. Eliminate OS / Windows 98 scrollbar arrows and hard chrome everywhere */
.account-page,
.account-page * {
  scrollbar-width: thin;
  scrollbar-color: rgba(207, 177, 121, .34) transparent;
}

.account-page ::-webkit-scrollbar,
.account-page::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.account-page ::-webkit-scrollbar-track,
.account-page::-webkit-scrollbar-track {
  background: transparent;
}

.account-page ::-webkit-scrollbar-thumb,
.account-page::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(236, 200, 138, .42), rgba(168, 134, 76, .28));
  border-radius: 999px;
  border: 1px solid transparent;
}

.account-page ::-webkit-scrollbar-thumb:hover,
.account-page::-webkit-scrollbar-thumb:hover {
  background: rgba(236, 200, 138, .65);
}

.account-page ::-webkit-scrollbar-button,
.account-page::-webkit-scrollbar-button,
.account-page ::-webkit-scrollbar-corner,
.account-page::-webkit-scrollbar-corner {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

/* Living celestial background canvas */
#ulya-cosmos-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: .94;
}

.account-page .full-deck-shell {
  position: relative;
  z-index: 1;
}

/* Tactile sound toggle in topbar */
.account-page .ulya-sound-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(207, 177, 121, .34);
  background: rgba(12, 24, 42, .62);
  color: #b8c4c9;
  box-shadow: inset 0 1px 0 rgba(255, 244, 210, .14), 0 4px 12px rgba(0, 0, 0, .35);
  transition: color 180ms ease, border-color 180ms ease, box-shadow 220ms ease, transform 180ms ease;
}

.account-page .ulya-sound-toggle:hover {
  color: #f6e7c5;
  border-color: rgba(236, 200, 138, .65);
  transform: translateY(-1px);
}

.account-page .ulya-sound-toggle[aria-pressed="true"] {
  color: var(--aura-accent);
  border-color: rgba(236, 200, 138, .62);
  background: radial-gradient(circle at 35% 30%, rgba(236, 200, 138, .18), rgba(10, 21, 38, .78));
  box-shadow: 0 0 16px var(--aura-primary), inset 0 1px 0 rgba(255, 244, 210, .25);
}

.account-page .ulya-sound-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-page .ulya-sound-toggle .ulya-sound-off {
  display: none;
}

.account-page .ulya-sound-toggle[aria-pressed="false"] .ulya-sound-on {
  display: none;
}

.account-page .ulya-sound-toggle[aria-pressed="false"] .ulya-sound-off {
  display: block;
}

/* 2. Living 3D Hero Stage, Specular Glint & Royal 4th Medallion */
.card-stage {
  position: relative;
}

.card-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 380px;
  height: 440px;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, var(--aura-primary) 0%, var(--aura-secondary) 36%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

@keyframes ulya-aura-breathe {
  0%, 100% {
    opacity: .68;
    transform: scale(.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

.account-page button.scene-card,
.account-page button.scene-card:not(:disabled):hover {
  transform: perspective(1000px) rotateX(var(--material-rx, 0deg)) rotateY(var(--material-ry, 0deg)) translateY(var(--card-lift, 0px));
  transform-style: preserve-3d;
  backface-visibility: visible;
  transition: transform 240ms cubic-bezier(.16, 1, .3, 1), box-shadow 320ms ease;
  will-change: transform;
}

.account-page button.scene-card:not(:disabled):hover,
.account-page button.scene-card[data-material-active] {
  --card-lift: -6px;
  box-shadow:
    inset 0 1px 1px rgba(255, 240, 200, .58),
    1px 2px 1px #99886a,
    3px 5px 2px #413929,
    0 30px 68px rgba(0, 0, 0, .92),
    0 0 44px var(--aura-primary);
}

.account-page .scene-glint {
  display: block;
  inset: 0;
  border-radius: 22px;
  background: radial-gradient(
    circle at var(--glint-x, 50%) var(--glint-y, 26%),
    rgba(255, 246, 214, .34) 0%,
    rgba(236, 200, 138, .12) 28%,
    transparent 62%
  );
  mix-blend-mode: screen;
  opacity: var(--glint-opacity, .28);
  pointer-events: none;
  transition: opacity 260ms ease;
}

.account-page .scene-back {
  transition: transform 420ms cubic-bezier(.16, 1, .3, 1), box-shadow 360ms ease;
}

.account-page .card-stage:hover .scene-back-left {
  transform: translateX(-8px) rotate(-1.6deg);
}

.account-page .card-stage:hover .scene-back-right {
  transform: translateX(8px) rotate(1.6deg);
}

/* Unified 4th Royal Gold Medallion for Chat */
.account-page .space-dock button[data-space-target="chat-module"] .nav-medallion {
  --medallion-art: url('./assets/original-mystic/original-nav-chat.svg');
  --medallion-x: 0px;
  --medallion-y: 0px;
  background: linear-gradient(#080d15, #080d15) padding-box, var(--reference-foil, linear-gradient(135deg, #ecc88a 0%, #b3956a 45%, #7d5c32 100%)) border-box;
  filter: drop-shadow(1px 4px 3px #0009);
}

.account-page .space-dock button[data-space-target="chat-module"] .nav-medallion svg {
  display: none;
}

.account-page .space-dock .nav-medallion {
  transition: transform 220ms cubic-bezier(.16, 1, .3, 1), filter 220ms ease, box-shadow 260ms ease;
}

.account-page .space-dock button:hover .nav-medallion {
  transform: translateY(-2px) scale(1.06);
  filter: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .6), 0 0 18px var(--aura-primary);
}

.account-page .space-dock button[aria-current] .nav-medallion {
  box-shadow: 0 6px 14px rgba(0, 0, 0, .65), 0 0 0 2px rgba(236, 200, 138, .35), 0 0 24px var(--aura-primary);
}

/* 3. Living Ulya Chat Sanctuary (Level 3) */
.account-page #chat-expand {
  border: 1px solid rgba(207, 177, 121, .45);
  border-radius: 999px;
  background: rgba(14, 28, 48, .85);
  padding: 0 14px;
  color: #f6e7c5;
}

.account-page #chat-expand:hover {
  border-color: rgba(236, 200, 138, .8);
  background: rgba(22, 42, 70, .92);
}

.account-page .compose-glass {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: linear-gradient(120deg, rgba(16, 32, 54, .92), rgba(8, 19, 36, .95));
}

@media (min-width: 900px) {
  .account-page .space-scene {
    width: 50%;
    padding-top: 8px;
  }

  .account-page #workspace:has(#space-scene:not([hidden])) > .conversation-layout:not([data-chat-expanded="true"]) {
    width: 47%;
    margin-left: 53%;
    margin-top: -540px;
    padding-top: 4px;
  }

  .account-page #workspace #conversation-workspace[data-chat-expanded="false"] #chat-module {
    background: linear-gradient(165deg, rgba(10, 24, 44, .92), rgba(4, 12, 24, .96));
    border: 1px solid rgba(215, 184, 124, .3);
    border-radius: 26px;
    box-shadow:
      0 20px 50px rgba(0, 0, 0, .62),
      0 0 32px var(--aura-primary),
      inset 0 1px 0 rgba(255, 244, 210, .14);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 4px 0 10px;
    transition: border-color 240ms ease, box-shadow 280ms ease;
  }

  .account-page #workspace #conversation-workspace[data-chat-expanded="false"] #messages {
    max-height: 215px;
    overflow-y: auto;
    padding: 10px 16px;
    margin: 0;
  }

  .account-page #workspace #conversation-workspace[data-chat-expanded="false"] #send-form {
    padding: 4px 16px 6px;
  }

  .account-page #workspace #conversation-workspace[data-chat-expanded="false"] .chat-heading-row {
    padding: 10px 16px;
  }
}

/* Compact Question Context Chip when closed */
.account-page .question-context-panel:not([open]) {
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 8px 16px 4px;
  padding: 0 14px;
  border: 1px solid rgba(207, 177, 121, .28);
  border-radius: 999px;
  background: rgba(8, 19, 35, .64);
  transition: border-color 180ms ease, background-color 180ms ease;
}

.account-page .question-context-panel:not([open]):hover {
  border-color: rgba(236, 200, 138, .55);
  background: rgba(14, 30, 52, .8);
}

.account-page .question-context-panel:not([open]) summary {
  min-height: 34px;
  font-size: 12px;
  color: #e6d1a4;
  gap: 6px;
}

.account-page .question-context-panel:not([open]) summary::before {
  content: "✦";
  font-size: 11px;
  color: var(--gold-primary);
}

/* Living Avatar Aura */
.ulya-avatar-wrap {
  position: relative;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.ulya-avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg 140deg, var(--aura-accent) 220deg, var(--aura-ring) 300deg, transparent 360deg);
  opacity: .55;
  pointer-events: none;
}

.ulya-avatar-wrap::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--aura-primary) 0%, transparent 70%);
  opacity: .55;
  pointer-events: none;
  z-index: -1;
}

.account-page .chat-module.is-thinking .ulya-avatar-wrap::before {
  opacity: 1;
  animation: ulya-ring-spin 2.2s linear infinite;
}

.account-page .chat-module.is-thinking .ulya-avatar-wrap::after {
  opacity: 1;
  animation: ulya-aura-breathe 1.6s ease-in-out infinite;
}

.account-page .ulya-avatar-wrap .chat-avatar {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(236, 200, 138, .48);
}

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

/* Quick starter prompts above composer */
.ulya-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 2px 8px;
}

.ulya-quick-chip {
  appearance: none;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(207, 177, 121, .28);
  border-radius: 999px;
  background: rgba(12, 26, 46, .66);
  color: #e6d8ba;
  font: 500 12px/1.25 var(--font-sans);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 244, 210, .08);
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.ulya-quick-chip:hover {
  border-color: rgba(236, 200, 138, .65);
  background: rgba(22, 42, 70, .86);
  color: #fff6dc;
  transform: translateY(-1px);
}

/* Single-Row Tactile Tone Pills replacing native select visually */
.account-page .tone-control.has-tone-pills {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 1 1 auto;
  max-width: none;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(207, 177, 121, .34);
  background: rgba(6, 15, 28, .78);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, .45);
}

.account-page .tone-control.has-tone-pills .tone-control-copy {
  display: none !important;
}

.account-page .tone-control.has-tone-pills #tone {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ulya-tone-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
}

.account-page button.ulya-tone-pill {
  min-width: 0;
  min-height: 38px;
  padding: 6px 8px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #b8c4c9;
  font: 500 13px/1.2 var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, box-shadow 220ms ease;
}

.account-page button.ulya-tone-pill:hover {
  color: #f8fdfe;
  background: rgba(255, 255, 255, .05);
}

.account-page button.ulya-tone-pill[aria-pressed="true"] {
  color: #fff6de;
  border-color: rgba(236, 200, 138, .68);
  background: linear-gradient(155deg, rgba(214, 178, 108, .28), rgba(20, 38, 64, .92));
  box-shadow: 0 2px 12px rgba(0, 0, 0, .4), 0 0 16px var(--aura-primary), inset 0 1px 0 rgba(255, 245, 210, .28);
}

/* Message Animation & Shimmering Typing Indicator */
.account-page .message {
  animation: ulya-msg-in 260ms cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes ulya-msg-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.account-page .message.reply-pending {
  position: relative;
  overflow: hidden;
  border-color: rgba(236, 200, 138, .48);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .4), 0 0 18px var(--aura-primary);
}

.account-page .message.reply-pending::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 25%, rgba(236, 200, 138, .12) 50%, transparent 75%);
  transform: translateX(-100%);
  animation: ulya-shimmer 1.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ulya-shimmer {
  to {
    transform: translateX(100%);
  }
}

/* Keep full-screen expanded chat consistent with dark starry glass aesthetic */
.account-page #workspace > #conversation-workspace[data-chat-expanded="true"] {
  background: radial-gradient(ellipse at 70% 10%, rgba(22, 54, 96, .32), transparent 55%), #010b15;
}

.account-page [data-chat-expanded="true"] #chat-module {
  background: linear-gradient(180deg, rgba(8, 20, 36, .74), rgba(2, 10, 20, .9));
  border-inline: 1px solid rgba(207, 177, 121, .16);
}

/* 4. Ceremonial Tarot Fan Ritual & 3D Card Reveal (Level 2) */
.reading-controls.has-topic-pills label {
  position: relative;
}

.reading-controls.has-topic-pills label > select#reading-topic {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ulya-topic-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 14px;
}

.account-page button.ulya-topic-pill {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid rgba(207, 177, 121, .34);
  border-radius: 999px;
  background: rgba(11, 24, 42, .72);
  color: #d4dce3;
  font: 500 14px/1.2 var(--font-sans);
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 220ms ease;
}

.account-page button.ulya-topic-pill:hover {
  border-color: rgba(236, 200, 138, .7);
  color: #fff8e7;
  transform: translateY(-1px);
}

.account-page button.ulya-topic-pill[aria-pressed="true"] {
  color: #fff6dc;
  border-color: rgba(236, 200, 138, .85);
  background: linear-gradient(155deg, rgba(214, 178, 108, .3), rgba(14, 31, 56, .95));
  box-shadow: 0 4px 16px rgba(0, 0, 0, .4), 0 0 20px var(--aura-primary);
}

/* Interactive 11-Card Curved Fan Table */
.ulya-tarot-fan-stage {
  margin: 20px 0 24px;
  padding: 20px 16px 18px;
  border: 1px solid rgba(215, 184, 124, .3);
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(207, 177, 121, .14), transparent 62%),
    linear-gradient(180deg, rgba(8, 20, 38, .86), rgba(4, 12, 24, .92));
  box-shadow: 0 20px 48px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 244, 210, .14);
  overflow: hidden;
}

.ulya-tarot-fan-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 14px;
}

.ulya-tarot-fan-title {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.15;
  color: #f8fdfe;
}

.ulya-tarot-fan-count {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(207, 177, 121, .42);
  background: rgba(16, 33, 58, .75);
  color: var(--gold-primary);
  font: 600 13px/1.2 var(--font-sans);
  font-variant-numeric: tabular-nums;
}

.ulya-tarot-slots {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  max-width: 540px;
  margin: 0 auto 14px;
}

.ulya-tarot-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 6px 4px;
  border: 1px dashed rgba(207, 177, 121, .34);
  border-radius: 10px;
  background: rgba(6, 15, 28, .62);
  color: #98a6b8;
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
  transition: border-color 240ms ease, background-color 240ms ease, color 240ms ease, box-shadow 260ms ease, transform 240ms ease;
}

.ulya-tarot-slot.is-filled {
  border-style: solid;
  border-color: rgba(236, 200, 138, .85);
  background: linear-gradient(160deg, rgba(214, 178, 108, .28), rgba(14, 30, 52, .92));
  color: #fff6dc;
  box-shadow: 0 0 16px rgba(236, 200, 138, .22), inset 0 1px 0 rgba(255, 245, 210, .3);
  transform: translateY(-2px);
}

.ulya-tarot-fan-arc {
  --fan-step: 34px;
  --fan-drop: 2.2px;
  position: relative;
  width: 100%;
  height: 215px;
  margin: 4px 0 10px;
  overflow: hidden;
}

.ulya-tarot-fan-arc.is-shuffling .ulya-fan-card {
  animation: ulya-fan-shuffle 420ms cubic-bezier(.16, 1, .3, 1);
}

@keyframes ulya-fan-shuffle {
  0% { transform: translateX(calc(-50% + var(--fan-x))) translateY(var(--fan-y)) rotate(var(--fan-angle)); }
  45% { transform: translateX(-50%) translateY(14px) rotate(0deg) scale(.94); }
  100% { transform: translateX(calc(-50% + var(--fan-x))) translateY(var(--fan-y)) rotate(var(--fan-angle)); }
}

.account-page button.ulya-fan-card {
  --fan-angle: calc(var(--offset, 0) * 5.2deg);
  --fan-x: calc(var(--offset, 0) * var(--fan-step, 34px));
  --fan-y: calc(var(--offset, 0) * var(--offset, 0) * var(--fan-drop, 2.2px));
  position: absolute;
  left: 50%;
  top: 44px;
  width: 92px;
  height: 138px;
  min-height: 0;
  padding: 3px;
  border: 1px solid #cfb179;
  border-radius: 12px;
  background: linear-gradient(145deg, #21344d, #07101c);
  box-shadow: -4px 10px 20px rgba(0, 0, 0, .72), inset 0 1px 0 rgba(255, 240, 200, .35);
  transform-origin: center 150%;
  transform: translateX(calc(-50% + var(--fan-x))) translateY(var(--fan-y)) rotate(var(--fan-angle));
  z-index: calc(10 + var(--fan-index, 0));
  cursor: pointer;
  overflow: hidden;
  transition: transform 260ms cubic-bezier(.16, 1, .3, 1), box-shadow 260ms ease, opacity 280ms ease, border-color 200ms ease;
}

.account-page button.ulya-fan-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  pointer-events: none;
}

.account-page button.ulya-fan-card:not(:disabled):hover,
.account-page button.ulya-fan-card:not(:disabled):focus-visible {
  z-index: 40;
  border-color: #fff2c4;
  transform: translateX(calc(-50% + var(--fan-x))) translateY(calc(var(--fan-y) - 24px)) rotate(calc(var(--fan-angle) * .45)) scale(1.08);
  box-shadow: 0 20px 36px rgba(0, 0, 0, .86), 0 0 24px rgba(236, 200, 138, .48);
}

.account-page button.ulya-fan-card.is-picked {
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(-50% + var(--fan-x))) translateY(-180px) rotate(0deg) scale(.84);
}

.ulya-tarot-fan-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ulya-tarot-fan-hint {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.account-page button.ulya-fan-shuffle-btn {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid rgba(207, 177, 121, .42);
  border-radius: 999px;
  background: rgba(14, 30, 52, .75);
  color: #f4dfae;
  font: 500 13px/1.2 var(--font-sans);
  cursor: pointer;
}

.account-page button.ulya-fan-shuffle-btn:hover {
  border-color: rgba(236, 200, 138, .8);
  background: rgba(24, 46, 76, .9);
}

/* 3D Flip Reveal & Foil Sheen for Spread Cards (#personal-reading li) */
#personal-reading .journey-card-art.ulya-tarot-3d-shell {
  perspective: 1100px;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  cursor: zoom-in;
}

#personal-reading .journey-card-art.ulya-tarot-3d-shell::after {
  content: none;
}

.ulya-tarot-3d-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(180deg) rotateX(var(--material-rx, 0deg)) rotateY(var(--material-ry, 0deg));
  transition: transform 740ms cubic-bezier(.22, 1, .36, 1);
  border-radius: 12px;
}

.ulya-tarot-3d-inner.is-flipped {
  transform: rotateY(0deg) rotateX(var(--material-rx, 0deg)) rotateY(var(--material-ry, 0deg));
}

.ulya-tarot-face {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.ulya-tarot-face-back {
  transform: rotateY(180deg);
  border: 2px solid #cfa862;
  background: #07111d;
  box-shadow: 0 18px 28px rgba(0, 0, 0, .65);
}

.ulya-tarot-face-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ulya-tarot-face-front {
  border: 2px solid #d5b473;
  background: #081322;
  box-shadow: 0 18px 28px rgba(0, 0, 0, .65), inset 0 0 0 1px rgba(255, 240, 200, .45);
}

.ulya-tarot-face-front img,
.ulya-tarot-face-front svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ulya-tarot-foil {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--glint-x, 50%) var(--glint-y, 28%), rgba(255, 246, 214, .32), rgba(236, 200, 138, .08) 34%, transparent 65%);
  mix-blend-mode: screen;
  opacity: var(--glint-opacity, .18);
  pointer-events: none;
  transition: opacity 220ms ease;
}

.ulya-tarot-card-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--gold-primary);
  opacity: .88;
}

/* Frosted Glass Tarot Lightbox Modal */
#ulya-card-lightbox {
  position: fixed;
  z-index: 200;
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 1px solid rgba(236, 200, 138, .48);
  border-radius: 24px;
  background: linear-gradient(165deg, rgba(11, 25, 45, .96), rgba(4, 12, 24, .98));
  color: #f8fdfe;
  box-shadow: 0 32px 90px rgba(0, 0, 0, .86), 0 0 40px var(--aura-primary);
  overflow: auto;
}

/* Signature Nixtio-inspired anamorphic golden light flare behind primary ritual CTAs */
.account-page #question-home {
  position: relative;
  isolation: isolate;
}

.account-page #question-home::before {
  content: "";
  position: absolute;
  left: -18%;
  right: -18%;
  top: 24px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(236, 200, 138, .28) 22%, rgba(255, 232, 168, .92) 50%, rgba(236, 200, 138, .28) 78%, transparent 100%);
  box-shadow: 0 0 22px 4px rgba(236, 194, 112, .52), 0 0 48px 10px rgba(236, 194, 112, .24);
  pointer-events: none;
  z-index: -1;
}

.account-page #question-home-action,
.account-page #draw-reading {
  position: relative;
  border-color: rgba(236, 200, 138, .72);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 210, .34),
    0 10px 28px rgba(0, 0, 0, .6),
    0 0 24px rgba(236, 194, 112, .22);
}

#ulya-card-lightbox::backdrop {
  background: rgba(1, 8, 16, .78);
  backdrop-filter: blur(8px);
}

.ulya-lightbox-inner {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 24px 22px;
}

.ulya-lightbox-close {
  position: sticky;
  top: 0;
  justify-self: end;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(207, 177, 121, .45);
  background: rgba(10, 22, 40, .86);
  color: #f6e7c5;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.ulya-lightbox-art {
  width: min(240px, 66vw);
  aspect-ratio: 2 / 3;
  margin: 0 auto;
  border-radius: 16px;
  border: 2px solid #e6c687;
  box-shadow: 0 22px 44px rgba(0, 0, 0, .75), 0 0 28px rgba(236, 200, 138, .22);
  overflow: hidden;
  transform: perspective(900px) rotateX(var(--material-rx, 0deg)) rotateY(var(--material-ry, 0deg));
  transition: transform 200ms ease;
}

.ulya-lightbox-art img,
.ulya-lightbox-art svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ulya-lightbox-art .card-illustration {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.ulya-lightbox-art .card-illustration:has(img) svg {
  display: none;
}

.ulya-lightbox-pos {
  margin: 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold-primary);
}

.ulya-lightbox-title {
  margin: 0;
  text-align: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 34px;
  line-height: 1.08;
  color: #f8fdfe;
}

.ulya-lightbox-meaning {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: #d6dfe5;
}

.ulya-lightbox-discuss {
  width: 100%;
  min-height: 48px;
}

/* 5. Tactile Solitaire Spark Flash (zero coins/currency) */
#solitaire-panel button.solitaire-card {
  transition: transform 220ms cubic-bezier(.16, 1, .3, 1), box-shadow 220ms ease;
}

#solitaire-panel button.solitaire-card:not(:disabled):active {
  transform: scale(.96);
}

#solitaire-grid.ulya-spark-flash {
  box-shadow: 0 0 36px rgba(236, 200, 138, .55), inset 0 0 24px rgba(236, 200, 138, .22);
  transition: box-shadow 260ms ease;
}

/* 6. Mobile Responsiveness (390px and narrower — 0px overflow guarantee) */
@media (max-width: 760px) {
  .account-page .tone-control.has-tone-pills {
    flex: 1 1 100%;
    grid-template-columns: minmax(0, 1fr);
    padding: 4px;
  }

  .account-page button.ulya-tone-pill {
    min-height: 40px;
    padding: 6px 4px;
    font-size: 12.5px;
  }

  .ulya-tarot-fan-stage {
    padding: 16px 10px 14px;
    border-radius: 20px;
  }

  .ulya-tarot-slots {
    gap: 5px;
  }

  .ulya-tarot-slot {
    min-height: 44px;
    font-size: 10px;
    padding: 4px 2px;
  }

  .ulya-tarot-fan-arc {
    --fan-step: 15px;
    --fan-drop: 1.4px;
    height: 150px;
  }

  .account-page button.ulya-fan-card {
    top: 28px;
    width: 58px;
    height: 88px;
    border-radius: 8px;
  }

  .account-page button.ulya-topic-pill {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #ulya-cosmos-canvas,
  .card-stage::before,
  .ulya-avatar-wrap::before,
  .account-page .message,
  .account-page .message.reply-pending::after,
  .ulya-tarot-fan-arc.is-shuffling .ulya-fan-card {
    animation: none !important;
  }

  .account-page button.scene-card,
  .ulya-tarot-3d-inner,
  .account-page button.ulya-fan-card,
  .account-page .space-dock .nav-medallion,
  .ulya-lightbox-art {
    transition: none !important;
  }

  .ulya-tarot-3d-inner {
    transform: rotateY(0deg) !important;
  }
}


/* ==========================================================================
   PASS 2 (Nixtio Dribbble Reference): Astrolabe Profile, Lunar Orbit Loader,
   Atmospheric Onboarding/Sign-In, and Solar Mandala Tariffs/Full Access
   ========================================================================== */

/* 1. Profile Astrolabe Stage (#account-settings) */
.ulya-astrolabe-stage {
  position: relative;
  width: min(320px, 100%);
  height: 310px;
  margin: 18px auto 12px;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.ulya-astrolabe-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.ulya-astrolabe-stage .profile-emblem {
  position: relative;
  z-index: 2;
  margin: 0 !important;
  width: 118px;
  height: 118px;
}

.ulya-astrolabe-stage .profile-emblem::before {
  inset: -44px;
  opacity: .55;
}

.ulya-astrolabe-stage .profile-emblem img {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  border: 2px solid #ecc88a;
  box-shadow: 0 0 0 5px rgba(8, 17, 30, .92), 0 0 0 6px rgba(215, 184, 124, .55), 0 12px 26px rgba(0, 0, 0, .75);
}

.ulya-astrolabe-stat {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(215, 184, 124, .34);
  background: rgba(6, 15, 28, .88);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .55);
  text-align: center;
}

.ulya-astrolabe-stat strong {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  color: #fff3d2;
  font-variant-numeric: tabular-nums;
}

.ulya-astrolabe-stat span {
  margin-top: 2px;
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #cfb179;
}

.ulya-astrolabe-stat[data-pos="top"] {
  top: 4px;
  left: 50%;
  translate: -50% 0;
}

.ulya-astrolabe-stat[data-pos="bottom-left"] {
  bottom: 18px;
  left: 6px;
}

.ulya-astrolabe-stat[data-pos="bottom-right"] {
  bottom: 18px;
  right: 6px;
}

/* 2. Lunar Orbital Loader ("Толкую символы…") */
.ulya-lunar-orbit {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 10px auto 4px;
  padding: 8px 16px;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(215, 184, 124, .32);
  background: rgba(6, 16, 30, .84);
  color: #edd5a3;
  font-size: 13px;
}

.ulya-lunar-orbit.is-active {
  display: inline-flex;
}

.ulya-lunar-orbit svg {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

.ulya-lunar-orbit.is-active .ulya-lunar-spin {
  transform-origin: 50px 50px;
  animation: ulya-ring-spin 7.5s linear infinite;
}

.account-page .message.reply-pending {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.account-page .message.reply-pending .ulya-lunar-inline {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.account-page .message.reply-pending .ulya-lunar-inline .ulya-lunar-spin {
  transform-origin: 50px 50px;
  animation: ulya-ring-spin 6.5s linear infinite;
}

/* 3. Atmospheric Sign-In (#login-section) & Registration (.auth-page) */
.account-page #login-section {
  position: relative;
  max-width: 440px;
  margin: 0 auto;
  padding-top: 10px;
}

.account-page #login-section::before,
.auth-page::before {
  content: "";
  display: block;
  width: 164px;
  height: 164px;
  margin: 0 auto 10px;
  background: url('./assets/original-mystic/nixtio-onboarding-emblem.svg') center/contain no-repeat;
  pointer-events: none;
}

.account-page #login-form input:not([type="checkbox"]),
.auth-page #public-auth-form input:not([type="checkbox"]) {
  border-radius: 999px;
  border: 1px solid rgba(207, 177, 121, .4);
  background: rgba(7, 16, 30, .88);
  color: #f8fdfe;
  padding: 13px 18px;
  box-shadow: inset 0 1px 0 rgba(255, 244, 210, .08);
}

.account-page #login-form input:not([type="checkbox"]):focus,
.auth-page #public-auth-form input:not([type="checkbox"]):focus {
  border-color: rgba(236, 200, 138, .85);
  box-shadow: 0 0 0 2px rgba(236, 200, 138, .22);
}

.account-page #login-submit,
.auth-page #auth-submit {
  position: relative;
  border-radius: 999px;
  border: 1px solid rgba(236, 200, 138, .75);
  background: linear-gradient(160deg, #1d3147 0%, #091321 100%);
  color: #fff6de;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 210, .34),
    0 10px 28px rgba(0, 0, 0, .62),
    0 0 26px rgba(236, 194, 112, .26);
}

/* 4. Solar Mandala Full Access / Tariffs (.account-public-checkout & tariffs.html) */
.account-page .account-public-checkout {
  position: relative;
  margin: 28px auto 12px;
  padding: 28px 22px 24px;
  border: 1px solid rgba(215, 184, 124, .32);
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(236, 194, 112, .14), transparent 62%),
    linear-gradient(180deg, rgba(10, 22, 40, .88), rgba(4, 11, 22, .94));
  text-align: center;
  overflow: hidden;
}

.account-page .account-public-checkout::before {
  content: "";
  display: block;
  width: 148px;
  height: 148px;
  margin: 0 auto 10px;
  background: url('./assets/original-mystic/nixtio-sun-mandala.svg') center/contain no-repeat;
}

.account-page .account-public-checkout a.account-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 999px;
  border-color: rgba(236, 200, 138, .75);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 210, .34),
    0 10px 26px rgba(0, 0, 0, .58),
    0 0 26px rgba(236, 194, 112, .28);
}

.mystic-public .legal-page:has(.tariff-list)::before {
  content: "";
  display: block;
  width: 176px;
  height: 176px;
  margin: 0 auto 8px;
  background: url('./assets/original-mystic/nixtio-sun-mandala.svg') center/contain no-repeat;
}

.mystic-public .tariff-row {
  border: 1px solid rgba(215, 184, 124, .32);
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(10, 24, 44, .88), rgba(4, 12, 24, .95));
  box-shadow: 0 16px 38px rgba(0, 0, 0, .52), inset 0 1px 0 rgba(255, 244, 210, .12);
}

.mystic-public .tariff-row .button {
  border-radius: 999px;
  border: 1px solid rgba(236, 200, 138, .72);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .5), 0 0 20px rgba(236, 194, 112, .2);
}

@media (max-width: 760px) {
  .ulya-astrolabe-stage {
    width: 276px;
    height: 276px;
  }

  .ulya-astrolabe-stage .profile-emblem,
  .ulya-astrolabe-stage .profile-emblem img {
    width: 100px;
    height: 100px;
  }

  .ulya-astrolabe-stat {
    min-width: 64px;
    padding: 4px 8px;
  }

  .ulya-astrolabe-stat strong {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ulya-lunar-orbit.is-active .ulya-lunar-spin,
  .account-page .message.reply-pending .ulya-lunar-inline .ulya-lunar-spin {
    animation: none !important;
  }
}

/* Integrate the live chat-first cabinet without changing its controller. */
.account-page #workspace[data-cf-ready=yes] > #conversation-workspace[data-chat-expanded=true] {
  top: var(--messenger-top, 0px);
  height: var(--messenger-height, 100dvh);
}
.account-page #workspace[data-cf-ready=yes] #chat-expand { display: flex; }
.account-page[data-chat-open=true]:has(#workspace[data-cf-ready=yes]) #cf-nav { display: none !important; }
.account-page[data-chat-open=false]:has(#workspace[data-cf-ready=yes]):has(#personal-section:not([hidden])) .space-dock {
  display: flex !important;
}
.account-page #workspace[data-cf-ready=yes] #chat-expand-label {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
}
.account-page[data-chat-open=false] #workspace[data-cf-ready=yes][data-cf-view=chat] #space-scene:not([hidden]) {
  display: grid !important;
}
.account-page #workspace[data-cf-ready=yes] .ulya-live-tone-control {
  flex: 0 0 auto;
  width: min(100%, 28rem);
  box-sizing: border-box;
  align-self: center;
}
.account-page #workspace[data-cf-ready=yes] #cf-options-label {
  font-size: 0;
}
.account-page #workspace[data-cf-ready=yes] #cf-options-label::after {
  content: 'Настройки разговора';
  font-size: .82rem;
}

/* ============================================================
   LEVEL 4: Interactive Natal Wheel Inspector + 1080x1920 Share Cards
   ============================================================ */
.account-page #natal-wheel-host .natal-wheel__svg [data-body] {
  cursor: pointer;
  transition: opacity 160ms ease, stroke-width 160ms ease, fill 160ms ease;
}

.account-page #natal-wheel-host .natal-wheel__marker[data-body].is-selected {
  fill: #fff3c4 !important;
  stroke: #f3c86e !important;
  stroke-width: 2.6 !important;
  filter: drop-shadow(0 0 6px rgba(243, 200, 110, .9));
}

.account-page #natal-wheel-host .natal-wheel__tether[data-body].is-selected {
  stroke: #ffe5a3 !important;
  stroke-width: 2.2 !important;
  opacity: 1 !important;
}

.account-page #natal-wheel-host .natal-wheel__planet-label[data-body].is-selected {
  fill: #fff6dc !important;
  font-weight: 700 !important;
}

.ulya-natal-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 12px;
}

.account-page button.ulya-natal-chip {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(215, 184, 124, .3);
  background: rgba(8, 20, 38, .78);
  color: #e6dac2;
  font: 500 13px/1.2 var(--font-sans);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.account-page button.ulya-natal-chip:hover,
.account-page button.ulya-natal-chip:focus-visible {
  border-color: rgba(236, 200, 138, .75);
  color: #fff6dc;
}

.account-page button.ulya-natal-chip[aria-pressed="true"] {
  border-color: #f3d28c;
  background: linear-gradient(145deg, rgba(215, 178, 108, .28), rgba(14, 34, 62, .94));
  color: #fff8e4;
  box-shadow: 0 0 16px rgba(236, 194, 112, .26), inset 0 1px 0 rgba(255, 245, 210, .3);
}

.ulya-natal-inspector {
  display: grid;
  gap: 10px;
  margin: 8px 0 14px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(236, 200, 138, .38);
  background:
    radial-gradient(ellipse at 12% 0%, rgba(236, 194, 112, .14), transparent 58%),
    linear-gradient(165deg, rgba(11, 27, 50, .92), rgba(4, 12, 24, .96));
  box-shadow: 0 18px 42px rgba(0, 0, 0, .54), inset 0 1px 0 rgba(255, 244, 210, .16);
}

.ulya-natal-inspector-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ulya-natal-inspector-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(236, 200, 138, .55);
  background: radial-gradient(circle at 35% 30%, rgba(236, 194, 112, .28), rgba(9, 22, 42, .94));
  color: #fff2c8;
  font-size: 22px;
  line-height: 1;
}

.ulya-natal-inspector-title {
  margin: 0;
  font-family: var(--font-serif, Georgia, serif);
  font-size: 20px;
  color: #fff6dc;
}

.ulya-natal-inspector-pos {
  margin: 2px 0 0;
  font-size: 13px;
  color: #dfc482;
}

.ulya-natal-inspector-theme {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #eef5fb;
}

.ulya-natal-inspector-prompt {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(215, 184, 124, .2);
  background: rgba(4, 12, 24, .64);
  font-size: 13px;
  line-height: 1.45;
  color: #e4d8be;
}

.ulya-natal-inspector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.ulya-lightbox-actions {
  display: grid;
  gap: 10px;
}

.account-page button.ulya-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  margin-top: 8px;
  border-radius: 999px;
  border: 1px solid rgba(236, 200, 138, .52);
  background: linear-gradient(145deg, rgba(215, 178, 108, .18), rgba(10, 24, 44, .9));
  color: #f6e4b8;
  font: 600 13px/1.25 var(--font-sans);
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.account-page .ulya-lightbox-actions button.ulya-share-btn {
  margin-top: 0;
  width: 100%;
}

.account-page button.ulya-share-btn:hover,
.account-page button.ulya-share-btn:focus-visible {
  border-color: #ffeab6;
  background: linear-gradient(145deg, rgba(215, 178, 108, .3), rgba(16, 36, 66, .95));
  box-shadow: 0 0 18px rgba(236, 194, 112, .26);
}

.ulya-share-status {
  margin: 4px 0 0;
  min-height: 18px;
  font-size: 12px;
  text-align: center;
  color: #dfc482;
}

@media (max-width: 640px) {
  .ulya-natal-inspector {
    padding: 14px;
  }

  .account-page button.ulya-natal-chip {
    font-size: 12px;
    padding: 5px 10px;
  }
}
