body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background: #203731;
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


body.undefeated {
    background: #203731 !important;
}


.container {
    text-align: center;
    max-width: 800px;
    padding: 2rem;
}

h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    color: #ffb612;
}

.site-title {
    margin-bottom: 0;
}

.answer {
    font-size: 4rem;
    font-weight: bold;
    margin: 2rem 0;
    padding: 1rem;
    border-radius: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.emoji-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.1em;
    line-height: 1.3;
}

.yes {
    background: transparent;
    color: white;
}

.champions {
    background: linear-gradient(135deg, #b8860b 0%, #ffd700 40%, #b8860b 70%, #ffd700 100%);
    color: #1a1a1a;
    font-size: 3rem;
    animation: championShine 2s ease-in-out infinite alternate;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

@keyframes championShine {
    from { box-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
    to   { box-shadow: 0 0 50px rgba(255, 215, 0, 0.9), 0 0 80px rgba(255, 182, 18, 0.5); }
}

.no {
    background: transparent;
    color: white;
}

.record {
    font-size: 1.5rem;
    margin: 1rem 0;
    opacity: 0.9;
    color: #ffb612;
}

.preseason-record {
    font-size: 1.1rem;
    opacity: 0.7;
}

.playoff-record {
    font-size: 1.1rem;
    opacity: 0.8;
}

.next-game {
    background: rgba(32, 55, 49, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 2rem;
    backdrop-filter: blur(10px);
    border: 2px solid #ffb612;
}

.next-game h3 {
    margin-top: 0;
    color: #ffb612;
}

.countdown {
    font-size: 1.1rem;
    color: #ffb612;
    font-weight: bold;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 182, 18, 0.1);
    border-radius: 5px;
}

.live-game {
    background: rgba(255, 0, 0, 0.1) !important;
    border: 2px solid #ff0000 !important;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

.live-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ff0000;
    border-radius: 50%;
    margin-right: 0.5rem;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.game-status {
    font-size: 1rem;
    color: #ff0000;
    font-weight: bold;
    margin: 0.5rem 0;
}

.score-display {
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.packers-score {
    color: #ffb612;
}

.opponent-score {
    color: #ffffff;
}

.loading {
    font-size: 1.2rem;
    opacity: 0.8;
    color: #ffb612;
}

.error {
    color: #ff6b6b;
    font-size: 1.1rem;
}

.packers-logo {
    font-size: 2rem;
    margin: 0 1rem;
}

.season-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem auto 0.5rem;
}

.season-label {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffb612;
    min-width: 8rem;
    text-align: center;
}

.season-nav {
    background: rgba(255, 182, 18, 0.15);
    border: 2px solid #ffb612;
    color: #ffb612;
    font-size: 1.6rem;
    line-height: 1;
    width: 3rem;
    height: 2.2rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.season-nav-jump {
    opacity: 0.75;
    width: 3rem;
}

.season-nav:hover:not(:disabled) {
    background: rgba(255, 182, 18, 0.3);
    transform: scale(1.1);
}

.season-divider {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffb612;
    padding: 0.4rem 0;
    border-top: 1px solid rgba(255, 182, 18, 0.3);
    border-bottom: 1px solid rgba(255, 182, 18, 0.3);
    margin: 0.25rem 0;
}

.season-nav:disabled {
    opacity: 0.3;
    cursor: default;
}

.last-updated {
    margin-top: 2rem;
    font-size: 0.9rem;
    opacity: 0.7;
    color: #ffb612;
}

/* Collapsible toggle sections */
.collapsible-section {
    width: 572px;
    margin: 0.4rem auto 0;
    box-sizing: border-box;
}

.collapsible-section[open] > .collapsible-summary {
    margin-bottom: 0.4rem;
}

.collapsible-summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 182, 18, 0.55);
    padding: 0.1rem 0;
    width: fit-content;
    transition: color 0.2s;
}

.collapsible-summary::-webkit-details-marker { display: none; }

.collapsible-summary::before {
    content: '\F0142'; /* mdi chevron-down */
    font-family: 'Material Design Icons';
    font-size: 0.85rem;
    transition: transform 0.2s;
    display: inline-block;
}

details:not([open]) > .collapsible-summary::before {
    transform: rotate(-90deg);
}

.collapsible-summary:hover {
    color: rgba(255, 182, 18, 0.85);
}

/* keep streak-banner from having its own outer margin when inside details */
.collapsible-section .streak-banner {
    margin-top: 0;
}

/* keep on-this-day from having its own outer margin when inside details */
.collapsible-section .on-this-day {
    margin-top: 0;
    width: 100%;
}

.streak-banner {
    background: rgba(255, 182, 18, 0.08);
    border: 1px solid rgba(255, 182, 18, 0.3);
    border-radius: 8px;
    padding: 0.55rem 1rem;
    margin: 0.5rem auto 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    max-width: 540px;
}

.streak-banner strong {
    color: #ffb612;
    font-size: 1rem;
}

.last-undefeated {
    margin-top: 1.25rem;
    font-size: 0.95rem;
    color: rgba(255, 182, 18, 0.85);
    min-height: 1.5rem;
}

.last-undefeated-link {
    color: #ffb612;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255, 182, 18, 0.5);
    transition: color 0.2s, text-decoration-color 0.2s;
}

.last-undefeated-link:hover {
    color: #fff;
    text-decoration-color: #fff;
}

.data-credit {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.6;
    color: #ffb612;
}

.data-credit a {
    color: #ffb612;
    text-decoration: underline;
}

.data-credit a:hover {
    opacity: 1;
}

.share-section {
    margin: 1.25rem auto 0;
    width: 572px;
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

/* On This Day */
.on-this-day {
    background: rgba(32, 55, 49, 0.8);
    border: 1px solid rgba(255, 182, 18, 0.25);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-sizing: border-box;
}

.otd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.otd-label {
    color: #ffb612;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.otd-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.otd-reset {
    font-size: 0.72rem;
    color: rgba(255, 182, 18, 0.6);
    border: 1px solid rgba(255, 182, 18, 0.3);
    border-radius: 5px;
    padding: 0.15rem 0.5rem;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.otd-reset:hover {
    color: #ffb612;
    border-color: #ffb612;
}

.otd-refresh {
    background: none;
    border: 1px solid rgba(255, 182, 18, 0.35);
    border-radius: 6px;
    color: rgba(255, 182, 18, 0.7);
    cursor: pointer;
    padding: 0.2rem 0.45rem;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.2s, border-color 0.2s;
}

.otd-refresh:hover {
    color: #ffb612;
    border-color: #ffb612;
}

.otd-body {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.otd-photo-link {
    flex-shrink: 0;
}

.otd-photo {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255, 182, 18, 0.3);
    display: block;
}

.otd-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.otd-season-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.otd-year {
    color: #ffb612;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
}

.otd-year:hover {
    text-decoration: underline;
    color: #ffd050;
}

.otd-game-type {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
}

.otd-game-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.otd-result-badge {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    letter-spacing: 0.03em;
}

.otd-result-badge.win  { background: rgba(76, 175, 80, 0.25); color: #4caf50; }
.otd-result-badge.loss { background: rgba(244, 67, 54, 0.25); color: #f44336; }
.otd-result-badge.tie  { background: rgba(255, 152, 0, 0.25); color: #ff9800; }

.otd-matchup {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.otd-score {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.otd-date {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 620px) {
    .collapsible-section {
        width: 100%;
    }
    .on-this-day {
        border-radius: 10px;
        padding: 0.9rem 1rem;
    }
}


.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 182, 18, 0.12);
    border: 1.5px solid rgba(255, 182, 18, 0.5);
    border-radius: 20px;
    color: #ffb612;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    letter-spacing: 0.03em;
    text-decoration: none;
}

.share-btn:hover {
    background: rgba(255, 182, 18, 0.25);
    border-color: #ffb612;
    transform: translateY(-1px);
}

.share-icon {
    font-size: 1rem;
}

.copy-success {
    background: rgba(32, 201, 151, 0.2) !important;
    border-color: #20c997 !important;
    color: #20c997 !important;
}

.schedule-section {
    background: rgba(32, 55, 49, 0.8);
    margin: 0.25rem auto;
    width: 572px;
    box-sizing: border-box;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 2px solid #ffb612;
    border-radius: 10px;
    overflow-x: auto;
}

.schedule-section h3 {
    margin-top: 0;
    color: #ffb612;
    text-align: center;
    margin-bottom: 1.5rem;
}

.schedule-grid {
    display: grid;
    gap: 0.8rem;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ffb612 #203731;
}

.schedule-grid::-webkit-scrollbar,
#card-ties .record-list::-webkit-scrollbar {
    width: 8px;
}

.schedule-grid::-webkit-scrollbar-track,
#card-ties .record-list::-webkit-scrollbar-track {
    background: #203731;
    border-radius: 4px;
}

.schedule-grid::-webkit-scrollbar-thumb,
#card-ties .record-list::-webkit-scrollbar-thumb {
    background: #ffb612;
    border-radius: 4px;
    border: 1px solid #203731;
}

.schedule-grid::-webkit-scrollbar-thumb:hover,
#card-ties .record-list::-webkit-scrollbar-thumb:hover {
    background: #ffd050;
}

.game-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.game-item.completed.win {
    border-left-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.game-item.completed.loss {
    border-left-color: #f44336;
    background: rgba(244, 67, 54, 0.1);
}

.game-item.live {
    border-left-color: #ff0000;
    background: rgba(255, 0, 0, 0.1);
    animation: pulse 2s infinite;
}

.game-item.next {
    border-left-color: #ffb612;
    background: rgba(255, 182, 18, 0.15);
    box-shadow: 0 0 10px rgba(255, 182, 18, 0.3);
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.game-details {
    flex: 1;
}

.game-opponent {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.game-date {
    font-size: 0.85rem;
    opacity: 0.8;
    color: #ffb612;
}

/* All-time head-to-head note on current-season schedule items */
.game-h2h {
    display: block;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    margin-top: 0.15rem;
}

.game-h2h:hover {
    color: #ffb612;
    text-decoration: underline;
}

.game-network {
    opacity: 0.7;
    font-style: italic;
}

.game-result {
    text-align: center;
    width: 100%;
    margin-top: 0.5rem;
}

.game-score {
    font-weight: bold;
    font-size: 1.1rem;
}

.game-score.win {
    color: #4CAF50;
}

.game-score.loss {
    color: #f44336;
}

.game-score.live {
    color: #ff0000;
}

.game-score a:hover {
    text-decoration: underline !important;
    opacity: 0.8;
}

.game-status {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 0.2rem;
}

.live-indicator-small {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #ff0000;
    border-radius: 50%;
    margin-right: 0.3rem;
    animation: blink 1s infinite;
}

.countdown-small {
    font-size: 0.8rem;
    color: #ffb612;
    font-weight: bold;
    margin-top: 0.2rem;
}

.last-play {
    font-size: 0.75rem;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.4rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    white-space: pre-line;
    line-height: 1.3;
    border-left: 2px solid #ffb612;
}

.last-play strong {
    color: #ffb612;
    font-weight: bold;
}

@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .answer {
        font-size: 2.5rem;
        margin: 1rem 0;
    }
    
    .container {
        padding: 1rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .schedule-section {
        width: 100%;
        padding: 1rem;
        margin: 1rem 0;
        box-sizing: border-box;
        border-radius: 10px;
    }

    .share-section {
        width: 100%;
    }

    .schedule-grid {
        max-height: 400px;
    }

    .season-selector {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.4rem;
        width: 100%;
    }

    .season-selector #season-first,
    .season-selector #season-prev10,
    .season-selector #season-prev  { order: 1; }
    .season-selector #season-label { order: 2; width: 100%; }
    .season-selector #season-next,
    .season-selector #season-next10,
    .season-selector #season-last  { order: 3; }

    .schedule-section h3 {
        margin-bottom: 1.5rem;
    }
}

.site-footer {
    margin-top: 1.5rem;
    padding-bottom: 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.emoji-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.emoji-toggle-label:hover {
    color: rgba(255, 255, 255, 0.85);
}

.emoji-toggle-label input[type="checkbox"] {
    accent-color: #ffb612;
    width: 0.9rem;
    height: 0.9rem;
    cursor: pointer;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.github-link:hover {
    color: rgba(255, 255, 255, 0.85);
}

.github-link .mdi {
    font-size: 1rem;
}

/* Photo gallery button */
.gallery-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.6rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 182, 18, 0.12);
    border: 1.5px solid rgba(255, 182, 18, 0.5);
    border-radius: 20px;
    color: #ffb612;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    letter-spacing: 0.03em;
}

.gallery-btn:hover {
    background: rgba(255, 182, 18, 0.25);
    border-color: #ffb612;
    transform: translateY(-1px);
}

.gallery-btn .mdi {
    font-size: 1rem;
}

/* Modal overlay */
.gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.gallery-modal[hidden] {
    display: none;
}

.gallery-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.gallery-dialog {
    position: relative;
    background: #1a2e28;
    border: 2px solid #ffb612;
    border-radius: 12px;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: galleryIn 0.2s ease-out;
}

@keyframes galleryIn {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 182, 18, 0.3);
    flex-shrink: 0;
}

.gallery-title {
    margin: 0;
    font-size: 1.2rem;
    color: #ffb612;
}

.gallery-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
}

.gallery-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    padding: 1.25rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ffb612 #1a2e28;
}

.gallery-grid::-webkit-scrollbar { width: 8px; }
.gallery-grid::-webkit-scrollbar-track { background: #1a2e28; border-radius: 4px; }
.gallery-grid::-webkit-scrollbar-thumb { background: #ffb612; border-radius: 4px; }

.gallery-item {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 182, 18, 0.15);
    transition: border-color 0.2s, transform 0.2s;
}

.gallery-item:hover {
    border-color: rgba(255, 182, 18, 0.5);
    transform: translateY(-2px);
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    background: rgba(0, 0, 0, 0.4);
    cursor: zoom-in;
}

.gallery-item-info {
    padding: 0.6rem 0.75rem 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.gallery-caption {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.gallery-license {
    font-size: 0.72rem;
    color: rgba(255, 182, 18, 0.7);
    margin-top: auto;
}

.gallery-license a {
    color: rgba(255, 182, 18, 0.7);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.gallery-license a:hover {
    color: #ffb612;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(6px);
    cursor: zoom-out;
    animation: lightboxIn 0.18s ease-out;
}

.lightbox[hidden] {
    display: none;
}

@keyframes lightboxIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lightbox img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.8);
    animation: lightboxImgIn 0.18s ease-out;
}

@keyframes lightboxImgIn {
    from { transform: scale(0.96); }
    to   { transform: scale(1); }
}

.lightbox-info {
    margin-top: 1rem;
    text-align: center;
    max-width: 640px;
    pointer-events: none;
}

.lightbox-caption {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    margin-bottom: 0.4rem;
}

.lightbox-license {
    font-size: 0.75rem;
    color: rgba(255, 182, 18, 0.7);
    pointer-events: auto;
}

.lightbox-license a {
    color: rgba(255, 182, 18, 0.7);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.lightbox-license a:hover {
    color: #ffb612;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    z-index: 10;
}

.lightbox-nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.lightbox-nav.hidden {
    visibility: hidden;
    pointer-events: none;
}

.lightbox-nav-prev { left: 1rem; }
.lightbox-nav-next { right: 1rem; }

@media (max-width: 600px) {
    .gallery-dialog {
        max-height: 95vh;
    }

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

/* --- Records & Superlatives page --- */

.records-container {
    max-width: 900px;
}

.records-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #ffb612;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: 1rem;
}

.records-back:hover {
    text-decoration: underline;
}

.records-title {
    margin-bottom: 0.25rem;
}

.records-subtitle {
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 2rem;
    font-size: 1.05rem;
}

.records-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    text-align: left;
}

.record-card {
    background: rgba(32, 55, 49, 0.8);
    border: 2px solid #ffb612;
    border-radius: 10px;
    padding: 1.25rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.record-card-focus {
    box-shadow: 0 0 24px rgba(255, 182, 18, 0.55);
}

.record-card-title {
    color: #ffb612;
    font-size: 1.25rem;
    margin: 0 0 0.15rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.record-note {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.82rem;
    margin: 0 0 0.9rem;
}

.record-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    flex: 1;
}

.record-entry {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.6rem;
    align-items: baseline;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.record-entry:last-child {
    border-bottom: none;
}

.record-entry-main {
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    color: white;
}

.record-entry-sub {
    color: rgba(255, 255, 255, 0.85);
}

.record-entry-detail {
    grid-column: 2;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.8rem;
}

.record-entry-top .record-entry-main {
    color: #ffb612;
    font-size: 1.6rem;
}

.record-entry-top .record-entry-sub {
    font-size: 1.1rem;
    font-weight: 600;
}

.record-entry a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(255, 182, 18, 0.45);
    text-underline-offset: 2px;
}

.record-entry a:hover {
    color: #ffb612;
    text-decoration-color: #ffb612;
}

.record-empty {
    color: rgba(255, 255, 255, 0.7);
    flex: 1;
}

/* The ties card lists every tie (39 and counting) — scroll it instead of
   letting it stretch the whole grid row. Scrollbar matches .schedule-grid
   (shared ::-webkit-scrollbar rules above). */
#card-ties .record-list {
    max-height: 21rem;
    overflow-y: auto;
    padding-right: 0.4rem;
    scrollbar-width: thin;
    scrollbar-color: #ffb612 #203731;
}

.record-share {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.record-share-btn {
    padding: 0.35rem 0.6rem;
    border-radius: 50%;
    font-size: 1rem;
}

/* Pill styling comes from .share-btn on the same element. */
.records-link {
    margin: 0.75rem 0.25rem 0;
}

/* --- Head-to-Head page --- */

.h2h-focus-card {
    margin-bottom: 1.5rem;
    text-align: left;
}

.h2h-record {
    color: #ffb612;
    font-size: 2.6rem;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    margin: 0.1rem 0 0.35rem;
}

.h2h-stats {
    margin-bottom: 1rem;
}

.h2h-stat {
    display: grid;
    grid-template-columns: 8.5rem 1fr;
    column-gap: 0.6rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.h2h-stat:last-child {
    border-bottom: none;
}

.h2h-stat-label {
    color: rgba(255, 255, 255, 0.6);
}

.h2h-stat a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(255, 182, 18, 0.45);
    text-underline-offset: 2px;
}

.h2h-stat a:hover {
    color: #ffb612;
    text-decoration-color: #ffb612;
}

.h2h-controls {
    margin-bottom: 0.35rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    /* The centered page layout sizes the container to its widest child (the
       table); span it so the controls center as one row instead of
       shrink-wrapping into a ragged stack. */
    width: 100%;
    box-sizing: border-box;
}

.h2h-select {
    padding: 0.5rem 0.9rem;
    background: rgba(32, 55, 49, 0.8);
    border: 1.5px solid rgba(255, 182, 18, 0.5);
    border-radius: 20px;
    color: white;
    font-size: 0.9rem;
}

.h2h-select:focus {
    outline: none;
    border-color: #ffb612;
}

.h2h-select option {
    background: #203731;
}

.h2h-check {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
}

.h2h-check input {
    accent-color: #ffb612;
}

.h2h-count {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin: 0 0 0.75rem;
    min-height: 1em;
}

.h2h-filter {
    width: 100%;
    max-width: 12rem;
    box-sizing: border-box;
    padding: 0.5rem 0.9rem;
    background: rgba(32, 55, 49, 0.8);
    border: 1.5px solid rgba(255, 182, 18, 0.5);
    border-radius: 20px;
    color: white;
    font-size: 0.95rem;
}

.h2h-filter::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.h2h-filter:focus {
    outline: none;
    border-color: #ffb612;
}

.h2h-table-wrap {
    overflow-x: auto;
}

.h2h-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(32, 55, 49, 0.8);
    border: 2px solid #ffb612;
    border-radius: 10px;
    overflow: hidden;
    text-align: left;
}

.h2h-table th,
.h2h-table td {
    padding: 0.45rem 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.h2h-table th {
    color: #ffb612;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.h2h-table tbody tr:last-child td {
    border-bottom: none;
}

.h2h-table tbody tr:hover {
    background: rgba(255, 182, 18, 0.08);
}

.h2h-table td a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.h2h-table td a:hover {
    color: #ffb612;
}

.h2h-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

@media (max-width: 600px) {
    /* Tighten the table so it fits a phone viewport instead of overflowing
       into a horizontal scroll (opponent names wrap; numbers stay nowrap). */
    .h2h-table th,
    .h2h-table td {
        padding: 0.4rem 0.45rem;
    }

    .h2h-table td {
        font-size: 0.9rem;
    }

    .h2h-table th {
        font-size: 0.72rem;
    }

    .h2h-filter {
        max-width: 100%;
    }
}


/* --- Franchise history --- */

.history-spark {
    display: block;
    max-width: 600px;
    margin: 0.25rem auto 0.5rem;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.history-spark:hover {
    opacity: 1;
}

.history-spark svg {
    width: 100%;
    height: auto;
    display: block;
}

.history-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.history-toggle {
    display: inline-flex;
    border: 1.5px solid rgba(255, 182, 18, 0.5);
    border-radius: 20px;
    overflow: hidden;
}

.history-toggle-btn {
    padding: 0.4rem 1.1rem;
    background: transparent;
    border: none;
    color: #ffb612;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
}

.history-toggle-btn.history-toggle-active {
    background: rgba(255, 182, 18, 0.25);
    color: white;
}

.history-chart {
    position: relative;
    background: rgba(32, 55, 49, 0.8);
    border: 2px solid #ffb612;
    border-radius: 10px;
    padding: 0.75rem;
}

.history-chart svg {
    width: 100%;
    height: auto;
    display: block;
}

.history-tooltip {
    position: absolute;
    pointer-events: none;
    background: #152A1E;
    border: 1px solid #ffb612;
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
    color: white;
    white-space: nowrap;
    z-index: 5;
}

.history-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin: 0.75rem 0 1rem;
}

.history-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.legend-champ {
    background: #ffb612;
    border: 1.5px solid #152A1E;
}

.legend-perfect {
    background: transparent;
    border: 1.5px solid white;
}

#history-share {
    justify-content: center;
}
