:root {
  color-scheme: dark;
  --bg: #07060b;
  --bg-deep: #030208;
  --panel: rgba(25, 18, 36, 0.86);
  --panel-soft: rgba(42, 31, 52, 0.72);
  --gold: #d6b76a;
  --gold-bright: #f4d889;
  --gold-soft: rgba(214, 183, 106, 0.18);
  --text: #f8eed9;
  --muted: #bda981;
  --line: rgba(214, 183, 106, 0.34);
  --shadow: rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(118, 80, 156, 0.28), transparent 28rem),
    radial-gradient(circle at 20% 30%, rgba(214, 183, 106, 0.12), transparent 20rem),
    linear-gradient(180deg, #171020 0%, var(--bg) 58%, var(--bg-deep) 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.has-share-modal {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(245, 216, 137, 0.24) 0 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px);
  background-size: 57px 57px, 101px 101px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.76), transparent 88%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.76), transparent 88%);
}

.premium-app {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gold);
}

.brand-mark {
  font-weight: 800;
  letter-spacing: 0.04em;
}

.date-pill,
.eyebrow {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(214, 183, 106, 0.08);
}

.date-pill {
  padding: 8px 13px;
  font-size: 0.78rem;
}

.hero {
  padding: 18px 2px 8px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 8px 14px;
  color: var(--text);
  font-size: 0.82rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 12vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: 0.02em;
  text-shadow: 0 0 34px rgba(214, 183, 106, 0.16);
}

.hero-copy {
  max-width: 28rem;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.oracle-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(30, 22, 42, 0.9), rgba(8, 6, 12, 0.92));
  box-shadow: 0 30px 90px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.oracle-panel::before {
  content: "";
  position: absolute;
  inset: -95px;
  pointer-events: none;
  background: conic-gradient(from 20deg, transparent, rgba(214, 183, 106, 0.15), transparent, rgba(126, 95, 208, 0.15), transparent);
  animation: orbit 12s linear infinite;
  opacity: 0.8;
}

.orbit-stage,
.actions,
.result-panel {
  position: relative;
  z-index: 1;
}

.orbit-stage {
  min-height: 370px;
  display: grid;
  place-items: center;
}

.orb {
  position: absolute;
  border: 1px solid rgba(214, 183, 106, 0.24);
  border-radius: 50%;
}

.orb-one {
  width: min(78vw, 330px);
  height: min(78vw, 330px);
}

.orb-two {
  width: min(62vw, 260px);
  height: min(62vw, 260px);
  animation: orbit 18s linear infinite;
}

.orb-three {
  width: min(44vw, 182px);
  height: min(44vw, 182px);
  animation: orbit 13s linear reverse infinite;
}

.mini-card {
  position: absolute;
  width: 46px;
  height: 68px;
  border: 1px solid rgba(214, 183, 106, 0.5);
  border-radius: 10px;
  background: linear-gradient(150deg, #19111f, #07050a);
  box-shadow: 0 0 20px rgba(214, 183, 106, 0.15);
}

.mini-card-one {
  transform: translate(-132px, -76px) rotate(-18deg);
}

.mini-card-two {
  transform: translate(136px, -24px) rotate(18deg);
}

.mini-card-three {
  transform: translate(-108px, 110px) rotate(12deg);
}

.daily-card {
  position: relative;
  width: min(56vw, 198px);
  min-width: 178px;
  height: 296px;
  perspective: 1200px;
  filter: drop-shadow(0 24px 70px rgba(0, 0, 0, 0.42));
  transition: filter 520ms ease, transform 520ms ease;
}

.has-result .daily-card {
  transform: translateY(-10px) scale(1.035);
  filter: drop-shadow(0 34px 80px rgba(214, 183, 106, 0.34));
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1350ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.has-result .card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid var(--gold-bright);
  border-radius: 24px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 22px 72px rgba(214, 183, 106, 0.2);
}

.card-back {
  align-items: center;
  justify-content: center;
  gap: 26px;
  background:
    radial-gradient(circle at 50% 42%, rgba(214, 183, 106, 0.18), transparent 24%),
    linear-gradient(150deg, #241834, #0b0810 76%);
}

.card-back::before,
.card-back::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(214, 183, 106, 0.45);
  border-radius: 18px;
  pointer-events: none;
}

.card-back::before {
  inset: 18px;
}

.card-back::after {
  width: 52%;
  aspect-ratio: 1;
  border-radius: 50%;
  border-style: dashed;
}

.cat-eye-back {
  position: relative;
  z-index: 1;
  width: 128px;
  height: 96px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 28px rgba(214, 183, 106, 0.42));
}

