.site-body:has(.scratch-page) {
    overflow-x: hidden;
}

body:has(.scratch-page) .friend-links {
    display: none;
}

.scratch-page {
    width: 100vw;
    margin-left: calc((100% - 100vw) / 2);
    color: #172027;
    background: #F3F6F7;
}

.scratch-page-shell {
    width: 1200px;
    margin: 0 auto;
}

.scratch-channel-banner {
    position: relative;
    height: 134px;
    overflow: hidden;
    background: #ff7a1c url("/static/frontend/images/scratch/channel-background-20260831.png") center center / cover no-repeat;
}

.scratch-channel-banner__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    height: 100%;
}

.scratch-channel-banner__logo {
    display: block;
    flex: 0 0 auto;
    width: 264px;
    max-width: none;
    height: auto;
}

.scratch-channel-layout {
    display: grid;
    grid-template-columns: 712px 472px;
    gap: 16px;
    align-items: stretch;
    padding: 40px 0 48px;
}

.scratch-panel {
    min-width: 0;
    padding: 24px;
    background: rgba(255, 255, 255, .72);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(20, 55, 73, .08);
}

.scratch-section-heading {
    display: flex;
    align-items: center;
    height: 34px;
    margin-bottom: 14px;
}

.scratch-section-heading h1,
.scratch-section-heading h2 {
    position: relative;
    padding-left: 14px;
    color: #172027;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.35;
}

.scratch-section-heading h1::before,
.scratch-section-heading h2::before {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 0;
    width: 4px;
    content: "";
    background: #d7193f;
    border-radius: 2px;
}

.scratch-section-heading--with-more {
    justify-content: space-between;
}

.scratch-section-heading--with-more > a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #d7193f;
    font-size: 14px;
}

.scratch-more-icon {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.scratch-news__item {
    border-bottom: 1px solid #e4e4e4;
}

.scratch-news__item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 54px;
    padding: 0 10px 0 17px;
    color: #333333;
    font-size: 18px;
}

.scratch-news__item > a::before {
    flex: 0 0 auto;
    width: 4px;
    height: 4px;
    margin-left: -10px;
    content: "";
    background: #333333;
    border-radius: 50%;
}

.scratch-news__item span {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scratch-news__item time {
    flex: 0 0 auto;
    color: #959595;
    font-size: 16px;
}

.scratch-news__item a:hover,
.scratch-news__item a:focus {
    color: #d7193f;
}

.scratch-featured__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 16px;
}

.scratch-ticket-card {
    display: flex;
    min-height: 313px;
    min-width: 0;
    flex-direction: column;
    padding: 12px;
    background: rgba(250, 252, 255, .72);
    box-shadow: 0 4px 14px rgba(52, 82, 111, .06);
}

.scratch-ticket-card:hover,
.scratch-ticket-card:focus-within {
    box-shadow: 0 8px 24px rgba(23, 32, 39, .18);
}

.scratch-ticket-card a:focus-visible {
    outline: 2px solid var(--site-red);
    outline-offset: 2px;
}

.scratch-ticket-card__image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    flex: 0 0 auto;
    overflow: hidden;
    background: #f5f8fc;
}

.scratch-ticket-card__image img {
    width: 100%;
    height: 260px;
    object-fit: contain;
}

.scratch-ticket-card__fallback {
    display: none;
    color: #9aa8b5;
    font-size: 13px;
}

.scratch-ticket-card__image.is-image-missing img {
    display: none;
}

.scratch-ticket-card__image.is-image-missing .scratch-ticket-card__fallback {
    display: block;
}

.scratch-ticket-card h2 {
    min-width: 0;
    margin-top: 9px;
    font-size: 14px;
    font-weight: 600;
    line-height: 22px;
    text-align: center;
}

.scratch-ticket-card h2 a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scratch-ticket-card--featured {
    height: 299px;
    min-height: 299px;
    padding: 10px;
}

.scratch-ticket-card--featured .scratch-ticket-card__image {
    height: 252px;
}

