:root {
  --navy: #0a1f44;
  --red: #b22234;
  --blue: #3c3b6e;
  --white: #ffffff;
  --cream: #f7f4ec;
  --ink: #12203f;
  --line: rgba(255, 255, 255, 0.18);
  --bocce: #2e8b57;   /* game chips */
  --badminton: #d98324;
  --bags: #b22234;
  --ladder: #3c3b6e;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--white);
  background:
    repeating-linear-gradient(180deg, transparent 0 48px, rgba(255,255,255,0.02) 48px 96px),
    var(--navy);
  min-height: 100vh;
}

/* Header */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px;
  background: linear-gradient(90deg, var(--red), var(--blue));
  border-bottom: 3px solid var(--white);
}
.header-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.header-badge { flex: none; display: inline-flex; background: var(--white);
  border-radius: 12px; padding: 6px 10px; box-shadow: var(--shadow); }
.header-logo { height: 34px; width: auto; display: block; }
.site-header h1 { margin: 0; font-size: 1.15rem; line-height: 1.1; }
.subtitle { margin: 2px 0 0; font-size: 0.8rem; opacity: 0.9; }
.donate-btn {
  display: inline-block; background: var(--white); color: var(--red);
  font-weight: 800; text-decoration: none; padding: 10px 16px;
  border-radius: 18px; box-shadow: var(--shadow); text-align: center;
  border: 2px solid var(--red); font-size: 0.85rem; line-height: 1.15;
}
.donate-btn.big { font-size: 1.05rem; padding: 14px 22px; margin-top: 12px; }

/* Tabs */
.tabs { display: flex; gap: 0; position: sticky; top: 0; z-index: 5;
  background: var(--ink); border-bottom: 2px solid var(--white); }
.tab {
  flex: 1; padding: 14px 8px; font-size: 1rem; font-weight: 700;
  background: transparent; color: var(--white); border: 0; cursor: pointer;
  opacity: 0.6;
}
body[data-view="mine"] #tab-mine,
body[data-view="full"] #tab-full { opacity: 1; box-shadow: inset 0 -4px 0 var(--red); }

/* View switching */
.view { display: none; padding: 16px; max-width: 1400px; margin: 0 auto; }
body[data-view="mine"] #view-mine { display: block; }
body[data-view="full"] #view-full { display: block; }

/* Picker */
.picker-label { display: block; font-weight: 700; margin-bottom: 6px; }
#name-search {
  width: 100%; padding: 14px; font-size: 1.05rem; border-radius: 10px;
  border: 2px solid var(--blue); background: var(--white); color: var(--ink);
}
.no-matches { grid-column: 1 / -1; opacity: 0.8; padding: 8px 2px; margin: 0; }
.name-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.name-list button {
  text-align: left; padding: 12px; border-radius: 8px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.06); color: var(--white); font-size: 0.95rem; cursor: pointer;
}
.name-list button:hover { background: rgba(255,255,255,0.16); }

/* Itinerary cards */
.mine-empty { text-align: center; padding: 24px 8px; }
.mine-head { display: flex; align-items: baseline; gap: 12px; margin: 4px 0 14px; }
.mine-head h2 { margin: 0; }
.link-btn { background: none; border: 0; color: var(--white); text-decoration: underline;
  cursor: pointer; font-size: 0.9rem; opacity: 0.85; }
.itinerary { display: grid; gap: 12px; }
.game-card {
  background: var(--white); color: var(--ink); border-radius: 12px; padding: 14px;
  box-shadow: var(--shadow); border-left: 8px solid var(--chip, var(--navy));
}
.game-card .round { font-size: 0.8rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.04em; opacity: 0.7; }
.game-card .game { font-size: 1.2rem; font-weight: 800; margin: 2px 0 8px; }
.game-card .partner { font-weight: 700; }
.game-card .vs { opacity: 0.75; }

/* Full schedule (mobile stacked) */
.tv-controls { display: none; }
.full-rounds { display: grid; gap: 18px; }
.round-block { background: rgba(255,255,255,0.05); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; }
.round-block h3 { margin: 0 0 10px; font-size: 1.05rem;
  border-bottom: 2px solid var(--red); padding-bottom: 6px; }
.match { padding: 8px 0; border-top: 1px dashed var(--line); }
.match:first-of-type { border-top: 0; }
.match .game-name { font-weight: 800; margin-bottom: 5px; }
.chip { display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle; background: var(--chip, var(--navy)); }
.match .teams { font-size: 0.95rem; opacity: 0.95; }
.match .teams .team { display: block; }
.match .teams .team-b { margin-top: 2px; }
.match .teams .mid { opacity: 0.6; margin-right: 4px; }

/* Instagram hashtag callout */
.site-footer { display: flex; justify-content: center; padding: 20px 16px 28px; }
.ig-tag {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line);
  color: var(--white); padding: 10px 16px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600; text-align: center;
}
.ig-tag:hover { background: rgba(255, 255, 255, 0.16); }
.ig-tag .ig-cam { font-size: 1.05rem; }
.ig-tag .hashtag { color: #ff9fb0; font-weight: 800; }

/* Desktop / TV: paged rounds, 16:9 friendly grid */
@media (min-width: 900px) {
  .tv-controls { display: flex; align-items: center; justify-content: center; gap: 18px;
    padding: 8px 0 14px; }
  .tv-btn { font-size: 1.6rem; width: 48px; height: 48px; border-radius: 50%;
    border: 2px solid var(--white); background: var(--red); color: var(--white); cursor: pointer; }
  .tv-pageinfo { font-size: 1.1rem; font-weight: 700; min-width: 160px; text-align: center; }
  .full-rounds { grid-template-columns: repeat(4, 1fr); gap: 14px; align-content: start; }
  .round-block { padding: 14px; }
  .round-block h3 { font-size: 1.2rem; }
  .match .teams { font-size: 1rem; }
  .site-header h1 { font-size: 1.6rem; }
  .header-logo { height: 46px; }
}
