/* =========================================================================
   Daily Horoscope — tools.css
   Shared styles for every page in /tools/ (loaded after style.css).

   Contents
   1.  Page background & breadcrumb
   2.  Tool hero
   3.  Tool panel & form layout (choice chips, segmented controls)
   4.  Result card & result building blocks
       (stats, tags, swatches, meters, ring meter, tables, verdicts)
   5.  Result actions (copy / share / reset)
   6.  Content sections (how to use, how it works, education, FAQ)
   7.  Related tools & disclaimer
   8.  Shared tool animations (3D flip, glow, progress)
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. PAGE BACKGROUND & BREADCRUMB
   ------------------------------------------------------------------------- */
.tool-page main {
  position: relative;
  isolation: isolate;
}
.tool-page main::before {
  content: "";
  position: absolute;
  top: calc(var(--header-h) * -1);
  left: 0;
  right: 0;
  z-index: -1;
  height: 620px;
  background: var(--hero-bg);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
  pointer-events: none;
}

.breadcrumb { padding-top: 1.25rem; }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem .4rem;
  padding: 0;
  list-style: none;
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: .4rem; }
.breadcrumb li + li::before {
  content: "›";
  font-size: 1rem;
  line-height: 1;
  color: var(--c-gold-bright);
}
.breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--c-text-muted);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb [aria-current="page"] { font-weight: 600; color: var(--c-text); }

/* -------------------------------------------------------------------------
   2. TOOL HERO
   ------------------------------------------------------------------------- */
.tool-hero {
  padding: clamp(1.75rem, 4vw, 2.75rem) 0 clamp(1.75rem, 4vw, 2.5rem);
  text-align: center;
}
.tool-hero-icon {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  border-radius: 20px;
  background: var(--grad-primary);
  color: #f8dc9b;
  box-shadow: 0 12px 30px rgba(109, 40, 217, .32), 0 0 0 6px var(--c-primary-soft);
  animation: floaty 6s ease-in-out infinite;
}
.tool-hero-icon .icon { width: 30px; height: 30px; }
.tool-hero h1 {
  max-width: 24ch;
  margin-inline: auto;
  font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.9rem);
}
.tool-hero-intro {
  max-width: 62ch;
  margin: 1rem auto 0;
  font-size: var(--fs-md);
  color: var(--c-text-muted);
}
.tool-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-top: 1.25rem;
  padding: 0;
  list-style: none;
}

/* -------------------------------------------------------------------------
   3. TOOL PANEL & FORMS
   ------------------------------------------------------------------------- */
.tool-section { padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.tool-shell { max-width: 860px; margin-inline: auto; }
.tool-shell-wide { max-width: 1100px; }

.tool-panel {
  position: relative;
  padding: clamp(1.25rem, 3.5vw, 2.25rem);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  background: var(--c-glass);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: var(--shadow-md);
}
.tool-panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 12%;
  right: 12%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--c-gold-bright), transparent);
  opacity: .8;
}
.tool-panel-title {
  margin-bottom: 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem);
}

.tool-form { display: grid; gap: 1.25rem; }
.form-grid { display: grid; gap: 1.25rem; }
@media (min-width: 576px) {
  .form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.form-span-full { grid-column: 1 / -1; }

.fieldset {
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
}
.fieldset legend {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: 0 .5rem;
  font-weight: 700;
  color: var(--c-heading);
}
.fieldset legend .icon { color: var(--c-gold-bright); }
.fieldset > .form-grid { margin-top: .25rem; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  padding-top: .25rem;
}
.form-actions .btn-primary { flex: 1 1 220px; }
@media (min-width: 576px) {
  .form-actions .btn-primary { flex: 0 1 auto; min-width: 220px; }
}
.form-note { font-size: var(--fs-xs); color: var(--c-text-muted); }

/* Choice chips (radio / checkbox cards) */
.choice-group {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  margin: 0;
  padding: 0;
  border: 0;
}
.choice-group legend { margin-bottom: .55rem; padding: 0; }
.choice { position: relative; }
.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.choice-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  min-height: 56px;
  height: 100%;
  padding: .75rem .85rem;
  border: 1.5px solid var(--c-border-strong);
  border-radius: var(--radius-md);
  background: var(--c-input-bg);
  text-align: center;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--t-fast), background-color var(--t-fast), box-shadow var(--t-base), transform var(--t-fast);
}
.choice-label small { font-weight: 400; color: var(--c-text-muted); font-size: var(--fs-xs); }
.choice-label:hover { border-color: var(--c-primary); }
.choice input:checked + .choice-label {
  border-color: var(--c-primary);
  background: var(--c-primary-soft);
  box-shadow: 0 0 0 3px var(--c-primary-soft);
  color: var(--c-primary);
}
.choice input:focus-visible + .choice-label { outline: 3px solid var(--c-focus); outline-offset: 2px; }

/* Segmented control (two-to-four options in a row) */
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .25rem;
  padding: .3rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  background: var(--c-surface-2);
}
.segmented .choice-label {
  min-height: 44px;
  padding: .45rem 1rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
}
.segmented .choice input:checked + .choice-label {
  color: #fff;
  background: var(--grad-primary);
  box-shadow: 0 6px 16px rgba(109, 40, 217, .3);
}

