:root {
  --ink: #16241a;
  --muted: #6b7a6f;
  --card: #ffffff;
  --line: #e6eae3;
  --frc: #2563eb;
  --nfl: #7c3aed;
  --acc: #f5731a;
  --acc-2: #ff8a1e;
  --page: #eef1ec;
  --shadow: 0 8px 26px rgba(20, 36, 22, 0.12);
  --shadow-lift: 0 22px 60px rgba(20, 36, 22, 0.24);
  --field-shadow: 0 26px 70px rgba(20, 40, 18, 0.30);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; min-height: 100%;
  color: var(--ink);
  background: var(--page);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; }
img { display: block; }

#app { min-height: 100vh; display: flex; flex-direction: column; }

/* topbar (on the white page, above the field) */
.topbar { width: 100%; max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 24px 28px 14px; }
.logo { background: none; display: inline-flex; align-items: baseline; gap: 9px; font-family: 'Sora', sans-serif; font-weight: 800; font-size: 24px; letter-spacing: -.5px; }
.logo .lg-a { color: var(--ink); }
.logo .lg-b { color: var(--acc); }
.pill-btn { background: var(--ink); color: #fff; border-radius: 999px; padding: 11px 20px; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; transition: transform .08s ease, opacity .15s ease; }
.pill-btn:hover { transform: translateY(-1px); opacity: .9; }

/* the football field — a contained panel with white margins around it */
.field {
  position: relative; width: 100%; max-width: 1200px;
  margin: 12px auto 40px; border-radius: 30px; overflow: hidden;
  height: min(82vh, 760px); padding: 40px 42px 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: var(--field-shadow);
}
.field-art { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; z-index: 0; }
.field-art svg { width: 100%; height: 100%; display: block; }
.field-art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(112% 80% at 50% 42%, rgba(255,255,255,.10), rgba(16,30,14,.20) 90%); }
/* content scrolls inside the fixed panel so the field never stretches or clips */
.field-content { position: relative; z-index: 1; width: 100%; max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; align-items: center; }
.field-content::-webkit-scrollbar { width: 0; height: 0; }
.field-content { scrollbar-width: none; }

