html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
    --navy: #10265f;
    --blue: #2857d7;
    --pink: #df4d8b;
    --mint: #77d7c6;
    --yellow: #ffcf45;
    --paper: #fffdf3;
}

html,
body {
    margin: 0;
    padding: 0;
}

#back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    padding: 0;
    color: white;
    background: var(--pink);
    border: 3px solid var(--navy);
    border-radius: 50%;
    box-shadow: 5px 5px 0 black;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1100;
    font-size: 20px;
}

#back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cafe-page {
    min-height: 100vh;
    color: var(--navy);
    background:
        linear-gradient(90deg, transparent 49px, rgb(40 87 215 / 6%) 50px),
        linear-gradient(transparent 49px, rgb(40 87 215 / 6%) 50px),
        var(--paper);
    background-size: 50px 50px;
    font-family: Arial, Helvetica, sans-serif;
}

.cafe-page * {
    box-sizing: border-box;
}

.site-header,
main,
.site-footer {
    width: min(1220px, calc(100% - 36px));
    margin-inline: auto;
}

.site-header-wrap {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background:
        linear-gradient(90deg, transparent 49px, rgb(40 87 215 / 6%) 50px),
        linear-gradient(transparent 49px, rgb(40 87 215 / 6%) 50px),
        var(--paper);
    background-size: 50px 50px;
    border-bottom: 5px solid var(--navy);
}

.site-header {
    position: relative;
    width: min(1220px, calc(100% - 36px));
    min-height: 96px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
}

.wordmark {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    transform: rotate(-2deg);
}

.wordmark strong {
    color: var(--blue);
    font: 900 31px/0.8 "Arial Black", Arial, sans-serif;
    letter-spacing: -0.08em;
}

