/* Groove: the hippie look. Loaded after style.css, polls.css and theme.css (mobile.css stays last).
   Warm 70s colours on the avocado header, a groovy display face, pill buttons with a sticker
   outline, rounded cards, a wavy header edge and a bottom tab bar on phones. */

@font-face {
  font-family: Shrikhand;
  src: url("/fonts/shrikhand.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #fbf0d9;
  --panel: #fff8ea;
  --ink: #3a2417;
  --line: #d9bd93;
  --muted: #674b36;
  --accent: #b03f17;
  --accent-contrast: #fff6e6;
  --masthead: #283329;
  --mustard: #e3a230;
  --orange: #d9662b;
  --olive: #6f7d2f;
  --hover: #f5e2bf;
  --groovy: Shrikhand, Young, Georgia, serif;
  --radius: 18px;
}
:root[data-theme="dark"] {
  --bg: #1d1611;
  --panel: #2a2019;
  --ink: #f6e7cc;
  --line: #55432f;
  --muted: #d2bb9d;
  --accent: #f2925a;
  --accent-contrast: #1d1611;
  --masthead: #1c2620;
  --mustard: #e9b04a;
  --orange: #f08a4b;
  --olive: #a6b862;
  --hover: #3a2c21;
}

/* Header: name, four sections, account. A wavy edge hangs below it. */
.top { position: relative; z-index: 2; }
.top::after {
  content: "";
  position: absolute;
  inset: 100% 0 auto;
  height: 12px;
  background: var(--masthead);
  -webkit-mask: url("/art/wave.svg") repeat-x 0 0 / 48px 12px;
  mask: url("/art/wave.svg") repeat-x 0 0 / 48px 12px;
  pointer-events: none;
}
.brand span { font-family: var(--groovy); letter-spacing: 0; line-height: 1.02; }
.primary { gap: 6px; align-items: center; }
.primary a {
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
}
.primary a.active { background: var(--mustard); color: #2b1a10; }
.primary a:hover:not(.active) { color: #ffd58b; }
.primary a.active::after { display: none; }
.account { border-radius: 999px; border-width: 2px; }
.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--orange);
  color: #2b1a10;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
}

/* Display type */
.hero h1, .page-title, .section-heading h2, .modal-inner h2, .empty h3,
.surface > h2, .member-group h2, .poll-sheet h2, .proposal-card h2 {
  font-family: var(--groovy);
  font-weight: 400;
  letter-spacing: 0;
}
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.8rem); line-height: 1.04; }
.hero h1 em { font-family: var(--groovy); font-style: normal; font-size: 1em; letter-spacing: 0; }
.page-title, .section-heading h2 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.1; }
.modal-inner h2 { font-size: 1.85rem; line-height: 1.15; }
.surface > h2 { font-size: 1.45rem; margin: 0 0 12px; }

/* Buttons: pills with a sticker outline */
.button, .mini { border-radius: 999px; border-width: 2px; }
.button.primary-btn, .mini.primary-btn {
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.button.primary-btn:hover, .mini.primary-btn:hover {
  background: var(--accent);
  border-color: var(--ink);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}
.button.primary-btn:active, .mini.primary-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.button.secondary, .mini.secondary, .mini { background: var(--panel); border-color: var(--ink); }
.button.secondary:hover, .mini.secondary:hover, .mini:hover, .tab:hover { background: var(--hover); }
.text-btn { color: var(--accent); }
.actions.center { justify-content: center; }

/* Hero: a rounded card with a rainbow tucked in the corner */
.hero {
  position: relative;
  margin-top: 30px;
  padding: clamp(22px, 4vw, 44px);
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: 28px;
  box-shadow: 6px 6px 0 var(--mustard);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -8px;
  width: 170px;
  height: 90px;
  background: url("/art/rainbow.svg") no-repeat center / contain;
  opacity: .9;
  pointer-events: none;
}
.hero-art { border: 2px solid var(--ink); border-radius: 22px; padding: 0; position: relative; z-index: 1; }
.hero-copy { position: relative; z-index: 1; }

/* Section tabs (What's on · Polls, Guide · Members · Leaderboard) */
.section-tabs {
  display: flex;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  margin: 28px 0 4px;
  padding: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: 999px;
}
.section-tabs::-webkit-scrollbar { display: none; }
.section-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}
.section-tabs a:hover { color: var(--ink); background: var(--hover); }
.section-tabs a[aria-current="page"] { background: var(--accent); color: var(--accent-contrast); }
.section-tabs + .subpage { padding-top: 20px; }
.board { margin-top: 18px; }

/* Filters and the period picker as pills */
.filters { gap: 8px; border-bottom: 0; margin: 14px 0 22px; }
.pill {
  padding: 7px 15px;
  border: 2px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}
.pill:hover { color: var(--ink); border-color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--panel); }
.select-wrap { border: 2px solid var(--ink); border-radius: 999px; padding: 0 12px; background: var(--panel); }

