/* BERASTOGEL mobile refinement — loaded after the desktop cyber system. */
.mobile-brand-lockup { display: none; }
.fab-daftar { display: none; }

@media (max-width: 820px) {
    :root { --mobile-pad: 12px; --mobile-radius: 14px; }

    html { scroll-padding-top: 70px; }
    body {
        overflow-x: hidden;
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
        background:
            radial-gradient(420px 260px at 50% -80px, rgba(0, 126, 255, .13), transparent 72%),
            #000407;
    }
    .wrap { padding-inline: var(--mobile-pad); }
    .btn, .ai-btn, .obtn, .tier, .opill, .pc-arrow, .stats-arrow,
    .ai-slider-arrow, .hamburger, .back-top, .modal-close, .ai-console-close {
        border-radius: 10px;
    }

    /* Compact navigation with balanced touch targets. */
    .topbar { background: rgba(0, 5, 10, .94); backdrop-filter: blur(18px); }
    .topbar-inner { height: 58px; gap: 8px; }
    .logo { min-width: 0; flex: 1 1 auto; overflow: hidden; }
    .logo > #brandLogo { display: none; }
    .mobile-brand-lockup {
        display: flex;
        align-items: center;
        min-width: 0;
        gap: 7px;
        color: #eefaff;
        filter: drop-shadow(0 0 10px rgba(0, 157, 255, .34));
    }
    .mobile-brand-lockup img { flex: 0 0 auto; width: 29px; height: 29px; object-fit: contain; }
    .mobile-brand-lockup b {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #eafaff;
        font: 700 .8rem/1 var(--font-head);
        letter-spacing: .045em;
    }
    .topbar-cta { flex: 0 0 auto; gap: 7px; }
    .topbar-cta .btn { min-height: 40px; padding-inline: 14px; clip-path: none; font-size: .78rem; }
    .topbar-cta .btn-gold { min-width: 88px; }
    .hamburger { display: grid; place-items: center; width: 40px; height: 40px; }
    .nav {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 58px;
        flex-direction: column;
        gap: 0;
        padding: 8px 12px 14px;
        background: rgba(0, 7, 14, .98);
        border-bottom: 1px solid #145071;
        box-shadow: 0 20px 44px rgba(0, 0, 0, .7);
    }
    .nav.open { display: flex; }
    .nav a { min-height: 44px; padding: 13px 10px; border-radius: 8px; }
    .topbar-cta .btn-ghost { display: none; }

    .promo-banner .wrap { min-height: 34px; gap: 8px; }
    .promo-banner .ui-icon { flex: 0 0 auto; }
    #promoText { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .68rem; }

    /* The source artwork is 1920x613. Keep that exact ratio on mobile. */
    .hero { padding: 8px 0 0; }
    .hero-inner {
        width: 100%;
        min-height: 0;
        height: auto;
        aspect-ratio: 1920 / 613;
        justify-content: center;
        padding: 7px 14px;
        border-radius: var(--mobile-radius);
        clip-path: none;
        box-shadow: 0 18px 48px rgba(0, 18, 38, .52);
    }
    .hero-inner::before {
        background:
            linear-gradient(180deg, rgba(0, 5, 11, .42), rgba(0, 7, 16, .52)),
            repeating-linear-gradient(0deg, rgba(70, 200, 255, .025) 0 1px, transparent 1px 5px);
    }
    .hero-inner::after { display: none; }
    .hero-brand-banner {
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: none;
        filter: blur(.25px) brightness(.62) saturate(.82) contrast(1.04);
    }
    .hero-badge { padding: 3px 6px; border-radius: 5px; font-size: .42rem; letter-spacing: .1em; }
    .hero-badge .ui-icon { width: 10px; height: 10px; }
    .hero h1 {
        width: 100%;
        margin: 4px 0 3px;
        font-size: clamp(1rem, 4.8vw, 1.25rem);
        line-height: 1;
        letter-spacing: -.045em;
        white-space: nowrap;
    }
    .hero h1 span {
        display: inline;
        width: auto;
        max-width: none;
        margin: 0 0 0 5px;
        overflow-wrap: normal;
        white-space: nowrap;
    }
    .hero-sub { max-width: 100%; overflow: hidden; font-size: .47rem; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
    .jamgacor {
        width: auto;
        max-width: 100%;
        margin-top: 5px;
        padding: 4px 7px;
        border-radius: 6px;
        font-size: .45rem;
        line-height: 1.25;
    }
    .jamgacor .ui-icon { width: 10px; height: 10px; }
    .marquee { margin-top: 10px; padding-block: 8px; font-size: .72rem; }

    /* One-line, horizontally scrollable telemetry tiles. */
    .stats-shell {
        grid-template-columns: 36px minmax(0, 1fr) 36px;
        margin: 16px 0 0;
        overflow: hidden;
        border-radius: var(--mobile-radius);
        background: linear-gradient(180deg, rgba(5, 18, 29, .98), rgba(1, 8, 14, .98));
        box-shadow: 0 14px 36px rgba(0, 12, 25, .42);
    }
    .stats { display: flex; gap: 0; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
    .stat {
        flex: 0 0 50%;
        min-height: 132px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 12px 8px;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        border-right-color: #123a54;
        text-align: center;
    }
    .stat::before { top: 8px; right: 8px; }
    .stat-icon {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        margin: 0 auto;
        color: #25e6ff;
        border: 1px solid #00bdf5;
        border-radius: 11px;
        clip-path: none;
        background: radial-gradient(circle at 50% 35%, rgba(0, 229, 255, .2), rgba(1, 15, 25, .98) 72%);
        box-shadow: 0 0 0 1px rgba(0, 229, 255, .08), 0 0 18px rgba(0, 203, 255, .28), inset 0 0 14px rgba(0, 174, 255, .12);
    }
    .stat-icon svg {
        width: 28px;
        height: 28px;
        stroke-width: 2;
        filter: drop-shadow(0 0 5px rgba(37, 230, 255, .82));
    }
    .stat-num { display: block; width: 100%; font-size: 1.52rem; line-height: 1; text-align: center; }
    .stat-lbl { display: block; width: 100%; margin: 0; text-align: center; font-size: .56rem; line-height: 1.25; }
    .stats-arrow {
        position: static;
        width: 36px;
        height: auto;
        transform: none;
        border: 0;
        background: rgba(1, 11, 18, .98);
    }
    .stats-arrow:not(:disabled):active { background: #0a2537; }

    /* Calm section rhythm. */
    .sec-head { margin: 38px 0 14px; padding-bottom: 10px; gap: 5px; }
    .sec-title { font-size: 1.08rem; line-height: 1.15; }
    .sec-title .ui-icon { width: 19px; height: 19px; }
    .sec-meta { width: 100%; font-size: .57rem; line-height: 1.35; }

    /* AI banner: no overlapping arrows or oversized empty panel. */
    .ai-showcase {
        overflow: hidden;
        border-radius: 16px;
        clip-path: none;
        box-shadow: 0 20px 48px rgba(0, 17, 35, .52);
    }
    #aiSlider { display: none; }
    .ai-mobile-slider {
        display: block;
        width: 100%;
        aspect-ratio: 1280 / 746;
        overflow: hidden;
        background: #00050a;
    }
    .ai-mobile-slider-track { height: 100%; }
    .ai-mobile-slide {
        position: relative;
        flex: 0 0 100%;
        width: 100%;
        height: 100%;
        min-width: 0;
        display: grid;
        place-items: center;
        overflow: hidden;
        background: #00050a;
    }
    .ai-mobile-slide img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
    }
    .ai-mobile-slider .ai-slider-arrow {
        top: 50%;
        bottom: auto;
        width: 34px;
        height: 46px;
        transform: translateY(-50%);
        color: #dffaff;
        background: rgba(0, 8, 15, .76);
        border-color: rgba(0, 217, 255, .52);
        box-shadow: 0 0 16px rgba(0, 183, 255, .18);
    }
    .ai-mobile-slider .ai-slider-prev { left: 7px; }
    .ai-mobile-slider .ai-slider-next { right: 7px; }
    .ai-mobile-slider .ai-slider-dots { bottom: 8px; }
    .ai-mobile-slider .ai-slider-dots button { background: rgba(255, 255, 255, .48); box-shadow: 0 1px 5px rgba(0, 0, 0, .75); }
    .ai-mobile-slider .ai-slider-dots button.active { background: #00d9ff; }
    .ai-slide {
        min-height: 345px;
        display: block;
        padding: 27px 20px 64px;
        background:
            radial-gradient(circle at 78% 24%, rgba(0, 132, 255, .2), transparent 32%),
            linear-gradient(145deg, #061522, #02080e 68%);
    }
    .ai-slide-copy { max-width: none; }
    .ai-badge { padding: 6px 9px; border-radius: 7px; font-size: .56rem; }
    .ai-title { margin: 15px 0 10px; font-size: clamp(1.85rem, 9vw, 2.25rem); line-height: .98; letter-spacing: -.045em; }
    .ai-title span { display: block; margin-top: 3px; }
    .ai-slide-copy > p { max-width: 310px; font-size: .76rem; line-height: 1.48; }
    .ai-feature-row {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        max-width: none;
        margin-top: 18px;
    }
    .ai-feature-row span {
        width: 100%;
        min-height: 48px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 6px 3px;
        border-radius: 8px;
        text-align: center;
        white-space: normal;
        font-size: .54rem;
        line-height: 1.2;
    }
    .ai-feature-row .ui-icon { width: 15px; height: 15px; }
    .ai-slide-visual { display: none; }
    .ai-slider-arrow {
        top: auto;
        bottom: 13px;
        width: 36px;
        height: 36px;
        transform: none;
        border-radius: 10px;
        background: rgba(1, 13, 22, .94);
    }
    .ai-slider-prev { left: 12px; }
    .ai-slider-next { right: 12px; }
    .ai-slider-dots { bottom: 29px; }
    .ai-slider-dots button { height: 3px; }
    .ai-showcase-cta {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
        background: #030b12;
    }
    .ai-showcase-cta b { font-size: .86rem; line-height: 1.2; }
    .ai-showcase-cta span { margin-top: 3px; font-size: .66rem; }
    .ai-open-btn { min-height: 48px; border-radius: 11px; clip-path: none; font-size: .72rem; }

    .ai-results { margin-top: 24px; padding: 1px 10px 14px; border-radius: 14px; }
    .ai-result-context { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border-radius: 10px; overflow: hidden; }
    .ai-result-context span { min-width: 0; padding: 10px; }
    .ai-result-context b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ai-results .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .ai-card { min-width: 0; border-radius: 12px; overflow: hidden; clip-path: none; }
    .ai-card-b { min-width: 0; gap: 4px; padding: 8px; }
    .ai-card-signals { gap: 4px; }
    .ai-card-signals .ai-conf,
    .ai-card-signals .ai-play { max-width: calc(50% - 2px); padding: 3px 5px; font-size: .5rem; }
    .ai-card-signals .ui-icon { width: 10px; height: 10px; }
    .ai-card-name { font-size: .66rem; }
    .ai-card-meta { font-size: .54rem; }
    .ai-card-meta b { font-size: .56rem; }
    .ai-card-row { align-items: center; gap: 4px; font-size: .52rem; }
    .ai-card-row span { min-width: 0; }
    .ai-card-row b { flex: 0 0 auto; font-size: .52rem; white-space: nowrap; }
    .ai-card-row .ui-icon { width: 10px; height: 10px; }
    .ai-card-pola { overflow-wrap: anywhere; padding-top: 5px; font-size: .51rem; line-height: 1.4; }
    .ai-actions { display: grid; grid-template-columns: 1fr; }

    /* Centered forms with softer mobile geometry. */
    .ai-console-modal { padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); }
    .ai-console-dialog {
        width: min(100%, 430px);
        max-height: calc(100dvh - 28px);
        margin: auto;
        border-radius: 16px;
        clip-path: none;
        overflow: auto;
    }
    .ai-console-dialog .ai-console { padding: 24px 18px 20px; border-radius: inherit; }
    .ai-console-head { padding-right: 34px; gap: 8px; }
    .ai-eyebrow, .ai-ver { border-radius: 7px; font-size: .56rem; }
    .ai-console h3 { padding-right: 20px; font-size: 1.02rem; line-height: 1.25; }
    .ai-desc { font-size: .78rem; line-height: 1.5; }
    .ai-input { min-height: 46px; border-radius: 10px; }
    .ai-console .ai-btn { min-height: 48px; border-radius: 10px; clip-path: none; }

    /* Exactly three complete booming cards are visible at once. */
    .booming-grid { gap: 6px; padding: 2px 0 8px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
    .booming-grid .ocard {
        flex: 0 0 calc((100% - 12px) / 3);
        min-width: 0;
        border-radius: 10px;
        clip-path: none;
        scroll-snap-align: start;
    }
    .booming-grid .ocard::after { display: none; }
    .booming-grid .othumb { aspect-ratio: 1 / 1; }
    .booming-grid .ocard-signals { min-height: 18px; gap: 3px; }
    .booming-grid .ocard-signals .oribbon { position: static; inset: auto; max-width: calc(100% - 38px); padding: 2px 3px; font-size: .39rem; }
    .booming-grid .ocard-signals .ogauge { position: static; inset: auto; width: auto; min-width: 35px; height: 18px; padding: 0 3px; border-radius: 4px; clip-path: none; }
    .booming-grid .ocard-signals .ogauge::before { display: none; }
    .booming-grid .ocard-signals .ogauge span { font-size: .46rem; }
    .booming-grid .ocard-signals .ogauge span small { font-size: .34rem; }
    .booming-grid .ocard-b { padding: 7px 6px; gap: 5px; }
    .booming-grid .oname { font-size: .59rem; line-height: 1.25; }
    .booming-grid .ometa { gap: 3px; }
    .booming-grid .oprov { font-size: .42rem; }
    .booming-grid .otier { padding: 2px 4px; font-size: .42rem; }
    .booming-grid .obtn { min-height: 31px; padding: 5px 3px; font-size: .5rem; }
    .booming-grid .obtn .ui-icon { width: 11px; height: 11px; }

    /* Provider and filter controls become one sticky mobile command surface. */
    .game-tools {
        position: sticky;
        top: 58px;
        z-index: 70;
        margin: 0 calc(var(--mobile-pad) * -1) 16px;
        padding: 7px var(--mobile-pad) 9px;
        background: rgba(0, 6, 12, .96);
        border-top: 1px solid rgba(0, 217, 255, .12);
        border-bottom: 1px solid #145071;
        box-shadow: 0 18px 34px rgba(0, 0, 0, .58);
        backdrop-filter: blur(16px) saturate(1.25);
    }
    .provider-carousel { margin: 0 0 6px; }
    .provider-carousel::before, .provider-carousel::after { width: 28px; }
    .provider-carousel .pc-arrow { display: grid; width: 34px; height: 58px; border-radius: 10px; }
    .pc-track { gap: 7px; padding: 2px 41px; scroll-padding-inline: 41px; -webkit-overflow-scrolling: touch; }
    .opill {
        flex: 0 0 58px;
        width: 58px;
        min-height: 58px;
        justify-content: center;
        padding: 8px;
        border-radius: 11px;
    }
    .opill-dot, .opill-name, .opill-c { display: none; }
    .opill .oplogo, .opill .opfallback { width: 36px; height: 36px; margin: 0; object-fit: contain; }
    .opill .opfallback { display: block; color: #74dcff; fill: none; stroke: currentColor; stroke-width: 1.7; }
    .opill .oplogo ~ .opfallback { display: none; }
    .opill.active .oplogo, .opill.active .opfallback { filter: brightness(1.28) saturate(1.12) drop-shadow(0 0 8px rgba(0, 229, 255, .58)); }
    .controls {
        position: relative;
        top: auto;
        z-index: 2;
        gap: 10px;
        margin: 0;
        padding: 8px;
        border-radius: var(--mobile-radius);
        background: rgba(3, 12, 20, .96);
        box-shadow: 0 12px 34px rgba(0, 10, 20, .34);
    }
    .tier-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; width: 100%; border-radius: 10px; overflow: hidden; }
    .tier { min-width: 0; min-height: 36px; padding: 6px 4px; justify-content: center; font-size: .56rem; }
    .tier .ui-icon { width: 13px; height: 13px; }
    .controls-right { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 8px; width: 100%; }
    .search, .sort { min-width: 0; min-height: 40px; border-radius: 10px; }
    .search { padding-inline: 10px; }
    .search input { min-width: 0; font-size: .76rem; }
    .sort { width: 112px; padding-inline: 9px; font-size: .7rem; }

    /* Stable horizontal game rows. */
    #grid { grid-template-columns: 1fr; gap: 10px; }
    #grid .ocard {
        height: 120px;
        min-height: 120px;
        display: grid;
        grid-template-columns: 120px minmax(0, 1fr);
        border-radius: var(--mobile-radius);
        clip-path: none;
    }
    #grid .ocard::after { display: none; }
    #grid .othumb { width: 120px; height: 120px; min-height: 0; aspect-ratio: 1 / 1; align-self: start; }
    #grid .ocard-b { min-width: 0; height: 120px; justify-content: center; gap: 4px; padding: 7px 10px; }
    #grid .ocard-signals { min-height: 20px; }
    #grid .ocard-signals .oribbon { padding: 2px 6px; font-size: .5rem; }
    #grid .oname { display: -webkit-box; overflow: hidden; font-size: .72rem; line-height: 1.18; white-space: normal; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    #grid .oprov { font-size: .5rem; }
    #grid .otier { padding: 1px 5px; font-size: .47rem; }
    #grid .ocard-signals .ogauge { position: static; inset: auto; width: auto; min-width: 54px; height: 20px; padding-inline: 5px; border-radius: 5px; clip-path: none; }
    #grid .ocard-signals .ogauge::before { display: none; }
    #grid .ocard-signals .ogauge span { font-size: .61rem; }
    #grid .obtn { min-height: 30px; padding-block: 4px; border-radius: 8px; font-size: .56rem; }
    #grid .ocard-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
    #grid .ocard-actions .obtn-demo { padding-inline: 9px; }
    .loadmore-wrap .btn { min-height: 44px; border-radius: 10px; }

    .ai-card-top { aspect-ratio: 1 / 1; }
    .ai-card-meta { min-width: 0; gap: 4px; }
    .ai-card-meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ai-card-meta b { flex: 0 0 auto; font-size: .56rem; white-space: nowrap; }
    .ginfo-list > div { padding: 10px 8px; }
    .ginfo-list dt { padding-left: 5px; font-size: .7rem; }
    .ginfo-list dd { max-width: 64%; padding-left: 10px; padding-right: 5px; font-size: .78rem; }
    .ginfo-list dd.rtp { font-size: .9rem; }

    .rating-box { gap: 18px; padding: 18px 14px; border-radius: var(--mobile-radius); clip-path: none; }
    .trust-strip { gap: 8px; }
    .trust { min-height: 72px; padding: 10px; border-radius: 10px; }
    .footer { margin-top: 48px; padding-bottom: 30px; text-align: center; }
    .footer .wrap::before { text-align: center; }

    .modal-card { width: min(calc(100% - 20px), 560px); max-height: calc(100dvh - 24px); border-radius: 16px; clip-path: none; }
    .modal-head { padding-inline: 16px; }
    .modal-body { grid-template-columns: 1fr; padding-inline: 14px; }
    .modal-actions { display: grid; grid-template-columns: 1fr; }

    /* Keep content unobstructed on small screens. */
    .hot-toast { display: none !important; }
    .fab-daftar {
        display: inline-flex;
        min-width: 154px;
        min-height: 46px;
        bottom: max(10px, env(safe-area-inset-bottom));
        padding: 10px 25px;
        border-radius: 13px;
        clip-path: none;
        font-size: .82rem;
        box-shadow: 0 12px 32px rgba(0, 118, 221, .35) !important;
    }
    .back-top { right: 12px; bottom: calc(66px + env(safe-area-inset-bottom)); width: 40px; height: 40px; border-radius: 11px; }

    @media (hover: none) {
        .ocard:hover { transform: none; }
    }
}

@media (max-width: 380px) {
    .mobile-brand-lockup { gap: 6px; }
    .mobile-brand-lockup img { width: 27px; height: 27px; }
    .mobile-brand-lockup b { font-size: .72rem; }
    .topbar-cta .btn { padding-inline: 11px; }
    .topbar-cta .btn-gold { min-width: 80px; }
    .hero-inner { min-height: 0; padding: 6px 10px; }
    .hero h1 { font-size: .98rem; }
    .hero-sub { font-size: .43rem; }
    .jamgacor { margin-top: 4px; padding: 3px 6px; font-size: .4rem; }
    .stat { flex-basis: 50%; }
    .ai-slide { min-height: 350px; padding-inline: 18px; }
    .ai-title { font-size: 1.8rem; }
    .ai-feature-row span { font-size: .5rem; }
    .controls-right { grid-template-columns: minmax(0, 1fr) 104px; }
    .sort { width: 104px; }
    #grid .ocard { height: 112px; min-height: 112px; grid-template-columns: 112px minmax(0, 1fr); }
    #grid .othumb { width: 112px; height: 112px; }
    #grid .ocard-b { height: 112px; gap: 3px; padding: 6px 8px; }
    #grid .ocard-signals { min-height: 18px; }
    #grid .ocard-signals .oribbon { padding-inline: 4px; font-size: .45rem; }
    #grid .ocard-signals .ogauge { min-width: 49px; height: 18px; padding-inline: 4px; }
    #grid .ocard-signals .ogauge span { font-size: .55rem; }
    #grid .oname { font-size: .66rem; }
    #grid .oprov { font-size: .44rem; }
    #grid .otier { font-size: .42rem; }
    #grid .obtn { min-height: 27px; font-size: .51rem; }
}

@media (prefers-reduced-motion: reduce) and (max-width: 820px) {
    .stats, .booming-grid, .pc-track { scroll-behavior: auto; }
}
