.nrfih-wrap {
    --nrfih-bg: #081321;
    --nrfih-panel: #0e1d31;
    --nrfih-panel-2: #13253d;
    --nrfih-border: #2b405b;
    --nrfih-text: #f7fbff;
    --nrfih-muted: #92a8c2;
    --nrfih-gold: #f6b918;
    --nrfih-orange: #ff7a18;
    --nrfih-red: #ff4d6d;
    --nrfih-blue: #4fa3ff;
    box-sizing: border-box;
    width: 100%;
    margin: 0 auto;
    padding: 18px;
    overflow: hidden;
    border: 1px solid var(--nrfih-border);
    border-radius: 18px;
    background:
        radial-gradient(circle at 14% 0%, rgba(255, 122, 24, 0.13), transparent 31%),
        linear-gradient(180deg, #0b1829 0%, var(--nrfih-bg) 100%);
    color: var(--nrfih-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.nrfih-wrap *,
.nrfih-wrap *::before,
.nrfih-wrap *::after {
    box-sizing: border-box;
}

.nrfih-wrap.is-loading {
    opacity: 0.66;
    pointer-events: none;
}

.nrfih-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.nrfih-title-block {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.nrfih-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border: 1px solid rgba(246, 185, 24, 0.45);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(246, 185, 24, 0.2), rgba(255, 77, 109, 0.13));
    font-size: 24px;
}

.nrfih-title {
    margin: 0 !important;
    color: #fff !important;
    font-size: clamp(1.2rem, 2.2vw, 1.72rem) !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.02em;
}

.nrfih-date-label {
    margin-top: 4px;
    color: var(--nrfih-gold);
    font-size: 0.82rem;
    font-weight: 850;
}

.nrfih-date-area {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
    flex-wrap: wrap;
}

.nrfih-date-control {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    flex-wrap: wrap;
}

.nrfih-date-control label {
    margin: 0;
    color: var(--nrfih-muted);
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.nrfih-date-select {
    min-width: 178px;
    height: 40px;
    margin: 0;
    padding: 0 34px 0 12px;
    border: 1px solid #405a78;
    border-radius: 10px;
    outline: none;
    background: #13253d;
    color: #fff;
    font-size: 0.86rem;
    font-weight: 800;
    color-scheme: dark;
}

.nrfih-date-select:focus {
    border-color: var(--nrfih-gold);
    box-shadow: 0 0 0 3px rgba(246, 185, 24, 0.15);
}

.nrfih-season-total {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 6px 11px 6px 13px;
    border: 1px solid rgba(246, 185, 24, 0.42);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(246, 185, 24, 0.14), rgba(255, 122, 24, 0.08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.nrfih-season-total-label {
    color: #d9e5f3;
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.045em;
}

.nrfih-season-total strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 27px;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(246, 185, 24, 0.16);
    color: #ffd45f;
    font-size: 1.08rem;
    font-weight: 950;
    line-height: 1;
}

.nrfih-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    margin-bottom: 16px;
}

.nrfih-summary-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 78px;
    padding: 13px 16px;
    border: 1px solid var(--nrfih-border);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(19, 37, 61, 0.97), rgba(12, 27, 46, 0.98));
}

.nrfih-summary-card--homers {
    border-left: 4px solid var(--nrfih-orange);
}

.nrfih-summary-card--games {
    border-left: 4px solid var(--nrfih-blue);
}

.nrfih-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    font-size: 21px;
}

.nrfih-summary-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.nrfih-summary-label {
    color: #9cb1ca;
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.055em;
}

.nrfih-summary-copy strong {
    margin-top: 2px;
    color: #fff;
    font-size: 1.75rem;
    font-weight: 950;
    line-height: 1;
}

.nrfih-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.nrfih-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--nrfih-border);
    border-radius: 15px;
    background: linear-gradient(155deg, rgba(18, 37, 61, 0.98), rgba(10, 25, 43, 0.98));
}

.nrfih-card-accent {
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--nrfih-orange), var(--nrfih-red));
}

.nrfih-card--bottom .nrfih-card-accent {
    background: linear-gradient(90deg, var(--nrfih-red), #f59e0b);
}

.nrfih-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 14px 9px;
}

.nrfih-inning-pill,
.nrfih-day-night {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.055em;
}

.nrfih-inning-pill {
    min-width: 76px;
    padding: 6px 9px;
    border: 1px solid rgba(255, 122, 24, 0.48);
    background: rgba(255, 122, 24, 0.14);
    color: #ffb47a;
}

.nrfih-card--bottom .nrfih-inning-pill {
    border-color: rgba(255, 77, 109, 0.5);
    background: rgba(255, 77, 109, 0.14);
    color: #ff9eae;
}

.nrfih-day-night {
    padding: 5px 8px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(148, 163, 184, 0.08);
    color: #b6c6d9;
}

.nrfih-matchup-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    padding: 3px 14px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.nrfih-team-link {
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: inherit !important;
    text-decoration: none !important;
}

