:root {
  --bg: #fbf8ff;
  --paper: #ffffff;
  --paper-soft: #fffaf4;
  --text: #241735;
  --muted: #746983;
  --line: rgba(94, 64, 130, 0.14);
  --brand: #7f57e8;
  --brand-dark: #5532b8;
  --brand-soft: #efe8ff;
  --gold: #f4b84a;
  --shadow: 0 18px 50px rgba(62, 40, 100, 0.11);
  --radius: 24px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(127, 87, 232, 0.14), transparent 34rem),
    radial-gradient(circle at top right, rgba(244, 184, 74, 0.12), transparent 28rem),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
p { margin: 0; color: var(--muted); }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 248, 255, 0.88);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: white;
  background: linear-gradient(135deg, var(--brand), #b96bff);
  box-shadow: 0 12px 28px rgba(127, 87, 232, 0.28);
}
.brand strong { display: block; font-size: 16px; line-height: 1.2; }
.brand small { display: block; max-width: 260px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.nav-links a, .language-switch a {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}
.nav-links a:hover, .language-switch a:hover, .language-switch a.active { background: var(--brand-soft); color: var(--brand-dark); }
.language-switch { display: flex; gap: 4px; align-items: center; }
.language-switch a.active { font-weight: 800; }
.hero, .page-hero, .section, .luck-strip, .site-footer {
  width: min(1120px, calc(100% - 36px));
  margin-left: auto;
  margin-right: auto;
}
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: center;
  padding: 54px 0 36px;
}
.hero-copy, .hero-panel, .page-hero, .compatibility-box, .tarot-card, .prose {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}
.hero-copy { padding: 42px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
}
h1, h2, h3 { margin: 0; line-height: 1.16; color: var(--text); }
h1 { font-size: clamp(36px, 7vw, 68px); letter-spacing: -0.055em; }
h2 { font-size: clamp(24px, 4vw, 38px); letter-spacing: -0.035em; }
h3 { font-size: 20px; letter-spacing: -0.02em; }
.hero-copy > p:not(.eyebrow), .page-hero > p:not(.eyebrow) { margin-top: 16px; font-size: 18px; max-width: 680px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: linear-gradient(135deg, var(--brand), #a864ff); color: white; box-shadow: 0 12px 28px rgba(127, 87, 232, 0.24); }
.button.secondary { background: var(--paper); color: var(--brand-dark); border: 1px solid var(--line); }
.hero-panel { padding: 28px; min-height: 320px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.hero-panel::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  right: -70px;
  bottom: -80px;
  background: rgba(127, 87, 232, 0.13);
}
.today-badge { align-self: flex-start; margin-bottom: 16px; padding: 9px 13px; border-radius: 999px; background: var(--paper-soft); color: #a06100; font-weight: 800; font-size: 13px; }
.hero-panel h2 { margin-bottom: 12px; }
.sparkline { display: flex; gap: 9px; margin-top: 26px; align-items: end; }
.sparkline span { width: 18%; border-radius: 999px; background: linear-gradient(180deg, #b896ff, var(--brand)); }
.sparkline span:nth-child(1){ height: 38px; } .sparkline span:nth-child(2){ height: 72px; } .sparkline span:nth-child(3){ height: 52px; } .sparkline span:nth-child(4){ height: 96px; }
.section { padding: 24px 0; }
.section-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 18px; }
.section-head p { max-width: 520px; }
.sign-grid, .tool-grid, .number-grid, .detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.sign-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sign-card, .tool-card, .number-card, .color-card, .detail-card {
  position: relative;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 28px rgba(62, 40, 100, 0.07);
  overflow: hidden;
}
.tool-card { min-height: 170px; display: flex; flex-direction: column; gap: 10px; transition: transform .18s ease, box-shadow .18s ease; }
.tool-card:hover, .sign-card:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(62, 40, 100, 0.12); }
.tool-card span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 15px; background: var(--brand-soft); }
.sign-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sign-top span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.mini-luck { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.mini-luck span { padding: 6px 9px; border-radius: 999px; background: var(--paper-soft); color: #8a5b00; font-size: 12px; font-weight: 800; }
.text-link { color: var(--brand-dark); font-weight: 800; }
.page-hero { margin-top: 38px; padding: 38px; }
.page-hero.small h1 { font-size: clamp(34px, 6vw, 54px); }
.sign-detail { background: linear-gradient(135deg, rgba(255,255,255,0.88), rgba(241,232,255,0.82)); }
.detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail-card h2 { font-size: 22px; margin-bottom: 10px; }
.luck-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
  margin-bottom: 16px;
}
.luck-strip div {
  border-radius: 22px;
  background: linear-gradient(135deg, var(--brand), #b86bff);
  color: white;
  padding: 22px;
}
.luck-strip span { display: block; opacity: 0.82; font-weight: 700; }
.luck-strip strong { display: block; margin-top: 4px; font-size: 28px; line-height: 1.15; }
.number-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.number-card strong, .color-card strong { display: block; margin: 10px 0; color: var(--brand-dark); font-size: 42px; line-height: 1; }
.color-card strong { font-size: 22px; }
.color-orb { width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff, #b998ff 42%, var(--brand)); box-shadow: inset 0 0 20px rgba(255,255,255,.6); margin-bottom: 12px; }
.compatibility-box, .tarot-card, .prose { padding: 28px; }
.select-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 18px 0; }
label { display: grid; gap: 8px; color: var(--muted); font-weight: 800; }
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  background: white;
  color: var(--text);
  font-size: 16px;
}
.compat-result { margin-top: 18px; padding: 18px; border-radius: 18px; background: var(--brand-soft); color: var(--text); display: none; }
.compat-result.visible { display: block; }
.tarot-card { text-align: center; max-width: 680px; }
.tarot-face { width: 124px; height: 178px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 18px; background: linear-gradient(135deg, #2e1c54, #8f65ff); color: white; font-size: 42px; box-shadow: var(--shadow); }
.tarot-card p { margin: 12px auto 20px; max-width: 560px; }
.prose p + p { margin-top: 12px; }
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-top: 34px;
  padding: 30px 0 42px;
  border-top: 1px solid var(--line);
}
.site-footer p { max-width: 740px; font-size: 14px; margin-top: 6px; }
.muted { color: #91879e; }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-links a { color: var(--brand-dark); font-weight: 800; }
@media (max-width: 920px) {
  .site-header { align-items: flex-start; flex-wrap: wrap; padding: 12px 16px; }
  .brand { min-width: 0; flex: 1 1 100%; }
  .brand small { max-width: 76vw; }
  .nav-links { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .language-switch { position: absolute; right: 16px; top: 18px; }
  .hero { grid-template-columns: 1fr; padding-top: 28px; }
  .hero-copy, .page-hero { padding: 28px; }
  .sign-grid, .sign-grid.compact, .tool-grid, .number-grid, .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head { display: block; }
  .section-head p { margin-top: 8px; }
}
@media (max-width: 560px) {
  .hero, .page-hero, .section, .luck-strip, .site-footer { width: min(100% - 24px, 1120px); }
  .hero-copy, .hero-panel, .page-hero, .compatibility-box, .tarot-card, .prose { border-radius: 20px; padding: 22px; }
  h1 { font-size: 40px; }
  .hero-actions, .select-row, .site-footer { display: grid; grid-template-columns: 1fr; }
  .button { width: 100%; }
  .sign-grid, .sign-grid.compact, .tool-grid, .number-grid, .detail-grid, .luck-strip { grid-template-columns: 1fr; }
  .sign-card, .tool-card, .number-card, .color-card, .detail-card { border-radius: 18px; padding: 18px; }
  .nav-links a { white-space: nowrap; }
}

/* v2 content and language selector */
body[dir="rtl"] { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
body[dir="rtl"] .brand, body[dir="rtl"] .nav-links, body[dir="rtl"] .hero-actions, body[dir="rtl"] .mini-luck, body[dir="rtl"] .footer-links { direction: rtl; }
.language-switch { position: relative; }
.lang-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: var(--brand-dark);
  font-weight: 800;
  cursor: pointer;
}
.lang-button::after { content: "⌄"; font-size: 13px; opacity: .75; }
.language-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 176px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  display: none;
  z-index: 30;
}
body[dir="rtl"] .language-menu { right: auto; left: 0; }
.language-menu.open { display: grid; gap: 4px; }
.language-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
}
.language-menu a:hover, .language-menu a.active { background: var(--brand-soft); color: var(--brand-dark); }
.language-menu a.active::after { content: "✓"; font-weight: 900; }
.zodiac-dna {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.zodiac-dna div {
  padding: 14px;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 18px;
  background: rgba(255,255,255,.58);
}
.zodiac-dna span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.zodiac-dna strong { display: block; margin-top: 3px; color: var(--text); }
.daily-note {
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.68);
}
.daily-note p { color: var(--text); }
.detail-card.wide { grid-column: 1 / -1; }
.detail-card .meta { margin-top: 10px; color: var(--brand-dark); font-weight: 800; }
.micro-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.micro-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 10px 28px rgba(62, 40, 100, 0.06);
}
.micro-card span { display: block; color: var(--muted); font-size: 13px; font-weight: 800; }
.micro-card strong { display: block; margin-top: 6px; color: var(--text); font-size: 20px; line-height: 1.2; }
.sign-symbol {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 24px;
  margin-bottom: 12px;
}
.trait-line { margin-top: 10px; font-size: 13px; color: var(--muted); }
.related-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.related-strip a { padding: 9px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; font-size: 14px; }
@media (max-width: 920px) {
  .zodiac-dna, .micro-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .language-switch { position: absolute; right: 12px; top: 14px; }
  body[dir="rtl"] .language-switch { right: auto; left: 12px; }
  .lang-button { min-height: 36px; padding: 0 10px; font-size: 13px; }
  .language-menu { min-width: 154px; }
  .zodiac-dna, .micro-grid { grid-template-columns: 1fr; }
  .micro-card strong { font-size: 18px; }
}
