/* The Stadium Circuit — clean, mobile-first styles.
   System font stack, light theme, team-color accents per page. */

:root {
  --ink: #1a1a1a;
  --muted: #5c5c5c;
  --line: #e3e0d8;
  --bg: #faf8f3;
  --card: #ffffff;
  --navy: #14213d;
  --accent: #b3202c; /* default; overridden per team via --team */
  --team: #b3202c;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.site-header {
  background: var(--navy);
  color: #fff;
  padding: 18px 20px 14px;
}
.site-header .brand {
  color: #fff;
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.site-header .tagline {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: #c9cfdb;
}

main { max-width: 860px; margin: 0 auto; padding: 18px 16px 40px; }

/* ---------- Home ---------- */
.search-wrap { margin: 6px 0 18px; }
.search-wrap input {
  width: 100%;
  padding: 13px 16px;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.search-wrap input:focus { outline: 2px solid var(--navy); border-color: var(--navy); }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.team-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  text-decoration: none;
  color: var(--ink);
}
.team-card:hover { border-color: var(--navy); }
.team-badge {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.3px;
}
.team-card .t-name { font-weight: 600; font-size: 0.92rem; line-height: 1.25; }
.team-card .t-sub { font-size: 0.78rem; color: var(--muted); }
.team-card .t-level {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--navy);
  margin-top: 2px;
}

/* level picker (home) */
.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.level-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  color: var(--ink);
}
.level-card:hover { border-color: var(--navy); }
.level-badge {
  display: inline-block;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.level-name { display: block; font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; }
.level-desc { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.level-count { display: block; font-size: 0.78rem; font-weight: 600; color: var(--navy); }
.level-head h1 { margin: 8px 0 2px; }
.level-head p { color: var(--muted); margin: 0 0 4px; }
.search-grid { margin-top: 14px; }

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 26px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--team);
}

/* ---------- Stadium page ---------- */
.stadium-hero { position: relative; border-radius: var(--radius); overflow: hidden; background: #ddd; }
.stadium-hero img { width: 100%; height: 220px; object-fit: cover; display: block; }
.stadium-hero .credit {
  position: absolute; right: 8px; bottom: 6px;
  font-size: 0.68rem; color: #fff; background: rgba(0,0,0,0.55);
  padding: 2px 8px; border-radius: 20px;
}
.stadium-head { padding: 14px 2px 4px; }
.stadium-head h1 { margin: 0; font-size: 1.6rem; }
.stadium-head .where { color: var(--muted); margin: 2px 0 6px; }
.stadium-head .tagline { font-style: italic; color: var(--muted); margin: 0; }

.back-link { display: inline-block; margin-bottom: 12px; color: var(--navy); text-decoration: none; font-size: 0.9rem; }
.back-link:hover { text-decoration: underline; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 12px 0;
}
.card h3 { margin: 0 0 8px; font-size: 1rem; }
.card p { margin: 6px 0; }
.place { padding: 10px 0; border-top: 1px solid var(--line); }
.place:first-of-type { border-top: none; padding-top: 2px; }
.place .p-name { font-weight: 700; }
.place .p-meta { font-size: 0.82rem; color: var(--muted); }
.place .p-note { margin: 4px 0 0; font-size: 0.94rem; }
.price { font-weight: 700; color: var(--team); }

.kv { display: grid; grid-template-columns: 86px 1fr; gap: 4px 10px; font-size: 0.94rem; }
.kv dt { font-weight: 700; color: var(--muted); }
.kv dd { margin: 0; }

.highlights { margin: 6px 0; padding-left: 20px; }
.highlights li { margin: 6px 0; }

.poi-photo { width: 100%; border-radius: 8px; margin: 8px 0 2px; }

.game-list { list-style: none; margin: 6px 0; padding: 0; }
.game-list li {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-top: 1px solid var(--line); font-size: 0.94rem;
}
.game-list li:first-child { border-top: none; }
.game-list .g-opp { font-weight: 600; }
.game-list .g-when { color: var(--muted); font-size: 0.85rem; text-align: right; }

.loading, .error, .empty {
  padding: 18px; text-align: center; color: var(--muted);
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
}

.suggest {
  margin-top: 26px; padding: 16px;
  background: #f0ede4; border-radius: var(--radius); font-size: 0.92rem;
}
.suggest a { color: var(--navy); font-weight: 600; }

.site-footer {
  text-align: center; color: var(--muted); font-size: 0.8rem;
  padding: 22px 16px 34px; border-top: 1px solid var(--line);
}
.site-footer .fine { font-size: 0.72rem; }

@media (min-width: 700px) {
  .stadium-hero img { height: 320px; }
  .team-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