.cat-ear {
  position: absolute;
  top: 0;
  width: 34px;
  height: 42px;
  border: 1px solid rgba(243, 216, 146, 0.7);
  background: linear-gradient(145deg, rgba(214, 183, 106, 0.18), rgba(116, 82, 160, 0.08));
  transform: rotate(45deg);
}

.cat-ear-left {
  left: 24px;
  border-radius: 10px 4px 12px 4px;
}

.cat-ear-right {
  right: 24px;
  border-radius: 4px 10px 4px 12px;
}

.cat-eye-shape {
  position: relative;
  width: 118px;
  height: 58px;
  border: 1px solid rgba(243, 216, 146, 0.88);
  border-radius: 78% 22% 78% 22% / 50% 50% 50% 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(246, 228, 166, 0.96), rgba(214, 183, 106, 0.46) 34%, rgba(116, 82, 160, 0.12) 68%, transparent 72%),
    linear-gradient(135deg, rgba(214, 183, 106, 0.18), rgba(15, 10, 20, 0.42));
  transform: rotate(45deg);
  box-shadow: inset 0 0 28px rgba(243, 216, 146, 0.22), 0 0 34px rgba(214, 183, 106, 0.3);
}

.cat-eye-shape::before,
.cat-eye-shape::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 28px;
  height: 1px;
  background: rgba(243, 216, 146, 0.68);
}

.cat-eye-shape::before {
  right: 100%;
}

.cat-eye-shape::after {
  left: 100%;
}

.cat-eye-pupil {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 42px;
  border-radius: 999px;
  background: #130b1c;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 14px rgba(19, 11, 28, 0.7);
}

.back-label {
  position: relative;
  z-index: 1;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.32em;
}

.card-front {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 50% 36%, rgba(214, 183, 106, 0.12), transparent 24%),
    linear-gradient(160deg, #2b1d3f, #0b0810 78%);
}

.card-front-content {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 420ms ease;
}

.card-face-reversed {
  transform: rotate(180deg);
}

.card-front::after {
  content: "";
  position: absolute;
  inset: 30px;
  border: 1px solid rgba(214, 183, 106, 0.34);
  border-radius: 50%;
  border-style: dashed;
  opacity: 0.56;
  pointer-events: none;
}

.card-meta {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin: 0;
  color: var(--gold-bright);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-illustration {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 0;
}

.card-illustration::before {
  content: "";
  position: absolute;
  width: 92%;
  aspect-ratio: 1;
  border: 1px solid rgba(214, 183, 106, 0.28);
  border-radius: 50%;
  box-shadow: inset 0 0 34px rgba(214, 183, 106, 0.06), 0 0 32px rgba(214, 183, 106, 0.12);
}

.cat-card-svg {
  position: relative;
  z-index: 1;
  width: 112%;
  max-width: 178px;
  overflow: visible;
}

.cat-card-svg-semantic {
  width: 132%;
  max-width: 212px;
}

.cat-card-svg-semantic .cat-motif-line {
  stroke-width: 2.8;
}

.cat-card-svg-semantic .cat-motif-line.strong {
  stroke-width: 3.7;
}

.cat-line,
.cat-motif-line {
  fill: none;
  stroke: var(--gold-bright);
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 7px rgba(214, 183, 106, 0.24));
}

.cat-line {
  stroke-width: 3;
}

.cat-motif-line {
  stroke-width: 2;
}

.cat-motif-line.strong {
  stroke-width: 3.2;
}

.cat-line.thin {
  stroke-width: 1.5;
  opacity: 0.76;
}

.cat-wash {
  fill: rgba(116, 82, 160, 0.28);
}

.cat-eye,
.cat-motif-fill {
  fill: var(--gold-bright);
}

.cat-motif {
  opacity: 0.86;
  transform-origin: 112px 112px;
  transform: scale(0.72) translate(40px, 26px);
}