/* Sign picker grid (12 zodiac buttons) */
.sign-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
}
@media (min-width: 576px) { .sign-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 768px) { .sign-picker { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.sign-picker .choice-label { min-height: 84px; }
.sign-picker .choice-label svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--c-gold-bright);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* -------------------------------------------------------------------------
   4. RESULT CARD
   ------------------------------------------------------------------------- */
.result { margin-top: 1.75rem; scroll-margin-top: calc(var(--header-h) + 20px); }
.result:focus { outline: none; }

.result-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(1.35rem, 3.5vw, 2.25rem);
  border: 1px solid color-mix(in srgb, var(--c-gold-bright) 40%, transparent);
  border-radius: var(--radius-xl);
  background: var(--c-glass-strong);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: var(--glow-gold), var(--shadow-md);
}
.result-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70% 55% at 100% 0%, var(--c-gold-soft), transparent 70%),
    radial-gradient(60% 50% at 0% 100%, var(--c-primary-soft), transparent 70%);
}
.result-card.is-animating { animation: resultIn .7s var(--ease-out) both; }
.result-card.is-animating .result-body > * {
  animation: fadeUp .6s var(--ease-out) both;
}
.result-card.is-animating .result-body > *:nth-child(1) { animation-delay: .1s; }
.result-card.is-animating .result-body > *:nth-child(2) { animation-delay: .18s; }
.result-card.is-animating .result-body > *:nth-child(3) { animation-delay: .26s; }
.result-card.is-animating .result-body > *:nth-child(4) { animation-delay: .34s; }
.result-card.is-animating .result-body > *:nth-child(5) { animation-delay: .42s; }
.result-card.is-animating .result-body > *:nth-child(n+6) { animation-delay: .5s; }

.result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--c-border);
}
.result-head-center { flex-direction: column; text-align: center; }
.result-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #f8dc9b;
  box-shadow: 0 0 0 5px var(--c-gold-soft), 0 0 34px rgba(201, 149, 47, .35);
  animation: pulseGlow 3s ease-in-out infinite;
}
.result-icon svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.result-icon-text { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1; }
.result-kicker {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-gold);
}
.result-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem);
  line-height: 1.15;
  color: var(--c-heading);
}
.result-sub { margin-top: .25rem; color: var(--c-text-muted); }

.result-body > * + * { margin-top: 1.35rem; }
.result-section h3,
.result-section-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .65rem;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--c-heading);
}
.result-section h3 .icon,
.result-section-title .icon { color: var(--c-gold-bright); }
.result-section p { color: var(--c-text-muted); }
.result-section p + p { margin-top: .6rem; }

/* Stat tiles */
.stat-grid {
  display: grid;
  gap: .7rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
}
.stat {
  padding: .85rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-surface);
}
.stat-label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}
.stat-value {
  display: block;
  margin-top: .2rem;
  font-weight: 650;
  color: var(--c-heading);
  line-height: 1.35;
}
.stat-value-lg { font-family: var(--font-display); font-size: 1.6rem; color: var(--c-gold); }
.stat-highlight { border-color: color-mix(in srgb, var(--c-gold-bright) 45%, transparent); background: var(--c-gold-soft); }

/* Tags */
.tag-list { display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; list-style: none; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .8rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-primary);
  background: var(--c-primary-soft);
  border: 1px solid color-mix(in srgb, var(--c-primary) 22%, transparent);
}
.tag-positive { color: var(--c-success); background: color-mix(in srgb, var(--c-success) 12%, transparent); border-color: color-mix(in srgb, var(--c-success) 25%, transparent); }
.tag-negative { color: var(--c-error); background: color-mix(in srgb, var(--c-error) 10%, transparent); border-color: color-mix(in srgb, var(--c-error) 25%, transparent); }
.tag-gold { color: var(--c-gold); background: var(--c-gold-soft); border-color: color-mix(in srgb, var(--c-gold-bright) 35%, transparent); }

/* Colour swatches */
.swatch-list { display: flex; flex-wrap: wrap; gap: .75rem; padding: 0; list-style: none; }
.swatch {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .35rem .85rem .35rem .35rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  background: var(--c-surface);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.swatch-chip {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--swatch, #999);
  border: 2px solid var(--c-surface);
  box-shadow: 0 0 0 1px var(--c-border-strong), 0 4px 12px color-mix(in srgb, var(--swatch, #999) 45%, transparent);
}

/* Linear meters */
.meter-list { display: grid; gap: .9rem; }
.meter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: .35rem;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.meter-head span { display: inline-flex; align-items: center; gap: .4rem; }
.meter-head .icon { color: var(--c-gold-bright); }
.meter-head span:last-child { color: var(--c-gold); font-variant-numeric: tabular-nums; }
.meter-track {
  position: relative;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--c-surface-2);
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--grad-primary);
  transition: width 1.1s var(--ease-out);
}
.meter-fill-gold { background: var(--grad-gold); }

/* Circular ring meter (SVG with pathLength="100") */
.ring {
  position: relative;
  width: min(200px, 60vw);
  aspect-ratio: 1;
  margin-inline: auto;
}
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--c-surface-2); stroke-width: 10; }
.ring-fill {
  fill: none;
  stroke: url(#ring-gradient);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 1.4s var(--ease-out);
}
.ring-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.ring-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.6rem + 2vw, 2.8rem);
  font-weight: 700;
  line-height: 1;
  color: var(--c-heading);
  font-variant-numeric: tabular-nums;
}
.ring-caption { margin-top: .3rem; font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--c-text-muted); }

/* Step-by-step calculation */
.calc-steps {
  display: grid;
  gap: .5rem;
  padding: 0;
  list-style: none;
  counter-reset: calc;
}
.calc-steps li {
  position: relative;
  padding: .7rem .9rem .7rem 2.8rem;
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--radius-md);
  background: var(--c-surface);
  font-size: var(--fs-sm);
  counter-increment: calc;
}
.calc-steps li::before {
  content: counter(calc);
  position: absolute;
  left: .8rem;
  top: .7rem;
  display: grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-primary);
}
.calc-steps code,
.mono {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .92em;
  color: var(--c-heading);
  overflow-wrap: anywhere;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  -webkit-overflow-scrolling: touch;
}
.data-table { width: 100%; min-width: 520px; font-size: var(--fs-sm); }
.data-table caption {
  padding: .9rem 1rem;
  text-align: left;
  font-weight: 700;
  color: var(--c-heading);
}
.data-table th,
.data-table td {
  padding: .75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
}
.data-table thead th {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  background: var(--c-surface-2);
  white-space: nowrap;
}
.data-table tbody tr:last-child td,
.data-table tbody tr:last-child th { border-bottom: 0; }
.data-table tbody tr { transition: background-color var(--t-fast); }
.data-table tbody tr:hover { background: var(--c-primary-soft); }
.data-table tr.is-current {
  background: var(--c-gold-soft);
  box-shadow: inset 4px 0 0 var(--c-gold-bright);
}
.data-table tfoot td,
.data-table tfoot th {
  font-weight: 700;
  color: var(--c-heading);
  background: var(--c-surface-2);
  border-top: 2px solid var(--c-border-strong);
  border-bottom: 0;
}
.num { text-align: right !important; font-variant-numeric: tabular-nums; }

