/* NFL game screen (opens when you tap an NFL game). Everything is scoped under .gd. */
.gd {
  --card2: color-mix(in srgb, var(--text) 6%, var(--card));
  --gold: #f5b942;
  position: fixed; inset: 0; z-index: 50; background: var(--bg); color: var(--text);
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}
body.gd-open { overflow: hidden; }
.gd button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.gd-nav {
  position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 8px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px);
}
.gd-back { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); }
.gd-back:active { background: var(--card); }
.gd-title { flex: 1; font-weight: 700; font-size: 14px; color: var(--muted); }
.gd-live { font-size: 11px; font-weight: 800; color: var(--live); letter-spacing: .05em; display: inline-flex; gap: 5px; align-items: center; }
.gd-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: pulse 1.4s infinite; }

.gd-hero { padding: 4px 16px 14px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; }
.gd-tm { display: grid; justify-items: center; gap: 5px; min-width: 0; }
.gd-logo { width: 54px; height: 54px; object-fit: contain; }
.gd-logo-fb { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 15px; color: #fff; }
.gd-tm .nm { font-weight: 700; font-size: 14px; }
.gd-tm .rec { font-size: 12px; color: var(--muted); }
.gd-poss { color: var(--gold); font-size: 10px; vertical-align: 2px; }
.gd-mid { display: grid; gap: 4px; justify-items: center; }
.gd-big { font-size: 38px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -1px; display: flex; gap: 14px; }
.gd-big .dim { color: var(--muted); }
.gd-st { font-size: 12px; font-weight: 700; color: var(--muted); }
.gd-st.live { color: var(--live); }
.gd-kick { font-size: 20px; font-weight: 800; }

.gd-tabs {
  position: sticky; top: calc(58px + env(safe-area-inset-top)); z-index: 2; display: flex; gap: 4px; padding: 0 12px 8px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.gd-tabs button { flex: 1; padding: 8px 4px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.gd-tabs button[aria-selected="true"] { background: var(--card); color: var(--text); }
.gd-body { max-width: 640px; margin: 0 auto; }

.gd-sec { margin: 12px 12px 0; background: var(--card); border-radius: 16px; padding: 12px 14px; }
.gd-sec h3 { margin: 0 0 10px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.gd-sec h3 em { font-style: normal; color: var(--accent); letter-spacing: .02em; text-transform: none; font-weight: 700; }
.gd-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 6px 0; }
.gd-row + .gd-row { border-top: 1px solid var(--line); }
.gd-row .k { color: var(--muted); min-width: 0; }
.gd-row .v { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.gd-empty { color: var(--muted); font-size: 13px; padding: 4px 0; }
.gd-msg { margin: 24px 16px; color: var(--muted); text-align: center; font-size: 14px; }
.gd-msg.err { color: var(--live); }
.gd-skel { margin: 12px; height: 120px; border-radius: 16px; background: var(--card); opacity: .6; animation: pulse 1.4s infinite; }
.gd-note { font-size: 11px; color: var(--muted); margin: 8px 0 0; line-height: 1.4; }

.gd-cmp { display: grid; gap: 10px; }
.gd-cmp .lab { font-size: 11px; color: var(--muted); text-align: center; margin-bottom: 3px; }
.gd-cmp .tag { font-size: 9px; font-weight: 800; color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; padding: 0 3px; margin-left: 4px; vertical-align: 1px; }
.gd-cmp .ln { display: grid; grid-template-columns: 56px 1fr 56px; gap: 8px; align-items: center; font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 700; }
.gd-cmp .ln .h { text-align: right; }
.gd-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; gap: 2px; }
.gd-bar i { display: block; height: 100%; }

.gd-field { position: relative; height: 54px; border-radius: 10px; background: repeating-linear-gradient(90deg, #17402a 0 9.09%, #1a4a30 9.09% 18.18%); overflow: hidden; margin-bottom: 10px; }
.gd-field .ez { position: absolute; top: 0; bottom: 0; width: 9.09%; display: grid; place-items: center; font-size: 10px; font-weight: 900; color: #fff; writing-mode: vertical-rl; transform: rotate(180deg); }
.gd-field .los { position: absolute; top: 0; bottom: 0; width: 2px; background: #60a5fa; }
.gd-field .fd { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--gold); }
.gd-field .drv { position: absolute; top: 22px; height: 10px; border-radius: 5px; opacity: .6; }
.gd-field .ball { position: absolute; top: 20px; width: 16px; height: 14px; border-radius: 50%; background: #8b5a2b; border: 1.5px solid #fff; transform: translateX(-50%); }
.gd-dd { font-size: 17px; font-weight: 800; }
.gd-dd small { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 6px; }
.gd-lastplay { font-size: 13px; line-height: 1.45; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.gd-lastplay b { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; display: block; margin-bottom: 2px; }

.gd-wp svg { width: 100%; height: auto; display: block; }
.gd-wp .legend { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.gd-swing { display: grid; gap: 8px; margin-top: 10px; }
.gd-swing .it { display: grid; grid-template-columns: 84px 1fr; gap: 10px; font-size: 12.5px; line-height: 1.4; }
.gd-swing .d { font-weight: 800; font-variant-numeric: tabular-nums; border-radius: 6px; text-align: center; padding: 3px 0; font-size: 12px; align-self: start; }

.gd-pl { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; width: 100%; text-align: left; }
.gd-pl + .gd-pl { border-top: 1px solid var(--line); }
.gd-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; overflow: hidden; flex: none; background: var(--card2); }
.gd-av img { width: 100%; height: 100%; object-fit: cover; }
.gd-pl .n { font-weight: 700; font-size: 14px; }
.gd-pl .s { font-size: 12px; color: var(--muted); }
.gd-pl .go { color: var(--muted); font-size: 18px; }
.gd-cat { font-size: 11px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin: 10px 0 0; }
.gd-cat:first-child { margin-top: 0; }

.gd-drives { display: grid; gap: 5px; }
.gd-dv { display: grid; grid-template-columns: 52px 1fr 46px; gap: 8px; align-items: center; font-size: 11px; }
.gd-dv .q { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gd-dv .track { position: relative; height: 12px; background: var(--card2); border-radius: 6px; }
.gd-dv .track i { position: absolute; top: 0; bottom: 0; border-radius: 6px; min-width: 4px; }
.gd-dv .r { font-weight: 800; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-td { color: var(--accent); } .r-fg { color: var(--gold); } .r-to { color: var(--live); } .r-x { color: var(--muted); }

.gd-lines { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.gd-lines th { font-size: 11px; color: var(--muted); font-weight: 700; text-align: center; padding: 4px 0; }
.gd-lines td { text-align: center; padding: 6px 0; border-top: 1px solid var(--line); }
.gd-lines td:first-child, .gd-lines th:first-child { text-align: left; font-weight: 700; }
.gd-lines td:last-child { font-weight: 900; }
.gd-form { display: flex; gap: 4px; }
.gd-form span { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.gd-form .w { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.gd-form .l { background: color-mix(in srgb, var(--live) 18%, transparent); color: var(--live); }
.gd-form .t { background: var(--card2); color: var(--muted); }
.gd-ev { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; font-size: 12.5px; padding: 7px 0; align-items: start; line-height: 1.4; }
.gd-ev + .gd-ev { border-top: 1px solid var(--line); }
.gd-ev .sc { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gd-ev .when { color: var(--muted); }
.gd-mini { width: 26px; height: 26px; object-fit: contain; }
.gd-ok { color: var(--accent); font-weight: 700; } .gd-no { color: var(--muted); }
.gd-recap { display: block; font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--text); text-decoration: none; }
.gd-recap small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; margin-top: 4px; }
.gd-pog { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; }
.gd-pog .gd-av { width: 48px; height: 48px; }
.gd-badge { font-size: 10px; font-weight: 800; color: var(--gold); letter-spacing: .06em; text-transform: uppercase; }
.gd-scroll { overflow-x: auto; margin: 0 -14px; padding: 0 14px; }
.gd-box { border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; min-width: 100%; }
.gd-box th { color: var(--muted); font-weight: 700; font-size: 10.5px; padding: 4px 6px; text-align: right; white-space: nowrap; }
.gd-box td { padding: 6px; text-align: right; border-top: 1px solid var(--line); white-space: nowrap; }
.gd-box th:first-child, .gd-box td:first-child { text-align: left; position: sticky; left: 0; background: var(--card); padding-left: 0; }
.gd-box td:first-child button { font-weight: 700; color: var(--text); text-align: left; }

/* player sheet */
.gd-sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 60; }
.gd-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; max-height: 90dvh; overflow-y: auto; z-index: 61;
  background: var(--bg); border-radius: 22px 22px 0 0; border-top: 1px solid var(--line);
  padding: 8px 0 calc(20px + env(safe-area-inset-bottom)); max-width: 640px; margin: 0 auto;
  overscroll-behavior: contain; animation: gd-up .22s ease-out;
}
@keyframes gd-up { from { transform: translateY(40px); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .gd-sheet { animation: none; } }
.gd-grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 8px; }
.gd-ph { display: flex; gap: 12px; align-items: center; padding: 4px 16px 6px; }
.gd-ph .gd-av { width: 58px; height: 58px; font-size: 16px; }
.gd-ph h2 { margin: 0; font-size: 19px; }
.gd-ph p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.gd-close { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; background: var(--card) !important; color: var(--muted) !important; font-size: 20px; flex: none; }
.gd-statline { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.gd-statline div { text-align: center; }
.gd-statline b { display: block; font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; }
.gd-statline span { font-size: 10px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.gd-adv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gd-adv div { background: var(--card2); border-radius: 10px; padding: 8px 10px; }
.gd-adv b { display: block; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.gd-adv span { font-size: 11px; color: var(--muted); }
.gd-adv small { display: block; font-size: 10.5px; color: var(--accent); margin-top: 2px; }
.gd-vs .ln { display: grid; grid-template-columns: 96px 1fr 70px; gap: 8px; align-items: center; font-size: 12px; padding: 4px 0; }
.gd-vs .k { color: var(--muted); }
.gd-vs .track { position: relative; height: 8px; background: var(--card2); border-radius: 4px; }
.gd-vs .track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--accent); }
.gd-vs .track u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); }
.gd-vs .v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.gd-vs .v small { color: var(--muted); font-weight: 500; }
.gd-spark svg { width: 100%; height: auto; display: block; }
