:root {
  color-scheme: dark;
  --night: #061526;
  --night-soft: #0a2038;
  --surface: rgba(13, 43, 72, .8);
  --surface-solid: #102f4d;
  --violet: #67afe8;
  --violet-bright: #9ed5ff;
  --gold: #d7bc78;
  --ink: #edf7ff;
  --muted: #afc3d6;
  --line: rgba(160, 207, 245, .18);
  --danger: #ffb8c1;
  --shadow: 0 24px 70px rgba(1, 10, 22, .46);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--night);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 10%, rgba(26, 105, 170, .25), transparent 30rem),
    radial-gradient(circle at 88% 28%, rgba(37, 102, 158, .23), transparent 28rem),
    linear-gradient(145deg, #051321 0%, #0a223b 55%, #061526 100%);
  line-height: 1.6;
}

body {
  padding-right: env(safe-area-inset-right);
  padding-left: env(safe-area-inset-left);
}

.site-header {
  padding-top: max(1rem, env(safe-area-inset-top));
}

.site-footer {
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.sr-only,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  z-index: 100;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  padding: .65rem 1rem;
  clip: auto;
  border-radius: .5rem;
  background: var(--ink);
  color: var(--night);
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .13;
  pointer-events: none;
}

.ambient-one {
  top: 8rem;
  left: -10rem;
  background: #268cd5;
}

.ambient-two {
  right: -12rem;
  bottom: 5rem;
  background: #1a73bd;
}

.page-shell,
.site-header,
.site-footer,
.site-messages {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 4.25rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: clamp(8.5rem, 19vw, 10.5rem);
  height: auto;
  max-height: 3.15rem;
  object-fit: contain;
}

.mobile-account-link { display: none; }

.brand-mark,
.benefit-icon,
.sign-symbol {
  color: var(--gold);
}

nav {
  display: flex;
  gap: .85rem;
  align-items: center;
  font-size: .92rem;
}

nav form {
  display: inline;
}

.nav-link,
.link-button {
  border: 0;
  padding: .5rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
}

.nav-pill {
  padding: .55rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
}

.account-email {
  max-width: 12rem;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
}

.hero {
  display: grid;
  gap: 1.5rem;
  min-height: auto;
  align-items: start;
  padding-block: clamp(2.75rem, 7vw, 4.5rem);
}

.home-top-layout {
  display: grid;
  gap: 1.25rem;
  align-items: start;
  padding-block: 1.25rem 2rem;
}

.home-left-column { min-width: 0; }

.home-intro {
  padding: .35rem 0 .25rem;
}

.home-intro .eyebrow { margin-bottom: .65rem; }

.home-intro h1 {
  max-width: 700px;
  margin-bottom: .8rem;
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1;
}

.home-intro h1 span {
  color: var(--violet-bright);
  font-style: italic;
}

.home-intro .hero-lead {
  max-width: 40rem;
  margin-bottom: .7rem;
}

.home-intro .trust-note { margin-bottom: .65rem; }

.home-left-column .sign-flow {
  max-width: none;
  padding-block: .5rem 1rem;
}

.home-left-column .sign-flow-copy { margin-bottom: .75rem; }
.home-left-column .sign-flow-copy .eyebrow { margin-bottom: .35rem; }
.home-left-column .sign-flow-copy h1 { font-size: 1.7rem; }
.home-left-column .sign-form { padding: .8rem; }

.home-top-layout > .hero-ranking {
  width: fit-content;
  max-width: 100%;
  justify-self: center;
  align-self: start;
}

@media (min-width: 950px) {
  .home-top-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(18rem, .7fr);
    gap: clamp(2rem, 4vw, 4rem);
  }
  .home-top-layout > .natal-cta { grid-column: 1 / -1; }
}

@media (max-width: 47.99rem) {
  .home-top-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem .7rem;
    padding-top: 1rem;
  }
  .home-left-column { grid-column: 1 / -1; }
  .home-top-layout > .hero-ranking {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    max-width: none;
    order: 0;
  }
  .home-top-layout > .natal-cta {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: .85rem;
    align-content: start;
    gap: .7rem;
  }
  .home-top-layout > .natal-cta .section-kicker { font-size: .8rem; }
  .home-top-layout > .natal-cta h2 { font-size: 1.6rem; line-height: 1.12; }
  .home-top-layout > .natal-cta p:not(.section-kicker) { font-size: 1rem; line-height: 1.5; }
  .home-top-layout > .natal-cta .primary-button {
    width: 100%;
    min-height: 2.8rem;
    justify-self: stretch;
    padding-inline: .55rem;
    text-align: center;
    font-size: .95rem;
  }
  .home-intro { padding-block: .2rem; }
  .home-intro h1 {
    margin-bottom: .25rem;
    font-size: clamp(2rem, 8.2vw, 2.65rem);
    line-height: 1.04;
  }
  .home-left-column .sign-flow { padding-block: .15rem .5rem; }
  .home-left-column .sign-flow-copy { margin-bottom: 1rem; }
  .home-left-column .sign-flow-copy h1 {
    max-width: none;
    margin-inline: auto;
    font-size: clamp(1rem, 4.5vw, 1.3rem);
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
  }
  .home-left-column .sign-form { padding: .85rem; }
  .home-left-column .wheel-help {
    margin: .1rem .25rem .9rem;
    font-size: .86rem;
    line-height: 1.4;
  }
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker,
.chat-label {
  margin: 0 0 1rem;
  color: var(--gold);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.08;
}

.hero h1 {
  max-width: 780px;
  margin-bottom: 1.5rem;
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 500;
  letter-spacing: -.045em;
}

.hero h1 span {
  color: var(--violet-bright);
  font-style: italic;
}

.hero-lead {
  max-width: 36rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  margin: 1.5rem 0 1.2rem;
}

.primary-button {
  display: inline-flex;
  gap: .8rem;
  justify-content: center;
  align-items: center;
  min-height: 3.2rem;
  padding: .8rem 1.25rem;
  border: 1px solid transparent;
  border-radius: .8rem;
  background: linear-gradient(135deg, #298ed1, #1763a2);
  box-shadow: 0 12px 30px rgba(20, 101, 164, .3);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}

.primary-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.secondary-link,
.back-link {
  color: var(--muted);
  text-underline-offset: .3rem;
}

.trust-note {
  color: #9db4c8;
  font-size: .84rem;
}

.trust-note span {
  margin-right: .35rem;
  color: var(--gold);
}

.natal-cta {
  display: grid;
  gap: 1rem;
  align-items: center;
  margin-top: .25rem;
  padding: 1.35rem;
  border: 1px solid rgba(145, 201, 242, .22);
  border-radius: 1.1rem;
  background: linear-gradient(145deg, rgba(18, 57, 91, .68), rgba(8, 31, 54, .72));
}

.natal-cta .section-kicker { margin-bottom: .45rem; }
.natal-cta h2 { margin-bottom: .45rem; font-size: clamp(1.7rem, 5vw, 2.5rem); }
.natal-cta p:not(.section-kicker) { margin-bottom: 0; color: var(--muted); }
.natal-cta .primary-button { justify-self: start; }

.benefits {
  padding-block: 2.5rem 3.5rem;
}

.benefits h2 {
  max-width: 42rem;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 500;
}

.benefit-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.benefit-grid article {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(18, 57, 91, .74), rgba(8, 31, 54, .68));
}

.benefit-icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: .8rem;
  place-items: center;
  border: 1px solid rgba(215, 188, 120, .3);
  border-radius: 50%;
}

.benefit-grid h3 {
  margin-bottom: .6rem;
  font-size: 1.25rem;
}

.benefit-grid p,
.disclaimer p,
.form-intro > p,
.privacy-points,
.form-disclaimer,
.chat-disclaimer {
  color: var(--muted);
}

.disclaimer {
  margin-bottom: 3rem;
  padding: 1.4rem;
  border: 1px solid rgba(215, 188, 120, .22);
  border-radius: 1rem;
  background: rgba(215, 188, 120, .06);
}

.disclaimer p {
  margin: .45rem 0 0;
}

.form-layout {
  display: grid;
  gap: 2rem;
  min-height: auto;
  align-items: center;
  padding-block: 2rem 3rem;
}

.form-intro h1 {
  margin: 1.2rem 0;
  font-size: clamp(2.6rem, 8vw, 4.8rem);
  font-weight: 500;
}

.form-intro .eyebrow {
  margin-top: 2.5rem;
}

.privacy-points {
  display: grid;
  gap: .5rem;
  padding: 0;
  list-style: none;
}

.privacy-points span {
  margin-right: .45rem;
  color: var(--gold);
}

.reading-form {
  padding: clamp(1.25rem, 5vw, 2.3rem);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.form-field {
  display: grid;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.form-field label {
  font-weight: 700;
}

.form-field small {
  color: #9d95b0;
}

.form-field input,
.form-field select,
.form-field textarea,
.chat-composer textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: rgba(5, 22, 39, .68);
  color: var(--ink);
}

.form-field input,
.form-field select,
.form-field textarea {
  min-height: 3rem;
  padding: .8rem .9rem;
}

.form-field textarea {
  min-height: 8rem;
  resize: vertical;
}

.form-field .errorlist {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--danger);
}