/* Verdict banners */
.verdict {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--verdict-c);
  background: color-mix(in srgb, var(--verdict-c) 10%, transparent);
}
.verdict .icon { margin-top: .15rem; color: var(--verdict-c); }
.verdict strong { display: block; color: var(--c-heading); }
.verdict p { margin-top: .2rem; font-size: var(--fs-sm); color: var(--c-text-muted); }
.verdict-good { --verdict-c: var(--c-success); }
.verdict-mid { --verdict-c: var(--c-gold-bright); }
.verdict-low { --verdict-c: var(--c-error); }

/* Empty / placeholder state inside result area */
.result-placeholder {
  display: grid;
  place-items: center;
  gap: .5rem;
  padding: 2rem 1rem;
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
}

/* -------------------------------------------------------------------------
   5. RESULT ACTIONS
   ------------------------------------------------------------------------- */
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--c-border);
}
@media (max-width: 575.98px) {
  .result-actions .btn { flex: 1 1 calc(50% - .3rem); }
}

/* -------------------------------------------------------------------------
   6. CONTENT SECTIONS
   ------------------------------------------------------------------------- */
.content-section { padding-block: clamp(2.25rem, 5vw, 3.5rem); }
.content-section-alt { background: var(--c-bg-alt); }
.content-wrap { max-width: 860px; margin-inline: auto; }
.content-wrap > h2 { margin-bottom: 1rem; }
.content-wrap > h2 + p { color: var(--c-text-muted); }

/* Numbered "how to use" list */
.steps-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 0;
  list-style: none;
  counter-reset: howto;
}
.steps-list li {
  position: relative;
  min-height: 2.5rem;
  padding: .15rem 0 0 3.5rem;
  counter-increment: howto;
}
.steps-list li::before {
  content: counter(howto);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--c-gold);
  border: 1px solid color-mix(in srgb, var(--c-gold-bright) 50%, transparent);
  background: var(--c-gold-soft);
}
.steps-list strong { color: var(--c-heading); }

/* Educational info cards */
.info-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}
.info-card {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  transition: border-color var(--t-base), transform var(--t-base) var(--ease-out);
}
.info-card:hover { border-color: var(--c-border-strong); transform: translateY(-2px); }
.info-card h3 {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .4rem;
  font-size: 1.02rem;
}
.info-card p { font-size: var(--fs-sm); color: var(--c-text-muted); }
.info-num {
  display: inline-grid;
  place-items: center;
  min-width: 2.1rem;
  height: 2.1rem;
  padding: 0 .4rem;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  background: var(--grad-primary);
}

/* -------------------------------------------------------------------------
   7. RELATED TOOLS & DISCLAIMER
   ------------------------------------------------------------------------- */
.related-tools .tool-grid { margin-top: 1.25rem; }

.disclaimer-box {
  display: flex;
  gap: .85rem;
  max-width: 860px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--radius-lg);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}
.disclaimer-box .icon { margin-top: .1rem; color: var(--c-gold-bright); }
.disclaimer-box a { font-weight: 600; }

/* -------------------------------------------------------------------------
   8. SHARED TOOL ANIMATIONS & HELPERS
   ------------------------------------------------------------------------- */
@keyframes resultIn {
  0% { opacity: 0; transform: translateY(24px) scale(.97); filter: blur(4px); }
  100% { opacity: 1; transform: none; filter: none; }
}
@keyframes twinkle {
  0%, 100% { opacity: .3; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* Generic 3D flip card (front/back faces) */
.flip-card { perspective: 1200px; }
.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .9s var(--ease-out);
}
.flip-card.is-flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: inherit;
}
.flip-back { transform: rotateY(180deg); }

/* Progress bar (quizzes, multi-step tools) */
.progress {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--c-surface-2);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--grad-gold);
  transition: width .5s var(--ease-out);
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: .45rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-text-muted);
}

/* Big decorative number / glyph */
.big-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 2rem + 5vw, 5rem);
  font-weight: 700;
  line-height: 1;
}

/* Two-column result layout */
.result-split { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 768px) {
  .result-split { grid-template-columns: auto minmax(0, 1fr); gap: 2rem; }
}

/* Inline checkbox (e.g. "I don't know my birth time") */
.check-inline {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 40px;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  cursor: pointer;
}
.check-inline input { width: 18px; height: 18px; accent-color: var(--c-primary); }
.input:disabled { opacity: .5; cursor: not-allowed; }

/* Collapsible technical details */
.tech-details {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-surface);
}
.tech-details summary {
  padding: .85rem 1rem;
  min-height: 44px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-heading);
  cursor: pointer;
}
.tech-details dl {
  display: grid;
  gap: .1rem;
  padding: 0 1rem 1rem;
  font-size: var(--fs-sm);
}
.tech-details dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .45rem 0;
  border-bottom: 1px dashed var(--c-border);
}
.tech-details dl > div:last-child { border-bottom: 0; }
.tech-details dt { color: var(--c-text-muted); }
.tech-details dd { margin: 0; font-weight: 600; text-align: right; color: var(--c-heading); }

/* -------------------------------------------------------------------------
   9. ZODIAC & HOROSCOPE TOOLS
   ------------------------------------------------------------------------- */

/* Star ratings */
.stars {
  margin-left: auto;
  font-size: 1rem;
  letter-spacing: .08em;
  color: var(--c-gold-bright);
  white-space: nowrap;
}

