:root {
  --bg: #05060d;
  --text: #ece9f5;
  --muted: #9d99b5;
  --gold: #f0d79a;
  --gold-2: #c9a35a;
  --violet: #7b6ce0;
  --line: rgba(214, 183, 116, .18);
  --line-soft: rgba(214, 183, 116, .10);
  --glass-top: rgba(19, 20, 36, .72);
  --glass-bottom: rgba(9, 10, 20, .62);
  --radius: 18px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

html { background: var(--bg); }

body {
  position: relative;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-left: max(18px, env(safe-area-inset-left));
  padding-right: max(18px, env(safe-area-inset-right));
}

/* ---------------------------------------------------------------- шапка */

.site-header {
  position: relative;
  z-index: 1;
  padding-top: max(54px, calc(env(safe-area-inset-top) + 34px));
  padding-bottom: clamp(24px, 4vh, 44px);
  text-align: center;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: -10% 0 auto 0;
  height: 120%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(56% 54% at 50% 34%, rgba(240, 215, 154, .12), transparent 72%),
    radial-gradient(42% 44% at 16% 26%, rgba(123, 108, 224, .15), transparent 74%),
    radial-gradient(48% 42% at 84% 66%, rgba(201, 163, 90, .09), transparent 74%);
}

.site-header__kicker {
  margin: 0 0 14px;
  font-size: clamp(.66rem, 2.4vw, .84rem);
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold-2);
}

.site-header__title {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 7.4vw, 5.6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: .01em;
  background: linear-gradient(100deg, #fff 6%, var(--gold) 44%, var(--gold-2) 74%, #fff 108%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.site-header__date {
  margin: 18px 0 0;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  color: var(--text);
}

.site-header__moon {
  margin: 8px 0 0;
  font-size: clamp(.86rem, 2vw, 1rem);
  color: var(--gold);
}

.site-header__update {
  margin: 14px 0 0;
  font-size: clamp(.7rem, 1.8vw, .82rem);
  letter-spacing: .04em;
  color: var(--muted);
}

/* ---------------------------------------------------------------- сетка */

.goroscope {
  position: relative;
  z-index: 1;
  padding-bottom: max(48px, calc(env(safe-area-inset-bottom) + 28px));
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: clamp(14px, 2vw, 22px);
  align-items: start;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: border-color .3s ease, transform .3s ease;
}

@media (hover: hover) {
  .card:hover { border-color: rgba(240, 215, 154, .38); transform: translateY(-2px); }
}

.card--moon {
  border-color: rgba(240, 215, 154, .48);
  box-shadow: 0 0 0 1px rgba(240, 215, 154, .12), 0 22px 60px rgba(0, 0, 0, .28);
}

.card__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.card__glyph {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "Cormorant Garamond", Georgia, serif;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(240, 215, 154, .05);
}

.card__id { min-width: 0; }

.card__name {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.45rem, 2.4vw, 1.7rem);
  font-weight: 600;
  line-height: 1.1;
}

.card__dates {
  margin: 4px 0 0;
  font-size: .76rem;
  color: var(--muted);
}

.card__badge {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px solid rgba(240, 215, 154, .4);
  border-radius: 999px;
  font-size: .64rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

.card__lead {
  margin: 16px 0 0;
  font-size: .94rem;
  line-height: 1.58;
  color: var(--text);
}

.scores {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.score {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  font-size: .74rem;
}

.score__label { color: var(--muted); }

.score__bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: rgba(236, 233, 245, .09);
  overflow: hidden;
}

.score__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--gold));
}

.score__value {
  text-align: right;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.card__lucky {
  margin: 16px 0 0;
  font-size: .76rem;
  color: var(--muted);
}

.card__lucky b { color: var(--text); font-weight: 600; }

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin: 0 5px 0 2px;
  border-radius: 50%;
  vertical-align: 0;
  box-shadow: 0 0 8px rgba(255, 255, 255, .18);
}

.card__more {
  margin-top: 16px;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

.card__more summary {
  cursor: pointer;
  list-style: none;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}

.card__more summary::-webkit-details-marker { display: none; }

.card__more summary::after {
  content: "+";
  font-size: 1.1rem;
  color: var(--gold);
}

.card__more[open] summary::after { content: "−"; }

.card__body {
  padding-top: 10px;
}

.card__body p {
  margin: 0 0 10px;
  font-size: .86rem;
  line-height: 1.55;
  color: var(--muted);
}

.card__body p:last-child { margin-bottom: 0; }

.card__body b { color: var(--text); font-weight: 600; }

.card__action {
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  color: var(--gold) !important;
}

.under {
  margin-top: clamp(28px, 5vh, 46px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.disclaimer {
  margin: 0;
  max-width: 64ch;
  text-align: center;
  font-size: .78rem;
  line-height: 1.6;
  color: var(--muted);
}

.motion-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .25s ease, border-color .25s ease;
}

.motion-toggle:hover,
.motion-toggle:focus-visible {
  color: var(--text);
  border-color: rgba(240, 215, 154, .42);
  outline: none;
}

/* ---------------------------------------------------------------- мобильный */

@media (max-width: 560px) {
  .site-header { padding-top: max(40px, calc(env(safe-area-inset-top) + 26px)); }
  .site-header__kicker { letter-spacing: .26em; }
  .site-header__title { font-size: clamp(2.2rem, 10.6vw, 3.2rem); }
  .card__badge { padding: 4px 8px; font-size: .58rem; }
  .score { grid-template-columns: 62px minmax(0, 1fr) 40px; gap: 8px; }
}

@media (max-width: 360px) {
  .wrap { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .card { padding: 16px; }
  .card__glyph { width: 46px; height: 46px; font-size: 1.65rem; }
  .card__lead { font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}