.wordmark span {
    color: var(--pink);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

nav {
    display: flex;
    justify-content: center;
    gap: 24px;
}

nav a {
    color: inherit;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
}

nav a:hover {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 5px;
}

.desktop-nav {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-chip {
    display: grid;
    min-width: 92px;
    min-height: 62px;
    place-content: center;
    background: var(--yellow);
    border: 3px solid var(--navy);
    box-shadow: 5px 5px 0 var(--pink);
    text-align: center;
    transform: rotate(2deg);
}

.date-chip small {
    font-size: 8px;
    font-weight: bold;
}

.date-chip strong {
    font-size: 19px;
    color: inherit;
}

.burger-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 8px;
    background: var(--yellow);
    border: 3px solid var(--navy);
    box-shadow: 3px 3px 0 var(--pink);
    cursor: pointer;
}

.burger-button span {
    display: block;
    width: 100%;
    height: 3px;
    margin: 4px 0;
    background: var(--navy);
}

.mobile-nav {
    display: none;
}

.hero {
    display: grid;
    grid-template-columns: 1fr 0.82fr;
    align-items: center;
    gap: 62px;
    min-height: 620px;
    padding: 70px 0;
}

.eyebrow {
    display: inline-block;
    margin: 0;
    padding: 6px 9px;
    color: white;
    background: var(--pink);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1 {
    margin: 22px 0 26px;
    font: 900 clamp(47px, 7vw, 84px) / 0.86 "Arial Black", Arial, sans-serif;
    letter-spacing: -0.09em;
    text-transform: uppercase;
}

h1 strong {
    display: block;
    color: var(--blue);
    text-shadow: 5px 6px 0 var(--pink);
}

.introduction {
    max-width: 520px;
    font-size: 20px;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 29px;
}

.hero-actions a {
    min-height: 47px;
    padding: 14px 19px;
    border: 3px solid var(--navy);
    box-shadow: 4px 4px 0 var(--navy);
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
}

.primary-action {
    color: white;
    background: var(--blue);
}

.secondary-action {
    color: var(--navy);
    background: white;
}

.hero-art {
    position: relative;
    aspect-ratio: 1167 / 670;
    overflow: hidden;
    background: var(--mint);
    border: 4px solid var(--navy);
    box-shadow:
        12px 12px 0 var(--pink),
        18px 18px 0 var(--navy);
}

.hero-art p {
    color: black;
}

.hero-art-column {
    width: 100%;
    min-width: 0;
}

.hero-caption {
    display: block;
    margin: 24px 0 0;
    padding: 0;
    width: 100%;
    color: var(--navy);
    font-size: 16px;
    line-height: 1.5;
    font: 900 clamp(16px, 7vw, 24px) / 1.4 "Arial Black", Arial, sans-serif;
}

.hero-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-panel {
    padding: 36px;
    background: white;
    border: 4px solid var(--navy);
    box-shadow: 8px 8px 0 var(--navy);
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 17px;
    margin-bottom: 30px;
}

.section-heading > b {
    display: grid;
    width: 60px;
    height: 60px;
    flex: 0 0 auto;
    place-items: center;
    background: var(--yellow);
    border: 3px solid var(--navy);
    font: 900 22px "Arial Black", sans-serif;
}

h2 {
    margin: 2px 0 0;
    font: 900 clamp(25px, 4vw, 42px) / 0.95 "Arial Black", Arial, sans-serif;
    letter-spacing: -0.07em;
    text-transform: uppercase;
}

.live-status,
.collab-live {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 28px;
    padding: 20px;
    background: var(--yellow);
    border: 3px solid var(--navy);
}

.live-status img,
.collab-live img {
    display: block;
    width: auto;
    max-width: 130px;
    max-height: 110px;
}

.live-status h3,
.collab-live h3 {
    margin: 5px 0;
    font: 900 22px "Arial Black", Arial, sans-serif;
    text-transform: uppercase;
}

.live-status p,
.collab-live p {
    margin: 0;
}

.status-label {
    display: inline-block;
    padding: 4px 8px;
    color: white;
    background: var(--pink);
    font-size: 9px;
    font-weight: 900;
}

.stream-group {
    margin-top: 32px;
}

.stream-group-title {
    margin: 0 0 14px;
    font: 900 20px "Arial Black", Arial, sans-serif;
    text-transform: uppercase;
}

.stream-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.stream-card {
    overflow: hidden;
    background: white;
    border: 3px solid var(--navy);
}

.stream-card a {
    display: block;
    height: 100%;
    color: var(--navy);
    text-decoration: none;
}

.stream-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-bottom: 3px solid var(--navy);
}

.stream-card-content {
    padding: 14px;
}

.stream-card h3 {
    margin: 8px 0;
    font: 900 14px/1.25 "Arial Black", Arial, sans-serif;
}

.stream-card time {
    font-size: 12px;
    font-weight: 700;
}

.stream-label {
    display: inline-block;
    padding: 4px 7px;
    color: white;
    background: var(--pink);
    font-size: 8px;
    font-weight: 900;
}

.stream-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 38px;
    margin-bottom: 18px;
}

.stream-tab {
    padding: 10px 14px;
    color: var(--navy);
    background: white;
    border: 3px solid var(--navy);
    cursor: pointer;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
}

.stream-tab.is-active {
    color: white;
    background: var(--blue);
}

.stream-tab-content {
    display: none;
}

.stream-tab-content.is-active {
    display: block;
}

.about-panel > p {
    font-size: 16px;
    line-height: 1.75;
}

.khodam-panel {
    background: var(--yellow);
}

.khodam-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: center;
}

.khodam-controls {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.khodam-description {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.6;
}

.khodam-controls label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.khodam-controls label span {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.khodam-controls select {
    width: 100%;
    min-height: 47px;
    padding: 0 12px;
    color: var(--navy);
    background: white;
    border: 3px solid var(--navy);
}

.khodam-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
}

.khodam-actions button {
    min-height: 47px;
    padding: 0 18px;
    color: white;
    background: var(--pink);
    border: 3px solid var(--navy);
    box-shadow: 4px 4px 0 var(--navy);
    cursor: pointer;
    font-weight: 800;
}

.khodam-actions button:last-child {
    background: var(--blue);
}

.khodam-preview {
    display: flex;
    align-items: center;
    justify-content: center;
}

.khodam-preview img {
    display: block;
    width: 100%;
    max-width: 250px;
    height: auto;
}

.gallery-panel {
    margin-bottom: 100px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 200px);
    gap: 15px;
}

.submission-card,
.submission-card-button {
    width: 200px;
}

.submission-card-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--navy);
    text-align: left;
    cursor: pointer;
}

