:root {
  color-scheme: dark;
  --bg: #10121b;
  --topbar-bg: rgba(16, 18, 27, .88);
  --surface: #181b27;
  --surface-raised: #1e2230;
  --surface-soft: #222636;
  --input-bg: #141722;
  --popup-bg: #1a1d29;
  --clock-bg: #151823;
  --toast-bg: #242a31;
  --label-text: #d7d8e2;
  --placeholder: #64697d;
  --accent-on: #141722;
  --line: rgba(233, 237, 255, .09);
  --line-strong: rgba(233, 237, 255, .15);
  --text: #f3f2f7;
  --muted: #a0a4b7;
  --subtle: #74798f;
  --lime: #c8f169;
  --lime-dark: #9dc840;
  --lime-hover: #d7ff84;
  --violet: #9d8aff;
  --orange: #ffb677;
  --danger: #ff8787;
  --radius: 16px;
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f4f8;
  --topbar-bg: rgba(255, 255, 255, .94);
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #eceef4;
  --input-bg: #ffffff;
  --popup-bg: #ffffff;
  --clock-bg: #f7f8fb;
  --toast-bg: #ffffff;
  --line: rgba(36, 40, 58, .11);
  --line-strong: rgba(36, 40, 58, .2);
  --text: #202333;
  --muted: #5f6475;
  --subtle: #777d90;
  --lime: #587d13;
  --lime-dark: #4a6d0f;
  --lime-hover: #587d13;
  --violet: #6853bb;
  --orange: #a95514;
  --danger: #b33232;
  --label-text: #34384a;
  --placeholder: #777d90;
  --accent-on: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 86% 0%, rgba(80, 72, 131, .13), transparent 34rem),
    var(--bg);
  color: var(--text);
}

button, input, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.app-shell { min-height: 100vh; }
.loading-screen { padding: 18vh 24px; color: var(--muted); text-align: center; }
.topbar {
  height: 74px;
  padding: 0 max(28px, calc((100vw - 1200px) / 2));
  display: flex;
  align-items: center;
  gap: 48px;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: .14em;
  font: 700 13px 'Space Grotesk', sans-serif;
  white-space: nowrap;
}
.brand-mark {
  width: 31px;
  height: 31px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px 10px 10px 3px;
  background: var(--lime);
  color: var(--accent-on);
  font: 700 19px 'Space Grotesk', sans-serif;
  letter-spacing: -.08em;
}
.mobile-nav-menu { display: none; }
.main-nav { display: flex; align-items: center; gap: 5px; height: 100%; }
.nav-link {
  border: 0;
  height: 100%;
  padding: 0 14px;
  position: relative;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: color .18s ease;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: '';
  position: absolute;
  height: 2px;
  bottom: 0;
  left: 14px;
  right: 14px;
  background: var(--lime);
  border-radius: 2px 2px 0 0;
}
.nav-icon { display: inline-flex; width: 20px; height: 20px; flex: 0 0 20px; align-items: center; justify-content: center; line-height: 0; vertical-align: middle; }
.nav-icon svg { display: block; width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-icon .nav-icon-fill { fill: currentColor; stroke: none; }
.nav-label { white-space: nowrap; text-align: left; }
.account-menu { margin-left: auto; display: flex; align-items: center; gap: 10px; white-space: nowrap; position: relative; }
.account-name { font-size: 13px; font-weight: 600; }
.logout-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}
.logout-button:hover { color: var(--text); border-color: var(--line-strong); }
.account-avatar-button { padding: 0; cursor: pointer; }
.account-avatar-button:hover, .account-avatar-button[aria-expanded="true"] { border-color: var(--lime); }
.account-dropdown { position: absolute; top: calc(100% + 10px); right: 0; z-index: 8; display: grid; width: 170px; padding: 5px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface-raised); box-shadow: 0 12px 32px rgba(0,0,0,.32); }
.account-dropdown button { padding: 10px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--text); text-align: left; cursor: pointer; font-size: 11px; }
.account-dropdown button:hover { background: var(--surface-soft); color: var(--lime); }
.account-dropdown button:last-child { color: var(--danger); }
.account-dropdown button:last-child:hover { background: rgba(255,135,135,.08); }
.plays-filter-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -13px 0 17px; padding: 10px 13px; border: 1px solid rgba(200,241,105,.2); border-radius: 9px; background: rgba(200,241,105,.045); color: var(--lime); font-size: 11px; font-weight: 700; }
.statistics-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; margin-bottom: 15px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.statistics-filters label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.statistics-filters input, .statistics-filters select { width: 100%; min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--input-bg); color: var(--text); font-size: 12px; }
.statistics-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 18px; padding: 3px 0; }
.statistics-tab { flex: 0 0 auto; padding: 8px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 700; }
.statistics-tab:hover, .statistics-tab.active { border-color: rgba(200,241,105,.35); background: rgba(200,241,105,.08); color: var(--lime); }
.statistics-summary { margin-bottom: 19px; }
.statistics-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin-bottom: 13px; }
.statistics-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.statistics-card .section-heading { margin-bottom: 14px; }
.statistics-card .section-heading h2 { font-size: 17px; }
.statistics-help { position: relative; display: inline-flex; margin-left: 4px; vertical-align: 2px; }
.statistics-help summary { display: grid; width: 18px; height: 18px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); cursor: pointer; font: 600 11px 'DM Sans', 'Segoe UI', sans-serif; list-style: none; }
.statistics-help summary::-webkit-details-marker { display: none; }
.statistics-help summary:hover, .statistics-help summary:focus-visible, .statistics-help[open] summary { border-color: var(--lime); color: var(--lime); }
.statistics-help > span { position: absolute; z-index: 4; top: calc(100% + 8px); left: 50%; display: none; width: min(270px, 75vw); padding: 10px 12px; transform: translateX(-50%); border: 1px solid var(--line-strong); border-radius: 9px; background: var(--popup-bg); box-shadow: 0 8px 24px rgba(0,0,0,.25); color: var(--text); font: 400 11px/1.5 'DM Sans', 'Segoe UI', sans-serif; }
.statistics-help:hover > span, .statistics-help:focus-within > span, .statistics-help[open] > span { display: block; }
.statistics-bars, .statistics-monthly-chart { display: block; width: 100%; height: auto; overflow: visible; }
.statistics-chart-label, .statistics-chart-value, .statistics-month-label { fill: var(--muted); font-family: 'DM Sans', 'Segoe UI', sans-serif; font-size: 12px; }
.statistics-chart-value { fill: var(--text); font-size: 11px; font-weight: 700; }
.statistics-month-label { text-anchor: middle; font-size: 11px; }
.statistics-chart-track { fill: var(--surface-soft); }
.statistics-chart-bar { fill: var(--lime); }
.statistics-chart-axis { stroke: var(--line-strong); stroke-width: 1; }
.statistics-caption, .statistics-empty { margin: 9px 0 0; color: var(--subtle); font-size: 10px; }
.statistics-empty { padding: 20px 0; text-align: center; }
.statistics-warning { margin: 0 0 15px; color: var(--danger); font-size: 12px; }
.statistics-totals { margin-top: 13px; }
.statistics-total-list { display: flex; flex-wrap: wrap; gap: 9px; }
.statistics-total-list > span { flex: 1 1 165px; padding: 12px; border-radius: 9px; background: var(--surface-soft); color: var(--muted); font-size: 11px; }
.statistics-total-list strong { display: block; margin-bottom: 3px; color: var(--text); font: 600 21px 'Space Grotesk', sans-serif; }
.statistics-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 7px; margin-top: 17px; }
.statistics-scores h3 { grid-column: 1 / -1; margin: 0 0 3px; font-size: 13px; }
.statistics-scores > span { display: flex; justify-content: space-between; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 11px; }
.statistics-scores strong { color: var(--text); }
.statistics-details { margin-bottom: 13px; }
.statistics-table-wrap { overflow-x: auto; }
.statistics-table { width: 100%; min-width: 560px; border-collapse: collapse; text-align: left; font-size: 11px; }
.statistics-player-table { min-width: 780px; }
.statistics-table th, .statistics-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.statistics-table thead th { color: var(--muted); font-size: 10px; }
.statistics-table tbody th { color: var(--text); font-weight: 700; }
.statistics-table tbody td { color: var(--muted); line-height: 1.6; }
.statistics-player-game { display: block; }
.statistics-player-game strong { color: var(--text); }

