body.layout-main .pdp-mbar { display: none; }

@media (max-width: 576px) {
    body.layout-auth .auth-card {
        padding: 20px 18px;
        background: rgba(9, 11, 24, .72);
        border-color: rgba(255, 255, 255, .1);
        backdrop-filter: blur(14px) saturate(1.3);
        -webkit-backdrop-filter: blur(14px) saturate(1.3);
        border-radius: 22px;
    }
    body.layout-auth .ha-input,
    body.layout-auth .field input { background: rgba(255, 255, 255, .06); height: 48px; }
    body.layout-auth .auth-card button[type="submit"] { width: 100%; height: 48px; }
}
body.layout-main .filter-grid { display: grid; gap: 10px; grid-template-columns: 1.4fr .6fr .4fr .4fr .5fr auto; }

@media (max-width: 768px) {
    body.layout-main .filter-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    body.layout-main .filter-grid > [name="q"],
    body.layout-main .filter-grid > button { grid-column: 1 / -1; }
    body.layout-main .filter-grid > [name="type"],
    body.layout-main .filter-grid > [name="sort"] { order: 1; }
    body.layout-main .filter-grid > [name="min"],
    body.layout-main .filter-grid > [name="max"] { order: 2; }
    body.layout-main .filter-grid > button { order: 3; height: 44px; }
    body.layout-main .filter-grid .ha-input { height: 44px; min-width: 0; }
    body.layout-main .topbar { height: 56px; flex-basis: 56px; gap: 8px; padding: 0 12px; }
    body.layout-main .brand { min-width: 0; flex: 0 1 auto; gap: 6px; }
    body.layout-main .brand img { width: 38px; height: 28px; }
    body.layout-main .brand-text { font-size: 14px; }
    body.layout-main .brand-text small { font-size: 8px; }
    body.layout-main .top-actions { gap: 6px; }
    body.layout-main .top-actions .icon-btn,
    body.layout-main .cart-btn { width: 38px; height: 38px; border-radius: 11px; }
    body.layout-main .nav-toggle { background: #171b31; border-radius: 11px; color: #fff; }
    body.layout-main .login-link {
        display: inline-flex;
        align-items: center;
        height: 38px;
        padding: 0 14px;
        border-radius: 11px;
        background: #171b31;
        font-size: 13px;
    }
    body.layout-main .btn-join { padding: 0 12px; height: 38px; display: inline-flex; align-items: center; font-size: 12.5px; }
    body.layout-main .balance-pill { padding: 0 10px; height: 38px; display: inline-flex; align-items: center; font-size: 12.5px; }
    body.layout-main .user-chip img { width: 34px; height: 34px; }
    body.layout-main .game-nav { gap: 8px; padding: 4px 12px 10px; }
    body.layout-main .game-nav a { padding: 7px 11px; font-size: 12.5px; border-radius: 11px; }
    body.layout-main .game-nav a img { width: 18px; height: 18px; }
    body.layout-main .ticker { min-height: calc(24px + env(safe-area-inset-top, 0px)); font-size: 11px; padding: env(safe-area-inset-top, 0px) 12px 0; }
    body.layout-main .ticker-links { gap: 14px; flex-wrap: nowrap; overflow: hidden; }
    body.layout-main .ticker-links a { white-space: nowrap; }

    body.layout-main .hero {
        height: 360px;
        min-height: 0;
        border-radius: 20px;
        touch-action: pan-y;
    }
    body.layout-main .hero-slide,
    body.layout-main .hero-slide.on {
        position: absolute;
        inset: 0;
        display: block;
        min-height: 0;
    }
    body.layout-main .hero-slide { opacity: 0; transform: scale(1.03); transition: opacity .5s ease, transform .7s ease; }
    body.layout-main .hero-slide.on { opacity: 1; transform: none; }
    body.layout-main .hero-plate,
    body.layout-main .hero-motion,
    body.layout-main .hero-slide[data-tone="violet"] .hero-motion,
    body.layout-main .hero-slide[data-tone="cyan"] .hero-motion {
        object-position: 62% 30%;
        transform: none;
        -webkit-mask-image: none;
        mask-image: none;
    }
    body.layout-main .hero-slide { background-position: 62% center; }
    body.layout-main .hero-slide::after {
        z-index: 1;
        background:
            linear-gradient(180deg, rgba(7, 9, 20, 0) 18%, rgba(7, 9, 20, .62) 50%, rgba(7, 9, 20, .96) 82%),
            linear-gradient(90deg, rgba(7, 9, 20, .55) 0%, rgba(7, 9, 20, 0) 70%);
    }
    body.layout-main .hero-copy {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 88px;
        max-width: none;
        padding: 0 16px;
    }
    body.layout-main .hero-kicker { font-size: 10px; padding: 3px 8px; border-radius: 7px; }
    body.layout-main .hero h1 { font-size: 27px; line-height: 1; margin: 8px 0 6px; }
    body.layout-main .hero p {
        font-size: 12.5px;
        line-height: 1.4;
        max-width: none;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    body.layout-main .hero-actions { margin-top: 10px; flex-wrap: nowrap; }
    body.layout-main .hero-actions a { padding: 8px 12px; font-size: 12px; white-space: nowrap; }
    body.layout-main .hero-actions a:nth-child(3) { display: none; }
    body.layout-main .hero-dots { top: 14px; right: 14px; bottom: auto; }
    body.layout-main .hero-orbs { display: none; }
    body.layout-main .game-chips { left: 10px; right: 10px; bottom: 10px; touch-action: pan-y; }
    body.layout-main .game-chip-track,
    body.layout-main .game-chip-set { gap: 8px; }
    body.layout-main .game-chip {
        flex-basis: 214px;
        width: 214px;
        max-width: 214px;
        height: 64px;
        gap: 8px;
        padding: 0 10px 0 7px;
        border-radius: 14px;
        background: rgba(12, 16, 34, .72);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
    }
    body.layout-main .game-chip img { width: 46px; height: 46px; border-radius: 10px; }
    body.layout-main .game-chip-copy strong { font-size: 12px; }
    body.layout-main .game-chip-copy small { font-size: 10.5px; }
    body.layout-main .game-chip > b { font-size: 12px; }

    body.layout-main .pack-tabs {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        margin: 0 -12px;
        padding: 0 12px 4px;
        scroll-snap-type: x proximity;
    }
    body.layout-main .pack-tabs::-webkit-scrollbar { display: none; }
    body.layout-main .pack-tabs button { flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }

    body.layout-main .content { padding: 8px 12px calc(84px + env(safe-area-inset-bottom)); }
    body.layout-main .pack-strip { margin-left: -12px; margin-right: -12px; }
    body.layout-main .data-table { display: block; max-width: 100%; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
    body.layout-main .site-footer { margin: 24px -12px 0; padding: 18px 16px 20px; }
    body.layout-main .footer-actions { justify-content: flex-start; }

    body.layout-main .bottom-nav {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        z-index: 60;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        align-items: center;
        padding: 8px 6px;
        border-radius: 22px;
        background: rgba(14, 17, 34, .94);
        backdrop-filter: blur(16px) saturate(1.4);
        -webkit-backdrop-filter: blur(16px) saturate(1.4);
        box-shadow: 0 14px 34px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .07);
    }
    body.layout-main .bottom-nav a {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 0;
        color: #8b91ab;
        font-size: 10.5px;
        font-weight: 700;
        line-height: 1.2;
        white-space: nowrap;
        transition: color .2s ease;
    }
    body.layout-main .bottom-nav a i,
    body.layout-main .bottom-nav-sell b {
        display: grid;
        place-items: center;
        width: 48px;
        height: 32px;
        margin: 0;
        border-radius: 11px;
        font-size: 16px;
        transition: background .2s ease, color .2s ease;
    }
    body.layout-main .bottom-nav a.on { color: #fff; }
    body.layout-main .bottom-nav a.on i { color: #3dff8a; background: rgba(61, 255, 138, .14); }
    body.layout-main .bottom-nav em {
        position: absolute;
        top: -3px;
        left: calc(50% + 8px);
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        border-radius: 99px;
        background: #ff3d6e;
        color: #fff;
        font-size: 10px;
        font-style: normal;
        line-height: 17px;
        text-align: center;
    }
    body.layout-main .bottom-nav-sell b {
        background: linear-gradient(160deg, #5dffa0, #1fcf6a);
        color: #04210f;
        box-shadow: 0 6px 16px rgba(31, 207, 106, .3);
    }
    body.layout-main .bottom-nav-sell b i { display: inline; width: auto; height: auto; font-size: 15px; color: inherit; background: none; }
    body.layout-main .bottom-nav-sell { color: #d7ffe6 !important; }

    body.layout-main .pdp-mbar {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        z-index: 60;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 10px 10px 16px;
        border-radius: 20px;
        background: rgba(14, 17, 34, .9);
        backdrop-filter: blur(16px) saturate(1.4);
        -webkit-backdrop-filter: blur(16px) saturate(1.4);
        box-shadow: 0 14px 34px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .07);
    }
    body.layout-main .pdp-mbar form { margin: 0; }
    body.layout-main .pdp-mbar-price { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
    body.layout-main .pdp-mbar-price small { color: #8b91ab; font-size: 11px; font-weight: 700; }
    body.layout-main .pdp-mbar-price strong { color: #3dff8a; font-size: 19px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
    body.layout-main .pdp-mbar-cart {
        width: 46px;
        height: 46px;
        border: 0;
        border-radius: 14px;
        background: #1c2140;
        color: #fff;
        font-size: 17px;
    }
    body.layout-main .pdp-mbar-buy { height: 46px; padding: 0 20px; display: inline-flex; align-items: center; gap: 8px; border-radius: 14px; font-weight: 800; white-space: nowrap; }
    body.layout-main:has(.pdp-mbar) .bottom-nav,
    body.layout-main:has(.msg-app.has-pane) .bottom-nav { display: none; }
    body.layout-main .content:has(.msg-app.has-pane) { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
    body.layout-main .msg-app.has-pane { height: calc(100dvh - 156px); min-height: 420px; }
    body.layout-main:has(.pdp-mbar) .sale-toast { bottom: calc(90px + env(safe-area-inset-bottom)); }

    body.layout-main .bets { padding: 4px; }
    body.layout-main .bet-row {
        grid-template-columns: auto auto minmax(0, 1fr) auto;
        grid-template-areas: "title title title amount" "buyer seller . time";
        gap: 4px 10px;
        padding: 11px 10px;
        border-radius: 12px;
    }
    body.layout-main .bet-row + .bet-row { border-top: 1px solid rgba(255, 255, 255, .05); }
    body.layout-main .bet-row b { grid-area: title; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    body.layout-main .bet-row em { grid-area: amount; color: #3dff8a; font-weight: 800; }
    body.layout-main .bet-row span { font-size: 11.5px; }
    body.layout-main .bet-row span:nth-of-type(1) { grid-area: buyer; }
    body.layout-main .bet-row span:nth-of-type(2) { grid-area: seller; }
    body.layout-main .bet-row span:nth-of-type(1)::before { content: "Alıcı "; color: #6d7390; }
    body.layout-main .bet-row span:nth-of-type(2)::before { content: "Satıcı "; color: #6d7390; }
    body.layout-main .bet-row:only-child span::before { content: none; }
    body.layout-main .bet-row time { grid-area: time; font-size: 11.5px; justify-self: end; }
    body.layout-main .bet-row em { justify-self: end; }

    body.layout-main .flash { align-items: flex-start; gap: 12px; padding: 14px; font-size: 13px; line-height: 1.45; }
    body.layout-main .flash > i { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(124, 92, 255, .18); color: #c4b5fd; font-size: 15px; }

    body.layout-main .sale-toast {
        left: 12px;
        right: 12px;
        width: auto;
        bottom: calc(88px + env(safe-area-inset-bottom));
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 10px;
        padding: 10px 12px 12px;
        border-radius: 14px;
    }
    body.layout-main .sale-toast-ico { width: 34px; height: 34px; border-radius: 10px; font-size: 14px; }
    body.layout-main .sale-toast-top strong,
    body.layout-main .sale-toast-title { font-size: 12px; }
    body.layout-main .sale-toast-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    body.layout-main .sale-toast-copy p { display: none; }
    body.layout-main .sale-toast-copy small { margin-top: 3px; font-size: 11px; }
}

@media (max-width: 576px) {
    body.layout-main .top-actions .btn-join { display: none; }
    body.layout-main .topbar:has(.balance-pill) .brand-text { display: none; }
    body.layout-main .top-actions .btn-deposit { display: none; }
    body.layout-main .user-menu .chat-open-item { display: flex; }
}
@media (max-width: 380px) {
    body.layout-main .topbar:has(.balance-pill) .chat-toggle { display: none; }
}
body.layout-main .user-menu .chat-open-item { display: none; width: 100%; border: 0; background: transparent; text-align: left; }
