:root{
    --bg:#f6f8fb;
    --ink:#1e293b;
    --muted:#64748b;
    --line:#e2e8f0;
    --brand:#3b82f6;
    --brand-dark:#2563eb;
    --brand-2:#6366f1;      /* indigo — second gradient stop */
    --accent:#22d3ee;       /* cyan — hairline accents */
    --header:#0f172a;
    --grad-brand:linear-gradient(135deg,#3b82f6,#6366f1);
    --grad-accent:linear-gradient(90deg,#22d3ee,#3b82f6 45%,#8b5cf6);
    --maxw:1140px;
}
*{margin:0;padding:0;box-sizing:border-box}
/* The HTML `hidden` attribute only hides things through a UA-stylesheet rule of the
   same specificity as any class selector, so ANY component styled with a display
   value (.chat-panel{display:flex}) silently wins and stays on screen with hidden
   set. That is not a subtle bug: the chat panel was open on every page load and no
   control could dismiss it, because el.hidden = true was doing nothing visible.
   Global and !important on purpose — a per-component fix would leave the same trap
   armed for the next thing that uses hidden. */
[hidden]{display:none!important}
body{font-family:'Segoe UI',system-ui,Arial,sans-serif;background:linear-gradient(180deg,#f8fafc 0%,#eef2f9 100%);color:var(--ink);line-height:1.55;min-height:100vh;display:flex;flex-direction:column}
a{color:inherit;text-decoration:none}
.container{max-width:var(--maxw);margin:0 auto;padding:0 20px}
.site-main{flex:1}
:focus-visible{outline:2px solid var(--brand);outline-offset:2px}

/* ---- Assist-session banner (shmy "Assist Order" hand-off) ---- */
.assist-banner{background:#fef3c7;border-bottom:2px solid #f59e0b}
.assist-banner-inner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 20px;font-size:13px;color:#92400e;flex-wrap:wrap}
.assist-end{font-weight:700;text-decoration:underline;white-space:nowrap;color:#92400e}
.assist-end:hover{color:#78350f}

/* ---- Header / menu ---- */
.site-header{background:linear-gradient(120deg,#0b1220 0%,#0f172a 55%,#141e38 100%);position:sticky;top:0;z-index:50;box-shadow:0 4px 24px rgba(2,6,23,.35)}
.site-header::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--grad-accent);opacity:.85}
.header-inner{display:flex;align-items:center;gap:24px;height:64px}
.brand{display:inline-flex;align-items:center;font-weight:800;font-size:20px;letter-spacing:.5px;color:#fff}
.brand-logo{display:block;height:36px;width:auto}
.main-nav{flex:1}
.main-nav ul{list-style:none;display:flex;gap:4px}
.main-nav a{display:block;padding:8px 14px;border-radius:8px;color:#cbd5e1;font-size:15px;font-weight:500;transition:background .15s,color .15s}
.main-nav a:hover{background:rgba(255,255,255,.08);color:#fff}
.main-nav a.active{color:#fff;background:linear-gradient(135deg,rgba(59,130,246,.4),rgba(99,102,241,.4));box-shadow:inset 0 0 0 1px rgba(147,197,253,.35)}
.header-actions{display:flex;gap:10px;align-items:center}

/* Phone-bar pieces: hidden on desktop, where the brand + nav + auth row still rules.
   They only light up inside the 820px block further down. */
.hdr-icon,.hdr-locale,.hdr-searchrow{display:none}
.hdr-icon{position:relative;flex:0 0 auto;background:none;border:none;padding:8px;cursor:pointer;color:#e2e8f0;border-radius:10px}
.hdr-icon:hover{background:rgba(255,255,255,.08)}
.hdr-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hdr-dot{position:absolute;top:6px;right:6px;width:8px;height:8px;border-radius:50%;background:#22d3ee;box-shadow:0 0 0 2px #0f172a}
/* Locale chip — pairs with the account icon on the right, showing the resolved pair so
   a shopper can see "EN · MYR" without opening anything. */
.hdr-locale{flex:0 1 auto;min-width:0;align-items:center;gap:6px;background:rgba(255,255,255,.08);
            border:1px solid rgba(148,163,184,.25);border-radius:999px;padding:7px 12px;cursor:pointer;
            color:#e2e8f0;font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden}
.hdr-locale:hover{background:rgba(255,255,255,.14)}
.hdr-locale svg{width:16px;height:16px;flex:0 0 16px;fill:none;stroke:currentColor;stroke-width:1.8}
.hdr-locale span{overflow:hidden;text-overflow:ellipsis}

/* The one and only second layer: revealed by the search icon, gone again on cancel. */
.hdr-searchrow{border-top:1px solid rgba(148,163,184,.16);background:rgba(2,6,23,.35)}
.hdr-searchrow-inner{display:flex;align-items:center;gap:10px;padding:10px 8px}
.hdr-searchcancel{flex:0 0 auto;background:none;border:none;color:#93c5fd;font-size:14px;font-weight:600;cursor:pointer;padding:8px 4px}
.hdr-search{flex:1 1 auto;min-width:0;position:relative;display:flex;align-items:center}
.hdr-search-icon{position:absolute;left:12px;width:18px;height:18px;fill:none;stroke:#94a3b8;stroke-width:2;stroke-linecap:round;pointer-events:none}
.hdr-search input{width:100%;min-width:0;height:40px;padding:0 14px 0 38px;border-radius:999px;border:1px solid rgba(148,163,184,.25);
                  background:rgba(255,255,255,.08);color:#fff;font-size:16px;-webkit-appearance:none}
.hdr-search input::placeholder{color:#94a3b8}
.hdr-search input:focus{outline:none;border-color:rgba(147,197,253,.6);background:rgba(255,255,255,.14)}
/* Safari puts its own clear button on type=search and it fights the pill shape */
.hdr-search input::-webkit-search-decoration,.hdr-search input::-webkit-search-cancel-button{-webkit-appearance:none}

/* ---- Drawers (phone header) ----
   One component, two positions: the left icon opens navigation, the right icon opens
   the account. Markup is server-rendered; assets/js/nav.js only toggles these classes. */
html.drawer-open,html.drawer-open body{overflow:hidden}
.drawer-backdrop{position:fixed;inset:0;z-index:90;background:rgba(2,6,23,.55);opacity:0;transition:opacity .25s ease}
.drawer-backdrop.is-in{opacity:1}
.drawer{position:fixed;top:0;bottom:0;z-index:91;width:min(84vw,320px);display:flex;flex-direction:column;
        background:linear-gradient(160deg,#0b1220,#141e38);color:#e2e8f0;box-shadow:0 0 50px rgba(2,6,23,.6);
        transition:transform .28s ease}
.drawer-left{left:0;transform:translateX(-100%);padding-left:env(safe-area-inset-left)}
.drawer-right{right:0;transform:translateX(100%);padding-right:env(safe-area-inset-right)}
.drawer.is-in{transform:translateX(0)}
.drawer-head{display:flex;align-items:center;justify-content:space-between;gap:10px;
             padding:calc(14px + env(safe-area-inset-top)) 16px 14px;border-bottom:1px solid rgba(148,163,184,.16)}
.drawer-title{font-weight:700;font-size:16px;color:#fff}
.drawer-close{background:none;border:none;color:#94a3b8;font-size:26px;line-height:1;cursor:pointer;padding:0 6px;border-radius:8px}
.drawer-close:hover{color:#fff;background:rgba(255,255,255,.1)}
.drawer-nav{overflow-y:auto;padding:8px 0}
.drawer-nav ul{list-style:none}
.drawer-nav a{display:block;padding:14px 20px;font-size:16px;color:#cbd5e1}
.drawer-nav a:hover{background:rgba(255,255,255,.06);color:#fff}
.drawer-nav a.active{color:#fff;background:linear-gradient(90deg,rgba(59,130,246,.35),transparent);box-shadow:inset 3px 0 0 var(--accent)}
/* Bottom-sheet variant, for the locale picker: a list you pick one thing from and
   dismiss. Both side positions were already taken (left = nav, right = account). */
.drawer-bottom{left:0;right:0;top:auto;bottom:0;width:auto;max-height:min(76vh,560px);
               border-radius:18px 18px 0 0;transform:translateY(100%);
               padding-bottom:env(safe-area-inset-bottom)}
/* Explicit rather than leaning on .drawer.is-in's translateX(0) to cancel a Y offset —
   it would work, but "slide up" should say translateY, not rely on a sibling rule
   replacing the whole transform. */
.drawer-bottom.is-in{transform:translateY(0)}
.drawer-scroll{overflow-y:auto;padding:6px 0 14px}
.locale-group{padding:14px 20px 6px;font-size:12px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:#64748b}
.locale-list{display:block}
.locale-opt{display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;
            padding:13px 20px;background:none;border:none;cursor:pointer;color:#cbd5e1;font-size:15px;text-align:left}
.locale-opt:hover{background:rgba(255,255,255,.06);color:#fff}
.locale-opt.is-active{color:#fff;background:linear-gradient(90deg,rgba(59,130,246,.28),transparent);box-shadow:inset 3px 0 0 var(--accent)}
.locale-code{font-size:12px;font-weight:700;color:#94a3b8;letter-spacing:.5px}
.locale-opt.is-active .locale-code{color:#7dd3fc}
.locale-note{padding:2px 20px 8px;font-size:13px;color:#64748b}
.drawer-body{padding:18px 20px;display:flex;flex-direction:column;gap:10px}
.drawer-greet{font-size:15px;color:#cbd5e1;margin-bottom:4px}
.drawer-body .btn-ghost{color:#e2e8f0}
/* The social buttons and their divider were built for the white auth card; inside the
   dark drawer the divider rule and its label would all but vanish. */
.drawer-body .social-buttons{gap:10px}
.drawer-body .auth-divider{color:#64748b;margin:14px 0}
.drawer-body .auth-divider::before,.drawer-body .auth-divider::after{background:linear-gradient(90deg,transparent,rgba(148,163,184,.35),transparent)}

/* ---- Buttons ---- */
.btn{display:inline-flex;align-items:center;justify-content:center;padding:9px 18px;border-radius:10px;font-weight:600;font-size:14px;cursor:pointer;border:1px solid transparent;transition:background .15s,border-color .15s,color .15s,box-shadow .2s,transform .15s}
.btn-primary{background:var(--grad-brand);color:#fff;box-shadow:0 2px 12px rgba(59,130,246,.35)}
.btn-primary:hover{box-shadow:0 4px 18px rgba(79,70,229,.45);transform:translateY(-1px)}
.btn-ghost{background:transparent;color:#e2e8f0;border-color:rgba(255,255,255,.25)}
.btn-ghost:hover{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.45)}
.btn-lg{padding:13px 26px;font-size:16px}

/* ---- Hero / banner ---- */
.hero{position:relative;color:#fff;background:
    radial-gradient(1100px 520px at 88% -12%,rgba(139,92,246,.55),transparent 62%),
    radial-gradient(900px 460px at -8% 112%,rgba(34,211,238,.32),transparent 60%),
    linear-gradient(135deg,#172554 0%,#1d4ed8 52%,#5b5bd6 100%)}
.hero-inner{display:flex;align-items:center;gap:40px;padding:72px 20px;min-height:340px}
.hero-copy{flex:1}
.hero-copy h1{font-size:clamp(28px,4vw,46px);line-height:1.12;margin-bottom:16px;letter-spacing:-.5px;text-shadow:0 2px 18px rgba(2,6,23,.25)}
.hero-copy p{font-size:18px;color:rgba(255,255,255,.88);max-width:520px;margin-bottom:28px}
.hero-cta{display:flex;gap:14px;flex-wrap:wrap}
.hero .btn-primary{background:#fff;color:#1d4ed8;box-shadow:0 4px 20px rgba(2,6,23,.3)}
.hero .btn-primary:hover{box-shadow:0 6px 26px rgba(2,6,23,.4)}
.hero-art{flex:0 0 240px;display:flex;justify-content:center;align-items:center}
.hero-badge{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.3);padding:24px 32px;border-radius:18px;font-size:22px;font-weight:700;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);box-shadow:0 10px 40px rgba(2,6,23,.35),inset 0 1px 0 rgba(255,255,255,.25)}

/* ---- Home banner carousel ----
   Desktop and mobile are two different presentations of the same track, not one
   layout at two widths:
     desktop  contained to --maxw, rounded, cinematic 1180x300 strip, arrows on hover
     phone    full-bleed edge to edge, near-full-screen portrait (88% of the screen
              incl. header, so the next section peeks), no arrows, swipe + floating dots
   The 767px split is about ARTWORK SHAPE, so it deliberately does not line up with
   the 820px chrome breakpoint used by the header/hero — a 800px tablet wants the
   wide crop, not a 1000px-tall portrait one. It must stay in step with the
   `media` attribute on <source> in inc/banner.php: same number, both places. */
.banner{--banner-radius:18px;padding:22px 0 8px}
.banner-viewport{position:relative;max-width:var(--maxw);margin:0 auto;padding:0 20px}
/* scroll-snap does the swiping; scrollbar hidden because the dots are the affordance */
.banner-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;border-radius:var(--banner-radius);box-shadow:0 14px 40px rgba(15,23,42,.18);-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}
.banner-track::-webkit-scrollbar{display:none}
/* Mouse drag-to-swipe (banner.js). Snapping is switched OFF for the duration of a
   drag: with `mandatory` still on, every scrollLeft written mid-drag gets yanked back
   to a snap point and the banner judders. It is restored on release, which is what
   makes the slide settle. Touch never enters this path — it has native paged scrolling. */
.banner-track{cursor:grab}
.banner-track.is-dragging{cursor:grabbing;scroll-snap-type:none;scroll-behavior:auto}
.banner-track.is-dragging img{pointer-events:none}
.banner-slide{flex:0 0 100%;scroll-snap-align:center;scroll-snap-stop:always}
.banner-media{display:block;position:relative;background:#0f172a}
/* aspect-ratio (not a fixed height) reserves the box before the image decodes, so the
   page below never jumps once it arrives */
.banner-media,.banner-media picture{display:block}
.banner-media img{display:block;width:100%;height:100%;object-fit:cover;aspect-ratio:1180/300}
.banner-slide a.banner-media img{transition:transform .5s ease}
.banner-slide a.banner-media:hover img{transform:scale(1.015)}

/* Arrows: quiet until the pointer is over the carousel, always there for keyboards */
.banner-arrow{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border:none;border-radius:50%;background:rgba(15,23,42,.45);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .2s,background .2s;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.banner-arrow svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.banner-arrow:hover{background:rgba(15,23,42,.72)}
.banner-arrow-prev{left:34px}
.banner-arrow-next{right:34px}
.banner:hover .banner-arrow,.banner-arrow:focus-visible{opacity:1}

/* Dots */
.banner-dots{display:flex;justify-content:center;gap:8px;padding:14px 0 2px}
.banner-dot{width:26px;height:16px;padding:0;border:none;background:none;cursor:pointer;display:flex;align-items:center;justify-content:center}
.banner-dot span{display:block;width:100%;height:4px;border-radius:99px;background:#cbd5e1;transition:background .2s,transform .2s}
.banner-dot:hover span{background:#94a3b8}
.banner-dot.is-active span{background:var(--grad-brand);transform:scaleY(1.5)}
.banner.is-single .banner-dots{display:none}

@media (max-width:767px){
    /* Full-bleed: break out of .container so the artwork touches both edges. Squeezing
       a promo into 20px side gutters on a phone is exactly the "小气" look the tall
       crop exists to avoid. */
    .banner{position:relative;padding:0}
    .banner-viewport{padding:0;max-width:none}
    .banner-track{border-radius:0;box-shadow:none}

    /* ★ The inline banner is now the SMALL state. Filling the first screen is the
       intro overlay's job (assets/js/banner.js, phone first visit of a session);
       once you are in the store the promo is a 4:5 card you can tap to reopen
       full-screen, and the space below it belongs to the category entries — the
       thing a returning customer actually came for. 9:16 artwork centre-crops into
       4:5, losing some top and bottom, which is the right trade for a preview whose
       uncropped version is one tap away. */
    .banner-media img{aspect-ratio:1080/1350;max-height:none}
    .banner-media{cursor:pointer}
    /* a slide with no mobile artwork keeps the wide ratio rather than being
       centre-cropped into a portrait box */
    .banner-slide.is-wide .banner-media img{aspect-ratio:1180/300;height:auto}

    /* Scrim so the overlaid white dots stay readable over pale artwork */
    .banner-media::after{content:"";position:absolute;left:0;right:0;bottom:0;height:96px;background:linear-gradient(to top,rgba(2,6,23,.5),transparent);pointer-events:none}

    .banner-arrow{display:none}            /* the swipe is the control here */
    /* Dots move ON TO the artwork: below it they would eat into the peek, and floating
       them over the image is the app-carousel convention anyway */
    .banner-dots{position:absolute;left:0;right:0;bottom:14px;z-index:2;padding:0}
    .banner-dot{width:22px}
    .banner-dot span{height:5px;background:rgba(255,255,255,.5)}
    .banner-dot:hover span{background:rgba(255,255,255,.7)}
    .banner-dot.is-active span{background:#fff;transform:none;box-shadow:0 1px 5px rgba(2,6,23,.5)}
    .banner-slide a.banner-media:hover img{transform:none}
}

/* ---- Full-screen banner overlay (.bx) — built by assets/js/banner.js ----
   Two modes share these styles:
     .bx-intro   phone, first visit of a session: the promos ARE the screen. Over the
                 header (z-index 200 > 50), edge to edge, no gap under it — swipe to
                 the end and you land in the store.
     .bx-viewer  tap the smaller inline banner to reopen that slide full-screen.
   Everything here is only ever attached by JS, so a browser without it never gets a
   layer it cannot dismiss. */
html.bx-open, html.bx-open body{overflow:hidden}
.bx{position:fixed;inset:0;z-index:200;display:flex;flex-direction:column;background:#080d18;opacity:0;transition:opacity .28s ease}
.bx.is-in{opacity:1}
.bx.is-out{opacity:0}
.bx-track{flex:1;min-height:0;display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch}
.bx-track::-webkit-scrollbar{display:none}
.bx-slide{flex:0 0 100%;scroll-snap-align:center;scroll-snap-stop:always;position:relative;overflow:hidden}
.bx-slide picture{display:block;width:100%;height:100%}
.bx-slide img{display:block;width:100%;height:100%;object-fit:cover}

/* Caption + CTA sit on the artwork, over a scrim, because the slide is the whole
   screen — there is no "below the image" to put them in. The link that the inline
   banner used to follow on tap lives here now. */
.bx-cap{position:absolute;left:0;right:0;bottom:0;padding:0 20px calc(96px + env(safe-area-inset-bottom));
        background:linear-gradient(to top,rgba(2,6,23,.88) 30%,rgba(2,6,23,.45) 70%,transparent);
        display:flex;flex-direction:column;align-items:flex-start;gap:14px}
.bx-title{color:#fff;font-size:22px;font-weight:700;line-height:1.25;text-shadow:0 2px 14px rgba(2,6,23,.6)}
.bx-cta{align-self:stretch;min-height:50px;font-size:16px}

/* Dismiss: "Skip" while the intro is gating the store, a plain × in viewer mode.
   Always on screen — a shopper who does not realise they should swipe must never be
   stuck behind a promo. */
.bx-dismiss{position:absolute;top:calc(12px + env(safe-area-inset-top));right:calc(12px + env(safe-area-inset-right));
            z-index:2;border:none;cursor:pointer;color:#fff;font-size:14px;font-weight:600;
            padding:9px 16px;border-radius:999px;background:rgba(2,6,23,.5);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.bx-dismiss-x{font-size:24px;line-height:1;padding:6px 14px}
.bx-dots{position:absolute;left:0;right:0;bottom:calc(58px + env(safe-area-inset-bottom));display:flex;justify-content:center;gap:7px;z-index:2}
.bx-dot{width:22px;height:4px;border-radius:99px;background:rgba(255,255,255,.4);transition:background .2s}
.bx-dot.is-active{background:#fff}
.bx-hint{position:absolute;left:0;right:0;bottom:calc(24px + env(safe-area-inset-bottom));text-align:center;
         color:rgba(255,255,255,.65);font-size:13px;z-index:2}

/* The panel after the last promo. Scrolling onto it is what "swipe to the end to
   enter" means — no second gesture — and the button is there for anyone who would
   rather tap than discover that. */
.bx-exit{display:flex;align-items:center;justify-content:center;background:
    radial-gradient(700px 420px at 50% 20%,rgba(59,130,246,.35),transparent 65%),#080d18}
.bx-enter{min-height:52px;font-size:17px;padding:14px 34px}

@media (prefers-reduced-motion:reduce){
    .bx{transition:none}
}

/* ---- Footer ---- */
.site-footer{position:relative;background:linear-gradient(180deg,#0f172a 0%,#0b1120 100%);color:#cbd5e1}
.site-footer::before{content:"";position:absolute;left:0;right:0;top:0;height:2px;background:var(--grad-accent);opacity:.6}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:30px;padding:52px 20px 36px}
.footer-col h4{color:#e2e8f0;font-size:12px;text-transform:uppercase;letter-spacing:1.2px;margin-bottom:14px}
.footer-col ul{list-style:none}
.footer-col li{margin-bottom:9px}
.footer-col a{color:#94a3b8;font-size:14px;transition:color .15s}
.footer-col a:hover{color:#7dd3fc}
.footer-col .muted{color:#64748b;font-size:14px;margin-top:10px;max-width:260px}
.footer-col .brand{margin-bottom:8px}
.footer-col .brand-logo{height:40px}
.footer-bottom{border-top:1px solid rgba(148,163,184,.14);padding:18px 0}
.footer-bottom .container{display:flex;justify-content:space-between;align-items:center;color:#64748b;font-size:13px}

/* ---- Header user state ---- */
.user-greet{color:#cbd5e1;font-size:14px;margin-right:4px}

/* ---- Auth (login) page ---- */
.auth-wrap{display:flex;justify-content:center;padding:56px 20px}
.auth-card{position:relative;overflow:hidden;background:#fff;width:100%;max-width:420px;border-radius:16px;border:1px solid rgba(226,232,240,.9);box-shadow:0 12px 40px rgba(15,23,42,.1);padding:36px 30px 32px}
.auth-card::before{content:"";position:absolute;left:0;right:0;top:0;height:3px;background:var(--grad-accent)}
.auth-card h1{font-size:24px;margin-bottom:22px;text-align:center;letter-spacing:-.3px}
.alert-error{background:#fde2e2;color:#991b1b;padding:11px 14px;border-radius:8px;font-size:14px;margin-bottom:18px}
.social-buttons{display:flex;flex-direction:column;gap:10px}
.btn-social{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border-radius:10px;font-weight:600;font-size:15px;border:1px solid var(--line);min-height:48px;transition:background .15s,box-shadow .2s}
.btn-google{background:#fff;color:#1f2937;border-color:#dadce0}
.btn-google:hover{background:#f8fafc;box-shadow:0 2px 10px rgba(15,23,42,.08)}
.btn-facebook{background:linear-gradient(135deg,#1877f2,#0f5fd7);color:#fff;border-color:transparent}
.btn-facebook:hover{box-shadow:0 3px 14px rgba(24,119,242,.4)}
.auth-divider{display:flex;align-items:center;text-align:center;color:var(--muted);margin:20px 0;font-size:13px}
.auth-divider::before,.auth-divider::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,transparent,var(--line),transparent)}
.auth-divider span{padding:0 12px}
.auth-form{display:flex;flex-direction:column;gap:16px}
.auth-form label{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:600;color:#374151}
/* 16px inputs prevent iOS Safari auto-zoom on focus (mobile / wrapped app) */
.auth-form input{padding:12px 14px;border:1px solid #d1d5db;border-radius:10px;font-size:16px;min-height:48px;transition:border-color .15s,box-shadow .15s}
.auth-form input:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px rgba(59,130,246,.15)}
.btn-block{width:100%;min-height:48px;font-size:16px}
.auth-alt{text-align:center;margin-top:18px;font-size:14px;color:var(--muted)}
.auth-alt a{color:var(--brand);font-weight:600}
.auth-alt a:hover{text-decoration:underline}

/* ---- Responsive ---- */
@media (max-width:820px){
    /* ---- ONE-ROW phone bar: [menu] [search] [account] ----
       Replaces the two-row header (brand + auth, then a scrolling nav strip) that this
       used to be. Two rows cost 115px of a 812px screen before any content, and the nav
       strip had "Support" hanging off the edge no matter how it was scrolled. The links
       move into a drawer instead, which is where a phone expects them.
       The brand is dropped from the bar on purpose — the ask was an icon at each end
       with search between, and there is no room for a wordmark as well. It reappears at
       the top of the nav drawer, which is the first thing the left icon shows. */
    .header-inner{height:56px;gap:6px;padding:0 8px;flex-wrap:nowrap}   /* 8px + the icon buttons own 8px = a 16px optical inset */
    .header-inner > .brand,.main-nav,.header-actions,.hdr-dsearch{display:none}   /* header logo only — the footer and drawer logos stay */
    .hdr-icon{display:inline-flex;align-items:center;justify-content:center}
    /* [menu][search]  <gap>  [locale][account] — the auto margin after search is what
       makes the two right-hand controls read as one group, and it holds whatever width
       the chip ends up at. The chip is still the only shrinkable item, so a long code
       pair squeezes the chip rather than pushing an icon off the edge. */
    .hdr-searchbtn{margin-right:auto}
    .hdr-locale{display:inline-flex}
    .hdr-searchrow{display:block}
    .hero-inner{flex-direction:column;text-align:center;padding:52px 20px}
    .hero-art{flex:none}
    .hero-copy p{margin-left:auto;margin-right:auto}
    .hero-cta{justify-content:center}
    .footer-grid{grid-template-columns:1fr 1fr;padding:40px 20px 28px}
}
@media (max-width:520px){
    .brand-logo{height:32px}
    .btn{padding:8px 14px}
    .hero-cta .btn{flex:1 1 auto}
    .auth-wrap{padding:32px 16px}
    .auth-card{padding:28px 20px 26px}
    .footer-grid{grid-template-columns:1fr}
    .footer-bottom .container{flex-direction:column;gap:6px;text-align:center}
}
@media (prefers-reduced-motion:reduce){
    *{transition:none!important}
}

/* honeypot — visually hidden bait field; real users never see/fill it, bots do */
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

/* ---- Live chat (widget + /chat page; UI built by assets/js/chat.js) ---- */
#chat-widget{position:fixed;right:18px;bottom:18px;z-index:80;display:flex;flex-direction:column;align-items:flex-end;gap:10px}
.chat-bubble{position:relative;width:56px;height:56px;border-radius:50%;border:none;cursor:pointer;font-size:24px;background:var(--grad-brand);color:#fff;box-shadow:0 6px 24px rgba(59,130,246,.45);transition:transform .15s,box-shadow .2s}
.chat-bubble:hover{transform:translateY(-2px);box-shadow:0 8px 28px rgba(79,70,229,.5)}
.chat-dot{position:absolute;top:2px;right:2px;width:12px;height:12px;border-radius:50%;background:#ef4444;border:2px solid #fff}
/* Wider on desktop (user: chat 在 PC 其实可以大一些). The phone size is pinned by the
   520px media query below, so this only grows the pointer experience. */
/* 开关过渡（用户要求 fade + slide）。起始态写在基础规则上、打开态由 .is-open 撤销；
   真正的 display 切换仍归 chat.js 的 setOpen()，因为本文件第 23 行的
   [hidden]{display:none!important} 会让任何过渡在 display:none 上直接失效。 */
.chat-panel{width:min(400px,calc(100vw - 36px));background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 16px 48px rgba(15,23,42,.22);overflow:hidden;display:flex;flex-direction:column;opacity:0;transform:translateY(10px) scale(.98);transform-origin:100% 100%;transition:opacity .18s ease,transform .18s cubic-bezier(.2,.7,.3,1)}
.chat-panel.is-open{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){.chat-panel{transition:none}}
.chat-head{background:linear-gradient(120deg,#0b1220,#141e38);color:#fff;font-weight:700;padding:12px 10px 12px 16px;display:flex;align-items:center;justify-content:space-between;gap:8px}
/* Personalised header: bigger portrait + name, "Support" as subtitle. The avatar and
   meta take the left; the close button stays pinned right (justify-content:space-between
   already puts the last child there, so the avatar+meta are wrapped together). */
/* The header lets the portrait overflow (user: 半边出 header 框都可以 · 上面有点 padding,
   下面尽管超过) — a big face that hangs below the bar reads as a real, prominent person.
   overflow:visible + a padding above it + a large negative bottom margin: the circle sits
   a little down from the top and spills well past the header's lower edge. align-items:
   flex-start so the padding-top is what positions it, not vertical centering. */
.chat-head-agent{padding:16px 10px 12px 14px;overflow:visible;align-items:flex-start}
.chat-head-agent .chat-head-meta{margin-top:2px}
.chat-head-agent .chat-close{margin-top:-4px}
.chat-head-agent .chat-head-avatar{width:76px;height:76px;border-radius:50%;object-fit:cover;flex:0 0 76px;
    border:3px solid rgba(255,255,255,.4);box-shadow:0 6px 18px rgba(2,6,23,.45);margin:-8px 12px -39px 0;position:relative;z-index:1}
/* No agent is talking to this customer yet (or the one who is has no portrait): the
   picture slot shows the ON9 Gamer mark instead of borrowing somebody else's face.
   The brand gradient, so it reads as the shop, not a person. */
.chat-head-agent .chat-head-avatar--logo{display:flex;align-items:center;justify-content:center;
    background:var(--grad-brand);font-size:17px;font-weight:800;letter-spacing:.5px;color:#fff}
.chat-head-meta{display:flex;flex-direction:column;line-height:1.25;margin-right:auto;min-width:0}
.chat-head-name{font-size:15px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-head-sub{font-size:11px;font-weight:500;color:#94a3b8;display:flex;align-items:center;gap:5px}
.chat-head-sub::before{content:"";width:7px;height:7px;border-radius:50%;background:#94a3b8}  /* presence dot — grey by default (unknown) */
.chat-head--online  .chat-head-sub::before{background:#22c55e}   /* real online (within support hours) */
.chat-head--offline .chat-head-sub::before{background:#94a3b8}   /* outside hours */
/* Support-hours strip: one honest line under the header. */
.chat-hours{padding:7px 14px;font-size:12px;font-weight:500;color:#475569;background:#f1f5f9;border-bottom:1px solid var(--line);text-align:center}
.chat-hours--offline{color:#64748b;background:#f8fafc}
.chat-close{background:none;border:none;color:#94a3b8;font-size:24px;line-height:1;cursor:pointer;padding:0 8px;border-radius:8px;transition:color .15s,background .15s}
.chat-close:hover{color:#fff;background:rgba(255,255,255,.12)}
.chat-panel-body{display:flex;flex-direction:column}
.chat-panel-body .chat-log{height:min(64vh,520px)}
.chat-log{overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:8px;background:#f8fafc}
.chat-msg{max-width:82%;padding:8px 12px;border-radius:12px;font-size:14px;overflow-wrap:break-word;white-space:pre-wrap;display:flex;flex-direction:column;gap:4px}
.chat-me{align-self:flex-end;background:var(--grad-brand);color:#fff;border-bottom-right-radius:4px}
.chat-admin{align-self:flex-start;background:#fff;border:1px solid var(--line);border-bottom-left-radius:4px}
/* Admin reply with a portrait: [round avatar][bubble]. The avatar sticks to the bottom
   of the bubble so a tall multi-line reply keeps the face at the reply's start. */
.chat-line-admin{align-self:flex-start;display:flex;align-items:flex-end;gap:8px;max-width:88%}
.chat-line-admin .chat-msg{max-width:100%}
.chat-avatar{width:34px;height:34px;border-radius:50%;object-fit:cover;flex:0 0 34px;background:#e2e8f0;border:1px solid var(--line)}
.chat-system{align-self:center;background:transparent;color:var(--muted);font-size:12px}
/* Per-message time, and a centred day pill between days. time uses currentColor at low
   opacity so it reads on both the blue "me" bubble and the white "admin" bubble. */
.chat-time{align-self:flex-end;font-size:10.5px;opacity:.7;line-height:1;margin-top:2px}
.chat-daysep{align-self:center;margin:4px 0;display:flex}
.chat-daysep span{background:rgba(15,23,42,.08);color:var(--muted);font-size:11px;font-weight:600;padding:3px 12px;border-radius:999px}
/* An image message: the picture is the payload, so the bubble hugs it (no padding) and
   the image is a capped, rounded thumbnail that opens full-size in a new tab. */
.chat-msg:has(.chat-img){padding:4px;max-width:70%}
.chat-img{display:block;line-height:0}
.chat-img img{display:block;max-width:100%;max-height:220px;border-radius:9px;object-fit:cover}
/* Optimistic "uploading" bubble — local preview dimmed, with a spinner over it, shown the
   instant an image is picked and removed when the real message arrives. */
.chat-uploading{position:relative;padding:4px;max-width:70%}
.chat-uploading-img{display:block;max-width:100%;max-height:220px;border-radius:9px;object-fit:cover;opacity:.55}
.chat-uploading-spin{position:absolute;top:50%;left:50%;width:26px;height:26px;margin:-13px 0 0 -13px;
    border:3px solid rgba(255,255,255,.5);border-top-color:#fff;border-radius:50%;animation:chatSpin .8s linear infinite}
@keyframes chatSpin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.chat-uploading-spin{animation:none}}
.chat-form{display:flex;gap:8px;padding:10px;border-top:1px solid var(--line);background:#fff;align-items:center}
.chat-form input[type="text"]{flex:1 1 0;min-width:0;padding:10px 12px;border:1px solid #d1d5db;border-radius:10px;font-size:16px;min-height:44px}
.chat-form input[type="text"]:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px rgba(59,130,246,.15)}
/* Emoji button */
.chat-emoji-btn{flex:0 0 auto;width:40px;height:40px;display:flex;align-items:center;justify-content:center;background:none;border:none;border-radius:10px;color:var(--muted);cursor:pointer;font-size:20px;line-height:1}
.chat-emoji-btn:hover{background:#f1f5f9;color:var(--brand)}
/* Morphing action button: a round "+" (attach) while empty, a pill "Send" once there's
   text. One control, WeChat-style. */
.chat-action{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;border:none;
    font-size:14px;font-weight:600;color:#fff;background:var(--grad-brand);transition:width .12s,border-radius .12s,background .15s}
.chat-action{height:40px;padding:0 14px;border-radius:20px;margin-left:-2px}   /* Send pill — tucked so it never overflows the panel */
.chat-action.is-attach{width:40px;padding:0;border-radius:50%;background:#eef2f9;color:var(--muted)}  /* + circle */
.chat-action.is-attach:hover{background:#e2e8f0;color:var(--brand)}
.chat-action.is-attach svg{width:22px;height:22px}
.chat-action:disabled{opacity:.55;cursor:default}
/* Emoji popover — anchored above the composer, scrolls if it overflows */
.chat-form{position:relative}
.chat-emoji-panel{position:absolute;left:8px;right:8px;bottom:56px;z-index:5;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 10px 30px rgba(15,23,42,.18);padding:8px;display:grid;grid-template-columns:repeat(8,1fr);gap:2px;max-height:180px;overflow-y:auto}
.chat-emoji{border:none;background:none;font-size:20px;line-height:1;padding:6px 0;border-radius:8px;cursor:pointer}
.chat-emoji:hover{background:#f1f5f9}

/* Upload progress — a thin bar above the composer. .is-busy is the DEFAULT state: a
   shimmer, visible from the first frame, labelled "Uploading…" then "Processing…".
   The determinate byte-width version only takes over on a link slow enough to report a
   partial transfer. (Measured 2026-08-31: on localhost the only progress event already
   said 100%, so a determinate-first bar sat at width:0 through the whole upload and lit
   up only for the re-encode — it looked like the bar appeared after the upload.) */
.chat-progress{position:relative;background:#f8fafc;border-top:1px solid var(--line);padding:5px 12px 6px}
.chat-progress-bar{height:3px;width:0;background:var(--grad-brand);border-radius:99px;transition:width .15s ease}
.chat-progress-text{display:block;margin-top:3px;font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
/* Indeterminate: used both while the bytes go out and while the server re-encodes —
   the label says which. A determinate bar only appears if a real partial progress
   event arrives (see showProgressBytes in chat.js). */
.chat-progress.is-busy .chat-progress-bar{border-radius:0}
.chat-progress.is-busy .chat-progress-bar{width:100%;animation:chatProcess 1s linear infinite;
    background:linear-gradient(90deg,var(--brand) 0%,var(--brand-2) 50%,var(--brand) 100%);background-size:200% 100%}
@keyframes chatProcess{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* Image lightbox — full-viewport, above everything, tap backdrop / × / Esc to close. */
.chat-lightbox{position:fixed;inset:0;z-index:300;display:flex;align-items:center;justify-content:center;
    padding:24px;background:rgba(2,6,23,.82);opacity:0;transition:opacity .2s ease;cursor:zoom-out}
.chat-lightbox.is-in{opacity:1}
.chat-lightbox img{max-width:100%;max-height:100%;border-radius:10px;box-shadow:0 12px 50px rgba(0,0,0,.5);cursor:default}
.chat-lightbox-close{position:absolute;top:calc(14px + env(safe-area-inset-top));right:18px;width:40px;height:40px;
    border:none;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;font-size:26px;line-height:1;cursor:pointer;backdrop-filter:blur(6px)}
.chat-lightbox-close:hover{background:rgba(255,255,255,.26)}
@media (prefers-reduced-motion:reduce){.chat-lightbox,.chat-progress-bar{transition:none}.chat-progress.is-busy .chat-progress-bar{animation:none}}
.chat-guest{padding:16px;display:flex;flex-direction:column;gap:10px}
.chat-guest p{font-size:14px;color:var(--muted)}
.chat-guest .btn-ghost{color:var(--ink);border-color:var(--line)}
.chat-guest .btn-ghost:hover{background:#f1f5f9;border-color:#cbd5e1}
.chat-ch{gap:8px;justify-content:flex-start}
.chat-ch-icon{width:20px;height:20px;flex:0 0 20px}
.chat-ch-whatsapp .chat-ch-icon{color:#25d366}
.chat-ch-messenger .chat-ch-icon{color:#0084ff}
.chat-ch-wechat .chat-ch-icon{color:#07c160}
.chat-page{padding:36px 0}
.chat-page h1{font-size:26px;margin-bottom:4px}
.chat-page .muted{color:var(--muted);margin-bottom:18px}
#chat-page{background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden;box-shadow:0 8px 30px rgba(15,23,42,.08)}
#chat-page .chat-log{height:min(52vh,480px)}
@media (max-width:520px){
    #chat-widget{right:10px;bottom:10px}
    .chat-panel-body .chat-log{height:min(46vh,300px)}

    /* 手机上聊天铺满整屏（用户要求）。400px 的浮层在手机上两侧都是废边，
       而面板一旦打开，聊天就是用户此刻唯一在做的事 —— 没有理由还留着背景。
       用 :has 判断打开状态而不是 .is-open：淡出的 200ms 里面板仍占屏，全屏布局要维持到真正 hidden。
       （本文件已有 .chat-msg:has(.chat-img)，:has 不是这里新引入的依赖。） */
    #chat-widget:has(.chat-panel:not([hidden])){
        inset:0;padding:0;gap:0;align-items:stretch;z-index:200
    }
    #chat-widget:has(.chat-panel:not([hidden])) .chat-panel{
        width:100%;height:100vh;height:100dvh;max-height:100dvh;
        border:none;border-radius:0;box-shadow:none
    }
    /* dvh 而不是 vh：手机浏览器的地址栏会伸缩，用 vh 会让输入框被顶到屏幕外。
       vh 那行留着做老浏览器兜底。 */

    /* 打开时收起气泡 —— 它是 fixed 的，会浮在全屏面板上挡住输入栏 */
    #chat-widget:has(.chat-panel:not([hidden])) .chat-bubble{display:none}

    /* 全屏时从底部上滑，不缩放 —— 整屏元素做 scale 会显得晃 */
    #chat-widget:has(.chat-panel:not([hidden])) .chat-panel:not(.is-open){transform:translateY(24px)}

    /* 消息区吃掉头部/工时条/输入栏之外的全部高度，而不再是固定的 46vh */
    #chat-widget:has(.chat-panel:not([hidden])) .chat-panel-body{flex:1 1 auto;min-height:0}
    #chat-widget:has(.chat-panel:not([hidden])) .chat-panel-body .chat-log{
        height:auto;flex:1 1 auto;min-height:0
    }

    /* 全屏之后头部有空间了，人脸放大（用户要求）。负的下外边距按比例跟着放大，
       维持「半张脸探出 header」那个效果。 */
    .chat-head-agent .chat-head-avatar{
        width:92px;height:92px;flex:0 0 92px;margin:-6px 14px -46px 0
    }
    .chat-head-agent{padding-top:18px}
    .chat-head-name{font-size:17px}
    .chat-head-sub{font-size:12px}
}

/* ============================================================================
   Catalogue (search / game) + cart — front/common/catalogue.yaml, cart.yaml
   Light page surfaces, so btn-ghost (built for the dark header) is re-inked here.
   ========================================================================== */
.btn-sm{padding:6px 12px;font-size:13px;border-radius:8px}
.btn-link{background:none;border:0;color:var(--muted);font-size:13px;cursor:pointer;padding:4px;text-decoration:underline}
.btn-link:hover{color:#dc2626}
.alert-ok{background:#dcfce7;color:#166534;padding:11px 14px;border-radius:8px;font-size:14px;margin-bottom:18px}
.alert-ok a{color:#166534;font-weight:700;text-decoration:underline;margin-left:6px}
/* padding-block, not the padding shorthand: these sections are also .container, and
   "padding:26px 0 60px" wiped its 20px side gutter (content touched the screen edge on phones). */
.search-page,.cart-page{padding-block:26px 60px}
.search-page h1,.cart-page h1{font-size:26px;margin:0 0 16px}
.search-page .btn-ghost,.cart-page .btn-ghost{color:var(--ink);border-color:var(--line)}
.search-page .btn-ghost:hover,.cart-page .btn-ghost:hover{background:#f1f5f9;border-color:#cbd5e1}

/* search box on the results page */
.search-page-form{display:flex;gap:10px;margin:0 0 20px;max-width:560px}
.search-page-form input[type=search]{flex:1 1 0;min-width:0;padding:11px 14px;border:1px solid var(--line);border-radius:10px;font-size:15px}
.search-page-form input[type=search]:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px rgba(59,130,246,.15)}
.search-empty{padding:24px 0;color:var(--muted)}
.search-empty p{margin:0 0 14px}

.game-card-fallback{font-size:30px;font-weight:800;color:#94a3b8}

/* product icon (game + card pages) */
.game-head-thumb{width:88px;height:88px;flex:0 0 88px;border-radius:16px;overflow:hidden;background:#eef2f7;display:flex;align-items:center;justify-content:center}
.game-head-thumb img{width:100%;height:100%;object-fit:cover}

.denom-was{color:var(--muted);font-size:13px}
.denom-out{color:var(--muted);font-size:13px;font-weight:600}

/* cart */
.cart-list{list-style:none;margin:0 0 20px;padding:0;display:grid;gap:12px}
.cart-line{display:grid;grid-template-columns:64px 1fr auto auto auto;align-items:center;gap:14px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 16px}
.cart-line-thumb{width:64px;height:64px;border-radius:10px;overflow:hidden;background:#eef2f7;display:flex;align-items:center;justify-content:center}
.cart-line-thumb img{width:100%;height:100%;object-fit:cover}
.cart-line-main{display:flex;flex-direction:column;gap:3px;min-width:0}
.cart-line-title{font-weight:600;color:var(--ink);text-decoration:none}
.cart-line-title:hover{color:var(--brand-dark)}
.cart-line-unit{color:var(--muted);font-size:13px}
.cart-line-qty{display:flex;align-items:center;gap:6px}
.cart-line-qty input{width:58px;padding:7px 8px;border:1px solid var(--line);border-radius:8px;text-align:center;font-size:14px}
.cart-line-total{font-weight:700;white-space:nowrap}
.cart-empty{padding:24px 0;color:var(--muted)}
.cart-empty p{margin:0 0 14px}
.cart-foot{border-top:2px solid var(--line);padding-top:18px;display:flex;flex-direction:column;align-items:flex-end;gap:10px}
.cart-total-row{display:flex;gap:16px;align-items:baseline;font-size:18px}
.cart-total-row strong{font-size:22px}
.cart-checkout-note{margin:0}

@media(max-width:640px){
    .cart-line{grid-template-columns:52px 1fr auto;grid-template-areas:"thumb main total" "thumb qty remove";row-gap:8px}
    .cart-line-thumb{width:52px;height:52px;grid-area:thumb}
    .cart-line-main{grid-area:main}
    .cart-line-qty{grid-area:qty}
    .cart-line-total{grid-area:total;text-align:right}
    .cart-line-remove{grid-area:remove;justify-self:end}
}

/* header cart icon (phone hdr-icon + desktop header-cart) + count badge */
.hdr-badge{position:absolute;top:2px;right:0;min-width:16px;height:16px;padding:0 4px;border-radius:9px;background:var(--brand);color:#fff;font-size:11px;font-weight:700;line-height:16px;text-align:center;box-shadow:0 0 0 2px #0f172a}
.header-cart{position:relative;display:inline-flex;align-items:center;justify-content:center;padding:8px;color:#e2e8f0;border-radius:10px}
.header-cart:hover{background:rgba(255,255,255,.08)}
.header-cart svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* Rich text (admin-authored, purified by inc/html.php) — game description etc. */
.rich{font-size:15px;line-height:1.6;color:var(--ink);max-width:70ch}
.rich p{margin:0 0 10px}
.rich ul,.rich ol{margin:0 0 10px;padding-left:22px}
.rich a{color:var(--brand,#2563eb);text-decoration:underline}
.game-desc{margin:0 0 22px;padding:14px 16px;background:#f8fafc;border:1px solid var(--line,#e2e8f0);border-radius:12px}

/* ============================================================================
   Search + browse + product pages — front/common/catalogue.yaml (2026-10-03)
   ========================================================================== */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* desktop header search (the phone bar keeps its own row) */
.hdr-dsearch{flex:0 1 280px;min-width:160px;position:relative;display:flex;align-items:center}
.hdr-dsearch input{width:100%;height:38px;padding:0 14px 0 38px;border-radius:999px;border:1px solid rgba(148,163,184,.25);
                   background:rgba(255,255,255,.08);color:#f1f5f9;font-size:14px}
.hdr-dsearch input::placeholder{color:#94a3b8}
.hdr-dsearch input:focus{outline:none;border-color:rgba(147,197,253,.6);background:rgba(255,255,255,.14)}
.hdr-dsearch input::-webkit-search-decoration,.hdr-dsearch input::-webkit-search-cancel-button{-webkit-appearance:none}
/* Must come after the display:flex above: the phone block earlier in this file hides
   .hdr-dsearch too, but an earlier rule of equal specificity loses (seen on staging: the box
   showed in the 56px phone bar and squeezed the locale chip). The phone bar has its own row. */
@media (max-width:820px){.hdr-dsearch{display:none}}
@media (min-width:821px) and (max-width:1100px){
    .header-inner{gap:14px}
    .main-nav a{padding:8px 9px;font-size:14px}
    .hdr-dsearch{flex-basis:200px}
}

/* live suggestion dropdown (assets/js/search.js) — under either header box */
.suggest{position:absolute;top:calc(100% + 6px);left:0;right:0;min-width:300px;max-height:min(70vh,480px);overflow-y:auto;
         background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 48px rgba(2,6,23,.28);padding:6px;z-index:60;color:var(--ink)}
.hdr-dsearch .suggest{left:auto;width:380px}
.suggest-head{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);padding:8px 10px 4px}
.suggest-row{display:flex;align-items:center;gap:10px;padding:7px 10px;border-radius:10px}
.suggest-row:hover,.suggest-row.is-active,.suggest-all:hover,.suggest-all.is-active{background:#eff6ff}
.suggest-thumb{width:36px;height:36px;flex:0 0 36px;border-radius:8px;overflow:hidden;background:#eef2f7;display:flex;align-items:center;justify-content:center;font-weight:800;color:#94a3b8}
.suggest-thumb img{width:100%;height:100%;object-fit:cover}
.suggest-text{display:flex;flex-direction:column;min-width:0}
.suggest-name{font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.suggest-meta{font-size:12px;color:var(--muted)}
.suggest-none{padding:12px 10px;color:var(--muted);font-size:14px}
.suggest-all{display:block;margin-top:4px;padding:10px;border-top:1px solid var(--line);border-radius:0 0 10px 10px;font-size:13px;font-weight:600;color:var(--brand-dark)}

/* breadcrumb */
.crumbs ol{list-style:none;display:flex;flex-wrap:wrap;gap:6px;font-size:13px;color:var(--muted);margin:0 0 14px}
.crumbs li+li::before{content:"\203A";margin-right:6px;color:#94a3b8}
.crumbs a{color:var(--brand-dark)}
.crumbs a:hover{text-decoration:underline}

/* browse pages */
.browse-page,.product-page{padding-block:22px 60px}
.browse-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 14px}
.browse-head h1{font-size:26px}
.browse-count{margin:0}
.browse-bar{display:grid;grid-template-columns:minmax(0,2fr) repeat(3,minmax(0,1fr)) auto;background:#fff;border:1px solid var(--line);
            border-radius:14px;overflow:hidden;margin:0 0 18px;box-shadow:0 2px 10px rgba(2,6,23,.04)}
.browse-bar-3{grid-template-columns:minmax(0,2fr) repeat(2,minmax(0,1fr)) auto}
.browse-bar.is-live{grid-template-columns:minmax(0,2fr) repeat(3,minmax(0,1fr))}
.browse-bar-3.is-live{grid-template-columns:minmax(0,2fr) repeat(2,minmax(0,1fr))}
.browse-bar.is-live .browse-apply{display:none}
.browse-q,.browse-select{display:block;border-right:1px solid var(--line);min-width:0}
.browse-select:last-of-type{border-right:0}
.browse-bar input,.browse-bar select{width:100%;height:50px;border:0;background-color:transparent;padding:0 16px;font-size:15px;color:var(--ink);font-family:inherit}
.browse-bar select{cursor:pointer;-webkit-appearance:none;appearance:none;padding-right:34px;
                   background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
                   background-repeat:no-repeat;background-position:right 12px center;background-size:16px}
.browse-bar input:focus,.browse-bar select:focus{outline:none;background-color:#f8fafc;box-shadow:inset 0 -2px 0 var(--brand)}
.browse-apply{border-radius:0;height:50px}
.browse-empty{padding:30px 0;text-align:center;color:var(--muted)}
.browse-empty p{margin:0 0 14px}
.browse-page .btn-ghost,.product-page .btn-ghost{color:var(--ink);border-color:var(--line)}

/* product tile grid (browse + search results) */
/* Separate tiles, not gridlines: a filtered list leaves empty cells, and gridlines drawn
   with a coloured gap paint those cells as a grey block. */
.pcard-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.pcard a{display:flex;align-items:center;gap:14px;height:100%;padding:14px 16px;background:#fff;border:1px solid var(--line);border-radius:12px;transition:background .15s,border-color .15s,box-shadow .15s}
.pcard a:hover{background:#f8fbff;border-color:#bfdbfe;box-shadow:0 4px 14px rgba(2,6,23,.06)}
.pcard-thumb{width:56px;height:56px;flex:0 0 56px;border-radius:14px;box-shadow:inset 0 0 0 1px rgba(2,6,23,.06);overflow:hidden;background:#eef2f7;display:flex;align-items:center;justify-content:center}
.pcard-thumb img{width:100%;height:100%;object-fit:cover}
.pcard-thumb .game-card-fallback{font-size:22px}
.pcard-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.pcard-name{font-size:15px;font-weight:700;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.pcard-meta{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pcard-badge{align-self:flex-start;margin-top:2px;font-size:11px;font-weight:700;color:#1d4ed8;background:#dbeafe;border-radius:999px;padding:1px 8px}
@media (max-width:1000px){.pcard-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:760px){
    .pcard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .browse-bar,.browse-bar.is-live,.browse-bar-3,.browse-bar-3.is-live{grid-template-columns:1fr 1fr}
    .browse-q{grid-column:1/-1;border-right:0;border-bottom:1px solid var(--line)}
    .browse-select{border-bottom:1px solid var(--line)}
    .browse-bar-3 .browse-select:last-of-type,.browse-bar .browse-select:last-of-type{border-bottom:0}
    .browse-apply{grid-column:1/-1}
}
@media (max-width:480px){
    .pcard a{flex-direction:column;align-items:flex-start;gap:10px;padding:12px}
    .pcard-name{font-size:14px}
}

/* search results page */
.search-group{margin:0 0 26px}
.search-group-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 10px}
.search-group-head h2{font-size:18px}
.search-group-head a{font-size:14px;font-weight:600;color:var(--brand-dark)}
.search-empty .btn{margin:0 6px 6px 0}

/* product page: main column + sticky buy panel, one form */
.product{display:grid;grid-template-columns:minmax(0,1fr) 360px;background:#fff;border:1px solid var(--line);border-radius:16px;
         box-shadow:0 2px 10px rgba(2,6,23,.04);margin:0 0 22px}
.product-main{min-width:0}
.product-head{display:flex;gap:18px;align-items:center;padding:20px 22px;border-bottom:1px solid var(--line)}
.product-head-copy{min-width:0}
.product-head-copy h1{font-size:22px;margin:0 0 6px;line-height:1.25}
.product-facts{display:grid;gap:2px;font-size:13px;color:var(--muted)}
.product-facts div{display:flex;gap:6px}
.product-facts dt::after{content:":"}
.product-facts dd{color:var(--ink);min-width:0;overflow-wrap:anywhere}
.product-facts a{color:var(--brand-dark)}
.product-none{padding:22px}
.leafs{border:0;margin:0;padding:14px 0 10px;min-width:0}
.leafs+.leafs{border-top:1px solid var(--line)}
.leafs legend{float:left;width:100%;padding:0 22px 8px;font-size:14px;font-weight:700}
.leaf{clear:both;display:flex;align-items:center;gap:12px;padding:12px 22px;cursor:pointer;border-left:3px solid transparent;transition:background .12s}
.leaf:hover{background:#f8fafc}
.leaf.is-picked{background:#eff6ff;border-left-color:var(--brand)}
.leaf.is-out{cursor:not-allowed;opacity:.55}
.leaf input{width:18px;height:18px;flex:0 0 18px;accent-color:var(--brand)}
.leaf-name{flex:1 1 auto;min-width:0;font-size:15px}
.leaf-free{display:inline-block;margin-left:6px;font-size:12px;font-weight:600;color:#15803d}
.leaf-price{display:flex;align-items:baseline;gap:6px;white-space:nowrap}
.leaf-price strong{font-size:15px}
.leaf-unit{font-size:12px;color:var(--muted)}

.buy{background:#f1f5f9;border-left:1px solid var(--line);border-radius:0 16px 16px 0;padding:20px;display:flex;flex-direction:column;gap:12px}
.buy-pick{display:flex;flex-direction:column;gap:2px}
.buy-label{font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.buy-sel{font-size:16px}
.buy-field{display:flex;flex-direction:column;gap:5px;font-size:13px;font-weight:600}
.buy-field input{height:42px;padding:0 12px;border:1px solid #cbd5e1;border-radius:10px;font-size:15px;background:#fff;font-family:inherit}
.buy-field input:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px rgba(59,130,246,.15)}
.buy-qty input{max-width:120px}
.buy-sum{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 14px;display:grid;gap:4px;font-size:14px}
.buy-sum div{display:flex;justify-content:space-between;gap:10px}
.buy-sum dt{color:var(--muted)}
.buy-total{margin-top:6px;padding-top:8px;border-top:1px dashed var(--line);font-size:20px;font-weight:800}
.buy-sum .buy-total dt{color:var(--ink)}
.buy-hint{font-size:12px;color:var(--muted);margin:4px 0 -4px}
.buy-signin{font-size:13px;margin:0}
.buy-signin a{color:var(--brand-dark);font-weight:600}
@media (min-width:901px){.buy{position:sticky;top:76px;align-self:start}}
@media (max-width:900px){
    .product{grid-template-columns:1fr}
    .buy{border-left:0;border-top:1px solid var(--line);border-radius:0 0 16px 16px}
}
@media (max-width:520px){
    .product-head{padding:16px}
    .leafs legend{padding:0 16px 8px}
    .leaf{padding:12px 16px;flex-wrap:wrap}
    .leaf-price{margin-left:30px}
}
.product-desc{margin:0 0 22px}
.product-desc h2,.related h2{font-size:17px;margin:0 0 10px}

/* related products strip (supported games / cards for this game) */
.related{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px 20px;margin:0 0 22px}
.related-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:6px 16px}
.related-list a{display:flex;align-items:center;gap:12px;padding:6px;border-radius:10px}
.related-list a:hover{background:#f5f9ff}
.related-thumb{width:40px;height:40px;flex:0 0 40px;border-radius:9px;overflow:hidden;background:#eef2f7;display:flex;align-items:center;justify-content:center}
.related-thumb img{width:100%;height:100%;object-fit:cover}
.related-thumb .game-card-fallback{font-size:18px}
.related-name{font-size:14px;font-weight:600}

.cart-line-details{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.suggest-thumb .game-card-fallback{font-size:16px}
.leaf-vip{font-size:11px;font-weight:700;color:#b45309;background:#fef3c7;border-radius:999px;padding:1px 7px}

/* Favourites (inc/favourite.php) — ★ toggle on product pages, chip + badge on browse pages */
.product-title{display:flex;align-items:flex-start;gap:12px;flex-wrap:wrap}
.product-title h1{flex:1 1 auto;min-width:0}
.fav-btn{flex:0 0 auto;display:inline-flex;align-items:center;gap:5px;padding:6px 12px;border-radius:999px;border:1px solid var(--line);
         background:#fff;color:var(--muted);font-size:13px;font-weight:600;cursor:pointer;font-family:inherit}
.fav-btn span{font-size:16px;line-height:1}
.fav-btn:hover{border-color:#fcd34d;color:#b45309}
.fav-btn.is-on{background:#fffbeb;border-color:#fcd34d;color:#b45309}
.fav-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;border:1px solid var(--line);background:#fff;
          font-size:13px;font-weight:600;color:var(--ink);cursor:pointer;user-select:none}
.fav-chip:has(input:checked){background:#fffbeb;border-color:#fcd34d;color:#b45309}
.fav-chip input{accent-color:#d97706}
.fav-chip span{color:#d97706}
.pcard-fav{color:#d97706}

/* Suggestion dropdown scrollbar — thin, rounded, no arrow buttons (the default Windows
   bar looked heavy inside a 14px-radius card). Firefox: scrollbar-*; Chromium/Safari:
   ::-webkit-scrollbar. The 4px transparent border keeps the thumb off the card edge. */
.suggest{scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent;max-height:min(75vh,560px)}
.suggest::-webkit-scrollbar{width:12px}
.suggest::-webkit-scrollbar-track{background:transparent;margin:10px 0}
.suggest::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px;border:4px solid transparent;background-clip:padding-box}
.suggest::-webkit-scrollbar-thumb:hover{background-color:#94a3b8}
.suggest::-webkit-scrollbar-button{display:none;height:0}

/* ============================================================================
   Footer v2 (2026-10-04) — contact · bank transfer · "we accept" · info links.
   Data from inc/content.php. Spec: common/layout.yaml#footer
   ========================================================================== */
.footer-grid{grid-template-columns:1.3fr 1.4fr 1fr 1fr;gap:34px}
.footer-company{color:#94a3b8;font-size:13px;margin-top:12px}
.footer-social{display:flex;gap:10px;margin-top:16px}
.footer-social a{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;
                 background:rgba(255,255,255,.06);border:1px solid rgba(148,163,184,.2);color:#cbd5e1}
.footer-social a:hover{background:rgba(125,211,252,.12);color:#7dd3fc}
.footer-social svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* contact list (footer + /directory/contact) */
.ci-list{list-style:none;display:grid;gap:12px}
.ci-list li{display:flex;gap:10px;align-items:flex-start;margin:0}
.ci-list div{display:flex;flex-direction:column;gap:2px;min-width:0}
.ci-list strong{font-size:12px;letter-spacing:.04em;text-transform:uppercase;color:#e2e8f0}
.ci-list span,.ci-list a{font-size:14px;overflow-wrap:anywhere}
.ci-list small{color:#64748b;font-size:12px;margin-left:4px}
/* Footer: first entry per type + a "+N more" pill that slides up the type's sheet */
.ci-more{align-self:flex-start;margin-top:4px;padding:3px 10px;border-radius:999px;border:1px solid rgba(125,211,252,.35);
         background:rgba(125,211,252,.08);color:#7dd3fc;font-size:12px;font-weight:600;cursor:pointer;font-family:inherit}
.ci-more:hover{background:rgba(125,211,252,.18);color:#e0f2fe}
/* The contact sheet: phone = bottom sheet; wider screens = the same sheet, centred and narrow */
.drawer-contact .drawer-title{display:inline-flex;align-items:center;gap:8px}
.drawer-contact .ci-icon{margin:0;width:20px;height:20px;flex-basis:20px}
.contact-sheet{list-style:none;overflow-y:auto;padding:6px 0 14px}
.contact-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 20px;color:#e2e8f0;font-size:16px}
.contact-row > span:first-child{display:flex;flex-direction:column;gap:2px;min-width:0;overflow-wrap:anywhere}
.contact-row small{font-size:13px;color:#94a3b8}
a.contact-row:hover{background:rgba(255,255,255,.06);color:#fff}
.contact-go{font-size:22px;color:#64748b}
.contact-copy{flex:0 0 auto;padding:7px 14px;border-radius:10px;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.06);
              color:#e2e8f0;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit}
.contact-copy:hover{background:rgba(255,255,255,.12)}
.contact-copy.is-done{border-color:#22c55e;color:#86efac}
@media (min-width:821px){
    .drawer-contact{left:0;right:0;width:min(440px,100%);margin:0 auto;border-radius:18px 18px 0 0}
}
.ci-icon{width:18px;height:18px;flex:0 0 18px;margin-top:1px;fill:none;stroke:#7dd3fc;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* bank accounts (footer + /directory/payment_info) — logos sit on white chips */
.bank-list{list-style:none;display:grid;gap:12px}
.bank-list li{display:flex;flex-direction:column;gap:2px;margin:0;font-size:13px}
.bank-logo{align-self:flex-start;background:#fff;border-radius:6px;padding:4px 7px;line-height:0;margin-bottom:3px}
.bank-logo img{height:18px;width:auto}
.bank-acct{font-family:ui-monospace,Consolas,monospace;letter-spacing:.02em}

/* "we accept" strip */
.footer-pay{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:0 20px 28px}
.footer-pay-title{font-size:12px;text-transform:uppercase;letter-spacing:1.2px;color:#e2e8f0;font-weight:700}
.pay-logos{list-style:none;display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0}
.pay-logos li{background:#fff;border-radius:8px;padding:6px 10px;line-height:0;display:flex;align-items:center}
.pay-logos img{height:20px;width:auto}
.pay-logos-light li{border:1px solid var(--line)}

/* bottom bar: info links + copyright */
.footer-bottom .container{gap:12px;flex-wrap:wrap}
.footer-links{display:flex;flex-wrap:wrap;gap:6px 18px}
.footer-links a{color:#94a3b8;font-size:13px}
.footer-links a:hover{color:#7dd3fc}
@media (max-width:1000px){.footer-grid{grid-template-columns:1fr 1fr}}
@media (max-width:520px){.footer-grid{grid-template-columns:1fr}.footer-links{justify-content:center}}

/* info pages (/directory/about, terms, privacy, return, delivery_policy, contact, payment_info, sitemap) */
.info-page{padding-block:22px 60px}
.info-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:22px;align-items:start}
.info-menu ul{list-style:none;margin:0;padding:6px;background:#fff;border:1px solid var(--line);border-radius:14px;display:grid;gap:2px}
.info-menu a{display:block;padding:9px 12px;border-radius:9px;font-size:14px;color:var(--ink)}
.info-menu a:hover{background:#f1f5f9}
.info-menu a.is-on{background:#eff6ff;color:var(--brand-dark);font-weight:700}
.info-body{background:#fff;border:1px solid var(--line);border-radius:16px;padding:26px 30px;min-width:0}
.info-body h1{font-size:26px;margin:0 0 16px}
.info-body h2{font-size:17px;margin:22px 0 10px}
.info-rich{max-width:none}
.info-body .ci-list strong{color:var(--muted)}
.info-body .ci-list a{color:var(--brand-dark)}
.info-body .ci-icon{stroke:var(--brand)}
.contact-company{margin:0 0 18px;line-height:1.6}
.contact-company a{color:var(--brand-dark);margin-left:6px}
.contact-chat-hint{margin-top:18px}
.sitemap-list{list-style:none;display:grid;gap:6px;padding:0}
.sitemap-list a{color:var(--brand-dark)}
@media (max-width:820px){
    .info-layout{grid-template-columns:1fr}
    .info-menu ul{display:flex;overflow-x:auto;gap:4px}
    .info-menu a{white-space:nowrap}
    .info-body{padding:20px 18px}
}

/* Desktop language/currency dropdown (inc/header.php .hdr-ddrop). Phones keep the
   🌐 chip + bottom sheet; the same forms (front_locale_options) live in both. */
.hdr-ddrop{position:relative}
.hdr-ddrop summary{list-style:none}
.hdr-ddrop summary::-webkit-details-marker{display:none}
.hdr-dlocale{display:inline-flex;align-items:center;gap:7px;padding:7px 12px;border-radius:999px;cursor:pointer;
             color:#e2e8f0;font-size:13px;font-weight:600;white-space:nowrap;
             background:rgba(255,255,255,.06);border:1px solid rgba(148,163,184,.25)}
.hdr-dlocale:hover,.hdr-ddrop[open] .hdr-dlocale{background:rgba(255,255,255,.12)}
.hdr-dlocale svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ddrop-panel{position:absolute;right:0;top:calc(100% + 8px);width:300px;max-height:min(70vh,520px);overflow-y:auto;z-index:70;
             background:#0f172a;color:#e2e8f0;border:1px solid rgba(148,163,184,.25);border-radius:14px;box-shadow:0 18px 48px rgba(2,6,23,.45);padding:4px 0 10px;
             scrollbar-width:thin;scrollbar-color:#334155 transparent}
.ddrop-panel .locale-group{padding:12px 16px 6px}
@media (max-width:820px){.hdr-ddrop{display:none}}

/* ============================================================================
   Mobile + app-wrapper polish (2026-10-04)
   ========================================================================== */
/* Safe areas: with viewport-fit=cover (inc/header.php) a full-screen app wrapper draws the
   page under the notch, status bar and home indicator. env() is 0 in an ordinary browser
   tab, so these are no-ops there. */
.site-header{padding-top:env(safe-area-inset-top)}
/* side insets (landscape notch): keep each bar's own gutter — 20px desktop, 8px phone header */
.header-inner,.footer-bottom .container,.footer-grid,.footer-pay{padding-left:max(20px,env(safe-area-inset-left));padding-right:max(20px,env(safe-area-inset-right))}
@media (max-width:820px){.header-inner{padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}}
.site-footer{padding-bottom:env(safe-area-inset-bottom)}
#chat-widget{bottom:calc(18px + env(safe-area-inset-bottom));right:calc(18px + env(safe-area-inset-right))}
.drawer{padding-top:env(safe-area-inset-top)}
.drawer-bottom{padding-top:0;padding-bottom:env(safe-area-inset-bottom)}
@media (max-width:820px){
    #chat-widget{bottom:calc(10px + env(safe-area-inset-bottom));right:calc(10px + env(safe-area-inset-right))}
    #chat-widget:has(.chat-panel:not([hidden])) .chat-panel{padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
}

/* iOS zooms the page when a focused field's text is under 16px. Every form control is
   16px on phones; desktop keeps the tighter sizes. */
@media (max-width:820px){
    input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px}
}

/* Touch targets: at least 44px tall on phones (Apple HIG / WCAG 2.5.8 is 24, 44 is comfortable). */
@media (max-width:820px){
    .fav-btn,.fav-chip{min-height:44px}
    .footer-social a{width:44px;height:44px}
    .footer-links a,.ci-list a{display:inline-block;padding:6px 0}
    .crumbs ol{align-items:center}
    .crumbs a{display:inline-block;padding:6px 0}
}

/* Product page on phones: options as two-column tiles + a bottom bar with the total and the
   main action (inc/product.php .buy-bar). Desktop keeps the old-site list + side panel. */
.buy-bar{display:none}
#buy-panel{scroll-margin-top:calc(72px + env(safe-area-inset-top))}
@media (max-width:900px){
    .leafs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:14px 16px 16px}
    .leafs legend{grid-column:1/-1;float:none;padding:0 0 4px}
    .leaf{position:relative;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:8px;min-height:84px;
          padding:12px;border:1.5px solid var(--line);border-radius:12px;background:#fff;border-left-width:1.5px}
    .leaf:hover{background:#fff}
    .leaf.is-picked{border-color:var(--brand);background:#eff6ff;box-shadow:0 0 0 3px rgba(59,130,246,.15)}
    /* radio stays in the form and keyboard-reachable, just not drawn: the tile is the control */
    .leaf input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
    .leaf:has(input:focus-visible){outline:2px solid var(--brand);outline-offset:2px}
    .leaf-name{font-size:14px;font-weight:600;line-height:1.3}
    .leaf-price{flex-wrap:wrap;margin:0;white-space:normal;gap:2px 6px}
    .leaf-price strong{font-size:15px;color:var(--brand-dark)}
    .buy-bar{display:flex;align-items:center;gap:12px;position:fixed;left:0;right:0;bottom:0;z-index:60;
             padding:10px max(16px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
             background:rgba(255,255,255,.97);border-top:1px solid var(--line);box-shadow:0 -6px 20px rgba(2,6,23,.08)}
    .buy-bar-sum{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}
    .buy-bar-sel{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .buy-bar-sum strong{font-size:18px}
    .buy-bar .btn{flex:0 0 auto;min-height:46px;padding:0 22px;display:inline-flex;align-items:center}
    /* room for the bar at the end of the page, and the chat bubble lifted above it */
    .product-page{padding-bottom:calc(96px + env(safe-area-inset-bottom))}
    body:has(.buy-bar) #chat-widget{bottom:calc(84px + env(safe-area-inset-bottom))}
}

/* Phone browse bar: dropdowns fold behind "Filters (n)" (built by browse.js). */
.browse-filters-btn{display:none}
@media (max-width:760px){
    .browse-filters-btn{display:flex;align-items:center;justify-content:space-between;grid-column:1/-1;height:48px;padding:0 16px;
                        border:0;background:#fff;font:inherit;font-size:15px;font-weight:600;color:var(--ink);cursor:pointer}
    .browse-filters-btn::after{content:"";width:9px;height:9px;border-right:2px solid #64748b;border-bottom:2px solid #64748b;transform:rotate(45deg);margin-top:-4px;transition:transform .15s}
    .browse-filters-btn[aria-expanded="true"]::after{transform:rotate(-135deg);margin-top:4px}
    .browse-filters-btn.is-on{color:var(--brand-dark)}
    .browse-bar.is-folded .browse-select{display:none}
    .browse-bar:not(.is-folded) .browse-filters-btn{border-bottom:1px solid var(--line)}
}

/* Footer: a single bank country spans both bank columns, accounts side by side */
.footer-banks-wide{grid-column:span 2}
.footer-banks-wide .bank-list{grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:14px 20px}
@media (max-width:1000px){.footer-banks-wide{grid-column:auto}}

/* Product description: its own card, readable measure */
.product-desc{background:#fff;border:1px solid var(--line);border-radius:16px;padding:20px 22px}
.product-desc .game-desc{margin:0;padding:0;background:none;border:0;max-width:75ch;white-space:normal;overflow-wrap:anywhere}

/* Home: big search + popular sections (app/pages/home.php) */
.home-search-wrap{padding-block:30px 6px;text-align:center}
.home-search-title{font-size:22px;margin:0 0 14px}
.home-search{position:relative;display:flex;align-items:center;gap:10px;max-width:680px;margin:0 auto;text-align:left}
.home-search .hdr-search-icon{left:18px;width:20px;height:20px;stroke:#64748b}
.home-search input{flex:1 1 auto;min-width:0;height:54px;padding:0 18px 0 48px;border:1px solid var(--line);border-radius:999px;
                   background:#fff;font-size:16px;color:var(--ink);box-shadow:0 6px 20px rgba(2,6,23,.06);font-family:inherit}
.home-search input:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 4px rgba(59,130,246,.15)}
.home-search input::-webkit-search-cancel-button{-webkit-appearance:none}
.home-search .btn{height:54px;padding:0 26px;border-radius:999px}
.home-search .suggest{right:auto;width:100%;max-width:680px}
@media (max-width:520px){
    .home-search .btn{display:none}          /* Enter / the suggestions do the job; keep the field wide */
    .home-search-title{font-size:19px}
    .home-search-wrap{padding-top:22px}
}

/* Home panels (app/pages/home.php): popular / new × top-ups / cards, 6 each.
   Desktop 2×2 with 3-across lists; tablet one panel per row; phones swipe sideways. */
.home-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding-block:26px 50px}
.hpanel{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px 20px 20px;min-width:0}
.hpanel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 14px}
/* Title: sentence case, an icon chip and the tag word (Popular / New) in the tag's colour */
.hpanel-head h2{display:flex;align-items:center;gap:7px;min-width:0;font-size:18px;font-weight:600;line-height:1.25}
.hpanel-icon{display:inline-flex;flex:0 0 auto}
.hpanel-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.hpanel-popular .hpanel-icon,.hpanel-popular .hpanel-tag{color:#f97316}
.hpanel-new .hpanel-icon,.hpanel-new .hpanel-tag{color:var(--brand)}
.hpanel-head a{font-size:13px;font-weight:600;color:var(--muted);white-space:nowrap}
.hpanel-head a:hover{color:var(--brand-dark)}
.hlist{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 16px}
.hlist a{display:flex;align-items:center;gap:12px;min-width:0;border-radius:12px;padding:4px;margin:-4px}
.hlist a:hover{background:#f5f9ff}
.hlist a:hover .hlist-name{color:var(--brand-dark)}
/* App-style icon: big, rounded like a phone launcher icon — the picture is what people scan for */
.app-icon{width:56px;height:56px;flex:0 0 56px;border-radius:14px;overflow:hidden;background:#eef2f7;display:flex;align-items:center;justify-content:center;
          box-shadow:inset 0 0 0 1px rgba(2,6,23,.06)}
.app-icon img{width:100%;height:100%;object-fit:cover}
.app-icon .game-card-fallback{font-size:22px}
.hlist-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.hlist-name{font-size:14px;font-weight:600;line-height:1.3;color:var(--ink);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hlist-meta{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:1000px){.home-panels{grid-template-columns:1fr}}
@media (max-width:760px){
    /* one row of panels that swipes; the next panel peeks in so the swipe is obvious */
    .home-panels{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;
                 padding:22px 20px 40px;scroll-padding-inline:20px;scrollbar-width:none}   /* the section IS the .container: full width already, its own 20px gutter */
    .home-panels::-webkit-scrollbar{display:none}
    .hpanel{flex:0 0 86%;scroll-snap-align:start;padding:16px}
    .hlist{grid-template-columns:1fr;gap:12px}
    .app-icon{width:60px;height:60px;flex-basis:60px}
}
