:root {
  --ink: #10231b;
  --cream: #f4f0e6;
  --paper: #fffdf7;
  --green: #154f36;
  --lime: #b9dd73;
  --gold: #e7aa36;
  --muted: #637069;
  --line: #d9ddd4;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cream);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
body.drawer-open {
  overflow: hidden;
}
header {
  height: calc(72px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(5vw, 24px) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #d8d4ca;
  background: rgba(244, 240, 230, 0.92);
  position: sticky;
  top: 0;
  z-index: 5;
}
.network-status {
  position: fixed;
  top: env(safe-area-inset-top);
  left: 50%;
  z-index: 30;
  width: min(560px, calc(100% - 32px));
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  background: #9b2828;
  color: white;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  transform: translateX(-50%);
  box-shadow: 0 5px 18px rgba(16,35,27,.18);
}
.menu-toggle {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: transparent;
  display: grid;
  align-content: center;
  gap: 5px;
}
.menu-toggle b {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 18px;
  height: 18px;
  padding: 1px 5px;
  border-radius: 99px;
  background: #b3261e;
  color: white;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(7, 19, 14, 0.45);
  backdrop-filter: blur(2px);
}
.drawer {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: min(330px, 86vw);
  padding: calc(30px + env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) calc(30px + env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  background: var(--paper);
  box-shadow: 16px 0 40px rgba(7, 19, 14, 0.2);
  transform: translateX(-105%);
  transition: transform 180ms ease;
}
.drawer.open {
  transform: translateX(0);
}
@media (min-width: 761px) and (min-height: 501px) {
  .menu-toggle { display: none; }
  body.signed-in main { margin-left: 250px; }
  body.signed-in .drawer {
    inset: calc(72px + env(safe-area-inset-top)) auto 0 0;
    width: 250px;
    padding: 20px 14px;
    transform: none;
    transition: none;
    box-shadow: none;
    border-right: 1px solid var(--line);
    overflow-y: auto;
    z-index: 4;
  }
  body.signed-in .drawer-brand { display: none; }
  body.signed-in .drawer-nav { padding-top: 0; }
  body.signed-in .drawer-backdrop { display: none; }
}
.drawer-brand {
  padding: 4px 12px 26px;
  border-bottom: 1px solid var(--line);
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 700;
}
.drawer-brand span {
  color: var(--green);
}
.drawer-nav {
  display: grid;
  gap: 7px;
  padding-top: 22px;
}
.drawer-nav button {
  width: 100%;
  padding: 14px 16px;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 15px;
}
.drawer-nav button:hover,
.drawer-nav button.active {
  background: #e3ebdf;
  color: var(--green);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: Georgia, serif;
  font-size: 21px;
  color: var(--ink);
  text-decoration: none;
  font-weight: bold;
}
.brand span {
  color: var(--green);
}
.brand-icon { width: 32px; height: 32px; flex-shrink: 0; }
.required-mark { color: #b3261e; }
.week-winners { margin:20px 0; padding:24px; border:2px solid var(--gold); border-radius:14px; background:var(--paper); overflow-wrap:anywhere; }
.week-winners h2 { margin:8px 0 16px; }
.week-winners ul { list-style:none; margin:0; padding:0; display:grid; gap:16px; }
.week-winners li span { display:block; margin-top:6px; color:var(--muted); }
.matchup-final { display:block; margin-top:8px; color:var(--green); font-size:13px; white-space:nowrap; }
.game-score-form { padding:20px 0; border-bottom:1px solid var(--line); margin-bottom:16px; }
.score-fields { display:flex; flex-wrap:wrap; gap:16px; align-items:end; }
.score-fields label { flex:1 1 200px; min-width:0; margin:0; }
.kickoff-fields { display:flex; flex-wrap:wrap; gap:12px; align-items:end; margin:10px 0 16px; }
.kickoff-fields label { flex:0 1 320px; margin:0; }
button.week-card { color:var(--ink); text-align:left; font:inherit; width:100%; }
button.week-card:disabled { cursor:not-allowed; opacity:.65; }
.member-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding:16px 0; border-bottom:1px solid var(--line); }
.member-row > div { min-width:0; overflow-wrap:anywhere; }
.member-email { margin:6px 0 0; color:var(--muted); }
.admin-users { margin:24px 0; min-width:0; }
#users-search,#group-members-search { display:flex; flex-wrap:wrap; gap:12px; align-items:end; }
#users-search label,#group-members-search label { flex:1 1 220px; margin:0; }
.users-table-scroll,.group-members-table-scroll { max-width:100%; overflow-x:auto; }
.users-table-scroll table,.group-members-table-scroll table { width:100%; text-align:left; border-collapse:collapse; }
.users-table-scroll th,.users-table-scroll td,.group-members-table-scroll th,.group-members-table-scroll td { padding:12px; border-bottom:1px solid var(--line); }
.group-members-table-scroll td:last-child { width:1%; white-space:nowrap; }
.group-members-table-scroll button { padding:8px 10px; }
.invite-code-row { display:flex; align-items:end; gap:10px; margin-bottom:10px; }
.invite-code-row label { flex:1 1 auto; margin:0; min-width:0; }
.invite-code-row button { flex:0 0 auto; }
.copy-invite-button { width:44px; height:44px; padding:10px; display:grid; place-items:center; }
.copy-invite-button svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.copy-invite-button.copied { background:#287a55; }
.group-card-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:4px; }
.users-pages { display:flex; gap:12px; margin-top:16px; }
.site-footer { display:flex; flex-wrap:wrap; justify-content:center; gap:16px; padding:24px 20px 100px; }
.site-footer a { color:var(--green); }
@media(min-width:761px) and (min-height:501px) { body.signed-in .site-footer { margin-left:250px; } }
#auth-form:not(.register-mode) .required-mark { display: none; }
.drawer-footer { margin-top: auto; padding-top: 24px; flex-shrink: 0; }
.drawer-footer button { width: 100%; text-align: left; }
.drawer-footer .error:empty { display: none; }
[data-view]:disabled { cursor: not-allowed; }
nav {
  display: flex;
  gap: 16px;
  align-items: center;
}
button {
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  background: var(--green);
  color: white;
  font-weight: 700;
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
}
.link {
  background: none;
  color: var(--green);
  padding: 8px;
}
.primary,
.gold {
  width: 100%;
  padding: 15px;
  font-size: 15px;
}
.gold {
  background: var(--gold);
  color: #241600;
}
.auth-shell {
  min-height: calc(100vh - 72px);
  min-height: calc(100dvh - 72px - env(safe-area-inset-top));
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 8vw;
  align-items: center;
  padding: 7vw;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 12px;
  font-weight: 800;
  color: var(--green);
}
h1 {
  font-family: Georgia, serif;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.94;
  margin: 16px 0;
}
h1 em {
  color: var(--green);
  font-weight: normal;
}
.lede {
  font-size: 19px;
  max-width: 540px;
  color: var(--muted);
  line-height: 1.6;
}
.panel {
  background: var(--paper);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 35px #1d35240d;
}
.panel h2,
.panel h3 {
  font-family: Georgia, serif;
  margin-top: 0;
}
label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  margin: 16px 0;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #c8cec7;
  border-radius: 8px;
  padding: 12px;
  background: white;
  font: inherit;
  color: var(--ink);
}
textarea {
  resize: vertical;
}
.textarea-counter-wrap {
  position: relative;
  display: block;
}
.textarea-counter-wrap textarea {
  padding-bottom: 34px;
}
.textarea-counter {
  position: absolute;
  right: 10px;
  bottom: 8px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}
.error {
  color: #9b2828;
  min-height: 20px;
}
.hero {
  padding: 64px 6vw 40px;
  background: var(--ink);
  color: white;
}
.hero h1 {
  font-size: clamp(48px, 6vw, 80px);
  margin: 8px 0;
}
.hero p:last-child {
  color: #c9d6cf;
}
.page-view {
  min-height: calc(100vh - 72px);
  min-height: calc(100dvh - 72px - env(safe-area-inset-top));
}
.page-heading {
  padding: 55px 6vw 20px;
}
.page-heading h1 {
  margin: 7px 0 12px;
  font-size: clamp(45px, 6vw, 72px);
}
.page-heading > p:last-child {
  color: var(--muted);
}
.week-grid {
  padding: 36px 6vw;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.community-board {
  padding: 38px 6vw 10px;
}
.pool-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
  border-radius: 14px;
  background: var(--green);
  color: white;
}
.pool-card h2,
.pool-card p {
  margin: 0;
}
.pool-card .pool-amount {
  font-family: Georgia, serif;
  font-size: 38px;
}
.pool-card .pool-detail {
  margin-top: 5px;
  color: #dceade;
  font-size: 13px;
}
.board-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 32px 0 14px;
}
.board-heading h2 {
  margin: 4px 0 0;
  font-family: Georgia, serif;
  font-size: 34px;
}
.board-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: -3px 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.board-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-swatch {
  width: 12px;
  height: 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
}
.legend-swatch.correct {
  background: #dcefdc;
}
.legend-swatch.incorrect {
  background: #f7dddd;
}
.legend-swatch.tied {
  background: #dceef8;
}
.legend-swatch.pending {
  background: var(--paper);
}
.picks-board {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.picks-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}
.mobile-picks {
  display: none;
}
.mobile-board-view-switch {
  display: none;
}
.board-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 12px;
}
.board-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.board-tools button {
  flex: 0 0 auto;
  padding: 8px 11px;
  font-size: 12px;
}
.picks-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}
.picks-table th,
.picks-table td {
  padding: 11px 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}
