.nrfir-wrap,
.nrfir-wrap * {
    box-sizing: border-box;
}

.nrfir-wrap {
    --nrfir-bg: #07101f;
    --nrfir-panel: #0d192b;
    --nrfir-panel-2: #111f34;
    --nrfir-border: rgba(148, 163, 184, 0.22);
    --nrfir-text: #f8fafc;
    --nrfir-muted: #9fb0c8;
    --nrfir-gold: #f7b718;
    --nrfir-nrfi: #22c55e;
    --nrfir-nrfi-soft: rgba(34, 197, 94, 0.15);
    --nrfir-yrfi: #fb5263;
    --nrfir-yrfi-soft: rgba(251, 82, 99, 0.16);
    width: 100%;
    padding: 18px;
    border: 1px solid rgba(247, 183, 24, 0.28);
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(247, 183, 24, 0.12), transparent 28%),
        linear-gradient(145deg, #07101f 0%, #0a1424 100%);
    color: var(--nrfir-text);
    box-shadow: 0 18px 50px rgba(2, 8, 23, 0.34);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.nrfir-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 4px 2px 16px;
}

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

.nrfir-title-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 14px;
    background: linear-gradient(145deg, #ffd65a, var(--nrfir-gold));
    color: #07101f;
    font-size: 23px;
    box-shadow: 0 8px 22px rgba(247, 183, 24, 0.24);
}

.nrfir-title {
    margin: 0 !important;
    color: #fff !important;
    font-size: clamp(1.2rem, 2vw, 1.65rem) !important;
    font-weight: 850 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.025em;
}

.nrfir-date-label {
    margin-top: 4px;
    color: var(--nrfir-muted);
    font-size: 0.86rem;
    font-weight: 650;
}

.nrfir-date-control {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

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

.nrfir-date-select {
    min-width: 174px;
    height: 42px;
    margin: 0 !important;
    padding: 0 38px 0 13px !important;
    border: 1px solid rgba(247, 183, 24, 0.45) !important;
    border-radius: 11px !important;
    outline: none;
    background-color: #101d30 !important;
    color: #fff !important;
    font: inherit !important;
    font-size: 0.9rem !important;
    font-weight: 750 !important;
    box-shadow: none !important;
    cursor: pointer;
}

.nrfir-date-select:focus {
    border-color: var(--nrfir-gold) !important;
    box-shadow: 0 0 0 3px rgba(247, 183, 24, 0.15) !important;
}

.nrfir-wrap.is-loading {
    opacity: 0.72;
    pointer-events: none;
}

.nrfir-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.nrfir-summary-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 62px;
    padding: 12px 14px;
    border: 1px solid var(--nrfir-border);
    border-radius: 13px;
    background: rgba(15, 29, 49, 0.88);
}

.nrfir-summary-card--nrfi {
    border-color: rgba(34, 197, 94, 0.35);
    background: linear-gradient(135deg, var(--nrfir-nrfi-soft), rgba(15, 29, 49, 0.9));
}

.nrfir-summary-card--yrfi {
    border-color: rgba(251, 82, 99, 0.35);
    background: linear-gradient(135deg, var(--nrfir-yrfi-soft), rgba(15, 29, 49, 0.9));
}

