:root {
  color-scheme: dark;
  --bg: #070912;
  --panel: rgba(13, 18, 33, 0.88);
  --panel-strong: #10172a;
  --ink: #f4f7fb;
  --muted: #a8b3c7;
  --line: rgba(179, 207, 255, 0.18);
  --cyan: #45d7ff;
  --gold: #f2c96f;
  --rose: #f47ca3;
  --violet: #9b7cff;
  --green: #69d894;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 10%, rgba(69, 215, 255, 0.18), transparent 26rem),
    radial-gradient(circle at 85% 12%, rgba(244, 124, 163, 0.18), transparent 25rem),
    linear-gradient(160deg, #070912 0%, #0b1021 48%, #110d1c 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

body,
button,
input,
select {
  overflow-wrap: break-word;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  min-width: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(69, 215, 255, 0.55);
  outline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 46px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 18, 0.82);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(242, 201, 111, 0.6);
  border-radius: 10px;
  background: linear-gradient(145deg, #17223a, #2a1740);
  color: var(--gold);
  font-weight: 900;
  box-shadow: 0 0 24px rgba(242, 201, 111, 0.22);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.8rem;
}

.desktop-nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.desktop-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--muted);
  padding: 0 11px;
  text-decoration: none;
}

.desktop-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.language-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.language-switch button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  padding: 0 12px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 70px;
  min-height: 42px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  padding: 0 10px;
}

.mobile-menu {
  position: fixed;
  inset: 70px 16px auto auto;
  z-index: 30;
  display: grid;
  width: min(260px, calc(100% - 32px));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 14, 28, 0.96);
  box-shadow: var(--shadow);
  padding: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-menu a {
  min-height: 44px;
  display: flex;
  align-items: center;
  border-radius: 9px;
  color: var(--ink);
  padding: 0 12px;
  text-decoration: none;
}

.mobile-menu a:hover {
  background: rgba(255, 255, 255, 0.07);
}

.language-switch button.is-active {
  border-color: rgba(69, 215, 255, 0.76);
  background: rgba(69, 215, 255, 0.16);
  color: var(--ink);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: 22px;
  align-items: stretch;
  padding: 34px 0 20px;
}

.hero-copy,
.hero-art,
.reading-form,
.result-panel,
.ranking-section,
.mode-section,
.content-section article {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: grid;
  align-content: center;
  padding: clamp(24px, 5vw, 46px);
}

.eyebrow {
  color: var(--gold);
  font-size: 0.84rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 680px;
  margin-bottom: 14px;
  font-size: clamp(2.25rem, 5.6vw, 4.7rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h1 span {
  display: block;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.08rem;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.trust-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #d8e5f5;
  padding: 8px 11px;
  font-size: 0.9rem;
}

.hero-art {
  min-height: 380px;
  overflow: hidden;
}

.hero-art img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  padding: 12px 0 28px;
}

.reading-form,
.result-panel,
.ranking-section {
  padding: clamp(18px, 3vw, 26px);
}

.form-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.form-head p,
.fineprint,
.reading-copy p,
.status,
.content-section p {
  color: var(--muted);
}

.orb {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff, transparent 18%),
    radial-gradient(circle, var(--cyan), var(--violet));
  box-shadow: 0 0 30px rgba(69, 215, 255, 0.36);
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 13px;
  color: #dce7f5;
  font-size: 0.95rem;
  font-weight: 750;
}

.partner-block {
  border: 1px solid rgba(244, 124, 163, 0.26);
  border-radius: 10px;
  background: rgba(244, 124, 163, 0.07);
  margin: 0 0 13px;
  padding: 12px;
}

.partner-block[hidden] {
  display: none;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  padding: 0 12px;
}

select option {
  background: #10172a;
  color: var(--ink);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--cyan), #6e72ff);
  color: #03101b;
  padding: 0 16px;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

button.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.fineprint {
  margin: 14px 0 0;
  font-size: 0.86rem;
}

.result-panel {
  display: grid;
  gap: 16px;
}

.score-ring {
  display: grid;
  width: 124px;
  height: 124px;
  place-items: center;
  justify-self: end;
  border: 2px solid rgba(69, 215, 255, 0.48);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(69, 215, 255, 0.18), transparent 60%),
    rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 34px rgba(69, 215, 255, 0.23);
}

.score-ring span {
  align-self: end;
  color: var(--muted);
  font-size: 0.85rem;
}

.score-ring strong {
  align-self: start;
  color: var(--gold);
  font-size: 2.25rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.profile-grid article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
}

.profile-grid span,
.ranking-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.profile-grid strong {
  display: block;
  margin-top: 3px;
  color: #f8fbff;
}