/* Horoscope category cards */
.horo-grid { display: grid; gap: .9rem; }
@media (min-width: 768px) { .horo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.horo-card {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
}
.horo-card h3 {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .45rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
}
.horo-card h3 .icon { color: var(--c-gold-bright); }
.horo-card p { font-size: var(--fs-sm); color: var(--c-text-muted); }

.swatch-inline {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: .4rem;
  vertical-align: -3px;
  border-width: 1px;
}

/* Big Three placement cards */
.big3-grid { display: grid; gap: .9rem; }
@media (min-width: 576px) { .big3-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.placement-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  padding: 1.35rem 1rem 1.2rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  text-align: center;
}
.placement-sun { border-color: color-mix(in srgb, var(--c-gold-bright) 45%, transparent); }
.placement-moon { border-color: color-mix(in srgb, var(--c-primary) 40%, transparent); }
.placement-rising { border-color: color-mix(in srgb, var(--c-accent) 40%, transparent); }
.placement-card.is-unknown { opacity: .7; border-style: dashed; }
.placement-label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}
.placement-glyph {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: .35rem 0;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #f8dc9b;
  box-shadow: 0 0 0 4px var(--c-gold-soft);
}
.placement-glyph svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.placement-sign { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--c-heading); }
.placement-deg { font-size: var(--fs-sm); color: var(--c-gold); font-variant-numeric: tabular-nums; }
.placement-role { font-size: var(--fs-xs); color: var(--c-text-muted); }

/* Personality quiz */
.quiz-question {
  min-width: 0;
  margin: 1.5rem 0 0;
  padding: 0;
  border: 0;
  animation: fadeUp .4s var(--ease-out);
}
.quiz-question legend {
  margin-bottom: 1rem;
  padding: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.05rem + .8vw, 1.55rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--c-heading);
}
.quiz-question legend:focus { outline: none; }
.quiz-options { display: grid; gap: .65rem; }
.quiz-options .choice-label {
  flex-direction: row;
  justify-content: flex-start;
  gap: .9rem;
  min-height: 60px;
  padding: .85rem 1rem;
  text-align: left;
  font-weight: 500;
}
.quiz-letter {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  font-weight: 700;
  font-size: var(--fs-xs);
  color: var(--c-primary);
  background: var(--c-primary-soft);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.quiz-options .choice input:checked + .choice-label .quiz-letter { color: #fff; background: var(--grad-primary); }
.quiz-nav { justify-content: space-between; margin-top: 1.25rem; }
.quiz-nav .btn-primary { flex: 0 1 auto; min-width: 180px; }

/* -------------------------------------------------------------------------
   10. LOVE & COMPATIBILITY TOOLS
   ------------------------------------------------------------------------- */

/* Two inputs with a connector in the middle */
.pair-form { display: grid; gap: 1rem; align-items: end; }
@media (min-width: 576px) {
  .pair-form { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
}
.pair-swap {
  justify-self: center;
  border: 1px solid var(--c-border-strong);
  background: var(--c-surface);
  color: var(--c-primary);
}
.pair-swap:hover { transform: rotate(180deg); }
.pair-heart {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  justify-self: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #ec4899, #be185d);
  box-shadow: 0 6px 18px rgba(236, 72, 153, .35);
  animation: heartbeat 1.6s ease-in-out infinite;
}
.pair-heart .icon { fill: currentColor; stroke: none; }
.pair-heart-static { margin-bottom: 2px; }
.pair-glyphs { display: flex; align-items: center; gap: .65rem; }
.pair-glyphs .result-icon { width: 64px; height: 64px; }
.pair-glyphs .result-icon svg { width: 32px; height: 32px; }

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.15); }
  30% { transform: scale(1); }
  45% { transform: scale(1.1); }
}

.ring-value small { font-size: .45em; color: var(--c-text-muted); }

/* Name love calculator heart */
.love-heart {
  position: relative;
  width: min(240px, 70vw);
  margin-inline: auto;
}
.love-heart svg { width: 100%; height: auto; overflow: visible; }
.heart-bg { fill: var(--c-surface-2); }
.heart-outline { fill: none; stroke: #ec4899; stroke-width: 2.5; }
.heart-level {
  fill: url(#ring-gradient);
  transform: translateY(100%);
  transform-box: fill-box;
  transition: transform 1.6s var(--ease-out);
}
.love-heart-label {
  position: absolute;
  inset: 0 0 12% 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.love-heart-label .ring-value { color: var(--c-heading); text-shadow: 0 2px 12px var(--c-surface); }
.floating-hearts { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.floating-hearts span {
  position: absolute;
  bottom: 20%;
  color: #ec4899;
  opacity: 0;
  animation: floatHeart 2.6s ease-out forwards;
}
@keyframes floatHeart {
  0% { opacity: 0; transform: translateY(0) scale(.6); }
  20% { opacity: .9; }
  100% { opacity: 0; transform: translateY(-160px) scale(1.2) rotate(15deg); }
}

/* FLAMES */
.flames-box {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
}
.fl-names { display: grid; gap: .6rem; margin: 1rem 0 .75rem; }
.fl-row { display: grid; gap: .35rem; }
.fl-label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-text-muted); }
.fl-letters { display: flex; flex-wrap: wrap; gap: .3rem; }
.fl-letter {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 34px;
  border-radius: 8px;
  font-weight: 700;
  color: var(--c-heading);
  background: var(--c-primary-soft);
}
.fl-letter.is-struck { color: var(--c-text-muted); background: transparent; text-decoration: line-through; text-decoration-color: #ec4899; text-decoration-thickness: 2px; opacity: .6; }
.fl-word { display: flex; justify-content: center; gap: .4rem; margin-top: 1rem; }
.fl-word span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--c-text-muted);
  border: 1px solid var(--c-border);
  text-decoration: line-through;
}
.fl-word span.is-final {
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, #ec4899, #a21caf);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(236, 72, 153, .35);
  transform: scale(1.12);
}

/* Kundli person cards and koota table */
.person-card {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
}
.person-card h3 {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .6rem;
  font-family: var(--font-body);
  font-size: 1.02rem;
}
.person-card h3 .icon { color: var(--c-gold-bright); }
.kv-list { display: grid; gap: .1rem; font-size: var(--fs-sm); }
.kv-list > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .4rem 0;
  border-bottom: 1px dashed var(--c-border);
}
.kv-list > div:last-child { border-bottom: 0; }
.kv-list dt { color: var(--c-text-muted); }
.kv-list dd { margin: 0; font-weight: 600; text-align: right; color: var(--c-heading); }
.koota-table { min-width: 0; }
.koota-table th small { display: block; font-weight: 400; font-size: .78rem; color: var(--c-text-muted); }
@media (max-width: 575.98px) {
  .koota-table th,
  .koota-table td { padding: .6rem .5rem; font-size: .82rem; }
  .koota-table th small { display: none; }
  .koota-table thead th { letter-spacing: .04em; }
}
.koota-table tr.is-zero td.num strong { color: var(--c-error); }
.koota-table tr.is-full td.num strong { color: var(--c-success); }