.main-content, .app-footer { width: min(1120px, calc(100% - 56px)); margin: 0 auto; }
.main-content { min-height: calc(100vh - 140px); padding: 54px 0 64px; }
.welcome-row, .page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 31px; }
.welcome-actions, .page-heading-actions { display: flex; align-items: center; gap: 9px; }
.eyebrow { color: var(--lime); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: 'Space Grotesk', 'Segoe UI', sans-serif; }
.welcome-row h1, .page-heading h1 {
  margin: 8px 0 7px;
  font-size: clamp(30px, 4vw, 40px);
  letter-spacing: -.055em;
  line-height: 1.1;
}
.welcome-row p, .page-heading p { color: var(--muted); margin: 0; font-size: 14px; }
.wave { color: var(--lime); font-size: 22px; margin-left: 11px; vertical-align: 9px; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 43px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: background .16s ease, transform .16s ease, border-color .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .6; cursor: wait; transform: none; }
.button-primary { background: var(--lime); color: var(--accent-on); }
.button-primary:hover { background: var(--lime-hover); }
.button-outline { border-color: var(--line-strong); background: transparent; color: var(--text); }
.button-outline:hover, .button-quiet:hover { border-color: rgba(200, 241, 105, .5); color: var(--lime); }
.button-quiet { border-color: var(--line); background: rgba(255,255,255,.025); color: var(--muted); }
.button-wide { width: 100%; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 40px; }
.stat-card {
  min-height: 123px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  padding: 20px 21px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stat-highlight { background: linear-gradient(135deg, rgba(200, 241, 105, .1), rgba(200, 241, 105, .025)); border-color: rgba(200, 241, 105, .22); }
.stat-label { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.stat-highlight .stat-label { color: var(--lime); }
.stat-card strong { font: 600 30px 'Space Grotesk', sans-serif; letter-spacing: -.06em; line-height: 1; }
.stat-foot { color: var(--subtle); font-size: 11px; }
.stat-highlight .stat-foot { color: #b4c496; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(250px, .85fr); gap: 27px; align-items: start; }
.content-column, .side-column { min-width: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-heading h2 { font-size: 20px; letter-spacing: -.04em; margin: 4px 0 0; }
.section-heading .eyebrow { font-size: 9px; }
.section-heading-spaced { margin-top: 34px; }
.text-button { color: var(--muted); border: 0; background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }
.text-button:hover { color: var(--lime); }
.text-button span { margin-left: 5px; color: var(--lime); }

.event-list, .play-list, .proposal-list { display: grid; gap: 10px; }
.event-card {
  padding: 17px;
  display: grid;
  grid-template-columns: 67px minmax(0, 1fr);
  gap: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.event-date {
  min-height: 59px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  background: var(--surface-soft);
  border-radius: 11px;
}
.event-date strong { color: var(--lime); font: 600 15px 'Space Grotesk', sans-serif; }
.event-date span { color: var(--muted); font-size: 9px; }
.event-date .event-date-time { margin-top: 3px; color: var(--lime); font-size: 10px; font-weight: 700; white-space: nowrap; }
.event-info { min-width: 0; }
.event-info h3, .play-card h3, .proposal-card h3 { margin: 1px 0 4px; font-size: 15px; letter-spacing: -.025em; }
.event-info > p, .play-card p, .proposal-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.event-info .event-notes, .play-notes { color: var(--subtle); margin-top: 6px; }
.attendance-summary { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 10px; }
.event-card-actions { grid-column: 2; grid-row: 2; display: grid; justify-items: start; gap: 9px; }
.event-card-actions .attendance-actions { grid-column: 1; }
.event-admin-actions { display: flex; gap: 10px; }
.event-admin-actions .text-button { padding: 0; font-size: 10px; }
.event-delete-button { color: var(--danger); }
.event-delete-button:hover { color: var(--danger); }
.event-capacity, .event-table-capacity { color: var(--lime) !important; }
.event-info .attendance-summary { margin-top: 9px; }
.attendance-summary-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.attendance-summary-toggle:hover { color: var(--text); }
.attendance-toggle-indicator { color: var(--lime); font-size: 13px; font-weight: 700; }
.attendance-people-list { display: flex; flex-wrap: wrap; gap: 7px 12px; margin-top: 7px; }
.attendance-person { display: inline-flex; align-items: center; gap: 5px; color: var(--text); font-size: 10px; }
.avatar-stack { display: inline-flex; padding-left: 2px; }
.avatar {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: #313648;
  color: var(--lime);
  font: 700 9px 'Space Grotesk', sans-serif;
}
.avatar-stack .avatar + .avatar { margin-left: -6px; }
.avatar-empty { color: var(--subtle); }
.attendance-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.choice-button {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
}
.choice-button:hover { border-color: var(--line-strong); color: var(--text); }
.choice-button.selected { color: var(--lime); border-color: rgba(200, 241, 105, .42); background: rgba(200, 241, 105, .08); }
.choice-button:disabled { opacity: .45; cursor: not-allowed; }
.create-table-button { flex-basis: 100%; justify-content: center; }
.event-tables { margin-top: 9px; }
.event-tables h4 { margin: 0 0 5px; color: var(--muted); font-size: 10px; }
.event-table-list { display: grid; gap: 5px; }
.event-table { padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-raised); }
.event-table.table-underfilled { border-color: rgba(255, 104, 104, .62); background: rgba(255, 104, 104, .08); }
.event-table.table-ready { border-color: var(--lime); background: rgba(200, 241, 105, .2); }
.event-table-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.event-table-heading h5 { min-width: 0; margin: 0; font-size: 11px; }
.event-table-heading h5 a { color: var(--text); text-decoration: none; }
.event-table-heading h5 a:hover { color: var(--lime); }
.table-player-count { flex: 0 0 auto; color: var(--muted); font-size: 9px; }
.event-table-details { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 2px 0 0 !important; color: var(--muted) !important; font-size: 9px !important; line-height: 1.35 !important; }
.event-table-range, .event-table-members, .event-table-status { margin: 2px 0 0 !important; color: var(--muted) !important; font-size: 9px !important; line-height: 1.35 !important; }
.event-table-creator { color: var(--lime); font-weight: 700; }
.event-table-status { font-weight: 700; }
.event-table-started { color: var(--lime); font-size: 9px; font-weight: 700; }
.table-underfilled .event-table-status { color: var(--danger) !important; }
.table-ready .event-table-heading h5 a, .table-ready .table-player-count { color: var(--lime); }
.event-table-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3px; }
.event-table-actions .text-button { padding: 0; font-size: 9px; }
.event-table-actions .text-button:disabled { opacity: .55; cursor: not-allowed; }

.play-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.play-card-compact { padding: 12px 14px; background: transparent; border-color: var(--line); }
.play-icon { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 10px; background: rgba(157, 138, 255, .13); color: var(--violet); font-size: 16px; }
.play-thumbnail { display: block; flex: 0 0 42px; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); object-fit: cover; }
.play-main { min-width: 0; flex: 1; }
.play-card h3 { margin-top: 2px; }
.play-participants { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 5px; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.play-participant.is-winner { color: var(--lime); font-weight: 700; }
.play-participant-link { padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.play-participant-link:hover, .play-participant-link:focus-visible { color: var(--lime); text-decoration: underline; }
.play-participant-separator { color: var(--subtle); }
.duration { color: var(--subtle); font-size: 10px; white-space: nowrap; }
.page-list { margin-top: 3px; }

.side-column { display: grid; gap: 14px; }
.side-card { padding: 19px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.member-count { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 7px; color: var(--lime); background: rgba(200, 241, 105, .1); font-size: 10px; font-weight: 700; }
.member-list { display: grid; gap: 2px; margin: 6px 0 16px; }
.member-row { display: flex; align-items: center; gap: 8px; min-height: 39px; }
.avatar-member { width: 27px; height: 27px; border-color: var(--surface); background: #2a2f40; font-size: 10px; }
.member-name { min-width: 0; flex: 1; overflow: hidden; color: var(--label-text); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.member-name small, .profile-card h3 small { color: var(--lime); font: 500 9px 'DM Sans', sans-serif; }
.member-stat { color: var(--subtle); font-size: 10px; }
.registration-password-button { min-height: 37px; font-size: 10px; }
.mood-card { position: relative; overflow: hidden; min-height: 172px; display: flex; flex-direction: column; align-items: flex-start; }
.mood-card::after { content: ''; position: absolute; width: 130px; height: 130px; right: -60px; bottom: -72px; border: 1px solid rgba(200, 241, 105, .15); border-radius: 50%; box-shadow: 0 0 0 15px rgba(200, 241, 105, .025), 0 0 0 30px rgba(200, 241, 105, .02); }
.mood-icon { margin-bottom: 12px; color: var(--lime); font-size: 21px; }
.mood-card p { max-width: 100%; margin: 7px 0 12px; overflow-wrap: anywhere; white-space: pre-line; font: 500 15px/1.45 'Space Grotesk', sans-serif; letter-spacing: -.03em; }
.mood-signoff { color: var(--subtle); font-size: 10px; }
.reminder-form { position: relative; z-index: 1; display: grid; width: 100%; gap: 7px; margin: 10px 0 12px; }
.reminder-form label { color: var(--muted); font-size: 10px; }
.reminder-form textarea { width: 100%; min-height: 72px; padding: 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-raised); color: var(--text); font: inherit; font-size: 11px; resize: vertical; }
.reminder-actions { display: flex; gap: 7px; }
.reminder-actions .button { min-height: 34px; padding: 0 10px; font-size: 10px; }
.reminder-edit-button { position: relative; z-index: 1; margin: 0 0 12px; font-size: 10px; }

.empty-state {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 27px;
  text-align: center;
  background: rgba(24, 27, 39, .55);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.empty-icon { margin-bottom: 8px; color: var(--lime); font-size: 23px; }
.empty-state h3 { margin: 0 0 5px; font-size: 15px; }
.empty-state p { margin: 0 0 14px; color: var(--muted); font-size: 11px; }
.empty-state .button { min-height: 35px; font-size: 10px; }
.app-footer { min-height: 66px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); color: var(--subtle); font-size: 10px; }
.footer-brand { display: inline-flex; align-items: center; gap: 5px; }
.footer-brand img { display: block; width: auto; height: 28px; padding: 2px 6px; border-radius: 4px; background: #f5f3f8; object-fit: contain; }
.footer-dot { color: var(--lime); margin-left: 0; }

.proposal-card { display: flex; gap: 20px; justify-content: space-between; padding: 19px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.proposal-copy { min-width: 0; }
.proposal-title-row { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.proposal-title-row h3 { margin: 0; }
.proposal-status { padding: 4px 7px; border-radius: 6px; font-size: 9px; font-weight: 700; }
.proposal-status-active { background: rgba(200, 241, 105, .12); color: var(--lime); }
.proposal-status-closed { background: rgba(160, 164, 183, .12); color: var(--muted); }
.price { padding: 4px 7px; color: var(--lime); background: rgba(200, 241, 105, .1); border-radius: 6px; font-size: 10px; font-weight: 700; }
.proposal-card p { margin: 8px 0 6px; }
.item-link { display: inline-block; margin: 3px 0 8px; color: var(--violet); font-size: 10px; text-decoration: none; }
.item-link:hover { text-decoration: underline; }
.proposed-by { display: block; color: var(--subtle); font-size: 9px; }
.proposal-actions { display: grid; align-content: start; justify-items: end; gap: 8px; flex: 0 0 auto; }
.proposal-actions .button { min-height: 32px; padding: 0 10px; font-size: 10px; }
.proposal-fund { display: grid; gap: 7px; width: min(100%, 360px); margin-top: 12px; padding: 11px; border: 1px solid rgba(200, 241, 105, .2); border-radius: 9px; background: rgba(200, 241, 105, .045); }
.proposal-fund > strong { color: var(--lime); font-size: 12px; }
.proposal-fund .text-button { justify-self: start; padding: 0; }
.donation-list { display: grid; gap: 6px; margin: 0; padding: 9px 0 0; border-top: 1px solid var(--line); list-style: none; }
.donation-list li { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; }
.donation-list li strong { color: var(--text); white-space: nowrap; }
.proposal-admin-notes { margin-top: 10px !important; padding: 9px 11px; border-left: 2px solid var(--violet); background: rgba(157, 138, 255, .055); }
.proposal-delete-button { color: var(--danger); }
.proposal-delete-button:hover { border-color: rgba(255, 135, 135, .45); color: var(--danger); }
.vote-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.vote-button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.vote-button.voted { border-color: rgba(200, 241, 105, .45); background: rgba(200, 241, 105, .08); }

.members-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 9px; }
.profile-card { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.avatar-large { width: 44px; height: 44px; border: 0; background: linear-gradient(145deg, #343a50, #262a3a); font-size: 16px; }
.profile-card h3 { margin: 12px 0 3px; font-size: 15px; }
.profile-card > p { margin: 0; color: var(--muted); font-size: 10px; }
.profile-stats { display: flex; gap: 20px; margin-top: 17px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.profile-stats strong { color: var(--text); margin-right: 3px; }
.member-profile-link { padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; text-align: left; }
.member-profile-link:hover { color: var(--lime); }
.member-profile-link.member-name { color: var(--label-text); }
.bgg-badge { display: inline-grid; width: 28px; height: 20px; padding: 3px; place-items: center; border: 1px solid rgba(200, 241, 105, .27); border-radius: 6px; color: var(--lime); text-decoration: none; vertical-align: middle; }
.bgg-badge img { display: block; width: 20px; height: 12px; object-fit: contain; }
.bgg-profile-button { background: transparent; cursor: pointer; }
.profile-reload-button { margin-left: 4px; }
.profile-open-button { min-height: 32px; margin-top: 13px; padding: 0 10px; font-size: 10px; }
.member-card { padding: 11px 13px; }
.member-card .avatar-large, .member-card .profile-open-button { display: none; }
.member-card h3 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; }
.member-card h3 small { font-size: 9px; }
.member-card .profile-stats { gap: 12px; margin-top: 7px; padding-top: 6px; }
.member-admin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 9px; }
.member-admin-actions .text-button { padding: 0; border: 0; background: transparent; color: var(--lime); cursor: pointer; font: inherit; font-size: 10px; }
.member-admin-actions .text-button-danger { color: var(--danger, #e87979); }
.user-profile-grid { display: grid; gap: 14px; }
.profile-section { min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.profile-section h2 { margin: 0 0 12px; font-size: 16px; }
.profile-section > p { color: var(--muted); font-size: 11px; }
.theme-setting { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 14px; }
.theme-setting h2 { margin-bottom: 5px; }
.theme-setting p { margin: 0; }
.theme-switch { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 9px; padding: 5px; border: 0; background: transparent; color: var(--text); cursor: pointer; font-size: 11px; font-weight: 600; }
.theme-switch-track { display: flex; align-items: center; width: 38px; height: 22px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-soft); transition: background .15s ease; }
.theme-switch-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .15s ease, background .15s ease; }
.theme-switch[aria-checked="true"] .theme-switch-track { background: var(--lime); }
.theme-switch[aria-checked="true"] .theme-switch-thumb { transform: translateX(16px); background: var(--accent-on); }
.account-profile-form { display: grid; gap: 14px; max-width: 760px; }
.account-profile-form h2 { margin: 0; font-size: 16px; }
.account-profile-form .password-section-title { margin-top: 10px; }
.account-profile-form .muted { margin: -10px 0 0; font-size: 11px; }
.account-profile-form .button { justify-self: start; }
.profile-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.profile-details > div { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-raised); }
.profile-details dt { margin-bottom: 5px; color: var(--subtle); font-size: 9px; }
.profile-details dd { margin: 0; overflow-wrap: anywhere; color: var(--text); font-size: 12px; }
.profile-loading { padding: 15px 0; color: var(--muted); font-size: 12px; }
.profile-bgg-account { margin: -7px 0 12px; }
.profile-bgg-account a, .bgg-collection-item a { color: var(--violet); text-decoration: none; }
.profile-bgg-account a:hover, .bgg-collection-item a:hover { text-decoration: underline; }
.bgg-collection-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bgg-collection-item { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-raised); }
.bgg-collection-item img, .bgg-collection-placeholder { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 6px; object-fit: cover; background: var(--surface-soft); }
.bgg-collection-placeholder { display: grid; place-items: center; color: var(--lime); }
.bgg-collection-item > div { min-width: 0; }
.bgg-collection-item a { font-size: 11px; font-weight: 600; }
.bgg-collection-item p { margin: 4px 0 0; color: var(--subtle); font-size: 9px; }

.collection-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin: 0 0 14px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.collection-filters label:first-child { grid-column: span 2; }
.collection-filters label { gap: 5px; font-size: 10px; }
.collection-filters input, .collection-filters select { height: 40px; min-height: 40px; padding: 9px 12px; }
.collection-filters select { width: 100%; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--input-bg); color: var(--text); font: inherit; font-size: 11px; line-height: 20px; }
.collection-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 10px; color: var(--muted); font-size: 10px; }
.collection-view-toggle { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.view-toggle-button { display: grid; width: 32px; height: 30px; place-items: center; padding: 5px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.view-toggle-button svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.view-toggle-button[aria-pressed="true"] { background: var(--surface-soft); color: var(--lime); }
.collection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.collection-grid-list, .collection-grid.collection-grid-list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.collection-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.game-art { height: 120px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 45%, rgba(157, 138, 255, .16), transparent 70%), var(--surface-soft); }
.game-art img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.collection-card-list { display: flex; align-items: stretch; }
.collection-card-list .game-art { flex: 0 0 64px; width: 64px; height: auto; min-height: 64px; }
.collection-card-list .game-art img { max-width: 54px; max-height: 54px; }
.collection-card-list .collection-card-body { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: center; align-items: center; column-gap: 6px; row-gap: 0; padding: 4px 8px; }
.collection-card-list .collection-title-row, .collection-card-list .game-details { grid-column: 1; }
.collection-card-list .game-meta { grid-column: 2; grid-row: 2; align-self: end; display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.collection-card-list .collection-title-row h2 { font-size: 14px; }
.collection-card-list .game-details { min-height: 0; margin: 0; line-height: 1.25; }
.collection-card-list .collection-card-footer { grid-column: 1 / -1; margin-top: 0; padding-top: 2px; }
.game-art-empty { color: var(--lime); font-size: 34px; }
.collection-card-body { padding: 16px; }
.collection-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 9px; }
.collection-title-row h2 { display: flex; min-width: 0; align-items: center; gap: 7px; margin: 0; font-size: 16px; line-height: 1.3; letter-spacing: -.035em; }
.collection-title-row h2 > span { min-width: 0; }
.game-markers { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; }
.played-marker { font-size: 15px; line-height: 1; }
.favorite-toggle { display: inline-grid; flex: 0 0 20px; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--subtle); cursor: pointer; transition: color .15s ease, filter .15s ease; }
.favorite-toggle svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.favorite-toggle:hover { color: var(--lime); }
.favorite-toggle.is-favorite { color: var(--lime); filter: drop-shadow(0 0 4px rgba(200, 241, 105, .68)); }
.favorite-toggle.is-favorite svg { fill: currentColor; }
.favorite-toggle:disabled { opacity: .5; cursor: wait; }
.game-year { color: var(--subtle); font-size: 10px; white-space: nowrap; }
.game-details { margin: 7px 0 8px; color: var(--muted); font-size: 10px; }
.collection-card:not(.collection-card-list) .game-details { margin-bottom: 2px; }
.game-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.collection-card:not(.collection-card-list) .game-rating { display: block; margin: 0; }
.collection-card-list .game-rating { display: block; margin: 0; }
.collection-card:not(.collection-card-list) .game-rating small, .collection-card-list .game-rating small { display: none; }
.game-rating { color: var(--lime); font-size: 11px; font-weight: 700; }
.game-rating small { color: var(--subtle); font-size: 9px; font-weight: 400; }
.game-description { display: -webkit-box; min-height: 48px; margin: 9px 0 13px; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.collection-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 9px; padding-top: 10px; border-top: 1px solid var(--line); }
.collection-card-footer .item-link { margin: 0; }
.remove-game { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--subtle); cursor: pointer; font-size: 9px; }
.remove-game:hover { border-color: rgba(255, 135, 135, .4); color: var(--danger); }
.remove-game:disabled { opacity: .5; cursor: wait; }
.collection-empty { margin-top: 20px; }
.collection-no-results { margin: 0; padding: 18px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); text-align: center; font-size: 11px; }
.modal-card.collection-modal { max-width: 570px; }
.bgg-search-form { grid-template-columns: 1fr auto; align-items: end; }
.bgg-search-form .button { min-height: 41px; }
.bgg-search-form label { position: relative; }
.bgg-results { position: absolute; top: calc(100% + 7px); left: 0; right: 0; z-index: 3; }
.table-game-label { position: relative; }
.bgg-message { margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--popup-bg); color: var(--muted); font-size: 11px; box-shadow: 0 12px 30px rgba(0,0,0,.3); }
.bgg-error { border-color: rgba(255, 135, 135, .32); color: var(--danger); }
.bgg-result-list { display: grid; gap: 1px; max-height: 330px; overflow-y: auto; padding: 4px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--popup-bg); box-shadow: 0 12px 30px rgba(0,0,0,.3); }
.bgg-result { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 9px; border-bottom: 1px solid var(--line); background: transparent; }
.play-game-label { position: relative; }
.play-bgg-result-list { max-height: 260px; }
.play-bgg-result { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 9px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.play-bgg-result:hover, .play-bgg-result:focus-visible { background: var(--surface-soft); }
.play-bgg-result > span:first-child { display: grid; gap: 4px; }
.play-bgg-result strong { font-size: 11px; }
.play-bgg-result small { color: var(--subtle); font-size: 9px; }
.repeat-until-label[hidden] { display: none; }
.member-picker.play-member-picker { display: grid; }
.play-member-picker legend { display: flex; align-items: center; gap: 8px; }
.play-player-rows { display: grid; gap: 7px; }
.play-player-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(105px, .7fr) minmax(110px, 1fr); align-items: center; gap: 8px; width: 100%; }
.play-score-label { display: grid; grid-template-columns: auto minmax(55px, 1fr); align-items: center; gap: 8px; color: var(--muted); font-size: 9px; font-weight: 400; }
.play-score-label input, .play-player-note input { height: 40px; min-height: 40px; padding: 9px 12px; }
.play-add-member-button { display: inline-grid; place-items: center; width: 28px; height: 28px; min-height: 28px; padding: 0; border: 1px solid var(--lime); border-radius: 7px; background: var(--lime); color: var(--accent-on); font-size: 16px; line-height: 1; cursor: pointer; }
.play-add-member-button:hover, .play-add-member-button:focus-visible { border-color: var(--lime-hover); background: var(--lime-hover); }
.play-member-picker-panel { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.play-member-picker-panel[hidden] { display: none; }
.play-member-search { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.play-member-search input { height: 40px; min-height: 40px; }
.play-member-options { display: grid; gap: 7px; }
.play-member-more { color: var(--subtle); font-size: 9px; }
.winner-picker { align-items: center; }
.winner-players { display: flex; flex-basis: 100%; flex-wrap: wrap; gap: 9px 13px; padding-top: 5px; }
.winner-players[hidden] { display: none; }
.registration-password-section { margin-top: 14px; }
.play-details-trigger { padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; text-align: left; }
.play-details-trigger:hover { color: var(--lime); }
.play-details-modal { width: min(100%, 520px); }
.play-details-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.play-details-content { display: grid; gap: 7px; margin: 15px 0; }
.play-details-content p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.play-details-content strong { color: var(--text); }
.play-detail-scorecard { display: grid; gap: 5px; }
.play-detail-scorecard > strong { margin-bottom: 2px; font-size: 11px; }
.play-detail-player { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); color: var(--text); font-size: 11px; }
.play-detail-player > span { display: flex; flex-wrap: nowrap; align-items: baseline; gap: 4px 8px; min-width: 0; overflow: hidden; white-space: nowrap; }
.play-detail-player > span > small { flex: 0 0 auto; color: var(--lime); font-size: 9px; font-weight: 700; white-space: nowrap; }
.play-detail-player > span > .play-player-note-display { min-width: 0; overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.play-detail-player > strong { color: var(--lime); font-size: 12px; }
.play-detail-empty { padding: 8px 0; }
.play-bgg-link { display: inline-flex; align-items: center; width: auto; padding: 3px 7px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--lime); font-size: 10px; font-weight: 700; line-height: 1.3; text-decoration: none; }
.play-bgg-link:hover { border-color: var(--lime); background: rgba(200, 241, 105, .08); }
.play-detail-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; }
.play-edit-button { margin-top: 0; }
.play-delete-button { min-height: 38px; padding: 0 12px; color: var(--muted); font-size: 10px; }
.play-result { color: var(--muted); }
.bgg-result:last-child { border-bottom: 0; }
.bgg-result h3 { margin: 0 0 3px; font-size: 12px; }
.bgg-result p { margin: 0; color: var(--subtle); font-size: 9px; }
.bgg-result .button { min-height: 32px; padding: 0 10px; font-size: 10px; }
.already-added { color: var(--lime); font-size: 9px; white-space: nowrap; }

.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr); }
.auth-art {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 42px clamp(35px, 7vw, 100px);
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 80% 75%, rgba(200, 241, 105, .14), transparent 18rem),
    radial-gradient(circle at 20% 65%, rgba(157, 138, 255, .12), transparent 19rem),
    #151824;
}
.auth-art::before, .auth-art::after { content: ''; position: absolute; z-index: 0; pointer-events: none; border: 1px solid rgba(255,255,255,.05); border-radius: 50%; }
.auth-art::before { width: 560px; height: 560px; right: -230px; bottom: -125px; box-shadow: 0 0 0 44px rgba(255,255,255,.012), 0 0 0 88px rgba(255,255,255,.01); }
.auth-art::after { width: 315px; height: 315px; right: -104px; bottom: -3px; border-color: rgba(200, 241, 105, .12); }
.auth-art > *, .auth-art-copy { position: relative; z-index: 1; }
.auth-art-copy { max-width: 480px; margin: auto 0; padding: 45px 0 70px; }
.auth-art-copy h1 { margin: 16px 0; font: 600 clamp(48px, 6vw, 72px)/.98 'Space Grotesk', sans-serif; letter-spacing: -.075em; }
.auth-art-copy h1 em { color: var(--lime); font-style: normal; }
.auth-art-copy p { max-width: 340px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.art-footer { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px rgba(200, 241, 105, .8); }
.auth-panel { display: grid; place-items: center; padding: 46px; }
.auth-card { width: min(100%, 380px); }
.auth-card h2, .modal-card h2 { margin: 9px 0 7px; font-size: 29px; letter-spacing: -.06em; }
.muted { color: var(--muted); font-size: 12px; line-height: 1.55; }
.auth-card > .muted { margin-bottom: 28px; }
.form-stack, .modal-form { display: grid; gap: 15px; }
label { display: grid; gap: 7px; color: var(--label-text); font-size: 11px; font-weight: 600; }
.optional, .unit { color: var(--subtle); font-weight: 400; }
.label-title { display: inline; }
.required-marker { margin-left: 3px; color: var(--lime); font-size: 13px; font-weight: 700; line-height: 1; }
input, textarea {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: none;
  background: var(--input-bg);
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { height: 40px; }
select { height: 40px; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--input-bg); color: var(--text); font: inherit; font-size: 12px; line-height: 20px; }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input:focus, textarea:focus { border-color: rgba(200, 241, 105, .6); }
input[type="number"] { color-scheme: inherit; }
.date-input-control { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 40px; width: 100%; }
.date-input-control .date-display { border-radius: 9px 0 0 9px; }
.date-picker-toggle { width: 40px; min-width: 40px; height: 40px; padding: 0; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 9px 9px 0; background: var(--input-bg); color: var(--lime); cursor: pointer; }
.date-picker-toggle:hover { background: var(--surface-soft); }
.date-picker-toggle:disabled { color: var(--subtle); cursor: not-allowed; }
.date-picker-popover { position: fixed; z-index: 20; top: 50%; left: 50%; width: min(280px, calc(100vw - 24px)); max-height: calc(100vh - 24px); transform: translate(-50%, -50%); overflow-y: auto; display: block; padding: 11px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-raised); box-shadow: 0 14px 36px rgba(0,0,0,.45); }
.date-picker-popover[hidden] { display: none; }
.date-picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.date-picker-heading strong { color: var(--text); font-size: 11px; text-transform: capitalize; }
.date-picker-heading button { width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--text); cursor: pointer; font-size: 18px; line-height: 1; }
.date-picker-heading button:hover { border-color: var(--lime); color: var(--lime); }
.date-picker-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; }
.date-picker-weekdays { margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 700; }
.date-picker-weekdays span { padding: 5px 0; }
.date-picker-weekdays .sunday, .date-picker-day.sunday { color: var(--lime); }
.date-picker-days { grid-auto-rows: 32px; }
.date-picker-day { padding: 0; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--text); cursor: pointer; font-size: 11px; }
.date-picker-day:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-soft); }
.date-picker-day.selected { border-color: var(--lime); background: rgba(200,241,105,.12); color: var(--lime); font-weight: 700; }
.date-picker-day:disabled { color: var(--subtle); cursor: not-allowed; opacity: .45; }
.date-picker-empty { min-height: 32px; }
.time-input-control { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 40px; width: 100%; }
.time-input-control .time-display { border-radius: 9px 0 0 9px; }
.time-picker-toggle { width: 40px; min-width: 40px; height: 40px; padding: 0; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 9px 9px 0; background: var(--input-bg); color: var(--lime); cursor: pointer; font-size: 17px; }
.time-picker-toggle:hover { background: var(--surface-soft); }
.time-picker-popover { position: fixed; z-index: 20; top: 50%; left: 50%; width: min(264px, calc(100vw - 24px)); transform: translate(-50%, -50%); display: block; padding: 13px; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--surface-raised); box-shadow: 0 14px 36px rgba(0,0,0,.45); }
.time-picker-popover[hidden] { display: none; }
.clock-picker-display { display: flex; justify-content: center; align-items: center; gap: 5px; margin: 0 auto 12px; color: var(--muted); font: 600 26px 'Space Grotesk', sans-serif; }
.clock-picker-display button { min-width: 57px; padding: 5px 7px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font: inherit; }
.clock-picker-display button.active, .clock-picker-display button:hover { background: rgba(200,241,105,.12); color: var(--lime); }
.clock-picker-display span { color: var(--lime); }
.clock-dial { position: relative; width: 220px; height: 220px; margin: 0 auto; border: 1px solid var(--line); border-radius: 50%; background: var(--clock-bg); }
.clock-dial-center { position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--lime); }
.clock-dial-value { position: absolute; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; transform: translate(-50%, -50%); border: 1px solid transparent; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; font-size: 11px; }
.clock-hour-inner { width: 29px; height: 29px; color: var(--muted); font-size: 9px; }
.clock-dial-value:hover { background: var(--surface-soft); }
.clock-dial-value.selected { border-color: var(--lime); background: var(--lime); color: var(--accent-on); font-weight: 700; }
.clock-hour-outer.clock-position-0, .clock-minute-value.clock-position-1 { left: 152px; top: 37px; }
.clock-hour-outer.clock-position-1, .clock-minute-value.clock-position-2 { left: 183px; top: 68px; }
.clock-hour-outer.clock-position-2, .clock-minute-value.clock-position-3 { left: 194px; top: 110px; }
.clock-hour-outer.clock-position-3, .clock-minute-value.clock-position-4 { left: 183px; top: 152px; }
.clock-hour-outer.clock-position-4, .clock-minute-value.clock-position-5 { left: 152px; top: 183px; }
.clock-hour-outer.clock-position-5, .clock-minute-value.clock-position-6 { left: 110px; top: 194px; }
.clock-hour-outer.clock-position-6, .clock-minute-value.clock-position-7 { left: 68px; top: 183px; }
.clock-hour-outer.clock-position-7, .clock-minute-value.clock-position-8 { left: 37px; top: 152px; }
.clock-hour-outer.clock-position-8, .clock-minute-value.clock-position-9 { left: 26px; top: 110px; }
.clock-hour-outer.clock-position-9, .clock-minute-value.clock-position-10 { left: 37px; top: 68px; }
.clock-hour-outer.clock-position-10, .clock-minute-value.clock-position-11 { left: 68px; top: 37px; }
.clock-hour-outer.clock-position-11, .clock-minute-value.clock-position-0 { left: 110px; top: 26px; }
.clock-hour-inner.clock-position-0 { left: 134px; top: 68px; }
.clock-hour-inner.clock-position-1 { left: 152px; top: 86px; }
.clock-hour-inner.clock-position-2 { left: 158px; top: 110px; }
.clock-hour-inner.clock-position-3 { left: 152px; top: 134px; }
.clock-hour-inner.clock-position-4 { left: 134px; top: 152px; }
.clock-hour-inner.clock-position-5 { left: 110px; top: 158px; }
.clock-hour-inner.clock-position-6 { left: 86px; top: 152px; }
.clock-hour-inner.clock-position-7 { left: 68px; top: 134px; }
.clock-hour-inner.clock-position-8 { left: 62px; top: 110px; }
.clock-hour-inner.clock-position-9 { left: 68px; top: 86px; }
.clock-hour-inner.clock-position-10 { left: 86px; top: 68px; }
.clock-hour-inner.clock-position-11 { left: 110px; top: 62px; }
.password-control { position: relative; display: block; }
.password-control input { padding-right: 76px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 9px;
  min-height: 28px;
  padding: 0 4px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}