.card-spread {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tarot-card {
  position: relative;
  min-height: 218px;
  overflow: hidden;
  border: 1px solid rgba(242, 201, 111, 0.36);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(9, 17, 30, 0.94), rgba(42, 23, 64, 0.92)),
    radial-gradient(circle at 50% 28%, rgba(69, 215, 255, 0.2), transparent 46%);
  box-shadow: inset 0 0 28px rgba(242, 201, 111, 0.08);
  padding: 14px;
}

.tarot-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(69, 215, 255, 0.24);
  border-radius: 10px;
}

.tarot-card::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  left: calc(50% - 45px);
  top: 54px;
  border: 1px solid rgba(242, 201, 111, 0.52);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(242, 201, 111, 0.34), transparent 23%),
    conic-gradient(from 0deg, rgba(69, 215, 255, 0.2), rgba(244, 124, 163, 0.22), rgba(242, 201, 111, 0.2), rgba(69, 215, 255, 0.2));
}

.tarot-card h3,
.tarot-card p,
.tarot-card span {
  position: relative;
  z-index: 1;
}

.tarot-card span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tarot-card h3 {
  margin: 18px 0 6px;
  font-size: 1.05rem;
}

.tarot-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.card-glyph {
  position: relative;
  z-index: 1;
  display: grid;
  width: 62px;
  height: 62px;
  margin: 28px auto 0;
  place-items: center;
  border: 1px solid rgba(242, 201, 111, 0.5);
  border-radius: 50%;
  background: rgba(69, 215, 255, 0.08);
  color: var(--gold);
  font-size: 1.7rem;
  font-weight: 900;
  box-shadow: 0 0 30px rgba(69, 215, 255, 0.18);
}

.reading-copy {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.reading-copy h2 {
  margin-bottom: 8px;
}

.status {
  min-height: 24px;
  margin: 0;
}

.ranking-section {
  margin-bottom: 28px;
}

.mode-section {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
  margin-bottom: 28px;
  padding: clamp(16px, 2.6vw, 22px);
}

.mode-visual {
  overflow: hidden;
  border-radius: 10px;
}

.mode-visual img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.mode-copy {
  display: grid;
  align-content: center;
}

.mode-cards {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.mode-cards article {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 13px;
}

.mode-cards span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
}

.mode-cards strong {
  font-size: 1.02rem;
}

.mode-cards p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-head button {
  min-width: 92px;
}

.ranking-list {
  display: grid;
  gap: 10px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
}

.rank-number {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: rgba(69, 215, 255, 0.13);
  color: var(--cyan);
  font-weight: 900;
}

.ranking-card strong {
  display: block;
}

.ranking-score {
  color: var(--gold);
  font-size: 1.2rem;
  font-weight: 900;
}

.content-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}

.content-section article {
  padding: clamp(18px, 3vw, 24px);
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  padding: 24px clamp(16px, 4vw, 46px) 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

footer a {
  min-height: 28px;
}

.content-section a {
  color: var(--cyan);
  font-weight: 800;
}

.page-shell {
  width: min(1020px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 48px;
}

.page-hero,
.article-card,
.community-panel,
.thread-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.page-hero {
  padding: clamp(24px, 5vw, 46px);
  margin-bottom: 18px;
}

.page-hero h1 {
  max-width: 840px;
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.article-card {
  display: grid;
  gap: 9px;
  padding: 18px;
  text-decoration: none;
}

.article-card span,
.article-meta,
.community-muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.article-card strong {
  font-size: 1.15rem;
  line-height: 1.2;
}

.article-body {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 40px);
}

.article-body h2 {
  margin-top: 28px;
}

.article-body p,
.article-body li {
  color: #d6e1f1;
  font-size: 1.02rem;
}

.community-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 16px;
}

.community-panel,
.thread-card {
  padding: 18px;
}

.community-panel label {
  margin-bottom: 12px;
}

.community-panel textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  padding: 12px;
  font: inherit;
}

.thread-list {
  display: grid;
  gap: 12px;
}

.thread-card {
  display: grid;
  gap: 8px;
}

.thread-card h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
}

.thread-card p {
  margin: 0;
  color: #d6e1f1;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 0.82rem;
}

.bottom-cta {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 10px;
  z-index: 40;
  display: none;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), #6e72ff);
  color: #03101b;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

@media (max-width: 900px) {
  .desktop-nav {
    display: none;
  }

  .hero,
  .app-grid,
  .mode-section,
  .article-grid,
  .community-grid,
  .content-section {
    grid-template-columns: 1fr;
  }

  .score-ring {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  body {
    padding-bottom: 72px;
  }

  .topbar {
    align-items: flex-start;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 70px;
  }

  .language-switch {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    padding-top: 20px;
  }

  .hero-art,
  .hero-art img {
    min-height: 260px;
  }

  .profile-grid,
  .card-spread {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .section-head {
    align-items: flex-start;
  }

  .ranking-score {
    grid-column: 2;
  }

  .bottom-cta {
    display: flex;
  }
}