/* search hero */
.hero { width: 100%; max-width: 940px; text-align: center; }
.type-wrap {
  position: relative; width: 100%; --caret-x: 50%;
  font-size: clamp(42px, 9vw, 104px);
}
.big-input {
  width: 100%; border: none; outline: none; background: transparent;
  text-align: center; font-family: 'Sora', sans-serif; font-weight: 800;
  font-size: inherit; letter-spacing: -2px; line-height: 1.14;
  color: #ffffff; caret-color: transparent; text-transform: uppercase; padding: 0 6px;
  text-shadow: 0 2px 18px rgba(16,30,14,.25);
}
.type-caret {
  position: absolute; left: var(--caret-x); top: 50%; width: 5px; height: 1em;
  transform: translateY(-50%); border-radius: 999px; background: var(--frc);
  box-shadow: 0 0 18px rgba(37,99,235,.65); pointer-events: none;
  animation: caret-blink 1s steps(1) infinite;
}
.type-measure {
  position: absolute; visibility: hidden; white-space: pre;
  font-family: 'Sora', sans-serif; font-weight: 800;
  font-size: inherit; letter-spacing: -2px; line-height: 1.14;
  text-transform: uppercase; pointer-events: none;
}
@keyframes caret-blink { 50% { opacity: 0; } }
.big-input::placeholder { color: rgba(255,255,255,.4); text-transform: none; }
.hint { margin-top: 22px; font-size: 13px; font-weight: 700; letter-spacing: 2px; color: rgba(255,255,255,.82); text-transform: uppercase; }
.hint kbd { background: rgba(255,255,255,.22); border-radius: 5px; padding: 1px 7px; font-family: inherit; }
.chips { margin-top: 18px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.chip { background: rgba(255,255,255,.92); color: #1d3017; font-weight: 700; font-size: 14px; padding: 9px 18px; border-radius: 999px; box-shadow: var(--shadow); transition: transform .08s ease; }
.chip:hover { transform: translateY(-1px); background: #fff; }

/* results dropdown */
.results { margin: 28px auto 0; display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 760px; }
.res-row { display: flex; align-items: center; gap: 14px; background: #fff; border: 2px solid transparent; border-radius: 15px; padding: 15px 20px; box-shadow: var(--shadow); cursor: pointer; text-align: left; width: 100%; transition: transform .06s ease, border-color .1s ease; }
.res-row:hover, .res-row.sel { border-color: var(--acc); transform: translateY(-1px); }
.res-bar { width: 5px; align-self: stretch; border-radius: 4px; background: var(--c, #2563eb); flex-shrink: 0; }
.res-kind { font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: #fff; background: var(--c, #2563eb); border-radius: 6px; padding: 3px 8px; flex-shrink: 0; }
.res-label { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 18px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-meta { color: var(--muted); font-size: 13px; font-weight: 600; flex-shrink: 0; }
.res-arrow { color: #bcc6b6; font-size: 20px; flex-shrink: 0; transition: color .1s ease, transform .1s ease; }
.res-row:hover .res-arrow, .res-row.sel .res-arrow { color: var(--acc); transform: translateX(3px); }
.res-row .photo-box { width: 42px; height: 42px; }
.no-res { text-align: center; color: rgba(255,255,255,.85); font-weight: 700; margin-top: 26px; }

/* match card */
.mc-wrap { width: 100%; max-width: 1020px; display: flex; flex-direction: column; align-items: center; }
.matchcard {
  width: 100%; display: grid; grid-template-columns: 1fr 84px 1fr; align-items: center;
  background: linear-gradient(100deg, #eef3ff 0%, #ffffff 42% 58%, #f4eeff 100%);
  border-radius: 26px; box-shadow: var(--shadow-lift); padding: 38px 36px; gap: 8px;
}
.mc-side { min-width: 0; }
.mc-side.nfl { text-align: right; }
.mc-num { font-family: 'Sora', sans-serif; font-weight: 800; font-size: clamp(44px, 7vw, 86px); letter-spacing: -2px; line-height: .95; }
.mc-side.frc .mc-num { color: var(--frc); }
.mc-side.nfl .mc-num { color: var(--nfl); }
.mc-id { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.mc-side.nfl .mc-id { flex-direction: row-reverse; }
.mc-name { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 23px; letter-spacing: -.4px; line-height: 1.1; }
.mc-sub { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 10px; }
.mc-stats { font-size: 14.5px; font-weight: 700; color: var(--ink); margin-top: 7px; }
.mc-pill { display: inline-block; margin-top: 12px; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 5px 13px; }
.mc-side.frc .mc-pill { background: rgba(37,99,235,.12); color: var(--frc); }
.mc-side.nfl .mc-pill { background: rgba(124,58,237,.12); color: var(--nfl); }
.mc-eq { display: flex; align-items: center; justify-content: center; }
.mc-eq span { width: 58px; height: 58px; border-radius: 50%; background: linear-gradient(135deg, var(--acc-2), var(--acc)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; box-shadow: 0 12px 26px rgba(245,115,26,.45); }

.logo-box, .photo-box, .team-season-box { position: relative; flex-shrink: 0; overflow: hidden; background: var(--c, #2563eb); }
.logo-box { width: 56px; height: 56px; border-radius: 13px; }
.photo-box { width: 60px; height: 60px; border-radius: 50%; }
.team-season-box { width: 60px; height: 60px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #fff; font-family: 'Sora', sans-serif; font-weight: 800; font-size: 18px; }
.logo-box img, .photo-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.team-season-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px; background: #fff; }
.logo-box .fb, .photo-box .fb { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-family: 'Sora', sans-serif; font-weight: 800; font-size: 18px; }

/* centered stats */
.factors { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }
.fchip { background: #fff; border-radius: 13px; padding: 10px 14px; box-shadow: var(--shadow); min-width: 104px; }
.fchip .fk { font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); text-align: center; }
.fchip .fb-track { background: #e8ecdf; border-radius: 999px; height: 7px; margin-top: 7px; overflow: hidden; }
.fchip .fb-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--frc), var(--nfl)); }
.alts-line { margin-top: 18px; text-align: center; color: rgba(255,255,255,.92); font-weight: 700; font-size: 13.5px; }
.alts-line button { background: rgba(255,255,255,.92); border-radius: 999px; padding: 5px 12px; font-weight: 800; color: var(--frc); margin: 4px 3px 0; font-size: 13px; box-shadow: var(--shadow); }
.team-comp { margin-top: 14px; background: rgba(255,255,255,.92); color: var(--ink); border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 700; box-shadow: var(--shadow); }
.team-comp button { background: none; color: var(--frc); font: inherit; font-weight: 800; padding: 0; }
.team-comp button:hover { text-decoration: underline; }

/* all-matches list (full-page scroll, not the field panel) */
.page { flex: 1; width: 100%; max-width: 1060px; margin: 6px auto 0; padding: 0 22px; }
.allmatches h2 { font-family: 'Sora', sans-serif; text-align: center; color: var(--ink); font-size: 34px; letter-spacing: -1px; margin: 8px 0 4px; }
.allmatches .bsub { text-align: center; color: var(--muted); font-weight: 600; margin: 0 0 22px; }
.browse-toggle { display: flex; justify-content: center; gap: 8px; margin: 12px 0 10px; }
.browse-toggle button { border-radius: 999px; padding: 8px 16px; background: #fff; color: var(--muted); font-weight: 800; box-shadow: var(--shadow); }
.browse-toggle button.on { background: var(--ink); color: #fff; }
.am-list { display: flex; flex-direction: column; gap: 11px; }
.year-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 11px; }
.year-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 2px solid transparent; border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); color: var(--muted); font-weight: 700; transition: transform .06s ease, border-color .1s ease; }
.year-row:hover { transform: translateY(-1px); border-color: var(--acc); }
.year-row .yr { font-family: 'Sora', sans-serif; color: var(--frc); font-size: 20px; font-weight: 800; }
.match-row { display: grid; grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr); align-items: center; gap: 14px; min-height: 78px; background: #fff; border: 2px solid transparent; border-radius: 16px; padding: 12px 22px; box-shadow: var(--shadow); cursor: pointer; width: 100%; text-align: left; transition: transform .06s ease, border-color .1s ease; }
.match-row:hover { transform: translateY(-1px); border-color: var(--acc); }
.match-row .logo-box, .match-row .photo-box, .match-row .team-season-box { width: 48px; height: 48px; }
.match-row .logo-box img { object-fit: contain; padding: 3px; }
.mr-team { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 14px; min-width: 0; }
.mr-ttext { min-width: 0; }
.mr-top { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.mr-num { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 21px; letter-spacing: -.5px; flex-shrink: 0; }
.mr-name { font-weight: 800; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-city { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.mr-eq { text-align: center; color: #c9d2c2; font-weight: 800; font-size: 18px; }
.mr-player { display: grid; grid-template-columns: minmax(0, 1fr) 54px; align-items: center; gap: 14px; min-width: 0; }
.mr-ptext { min-width: 0; text-align: right; }
.mr-pname { font-weight: 800; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-pmeta { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-top: 2px; }
@media (max-width: 620px) { .mr-city, .mr-pmeta { display: none; } .match-row { grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr); gap: 8px; min-height: 70px; padding: 11px 14px; } .mr-team, .mr-player { gap: 8px; } }

.notice { background: #fff4e0; border: 1px solid #f3cf8f; color: #8a5a12; padding: 12px 16px; border-radius: 12px; margin: 0 auto 18px; font-size: 14px; max-width: 620px; text-align: center; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 4px 20px 34px; line-height: 1.6; max-width: 900px; margin: 0 auto; }
.foot a { color: var(--frc); font-weight: 700; }

@media (max-width: 760px) {
  .topbar { padding: 16px 16px 10px; }
  .field { margin: 0 12px 24px; padding: 36px 18px 44px; min-height: 70vh; width: auto; border-radius: 24px; }
  .matchcard { grid-template-columns: 1fr; gap: 18px; padding: 26px 20px; text-align: center; }
  .mc-side.nfl { text-align: center; }
  .mc-id, .mc-side.nfl .mc-id { flex-direction: row; justify-content: center; }
  .mc-eq span { transform: rotate(90deg); }
}
