#nav-icons {
    justify-content: left;
}
#nav-icons .button.icon.circle {
    width: 3.4rem;
    height: 3.4rem;
    line-height: 3.6rem;
    text-indent: 3.4rem;
}

.auth-btn {
    z-index: 69;
    position: fixed;
    top: 1rem;
    right: 1rem;
    background-color: rgba(30, 144, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 0.35rem;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0 1.2em;
    line-height: 2.35em;
    font-size: 0.95rem;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
}
.auth-btn:hover {
    background-color: rgba(30, 144, 255, 0.75);
}

.auth-right {
    z-index: 69;
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, rgba(120, 92, 157, 0.78), rgba(209, 137, 158, 0.74));
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 0.5rem;
    padding: 0.5rem 0.55rem;
}

.auth-user-greeting {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    width: 100%;
    text-align: center;
}

.auth-right-actions {
    display: flex;
    gap: 0.55rem;
    width: 100%;
    justify-content: center;
}

.auth-right .auth-btn {
    position: static;
    top: auto;
    right: auto;
    min-width: 8rem;
}

#join {
    right: auto;
    left: 1rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(236, 72, 153, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

#join:hover {
    background: linear-gradient(135deg, rgba(109, 40, 217, 1), rgba(219, 39, 119, 1));
    box-shadow: 0 10px 28px rgba(124, 58, 237, 0.45);
}
img.team-logo {
    max-height: 100%;
    max-width: 100%;
}
@media screen and (max-width: 736px) { 
    #nav-icons {
        justify-content: center;
    }

    .auth-right {
        right: 0.75rem;
        top: 0.75rem;
        gap: 0.3rem;
    }
    .auth-user-greeting {
        font-size: 0.85rem;
    }
    .auth-right-actions {
        gap: 0.4rem;
    }
    .auth-right .auth-btn {
        min-width: 6.9rem;
        font-size: 0.8rem;
        line-height: 2.1em;
        padding: 0 0.8em;
    }
    #join {
        left: 0.75rem;
        top: 0.75rem;
    }

    img.team-logo {
        max-height: 5rem;
    }
    .gallery .group > * {
        height: auto;
    }
}
@media screen and (max-width: 480px) {
    .auth-right {
        right: 0.5rem;
        top: 0.5rem;
        padding: 0.35rem 0.4rem;
        gap: 0.25rem;
        background: rgba(96, 76, 130, 0.46);
        border-color: rgba(255, 255, 255, 0.35);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
    }
    .auth-user-greeting {
        font-size: 0.72rem;
    }
    .auth-right-actions {
        gap: 0.3rem;
    }
    .auth-right .auth-btn {
        min-width: 5.2rem;
        font-size: 0.68rem;
        line-height: 1.95em;
        padding: 0 0.55em;
    }

    img.team-logo {
        max-height: 2.2rem;
    }
}
.gallery a {
    border: none;
}
.gallery .group > * {
    overflow: hidden;
}

#prdxn-today .gallery .group:has(> .span-1-5:last-child:nth-child(odd)) {
    background-image: url("../../images/overlay.png"), linear-gradient(45deg, rgba(114, 97, 147, 0.25) 25%, rgba(227, 123, 124, 0.25) 50%, rgba(255, 228, 180, 0.25));
    background-size: 128px 128px, auto;
    background-color: #e37b7c;
}

#prdxn-yester .gallery .group:has(> .span-3:last-child:nth-child(odd)) {
    background-image: url("../../images/overlay.png"), linear-gradient(45deg, rgba(114, 97, 147, 0.25) 25%, rgba(227, 123, 124, 0.25) 50%, rgba(255, 228, 180, 0.25));
    background-size: 128px 128px, auto;
    background-color: #353865;
}

.score-summary {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    gap: 0.4em;
}
.best-agent-container {
    display: flex;
    align-items: center;
    height: 100%;
}
.score-summary .best-agent-container {
    padding: 0.2rem 0.3rem 0.2rem 0.16rem;
}
.agent-thumb {
    border: white solid 1px;
    border-radius: 69%;
    height: 82%;
    margin: 7%;
}
.score-summary .best-agent-container figcaption {
    margin-left: 0.2rem;
    line-height: 1;
    white-space: nowrap;
}
.all-models-summary {
    height: 100%;
    align-content: center;
    display: flex;
    align-items: center;
    gap: 12%;
    font-family: "FontAwesome", Arial, Helvetica, sans-serif;
    font-size: x-large;
}
.all-models-summary img {
    max-height: 50%;
    max-width: 50%;
}

.prediction-summary .all-models-summary > div {
    white-space: nowrap;
}

