:root {
  --font-d: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-b: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-label: 'Barlow Condensed', 'Manrope', sans-serif;
  --r: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --red: #e8112d;
  --yellow: #ffcc00;
}
[data-theme='dark'] {
  --bg: #0e1838;
  --surface: #17244d;
  --surface-2: #1f2f5e;
  --line: #2c3d73;
  --text: #f3f5fb;
  --muted: #aeb8d8;
  --faint: #8290ba;
  --accent: #e8112d;
  --accent-ink: #ff5a6b;
  --hi: #ffcc00;
  --active: #33d17a;
  --upcoming: #ffcc00;
  --done: #8a91b4;
  --doodle: rgba(255, 204, 0, .16);
  --doodle-2: rgba(255, 90, 107, .18);
  color-scheme: dark;
}
[data-theme='light'] {
  --bg: #f5f3ec;
  --surface: #ffffff;
  --surface-2: #eeebe1;
  --line: #ddd8ca;
  --text: #0c1230;
  --muted: #525a7a;
  --faint: #868ba3;
  --accent: #d10f28;
  --accent-ink: #b30c22;
  --hi: #0c1230;
  --active: #118a4c;
  --upcoming: #a87800;
  --done: #868ba3;
  --doodle: rgba(12, 18, 48, .12);
  --doodle-2: rgba(209, 15, 40, .16);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--font-b);
  -webkit-font-smoothing: antialiased;
  transition: background .25s, color .25s;
  overflow-x: hidden;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
.wrap { width: min(960px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 9; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--hi); outline-offset: 2px; }
[hidden] { display: none !important; }

.doodle { position: absolute; pointer-events: none; color: var(--doodle); }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.word { font: 800 17px/1 var(--font-d); letter-spacing: .06em; white-space: nowrap; }
.word-on { color: var(--accent-ink); font: 700 13px/1 var(--font-label); font-style: italic; letter-spacing: .08em; margin: 0 1px; }
.grid-accent { display: grid; grid-template-columns: repeat(3, 5px); grid-template-rows: repeat(2, 5px); gap: 2px; margin-left: 2px; opacity: .8; }
.grid-accent i { background: var(--text); opacity: .9; }
.grid-accent i:nth-child(2n) { background: transparent; box-shadow: inset 0 0 0 1px var(--faint); }
.grid-accent i:first-child { background: var(--red); }
.tools { display: flex; align-items: center; gap: 10px; }
.tz { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--active); box-shadow: 0 0 0 3px color-mix(in srgb, var(--active) 25%, transparent); }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.icon-btn:hover { border-color: var(--faint); }