/* -------------------------------------------------------------------------
   11. NUMEROLOGY TOOLS
   ------------------------------------------------------------------------- */
.num-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
}
.num-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.num-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  padding: 1rem .75rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  text-align: center;
  text-decoration: none;
  color: var(--c-text);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base), border-color var(--t-base);
}
a.num-card:hover { transform: translateY(-3px); border-color: var(--c-border-strong); box-shadow: var(--glow-primary); color: var(--c-text); }
.num-card.is-master { border-color: color-mix(in srgb, var(--c-gold-bright) 55%, transparent); background: var(--c-gold-soft); }
.num-card-label { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--c-text-muted); }
.num-card-value {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.1;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-theme="dark"] .num-card-value { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; }
.num-card-title { font-size: var(--fs-xs); font-weight: 600; color: var(--c-heading); }
.num-detail { scroll-margin-top: calc(var(--header-h) + 20px); padding-top: 1.25rem; border-top: 1px solid var(--c-border); }
.num-detail h3 { flex-wrap: wrap; }
.num-detail > * + * { margin-top: .6rem; }

.letter-chart { display: grid; gap: .65rem; }
.letter-word { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.letter-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 32px;
  padding: .3rem .25rem;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-surface);
  line-height: 1.15;
}
.letter-cell b { font-size: .95rem; color: var(--c-heading); }
.letter-cell small { font-size: .75rem; color: var(--c-primary); font-weight: 700; }
.letter-cell.is-vowel { border-color: color-mix(in srgb, var(--c-gold-bright) 55%, transparent); background: var(--c-gold-soft); }
.letter-cell.is-vowel small { color: var(--c-gold); }
.letter-total { margin-left: .35rem; font-weight: 700; color: var(--c-heading); }