.prediction-summary .all-models-summary img {
    width: 1.6rem;
    height: 1.6rem;
    max-width: 1.6rem;
    max-height: 1.6rem;
    flex: 0 0 1.6rem;
    display: block;
    object-fit: contain;
    object-position: center;
}

.fa-circle-xmark {
    color: rgba(240, 139, 108, 0.9);
}

.fa-sack-dollar {
    color: rgba(129, 193, 140, 0.92);
}

.pred-winning-logo.pred-winning-logo-long {
    transform: scale(0.94);
    transform-origin: center;
    margin-right: 0;
}

.pred-winning-logo.pred-winning-logo-extra-long {
    transform: scale(0.8);
}

.pred-winning-logo.pred-winning-logo-orl {
    transform: scale(1.24);
}

@media screen and (max-width: 736px) {
    .score-summary .best-agent-container {
        padding: 0.14rem 0.22rem 0.14rem 0.12rem;
    }
    .score-summary .best-agent-container figcaption {
        margin-left: 0.14rem;
    }
    .best-agent-container {
        gap: 0.35rem;
    }
    .agent-thumb {
        width: 2.6rem;
        height: 2.6rem;
        margin: 0;
        object-fit: cover;
        flex: 0 0 auto;
    }
    .all-models-summary {
        gap: 0.55rem;
    }

    .prediction-summary .all-models-summary {
        height: auto;
        gap: 0.35rem;
        white-space: nowrap;
    }

    .prediction-summary .all-models-summary img {
        width: 1.35rem;
        height: 1.35rem;
        flex-basis: 1.35rem;
        max-width: 1.35rem;
        max-height: 1.35rem;
    }
}
@media screen and (max-width: 736px) and (orientation: portrait) {
    .prediction-summary .all-models-summary {
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

    .prediction-summary .all-models-summary img {
        margin: 0;
        vertical-align: middle;
    }
}
@media screen and (max-width: 480px) {
    .all-models-summary {
        font-size: large;
        gap: 0.4rem;
    }
    .all-models-summary img {
        max-height: 40%;
        max-width: 40%;
    }

    .agent-thumb {
        width: 2.2rem;
        height: 2.2rem;
    }

    .prediction-summary .all-models-summary img {
        width: 1.1rem;
        height: 1.1rem;
        flex-basis: 1.1rem;
        max-width: 1.1rem;
        max-height: 1.1rem;
    }
}

/* Short-landscape viewport fit tweaks (keeps horizontal side-scroll layout): slight vertical shrink so top result borders stay visible; cap wrapper to viewport while preserving 32rem max size; compact score-summary spacing/text fit. */
@media screen and (max-height: 500px) and (orientation: landscape) {
    html,
    body {
        height: 100svh;
        height: 100dvh;
    }

    body {
        min-height: 100svh;
        min-height: 100dvh;
        align-items: center;
    }

    #page-wrapper {
        align-items: center;
        height: 100svh;
        height: 100dvh;
        padding-top: 0;
        padding-bottom: 0;
    }

    #wrapper {
        height: min(32rem, 100svh);
        height: min(32rem, 100dvh);
    }

    .panel {
        overflow-y: hidden;
    }

    .score-summary {
        gap: 0.2rem;
    }

    .score-summary .all-models-summary {
        font-family: Arial, Helvetica, sans-serif;
        font-weight: 700;
        font-size: 0.98rem;
        line-height: 1;
        letter-spacing: 0.01em;
        white-space: nowrap;
        justify-content: flex-end;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

#certified-fresh {
    width: 33%;
    position: absolute;
    right: 4rem;
    bottom: 3rem;
}

.back-to-start-btn {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    background: rgba(6, 33, 84, 0.8);
    color: #ffffff;
    cursor: pointer;
    z-index: 80;
    opacity: 0;
    transform: translateY(0.35rem);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.back-to-start-btn:hover {
    background: rgba(6, 33, 84, 0.95);
}

.back-to-start-btn.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#wrapper > .copyright {
    color: rgba(46, 43, 55, 0.72);
    font-weight: 500;
}

.density-toggle-btn {
    display: none;
}

@media screen and (max-width: 980px) {
    .panel.banner .image {
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        background-image: url("../../images/overlay.png"), linear-gradient(135deg, rgba(114, 97, 147, 0.25) 25%, rgba(227, 123, 124, 0.25) 50%, rgba(255, 228, 180, 0.25));
        background-size: 128px 128px, auto;
        /* background-color: #8FBF9F; */
        background-color: #A85B50;
    }

    .panel.banner .image img {
        object-fit: contain;
        object-position: center;
    }
}