.classic-card-mark {
  position: relative;
  z-index: 1;
  color: var(--gold-bright);
  text-align: center;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.result-subtitle,
.keywords {
  margin: 8px 0 0;
  color: var(--muted);
}

.result-heading {
  padding-top: 6px;
}

.result-heading h2 {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 2rem;
  line-height: 1.08;
}

.result-one-liner {
  margin: 10px 0 0;
  color: var(--gold-bright);
  line-height: 1.72;
}

.keywords {
  color: var(--gold-bright);
  font-size: 0.84rem;
}

.result-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(8px);
  transition: max-height 520ms ease, opacity 420ms ease, transform 420ms ease;
}

.has-result .result-panel {
  max-height: 420px;
  opacity: 1;
  transform: translateY(0);
}

.reading-block {
  border-top: 1px solid rgba(214, 183, 106, 0.2);
  padding-top: 16px;
  margin-top: 16px;
}

.reading-block h3 {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.86rem;
  letter-spacing: 0.14em;
}

.reading-block p {
  margin: 0;
  color: var(--text);
  line-height: 1.82;
}

.advice-block p {
  color: var(--gold-bright);
}

.reading-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.reading-icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: 0;
  border: 1px solid rgba(214, 183, 106, 0.42);
  border-radius: 999px;
  color: var(--gold-bright);
  background: rgba(214, 183, 106, 0.08);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  font-size: 1rem;
  cursor: pointer;
}

.reading-icon-button[hidden] {
  display: none;
}

.reading-icon-button:active {
  transform: translateY(1px) scale(0.96);
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 20;
  min-width: 168px;
  transform: translate(-50%, 12px);
  border: 1px solid rgba(214, 183, 106, 0.45);
  border-radius: 999px;
  padding: 12px 18px;
  color: var(--gold-bright);
  background: rgba(15, 10, 20, 0.92);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.38);
  text-align: center;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.copy-toast[hidden] {
  display: none;
}

.share-image-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
}

.share-image-modal[hidden] {
  display: none;
}

.share-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 2, 6, 0.22);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.share-modal-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 380px);
  max-height: min(88vh, 780px);
  display: grid;
  gap: 12px;
  border: 1px solid rgba(214, 183, 106, 0.42);
  border-radius: 24px;
  padding: 16px;
  background: rgba(18, 12, 25, 0.34);
  backdrop-filter: blur(8px) saturate(130%);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.share-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.share-modal-kicker {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.share-modal-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.25rem;
}

.share-modal-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(214, 183, 106, 0.34);
  border-radius: 999px;
  color: var(--gold-bright);
  background: rgba(214, 183, 106, 0.08);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.share-modal-body {
  max-height: min(58vh, 520px);
  overflow: auto;
  border-radius: 16px;
}

.share-modal-body img {
  display: block;
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(214, 183, 106, 0.22);
}

.share-image-download {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  border-radius: 14px;
  color: #100b13;
  background: linear-gradient(135deg, #f7e7b8, #d6b76a);
  font-weight: 900;
  text-decoration: none;
}

.actions {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.draw-button {
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 17px 18px;
  color: #100b13;
  background: linear-gradient(135deg, #f5dfa0, #d6b76a 55%, #bd8f3f);
  box-shadow: 0 18px 44px rgba(214, 183, 106, 0.26);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  cursor: pointer;
}

.draw-button:active {
  transform: translateY(1px) scale(0.99);
}

.has-result .draw-button {
  background: linear-gradient(135deg, #f7e7b8, #d6b76a);
}

.redraw-button {
  width: 100%;
  border: 1px solid rgba(214, 183, 106, 0.42);
  border-radius: 18px;
  padding: 14px 18px;
  color: var(--gold-bright);
  background: rgba(214, 183, 106, 0.08);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.redraw-button[hidden] {
  display: none;
}

.redraw-button:active {
  transform: translateY(1px) scale(0.99);
}

.footer-note {
  margin: 0;
  color: rgba(189, 169, 129, 0.82);
  text-align: center;
  font-size: 0.88rem;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 420px) {
  .premium-app {
    padding: 18px;
  }

  .oracle-panel {
    border-radius: 28px;
    padding: 18px;
  }

  .orbit-stage {
    min-height: 340px;
  }

  .mini-card-one {
    transform: translate(-118px, -72px) rotate(-18deg);
  }

  .mini-card-two {
    transform: translate(120px, -18px) rotate(18deg);
  }

  .mini-card-three {
    transform: translate(-96px, 98px) rotate(12deg);
  }
}