.password-toggle:hover { color: var(--lime); }
textarea { resize: vertical; }
.form-stack .button { margin-top: 3px; }
.auth-hint { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 10px; }
.auth-switch { padding: 0; border: 0; background: transparent; color: var(--lime); cursor: pointer; font-size: inherit; font-weight: 700; }
.auth-switch:hover { text-decoration: underline; }
.auth-footnote { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--subtle); text-align: center; font-size: 9px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; overflow-y: auto; padding: 25px; background: rgba(5, 6, 11, .75); backdrop-filter: blur(8px); }
.modal-card { position: relative; width: min(100%, 510px); max-height: calc(100vh - 50px); overflow-y: auto; padding: 29px; background: var(--popup-bg); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: 0 20px 80px rgba(0,0,0,.4); }
.modal-card.collection-modal { overflow: visible; }
.modal-card h2 { font-size: 25px; }
.modal-card > .muted { margin-bottom: 20px; }
.modal-close { position: absolute; top: 17px; right: 17px; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; }
.modal-close:hover { color: var(--text); }
.modal-form { gap: 13px; }
.modal-form .button { margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 11px; }
.play-duration-label > span:first-child { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.member-picker { display: flex; flex-wrap: wrap; gap: 9px 13px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 9px; }
.member-picker legend { padding: 0 5px; color: var(--label-text); font-size: 10px; font-weight: 600; }
.checkbox-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 400; cursor: pointer; }
.checkbox-label input { width: 14px; height: 14px; min-height: 14px; padding: 0; accent-color: var(--lime); }
.toast { position: fixed; z-index: 20; right: 22px; bottom: 22px; max-width: min(420px, calc(100vw - 44px)); padding: 13px 17px; border: 1px solid rgba(200, 241, 105, .3); border-radius: 10px; background: var(--toast-bg); color: var(--text); box-shadow: 0 8px 35px rgba(0,0,0,.25); font-size: 12px; }
.toast-error { border-color: rgba(255, 135, 135, .4); }
.error-screen { max-width: 500px; margin: 15vh auto; padding: 30px; text-align: center; }
.error-screen .brand-mark { margin-bottom: 14px; }
.error-screen h1 { font-size: 28px; }
.error-screen p { color: var(--muted); }