@media screen and (max-width: 736px) {
    #page-wrapper {
        justify-content: center;
    }

    #certified-fresh {
        width: 27%;
        bottom: 1rem;
        right: 1rem;
        max-width: 8rem;
    }

    .density-toggle-btn {
        position: fixed;
        left: 0.75rem;
        bottom: 0.75rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.45);
        border-radius: 999px;
        background: rgba(6, 33, 84, 0.8);
        color: #ffffff;
        padding: 0.45rem 0.8rem;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        cursor: pointer;
        z-index: 80;
        transition: background-color 0.2s ease;
    }

    .density-toggle-btn:hover {
        background: rgba(6, 33, 84, 0.95);
    }

    .back-to-start-btn {
        right: 0.75rem;
        bottom: 0.75rem;
    }

    #prdxn-today .gallery .group > .span-1-5 {
        width: 100%;
    }

    .panel {
        overflow-y: visible;
        overflow-x: hidden;
    }

    html,
    body,
    #page-wrapper,
    #wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }
}

@media screen and (max-width: 736px) and (orientation: portrait) {
    body {
        display: block;
    }

    #page-wrapper,
    #wrapper {
        display: block;
        width: 100%;
        max-width: 100%;
    }

    html,
    body,
    #page-wrapper,
    #wrapper {
        min-height: 100svh;
        min-height: 100dvh;
        overflow-x: hidden !important;
    }

    body {
        overflow-y: auto;
    }

    #wrapper {
        margin: 0;
    }

    .panel {
        height: auto;
        min-height: auto;
    }

    .panel > .intro,
    .panel > .inner {
        padding: 1.6rem 1rem 0.95rem 1rem;
    }

    .panel.banner .content {
        padding: 1.6rem 1rem 0.95rem 1rem;
    }

    .panel.banner .image {
        height: 11.5rem;
    }

    .panel.banner .content h1.major {
        font-size: 2rem;
        line-height: 1.15;
        margin-bottom: 0.55rem;
    }

    .panel.banner .content p {
        margin-bottom: 0.8rem;
    }

    #nav-icons .button.icon.circle {
        width: 2.8rem;
        height: 2.8rem;
        line-height: 2.95rem;
        text-indent: 2.8rem;
    }

    #certified-fresh {
        width: 22%;
        max-width: 6.2rem;
        right: 0.75rem;
        bottom: 0.75rem;
    }

    .all-models-summary {
        font-size: 1.12rem;
        gap: 0.45rem;
    }

    body.density-compact .panel > .intro,
    body.density-compact .panel > .inner,
    body.density-compact .panel.banner .content {
        padding: 1.2rem 0.75rem 0.7rem 0.75rem;
    }

    body.density-compact .panel.banner .image {
        height: 9.25rem;
    }

    body.density-compact .panel.banner .content h1.major {
        font-size: 1.8rem;
        margin-bottom: 0.4rem;
    }

    body.density-compact .panel.banner .content p {
        margin-bottom: 0.55rem;
    }

    body.density-compact #nav-icons .button.icon.circle {
        width: 2.45rem;
        height: 2.45rem;
        line-height: 2.6rem;
        text-indent: 2.45rem;
    }

    body.density-compact #certified-fresh {
        width: 19%;
        max-width: 5.3rem;
    }

    body.density-compact .all-models-summary {
        font-size: 1rem;
        gap: 0.35rem;
    }

    body.density-compact .density-toggle-btn {
        padding: 0.38rem 0.68rem;
        font-size: 0.66rem;
    }
}

@media screen and (max-width: 980px) and (orientation: landscape) {
    html,
    body {
        overflow-y: hidden !important;
        height: 100svh;
        height: 100dvh;
    }

    #page-wrapper {
        height: 100svh;
        height: 100dvh;
        padding-top: 0;
        padding-bottom: 0;
    }

    #wrapper {
        margin-bottom: 0;
    }

    #wrapper > .copyright {
        top: 50%;
        bottom: auto;
        right: -1.1rem;
        margin-bottom: 0;
        width: auto;
        text-align: left;
        line-height: 1;
        white-space: nowrap;
        writing-mode: vertical-rl;
        text-orientation: mixed;
        transform: translateY(-50%) rotate(180deg);
        transform-origin: center;
        z-index: 2;
    }

    #wrapper > .copyright a {
        border-bottom: none !important;
        text-decoration-line: underline;
        text-decoration-style: solid;
        text-decoration-thickness: 1px;
        text-decoration-color: currentColor;
    }

    #wrapper > .copyright .copyright-symbol {
        display: inline-block;
        font-size: 1.1em;
        line-height: 1;
        transform: translateY(1px) rotate(90deg);
        transform-origin: center;
    }
}