.nrfih-team-link:last-child {
    align-items: flex-end;
}

.nrfih-team-role {
    margin-bottom: 5px;
    color: #81a8da;
    font-size: 0.58rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.065em;
}

.nrfih-team-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.nrfih-team-link:last-child .nrfih-team-line {
    flex-direction: row-reverse;
}

.nrfih-logo-shell,
.nrfih-list-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.34);
    background: #f6f8fb;
}

.nrfih-logo-shell {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 4px;
    border-radius: 10px;
}

.nrfih-team-logo {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.nrfih-team-name {
    min-width: 0;
    overflow: hidden;
    color: #fff;
    font-size: 0.93rem;
    font-weight: 900;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nrfih-team-link:hover .nrfih-team-name {
    color: var(--nrfih-gold);
}

.nrfih-matchup-vs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 50%;
    color: #7f93ac;
    font-size: 0.62rem;
    font-weight: 950;
    text-transform: uppercase;
}

.nrfih-player-matchup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 13px 14px;
}

.nrfih-player-profile {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: inherit !important;
    text-decoration: none !important;
}

.nrfih-player-profile:last-child {
    flex-direction: row-reverse;
    text-align: right;
}

.nrfih-player-photo,
.nrfih-list-photo {
    position: relative;
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: linear-gradient(180deg, #e8eef6, #bcc8d7);
}

.nrfih-player-photo {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 12px;
}

.nrfih-player-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #607086;
    font-size: 20px;
}

.nrfih-headshot {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
}

.nrfih-player-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.nrfih-player-role {
    color: #78a6df;
    font-size: 0.57rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.055em;
}