.lucky-balls { display: flex; flex-wrap: wrap; gap: .75rem; padding: 0; list-style: none; }
.lucky-balls li {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #2a1a00;
  background: radial-gradient(circle at 35% 30%, #fff3cf, #e9b955 55%, #b9832b);
  box-shadow: 0 8px 18px rgba(201, 149, 47, .35), inset 0 -3px 6px rgba(0, 0, 0, .15);
  animation: popIn .5s var(--ease-out) both;
}
.lucky-balls li:nth-child(2) { animation-delay: .08s; }
.lucky-balls li:nth-child(3) { animation-delay: .16s; }
.lucky-balls li:nth-child(4) { animation-delay: .24s; }
.lucky-balls li:nth-child(5) { animation-delay: .32s; }

/* -------------------------------------------------------------------------
   12. VEDIC ASTROLOGY TOOLS
   ------------------------------------------------------------------------- */

/* South Indian rashi chart */
.rashi-chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  width: min(100%, 320px);
  aspect-ratio: 1;
  margin-inline: auto;
  border: 2px solid var(--c-gold-bright);
  border-radius: var(--radius-md);
  background: var(--c-surface);
  overflow: hidden;
}
.chart-cell {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 2px;
  padding: 16px 2px 4px;
  border: 1px solid color-mix(in srgb, var(--c-gold-bright) 40%, transparent);
}
.chart-cell.is-lagna { background: var(--c-gold-soft); }
.chart-cell.is-lagna::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-top: 14px solid var(--c-gold-bright);
  border-right: 14px solid transparent;
}
.chart-sign {
  position: absolute;
  top: 3px;
  right: 5px;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--c-text-muted);
}
.chart-planet {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 22px;
  padding: 0 4px;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--c-primary);
  background: var(--c-primary-soft);
}
.chart-planet.is-moon { color: #1d4ed8; background: rgba(59, 130, 246, .14); }
.chart-planet.is-sun { color: #b45309; background: rgba(245, 158, 11, .18); }
.chart-planet.is-mars { color: #fff; background: #dc2626; }
.chart-asc { color: #2a1a00; background: var(--grad-gold); }
[data-theme="dark"] .chart-planet.is-moon { color: #bfdbfe; }
[data-theme="dark"] .chart-planet.is-sun { color: #fde68a; }
.chart-center {
  grid-row: 2 / 4;
  grid-column: 2 / 4;
  display: grid;
  place-content: center;
  gap: .2rem;
  padding: .5rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  color: var(--c-heading);
  background:
    radial-gradient(circle, var(--c-gold-soft), transparent 70%),
    var(--c-surface-2);
}
.chart-center small { font-family: var(--font-body); font-size: .68rem; font-weight: 500; color: var(--c-text-muted); }

/* Name syllables */
.syllable-list { display: flex; flex-wrap: wrap; gap: .6rem; padding: 0; list-style: none; }
.syllable {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
  padding: .6rem .8rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-surface);
}
.syllable b { font-family: var(--font-display); font-size: 1.35rem; color: var(--c-heading); }
.syllable small { font-size: .72rem; color: var(--c-text-muted); }
.syllable.is-active { border-color: var(--c-gold-bright); background: var(--c-gold-soft); box-shadow: var(--glow-gold); }

/* Checklist */
.check-list { display: grid; gap: .5rem; padding: 0; list-style: none; }
.check-list li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--c-text-muted);
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
  background: var(--c-success);
}
[data-theme="dark"] .check-list li::before { color: #052e1f; }

/* Rahu Kaal & Choghadiya */
.stat-danger { border-color: color-mix(in srgb, var(--c-error) 45%, transparent); background: color-mix(in srgb, var(--c-error) 8%, transparent); }
.stat-danger .stat-value { color: var(--c-error); }
.nowrap { white-space: nowrap; }
.cg-bar {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 3px;
  overflow: hidden;
  border-radius: var(--radius-md);
}
.cg-seg {
  padding: .55rem .2rem;
  font-size: .68rem;
  font-weight: 700;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cg-seg.cg-good, .cg-legend .cg-good::before { background: color-mix(in srgb, var(--c-success) 22%, transparent); color: var(--c-success); }
.cg-seg.cg-neutral, .cg-legend .cg-neutral::before { background: color-mix(in srgb, var(--c-air) 20%, transparent); color: var(--c-air); }
.cg-seg.cg-bad, .cg-legend .cg-bad::before { background: color-mix(in srgb, var(--c-error) 16%, transparent); color: var(--c-error); }
.cg-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: .6rem; font-size: var(--fs-xs); color: var(--c-text-muted); }
.cg-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.cg-legend span::before { content: ""; width: 14px; height: 14px; border-radius: 4px; }
.cg-table tbody tr.cg-good th { color: var(--c-success); }
.cg-table tbody tr.cg-bad th { color: var(--c-error); }
@media (max-width: 575.98px) {
  .cg-seg { font-size: 0; padding: .7rem 0; }
  .cg-table td:last-child, .cg-table th:last-child,
  .cg-table td:nth-child(3), .cg-table thead th:nth-child(3) { display: none; }
  .cg-table th, .cg-table td { padding: .65rem .6rem; }
  .cg-table { min-width: 0; }
}

/* -------------------------------------------------------------------------
   13. TAROT & FORTUNE TOOLS
   ------------------------------------------------------------------------- */

/* Deck shown in the form */
.tarot-deck {
  position: relative;
  width: 96px;
  height: 160px;
  margin: 0 auto .5rem;
}
.tarot-deck span {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 2px solid var(--c-gold-bright);
  background:
    radial-gradient(circle at 50% 50%, rgba(242, 200, 107, .35) 0 12%, transparent 13%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .06) 0 6px, transparent 6px 12px),
    linear-gradient(160deg, #3b1a78, #1d1145);
  box-shadow: var(--shadow-md);
}
.tarot-deck span:nth-child(1) { transform: rotate(-6deg) translateX(-6px); }
.tarot-deck span:nth-child(2) { transform: rotate(3deg) translateX(4px); }
.tarot-deck.is-shuffling span:nth-child(1) { animation: shuffleL .42s ease-in-out 3; }
.tarot-deck.is-shuffling span:nth-child(2) { animation: shuffleR .42s ease-in-out 3; }
.tarot-deck.is-shuffling span:nth-child(3) { animation: shuffleUp .42s ease-in-out 3; }
@keyframes shuffleL { 50% { transform: translateX(-46px) rotate(-14deg); } }
@keyframes shuffleR { 50% { transform: translateX(46px) rotate(14deg); } }
@keyframes shuffleUp { 50% { transform: translateY(-14px); } }

/* Spread */
.tarot-spread {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.1rem;
}
.tarot-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  width: clamp(104px, 26vw, 150px);
  animation: dealIn .6s var(--ease-out) both;
  animation-delay: calc(var(--d, 0) * 150ms);
}
.spread-love .tarot-slot { width: clamp(96px, 27vw, 128px); }
@keyframes dealIn {
  from { opacity: 0; transform: translateY(-40px) rotate(-8deg) scale(.9); }
  to { opacity: 1; transform: none; }
}
.tarot-pos {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-gold);
  text-align: center;
}
.tarot-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 7 / 12;
  border-radius: 14px;
  cursor: pointer;
  perspective: 1000px;
  transition: transform var(--t-base) var(--ease-out);
}
.tarot-card:hover:not(.is-flipped) { transform: translateY(-6px); }
.tarot-card .flip-inner { display: block; border-radius: inherit; }
.tarot-card.is-flipped .flip-inner { transform: rotateY(180deg); }
.tarot-card .flip-face {
  display: flex;
  border-radius: inherit;
  box-shadow: var(--shadow-md);
}
.tarot-back {
  align-items: center;
  justify-content: center;
  border: 3px solid var(--c-gold-bright);
  background:
    radial-gradient(circle at 50% 50%, rgba(242, 200, 107, .3) 0 18%, transparent 19%),
    radial-gradient(circle at 50% 50%, transparent 0 30%, rgba(242, 200, 107, .25) 31% 32%, transparent 33%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .07) 0 6px, transparent 6px 12px),
    linear-gradient(160deg, #3b1a78, #1d1145);
}
.tarot-back svg { width: 38%; height: auto; fill: #f2c86b; stroke: none; }
.tarot-front {
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: .55rem .4rem .6rem;
  border: 3px solid var(--suit-c, #c9952f);
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--suit-c, #c9952f) 22%, transparent), transparent 62%),
    linear-gradient(180deg, #fffaf0, #f4ead2);
  color: #2b1d4f;
  text-align: center;
}
.tarot-card.is-reversed .tarot-front { transform: rotateY(180deg) rotate(180deg); }
.tarot-front.is-major { --suit-c: #7c3aed; }
.tarot-front.suit-wands { --suit-c: #e8722c; }
.tarot-front.suit-cups { --suit-c: #2f80c9; }
.tarot-front.suit-swords { --suit-c: #6b7280; }
.tarot-front.suit-pentacles { --suit-c: #c9952f; }
.tarot-num { font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: var(--suit-c); }
.tarot-art { position: relative; display: grid; place-items: center; width: 64%; aspect-ratio: 1; }
.tarot-art svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--suit-c);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tarot-art .tarot-crown { position: absolute; top: -24%; width: 46%; height: auto; stroke-width: 1.8; }
.tarot-pips { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; max-width: 80%; }
.tarot-pips i { width: 6px; height: 6px; border-radius: 50%; background: var(--suit-c); }
.tarot-name { font-family: var(--font-display); font-size: clamp(.62rem, .55rem + .3vw, .78rem); font-weight: 700; line-height: 1.2; }

.reading-list { display: grid; gap: .9rem; padding: 0; list-style: none; }
.reading-item {
  padding: 1rem 1.15rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
}
.reading-item.is-new { animation: fadeUp .5s var(--ease-out); }
.reading-item h3 { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .4rem; font-family: var(--font-body); font-size: 1.02rem; }
.reading-item p + p { margin-top: .35rem; }

/* Crystal ball */
.crystal { display: grid; justify-items: center; margin: 0 auto 1.5rem; }
.crystal-orb {
  position: relative;
  width: min(220px, 60vw);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 35% 30%, #c4b5fd 0%, #7c3aed 35%, #2e1065 75%, #1a0b3d 100%);
  box-shadow: 0 0 40px rgba(167, 139, 250, .45), inset 0 -20px 40px rgba(0, 0, 0, .4);
  transition: box-shadow .6s ease;
}
.crystal-mist {
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, .35), transparent 40%, rgba(240, 171, 252, .4), transparent 75%);
  filter: blur(14px);
  animation: spin 9s linear infinite;
}
.crystal-mist-2 { inset: 25%; animation-duration: 6s; animation-direction: reverse; opacity: .7; }
.crystal-shine {
  position: absolute;
  top: 12%;
  left: 20%;
  width: 28%;
  height: 16%;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  filter: blur(4px);
  transform: rotate(-30deg);
}
.crystal-word {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 3vw, 3rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 255, 255, .8);
  opacity: 0;
  transform: scale(.6);
  transition: opacity .6s ease, transform .6s var(--ease-out);
}
.crystal-stand {
  width: min(150px, 42vw);
  height: 36px;
  margin-top: -10px;
  border-radius: 6px 6px 14px 14px;
  background: linear-gradient(180deg, #d9a744, #8a5a00);
  clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%);
  box-shadow: var(--shadow-md);
}
.crystal.is-gazing .crystal-mist { animation-duration: 1.2s; }
.crystal.is-gazing .crystal-orb { box-shadow: 0 0 70px rgba(240, 171, 252, .8), inset 0 -20px 40px rgba(0, 0, 0, .4); animation: orbPulse 1.1s ease-in-out infinite; }
.crystal.is-answered .crystal-word { opacity: 1; transform: none; }
.crystal.answer-yes .crystal-orb { box-shadow: 0 0 60px rgba(110, 231, 183, .7), inset 0 -20px 40px rgba(0, 0, 0, .4); }
.crystal.answer-no .crystal-orb { box-shadow: 0 0 60px rgba(252, 165, 165, .7), inset 0 -20px 40px rgba(0, 0, 0, .4); }
.crystal.answer-maybe .crystal-orb { box-shadow: 0 0 60px rgba(242, 200, 107, .8), inset 0 -20px 40px rgba(0, 0, 0, .4); }
@keyframes orbPulse { 50% { transform: scale(1.03); } }
.oracle-answer { font-size: clamp(2.4rem, 1.8rem + 3vw, 3.4rem); }
.oracle-yes .oracle-answer { color: var(--c-success); }
.oracle-no .oracle-answer { color: var(--c-error); }
.oracle-maybe .oracle-answer { color: var(--c-gold); }

/* Fortune cookie */
.cookie {
  position: relative;
  display: block;
  width: 220px;
  height: 150px;
  margin: .5rem auto 1rem;
  border-radius: 20px;
  cursor: pointer;
}
.cookie-half {
  position: absolute;
  top: 25px;
  width: 112px;
  height: 100px;
  background: radial-gradient(circle at 40% 35%, #f8d48a, #e0a64a 60%, #b97a2a);
  box-shadow: inset -8px -10px 18px rgba(120, 70, 10, .35), 0 10px 20px rgba(0, 0, 0, .15);
  transition: transform .8s var(--ease-out);
  z-index: 2;
}
.cookie-left { left: 6px; border-radius: 100px 20px 20px 100px / 90px 40px 40px 90px; }
.cookie-right { right: 6px; border-radius: 20px 100px 100px 20px / 40px 90px 90px 40px; }
.cookie:hover:not(.is-cracked) .cookie-half { animation: wiggle .5s ease-in-out; }
.cookie-paper {
  position: absolute;
  left: 50%;
  top: 60px;
  width: 150px;
  height: 26px;
  margin-left: -75px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, #fffef8 0 12px, #f7f2e2 12px 13px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
  transform: scaleX(.2);
  opacity: 0;
  transition: transform .6s var(--ease-out) .35s, opacity .3s ease .3s;
  z-index: 1;
}
.cookie.is-cracked { cursor: default; }
.cookie.is-cracked .cookie-left { transform: translate(-36px, 14px) rotate(-28deg); }
.cookie.is-cracked .cookie-right { transform: translate(36px, 14px) rotate(28deg); }
.cookie.is-cracked .cookie-paper { transform: scaleX(1.25); opacity: 1; }
@keyframes wiggle { 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
.fortune-slip {
  position: relative;
  max-width: 560px;
  margin-inline: auto;
  padding: 1.5rem 1.75rem;
  border: 1px dashed #d9c48a;
  border-radius: 4px;
  background: repeating-linear-gradient(0deg, #fffef8 0 28px, #f6f0dc 28px 29px);
  color: #3b2a0a;
  box-shadow: var(--shadow-md);
  text-align: center;
  transform: rotate(-1deg);
}
.fortune-slip p { font-family: var(--font-display); font-size: clamp(1.1rem, 1rem + .6vw, 1.4rem); font-weight: 600; line-height: 1.5; }

/* -------------------------------------------------------------------------
   14. BIRTH & COSMIC INFO TOOLS
   ------------------------------------------------------------------------- */
.result-emoji { font-size: 2.6rem; line-height: 1; }

/* Gems */
.gem {
  display: block;
  width: 44px;
  height: 40px;
  clip-path: polygon(25% 0, 75% 0, 100% 35%, 50% 100%, 0 35%);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .8) 0 18%, transparent 19%),
    linear-gradient(200deg, transparent 55%, rgba(0, 0, 0, .25) 56%),
    var(--gem, #999);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .2));
}
.gem-icon .gem { width: 40px; height: 36px; }
.gem-list { display: flex; flex-wrap: wrap; gap: .85rem; padding: 0; list-style: none; }
.gem-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  min-width: 110px;
  padding: .9rem .75rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--gem) 22%, transparent), transparent 70%), var(--c-surface);
  text-align: center;
}
.gem-item .gem { width: 56px; height: 50px; animation: floaty 4s ease-in-out infinite; }
.gem-item b { color: var(--c-heading); }
.gem-item small { font-size: .72rem; color: var(--c-text-muted); }
.flower-list { display: grid; gap: .85rem; padding: 0; list-style: none; }
.flower-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
}
.flower-item b { color: var(--c-heading); }
.flower-item p { font-size: var(--fs-sm); color: var(--c-text-muted); }
.flower-art { width: 60px; height: 60px; flex-shrink: 0; animation: spin 40s linear infinite; }

/* Age & countdown */
.age-live, .countdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .6rem;
}
@media (min-width: 576px) { .age-live { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.countdown { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: .85rem; }
.age-live span, .countdown span {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .7rem .3rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-surface);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}
.age-live b, .countdown b {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1rem + 1.4vw, 1.9rem);
  letter-spacing: 0;
  color: var(--c-heading);
  font-variant-numeric: tabular-nums;
}
.countdown span { border-color: color-mix(in srgb, var(--c-gold-bright) 45%, transparent); background: var(--c-gold-soft); }
.countdown b { color: var(--c-gold); }
.countdown-box { padding: 1.15rem; border: 1px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-surface-2); }
.countdown-box h3 { justify-content: center; }
.fact-list { display: grid; gap: .5rem; padding: 0; list-style: none; }
.fact-list li { padding: .6rem .85rem; border-radius: var(--radius-md); background: var(--c-surface); border: 1px solid var(--c-border); font-size: var(--fs-sm); }
.fact-list b { color: var(--c-heading); }