.submission-thumbnail {
    display: block;
    width: 200px;
    height: 200px;
    object-fit: cover;
    border: 3px solid var(--navy);
}

.submission-card-info {
    padding-top: 10px;
}

.submission-card-name {
    margin: 0;
    color: var(--navy);
    font-size: 12px;
    font-weight: 900;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    padding: 36px 0;
    border-top: 5px solid var(--navy);
    font-size: 14px;
}

.site-footer strong {
    color: inherit
}

.submission-modal .modal-content {
    width: auto;
    max-width: 92vw;
    max-height: 90vh;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 24px;
    overflow: visible;
    background: transparent;
}

.submission-carousel {
    position: relative;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 65vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.carousel-slides {
    position: relative;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide {
    display: none;
    position: relative;
    width: auto;
    height: auto;
}

.carousel-slide.is-current {
    display: flex;
}

.carousel-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 65vw;
    max-height: 90vh;
    object-fit: contain;
}

.submission-info {
    flex: 0 0 auto;
    width: min(360px, 32vw);
    max-height: 90vh;
    padding: 32px;
    box-sizing: border-box;
    overflow-y: auto;
    background: white;
    color: #111;
    border-radius: 6px;
}

.submission-name {
    margin-top: 0;
    color: #111;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.submission-message {
    margin-top: 20px;
    color: #111;
    line-height: 1.6;
}

.social-media-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
}

.social-media-link,
.discord-link {
    color: #111;
    font-size: 24px;
}

.discord-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: default;
}

.discord-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    display: none;
    white-space: nowrap;
    padding: 6px 10px;
    background: #222;
    color: white;
    font-size: 0.8rem;
    border-radius: 5px;
    z-index: 10;
}

.discord-link:hover .discord-tooltip {
    display: block;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.35);
    border-top-color: white;
    border-radius: 50%;
    animation: spinner-rotate 0.8s linear infinite;
}

@keyframes spinner-rotate {
    to {
        transform: rotate(360deg);
    }
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 48px;
    height: 64px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 32px;
    cursor: pointer;
}

.carousel-previous {
    left: 12px;
}

.carousel-next {
    right: 12px;
}

.carousel-counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 6px;
}

.submission-modal.is-ultrawide .modal-content {
    flex-direction: column;
    align-items: stretch;
    width: fit-content;
    max-width: 90vw;
    gap: 18px;
}

.submission-modal.is-ultrawide .submission-carousel,
.submission-modal.is-ultrawide .carousel-slides,
.submission-modal.is-ultrawide .carousel-image {
    max-width: 90vw;
    max-height: 65vh;
}

.submission-modal.is-ultrawide .submission-info {
    width: 100%;
    min-width: 0;
    max-width: none;
    max-height: 25vh;
}

body.modal-open .site-header-wrap,
body.modal-open #back-to-top {
    z-index: 10;
    pointer-events: none;
}

.joinda-tooltip {
    position: relative;
    display: inline-block;
    font-weight: 800;
    color: var(--pink);
    cursor: help;
}

.joinda-tooltip-text {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    transform: translateX(-50%);
    width: 220px;
    padding: 10px 12px;
    background: white;
    color: var(--navy);
    border: 2px solid var(--navy);
    box-shadow: 4px 4px 0 var(--navy);
    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    z-index: 20;
}

.joinda-tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--navy);
}

.joinda-tooltip:hover {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 5px;
}

.joinda-tooltip:hover .joinda-tooltip-text {
    opacity: 1;
    visibility: visible;
}

.messages-panel {
    margin-bottom: 100px;
}

.message-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 28px;
    align-items: start;
}

.message-note {
    position: relative;
    min-height: 200px;
    padding: 28px 24px 24px;
    background: #fff3a6;
    border: 2px solid rgba(16, 38, 95, 0.25);
    box-shadow: 6px 7px 0 rgba(16, 38, 95, 0.18);
    color: var(--navy);
    transform: rotate(-1deg);
}

.message-note:nth-child(2n) {
    background: #f7c6db;
    transform: rotate(1.2deg);
}

.message-note:nth-child(3n) {
    background: #ccefe7;
    transform: rotate(-0.6deg);
}

.message-note:nth-child(4n) {
    background: #dce7ff;
    transform: rotate(1.5deg);
}