.button-full {
  width: 100%;
}

.primary-button:disabled {
  cursor: wait;
  filter: saturate(.75);
  opacity: .78;
  transform: none;
}

.generation-status {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.5;
  text-align: center;
}

.modal-open {
  overflow: hidden;
}

.auth-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
}

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

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 16, 29, .84);
  backdrop-filter: blur(8px);
}

.auth-modal-card,
.auth-card {
  position: relative;
  width: min(100%, 31rem);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: clamp(1.3rem, 5vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: #0b2945;
  box-shadow: var(--shadow);
}

.auth-modal-close {
  position: absolute;
  top: .8rem;
  right: .8rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.8rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem;
  margin: 1rem 0;
  padding: .3rem;
  border-radius: .8rem;
  background: rgba(4, 20, 36, .54);
}

.auth-tabs button {
  padding: .7rem;
  border: 0;
  border-radius: .6rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.auth-tabs button[aria-selected="true"] {
  background: rgba(45, 132, 194, .45);
  color: var(--ink);
}

.auth-modal-form,
.auth-form {
  display: grid;
  gap: .7rem;
}

.auth-modal-form[hidden] {
  display: none;
}

.auth-modal-form input:not([type="checkbox"]),
.auth-form input:not([type="checkbox"]),
.auth-form select {
  width: 100%;
  min-height: 3rem;
  padding: .75rem .9rem;
  border: 1px solid var(--line);
  border-radius: .7rem;
  background: rgba(4, 20, 36, .64);
  color: var(--ink);
}

.auth-checkbox {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.auth-modal-fallback,
.auth-help {
  color: var(--muted);
  font-size: .82rem;
}

.auth-shell {
  display: grid;
  min-height: 65vh;
  place-items: center;
  padding-block: 2rem 4rem;
}

.auth-errors,
.auth-form .errorlist {
  color: var(--danger);
}

.auth-separator {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 1.25rem 0;
  color: var(--muted);
  font-size: .82rem;
}

.auth-separator::before,
.auth-separator::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.auth-providers {
  display: grid;
  gap: .6rem;
}

.form-disclaimer {
  margin: 1rem 0 0;
  font-size: .78rem;
  text-align: center;
}

.chat-layout {
  max-width: 860px;
  padding-block: 1.25rem 2.5rem;
}

.home-reading-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  max-width: 860px;
  padding-top: 1rem;
}

.home-reading-actions .back-link,
.home-reading-actions .save-reading {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: .55rem .9rem;
  border: 1px solid rgba(125, 211, 252, .28);
  border-radius: .75rem;
  background: rgba(16, 54, 88, .62);
  color: var(--ink);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.home-reading-actions .save-reading {
  border-color: rgba(215, 188, 120, .5);
  background: linear-gradient(135deg, rgba(215, 188, 120, .17), rgba(16, 54, 88, .8));
}

.home-reading-actions a:hover {
  border-color: var(--violet-bright);
  background-color: rgba(39, 113, 171, .48);
}

.guided-choices {
  margin: 1.25rem 0;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(8, 31, 55, .76);
}

.guided-choices > p {
  margin-top: 0;
  color: var(--muted);
}

#guided-choice-list {
  display: grid;
  gap: .75rem;
}

.guided-choice {
  width: 100%;
  padding: .95rem 1rem;
  border: 1px solid rgba(198, 170, 102, .35);
  border-radius: .85rem;
  background: rgba(35, 116, 180, .22);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.sign-flow {
  max-width: 52rem;
  padding-block: 1rem 2.5rem;
}

.sign-flow-copy {
  margin-bottom: 1.25rem;
}

.sign-form {
  padding: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: var(--surface);
}

.sign-form #start-reading-button {
  margin-top: 1.25rem;
}

.zodiac-wheel {
  --wheel-radius: min(7.35rem, calc(50vw - 4.25rem));
  --selection-orb-size: 8.2rem;
  --selection-orb-radius: 4.1rem;
  position: relative;
  width: min(100%, 26rem);
  height: clamp(22rem, 96vw, 24rem);
  margin-inline: auto;
  overflow: hidden;
  border-radius: 1rem;
  background:
    radial-gradient(circle, rgba(62, 151, 218, .28), rgba(8, 34, 59, .82) 43%, rgba(4, 20, 36, .9) 72%),
    linear-gradient(145deg, rgba(18, 71, 111, .34), rgba(4, 20, 36, .72));
  touch-action: none;
  user-select: none;
  outline: none;
}

.zodiac-wheel::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6.5rem;
  height: 6.5rem;
  border: 1px solid rgba(215, 188, 120, .14);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 157, 213, .2), rgba(4, 20, 36, .05) 68%);
  box-shadow: 0 0 60px rgba(63, 151, 213, .14);
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.zodiac-wheel:focus-visible {
  box-shadow: 0 0 0 3px var(--gold);
}

.zodiac-ring {
  position: absolute;
  z-index: 2;
  inset: 0;
  transform: rotate(var(--wheel-rotation, 0deg));
  transition: transform .42s cubic-bezier(.2, .78, .22, 1);
}

.zodiac-ring.is-intro-spinning {
  transition-duration: 1.2s;
  transition-timing-function: cubic-bezier(.12, .72, .18, 1);
}

.zodiac-ring.is-intro-spinning .wheel-item-content {
  transition-duration: 1.2s;
  transition-timing-function: cubic-bezier(.12, .72, .18, 1);
}

.zodiac-wheel-item {
  --sign-accent: #cfdeea;
  --sign-accent-rgb: 207, 222, 234;
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 3.35rem;
  height: 3.35rem;
  padding: .2rem;
  place-content: center;
  border: 1px solid rgba(var(--sign-accent-rgb), .56);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(var(--sign-accent-rgb), .22), transparent 34%),
    radial-gradient(circle, rgba(var(--sign-accent-rgb), .13), rgba(5, 28, 49, .82) 70%);
  box-shadow:
    0 0 13px rgba(var(--sign-accent-rgb), .14),
    inset 0 0 12px rgba(var(--sign-accent-rgb), .1);
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  transform: translate(-50%, -50%) rotate(calc(var(--wheel-index) * 30deg)) translateY(calc(var(--wheel-radius) * -1)) rotate(calc(var(--wheel-index) * -30deg));
  transition: width .22s ease, height .22s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}

.zodiac-wheel-item::before {
  position: absolute;
  inset: .22rem;
  border: 1px solid rgba(var(--sign-accent-rgb), .2);
  border-block-color: rgba(var(--sign-accent-rgb), .62);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  transform: rotate(24deg);
}

.zodiac-wheel-item::after {
  position: absolute;
  top: .38rem;
  right: .52rem;
  width: .2rem;
  height: .2rem;
  border-radius: 50%;
  background: var(--sign-accent);
  box-shadow: -1.92rem 1.92rem 0 rgba(var(--sign-accent-rgb), .52);
  content: "";
  pointer-events: none;
}

.zodiac-wheel-item:hover,
.zodiac-wheel-item:focus-visible {
  border-color: rgba(var(--sign-accent-rgb), .85);
  background: rgba(30, 102, 156, .76);
}

.zodiac-wheel-item.is-selected {
  border-color: #f2fbff;
  background: radial-gradient(circle at 35% 25%, #4d99c5, #17618d 55%, #0b3657 100%);
  box-shadow: 0 0 0 2px rgba(205, 235, 255, .55), 0 0 20px rgba(112, 201, 255, .7), inset 0 0 10px rgba(218, 243, 255, .24);
}

.zodiac-wheel-item.is-selected small { color: #fff; font-weight: 800; }

.wheel-item-content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: .08rem;
  transform: rotate(var(--ring-counter-rotation, 0deg));
  transform-origin: center;
  transition: transform .42s cubic-bezier(.2, .78, .22, 1);
}

.zodiac-wheel-item strong {
  position: relative;
  color: var(--sign-accent);
  font-size: 1.4rem;
  line-height: 1;
  text-shadow: 0 0 10px rgba(var(--sign-accent-rgb), .52);
  transition: font-size .18s ease;
}

.zodiac-glyph {
  display: block;
  width: 1em;
  height: 1em;
  margin-inline: auto;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(var(--sign-accent-rgb, var(--orb-accent-rgb, 255, 217, 130)), .35));
}