/* Moon phase */
.moon-stage {
  position: relative;
  width: min(240px, 70vw);
  margin: 0 auto;
  transition: transform .8s var(--ease-out);
}
.moon-stage::before {
  content: "";
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 227, 182, .35), transparent 65%);
  filter: blur(10px);
}
.moon-stage.is-south { transform: rotate(180deg); }
.moon-svg { position: relative; width: 100%; height: auto; overflow: visible; }
.moon-dark { fill: #2b2747; stroke: rgba(255, 255, 255, .08); stroke-width: 1; }
[data-theme="light"] .moon-dark { fill: #3a3560; }
.moon-craters circle { fill: rgba(0, 0, 0, .08); }

@media (prefers-reduced-motion: reduce) {
  .tarot-slot, .flower-art, .gem-item .gem, .crystal-mist { animation: none; }
}

/* -------------------------------------------------------------------------
   15. 404 PAGE
   ------------------------------------------------------------------------- */
.nf-hero { padding-top: clamp(2.5rem, 6vw, 4rem); }
.nf-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(.5rem, 2vw, 1.25rem);
  margin-bottom: 1.5rem;
}
.nf-digit {
  font-family: var(--font-display);
  font-size: clamp(5rem, 3rem + 10vw, 9rem);
  font-weight: 700;
  line-height: 1;
  background: var(--grad-text);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 9s linear infinite;
}
.nf-planet {
  position: relative;
  width: clamp(4.5rem, 3rem + 7vw, 7.5rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f8dc9b, #c9952f 45%, #6d28d9 100%);
  box-shadow: 0 0 40px rgba(201, 149, 47, .45), inset -10px -12px 24px rgba(0, 0, 0, .3);
  animation: floaty 5s ease-in-out infinite;
}
.nf-ring {
  position: absolute;
  inset: 38% -30%;
  border: 3px solid rgba(196, 181, 253, .8);
  border-radius: 50%;
  transform: rotate(-18deg);
}
.nf-star {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-gold-bright);
  box-shadow: 0 0 10px var(--c-gold-bright);
  animation: twinkle 2.4s ease-in-out infinite;
}
.nf-star.s1 { top: 0; left: 18%; }
.nf-star.s2 { top: 20%; right: 14%; animation-delay: .6s; }
.nf-star.s3 { bottom: 4%; left: 30%; animation-delay: 1.2s; }
.nf-star.s4 { bottom: 18%; right: 26%; animation-delay: 1.8s; }
.nf-search { position: relative; }
.nf-search .icon { position: absolute; top: 50%; left: 1rem; transform: translateY(-50%); color: var(--c-text-muted); pointer-events: none; }
.nf-search .input { padding-left: 2.85rem; }
.nf-list { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.nf-group h3 { display: flex; align-items: center; gap: .6rem; margin-bottom: .65rem; font-family: var(--font-body); font-size: 1rem; }
.nf-links { display: grid; gap: .5rem; padding: 0; list-style: none; }
@media (min-width: 768px) { .nf-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nf-links a {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-height: 44px;
  height: 100%;
  padding: .7rem .9rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-surface);
  text-decoration: none;
  transition: border-color var(--t-fast), transform var(--t-fast) var(--ease-out), box-shadow var(--t-base);
}
.nf-links a:hover { border-color: var(--c-border-strong); transform: translateY(-2px); box-shadow: var(--glow-primary); }
.nf-links b { color: var(--c-heading); font-size: var(--fs-sm); }
.nf-links span { color: var(--c-text-muted); font-size: var(--fs-xs); }
@media (prefers-reduced-motion: reduce) {
  .nf-digit, .nf-planet, .nf-star { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pair-heart,
  .floating-hearts { animation: none; display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tool-hero-icon,
  .result-icon { animation: none; }
  .flip-inner { transition: none; }
}

@media print {
  .tool-page main::before,
  .result-actions,
  .form-actions,
  .related-tools { display: none !important; }
  .result-card, .tool-panel { box-shadow: none; border-color: #999; background: #fff; }
}