.nrfih-player-name {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: #fff;
    font-size: 0.96rem;
    font-weight: 900;
    line-height: 1.13;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nrfih-player-profile:hover .nrfih-player-name {
    color: var(--nrfih-gold);
}

.nrfih-player-hand {
    margin-top: 4px;
    color: #96a9c0;
    font-size: 0.63rem;
    font-weight: 800;
}

.nrfih-hr-center {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
}

.nrfih-hr-burst {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 2px solid rgba(255, 184, 94, 0.55);
    border-radius: 50%;
    background: radial-gradient(circle, #ffbe62 0%, #ff7a18 48%, #cf3b22 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 1000;
    box-shadow: 0 0 0 5px rgba(255, 122, 24, 0.08), 0 8px 20px rgba(255, 77, 40, 0.18);
}

.nrfih-hr-vs {
    margin-top: 4px;
    color: #7f93ac;
    font-size: 0.5rem;
    font-weight: 950;
    letter-spacing: 0.08em;
}

.nrfih-location-line {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    color: #bdcada;
    font-size: 0.72rem;
    font-weight: 800;
}

.nrfih-location-icon {
    color: var(--nrfih-gold);
}

.nrfih-play-description {
    padding: 10px 14px 13px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(5, 15, 27, 0.35);
    color: #d4deea;
    font-size: 0.74rem;
    font-weight: 650;
    line-height: 1.4;
}

.nrfih-list-scroll {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--nrfih-border);
    border-radius: 15px;
    background: rgba(8, 18, 32, 0.7);
    scrollbar-color: rgba(246, 185, 24, 0.55) rgba(15, 29, 49, 0.9);
    scrollbar-width: thin;
}

.nrfih-list-scroll:focus {
    outline: 2px solid rgba(246, 185, 24, 0.55);
    outline-offset: 2px;
}

.nrfih-list {
    min-width: 960px;
}

.nrfih-list-head,
.nrfih-list-row {
    display: grid;
    grid-template-columns: 92px minmax(170px, 1.2fr) minmax(125px, 0.9fr) minmax(170px, 1.2fr) minmax(125px, 0.9fr) minmax(190px, 1.4fr);
    align-items: stretch;
}

.nrfih-list-head {
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid rgba(246, 185, 24, 0.34);
    background: linear-gradient(180deg, #fac83d, #efad0c);
    color: #101827;
}

.nrfih-list-head > span {
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 10px 9px;
    border-right: 1px solid rgba(16, 24, 39, 0.2);
    font-size: 0.67rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.nrfih-list-row {
    position: relative;
    min-height: 62px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 29, 49, 0.94);
}

.nrfih-list-row:nth-child(odd) {
    background: rgba(18, 35, 58, 0.96);
}

.nrfih-list-row:last-child {
    border-bottom: 0;
}

.nrfih-list-row::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    content: "";
    background: var(--nrfih-orange);
}

.nrfih-list-row--bottom::before {
    background: var(--nrfih-red);
}

.nrfih-list-cell {
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 7px 9px;
    border-right: 1px solid rgba(148, 163, 184, 0.14);
}

.nrfih-list-cell:last-child {
    border-right: 0;
}

.nrfih-list-inning {
    justify-content: center;
    padding-left: 12px;
}

.nrfih-list-player,
.nrfih-list-team {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    width: 100%;
    color: inherit !important;
    text-decoration: none !important;
}

.nrfih-list-player strong,
.nrfih-list-team strong {
    min-width: 0;
    overflow: hidden;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 850;
    line-height: 1.13;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nrfih-list-player:hover strong,
.nrfih-list-team:hover strong {
    color: var(--nrfih-gold);
}

.nrfih-list-photo,
.nrfih-list-logo {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 9px;
}

.nrfih-list-logo {
    padding: 4px;
}

.nrfih-list-ballpark {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    color: #e2eaf3;
    font-size: 0.78rem;
    font-weight: 850;
}

.nrfih-list-ballpark small {
    display: -webkit-box;
    overflow: hidden;
    color: #8fa3ba;
    font-size: 0.66rem;
    font-weight: 650;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.nrfih-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 13px;
    padding: 0 3px;
    color: #74859d;
    font-size: 0.7rem;
    font-weight: 750;
}

.nrfih-noscript {
    width: 100%;
    margin: 4px 0 0;
    color: var(--nrfih-muted);
    font-size: 0.75rem;
}

.nrfih-notice {
    padding: 14px 16px;
    border: 1px solid #f0b429;
    border-radius: 10px;
    background: #fff8df;
    color: #5f4300;
    font: 600 14px/1.45 system-ui, sans-serif;
}

@media (min-width: 1320px) {
    .nrfih-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .nrfih-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .nrfih-date-area {
        width: 100%;
        justify-content: space-between;
    }

    .nrfih-date-control {
        justify-content: flex-start;
    }

    .nrfih-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .nrfih-wrap--list .nrfih-list-scroll {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .nrfih-wrap--list .nrfih-list {
        display: grid;
        min-width: 0;
        gap: 10px;
    }

    .nrfih-wrap--list .nrfih-list-head {
        display: none;
    }

    .nrfih-wrap--list .nrfih-list-row {
        display: grid;
        grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas:
            "inning batter pitcher"
            "inning team opponent"
            "ballpark ballpark ballpark";
        min-height: 0;
        overflow: hidden;
        border: 1px solid var(--nrfih-border);
        border-radius: 13px;
    }

    .nrfih-wrap--list .nrfih-list-cell {
        min-height: 51px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    }

    .nrfih-wrap--list .nrfih-list-inning {
        grid-area: inning;
        border-bottom: 0;
    }

    .nrfih-wrap--list .nrfih-list-cell:nth-child(2) {
        grid-area: batter;
    }

    .nrfih-wrap--list .nrfih-list-cell:nth-child(3) {
        grid-area: team;
    }

    .nrfih-wrap--list .nrfih-list-cell:nth-child(4) {
        grid-area: pitcher;
        border-right: 0;
    }

    .nrfih-wrap--list .nrfih-list-cell:nth-child(5) {
        grid-area: opponent;
        border-right: 0;
    }

    .nrfih-wrap--list .nrfih-list-ballpark {
        grid-area: ballpark;
        border-right: 0;
        border-bottom: 0;
    }

    .nrfih-wrap--list .nrfih-list-player strong,
    .nrfih-wrap--list .nrfih-list-team strong {
        white-space: normal;
    }
}

@media (max-width: 560px) {
    .nrfih-wrap {
        padding: 13px;
        border-radius: 15px;
    }

    .nrfih-summary {
        grid-template-columns: 1fr;
    }

    .nrfih-date-area {
        align-items: stretch;
        flex-direction: column;
    }

    .nrfih-date-control {
        align-items: stretch;
        flex-direction: column;
    }

    .nrfih-date-select,
    .nrfih-season-total {
        width: 100%;
    }

    .nrfih-season-total {
        justify-content: space-between;
    }

    .nrfih-matchup-row {
        grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr);
        padding-right: 10px;
        padding-left: 10px;
    }

    .nrfih-logo-shell {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .nrfih-team-name {
        font-size: 0.84rem;
        white-space: normal;
    }

    .nrfih-player-matchup {
        grid-template-columns: minmax(0, 1fr) 49px minmax(0, 1fr);
        gap: 6px;
        padding-right: 10px;
        padding-left: 10px;
    }

    .nrfih-player-profile,
    .nrfih-player-profile:last-child {
        align-items: center;
        flex-direction: column;
        text-align: center;
    }

    .nrfih-player-photo {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
    }

    .nrfih-player-name {
        font-size: 0.82rem;
        white-space: normal;
    }

    .nrfih-hr-burst {
        width: 43px;
        height: 43px;
        font-size: 0.88rem;
    }

    .nrfih-play-description {
        font-size: 0.7rem;
    }
}

/* Empty-day result: keep the requested date and show true zero totals. */
.nrfih-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 18px 0;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.46);
    text-align: left;
}

.nrfih-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.14);
    font-size: 24px;
}

.nrfih-empty strong,
.nrfih-empty span {
    display: block;
}

.nrfih-empty strong {
    margin-bottom: 3px;
}

.nrfih-empty div > span {
    opacity: 0.78;
    font-size: 0.9rem;
}