.message-note::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    width: 62px;
    height: 20px;
    transform: translateX(-50%) rotate(-2deg);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(16, 38, 95, 0.15);
}

.message-note p {
    margin: 0 0 22px;
    font-size: 14px;
    line-height: 1.65;
}

.message-note strong {
    display: block;
    margin-top: auto;
    font-size: 12px;
    text-align: right;
    color: inherit;
}

.sponsor-banner {
    width: 100%;
    margin: 70px 0px;
    padding: 10px;
    background: white;
    border: 4px solid var(--navy);
    box-shadow: 8px 8px 0 var(--navy);
}

.sponsor-banner a,
.sponsor-banner img {
    display: block;
    width: 100%;
}

.sponsor-banner img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.sponsor-label {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 8px;
    background: var(--yellow);
    border: 2px solid var(--navy);
    color: var(--navy);
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}

.sponsor-credit strong{
    color: inherit;
}

.khodam-panel {
    width: 100%;
    min-width: 0;
}

.khodam-ad-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 27px;
    align-items: stretch;
    padding: 27px 0;
}

.sponsor-poster {
    width: 100%;
    padding: 10px;
    background: white;
    border: 4px solid var(--navy);
    box-shadow: 8px 8px 0 var(--pink);
    transform: rotate(-1deg);
}

.sponsor-poster a,
.sponsor-poster img {
    display: block;
    width: 100%;
}

.sponsor-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

@media (max-width: 1200px) {
    .khodam-ad-row {
        grid-template-columns: 1fr;
    }

    .sponsor-poster {
        width: 100%;
        height: auto;
        justify-self: stretch;
    }

    .sponsor-poster a {
        display: block;
    }

    .sponsor-poster img {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 4;
        object-fit: cover;
    }
}

@media (max-width: 820px) {
    .site-header {
        grid-template-columns: 1fr auto;
        padding: 18px 0;
    }

    .site-header nav {
        justify-content: flex-start;
        grid-column: 1 / -1;
        overflow-x: auto;
    }

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

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

    .khodam-content {
        grid-template-columns: 1fr;
    }

    .khodam-preview {
        order: -1;
    }

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

    .site-header {
        min-height: 58px;
        grid-template-columns: 1fr auto;
        gap: 12px;
    }

    .desktop-nav {
        display: none;
    }

    .date-chip {
        display: none;
    }

    .burger-button {
        display: block;
    }

    .mobile-nav {
        position: absolute;
        top: calc(100% + 5px);
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        background: var(--paper);
        border: 3px solid var(--navy);
        box-shadow: 6px 6px 0 var(--pink);
        z-index: 1001;
        gap: 0px
    }

    .mobile-nav.is-open {
        display: flex;
    }

    .mobile-nav a {
        padding: 14px 18px;
        color: var(--navy);
        border-bottom: 2px solid var(--navy);
        font-size: 12px;
        font-weight: 900;
        text-decoration: none;
        text-transform: uppercase;
    }

    .mobile-nav a:last-child {
        border-bottom: none;
    }

    .wordmark strong {
        font-size: 22px;
    }

    .wordmark span {
        font-size: 9px;
    }
}

@media (max-width: 768px) {
    .submission-modal .modal-content {
        flex-direction: column;
        align-items: stretch;
        width: fit-content;
        max-width: 95vw;
        max-height: 94vh;
        gap: 18px;
    }

    .submission-carousel,
    .carousel-slides,
    .carousel-image {
        max-width: 95vw;
        max-height: 60vh;
    }

    .submission-info {
        width: 100%;
        min-width: 0;
        max-width: none;
        max-height: 34vh;
        padding: 24px;
    }
}

@media (max-width: 580px) {
    .site-header,
    main,
    .site-footer {
        width: min(100% - 24px, 1220px);
    }

    nav {
        gap: 16px;
    }

    .menu-panel {
        padding: 23px;
    }

    .khodam-panel form {
        grid-template-columns: 1fr 1fr;
    }

    .khodam-panel button {
        grid-column: 1 / -1;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, 200px);
        justify-content: center;
    }

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

    .live-status,
    .collab-live {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 580px) {
    .message-grid {
        grid-template-columns: 1fr;
    }

    .message-note {
        transform: none !important;
    }
}