.picks-table th:first-child,
.picks-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 150px;
  background: var(--paper);
  text-align: left;
}
.pick-matchup {
  display: grid;
  gap: 2px;
  font-size: 11px;
}
.pick-matchup img {
  width: 27px;
  height: 27px;
  object-fit: contain;
  margin: auto;
}
.pick-matchup-logos {
  display: flex;
  justify-content: center;
  gap: 3px;
}
.pick-cell {
  font-weight: 800;
}
.pick-cell.correct {
  background: #dcefdc;
  color: #175b2e;
}
.pick-cell.incorrect {
  background: #f7dddd;
  color: #8a2020;
}
.pick-cell.tied {
  background: #dceef8;
  color: #185a7a;
}
.empty-board {
  padding: 28px;
  color: var(--muted);
}
.week-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  cursor: pointer;
  transition: 0.2s;
}
.week-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px #1d352414;
}
.history-list {
  display: grid;
  gap: 13px;
  padding: 12px 6vw 50px;
}
.history-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 110px 130px;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  cursor: pointer;
}
.history-card:hover {
  box-shadow: 0 10px 25px rgba(20, 50, 35, 0.08);
}
.history-card h2 {
  margin: 8px 0 4px;
  font-family: Georgia, serif;
}
.history-score {
  display: grid;
  text-align: center;
}
.history-score strong {
  font-family: Georgia, serif;
  font-size: 28px;
}
.history-score span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}
.account-card {
  max-width: 650px;
  margin: 10px 6vw 50px;
}
.account-details {
  margin: 0 0 24px;
}
.account-details div {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.account-details dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.account-details dd {
  margin: 5px 0 0;
  font-weight: 700;
}
.notifications-list {
  display: grid;
  gap: 10px;
  padding: 10px 6vw 50px;
}
.notification-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  cursor: pointer;
}
.notification-item.unread {
  border-left: 5px solid var(--green);
  background: #f8fbf4;
}
.notification-item p {
  margin: 5px 0;
}
.notification-item span,
.notification-item time {
  color: var(--muted);
  font-size: 12px;
}
.pill {
  display: inline-block;
  background: #e1eadb;
  border-radius: 99px;
  padding: 5px 9px;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 800;
}
.meta {
  color: var(--muted);
  font-size: 14px;
}
#week-detail {
  padding: 34px 6vw;
}
.entry-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
}
.entry-switch {
  background: var(--paper);
  color: var(--green);
  border: 1px solid var(--line);
}
.entry-switch.active {
  background: var(--green);
  color: white;
}
.detail-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
}
.detail-title h2,
.section-title h2 {
  font-family: Georgia, serif;
  font-size: 38px;
  margin: 8px 0;
}
.game-day {
  margin: 30px 0;
}
.game-day-heading {
  position: static;
  height: auto;
  padding: 0 2px 10px;
  border: 0;
  border-bottom: 2px solid var(--green);
  background: transparent;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.game-day-heading h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 25px;
}
.game-day-heading span {
  color: var(--muted);
  font-size: 14px;
}
.game {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 10px 0;
  overflow: hidden;
}
.team {
  position: relative;
  padding: 20px;
  text-align: center;
  cursor: pointer;
}
.team-logo {
  display: block;
  width: 54px;
  height: 54px;
  object-fit: contain;
  margin: 0 auto 8px;
}
.danger-zone { margin-top:28px; padding-top:24px; border-top:1px solid #d7aaa7; }
.push-settings { margin-top:28px; padding-top:24px; border-top:1px solid var(--line); }
.push-settings form { display:grid; gap:10px; margin-top:16px; }
.push-settings form button { justify-self:start; }
.danger-zone h2 { color:#8a2020; }
.danger-zone p { line-height:1.55; }
.danger-button { background:#9b2828; }
.danger-button:hover { background:#7f1f1f; }
.group-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 6vw;
  border-bottom: 1px solid var(--line);
}
.group-bar label { flex: 1; max-width: 480px; min-width: 0; margin: 0; }
.group-bar select { width: 100%; height: 44px; }
.group-bar > button { height: 44px; flex-shrink: 0; white-space: nowrap; }
.groups-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; margin: 20px 6vw; }
.group-members, #groups-view > .error, #review-message { margin: 20px 6vw; }
#reviews-view > .review-panel { margin: 20px 6vw; }
.hero .eyebrow {
  color: var(--lime);
}
.team:has(input:checked) {
  background: #e5efdd;
  box-shadow: inset 0 0 0 2px var(--green);
}
.team:has(input:focus-visible) {
  outline: 3px solid var(--gold);
  outline-offset: -5px;
}
.team:has(input:disabled),
.team input:disabled {
  cursor: default;
}
.team input {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 20px;
  height: 20px;
  margin: 0;
  opacity: 1;
  accent-color: var(--green);
  cursor: pointer;
}
.versus {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  min-width: 82px;
  text-align: center;
  display: grid;
  gap: 2px;
}
.versus strong {
  color: var(--ink);
  font-size: 15px;
}
.versus small,
.versus b {
  font-size: 10px;
}
.versus em {
  margin-top: 5px;
  padding: 3px 5px;
  border-radius: 99px;
  background: #e1eadb;
  color: var(--green);
  font-style: normal;
  font-weight: 800;
}
.ticket {
  margin: 20px 0 40px;
  background: var(--ink);
  color: white;
  border-radius: 14px;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  align-items: end;
  gap: 16px;
}
.ticket label {
  margin: 0;
}
.pick-progress {
  grid-column: 1 / -1;
  margin: 0;
  color: #d6dfda;
  font-size: 13px;
  font-weight: 800;
}
.pick-progress.complete {
  color: var(--lime);
}
.mobile-nav {
  display: none;
}
.print-board-document { display:none; }
@media print {
  @page { size: landscape; margin: .35in; }
  body > :not(.print-board-document) { display:none !important; }
  .print-board-document {
    display:block;
    margin:0;
    color:#10281d;
    background:white;
    font-family:Arial,sans-serif;
  }
  .print-board-document header { display:block; height:auto; margin:0 0 14px; padding:0; border:0; }
  .print-board-document h1 { margin:0 0 4px; font-size:22px; }
  .print-board-document p { margin:0; color:#52635a; font-size:11px; }
  .print-board-document table { width:100%; border-collapse:collapse; table-layout:fixed; font-size:8px; }
  .print-board-document th,
  .print-board-document td { padding:6px 3px; border:1px solid #bcc8c0; text-align:center; overflow-wrap:anywhere; }
  .print-board-document thead th { background:#14583f !important; color:white !important; print-color-adjust:exact; -webkit-print-color-adjust:exact; }
  .print-board-document thead th:first-child,
  .print-board-document tbody th { width:105px; text-align:left; }
  .print-board-document tbody th { background:#eef3ef !important; print-color-adjust:exact; -webkit-print-color-adjust:exact; }
  .print-board-document tbody tr:nth-child(even) td { background:#f8faf8 !important; print-color-adjust:exact; -webkit-print-color-adjust:exact; }
}
.leader-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border-radius: 12px;
  overflow: hidden;
}
.leader-table th,
.leader-table td {
  text-align: left;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.current-leaderboard {
  width: max-content;
  max-width: 100%;
  padding: 18px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  overflow-x: auto;
}
.current-leaderboard h2 {
  margin: 0 0 12px;
}
.current-leaderboard .leader-table {
  width: auto;
  min-width: 520px;
}
.admin {
  padding: 48px 6vw;
  border-top: 1px solid var(--line);
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}
.review-panel {
  margin-bottom: 18px;
}
.review-panel > div:first-child h3,
.review-panel > div:first-child p {
  margin: 0 0 5px;
}
.review-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.review-item.highlight {
  margin: 0 -12px;
  padding: 14px 12px;
  border-left: 4px solid var(--gold);
  background: #fff6dc;
}
.review-item > div:first-child {
  display: grid;
  gap: 3px;
}
.review-item span,
.review-item small {
  color: var(--muted);
  font-size: 12px;
}
.review-item > div:last-child {
  display: flex;
  gap: 6px;
}
.import-panel {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 130px 190px 210px;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}
.import-panel h3,
.import-panel p,
.import-panel label {
  margin: 0;
}
.upload {
  cursor: pointer;
  color: var(--green);
}
.upload input {
  font-size: 12px;
}
.admin .panel input,
.admin .panel select {
  margin: 6px 0;
}
.admin .panel label {
  margin: 6px 0;
}
.check {
  display: flex;
  align-items: center;
}
.check input {
  width: auto;
}
.admin .panel button {
  width: 100%;
  margin-top: 8px;
}
@media (max-width: 760px), (max-height: 500px) and (hover: none) and (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    font-size: 16px;
  }
  .board-heading,
  .detail-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .board-heading .meta,
  .detail-title .meta {
    margin-top: 0;
  }
  .auth-shell {
    grid-template-columns: 1fr;
    padding: 30px 20px;
  }
  header {
    padding: 0 14px;
  }
  header #nav span {
    display: none;
  }
  .auth-shell h1 {
    font-size: 52px;
  }
  .ticket {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .ticket.editable-ticket {
    position: static;
    margin-bottom: 12px;
  }
  .import-panel {
    grid-template-columns: 1fr;
  }
  .game {
    grid-template-columns: 1fr 70px 1fr;
    gap: 2px;
  }
  .team {
    padding: 14px 7px;
    font-size: 12px;
  }
  .team input {
    top: 10px;
    left: 10px;
    width: 18px;
    height: 18px;
  }
  .team-logo {
    width: 43px;
    height: 43px;
  }
  .versus {
    display: grid;
    padding: 8px 0;
  }
  .hero,
  .community-board,
  #week-detail,
  .week-grid,
  .admin {
    padding-left: 20px;
    padding-right: 20px;
  }
  .history-card {
    grid-template-columns: 1fr 80px 95px;
    padding: 16px;
    gap: 8px;
  }
  .review-item {
    grid-template-columns: 1fr;
  }
  .notification-item {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  #dashboard {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }
  .picks-board {
    overflow: visible;
    border: 0;
    background: transparent;
  }
  .mobile-board-view-switch {
    display: inline-flex;
    gap: 3px;
    margin: 4px 0 12px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--paper);
  }
  .board-tools {
    position: sticky;
    top: calc(72px + env(safe-area-inset-top));
    z-index: 4;
    align-items: center;
    margin: 0 -4px 10px;
    padding: 8px 4px;
    background: rgba(244, 240, 230, 0.96);
    backdrop-filter: blur(8px);
  }
  .board-tools > .meta {
    display: none;
  }
  .board-actions {
    width: 100%;
    justify-content: space-between;
  }
  .board-tools .mobile-board-view-switch {
    margin: 0;
  }
  .mobile-board-view-switch button {
    padding: 7px 10px;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
  }
  .mobile-board-view-switch button.active {
    background: var(--green);
    color: white;
  }
  .current-leaderboard {
    min-width: 0;
    width: 100%;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
    padding: 14px;
    overflow-x: hidden;
  }
  .current-leaderboard .leader-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 12px;
  }
  .current-leaderboard .leader-table th,
  .current-leaderboard .leader-table td {
    padding: 10px 7px;
    overflow-wrap: anywhere;
  }
  .current-leaderboard .leader-table th:first-child,
  .current-leaderboard .leader-table td:first-child {
    width: 36%;
  }
  .current-leaderboard .leader-table th:not(:first-child),
  .current-leaderboard .leader-table td:not(:first-child) {
    text-align: right;
  }
  .picks-table {
    display: none;
  }
  .picks-board.mobile-full-board {
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
  }
  .picks-board.mobile-full-board .picks-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .picks-board.mobile-full-board .picks-table {
    display: table;
  }
  .picks-board.mobile-full-board .mobile-picks {
    display: none;
  }
  .mobile-picks {
    display: flex;
    gap: 13px;
    width: calc(100vw - 20px);
    margin-left: -10px;
    padding: 2px 10px 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }
  .mobile-picks::-webkit-scrollbar {
    display: none;
  }
  .mobile-pick-card {
    position: relative;
    flex: 0 0 calc(100vw - 48px);
    scroll-snap-align: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
  }
  .mobile-pick-card::before {
    content: attr(data-game-count);
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    color: var(--gold);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
  }
  .mobile-matchup {
    display: grid;
    grid-template-columns: 1fr 110px 1fr;
    align-items: center;
    gap: 4px;
    padding: 16px;
    background: var(--ink);
    color: white;
    text-align: center;
  }
  .mobile-matchup > div {
    display: grid;
    gap: 5px;
  }
  .mobile-matchup img {
    width: 48px;
    height: 48px;
    margin: auto;
    object-fit: contain;
  }
  .mobile-matchup > span {
    display: grid;
    gap: 3px;
  }
  .mobile-matchup small {
    color: #b8c8bf;
    font-size: 9px;
    line-height: 1.3;
  }
  .mobile-pick-card ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .mobile-player-pick {
    min-height: 46px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
  }
  .mobile-player-pick strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .mobile-player-pick img {
    width: 27px;
    height: 27px;
    object-fit: contain;
  }
  .mobile-player-pick.correct {
    background: #dcefdc;
    color: #175b2e;
  }
  .mobile-player-pick.incorrect {
    background: #f7dddd;
    color: #8a2020;
  }
  .mobile-player-pick.tied {
    background: #dceef8;
    color: #185a7a;
  }
  .mobile-swipe-hint {
    margin: 0;
    padding: 9px 14px;
    color: var(--muted);
    font-size: 11px;
    text-align: right;
  }
  .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 10;
    height: calc(64px + env(safe-area-inset-bottom));
    padding: 5px 5px env(safe-area-inset-bottom);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    border-top: 1px solid var(--line);
    background: rgba(255, 253, 247, 0.96);
    backdrop-filter: blur(10px);
  }
  .mobile-nav button {
    min-height: 54px;
    padding: 5px 2px;
    display: grid;
    place-items: center;
    gap: 1px;
    background: transparent;
    color: var(--muted);
    font-size: 10px;
  }
  .mobile-nav button svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .mobile-nav button.active {
    color: var(--green);
  }
}

@media (orientation: landscape) and (max-height: 500px) and (hover: none) and (pointer: coarse) {
  header {
    height: calc(54px + env(safe-area-inset-top));
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
  .brand { font-size: 18px; }
  .brand-icon { width: 28px; height: 28px; }
  .menu-toggle { width: 38px; height: 38px; }
  .drawer {
    width: min(310px, 68vw);
    padding-top: calc(18px + env(safe-area-inset-top));
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }
  .drawer-brand { padding-bottom: 14px; }
  .drawer-nav { gap: 3px; padding-top: 12px; }
  .drawer-nav button { padding: 10px 14px; }
  .drawer-footer { padding-top: 12px; }
  .hero {
    padding: 20px max(24px, env(safe-area-inset-right)) 18px max(24px, env(safe-area-inset-left));
  }
  .hero h1 { font-size: 38px; }
  .hero .eyebrow { margin: 0; font-size: 10px; }
  .hero p:last-child { margin: 6px 0 0; font-size: 14px; }
  .page-heading {
    padding: 22px max(24px, env(safe-area-inset-right)) 12px max(24px, env(safe-area-inset-left));
  }
  .page-heading h1 { font-size: 38px; }
  .group-bar {
    padding: 10px max(24px, env(safe-area-inset-right)) 10px max(24px, env(safe-area-inset-left));
  }
  .community-board,
  #week-detail,
  .week-grid,
  .admin {
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }
  #dashboard { padding-bottom: calc(54px + env(safe-area-inset-bottom)); }
  .board-tools { top: calc(54px + env(safe-area-inset-top)); }
  .mobile-picks {
    width: calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right));
    margin-left: 0;
    padding-left: 0;
    padding-right: max(36px, env(safe-area-inset-right));
  }
  .mobile-pick-card { flex-basis: min(72vw, 560px); }
  .mobile-matchup { padding: 10px 16px; }
  .mobile-matchup img { width: 38px; height: 38px; }
  .mobile-player-pick { min-height: 40px; padding: 7px 14px; }
  .mobile-player-pick img { width: 24px; height: 24px; }
  .mobile-nav {
    height: calc(50px + env(safe-area-inset-bottom));
    padding-left: max(5px, env(safe-area-inset-left));
    padding-right: max(5px, env(safe-area-inset-right));
    padding-top: 3px;
  }
  .mobile-nav button {
    min-height: 42px;
    grid-template-columns: 20px auto;
    justify-content: center;
    gap: 5px;
    font-size: 10px;
  }
  .mobile-nav button svg { width: 18px; height: 18px; }
}
