:root {
  --fg: #14161a;
  --muted: #5f6672;
  --faint: #98a0ab;
  --line: #e4e7ee;
  --paper: #ffffff;
  --board: #1e3a8a;
  --card: #ffffff;
  --yes: #b42318;
  --no: #0b7a4b;
  --amber: #b54708;
  --amber-bg: #fff6e5;
  --amber-line: #f9d99b;
  --signal: #fde047;
  --font: "Mukta", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
  --display: var(--font);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
p { margin: 0; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--fg);
  background: var(--paper);
}
main { flex: 1; }

a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }
::selection { background: var(--signal); color: #14161a; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--board); color: #fff; }
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; white-space: nowrap; font-size: 19px; font-weight: 800; line-height: 1; letter-spacing: -0.01em; }
.brand { color: var(--signal); }
.brand svg { color: var(--signal); }
.nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 6px 11px; border-radius: 999px; font-size: 14px; color: rgba(255, 255, 255, 0.82); text-decoration: none; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.14); }
.nav a[aria-current="page"] { font-weight: 600; }
.lang { flex: none; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.45); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; }
.lang:hover { background: rgba(255, 255, 255, 0.14); }

.main { padding-top: 28px; padding-bottom: 56px; }

/* ---------- Landing (today pages) ---------- */
body.landing { color: #fff; background: #2b2f36; }
body.landing:has(.scene.is-yes) { background: radial-gradient(120% 90% at 15% 10%, #c4291c 0%, #a01f14 55%, #7d1810 100%); }
body.landing:has(.scene.is-no) { background: radial-gradient(120% 90% at 15% 10%, #0f8a55 0%, #0b7348 55%, #075c38 100%); }
.landing .topbar { background: transparent; border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
.landing .main { display: flex; align-items: center; padding-top: 24px; padding-bottom: 32px; }
.landing .main > #today { flex: 1; min-width: 0; }
.landing .footer { color: rgba(255, 255, 255, 0.82); border-top-color: rgba(255, 255, 255, 0.16); }

.scene {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
  grid-template-areas:
    "q      art"
    "answer art"
    "detail art";
  grid-template-rows: auto auto 1fr;
  column-gap: 56px;
  align-items: start;
}
.scene-q { grid-area: q; }
.scene-q h1 { margin: 0; font-size: 24px; line-height: 1.3; font-weight: 600; letter-spacing: -0.005em; text-wrap: balance; }
.day-tabs { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 16px; border-radius: 999px; background: rgba(0, 0, 0, 0.18); }
.day-tabs a { padding: 5px 16px 4px; border-radius: 999px; color: rgba(255, 255, 255, 0.86); font-size: 15px; font-weight: 700; text-decoration: none; transition: background-color 150ms ease-out, color 150ms ease-out; }
.day-tabs a:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.day-tabs a[aria-current="page"] { background: #fff; color: var(--yes); }
.scene.is-no .day-tabs a[aria-current="page"] { color: var(--no); }
.scene-answer { grid-area: answer; margin-top: 4px; }
.scene-word { font-weight: 800; font-size: clamp(120px, 16vw, 200px); line-height: 0.8; letter-spacing: -0.045em; text-transform: uppercase; margin-top: 14px; }
.scene[lang="mr"] .scene-word { letter-spacing: -0.01em; line-height: 1.05; margin-top: 4px; }
.scene-tag { font-weight: 800; font-size: 32px; line-height: 1.15; letter-spacing: -0.01em; margin-top: 10px; color: var(--signal); }
.scene[lang="mr"] .scene-tag { margin-top: 2px; }
.scene-detail { grid-area: detail; margin-top: 18px; max-width: 44ch; }
.scene-reason { font-size: 17px; line-height: 1.5; }
.scene-note { margin-top: 8px; font-size: 15px; }
.scene-src { margin-top: 14px; font-size: 13px; color: rgba(255, 255, 255, 0.88); }
.scene .alert { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.28); font-size: 15px; }
.scene .alert strong { color: var(--signal); }
.scene .alert a { font-size: 13px; }

.scene-art { grid-area: art; align-self: center; display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; border-radius: 14px; -webkit-tap-highlight-color: transparent; }
.shop { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--display); filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.28)); }

/* ---------- Shop animation ----------
   Final states are the defaults. Closing: open shop -> shutter drops with a
   short settle -> thud -> DRY DAY stamp. Opening: shutter rolls up -> lights
   come on -> OPEN sign drops and swings to rest. */
.shop .sh-shutter { transform: translateY(0); }
.shop.is-opening .sh-shutter { transform: translateY(-164px); }
.shop .sh-glow { opacity: 0; }
.shop.is-opening .sh-glow { opacity: 0.45; }
.shop .bulb { fill: #6b7280; }
.shop.is-opening .bulb { fill: var(--signal); filter: drop-shadow(0 0 4px rgba(253, 224, 71, 0.9)); }
.shop .sh-stamp { transform-box: fill-box; transform-origin: center; transform: rotate(-8deg); }
.shop .sh-sign { transform-box: view-box; transform-origin: 190px 112px; }
.shop .sh-body { transform-box: view-box; transform-origin: 190px 300px; }

.shop.is-closing .sh-shutter { animation: shutter-down 820ms 250ms both; }
.shop.is-closing .sh-glow { animation: lights-off 200ms ease-out 900ms both; }
.shop.is-closing .bulb { animation: bulbs-off 160ms ease-out 880ms both; }
.shop.is-closing .sh-body { animation: thud 260ms ease-out 1090ms; }
.shop.is-closing .sh-stamp { animation: stamp 380ms var(--ease-out) 1060ms both; }

.shop.is-opening .sh-shutter { animation: shutter-up 780ms cubic-bezier(0.65, 0, 0.35, 1) 250ms both; }
.shop.is-opening .sh-glow { animation: lights-on 300ms ease-out 900ms both; }
.shop.is-opening .bulb { animation: bulbs-on 160ms ease-out both; animation-delay: calc(900ms + var(--i) * 45ms); }
.shop.is-opening .sh-sign { animation: sign-swing 1100ms var(--ease-out) 1150ms both; }

@keyframes shutter-down {
  0% { transform: translateY(-164px); animation-timing-function: cubic-bezier(0.5, 0, 1, 0.55); }
  78% { transform: translateY(0); animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  88% { transform: translateY(-6px); animation-timing-function: cubic-bezier(0.5, 0, 1, 0.55); }
  100% { transform: translateY(0); }
}
@keyframes shutter-up {
  from { transform: translateY(0); }
  to { transform: translateY(-164px); }
}
@keyframes stamp {
  0% { opacity: 0; transform: rotate(-18deg) scale(2.2); }
  55% { opacity: 1; }
  100% { opacity: 1; transform: rotate(-8deg) scale(1); }
}
@keyframes thud {
  0% { transform: translateY(0) scale(1); }
  30% { transform: translateY(2px) scale(0.992); }
  65% { transform: translateY(-1px) scale(1.002); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes sign-swing {
  0% { opacity: 0; transform: translateY(-30px) rotate(16deg); }
  25% { opacity: 1; transform: translateY(0) rotate(-10deg); }
  50% { transform: rotate(6deg); }
  72% { transform: rotate(-3deg); }
  88% { transform: rotate(1deg); }
  100% { transform: rotate(0); }
}
@keyframes lights-on { from { opacity: 0; } to { opacity: 0.45; } }
@keyframes lights-off { from { opacity: 0.45; } to { opacity: 0; } }
@keyframes bulbs-on { from { fill: #6b7280; filter: none; } to { fill: var(--signal); } }
@keyframes bulbs-off { from { fill: var(--signal); } to { fill: #6b7280; } }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .shop *, .shop { animation: none !important; }
  .shop.is-closing .sh-stamp, .shop.is-opening .sh-sign { animation: fade-in 220ms ease-out 150ms both !important; }
}

/* ---------- Reference pages (lists, how it works) ---------- */
h1 { font-size: 30px; line-height: 1.2; letter-spacing: -0.02em; margin: 8px 0 12px; font-weight: 800; text-wrap: balance; }
h2 { font-size: 20px; line-height: 1.3; margin: 0 0 12px; font-weight: 750; letter-spacing: -0.01em; }
.lede { color: var(--muted); margin: 0 0 24px; max-width: 66ch; }
.hint { margin-top: 12px; font-size: 14px; color: var(--muted); }
.more { font-size: 14px; margin-top: 14px; }
.section { margin-top: 40px; }
.section p { max-width: 70ch; }
.section p + p { margin-top: 10px; }

.faq { border-bottom: 1px solid var(--line); }
.faq:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq[open] summary::after { content: "–"; }
.faq p { margin: 0 0 14px; color: #3b4048; max-width: 68ch; }

.list { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.list th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #f4f6fb; }
.list td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.list tr:last-child td { border-bottom: 0; }
.list .c-date { width: 150px; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 650; }
.list .c-hours { width: 120px; }
.list .c-src { font-size: 13px; width: 170px; }
.list .c-src a { color: var(--muted); }
.list tr.is-past td { color: var(--faint); }
.list tr.is-past .c-src a { color: var(--faint); }
.row-note { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.45; }

.tag { display: inline-block; font-size: 12px; line-height: 18px; padding: 0 6px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); font-weight: 500; white-space: nowrap; vertical-align: 1px; background: #fff; }
.tag-warn { border-color: var(--amber-line); color: var(--amber); background: var(--amber-bg); }

.defs { margin: 0; display: grid; gap: 10px; }
.defs div { display: grid; grid-template-columns: 190px 1fr; gap: 12px; }
.defs dt { color: var(--muted); }
.defs dd { margin: 0; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 18px 0 24px; }
.footer p { margin: 3px 0; }

/* ---------- Tablet ---------- */
@media (max-width: 880px) {
  .scene { grid-template-columns: minmax(0, 1fr) minmax(0, 360px); column-gap: 32px; }
  .scene-word { font-size: clamp(110px, 18vw, 170px); }
}

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .topbar-inner { gap: 6px; height: auto; padding-top: 10px; padding-bottom: 6px; flex-wrap: wrap; }
  .brand { font-size: 18px; }
  .lang { order: 2; margin-left: auto; }
  .nav { order: 3; }
  .nav { margin-left: -8px; width: calc(100% + 8px); gap: 0; }
  .nav a { padding: 5px 8px; font-size: 13px; }

  .landing .main { align-items: flex-start; padding-top: 18px; }
  .scene {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "q" "answer" "art" "detail";
    grid-template-rows: none;
  }
  .scene-q h1 { font-size: 20px; }
  .day-tabs { margin-bottom: 12px; }
  .scene-word { font-size: 112px; margin-top: 4px; }
  .scene-tag { font-size: 26px; }
  .scene-art { margin-top: 18px; }
  .scene-detail { margin-top: 18px; }
  .scene-reason { font-size: 16px; }

  h1 { font-size: 24px; }
  .defs div { grid-template-columns: 1fr; gap: 2px; }

  .list { border-radius: 12px; }
  .list thead { display: none; }
  .list, .list tbody, .list tr, .list td { display: block; width: 100%; }
  .list tr { border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .list tr:last-child { border-bottom: 0; }
  .list td { border: 0; padding: 1px 0; }
  .list .c-date, .list .c-hours, .list .c-src { width: auto; }
  .list .c-where, .list .c-hours { color: var(--muted); display: inline; }
  .list .c-where::after { content: " · "; }
  .list .c-src { margin-top: 2px; }
}