@media (max-width: 930px) {
  .topbar { gap: 20px; padding: 0 24px; }
  .nav-link { padding: 0 9px; font-size: 11px; }
  .nav-link.active::after { left: 9px; right: 9px; }
  .nav-icon { display: inline; margin-right: 5px; }
  .main-content, .app-footer { width: calc(100% - 48px); }
  .content-grid { grid-template-columns: minmax(0, 1.5fr) minmax(225px, .85fr); gap: 17px; }
  .account-name { display: none; }
}

@media (min-width: 701px) and (max-width: 930px) {
  .main-nav { flex: 1; justify-content: space-around; gap: 0; min-width: 0; }
  .nav-link { flex: 0 0 auto; padding: 0 5px; font-size: 10px; }
  .nav-link { gap: 4px; }
  .nav-label { display: inline; text-align: left; }
}

@media (min-width: 701px) and (max-width: 840px) {
  .topbar { gap: 16px; padding: 0 24px; }
  .mobile-nav-menu { position: relative; z-index: 8; display: flex; flex: 0 0 auto; align-items: center; }
  .mobile-nav-toggle { display: grid; width: 38px; height: 38px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); cursor: pointer; }
  .mobile-nav-toggle:hover, .mobile-nav-toggle[aria-expanded="true"] { border-color: var(--lime); color: var(--lime); }
  .mobile-nav-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .mobile-nav-dropdown { position: absolute; top: calc(100% + 9px); left: 0; z-index: 9; display: flex; width: 228px; flex-direction: column; padding: 6px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-raised); box-shadow: 0 12px 32px rgba(0,0,0,.38); }
  .mobile-nav-dropdown .nav-link { position: relative; display: flex; flex-direction: row; width: 100%; height: auto; min-height: 42px; flex: 0 0 auto; justify-content: flex-start; gap: 10px; padding: 8px 12px; border-radius: 7px; color: var(--muted); font-size: 12px; text-align: left; }
  .mobile-nav-dropdown .nav-link:hover, .mobile-nav-dropdown .nav-link.active { background: var(--surface-soft); color: var(--text); }
  .mobile-nav-dropdown .nav-link.active::after { top: 8px; right: auto; bottom: 8px; left: 0; width: 2px; height: auto; border-radius: 2px; }
  .mobile-nav-dropdown .nav-icon { display: inline-flex; flex: 0 0 20px; margin: 0; }
  .mobile-nav-dropdown .nav-icon svg { width: 18px; height: 18px; flex-basis: 18px; }
  .mobile-nav-dropdown .nav-label { display: inline; text-align: left; }
  .main-nav { display: none; }
  .account-menu { margin-left: 0; }
}

