@media (max-width: 1199px) {
    .layout-shell {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        width: 100%;
        padding: 0 0 32px;
    }
    .side-ad { display: none; }
    .ad-mobile { display: block; padding: 12px 12px 8px; }
    .ad-mobile-inner { max-width: 100%; }
    .ad-mobile-inner img { width: 100%; height: auto; }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .wrap { width: min(1120px, calc(100% - 24px)); }
}

@media (max-width: 1023px) {
    .header-inner {
        min-height: 60px;
        gap: 10px;
        flex-wrap: wrap;
        padding: 4px 0;
    }
    .brand { margin-right: auto; order: 1; }
    .brand img { height: 46px; }
    .header-live {
        order: 2;
        font-size: 0.65rem;
        letter-spacing: 0.08em;
        max-width: 36%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .nav-toggle {
        display: inline-flex;
        flex-direction: row;
        order: 3;
        flex-shrink: 0;
    }
    .site-nav {
        display: none;
        order: 4;
        position: absolute;
        left: 50%;
        right: auto;
        top: 100%;
        width: 100vw;
        margin-left: -50vw;
        background: rgba(5, 3, 8, 0.97);
        border-bottom: 1px solid rgba(192, 132, 252, 0.25);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        padding: 8px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        z-index: 50;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .site-nav.is-open { display: flex; }
    .site-nav a {
        min-height: 48px;
        width: 100%;
        font-size: 0.9rem;
        padding: 12px 8px;
        border-bottom: 1px solid rgba(192, 132, 252, 0.12);
    }
    body.nav-open { overflow: hidden; }
}

@media (max-width: 767px) {
    body { font-size: 16px; }
    .wrap { width: calc(100% - 20px); }
    .layout-shell { padding-bottom: 24px; }

    .ad-ticker { padding: 8px 0; }
    .ad-ticker-track span {
        font-size: 0.92rem;
        letter-spacing: 0.08em;
        padding: 0 28px;
    }

    .hero {
        min-height: 0;
        margin-bottom: 16px;
    }
    .hero-inner { padding: 28px 14px 32px; }
    .hero-logo { width: min(200px, 62vw); margin-bottom: 8px; }
    .hero .slogan {
        font-size: clamp(1rem, 5.2vw, 1.35rem);
        letter-spacing: 0.06em;
        line-height: 1.25;
        word-break: break-word;
    }
    .hero p { font-size: 0.95rem; }
    .cta-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-top: 16px;
    }
    .cta-row .btn { width: 100%; }

    .section { padding: 18px 0 8px; }
    .section-head h2 { font-size: 1.45rem; }
    .section-head-compact {
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }
    .section-head-compact h2 { font-size: 1.35rem; }

    .card, .glass { padding: 14px; }
    .grid-3,
    .grid-2,
    .stats,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .stat { padding: 14px 8px; }
    .stat strong { font-size: 1.55rem; }

    .home-giveaway {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
    }
    .home-giveaway img {
        width: 72px;
        height: 56px;
        object-fit: contain;
    }
    .home-giveaway-body { flex: 1 1 calc(100% - 90px); }
    .home-giveaway-title {
        white-space: normal;
        line-height: 1.15;
        font-size: 1.05rem;
    }
    .home-giveaway-cta {
        width: 100%;
        justify-content: center;
    }

    .giveaway-card.card { padding: 0; overflow: hidden; }
    .giveaway-body { padding: 14px; }
    .giveaway-card .btn { width: 100%; }
    .giveaway-hero { margin: 0 0 12px; }

    article.card > h1 {
        font-size: clamp(1.6rem, 8vw, 2.2rem);
        line-height: 1.1;
        word-break: break-word;
    }

    .countdown {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }
    .countdown div {
        min-width: 0;
        padding: 8px 2px;
    }
    .countdown strong { font-size: 1.15rem; }
    .countdown span { font-size: 0.58rem; letter-spacing: 0.04em; }

    .form-grid label { word-break: break-word; }
    .check { font-size: 0.88rem; }
    input, select, textarea { font-size: 16px; }

    .site-footer { padding: 24px 0 16px; margin-top: 24px; }
    .footer-logo { height: 64px; }
    .footer-bottom { margin-top: 18px; padding-top: 12px; }

    .ad-popup-dialog { width: calc(100% - 16px); max-height: 88vh; }
    .video-card:hover { transform: none; }
}

@media (max-width: 479px) {
    .header-live span:not(.live-dot) { display: none; }
    .header-live a { display: none; }
    .header-live { max-width: none; }
    .countdown {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1440px) {
    .hero h1 { font-size: 7.4rem; }
}