/* ===== Banner ===== */
.feature { padding-top: 24px; }
.banner {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: 6px 28px 6px 28px;
  background: #0a0f26;
  aspect-ratio: 867 / 453;
  color: #fff;
}
.banner-photo { position: absolute; inset: 0; z-index: -2; }
.banner-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 30%; display: block; }
.banner-photo img:not([data-ready]) { visibility: hidden; }
[data-settings-pending] { visibility: hidden; }
#hero-title[data-settings-pending] { min-height: 2em; }
#hero-tagline[data-settings-pending] { min-height: 1.5em; }
#bday-title[data-settings-pending] { min-height: 1.1em; }
.banner::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(14,24,56,.94) 0%, rgba(14,24,56,.7) 30%, rgba(14,24,56,0) 58%),
    linear-gradient(0deg, rgba(14,24,56,.6) 0%, rgba(14,24,56,0) 35%);
}
.banner-copy { position: absolute; left: clamp(20px, 5vw, 52px); top: 46%; transform: translateY(-50%); }
.banner-kicker { margin: 0 0 14px; display: flex; align-items: center; gap: 10px; font: 700 11px/1 var(--font-d); letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.8); }
.banner-kicker span { background: var(--red); color: #fff; padding: 5px 8px 4px; transform: skewX(-12deg); letter-spacing: .08em; font: italic 700 14px/1 var(--font-label); }
.banner-title { margin: 0; max-width: 9ch; font: 800 clamp(34px, 5.6vw, 64px)/1 var(--font-d); text-transform: uppercase; letter-spacing: -.03em; }
.banner-title em { color: var(--yellow); font-style: normal; }
.banner-note { margin: 14px 0 0; max-width: 28ch; font: 500 clamp(14px, 1.5vw, 16px)/1.5 var(--font-b); color: rgba(255,255,255,.86); }
.music-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; max-width: min(390px, calc(100vw - 80px)); }
.music-links:not(:has(a:not([hidden]))) { display: none; }
.spotify-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 10px; border-radius: 99px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.1); backdrop-filter: blur(6px); color: #fff; font: 700 14px/1 var(--font-b); text-decoration: none; transition: background .15s, border-color .15s; }
.spotify-btn[hidden] { display: none; }
.spotify-btn:hover { background: rgba(255,255,255,.18); border-color: #1ed760; }
.spotify-btn:focus-visible { outline: 2px solid #1ed760; outline-offset: 3px; }
.youtube-btn:hover { border-color: #ff6b82; }
.youtube-btn:focus-visible { outline-color: #ff6b82; }
.stripes { position: absolute; right: -40px; top: 30px; display: grid; gap: 6px; transform: skewX(-24deg); }
.stripes i { display: block; height: 8px; width: 150px; }
.stripes i:nth-child(1) { background: var(--red); }
.stripes i:nth-child(2) { background: var(--yellow); width: 120px; margin-left: 30px; }
.stripes i:nth-child(3) { background: #fff; width: 90px; margin-left: 60px; opacity: .85; }
.checker {
  position: absolute; left: 0; right: 0; top: 0; height: 12px; z-index: 1;
  background-image: conic-gradient(#fff 25%, #0a0f26 0 50%, #fff 0 75%, #0a0f26 0);
  background-size: 12px 12px; opacity: .92;
}

/* ===== Birthday card ===== */
.bday {
  position: relative; overflow: hidden;
  margin: -48px clamp(12px, 3vw, 32px) 0;
  padding: 16px; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 24px 50px -24px rgba(0,0,0,.55);
  display: grid; gap: 12px;
}
.bday::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(var(--red), var(--yellow)); }
.bday-top { display: flex; align-items: center; gap: 14px; padding: 4px 4px 4px 8px; }
.bday-meta { flex: 1; min-width: 0; }
.bday-kicker { margin: 0; font: 700 11px/1 var(--font-d); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-ink); }
.bday-label { margin: 0; font: 800 12px/1 var(--font-d); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-ink); }
.bday-title { margin: 5px 0 0; font: 800 19px/1.1 var(--font-d); text-transform: uppercase; letter-spacing: .01em; }
.bday-date { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.lights { display: flex; gap: 6px; padding: 8px 10px; border-radius: 10px; background: #05081a; flex: none; }
.lights i { width: 14px; height: 14px; border-radius: 50%; background: #2a1016; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); transition: background .3s, box-shadow .3s; }
.lights i.on { background: var(--red); box-shadow: 0 0 10px 2px rgba(232,17,45,.7); }
.lights.go i { background: #33d17a; box-shadow: 0 0 10px 2px rgba(51,209,122,.6); }

.bday-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cell { position: relative; background: #05081a; border-radius: 12px; padding: 14px 8px 12px; text-align: center; display: grid; gap: 4px; overflow: hidden; }
.cell::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(255,255,255,.05); }
.cell b { font: 800 clamp(28px, 5.4vw, 44px)/1 var(--font-d); font-variant-numeric: tabular-nums; color: var(--yellow); letter-spacing: -.02em; }
.cell span { font: 600 11px/1 var(--font-d); letter-spacing: .14em; text-transform: uppercase; color: #8d93b3; }

.bday-today { position: relative; padding: 26px 18px 24px; border-radius: 14px; text-align: center; background: #05081a; color: #fff; overflow: hidden; }
.bday-today::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 10px;
  background-image: conic-gradient(#fff 25%, #05081a 0 50%, #fff 0 75%, #05081a 0); background-size: 10px 10px; opacity: .8;
}
.today-kicker { margin: 0; font: 700 12px/1 var(--font-d); letter-spacing: .22em; text-transform: uppercase; color: var(--yellow); }
.today-title { margin: 10px 0 8px; font: 800 clamp(30px, 5.6vw, 48px)/1 var(--font-d); text-transform: uppercase; letter-spacing: -.02em; }
.today-sub { margin: 0; font: 500 16px/1.4 var(--font-b); color: #ffd84d; }
.bday-today .doodle { color: rgba(255, 204, 0, .4); }
.bday-today .t1 { width: 54px; height: 54px; left: 6%; top: 24px; transform: rotate(-12deg); animation: bob 3s ease-in-out infinite; }
.bday-today .t2 { width: 34px; height: 34px; right: 10%; top: 26px; color: rgba(255, 90, 107, .6); animation: bob 2.6s ease-in-out infinite reverse; }
.bday-today .t3 { width: 46px; height: 46px; right: 5%; bottom: 14px; transform: rotate(10deg); color: rgba(255,255,255,.35); }
@keyframes bob { 50% { translate: 0 -6px; } }
.bday.is-today { border-color: var(--yellow); }

/* Daily voting is separate from dated events and their status counts. */
.daily-voting { padding-top: 40px; }
.daily-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.daily-heading .eyebrow { margin-bottom: 8px; }
.daily-heading h2 { margin: 0; font-size: clamp(24px, 3vw, 30px); line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.daily-ongoing { display: inline-flex; align-items: center; gap: 8px; color: var(--active); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 12px; font-weight: 700; }
.daily-ongoing::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.announcement { padding-top: 40px; }
.announcement-card { display: grid; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.announcement-card.has-art { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.announcement-art { align-self: center; background: var(--surface-2); aspect-ratio: 16 / 9; overflow: hidden; }
.announcement-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.announcement-copy { padding: 28px; align-self: center; min-width: 0; }
.announcement-copy .eyebrow { margin: 0 0 10px; }
.announcement-copy h2 { margin: 0; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.25; letter-spacing: -.03em; overflow-wrap: anywhere; }
.announcement-message { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.announcement-copy .btn { margin-top: 20px; max-width: 100%; height: auto; min-height: 44px; padding-block: 10px; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .announcement { padding-top: 32px; }
  .announcement-card.has-art { grid-template-columns: minmax(0, 1fr); }
  .announcement-copy { padding: 20px; }
}
.daily-cards { display: grid; gap: 16px; }
.daily-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.daily-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.daily-app { min-width: 0; }
.daily-app-name { margin: 0 0 4px; color: var(--muted); font-size: 12px; letter-spacing: .1em; font-weight: 700; }
.daily-app h3 { margin: 0; font-size: 20px; line-height: 1.3; letter-spacing: -.02em; font-weight: 800; }
.daily-rank { flex: none; text-align: right; }
.daily-rank p { margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
.daily-rank strong { display: block; font-size: 16px; font-weight: 700; }
.daily-rank > span { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.daily-actions { display: flex; align-items: center; gap: 16px; margin-top: 20px; }
.daily-actions .btn { min-height: 44px; flex: none; }
.daily-guide { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; font-size: 14px; }
.daily-guide summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.daily-guide-copy { color: var(--muted); padding-top: 8px; }
.daily-guide ol { margin: 8px 0; padding-left: 20px; }
.daily-guide li + li { margin-top: 8px; }
.daily-guide a { text-underline-offset: 3px; }
.daily-guide-text { white-space: pre-line; overflow-wrap: anywhere; }
.daily-app h3, .daily-app-name { overflow-wrap: anywhere; }
.daily-actions .btn { max-width: 100%; height: auto; padding-block: 10px; white-space: normal; overflow-wrap: anywhere; }
.daily-voting + .hero { padding-top: 40px; }
@media (max-width: 640px) {
  .daily-voting { padding-top: 32px; }
  .daily-card { padding: 16px; }
  .daily-main { flex-direction: column; gap: 16px; }
  .daily-rank { text-align: left; padding-top: 12px; border-top: 1px solid var(--line); width: 100%; }
  .daily-actions { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 16px; }
  .daily-app h3 { font-size: 18px; }
  .daily-voting + .hero { padding-top: 32px; }
}

/* ===== Hero ===== */
.hero { position: relative; padding: clamp(40px, 6vw, 72px) 0 32px; }
.hero .hd1 { width: 64px; height: 64px; right: 4%; top: 40px; transform: rotate(10deg); }
.hero .hd2 { width: 76px; height: 64px; right: 16%; top: 150px; color: var(--doodle-2); transform: rotate(-8deg); }
.hero .hd3 { width: 34px; height: 34px; right: 1%; top: 170px; transform: rotate(24deg); color: var(--doodle-2); }
.eyebrow { margin: 0 0 14px; display: flex; align-items: center; gap: 10px; font: 700 12px/1 var(--font-d); letter-spacing: .2em; text-transform: uppercase; color: var(--accent-ink); }
.hub-title { margin: 0; font: 800 clamp(32px, 5.4vw, 56px)/1.04 var(--font-d); text-transform: uppercase; letter-spacing: -.03em; }
.eyebrow-flag { width: 18px; height: 12px; background-image: conic-gradient(currentColor 25%, transparent 0 50%, currentColor 0 75%, transparent 0); background-size: 6px 6px; opacity: .9; }
.hub-title em { font-style: normal; color: var(--muted); }
.lede { max-width: 52ch; color: var(--muted); margin: 18px 0 0; font-size: 17px; }

.tally { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 32px; }
.t { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 14px; display: grid; gap: 2px; overflow: hidden; }
.t::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.t[data-s='active'] { --c: var(--active); }
.t[data-s='upcoming'] { --c: var(--upcoming); }
.t[data-s='concluded'] { --c: var(--done); }
.t b { font: 800 36px/1 var(--font-d); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--c); }
.t-label { margin-top: 6px; font: 700 13px/1.1 var(--font-d); letter-spacing: .12em; text-transform: uppercase; color: var(--text); }
.t-sub { font: 500 11px/1.3 var(--font-d); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ===== Controls ===== */
.controls { padding: 8px 0 20px; display: grid; gap: 14px; }
.row { display: flex; gap: 10px; }
.search { flex: 1; position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 14px; color: var(--faint); }
.search input { width: 100%; height: 46px; padding: 0 14px 0 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.search input::placeholder { color: var(--faint); }
.sort { position: relative; flex: none; }
.sort-btn { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 14px; cursor: pointer; white-space: nowrap; }
.sort-btn[aria-expanded='true'], .sort-btn:focus-visible { outline: none; border-color: var(--accent); }
.sort-k { color: var(--muted); }
.sort-v { color: var(--text); font-weight: 600; }
.sort-btn svg { color: var(--muted); }
.sort-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 200px; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.sort-menu[hidden] { display: none; }
.sort-menu li { padding: 10px 12px; border-radius: 8px; font-size: 14px; cursor: pointer; color: var(--muted); }
.sort-menu li:hover, .sort-menu li:focus { outline: none; background: var(--bg); color: var(--text); }
.sort-menu li[aria-selected='true'] { color: var(--text); font-weight: 700; }
.sort-menu li[aria-selected='true']::after { content: '✓'; float: right; color: var(--accent); }
@media (max-width: 520px) { .sort-k { display: none; } .sort-menu { left: 0; right: auto; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: transparent; cursor: pointer; font: 700 12px/1 var(--font-d); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); transition: all .15s; }
.chip:hover { color: var(--text); border-color: var(--faint); }
.chip[aria-pressed='true'] { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip .c { font-size: 13px; opacity: .75; font-variant-numeric: tabular-nums; }

/* ===== Events ===== */
.events { list-style: none; margin: 0; padding: 0 0 64px; display: grid; gap: 12px; }
.ev { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color .2s, transform .2s; animation: in .4s var(--ease) both; }
.ev:hover { border-color: color-mix(in srgb, var(--faint) 60%, var(--line)); }
.ev::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--done); }
.ev[data-s='active']::before { background: var(--active); }
.ev[data-s='upcoming']::before { background: var(--upcoming); }
.ev[data-s='concluded'] { opacity: .8; }
.ev.flash { box-shadow: 0 0 0 2px var(--hi); }
@keyframes in { from { opacity: 0; transform: translateY(6px); } }
.ev-head { padding: 20px 22px; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; }
.badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font: 700 11px/1 var(--font-d); letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px; border-radius: 6px; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-active { color: var(--active); background: color-mix(in srgb, var(--active) 14%, transparent); }
.b-active i { animation: pulse 1.6s infinite; }
.b-upcoming { color: var(--upcoming); background: color-mix(in srgb, var(--upcoming) 14%, transparent); }
.b-concluded { color: var(--done); background: color-mix(in srgb, var(--done) 14%, transparent); }
.b-priority { color: var(--hi); background: color-mix(in srgb, var(--yellow) 16%, transparent); }
.b-urgent { color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 14%, transparent); }
@keyframes pulse { 50% { opacity: .3; } }
.app { font-size: 13px; color: var(--muted); font-weight: 500; }
.ev h3 { margin: 0; font: 700 19px/1.3 var(--font-d); letter-spacing: -.01em; }
.when { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; color: var(--muted); }
.when b { color: var(--text); font-weight: 500; }
.count { text-align: right; min-width: 120px; }
.count .v { font: 800 26px/1 var(--font-d); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--hi); }
.count .l { font: 600 11px/1 var(--font-d); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.count[data-urgent='true'] .v { color: var(--accent-ink); }
.bar { height: 4px; margin: 0 22px 16px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--yellow)); }
.ev-foot { display: flex; gap: 8px; padding: 0 22px 18px; flex-wrap: wrap; }
.ev-results { display: flex; flex-wrap: wrap; gap: 16px 32px; margin: 0 22px 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ev-results div { min-width: 0; }
.ev-results dt { color: var(--muted); font-size: 12px; line-height: 1.5; }
.ev-results dd { margin: 4px 0 0; color: var(--text); font-size: 22px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none; transition: all .15s; }
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn[aria-expanded='true'] svg { transform: rotate(180deg); }
.btn svg { transition: transform .2s; }
.details { border-top: 1px solid var(--line); padding: 18px 22px 22px; display: grid; gap: 16px; background: var(--surface-2); }
.details h4 { margin: 0 0 6px; font: 700 11px/1 var(--font-d); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.details p { margin: 0; white-space: pre-line; font-size: 15px; }

.state { position: relative; text-align: center; padding: 48px 20px 80px; color: var(--muted); }
.state h3 { color: var(--text); font: 800 22px var(--font-d); margin: 0 0 6px; }
.state p { margin: 0 auto 18px; max-width: 44ch; }

.skeleton { height: 128px; border-radius: var(--r); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: sh 1.3s infinite linear; }
@keyframes sh { to { background-position: -200% 0; } }

/* ===== Footer ===== */
.foot { position: relative; padding: 0 0 28px; border-top: 1px solid var(--line); }
.checker.thin { position: static; height: 8px; background-size: 8px 8px; opacity: .14; background-image: conic-gradient(var(--text) 25%, transparent 0 50%, var(--text) 0 75%, transparent 0); }
.foot-in { position: relative; display: grid; grid-template-columns: 1fr; gap: 28px; padding-top: 40px; }
.fd1 { width: 90px; height: 22px; right: 0; top: 10px; }
.foot h4 { margin: 0 0 8px; font: 800 13px/1 var(--font-d); text-transform: uppercase; letter-spacing: .14em; }
.foot p { margin: 0; font-size: 14px; color: var(--muted); }
.foot-base { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.disclaimer { display: grid; gap: 8px; max-width: 72ch; }
.disclaimer p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.disclaimer p + p { margin-top: 0; }
.disclaimer strong { color: var(--text); font-weight: 700; }
.foot-admin { flex-shrink: 0; }
.powered { margin-top: 22px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.powered-logo { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; box-shadow: 0 0 0 1px rgba(110,170,255,.45), 0 0 14px rgba(80,150,255,.25); }
.powered p { margin: 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.powered .mp { color: var(--text); font-weight: 700; letter-spacing: .02em; }
.powered .nw { white-space: nowrap; }
.powered .x { margin: 0 2px; color: #7fb2ff; }
.powered a { color: #8fbcff; font-weight: 700; text-decoration: none; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.powered a:hover { color: #c3dbff; border-bottom-color: currentColor; }
.powered a:focus-visible { outline: 2px solid #8fbcff; outline-offset: 3px; border-radius: 3px; }
[data-theme='light'] .powered .x, [data-theme='light'] .powered a { color: #2357b8; }
[data-theme='light'] .powered a:hover { color: #163a80; }
[data-theme='light'] .powered a:focus-visible { outline-color: #2357b8; }
@media (max-width: 640px) { .foot-base { flex-direction: column; gap: 14px; } .powered { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.foot p + p { margin-top: 8px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; z-index: 10; }

/* ===== Portrait / phones: text moves below the photo ===== */
@media (max-width: 640px), (orientation: portrait) and (max-width: 900px) {
  .banner { aspect-ratio: auto; display: grid; border-radius: 6px 22px 6px 22px; }
  .banner-photo { position: relative; inset: auto; aspect-ratio: 16 / 9; }
  .banner-photo img { object-position: 50% 25%; }
  .banner::before { background: linear-gradient(0deg, rgba(10,15,38,1) 0%, rgba(10,15,38,0) 22%); height: auto; bottom: auto; top: 0; aspect-ratio: 16 / 9; }
  .banner-copy { position: relative; left: auto; top: auto; transform: none; padding: 2px 18px 76px; background: #0a0f26; }
  .banner-kicker { margin-bottom: 10px; }
  .banner-note { margin-top: 8px; }
  .banner-title { font-size: clamp(28px, 8.4vw, 44px); max-width: none; }
  .stripes { top: 24px; right: -50px; }
  .checker { height: 10px; background-size: 10px 10px; }
  .stripes i { height: 6px; }
}
@media (max-width: 640px) {
  .tz { display: none; }
  .feature { padding-top: 16px; }
  .bday { margin: -56px 8px 0; padding: 12px; gap: 10px; }
  .bday-top { gap: 10px; padding-left: 6px; }
  .bday-title { font-size: 16px; white-space: nowrap; }
  .lights { padding: 6px 7px; gap: 4px; }
  .lights i { width: 9px; height: 9px; }
  .bday-grid { gap: 6px; }
  .cell { padding: 12px 2px 10px; }
  .cell span { font-size: 11px; letter-spacing: .1em; }
  .row { flex-direction: column; }
  .ev-head { grid-template-columns: 1fr; }
  .count { text-align: left; }
  .foot-in { grid-template-columns: 1fr; }
  .tally { gap: 6px; }
  .t { padding: 12px; }
  .t b { font-size: 34px; }
  .t-label { font-size: 12px; letter-spacing: .05em; }
  .t-sub { font-size: 10px; letter-spacing: .08em; }
  .hero .hd2, .hero .hd3 { display: none; }
  .hero .hd1 { top: 24px; width: 46px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.closed-note { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px dashed var(--line); font: 700 12px/1 var(--font-d); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.btn.vote { font: 800 13px/1 var(--font-d); letter-spacing: .1em; text-transform: uppercase; padding: 0 18px; }


/* Optional event image */
.ev-img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; border: 1px solid var(--line); }
.ev-title-row { display: flex; gap: 14px; align-items: center; }
@media (max-width: 640px) {
  .hero { padding-top: 32px; }
  .hub-title { font-size: clamp(28px, 8vw, 40px); }
  .ev-img { width: 52px; height: 52px; }
}
.controls { position: relative; }