@media (max-width: 700px) {
  .topbar { height: 62px; padding: 0 16px; justify-content: space-between; gap: 8px; background: var(--topbar-bg); backdrop-filter: none; }
  .mobile-nav-menu { position: relative; z-index: 8; display: flex; flex: 0 0 auto; align-items: center; }
  .mobile-nav-toggle { display: grid; width: 38px; height: 38px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); cursor: pointer; }
  .mobile-nav-toggle:hover, .mobile-nav-toggle[aria-expanded="true"] { border-color: var(--lime); color: var(--lime); }
  .mobile-nav-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .mobile-nav-dropdown { position: absolute; top: calc(100% + 9px); left: 0; z-index: 9; display: flex; width: 228px; flex-direction: column; padding: 6px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-raised); box-shadow: 0 12px 32px rgba(0,0,0,.38); }
  .mobile-nav-dropdown .nav-link { position: relative; display: flex; flex-direction: row; width: 100%; height: auto; min-height: 42px; flex: 0 0 auto; justify-content: flex-start; gap: 10px; padding: 8px 12px; border-radius: 7px; color: var(--muted); font-size: 12px; text-align: left; }
  .mobile-nav-dropdown .nav-link:hover, .mobile-nav-dropdown .nav-link.active { background: var(--surface-soft); color: var(--text); }
  .mobile-nav-dropdown .nav-link.active::after { top: 8px; right: auto; bottom: 8px; left: 0; width: 2px; height: auto; border-radius: 2px; }
  .mobile-nav-dropdown .nav-icon { display: inline-flex; flex: 0 0 20px; margin: 0; }
  .mobile-nav-dropdown .nav-icon svg { width: 18px; height: 18px; flex-basis: 18px; }
  .mobile-nav-dropdown .nav-label { display: inline; text-align: left; }
  .brand { gap: 7px; font-size: 11px; }
  .brand-mark { width: 28px; height: 28px; font-size: 17px; }
  .main-nav { display: none; }
  .account-menu { margin-left: 0; }
  .logout-button { width: 29px; height: 29px; }
  .main-content, .app-footer { width: calc(100% - 32px); }
  .main-content { min-height: calc(100vh - 119px); padding: 35px 0 42px; }
  .welcome-row, .page-heading { align-items: flex-start; flex-direction: column; gap: 15px; margin-bottom: 24px; }
  .welcome-row h1, .page-heading h1 { font-size: 33px; }
  .welcome-row .button, .page-heading .button { width: 100%; }
  .welcome-actions, .page-heading-actions { width: 100%; }
  .welcome-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-heading-actions { flex-direction: column-reverse; }
  .page-heading-actions .button { width: 100%; }
  .statistics-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 11px; }
  .statistics-chart-grid { grid-template-columns: 1fr; gap: 9px; }
  .statistics-card { padding: 13px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; margin-bottom: 30px; }
  .stat-card { min-height: 102px; padding: 14px; }
  .stat-card strong { font-size: 26px; }
  .stat-foot { font-size: 10px; }
  .content-grid { grid-template-columns: 1fr; }
  .side-column { grid-template-columns: 1fr 1fr; align-items: start; }
  .side-card { padding: 14px; }
  .mood-card { min-height: 100%; }
  .event-card { gap: 10px; padding: 13px; }
  .attendance-actions { gap: 5px; }
  .choice-button { padding: 6px 7px; }
  .members-grid { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 7px; }
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .collection-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 11px; }
  .collection-filters label:first-child { grid-column: 1 / -1; }
  .bgg-collection-list { grid-template-columns: 1fr; }
  .game-art { height: 76px; }
  .collection-card-body { padding: 7px; }
  .collection-title-row { gap: 4px; }
  .collection-title-row h2 { font-size: 13px; line-height: 1.2; }
  .game-markers { gap: 3px; }
  .favorite-toggle { flex-basis: 18px; width: 18px; height: 18px; }
  .favorite-toggle svg { width: 16px; height: 16px; }
  .game-year { font-size: 9px; }
  .game-details { min-height: 32px; margin: 4px 0; font-size: 9px; line-height: 1.3; }
  .game-rating { font-size: 10px; }
  .game-rating small { font-size: 8px; }
  .collection-card-footer { gap: 4px; padding-top: 5px; }
  .collection-card-footer .item-link { font-size: 9px; }
  .remove-game { padding: 4px 6px; }
  .collection-card-list .game-art { flex-basis: 60px; width: 60px; min-height: 60px; }
  .collection-card-list .game-art img { max-width: 50px; max-height: 50px; }
  .collection-card-list .collection-card-body { padding: 3px 7px; column-gap: 5px; }
  .profile-card { padding: 14px; }
  .profile-section { padding: 14px; }
  .theme-setting { gap: 10px; }
  .profile-details { grid-template-columns: 1fr; }
  .account-profile-form .button { width: 100%; }
  .app-footer { min-height: 57px; margin-bottom: 0; font-size: 8px; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-art { min-height: 220px; padding: 23px 24px 0; }
  .auth-art-copy { padding: 32px 0 22px; }
  .auth-art-copy h1 { margin: 9px 0; font-size: 42px; }
  .auth-art-copy h1 br { display: none; }
  .auth-art-copy p { margin: 0; max-width: 300px; font-size: 12px; }
  .art-footer { display: none; }
  .auth-panel { padding: 31px 24px 50px; }
  .auth-card h2 { font-size: 25px; }
}