.nrfir-summary-label {
    color: var(--nrfir-muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.nrfir-summary-card strong {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
}

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

.nrfir-game-card {
    position: relative;
    overflow: hidden;
    min-width: 0;
    border: 1px solid var(--nrfir-border);
    border-radius: 16px;
    background: linear-gradient(150deg, rgba(18, 34, 57, 0.98), rgba(10, 22, 39, 0.98));
    box-shadow: 0 10px 24px rgba(2, 8, 23, 0.2);
}

.nrfir-card-accent {
    height: 4px;
    background: #64748b;
}

.nrfir-game-card--nrfi .nrfir-card-accent {
    background: linear-gradient(90deg, #16a34a, #4ade80);
}

.nrfir-game-card--yrfi .nrfir-card-accent {
    background: linear-gradient(90deg, #e83e53, #fb7185);
}

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

.nrfir-status,
.nrfir-day-night {
    color: var(--nrfir-muted);
    font-size: 0.67rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.nrfir-day-night {
    padding: 4px 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.08);
}

.nrfir-matchup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
    padding: 11px 13px 14px;
}

.nrfir-team-side {
    min-width: 0;
}

.nrfir-side-label {
    display: block;
    margin-bottom: 7px;
    color: var(--nrfir-muted);
    font-size: 0.65rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

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

.nrfir-logo-shell {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    flex: 0 0 44px;
    aspect-ratio: 1 / 1;
    padding: 5px;
    line-height: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: inset 0 0 0 1px rgba(2, 8, 23, 0.05);
}

.nrfir-team-logo {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
}

.nrfir-team-name {
    min-width: 0;
    overflow: hidden;
    color: #fff;
    font-size: 1.02rem;
    font-weight: 850;
    line-height: 1.14;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.nrfir-pitcher {
    margin-top: 10px;
}

.nrfir-pitcher-link {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: inherit !important;
    text-decoration: none !important;
}

.nrfir-pitcher-link:hover .nrfir-pitcher-name {
    color: var(--nrfir-gold);
}

.nrfir-pitcher-photo {
    position: relative;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 11px;
    background: linear-gradient(145deg, #dce6f2, #a8b9cc);
}

.nrfir-pitcher-fallback {
    color: #334155;
    font-size: 20px;
}

.nrfir-headshot {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.nrfir-pitcher-copy {
    display: block;
    min-width: 0;
}

.nrfir-pitcher-label {
    display: block;
    margin-bottom: 2px;
    color: var(--nrfir-muted);
    font-size: 0.61rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.055em;
}

.nrfir-pitcher-name {
    display: block;
    overflow: hidden;
    color: #e9f1fb;
    font-size: 0.88rem;
    font-weight: 780;
    line-height: 1.15;
    text-overflow: ellipsis;
    transition: color 0.15s ease;
}

.nrfir-score-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 8px 4px;
    border-right: 1px solid rgba(148, 163, 184, 0.16);
    border-left: 1px solid rgba(148, 163, 184, 0.16);
}

.nrfir-score-label {
    color: var(--nrfir-muted);
    font-size: 0.62rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nrfir-score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin: 4px 0 7px;
    color: #fff;
    font-size: 1.58rem;
    font-weight: 950;
    line-height: 1;
    letter-spacing: -0.04em;
}

.nrfir-score-dash {
    color: #73839a;
    font-size: 1rem;
}

.nrfir-result-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 66px;
    padding: 6px 9px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(100, 116, 139, 0.18);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.055em;
}

.nrfir-result-pill--nrfi {
    border-color: rgba(74, 222, 128, 0.44);
    color: #8bf0ad;
    background: var(--nrfir-nrfi-soft);
}

.nrfir-result-pill--yrfi {
    border-color: rgba(251, 113, 133, 0.45);
    color: #ff9aa9;
    background: var(--nrfir-yrfi-soft);
}

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

.nrfir-list-scroll:focus {
    outline: 2px solid rgba(247, 183, 24, 0.55);
    outline-offset: 2px;
}

.nrfir-list {
    min-width: 760px;
}

.nrfir-list-head,
.nrfir-list-row {
    display: grid;
    grid-template-columns: 58px minmax(112px, 0.9fr) minmax(142px, 1.15fr) minmax(112px, 0.9fr) minmax(142px, 1.15fr) 72px 78px;
    align-items: stretch;
}

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

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

.nrfir-list-head > span:last-child {
    justify-content: center;
    border-right: 0;
}

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

.nrfir-list-row:nth-child(odd) {
    background: rgba(18, 34, 57, 0.96);
}

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

.nrfir-list-row::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    content: "";
    background: #64748b;
}

.nrfir-list-row--nrfi::before {
    background: var(--nrfir-nrfi);
}

.nrfir-list-row--yrfi::before {
    background: var(--nrfir-yrfi);
}

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

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

.nrfir-list-date {
    justify-content: center;
    padding-left: 11px;
    color: #fff;
    font-size: 0.84rem;
    font-weight: 900;
}

.nrfir-list-team,
.nrfir-list-pitcher {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    width: 100%;
}

.nrfir-list-pitcher {
    color: inherit !important;
    text-decoration: none !important;
}

.nrfir-list-pitcher:hover .nrfir-list-pitcher-name {
    color: var(--nrfir-gold);
}

.nrfir-logo-shell--list {
    width: 36px;
    height: 36px;
    min-width: 36px;
    flex-basis: 36px;
    padding: 4px;
    border-radius: 9px;
}

.nrfir-list-team-name {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #fff;
    font-size: 0.94rem;
    font-weight: 850;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nrfir-pitcher-photo--list {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 9px;
}

.nrfir-list-pitcher-name {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #edf4fc;
    font-size: 0.88rem;
    font-weight: 780;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.nrfir-list-score,
.nrfir-list-result {
    justify-content: center;
    text-align: center;
}

.nrfir-list-score {
    color: #fff;
    font-size: 1rem;
    font-weight: 950;
}

.nrfir-wrap--list .nrfir-list-result .nrfir-result-pill {
    min-width: 62px;
    padding: 6px 7px;
}

.nrfir-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;
}

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

.nrfir-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) {
    .nrfir-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

    .nrfir-date-control {
        width: 100%;
        justify-content: space-between;
    }

    .nrfir-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

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

    .nrfir-wrap--list .nrfir-list-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 68px;
        grid-template-areas:
            "date date result"
            "awayteam hometeam score"
            "awaypitcher homepitcher score";
        min-height: 0;
        overflow: hidden;
        border: 1px solid var(--nrfir-border);
        border-radius: 13px;
    }

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

    .nrfir-wrap--list .nrfir-list-date {
        grid-area: date;
        justify-content: flex-start;
        min-height: 34px;
        padding-left: 14px;
        font-size: 0.78rem;
    }

    .nrfir-wrap--list .nrfir-list-result {
        grid-area: result;
        min-height: 34px;
        border-right: 0;
    }

    .nrfir-wrap--list .nrfir-list-away-team {
        grid-area: awayteam;
    }

    .nrfir-wrap--list .nrfir-list-home-team {
        grid-area: hometeam;
        border-right: 0;
    }

    .nrfir-wrap--list .nrfir-list-away-pitcher {
        grid-area: awaypitcher;
        border-bottom: 0;
    }

    .nrfir-wrap--list .nrfir-list-home-pitcher {
        grid-area: homepitcher;
        border-right: 0;
        border-bottom: 0;
    }

    .nrfir-wrap--list .nrfir-list-score {
        grid-area: score;
        border-right: 0;
        border-bottom: 0;
        font-size: 1.12rem;
    }

    .nrfir-wrap--list .nrfir-list-team-name,
    .nrfir-wrap--list .nrfir-list-pitcher-name {
        white-space: normal;
    }
}

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

    .nrfir-title-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border-radius: 12px;
        font-size: 20px;
    }

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

    .nrfir-date-select {
        width: 100%;
    }

    .nrfir-matchup {
        grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
        gap: 7px;
        padding-right: 9px;
        padding-left: 9px;
    }

    .nrfir-logo-shell {
        width: 38px;
        height: 38px;
        min-width: 38px;
        flex-basis: 38px;
        border-radius: 9px;
    }

    .nrfir-team-name {
        font-size: 0.88rem;
    }

    .nrfir-pitcher-link {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .nrfir-pitcher-photo {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .nrfir-pitcher-name {
        font-size: 0.80rem;
        white-space: normal;
    }

    .nrfir-score {
        font-size: 1.34rem;
    }

    .nrfir-result-pill {
        min-width: 58px;
        padding: 5px 7px;
        font-size: 0.65rem;
    }
}