.zodiac-wheel-item small {
  position: relative;
  min-width: 4.8rem;
  overflow: visible;
  color: #d9e5ef;
  font-size: .7rem;
  line-height: 1.05;
  text-shadow: 0 1px 3px rgba(2, 15, 28, .96), 0 0 5px rgba(2, 15, 28, .8);
  white-space: nowrap;
  transition: opacity .18s ease;
}
.wheel-selection-orb {
  --orb-accent: #8ed2ff;
  --orb-accent-rgb: 142, 210, 255;
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: var(--selection-orb-size);
  height: var(--selection-orb-size);
  border: 2px solid rgba(255, 219, 132, .82);
  border-color: color-mix(in srgb, var(--orb-accent) 72%, #ffe5a2);
  border-radius: 50%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .2rem;
  padding: .7rem;
  color: var(--ink);
  font: inherit;
  background:
    radial-gradient(circle at 35% 28%, rgba(235, 249, 255, .24), transparent 33%),
    radial-gradient(circle at 50% 40%, #2475a9, #12517c 55%, #0a304e 100%);
  box-shadow:
    0 0 0 5px rgba(var(--orb-accent-rgb), .1),
    0 0 34px rgba(var(--orb-accent-rgb), .58),
    0 0 68px rgba(39, 133, 201, .32),
    inset 0 0 24px rgba(216, 242, 255, .25);
  content: "";
  cursor: pointer;
  touch-action: manipulation;
  transform: translate(-50%, -50%);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.wheel-selection-orb > strong,
.wheel-selection-orb > small {
  position: relative;
  z-index: 1;
  opacity: 0;
  text-align: center;
  transform: scale(.82);
  transition: opacity .18s ease, transform .26s cubic-bezier(.2, .8, .25, 1);
}

.wheel-selection-orb > strong {
  color: var(--orb-accent);
  font-size: 2.4rem;
  line-height: .95;
  text-shadow: 0 0 16px rgba(var(--orb-accent-rgb), .55);
}

.wheel-selection-orb > small {
  max-width: 6rem;
  margin-top: .24rem;
  overflow: hidden;
  color: var(--ink);
  font-size: .82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wheel-selection-orb.has-selection > strong,
.wheel-selection-orb.has-selection > small {
  opacity: 1;
  transform: scale(1);
}

.wheel-selection-orb::before,
.wheel-selection-orb::after {
  position: absolute;
  border-radius: 50%;
  content: "";
  inset: .38rem;
  pointer-events: none;
}

.wheel-reading-action {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  margin-top: .32rem;
  padding: .42rem .72rem;
  overflow: hidden;
  border: 1px solid rgba(213, 237, 255, .78);
  border-radius: 999px;
  background: linear-gradient(165deg, #3a91c5 0%, #226e9f 48%, #15527f 100%);
  box-shadow: inset 0 1px 2px rgba(235, 250, 255, .5), 0 2px 10px rgba(34, 126, 185, .38);
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  white-space: nowrap;
}
.wheel-reading-action::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 10%, rgba(255, 255, 255, .24) 50%, transparent 90%);
  content: "";
  pointer-events: none;
  transform: translateX(-125%);
  transition: transform .6s ease;
}
.wheel-selection-orb:active:not(:disabled) .wheel-reading-action::after { transform: translateX(125%); }
.wheel-selection-orb:focus-visible { outline: 3px solid var(--gold); outline-offset: 7px; }
.wheel-selection-orb:active:not(:disabled) {
  transform: translate(-50%, -50%) scale(.97);
  filter: brightness(1.15);
}
.wheel-selection-orb:disabled { cursor: wait; }
.wheel-selection-orb[aria-busy="true"] .wheel-reading-action { opacity: .75; }
@media (hover: hover) and (pointer: fine) {
  .wheel-selection-orb:hover:not(:disabled) {
    transform: translate(-50%, -50%) scale(1.035);
    box-shadow: 0 0 0 6px rgba(var(--orb-accent-rgb),.16), 0 0 40px rgba(var(--orb-accent-rgb),.65), inset 0 0 24px rgba(216,242,255,.25);
  }
  .wheel-selection-orb:hover:not(:disabled) .wheel-reading-action { filter: brightness(1.12); }
  .wheel-selection-orb:hover:not(:disabled) .wheel-reading-action::after { transform: translateX(125%); }
}
@media (prefers-reduced-motion: reduce) {
  .wheel-selection-orb { transition: none; }
  .wheel-reading-action::after { transition: none; }
  .wheel-selection-orb:hover:not(:disabled),
  .wheel-selection-orb:active:not(:disabled) { transform: translate(-50%, -50%); }
}

.wheel-selection-orb::before {
  border: 1px solid rgba(195, 229, 255, .42);
  box-shadow: inset 0 0 14px rgba(112, 196, 249, .28);
}

.wheel-selection-orb::after {
  inset: -.3rem;
  border: 1px solid rgba(215, 188, 120, .24);
  border-block-color: rgba(255, 221, 139, .72);
}

.wheel-pointer {
  display: block;
  position: absolute;
  z-index: 4;
  top: calc(50% - var(--selection-orb-radius) - .65rem);
  left: 50%;
  width: 1.2rem;
  height: .9rem;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.wheel-pointer::before,
.wheel-pointer::after {
  position: absolute;
  left: 50%;
  content: "";
  transform: translateX(-50%);
}

.wheel-pointer::before {
  display: none;
  top: 1.05rem;
  bottom: .42rem;
  width: .42rem;
  border-radius: 999px;
  border-inline: 1px solid rgba(255, 230, 164, .68);
  background: linear-gradient(to right, transparent 35%, var(--gold) 36% 64%, transparent 65%);
  box-shadow: 0 0 12px rgba(255, 214, 119, .58);
}

.wheel-pointer::after {
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  background: linear-gradient(135deg, #fff1b6, var(--gold) 48%, #a77528);
  clip-path: polygon(50% 0, 100% 55%, 67% 55%, 67% 100%, 33% 100%, 33% 55%, 0 55%);
  filter: drop-shadow(0 0 4px rgba(255, 214, 119, .55));
}

.wheel-pointer-gem {
  display: none;
  position: absolute;
  bottom: -.46rem;
  left: 50%;
  width: 1rem;
  height: 1rem;
  border: 2px solid #f5d985;
  background: radial-gradient(circle at 35% 30%, #eaf8ff, #5cb2e8 45%, #123f65 72%);
  box-shadow: 0 0 0 3px rgba(215, 188, 120, .14), 0 0 14px rgba(96, 190, 244, .72);
  transform: translateX(-50%) rotate(45deg);
}

.zodiac-wheel.is-dragging .zodiac-ring,
.zodiac-wheel.is-dragging .zodiac-wheel-item,
.zodiac-wheel.is-dragging .wheel-item-content,
.zodiac-wheel.is-dragging .zodiac-wheel-item small {
  transition: none;
}

.wheel-help {
  margin: .2rem .25rem .65rem;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
  text-align: center;
}

@media (max-width: 24rem) {
  .zodiac-wheel {
    --wheel-radius: calc(50vw - 4.35rem);
    --selection-orb-size: 7.6rem;
    --selection-orb-radius: 3.8rem;
  }
  .zodiac-wheel-item { width: 3.05rem; height: 3.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  .zodiac-ring,
  .wheel-item-content,
  .zodiac-wheel-item small { transition-duration: .01ms; }
}

.accessible-sign-select,
.optional-date {
  margin: 1rem 0;
}

.accessible-sign-select {
  display: grid;
  gap: .45rem;
}

.accessible-sign-select select,
.date-control select {
  width: 100%;
  min-height: 44px;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: .7rem;
  background: rgba(4, 20, 36, .68);
  color: var(--ink);
}

.optional-date {
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
}

.optional-date summary {
  min-height: 44px;
  cursor: pointer;
  font-weight: 700;
}

.date-wheel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

.date-control {
  display: grid;
  gap: .4rem;
}

.calculated-sign {
  min-height: 1.5em;
  color: var(--gold);
}

@media (min-width: 48rem) {
  .sign-form {
    padding: 1.6rem;
  }

  #guided-choice-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .ranking-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-list li {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ranking-list .secondary-button {
    grid-column: 1 / -1;
    min-height: 38px;
  }
}


@media (max-width: 22rem) {
  .site-header {
    padding-inline: .7rem;
  }

.site-header nav {
    gap: .35rem;
  }

  .zodiac-wheel {
    height: 20rem;
    --selection-orb-size: 6.8rem;
    --selection-orb-radius: 3.4rem;
  }
  .wheel-selection-orb > strong { font-size: 2rem; }
  .wheel-selection-orb > small { font-size: .76rem; }
  .wheel-reading-action { padding: .33rem .55rem; font-size: .7rem; }
  .wheel-pointer { top: calc(50% - var(--selection-orb-radius) - .35rem); width: .7rem; height: .5rem; }
}

.language-switcher {
  display: inline-flex;
  flex: 0 0 auto;
  gap: .42rem;
  align-items: center;
  margin-left: auto;
  padding: .25rem;
  border: 1px solid rgba(125, 211, 252, .26);
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(16, 54, 88, .88), rgba(5, 25, 45, .92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 8px 24px rgba(1, 10, 22, .18);
}

.language-switcher-icon {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  color: var(--violet-bright);
}

.language-switcher-icon svg {
  width: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.language-options {
  display: inline-flex;
  gap: .15rem;
  padding: .13rem;
  border-radius: 999px;
  background: rgba(1, 13, 25, .42);
}

.language-option {
  display: grid;
  min-width: 2.3rem;
  min-height: 2rem;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .07em;
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.language-options a:hover {
  color: var(--ink);
  background: rgba(103, 175, 232, .12);
}

.language-options a:active {
  transform: scale(.95);
}

.language-option.is-active {
  background: linear-gradient(135deg, var(--violet-bright), var(--violet));
  color: #041525;
  cursor: default;
  box-shadow: 0 3px 12px rgba(77, 158, 222, .3);
}

@media (max-width: 47.99rem) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: .5rem .7rem;
    padding-bottom: .65rem;
  }

  .site-header nav {
    grid-column: 1 / -1;
    order: 4;
    width: 100%;
    justify-content: center;
    overflow-x: auto;
  }

  .site-header-nav-anonymous { display: none; }

  .mobile-account-link {
    display: grid;
    width: 2.8rem;
    height: 2.8rem;
    place-items: center;
    border: 1px solid rgba(125, 211, 252, .26);
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(16, 54, 88, .88), rgba(5, 25, 45, .92));
    color: var(--violet-bright);
  }

  .mobile-account-link svg {
    width: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
  }

  .language-switcher {
    margin-left: 0;
  }
}

@media (max-width: 24rem) {
  .language-switcher-icon {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.ranking-page { padding-block: 1.5rem 3rem; }
.ranking-heading { margin-bottom: 1rem; }
.ranking-fallback, .ranking-return { color: var(--muted); }
.ranking-podium, .home-podium {
  display: grid;
  gap: .75rem;
  margin: 1rem 0;
}
.podium-card, .home-podium article {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}
.podium-card.selected, .ranking-list .selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(212, 183, 111, .2);
}
.ranking-position {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 50%;
  background: rgba(212, 183, 111, .16);
  color: var(--gold);
  font-weight: 800;
}
.ranking-list {
  display: grid;
  gap: .55rem;
  padding: 0;
  list-style: none;
}
.ranking-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .8rem;
  align-items: start;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(8, 31, 55, .72);
}
.ranking-list h2, .ranking-list p { margin: 0 0 .4rem; }
.ranking-list p { color: var(--muted); font-size: .9rem; line-height: 1.45; }
.ranking-list .secondary-button {
  grid-column: 1 / -1;
  min-height: 44px;
}
.movement-up { color: #9ed8ad; }
.movement-down { color: #d8c18f; }
.movement-same, .movement-new { color: var(--muted); }
.selected-ranking-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .8rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(212, 183, 111, .35);
  border-radius: 1rem;
  background: rgba(10, 38, 65, .84);
}
.selected-ranking-card p { margin: .35rem 0; }
.selected-ranking-card > a { grid-column: 1 / -1; }
.change-sign {
  margin: .75rem 0;
  color: var(--muted);
}
.change-sign summary { min-height: 44px; cursor: pointer; }
.change-sign form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; }
.change-sign label { width: 100%; }
.change-sign select, .change-sign button {
  min-height: 44px;
  padding: .6rem .8rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: rgba(6, 27, 48, .82);
  color: var(--ink);
}
.home-ranking {
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: linear-gradient(145deg, rgba(18, 57, 91, .8), rgba(8, 31, 54, .76));
  box-shadow: 0 18px 45px rgba(1, 12, 24, .24);
}
.hero-ranking h2 { margin-bottom: .5rem; font-size: 1.7rem; }
.hero-ranking .section-kicker { margin-bottom: .5rem; }
.hero-ranking h2,
.hero-ranking .section-kicker { text-align: center; }
.home-ranking-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: .35rem;
  margin: .75rem 0 0;
}
.home-ranking-list article {
  display: grid;
  grid-template-columns: 1.3rem minmax(0, 1fr) 1.3rem;
  gap: .15rem;
  align-items: center;
  min-height: 2.3rem;
  padding: .35rem .45rem;
  border: 1px solid rgba(145, 201, 242, .12);
  border-radius: .55rem;
  background: rgba(255, 255, 255, .025);
}
.home-ranking-list span {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 800;
  text-align: left;
}
.home-ranking-list strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: .82rem;
  line-height: 1.2;
  text-align: center;
}
.home-ranking-movement {
  min-width: 0;
  color: var(--muted);
  font-size: .6rem;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
  justify-self: end;
  text-transform: uppercase;
}
.home-ranking-movement.movement-up { color: #8ed8bd; }
.home-ranking-movement.movement-down { color: #f2a7bd; }
.home-ranking-movement.movement-new { color: var(--gold); }
.home-ranking-list .ranking-top-1,
.home-ranking-list .ranking-top-2,
.home-ranking-list .ranking-top-3 { border-color: rgba(212, 183, 111, .35); background: rgba(212, 183, 111, .08); }
.home-ranking-list .ranking-top-1 span,
.home-ranking-list .ranking-top-2 span,
.home-ranking-list .ranking-top-3 span { color: var(--gold); }
.home-podium article { display: grid; gap: .25rem; }
.home-podium span { color: var(--gold); font-size: 1.5rem; font-weight: 800; }
.hero-ranking .home-podium article {
  grid-template-columns: auto minmax(0, 1fr);
  padding: .65rem .75rem;
}
.hero-ranking .home-podium span { grid-row: 1 / 3; align-self: center; margin-right: .45rem; }
.hero-ranking .home-podium small { color: var(--muted); }
.hero-ranking .secondary-button { display: flex; justify-content: center; text-decoration: none; }

@media (min-width: 48rem) {
  .ranking-podium, .home-podium { grid-template-columns: repeat(3, 1fr); }
  .hero-ranking .home-ranking-list { grid-template-columns: 1fr; }
  .podium-1 { order: 2; transform: translateY(-.75rem); }
  .podium-2 { order: 1; }
  .podium-3 { order: 3; }
  .ranking-list li { align-items: center; }
  .reading-topic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.guided-choice:hover,
.guided-choice:focus-visible {
  border-color: var(--gold);
  background: rgba(37, 120, 181, .38);
}

.guided-choice:disabled {
  cursor: wait;
  opacity: .58;
}

.guided-appear {
  animation: guided-appear .28s ease-out;
}

@keyframes guided-appear {
  from { opacity: 0; transform: translateY(.35rem); }
}

.chat-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--line);
}

.sign-symbol {
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  place-items: center;
  border: 1px solid rgba(215, 188, 120, .25);
  border-radius: 50%;
  background: rgba(215, 188, 120, .06);
  font-size: 1.35rem;
}

.chat-header h1 {
  margin: 0;
  font-size: 1.8rem;
}

.chat-header p {
  margin: .15rem 0 0;
  color: var(--muted);
}

.chat-header .chat-label {
  margin: 0 0 .25rem;
  color: var(--gold);
}

.save-reading {
  grid-column: 1 / -1;
  justify-self: start;
  color: var(--violet-bright);
  font-size: .9rem;
  text-underline-offset: .25rem;
}

.chat-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .35rem .8rem;
  padding: .6rem 0;
  color: var(--muted);
  font-size: .8rem;
}

.chat-status p {
  margin: 0;
}

.chat-status span,
.ai-label span {
  color: var(--gold);
}

.chat-jump,
.chat-back-top {
  color: var(--violet-bright);
  font-size: .78rem;
  text-underline-offset: .2rem;
}

.chat-jump {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  margin-left: auto;
  padding: .35rem .65rem;
  border: 1px solid rgba(125, 211, 252, .3);
  border-radius: 999px;
  background: rgba(16, 54, 88, .7);
  color: var(--ink);
  font-size: .72rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.chat-jump:hover {
  border-color: var(--violet-bright);
  background: rgba(39, 113, 171, .5);
}

.message-initial {
  width: 100%;
  max-width: 100%;
}

.message-meta-heading {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
}

.message-meta-brand { display: inline-flex; align-items: center; gap: .2rem; }
.score-info { position: relative; }
.score-info summary { display: grid; width: 2rem; height: 2rem; place-items: center; cursor: pointer; list-style: none; }
.score-info summary::-webkit-details-marker { display: none; }
.score-info summary > span { display: grid; width: 1.1rem; height: 1.1rem; place-items: center; border: 1px solid currentColor; border-radius: 50%; color: var(--violet-bright); font: 700 .7rem/1 system-ui, sans-serif; }
.score-info p { position: absolute; z-index: 30; top: calc(100% + .2rem); left: -2rem; width: min(18rem, calc(100vw - 4rem)); margin: 0; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: .65rem; background: #102f4d; box-shadow: 0 10px 25px rgba(1, 12, 24, .4); color: var(--ink); font-size: .78rem; font-weight: 400; line-height: 1.4; }

.chat-anchor {
  display: block;
  scroll-margin-bottom: 7rem;
}

.chat-messages {
  display: flex;
  height: auto;
  min-height: 0;
  padding: 1rem .25rem;
  overflow: visible;
  flex-direction: column;
  gap: .85rem;
  scroll-behavior: auto;
}

.chat-messages > * {
  flex-shrink: 0;
  scroll-margin-bottom: var(--chat-compose-cover, 0px);
}

.message-row {
  display: flex;
  max-width: min(88%, 650px);
  flex-direction: column;
  gap: .35rem;
}

.message-user {
  align-self: flex-end;
  align-items: flex-end;
}

.message-assistant {
  align-self: flex-start;
}

.message-meta {
  padding-inline: .35rem;
  color: #94aec4;
  font-size: .75rem;
  font-weight: 700;
}

.message-bubble {
  padding: .75rem .9rem;
  border: 1px solid var(--line);
  border-radius: 1rem 1rem 1rem .25rem;
  background: var(--surface-solid);
  color: #eaf6ff;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-user .message-bubble {
  border-color: rgba(103, 175, 232, .3);
  border-radius: 1rem 1rem .25rem 1rem;
  background: linear-gradient(145deg, #1d6599, #174c79);
}

.message-initial {
  width: 100%;
  max-width: 100%;
}

.reading-overview { white-space: normal; }
.reading-overview-lead,
.reading-overview-question { margin: 0; }
.reading-overview-lead { color: var(--muted); }
.reading-overview-question { font-weight: 700; }

.reading-topic-grid {
  display: grid;
  gap: .65rem;
  margin: .85rem 0;
}

.reading-topic {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .65rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: rgba(255, 255, 255, .035);
}

.reading-topic-choice {
  width: 100%;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.reading-topic-choice:hover,
.reading-topic-choice:focus-visible {
  border-color: var(--gold);
  background: rgba(37, 120, 181, .2);
  outline: none;
}

.reading-topic-choice:disabled {
  cursor: wait;
}

.reading-topic-choice.is-selected {
  border-color: var(--gold);
  background: rgba(37, 120, 181, .22);
}

.reading-topic > span {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  font-weight: 800;
}

.reading-topic h3 {
  margin: 0 0 .25rem;
  font: 700 .82rem/1.2 system-ui, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.reading-topic p {
  margin: 0;
  color: #d8e8f5;
  font-size: .9rem;
  line-height: 1.45;
}

.reading-topic-love > span { color: #f2a7bd; }
.reading-topic-health > span { color: #8ed8bd; }
.reading-topic-money > span { color: var(--gold); }

.loading-row {
  display: flex;
  gap: .35rem;
  align-items: center;
  align-self: flex-start;
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  color: var(--muted);
  font-size: .86rem;
}


.loading-dot {
  width: .35rem;
  height: .35rem;
  border-radius: 50%;
  background: var(--violet-bright);
  animation: pulse 1s infinite alternate;
}

.loading-dot:nth-child(2) {
  animation-delay: .2s;
}

.loading-dot:nth-child(3) {
  margin-right: .35rem;
  animation-delay: .4s;
}

@keyframes pulse {
  to { opacity: .25; transform: translateY(-2px); }
}

.chat-error {
  margin: .4rem 0 1rem;
  padding: .75rem 1rem;
  border: 1px solid rgba(255, 184, 193, .25);
  border-radius: .7rem;
  background: rgba(128, 34, 54, .2);
  color: var(--danger);
}

.paywall-placeholder {
  margin: 1rem 0;
  padding: 1.5rem;
  border: 1px solid rgba(215, 188, 120, .28);
  border-radius: 1rem;
  background: rgba(215, 188, 120, .07);
  text-align: center;
}

.paywall-placeholder > span {
  color: var(--gold);
}

.paywall-placeholder h2 {
  margin: .4rem 0;
}

.paywall-placeholder p {
  margin: 0;
  color: var(--muted);
}

.chat-question-counter {
  display: inline-flex;
  gap: .2rem;
  margin-left: .4rem;
  padding: .16rem .45rem;
  border: 1px solid rgba(145, 201, 242, .26);
  border-radius: 999px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.chat-limit {
  margin-top: 1rem;
  padding: 1.15rem;
  border: 1px solid rgba(212, 183, 111, .35);
  border-radius: 1rem;
  background: rgba(10, 38, 65, .84);
  text-align: center;
}

.chat-limit > span { color: var(--gold); font-size: 1.45rem; }
.chat-limit h2 { margin: .35rem 0; font-size: 1.2rem; }
.chat-limit p { margin: 0; color: var(--muted); }

.unlock-button {
  margin: 1.2rem .3rem .4rem;
}

.paywall-placeholder small {
  display: block;
  color: #91889f;
}

.share-options {
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  gap: .55rem;
  max-width: 24rem;
  margin: 1rem auto 0;
}

.share-option {
  display: inline-flex;
  flex: none;
  width: 100%;
  gap: .5rem;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: .58rem .82rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: var(--ink);
  cursor: pointer;
}

.share-facebook { color: #8ccbf8; }
.share-whatsapp { color: #74dfab; }
.share-x { color: #edf7ff; }

.share-platform-icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.share-option:hover,
.share-option:focus-visible {
  border-color: var(--violet-bright);
  background: rgba(99, 179, 237, .1);
}

.share-whatsapp {
  border-color: rgba(67, 207, 133, .5);
}

.share-x {
  border-color: rgba(237, 247, 255, .32);
}

.share-status:empty {
  display: none;
}

.paywall-placeholder .share-status {
  margin-top: .7rem;
  font-size: .8rem;
}

.social-share-hint {
  max-width: 38rem;
  margin: 1rem auto 0;
  padding: .8rem 1rem;
  border: 1px solid rgba(140, 203, 248, .28);
  border-radius: .8rem;
  background: rgba(34, 96, 156, .1);
  text-align: left;
}

.social-share-hint strong,
.social-share-hint small {
  display: block;
}

.social-share-hint p {
  margin: .35rem 0;
  color: var(--ink);
  font-size: .9rem;
}

.paywall-placeholder .paywall-account {
  max-width: 36rem;
  margin: 1.2rem auto 0;
  font-size: .85rem;
}

.paywall-account a {
  color: var(--violet-bright);
}

.chat-compose-box {
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(11, 42, 69, .95);
  box-shadow: 0 16px 45px rgba(1, 12, 24, .38);
  position: sticky;
  z-index: 20;
  bottom: max(var(--chat-compose-bottom, 0px), calc(env(safe-area-inset-bottom) + .65rem));
}

.chat-compose-slot {
  height: 0;
  pointer-events: none;
}

.chat-compose-sentinel { display: block; height: 0; }

.chat-compose-box.is-floating {
  position: static;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.chat-compose-box.is-inline {
  position: static;
}

.chat-compose-box .chat-status {
  padding: 0 0 .6rem;
  font-size: .75rem;
}

.chat-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .65rem;
}

.chat-composer[hidden] { display: none; }

.chat-composer.is-floating {
  position: fixed;
  inset-inline: .65rem;
  bottom: max(var(--chat-compose-bottom, 0px), calc(env(safe-area-inset-bottom) + .65rem));
  width: min(47rem, calc(100% - 1.3rem));
  margin-inline: auto;
  padding: .45rem;
  border: 1px solid var(--line);
  border-radius: .85rem;
  background: #0b2a45;
  box-shadow: 0 12px 32px rgba(1, 12, 24, .46);
  z-index: 40;
}

.chat-composer.is-floating > p { display: none; }

.chat-composer textarea {
  min-height: 2.8rem;
  max-height: 10rem;
  padding: .65rem .75rem;
  border: 0;
  outline: 0;
  resize: none;
}

.chat-compose-box:focus-within,
.chat-composer.is-floating:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(215, 188, 120, .16), 0 16px 45px rgba(1, 12, 24, .38);
}

.chat-composer button {
  display: flex;
  gap: .45rem;
  align-items: center;
  align-self: end;
  min-height: 2.8rem;
  padding: .65rem .9rem;
  border: 0;
  border-radius: .7rem;
  background: var(--violet);
  color: #06182a;
  cursor: pointer;
  font-weight: 800;
}

.chat-composer button:disabled,
.chat-composer textarea:disabled {
  cursor: wait;
  opacity: .55;
}

.chat-composer > p {
  grid-column: 1 / -1;
  margin: -.2rem .5rem 0;
  color: #8ca6bc;
  font-size: .7rem;
}

.chat-disclaimer {
  max-width: 700px;
  margin: 1rem auto .3rem;
  font-size: .72rem;
  text-align: center;
}

.chat-back-top {
  display: block;
  width: max-content;
  margin: 0 auto;
}

.site-messages {
  padding-block: 1rem;
  color: var(--violet-bright);
}

.site-footer {
  padding-block: 1.4rem;
  border-top: 1px solid var(--line);
  color: #8da6ba;
  font-size: .75rem;
  text-align: center;
}

.site-footer p {
  margin: .2rem;
}

.footer-links {
  justify-content: center;
  margin-top: .7rem;
}

.footer-links a {
  color: var(--muted);
  text-underline-offset: .2rem;
}

.footer-cookie-settings {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: .2rem;
}

.cookie-consent {
  position: fixed;
  z-index: 1000;
  inset: auto 1rem max(1rem, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  width: min(860px, calc(100% - 2rem));
  margin-inline: auto;
  padding: 1.1rem 1.25rem;
  border: 1px solid rgba(158, 213, 255, .32);
  border-radius: 1rem;
  background: rgba(5, 22, 39, .98);
  box-shadow: 0 18px 55px rgba(0, 0, 0, .52);
}

.cookie-consent h2 {
  margin: 0 0 .25rem;
  color: var(--ink);
  font-size: 1.1rem;
}

.cookie-consent p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.45;
}

.cookie-consent-copy > a {
  display: inline-block;
  margin-top: .3rem;
  color: var(--violet-bright);
  font-size: .84rem;
}

.cookie-consent-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(5.5rem, 1fr));
  gap: .5rem;
}

.cookie-consent-button {
  min-height: 44px;
  padding: .55rem .8rem;
  border: 1px solid rgba(158, 213, 255, .42);
  border-radius: .65rem;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.cookie-consent-accept {
  border-color: transparent;
  background: linear-gradient(110deg, #298fc9, #1762a0);
}

.cookie-consent-reject {
  background: rgba(255, 255, 255, .06);
}

.cookie-consent-button:focus-visible,
.footer-cookie-settings:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (max-width: 44rem) {
  .cookie-consent {
    inset-inline: .65rem;
    grid-template-columns: 1fr;
    gap: .75rem;
    width: auto;
    padding: 1rem;
  }

  .cookie-consent-actions {
    grid-template-columns: 1fr 1fr;
  }
}

.legal-page {
  min-height: calc(100vh - 12rem);
  max-width: 760px;
  padding-block: 2.5rem 4rem;
}

.legal-page h1 {
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 500;
}

.legal-page h2 {
  margin-top: 2rem;
}

.legal-page > p {
  color: var(--muted);
}

.legal-page .legal-warning {
  padding: .8rem 1rem;
  border: 1px solid rgba(215, 188, 120, .25);
  border-radius: .75rem;
  color: var(--gold);
}

.readings-history {
  min-height: calc(100vh - 10rem);
  padding-block: 2.5rem 4rem;
}

.history-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 1.5rem;
}

.history-heading h1 {
  margin-bottom: .6rem;
  font-size: clamp(2.7rem, 8vw, 4.8rem);
  font-weight: 500;
}

.history-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.history-list {
  display: grid;
  gap: .85rem;
}

.history-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}

.history-symbol {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  border: 1px solid rgba(215, 188, 120, .25);
  border-radius: 50%;
  color: var(--gold);
}

.history-card time,
.history-card p,
.history-state {
  color: var(--muted);
  font-size: .8rem;
}

.history-card h2,
.history-card p {
  margin: .15rem 0;
}

.history-state {
  grid-column: 2;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.history-state strong {
  color: var(--violet-bright);
}

.history-open {
  grid-column: 2;
  color: var(--gold);
  font-size: .9rem;
  font-weight: 700;
  text-underline-offset: .25rem;
}

.empty-history {
  padding: clamp(2rem, 8vw, 5rem);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: var(--surface);
  text-align: center;
}

.empty-history > span {
  color: var(--gold);
  font-size: 3rem;
}

.empty-history p {
  color: var(--muted);
}

@media (min-width: 700px) {
  .page-shell,
  .site-header,
  .site-footer,
  .site-messages {
    width: min(1120px, calc(100% - 4rem));
  }

  .benefit-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .natal-cta { grid-template-columns: minmax(0, 1fr) auto; }

  .form-layout {
    grid-template-columns: minmax(0, 1fr) minmax(340px, .8fr);
    gap: clamp(3rem, 8vw, 8rem);
  }

  .chat-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .history-card {
    grid-template-columns: auto 1fr auto auto;
  }

  .history-state,
  .history-open {
    grid-column: auto;
  }
}

@media (min-width: 950px) {
  .hero {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
  }
}

.natal-form-page, .natal-chart-page { padding-block: 1.5rem 3rem; }
.natal-heading { max-width: 46rem; margin-bottom: 1.25rem; }
.natal-heading h1 { margin: .45rem 0; font-family: Georgia, serif; font-size: clamp(2.2rem, 7vw, 4.5rem); }
.natal-form { max-width: 48rem; padding: clamp(1.2rem, 4vw, 2.2rem); border: 1px solid var(--line); border-radius: 1.4rem; background: rgba(9, 35, 61, .84); }
.natal-form-grid { display: grid; gap: 1rem; }
.natal-field { display: grid; gap: .4rem; }
.natal-field input, .natal-field select { width: 100%; min-height: 48px; padding: .75rem; color: var(--ink); border: 1px solid var(--line); border-radius: .75rem; background: #0a233d; }
.natal-field small { color: var(--muted); }
.place-search-field { position: relative; grid-column: 1 / -1; }
.place-search-results { position: absolute; z-index: 5; inset: calc(100% - 1.7rem) 0 auto; display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: .8rem; background: #0a233d; box-shadow: 0 1rem 2rem rgba(0,0,0,.3); }
.place-search-results[hidden] { display: none; }
.place-search-option { padding: .8rem 1rem; color: var(--ink); border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.place-search-option:hover, .place-search-option:focus-visible { background: rgba(112,185,239,.16); }
.place-search-status, .place-attribution { min-height: 1.2rem; margin: .2rem 0 0; color: var(--muted); font-size: .88rem; }
.place-manual-details { grid-column: 1 / -1; color: var(--muted); }
.place-manual-details summary { width: fit-content; cursor: pointer; }
.place-manual-fields { display: grid; gap: 1rem; margin-top: 1rem; }
.place-attribution { margin-block: .8rem; }
.natal-privacy { margin: 1.25rem 0; padding: 1rem; border-left: 3px solid var(--gold); background: rgba(255,255,255,.035); }
.natal-privacy p { margin: .3rem 0 0; color: var(--muted); }
.natal-layout { display: grid; gap: 1.25rem; align-items: center; }
.natal-wheel-wrap { width: min(100%, 28rem); margin-inline: auto; }
.natal-wheel { display: block; width: 100%; height: auto; overflow: visible; }
.natal-ring-outer, .natal-ring { fill: rgba(7,29,51,.58); stroke: rgba(126,194,244,.48); stroke-width: 1; }
.natal-ring { fill: none; stroke-opacity: .55; }
.natal-sign { fill: var(--gold); font-size: 18px; text-anchor: middle; dominant-baseline: middle; }
.natal-planet circle { fill: #103c62; stroke: var(--violet-bright); stroke-width: 1; }
.natal-planet text { fill: #fff; font-size: 14px; text-anchor: middle; dominant-baseline: central; }
.natal-aspect { stroke: rgba(112,185,239,.38); stroke-width: 1; }
.natal-aspect-square, .natal-aspect-opposition { stroke: rgba(255,143,164,.4); }
.natal-aspect-trine, .natal-aspect-sextile { stroke: rgba(124,220,204,.4); }
.natal-center, .natal-center-sub { fill: var(--ink); text-anchor: middle; font-family: Georgia, serif; letter-spacing: .12em; }
.natal-center-sub { fill: var(--muted); font-size: 9px; }
.natal-summary { padding: 1.1rem; border: 1px solid var(--line); border-radius: 1.2rem; background: rgba(9,35,61,.74); }
.natal-big-three { display: grid; gap: .75rem; margin: 1rem 0; }
.natal-big-three article { display: flex; gap: .8rem; align-items: center; padding: .8rem; border-radius: .8rem; background: rgba(255,255,255,.04); }
.natal-big-three article > span { color: var(--gold); font-size: 1.7rem; }
.natal-big-three div { display: grid; }
.natal-big-three small { color: var(--muted); }
.natal-table-section, .natal-aspects-list, .saved-natal-charts { margin-top: 2rem; }
.table-scroll { overflow-x: auto; }
.natal-table { width: 100%; border-collapse: collapse; min-width: 35rem; }
.natal-table th, .natal-table td { padding: .6rem .7rem; border-bottom: 1px solid var(--line); text-align: left; }
.natal-aspects-list ul { display: grid; gap: .6rem; padding: 0; list-style: none; }
.natal-aspects-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem; border-bottom: 1px solid var(--line); }

@media (min-width: 48rem) {
  .natal-form-grid { grid-template-columns: 1fr 1fr; }
  .natal-field-birthplace, .natal-field-city, .natal-field-country, .natal-field-timezone { grid-column: 1 / -1; }
  .natal-layout { grid-template-columns: minmax(0, 1.2fr) minmax(18rem, .8fr); }
}

@media (max-width: 420px) {
  .site-header {
    padding-block: .65rem;
  }

  .site-header nav {
    justify-content: flex-start;
  }

  .site-header .language-switcher {
    justify-self: end;
  }

  .hero {
    padding-block: 2.25rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
  }

  .hero-actions .primary-button {
    grid-column: 1 / -1;
  }

  .secondary-link {
    text-align: center;
  }

  .chat-composer button span:first-child {
    display: none;
  }
}

@media (max-width: 47.99rem) {
  .hero {
    grid-template-columns: 1fr 1fr;
    gap: .65rem;
    padding-block: 1rem 1.8rem;
  }

  .hero-copy,
  .hero-actions {
    display: contents;
  }

  .hero-copy > .eyebrow,
  .hero-copy > h1,
  .hero-copy > .hero-lead,
  .hero-actions .primary-button,
  .hero-ranking,
  .hero-copy > .trust-note {
    grid-column: 1 / -1;
  }

  .hero-copy > .eyebrow { order: 1; margin-bottom: 0; font-size: .68rem; }
  .hero-copy > h1 {
    order: 2;
    margin-bottom: .2rem;
    font-size: clamp(2.15rem, 11vw, 3.25rem);
  }
  .hero-copy > .hero-lead {
    order: 3;
    margin-bottom: .25rem;
    font-size: .95rem;
    line-height: 1.4;
  }
  .hero-actions .primary-button { order: 4; min-height: 2.8rem; }
  .hero-ranking {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    order: 5;
    gap: .35rem .75rem;
    padding: .9rem;
    border-color: rgba(145, 201, 242, .28);
    border-radius: 1rem;
    background:
      radial-gradient(circle at 90% 0%, rgba(215, 188, 120, .14), transparent 9rem),
      linear-gradient(145deg, rgba(18, 67, 105, .94), rgba(7, 29, 51, .92));
    box-shadow: 0 16px 36px rgba(1, 12, 24, .34);
  }
  .hero-ranking .section-kicker {
    display: inline-flex;
    grid-column: 1 / -1;
    grid-row: 2;
    align-items: center;
    align-self: center;
    margin: 0;
    padding: .2rem .45rem;
    border: 1px solid rgba(215, 188, 120, .3);
    border-radius: 999px;
    background: rgba(215, 188, 120, .08);
    font-size: .55rem;
    letter-spacing: .08em;
  }
  .hero-ranking h2 {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    font-size: 1.35rem;
  }
  .hero-ranking h2::before {
    margin-right: .35rem;
    color: var(--gold);
    content: "✦";
  }
  .hero-ranking .home-ranking-list {
    grid-column: 1 / -1;
    grid-row: 3;
    gap: .28rem;
    margin-top: .25rem;
  }
  .hero-ranking .home-ranking-list article {
    grid-template-columns: 1.75rem minmax(0, 1fr) auto;
    gap: .55rem;
    min-height: 2rem;
    padding: .25rem .5rem;
    border-color: rgba(145, 201, 242, .16);
    border-radius: .55rem;
    background: rgba(255, 255, 255, .035);
  }
  .hero-ranking .home-ranking-list span {
    display: grid;
    width: 1.45rem;
    height: 1.45rem;
    place-items: center;
    border-radius: 50%;
    background: rgba(103, 175, 232, .13);
    color: #c9dceb;
    font-size: .68rem;
  }
  .hero-ranking .home-ranking-list strong {
    font-size: .84rem;
    letter-spacing: .01em;
  }
  .hero-ranking .home-ranking-movement {
    padding-left: .35rem;
    font-size: .66rem;
    letter-spacing: .04em;
  }
  .hero-ranking .home-ranking-list .ranking-top-1,
  .hero-ranking .home-ranking-list .ranking-top-2,
  .hero-ranking .home-ranking-list .ranking-top-3 {
    border-color: rgba(215, 188, 120, .38);
    background: linear-gradient(90deg, rgba(215, 188, 120, .13), rgba(215, 188, 120, .035));
  }
  .hero-ranking .home-ranking-list .ranking-top-1 {
    min-height: 2.35rem;
    box-shadow: inset 3px 0 0 rgba(215, 188, 120, .75);
  }
  .hero-ranking .home-ranking-list .ranking-top-1 span,
  .hero-ranking .home-ranking-list .ranking-top-2 span,
  .hero-ranking .home-ranking-list .ranking-top-3 span {
    background: var(--gold);
    color: var(--night);
  }
  .hero-ranking .home-ranking-list .ranking-top-1 strong { font-size: .92rem; }
  .hero-actions .secondary-link { order: 6; margin-top: .15rem; font-size: .82rem; text-align: center; }
  .hero-copy > .trust-note { order: 7; margin-top: .25rem; font-size: .75rem; }
}

/* En móviles amplios hay espacio suficiente para que el ranking acompañe a la
   introducción. En teléfonos estrechos se conserva la lectura vertical. */
@media (min-width: 24rem) and (max-width: 47.99rem) {
  .hero {
    grid-template-columns: minmax(0, 1.16fr) minmax(9.8rem, .84fr);
    align-items: start;
    column-gap: .8rem;
  }

  .hero-copy > .eyebrow,
  .hero-copy > h1,
  .hero-copy > .hero-lead,
  .hero-actions .primary-button,
  .hero-actions .secondary-link,
  .hero-copy > .trust-note {
    grid-column: 1;
  }

  .hero-copy > h1 {
    font-size: clamp(1.95rem, 7vw, 2.75rem);
    line-height: 1;
  }

  .hero-copy > .hero-lead { font-size: .88rem; }
  .hero-actions .primary-button { min-height: 2.7rem; padding-inline: .8rem; }
  .hero-actions .secondary-link { font-size: .76rem; }

  .hero-ranking {
    grid-column: 2;
    grid-row: 1 / span 8;
    align-self: start;
    padding: .75rem;
  }

  .hero-ranking h2 { font-size: 1.12rem; }
  .hero-ranking .section-kicker { font-size: .48rem; }
  .hero-ranking .home-ranking-list { gap: .2rem; }
  .hero-ranking .home-ranking-list article {
    grid-template-columns: 1.45rem minmax(0, 1fr) auto;
    gap: .35rem;
    min-height: 1.8rem;
    padding: .16rem .3rem;
  }
  .hero-ranking .home-ranking-list span {
    width: 1.3rem;
    height: 1.3rem;
    font-size: .62rem;
  }
  .hero-ranking .home-ranking-list strong { font-size: .72rem; }
  .hero-ranking .home-ranking-movement {
    min-width: 1.75rem;
    padding-left: .1rem;
    font-size: .56rem;
  }
  .hero-ranking .home-ranking-list .ranking-top-1 { min-height: 2rem; }
  .hero-ranking .home-ranking-list .ranking-top-1 strong { font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zodiac-ring.is-intro-spinning,
  .zodiac-ring.is-intro-spinning .wheel-item-content {
    transition-duration: 1.2s !important;
  }
}

/* Keep the homepage ranking sized to its content at every breakpoint. */
.home-top-layout > .hero-ranking {
  width: max-content;
  max-width: 100%;
  justify-self: center;
}

@media (max-width: 47.99rem) {
  .home-top-layout > .hero-ranking {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    max-width: none;
  }

  .home-top-layout > .hero-ranking .section-kicker {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: .68rem;
  }

  .home-top-layout > .hero-ranking h2 {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    font-size: 1.35rem;
  }

  .home-top-layout > .hero-ranking h2::before {
    content: none;
  }
}

/* Daily publication status and stored editorial scores. */
.reading-update {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .65rem 1rem;
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: rgba(255, 255, 255, .025);
  font-size: .85rem;
}
.reading-update time { margin-inline-start: .4rem; color: var(--gold); font-variant-numeric: tabular-nums; font-weight: 700; }
.reading-update small { display: block; margin-top: .25rem; color: var(--muted); font-size: .75rem; }
.reading-update form { margin: 0; }
.reading-update [hidden] { display: none; }
.reading-topic h3 { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .55rem; }
.reading-score { display: inline-flex; align-items: center; gap: .35rem; color: var(--gold); letter-spacing: 0; white-space: nowrap; font-size: .72rem; }
.reading-score-dots { display: inline-flex; gap: 2px; }
.reading-score-dots i { width: 5px; height: 5px; border: 1px solid currentColor; border-radius: 50%; opacity: .45; }
.reading-score-dots .is-filled { background: currentColor; opacity: 1; }
.reading-update .secondary-button {
  min-height: 44px;
  padding: .5rem .8rem;
  border: 1px solid var(--gold);
  border-radius: .6rem;
  color: inherit;
  background: rgba(212, 183, 111, .08);
  font: 600 .85rem/1.3 system-ui, sans-serif;
  cursor: pointer;
}
.reading-update .secondary-button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
/* Compact cycle clocks and a readable mobile reading. */
.cycle-clocks { display:flex; flex-wrap:wrap; justify-content:center; gap:.25rem 1.2rem; padding:.45rem 1rem; color:#c1d7e8; background:rgba(12,45,72,.7); font-size:.75rem; }
.cycle-clocks time { color:var(--gold); font-weight:700; font-variant-numeric:tabular-nums; white-space:nowrap; }
.reading-update[hidden] { display:none; }
#chat-form { scroll-margin-top:1rem; }
@media (max-width:47.99rem) {
  .chat-compose-box { position: static; }
  .chat-compose-box[data-dock-state="docked"] { position: sticky; }
  .chat-composer { gap: .4rem; }
  /* Keep the input reachable if mobile JavaScript fails or is blocked. */
  .chat-composer:not(.is-docked) {
    position: fixed;
    inset-inline: .65rem;
    bottom: max(var(--chat-compose-bottom, 0px), calc(env(safe-area-inset-bottom) + .65rem));
    width: min(47rem, calc(100% - 1.3rem));
    margin-inline: auto;
    padding: .45rem;
    border: 1px solid var(--line);
    border-radius: .85rem;
    background: #0b2a45;
    box-shadow: 0 12px 32px rgba(1, 12, 24, .46);
    z-index: 40;
  }
  .chat-composer:not(.is-docked) > p { display: none; }
  .chat-composer textarea { padding-inline: .55rem; }
  .chat-composer textarea::placeholder { font-size: .875rem; }
  .cycle-clocks { font-size:.7rem; gap:.15rem .75rem; }
}
.reading-score.score-1,.reading-score.score-2 { color:#f5a3a0; }
.reading-score.score-3 { color:#e9ce86; }
.reading-score.score-4,.reading-score.score-5 { color:#91deb2; }
:is(.rank-position-1,.rank-position-2,.rank-position-3) { --rank-color:#91deb2; --rank-bg:rgba(74,160,110,.13); }
:is(.rank-position-4,.rank-position-5,.rank-position-6) { --rank-color:#9dddc8; --rank-bg:rgba(80,165,145,.10); }
:is(.rank-position-7,.rank-position-8,.rank-position-9) { --rank-color:#e9ce86; --rank-bg:rgba(180,150,70,.10); }
:is(.rank-position-10,.rank-position-11,.rank-position-12) { --rank-color:#f5a3a0; --rank-bg:rgba(180,95,95,.10); }
.home-ranking-list article[class*="rank-position-"] { border-color:var(--rank-color); background:var(--rank-bg); }
.home-ranking-list article {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.home-ranking-list .ranking-sign-action {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ranking-sign-action::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 10%, rgba(255,255,255,.17) 50%, transparent 90%);
  transform: translateX(-125%);
  pointer-events: none;
  transition: transform .5s ease;
}
.home-ranking-list article:focus-within { box-shadow: 0 0 12px var(--rank-bg); }
.ranking-sign-action:focus-visible { outline: 2px solid var(--rank-color); outline-offset: -4px; }
.ranking-sign-action:active,
.ranking-sign-action.is-opening { background: rgba(255,255,255,.12); }
.ranking-sign-action.is-opening { cursor: progress; }
@media (hover: hover) and (pointer: fine) {
  .home-ranking-list article:hover { transform: translateY(-2px); box-shadow: 0 3px 14px var(--rank-bg); }
  .ranking-sign-action:hover::after { transform: translateX(125%); }
}
@media (max-width: 47.99rem) {
  .home-top-layout > .hero-ranking .home-ranking-list article[class*="rank-position-"][role="listitem"] { min-height: calc(2.75rem + 2px); }
}
@media (prefers-reduced-motion: reduce) {
  .home-ranking-list article, .ranking-sign-action::after { transition: none; }
  .home-ranking-list article:hover { transform: none; }
}
.home-ranking-list article[class*="rank-position-"] > span { color:var(--rank-color); }
[class*="rank-position-"] > .ranking-position { color:var(--rank-color); background:var(--rank-bg); }

/* Match the desktop ranking's colours and rows on mobile. */
@media (max-width: 47.99rem) {
  .home-top-layout > .hero-ranking {
    border-color: var(--line);
    background: linear-gradient(145deg, rgba(18, 57, 91, .8), rgba(8, 31, 54, .76));
    box-shadow: 0 18px 45px rgba(1, 12, 24, .24);
  }
  .home-top-layout > .hero-ranking .section-kicker {
    margin: 0 0 .5rem;
    font-size: .78rem;
    letter-spacing: .13em;
  }
  .home-top-layout > .hero-ranking h2 { margin: 0 0 .5rem; font-size: 1.7rem; }
  .home-top-layout > .hero-ranking .home-ranking-list { gap: .35rem; margin: .75rem 0 0; }
  .home-top-layout > .hero-ranking .home-ranking-list article[class*="rank-position-"] {
    grid-template-columns: 1.3rem minmax(0, 1fr) 1.3rem;
    gap: .15rem;
    min-height: 2.3rem;
    padding: .35rem .45rem;
    border-color: var(--rank-color);
    background: var(--rank-bg);
    box-shadow: none;
  }
  .home-top-layout > .hero-ranking .home-ranking-list article[class*="rank-position-"] > span {
    display: block;
    width: auto;
    height: auto;
    background: transparent;
    color: var(--rank-color);
    font-size: .8rem;
  }
  .home-top-layout > .hero-ranking .home-ranking-list article[class*="rank-position-"] > strong {
    font-size: .82rem;
    letter-spacing: normal;
  }
  .home-top-layout > .hero-ranking .home-ranking-movement {
    min-width: 0;
    padding-left: 0;
    font-size: .6rem;
    letter-spacing: normal;
    white-space: nowrap;
    justify-self: end;
  }
}

/* The weekly clock belongs with the ranking; the daily clock stays above. */
.ranking-clock { margin: .35rem 0; color: #c1d7e8; font: 600 .72rem/1.35 system-ui, sans-serif; text-align: center; }
.ranking-clock time { color: var(--gold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.selected-ranking-card .ranking-clock { grid-column: 1 / -1; text-align: left; }
@media (max-width: 47.99rem) {
  .home-top-layout > .hero-ranking .ranking-clock { grid-column: 1 / -1; grid-row: 3; justify-self: center; }
  .home-top-layout > .hero-ranking .home-ranking-list { grid-row: 4; }
}

@media (max-width: 23rem) {
  .home-top-layout { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); }
  .home-top-layout > .hero-ranking { padding-inline: .35rem; }
  .home-top-layout > .hero-ranking .home-ranking-list article[class*="rank-position-"] {
    padding-inline: .25rem;
  }
}
@media (min-width: 23.01rem) and (max-width: 47.99rem) {
  .home-top-layout > .hero-ranking { padding-inline: .5rem; }
}

/* Reading actions and ranking summary. */
.mobile-reading-actions { display: none; }
.selected-ranking-card > .ranking-badge {
  grid-column: 1;
  align-self: start;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  min-width: 4.2rem;
  min-height: 3.6rem;
  padding: .4rem .6rem;
  border: 1px solid var(--rank-color, var(--line));
  border-radius: .65rem;
  background: var(--rank-bg, rgba(255, 255, 255, .04));
  color: var(--rank-color, var(--ink));
  font-size: .68rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.selected-ranking-card .ranking-badge strong { font-size: 1.35rem; line-height: 1; }
.selected-ranking-card > div > p:first-child { margin-top: 0; }

.reading-score-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3rem; margin: .65rem 0 .8rem; font-size: .85rem; line-height: 1.35; }
.score-summary-item { display: flex; flex-direction: column; align-items: center; gap: .22rem; min-width: 0; white-space: nowrap; }
.score-summary-reading { display: inline-flex; align-items: center; gap: .25rem; font-size: .8rem; color: var(--score-summary-color); }
.score-summary-dots { display: inline-flex; gap: 2px; }
.score-summary-dots i { width: 6px; height: 6px; border: 1px solid currentColor; border-radius: 50%; opacity: .45; }
.score-summary-dots i.is-filled { background: currentColor; opacity: 1; }
.score-summary-item strong { font-weight: 800; }
.score-summary-item.score-1, .score-summary-item.score-2 { --score-summary-color: #f5a3a0; }
.score-summary-item.score-3 { --score-summary-color: #e9ce86; }
.score-summary-item.score-4, .score-summary-item.score-5 { --score-summary-color: #91deb2; }
@media (max-width: 47.99rem) {
  .home-reading-actions { display: none; }
  .chat-layout { padding-top: .8rem; }
  .chat-header { grid-template-columns: auto minmax(0, 1fr) auto; gap: .35rem .6rem; }
  .chat-sign-text { display: contents; }
  .chat-header .chat-label { grid-column: 1 / -1; grid-row: 1; font-size: .65rem; }
  .chat-header .sign-symbol { grid-column: 1; grid-row: 2; width: 2.75rem; height: 2.75rem; }
  .chat-header h1 { grid-column: 2; grid-row: 2; min-width: 0; font-size: 1.65rem; overflow-wrap: anywhere; }
  .mobile-reading-actions { grid-column: 3; grid-row: 2; display: flex; gap: .35rem; }
  .mobile-reading-actions a { display: grid; width: 2.75rem; height: 2.75rem; place-items: center; border: 1px solid var(--line); border-radius: .7rem; background: rgba(16, 54, 88, .62); color: var(--ink); }
  .mobile-reading-actions a:last-child { border-color: rgba(215, 188, 120, .5); }
  .mobile-reading-actions svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
  .selected-ranking-card { gap: .55rem; margin: .65rem 0; padding: .7rem; }
}
