/* Seven Oracles: warm night sky, gold for good fortune.
   Follows the landing-page-design skill: one typeface (Geist, Geist Mono for numbers),
   Tailwind type scale as named text styles, spacing tokens, flat backgrounds. */

:root {
  color-scheme: dark;
  --bg: #131209;
  --surface: #1F1F1F;
  --surface-2: #272727;
  --line: #313131;
  --line-2: #3D3D3D;
  --text: #F5F5F5;
  --text-2: #CFCFCF;
  --muted: #9B9B9B;
  --accent: #E8BE62;
  --accent-hover: #F3D58F;
  --on-accent: #131209;
  --good: #E8BE62;
  --mixed: #9B9B9B;
  --bad: #C25A33;
  --bad-text: #E58A63;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button { font-family: inherit; }
button:disabled { opacity: 0.4; cursor: not-allowed; }
img { max-width: 100%; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------ text styles */
.heading-1 { margin: 0; font-size: 60px; line-height: 60px; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
.heading-2 { margin: 0; font-size: 48px; line-height: 48px; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
.heading-4 { margin: 0; font-size: 30px; line-height: 36px; font-weight: 600; text-wrap: balance; }
.heading-5 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 600; text-wrap: balance; }
.heading-6 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; text-wrap: balance; }
.title-1 { font-size: 20px; line-height: 28px; font-weight: 500; }
.title-2 { margin: 0; font-size: 18px; line-height: 28px; font-weight: 500; text-wrap: pretty; }
.title-3 { font-size: 16px; line-height: 24px; font-weight: 500; }
.title-4 { font-size: 14px; line-height: 20px; font-weight: 500; }
.body-3 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 400; text-wrap: pretty; }
.body-6 { margin: 0; font-size: 14px; line-height: 20px; font-weight: 400; text-wrap: pretty; }
.button-md { font-size: 16px; line-height: 24px; font-weight: 600; }
.button-sm { font-size: 14px; line-height: 20px; font-weight: 600; }
.caption-2 { margin: 0; font-size: 14px; line-height: 20px; font-weight: 400; }
.caption-3 { margin: 0; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.caption-5 { margin: 0; font-size: 12px; line-height: 16px; font-weight: 400; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.soft { color: var(--text-2); }
.accent { color: var(--accent); }
.hero-heading {
  background: linear-gradient(90deg, #FFFFFF, #9B9B9B);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (max-width: 640px) {
  .heading-1 { font-size: 36px; line-height: 40px; }
  .heading-2 { font-size: 30px; line-height: 36px; }
  .heading-4 { font-size: 24px; line-height: 32px; }
}

/* ------------------------------------------------------------ page chrome */
.skip {
  position: absolute; left: 16px; top: -64px; z-index: 30;
  padding: 8px 12px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); text-decoration: none;
}
.skip:focus { top: 16px; }

.banner { margin: 0; padding: 8px 16px; text-align: center; background: var(--surface); color: var(--muted); }

.nav-shell {
  position: sticky; top: 16px; z-index: 20;
  display: flex; justify-content: center; padding: 16px 16px 0;
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  display: flex; align-items: center; gap: 8px; padding: 8px;
  border-radius: 9999px; border: 1px solid var(--line);
  background: rgba(31, 31, 31, 0.72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.nav-link {
  display: flex; align-items: center; min-height: 44px; padding: 8px 16px;
  border-radius: 9999px; color: var(--muted); text-decoration: none;
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.nav-link:hover { background: var(--line); color: var(--text); }
.nav-link[aria-current="page"] { background: var(--line); color: var(--text); }
@media (max-width: 420px) {
  .brand-name { display: none; }
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
main.wrap { padding-bottom: 96px; }

.footer { border-top: 1px solid var(--line); padding: 48px 24px 64px; color: var(--muted); }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }

/* ------------------------------------------------------------ shared parts */
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px;
  border-radius: 12px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--accent); color: var(--on-accent);
  transition: background-color 300ms var(--ease), transform 500ms var(--ease);
}
.btn:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn:not(:disabled):active { transform: scale(0.98); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: var(--text);
  cursor: pointer; text-decoration: none;
  transition: background-color 300ms var(--ease), border-color 300ms var(--ease), transform 500ms var(--ease);
}
.btn-ghost:not(:disabled):hover { background: var(--surface-2); color: var(--text); }
.btn-ghost:not(:disabled):active { transform: scale(0.98); }

.card { padding: 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.panel { padding: 32px; border-radius: 24px; border: 1px solid var(--line); }
.lift { transition: transform 500ms var(--ease), background-color 300ms var(--ease), border-color 300ms var(--ease); }
.lift:hover { transform: translateY(-4px); background: var(--surface-2); border-color: var(--line-2); }
.lift:active { transform: scale(0.98); }

.meter { display: block; height: 8px; border-radius: 9999px; background: var(--line); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent); }
.big-score { font-family: var(--mono); font-size: 72px; line-height: 72px; font-weight: 600; color: var(--accent); }
.mid-score { font-family: var(--mono); font-size: 60px; line-height: 60px; font-weight: 600; color: var(--accent); }

.dots { display: flex; gap: 4px; }
.dot { width: 12px; height: 12px; border-radius: 9999px; display: inline-block; }
.dot.good { background: var(--good); }
.dot.mixed { background: var(--mixed); }
.dot.bad { background: var(--bad); }
.dot.missing { width: 10px; height: 10px; margin: 1px; border: 1px dashed #6B6B6B; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 8px; }

.glyph { display: flex; align-items: center; justify-content: center; border-radius: 9999px; color: var(--accent); }

.notice {
  margin: 24px 0 0; padding: 12px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2);
}

.past-notice { margin: 0 0 32px; }

/* Day picker: previous, a list of every collected day, next */
.day-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.icon-btn { width: 44px; padding: 0; justify-content: center; }
.icon-btn[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
.day-select {
  min-height: 44px; padding: 8px 40px 8px 12px; border-radius: 12px;
  border: 1px solid var(--line-2); color: var(--text); cursor: pointer;
  font: 500 16px/24px var(--sans); appearance: none; -webkit-appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='none' stroke='%239B9B9B' stroke-width='20' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='208 96 128 176 48 96'/%3E%3C/svg%3E") no-repeat right 12px center / 16px 16px;
  transition: border-color 300ms var(--ease), background-color 300ms var(--ease);
}
.day-select:hover { border-color: var(--muted); }
.day-select option { background: var(--surface); color: var(--text); }

.reveal { opacity: 0; transform: translateY(32px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.skeleton { border-radius: 16px; background: var(--surface); animation: pulse 1600ms var(--ease) infinite alternate; }
@keyframes pulse { from { opacity: 0.5; } to { opacity: 1; } }

.error-box { margin: 64px 0; padding: 32px; border-radius: 24px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }

/* ------------------------------------------------------------ home */
.hero { padding: 96px 0 80px; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; justify-content: space-between; }
.hero-copy { flex: 1 1 560px; min-width: 0; max-width: 680px; display: flex; flex-direction: column; gap: 24px; }
.lead { margin: 0; max-width: 680px; font-size: 18px; line-height: 28px; color: var(--text-2); text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.luck-card {
  flex: 0 1 360px; min-width: 280px; display: flex; flex-direction: column; gap: 16px; padding: 32px;
  border-radius: 24px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.luck-card:hover { color: var(--text); }
.score-line { display: flex; align-items: baseline; gap: 8px; }

.section-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 32px; }
.signs { padding: 48px 0 96px; }
.sign-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.sign-card { display: flex; flex-direction: column; gap: 16px; height: 100%; color: var(--text); text-decoration: none; }
.sign-card:hover { color: var(--text); }
.sign-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sign-id { display: flex; align-items: center; gap: 12px; }
.sign-id .glyph { width: 48px; height: 48px; background: var(--surface-2); font-size: 24px; }
.sign-id > span:last-child { display: flex; flex-direction: column; }
.sign-headline { min-height: 48px; color: var(--text-2); }
.sign-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }

.tagline { padding: 96px 0; display: flex; justify-content: center; }
.tagline p { max-width: 680px; display: flex; flex-direction: column; gap: 8px; }
.tagline-line { display: flex; flex-wrap: wrap; column-gap: 12px; }
.word { color: rgba(245, 245, 245, 0.3); transition: color 500ms var(--ease); }
.word.lit { color: var(--text); }

.steps { padding: 80px 0 32px; }
.step-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.step-list li { display: flex; flex-direction: column; gap: 12px; padding: 32px; border-radius: 16px; border: 1px solid var(--line); }

/* ------------------------------------------------------------ sign page */
.back {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 48px;
  color: var(--muted); text-decoration: none; transition: color 300ms var(--ease), transform 500ms var(--ease);
}
.back:hover { color: var(--text); transform: translateX(-4px); }
.sign-hero { padding: 32px 0 64px; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-end; justify-content: space-between; }
.sign-hero-copy { flex: 1 1 560px; min-width: 0; max-width: 680px; display: flex; flex-direction: column; gap: 24px; }
.sign-hero-id { display: flex; align-items: center; gap: 16px; }
.sign-hero-id .glyph { width: 64px; height: 64px; font-size: 32px; background: var(--surface); border: 1px solid var(--line); }
.sign-hero-id > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.sign-luck { flex: 0 1 320px; min-width: 260px; display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }

.share { position: relative; align-self: flex-start; }
.share-menu {
  position: absolute; top: 56px; left: 0; z-index: 15; width: 280px; padding: 8px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  display: flex; flex-direction: column; gap: 2px;
}
.share-menu[hidden] { display: none; }
.menu-item {
  display: flex; align-items: center; gap: 12px; min-height: 44px; width: 100%; padding: 8px 12px;
  border-radius: 8px; border: 0; background: transparent; color: var(--text); text-decoration: none; text-align: left; cursor: pointer;
  transition: background-color 300ms var(--ease);
}
.menu-item:hover { background: var(--surface-2); color: var(--text); }
.menu-rule { height: 1px; background: var(--line); margin: 4px 0; }

.tally { display: flex; flex-direction: column; gap: 16px; }
.tally-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }
.bars7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.bars7 span { height: 16px; border-radius: 4px; }
.bars7 .good { background: var(--good); }
.bars7 .mixed { background: var(--mixed); }
.bars7 .bad { background: var(--bad); }
.bars7 .missing { border: 1px dashed #6B6B6B; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { padding: 4px 12px; border-radius: 9999px; background: var(--surface-2); }

.reading { padding-top: 64px; display: flex; flex-direction: column; gap: 48px; }
.overview { max-width: 680px; display: flex; flex-direction: column; gap: 16px; }
.areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.area { display: flex; flex-direction: column; gap: 12px; }
.advice { padding: 32px; border-radius: 24px; background: var(--surface); border: 1px solid var(--accent); display: flex; flex-direction: column; gap: 12px; }
.advice p { max-width: 680px; }

.pager { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pager a { display: flex; flex-direction: column; min-height: 44px; color: var(--text); text-decoration: none; transition: transform 500ms var(--ease); }
.pager a:hover { color: var(--accent); }
.pager a:active { transform: scale(0.98); }
.pager a.next { align-items: flex-end; }

/* ------------------------------------------------------------ community */
.community { margin-top: 64px; padding-top: 64px; border-top: 1px solid var(--line); max-width: 800px; display: flex; flex-direction: column; gap: 32px; }
.vote-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.vote {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer;
  transition: background-color 300ms var(--ease), border-color 300ms var(--ease), transform 500ms var(--ease);
}
.vote:not(:disabled):hover { background: var(--surface-2); }
.vote:not(:disabled):active { transform: scale(0.98); }
.vote.up[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.vote.down[aria-pressed="true"] { background: var(--bad); border-color: var(--bad); color: #FFF4EE; }
.approve { display: flex; flex-direction: column; gap: 8px; max-width: 400px; }

.signin { padding: 32px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.social-row { display: flex; flex-wrap: wrap; gap: 12px; }
.social {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 16px;
  border-radius: 12px; cursor: pointer; transition: transform 500ms var(--ease), opacity 300ms var(--ease);
}
.social:not(:disabled):hover { transform: translateY(-2px); }
.social:not(:disabled):active { transform: scale(0.98); }
.social.google { background: #FFFFFF; color: #1F1F1F; border: 1px solid #FFFFFF; }
.social.facebook { background: #0866FF; color: #FFFFFF; border: 1px solid #0866FF; }
.social.instagram { background: #000000; color: #FFFFFF; border: 1px solid var(--line-2); }

.composer { padding: 24px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.composer-top, .composer-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.me { display: flex; align-items: center; gap: 12px; }
.me > span:last-child { display: flex; flex-direction: column; }
.avatar {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 9999px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--text-2);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.mine { background: var(--accent); color: var(--on-accent); }
.quiet {
  min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); cursor: pointer;
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.quiet:hover { background: var(--surface-2); color: var(--text); }
textarea {
  width: 100%; padding: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line-2);
  color: var(--text); font-family: inherit; font-size: 16px; line-height: 24px; resize: vertical;
}
textarea::placeholder { color: #8A8A8A; }
.form-error { color: var(--bad-text); }

.comment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.comment { display: flex; gap: 16px; padding: 24px 0; border-top: 1px solid var(--line); }
.comment-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.comment-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.comment-text { white-space: pre-line; overflow-wrap: anywhere; }
.badge { padding: 2px 8px; border-radius: 9999px; font-size: 12px; line-height: 16px; font-weight: 600; border: 1px solid; }
.badge.up { color: var(--accent); border-color: var(--accent); }
.badge.down { color: var(--bad-text); border-color: var(--bad); }
.empty { padding: 32px; border-radius: 16px; border: 1px dashed var(--line-2); color: var(--muted); }

/* ------------------------------------------------------------ luck page */
.luck-hero { padding: 96px 0 64px; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.split { display: flex; height: 16px; border-radius: 9999px; overflow: hidden; gap: 2px; max-width: 560px; }
.split .good { background: var(--good); }
.split .mixed { background: var(--mixed); }
.split .bad { background: var(--bad); }
.split-key { display: flex; gap: 24px; flex-wrap: wrap; color: var(--muted); }
.split-key strong { color: var(--text); font-weight: 600; font-family: var(--mono); }
.gauge-box { flex: 0 1 400px; min-width: 280px; padding: 32px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); display: flex; justify-content: center; }
.gauge { width: 100%; max-width: 320px; height: auto; }

.trend-scroll { overflow-x: auto; }
.trend { min-width: 560px; display: flex; gap: 12px; }
.trend-axis { display: flex; flex-direction: column; justify-content: space-between; height: 220px; width: 24px; color: var(--muted); text-align: right; }
.trend-plot { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; }
.trend-area { position: relative; height: 220px; border-bottom: 1px solid var(--line); }
.trend-mid { position: absolute; left: 0; right: 0; top: 110px; height: 1px; background: var(--surface-2); }
.trend-bars { position: relative; height: 220px; display: flex; align-items: flex-end; justify-content: flex-start; gap: 4px; }
.trend-bar { flex: 1 1 0; max-width: 48px; border-radius: 4px 4px 0 0; background: var(--line-2); transition: opacity 300ms var(--ease); }
.trend-bar.today { background: var(--accent); }
.trend-bar:hover { opacity: 0.8; }
.trend-labels { display: flex; gap: 4px; color: var(--muted); }
.trend-labels span { flex: 1 1 0; max-width: 48px; text-align: center; white-space: nowrap; }

.luck-lower { display: flex; flex-wrap: wrap; gap: 48px; padding-top: 64px; }
.rank { flex: 999 1 560px; min-width: 0; }
.rank ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rank a {
  display: grid; grid-template-columns: 32px minmax(88px, 120px) minmax(0, 1fr) 48px; align-items: center; gap: 16px;
  min-height: 44px; padding: 8px 12px; border-radius: 12px; color: var(--text); text-decoration: none;
  transition: background-color 300ms var(--ease), transform 500ms var(--ease);
}
.rank a:hover { background: var(--surface); color: var(--text); }
.rank a:active { transform: scale(0.98); }
.rank .glyph { font-size: 20px; }
.how { flex: 1 1 300px; min-width: 0; align-self: flex-start; padding: 32px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.scale3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.scale3 span { display: flex; flex-direction: column; gap: 4px; padding: 12px 4px; border-radius: 12px; background: var(--surface-2); }

/* ------------------------------------------------------------ simple pages */
.prose { max-width: 680px; padding: 64px 0 32px; display: flex; flex-direction: column; gap: 16px; }
.prose h2 { margin-top: 24px; }

/* ------------------------------------------------------------ languages */
.lang-select {
  min-height: 44px; padding: 8px 32px 8px 12px; border-radius: 9999px; border: 0; cursor: pointer;
  color: var(--muted); font-family: inherit; appearance: none; -webkit-appearance: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='none' stroke='%239B9B9B' stroke-width='20' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='208 96 128 176 48 96'/%3E%3C/svg%3E") no-repeat right 12px center / 12px 12px;
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.lang-select:hover { background-color: var(--line); color: var(--text); }
.lang-select option { background: var(--surface); color: var(--text); }
.num-end { text-align: end; }

/* Hindi and Arabic: script fonts after Geist (Latin letters and digits stay Geist),
   no letter spacing (it breaks joined scripts), and taller lines for marks above and below. */
:root[lang="hi"] { --sans: "Geist", "Noto Sans Devanagari", system-ui, sans-serif; }
:root[lang="ar"] { --sans: "Geist", "Noto Sans Arabic", system-ui, sans-serif; }
:root:is([lang="hi"], [lang="ar"]) body * { letter-spacing: 0 !important; }
:root:is([lang="hi"], [lang="ar"]) :is(.heading-1, .heading-2, .heading-4, .heading-5, .heading-6) { line-height: 1.4; }
:root:is([lang="hi"], [lang="ar"]) :is(.body-3, .title-2, .lead, .body-6, .caption-2) { line-height: 1.7; }
:root:is([lang="hi"], [lang="ar"]) .word { line-height: 1.5; }

/* Right to left (Arabic) */
[dir="rtl"] .skip { left: auto; right: 16px; }
[dir="rtl"] .share-menu { left: auto; right: 0; }
[dir="rtl"] .hero-heading { background-image: linear-gradient(270deg, #FFFFFF, #9B9B9B); }
[dir="rtl"] .flip-rtl svg { transform: scaleX(-1); }
[dir="rtl"] .back:hover { transform: translateX(4px); }
[dir="rtl"] .day-select { padding: 8px 12px 8px 40px; background-position: left 12px center; }
[dir="rtl"] .lang-select { padding: 8px 12px 8px 32px; background-position: left 12px center; }
[dir="rtl"] .menu-item { text-align: right; }
[dir="rtl"] .trend { direction: ltr; } /* time still runs left to right on the chart */
[dir="rtl"] .score-line { direction: ltr; justify-content: flex-end; } /* keep "6.4 / 10" in reading order */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-property: opacity, background-color, color, border-color !important; }
  .reveal { transform: none; }
  .lift:hover, .lift:active, .back:hover, .social:hover, .btn:active, .vote:active { transform: none; }
  .word { color: var(--text); }
  .skeleton { animation: none; }
}