@media (max-width: 600px) {
  .play-player-row { grid-template-columns: minmax(0, 1fr) minmax(110px, .7fr); }
  .play-player-note { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .side-column { grid-template-columns: 1fr; }
  .account-name { display: none; }
  .topbar { padding-right: 12px; padding-left: 12px; }
  .brand { gap: 6px; font-size: 10px; letter-spacing: .1em; }
  .account-menu { position: relative; z-index: 7; flex: 0 0 auto; margin-left: auto; }
  .account-avatar-button { width: 36px; height: 36px; border: 2px solid var(--lime); background: var(--lime); color: var(--accent-on); font-size: 15px; box-shadow: 0 0 0 3px rgba(200,241,105,.12); }
  .account-avatar-button:hover, .account-avatar-button[aria-expanded="true"] { border-color: var(--lime-hover); background: var(--lime-hover); color: var(--accent-on); }
  .account-dropdown { top: calc(100% + 7px); }
  .event-card { grid-template-columns: 54px minmax(0, 1fr); }
  .event-date { min-height: 53px; }
  .form-row { grid-template-columns: 1fr; }
  .proposal-card { flex-direction: column; gap: 12px; }
  .proposal-actions { justify-items: start; }
  .vote-actions { justify-content: flex-start; }
  .members-grid { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 6px; }
  .member-card { padding: 9px; }
  .member-card h3 { font-size: 13px; }
  .member-card .profile-stats { gap: 8px; font-size: 9px; }
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .collection-grid:not(.collection-grid-list) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-filters { gap: 7px; padding: 9px; }
  .collection-toolbar { align-items: flex-start; }
  .collection-card-list .game-art { flex-basis: 56px; width: 56px; min-height: 56px; }
  .collection-card-list .game-art img { max-width: 46px; max-height: 46px; }
  .game-art { height: 68px; }
  .collection-card-body { padding: 7px; }
  .collection-title-row h2 { font-size: 12px; }
  .game-details { min-height: 38px; font-size: 8px; }
  .collection-card-footer .item-link { font-size: 8px; }
  .remove-game { font-size: 8px; }
  .bgg-search-form { grid-template-columns: 1fr; }
  .app-footer span:first-child { max-width: 190px; }
}

@media (max-width: 360px) {
  .brand > span:last-child { display: none; }
}