.scratch-ticket-card--featured .scratch-ticket-card__image img {
    height: 100%;
}

.scratch-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    color: #8b99a7;
    font-size: 15px;
}

.scratch-load-more-wrap {
    min-height: 58px;
    padding-top: 18px;
    text-align: center;
}

.scratch-load-more {
    width: 240px;
    height: 36px;
    color: #8090a0;
    background: #edf2f7;
    border: 1px solid #dae3ec;
    border-radius: 6px;
    cursor: pointer;
}

.scratch-load-more:hover,
.scratch-load-more:focus {
    color: #d7193f;
    border-color: #d7193f;
}

.scratch-load-more:disabled {
    cursor: wait;
    opacity: .72;
}

.scratch-load-status {
    min-height: 20px;
    margin-top: 6px;
    color: #8a98a6;
    font-size: 13px;
}

.scratch-gallery-page {
    min-height: 1264px;
    padding: 40px 0 52px;
}

.scratch-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 30px;
    color: #5f6d76;
    font-size: 14px;
}

.scratch-breadcrumb a:hover,
.scratch-breadcrumb a:focus {
    color: #d7193f;
}

.scratch-gallery-heading {
    height: 66px;
    padding-top: 6px;
    border-bottom: 3px solid #e20c16;
}

.scratch-gallery-heading h1 {
    color: #172027;
    font-size: 32px;
    font-weight: 600;
    line-height: 56px;
}

.scratch-gallery-panel {
    width: 100%;
    min-height: 1050px;
    margin: 16px auto 0;
    padding: 24px 56px 32px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(20, 55, 73, .08);
}

.scratch-ticket-grid {
    display: grid;
    grid-template-columns: repeat(5, 200px);
    gap: 24px 22px;
}

.scratch-ticket-grid .scratch-ticket-card__image {
    height: 260px;
}

.scratch-ticket-grid .scratch-ticket-card__image img {
    height: 100%;
}

.scratch-ticket-grid .scratch-ticket-card h2 {
    font-size: 16px;
}

.scratch-load-more-wrap--gallery {
    padding-top: 32px;
}

.scratch-empty--gallery {
    min-height: 860px;
}

@media (max-width: 1232px) {
    .scratch-page-shell {
        width: calc(100% - 32px);
    }

    .scratch-channel-layout {
        grid-template-columns: minmax(0, 3fr) minmax(420px, 2fr);
    }

    .scratch-gallery-panel {
        width: 100%;
    }

    .scratch-ticket-grid {
        justify-content: center;
        grid-template-columns: repeat(4, 200px);
    }
}

@media (max-width: 900px) {
    .scratch-channel-layout {
        grid-template-columns: 1fr;
    }

    .scratch-featured__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .scratch-ticket-grid {
        grid-template-columns: repeat(3, minmax(0, 200px));
        gap: 18px;
    }
}

@media (max-width: 600px) {
    .scratch-page-shell {
        width: calc(100% - 24px);
    }

    .scratch-channel-banner {
        height: 108px;
    }

    .scratch-channel-banner__logo {
        width: 216px;
    }

    .scratch-channel-layout {
        padding: 24px 0 32px;
    }

    .scratch-panel {
        padding: 16px;
    }

    .scratch-news__item > a {
        font-size: 14px;
    }

    .scratch-news__item time {
        display: none;
    }

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

    .scratch-ticket-card,
    .scratch-ticket-card--featured {
        height: 270px;
        min-height: 270px;
        padding: 8px;
    }

    .scratch-ticket-card--featured .scratch-ticket-card__image {
        height: 220px;
    }

    .scratch-ticket-grid .scratch-ticket-card__image {
        height: 220px;
    }

    .scratch-ticket-card__image img,
    .scratch-ticket-card--featured .scratch-ticket-card__image img {
        height: 220px;
    }

    .scratch-gallery-page {
        padding-top: 18px;
    }

    .scratch-gallery-heading h1 {
        font-size: 22px;
    }

    .scratch-gallery-panel {
        padding-right: 0;
        padding-left: 0;
    }

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