/* Cards, surfaces and dialogs: rounded, outlined, a little shadow */
.card, .post-card, .surface, .empty, .wallet, .scoreboard, .roles-table {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
}
.card { box-shadow: 5px 5px 0 var(--line); transition: transform .15s, box-shadow .15s; }
.card:is(:hover, :focus-within) { border-color: var(--ink); transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--mustard); }
.poster { border-bottom: 2px solid var(--ink); }
.date-block b { font-family: var(--groovy); letter-spacing: 0; }
.card-foot { border-top: 2px dashed var(--line); }
.host-line { margin: 6px 0 0; color: var(--muted); font-size: .85rem; font-style: italic; }
.category { border: 1.5px solid currentColor; border-radius: 999px; padding: 2px 10px 2px 7px; color: var(--cat, var(--muted)); }
.cat-live { --cat: #8a5a00; }
.cat-movie { --cat: #6a3f92; }
.cat-sesh { --cat: #a03658; }
.cat-cooking { --cat: #4e5e1c; }
.cat-play { --cat: #24676a; }
[data-theme="dark"] .cat-live { --cat: #f0c46a; }
[data-theme="dark"] .cat-movie { --cat: #c9a8ee; }
[data-theme="dark"] .cat-sesh { --cat: #f29bb6; }
[data-theme="dark"] .cat-cooking { --cat: #bfd17c; }
[data-theme="dark"] .cat-play { --cat: #8fd3cc; }
dialog { border: 2px solid var(--ink); border-radius: 24px; box-shadow: 8px 8px 0 var(--mustard); }
[data-theme="dark"] dialog { box-shadow: 8px 8px 0 #000a; }
.modal-inner .poster { border-radius: 22px 22px 0 0; }
.dismiss { border: 2px solid var(--ink); }
.empty::before {
  content: "";
  display: block;
  width: 120px;
  height: 62px;
  margin: 0 auto 6px;
  background: url("/art/rainbow.svg") no-repeat center / contain;
}
.empty > .icon { display: none; }
.wallet { background: var(--mustard); color: #2b1a10; box-shadow: 5px 5px 0 var(--ink); }
.wallet strong { color: #2b1a10; font-family: var(--groovy); }
.wallet p { color: #3d2a17; }
.wallet .icon { color: #2b1a10; }
[data-theme="dark"] .wallet { background: var(--mustard); }
.scoreboard { overflow: hidden; }
.scoreboard .my-score { background: var(--hover); }
input:not([type="radio"]):not([type="checkbox"]), textarea, .stack select { border-radius: 12px; border: 2px solid var(--line); }
input:focus-visible, textarea:focus-visible, select:focus-visible { border-color: var(--ink); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.stack label :is(input, select, textarea) { font-weight: 400; }

/* Me page and proposals */
.me-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; align-items: start; }
.me-page .wallet { margin-bottom: 24px; }
.proposal-row, .ticket-row { border-bottom: 2px dashed var(--line); }
.proposal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 0;
}
.proposal-row h3, .proposal-card h2 { margin: 6px 0; }
.proposal-row h3 { font: 1.2rem/1.25 var(--display); }
.proposal-note { margin: 8px 0 0; color: var(--muted); font-style: italic; }
.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-pending { color: #7f5300; }
.status-approved { color: #46601a; }
.status-declined { color: #a0331a; }
[data-theme="dark"] .status-pending { color: #f0c46a; }
[data-theme="dark"] .status-approved { color: #bfd17c; }
[data-theme="dark"] .status-declined { color: #ff9e7d; }
.proposal-list { display: grid; gap: 20px; }
.proposal-card { box-shadow: 5px 5px 0 var(--line); }
.proposal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.host-tools { background: var(--hover); }

/* Footer: a wavy top edge */
.footer { position: relative; border-top: 0; padding-top: 30px; }
.footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 10px;
  background: var(--line);
  -webkit-mask: url("/art/wave.svg") repeat-x 0 0 / 40px 10px;
  mask: url("/art/wave.svg") repeat-x 0 0 / 40px 10px;
}

/* Bottom tab bar on phones; the header keeps just the name and account. */
.tabbar { display: none; }
@media (max-width: 720px) {
  .top:has(.primary) .primary { display: none; }
  .bar { display: flex; padding-top: 0; }
  .account { margin-left: auto; }
  .tabbar {
    position: fixed;
    inset: auto 0 0;
    z-index: 6;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    background: var(--masthead);
    border-top: 3px solid var(--mustard);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -6px 20px #0003;
  }
  .tabbar a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 54px;
    border-radius: 16px;
    color: #f1e6cf;
    font-size: .78rem;
    font-weight: 700;
  }
  .tabbar a.active { background: var(--mustard); color: #2b1a10; }
  .tabbar .nav-badge { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; }
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  .hero { margin-top: 22px; border-radius: 22px; box-shadow: 4px 4px 0 var(--mustard); }
  .hero::after { width: 120px; height: 64px; right: -20px; }
  .hero-art { max-height: 150px; object-fit: cover; object-position: 50% 45%; }
  .filters { display: flex; flex-wrap: wrap; }
  .section-tabs { margin-top: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .button.primary-btn { transition: none; }
  .card:is(:hover, :focus-within), .button.primary-btn:hover, .button.primary-btn:active { transform: none; }
}
.poll-filter select { border: 2px solid var(--ink); border-radius: 999px; padding-inline: 14px; background: var(--panel); }
