:root {
  color-scheme: light;
  --bg: #f4f1ec;
  --card: rgba(255, 255, 255, 0.9);
  --ink: #171717;
  --muted: #6b625c;
  --line: #e9e1d8;
  --accent: #db0007;
  --accent-dark: #9c1118;
  --gold: #f2c94c;
  --shadow: 0 18px 50px rgba(60, 45, 34, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(219, 0, 7, 0.16), transparent 30rem),
    linear-gradient(180deg, #fffaf4 0%, var(--bg) 42%, #efe7dc 100%);
  color: var(--ink);
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.app-shell {
  width: min(100%, 440px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(env(safe-area-inset-top), 18px) 14px 28px;
}

.hero {
  padding: 18px 6px 10px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 2.25rem;
  line-height: 1;
  letter-spacing: 0;
}

.subtitle {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 8px 0 14px;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.field select {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  padding: 13px 12px;
  box-shadow: 0 8px 28px rgba(60, 45, 34, 0.07);
  outline: none;
}

.field option:disabled {
  color: #a9a09a;
}

.date-card {
  position: sticky;
  top: 8px;
  z-index: 10;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  margin: 10px 0 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.date-step,
.date-pill {
  border: 0;
  color: var(--ink);
}

.date-step {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #f0eeeb;
  font-size: 1.7rem;
  line-height: 1;
}

.date-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  font-weight: 900;
}

.date-pill::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.club-summary,
.match-card,
.empty-state,
.sources {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 12px 36px rgba(60, 45, 34, 0.08);
}

.club-summary {
  padding: 16px;
  margin-top: 12px;
}

.calendar-panel {
  margin: 0 0 14px;
  padding: 14px 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.calendar-head {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  margin-bottom: 14px;
  text-align: center;
}

.calendar-head strong {
  font-size: 1rem;
}

.calendar-nav,
.calendar-day {
  border: 0;
  color: var(--ink);
}

.calendar-nav {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #efefed;
  font-size: 1.35rem;
  line-height: 1;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
}

.calendar-weekdays {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.calendar-grid {
  row-gap: 4px;
}

.calendar-day {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: 0 auto;
  border-radius: 999px;
  background: transparent;
  font-size: 0.92rem;
  font-weight: 800;
}

.calendar-day.is-outside,
.calendar-day.is-disabled {
  color: #aaa5a0;
}

.calendar-day.is-available:not(.is-selected) {
  color: var(--ink);
}

.calendar-day.is-selected {
  background: #e8e3de;
  color: var(--ink);
}

.summary-kicker,
.club-summary h2,
.club-summary p {
  margin: 0;
}

.summary-kicker {
  color: var(--accent-dark);
  font-size: 0.77rem;
  font-weight: 900;
}

.club-summary h2 {
  margin-top: 6px;
  font-size: 0.96rem;
  line-height: 1.25;
}

.club-summary p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.88rem;
}

.mini-roster {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.mini-roster::-webkit-scrollbar {
  display: none;
}

.mini-roster span {
  flex: 0 0 auto;
  border: 1px solid #f0e2d4;
  border-radius: 999px;
  background: #fff7ef;
  padding: 7px 9px;
  font-size: 0.75rem;
  font-weight: 800;
}

.match-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.match-card {
  overflow: hidden;
}

.match-link {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 15px;
}

.match-topline,
.venue-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.match-time {
  color: var(--muted);
}

.time-value {
  color: var(--accent-dark);
  font-weight: 950;
}

.time-meta,
.time-sep {
  color: var(--muted);
  font-weight: 800;
}

.score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 14px 0;
}

.team {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 0.98rem;
  font-weight: 900;
}

.team.away {
  justify-content: flex-end;
  text-align: right;
}

.team span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flag {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #f2f2f2;
  font-size: 1rem;
}

.score-box {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 999px;
  background: #171717;
  color: white;
  font-size: 0.82rem;
  font-weight: 900;
}

.player-strip {
  display: grid;
  gap: 7px;
}

.player-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(219, 0, 7, 0.1), rgba(242, 201, 76, 0.15));
  padding: 9px 10px;
}

.player-chip b {
  font-size: 0.84rem;
}

.player-chip small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.venue-row {
  display: block;
  margin-top: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty-state {
  padding: 28px 20px;
  color: var(--muted);
  text-align: center;
  line-height: 1.55;
}

.sources {
  margin-top: 14px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 10px 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 350px) {
  .filters {
    grid-template-columns: 1fr;
  }

  .score-row {
    grid-template-columns: 1fr 44px 1fr;
  }

  .player-chip {
    align-items: flex-start;
    flex-direction: column;
  }
}
