/* ==========================================================================
   BreadixWorld — единая дизайн-система сайта
   Тёмная тёплая тема «корочка хлеба» + пиксельные акценты Minecraft.
   Все страницы подключают этот файл через main/layout.php.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
    color-scheme: dark;

    --bg: #0c0a09;
    --bg-soft: #120f0d;
    --surface: #17130f;
    --surface-2: #1e1914;
    --surface-3: #27201a;
    --line: rgba(255, 220, 180, .08);
    --line-2: rgba(255, 220, 180, .14);
    --line-3: rgba(255, 220, 180, .24);

    --text: #f8f0e5;
    --text-2: #d9cdbe;
    --muted: #a69684;
    --dim: #786a5c;

    --accent: #ff9f2e;
    --accent-2: #ffc861;
    --accent-3: #ff7a1a;
    --accent-ink: #241303;
    --accent-soft: rgba(255, 159, 46, .14);
    --accent-glow: rgba(255, 140, 30, .45);
    --violet: #a585ff;
    --violet-soft: rgba(165, 133, 255, .14);
    --good: #7fe08d;
    --good-soft: rgba(127, 224, 141, .14);
    --danger: #ff6b5b;
    --danger-soft: rgba(255, 107, 91, .12);

    --font-display: "Unbounded", "Onest", system-ui, sans-serif;
    --font-body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --r-xs: 8px;
    --r-sm: 12px;
    --r: 18px;
    --r-lg: 26px;

    --container: 1240px;
    --gutter: clamp(16px, 4vw, 40px);
    --header-h: 76px;

    --shadow-1: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 32px -18px rgba(0, 0, 0, .8);
    --shadow-2: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 30px 60px -30px rgba(0, 0, 0, .9);
    --ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font: 400 16px/1.6 var(--font-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
body.bx {
    background:
        radial-gradient(1100px 620px at 85% -8%, rgba(255, 140, 40, .10), transparent 62%),
        radial-gradient(900px 520px at -12% 6%, rgba(150, 110, 255, .07), transparent 60%),
        var(--bg);
    display: flex;
    flex-direction: column;
}
body.bx > main { flex: 1 0 auto; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
a, button { -webkit-user-drag: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(255, 159, 46, .35); color: #fff; }
[hidden] { display: none !important; }

html { scrollbar-color: #3a3028 var(--bg); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #3a3028; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #54463a; }

.bx-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;
}
.bx-skip {
    position: fixed; left: 16px; top: -60px; z-index: 200;
    padding: 10px 16px; border-radius: var(--r-sm);
    background: var(--accent); color: var(--accent-ink); font-weight: 700;
    transition: top .2s var(--ease);
}
.bx-skip:focus { top: 12px; }

.bx-container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
.bx-section { padding-block: clamp(56px, 8vw, 104px); }
.bx-section-tight { padding-block: clamp(40px, 5vw, 64px); }

/* ---------- 3. Typography helpers ---------- */
.bx-eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--accent-2);
    font: 600 12px/1 var(--font-body);
    letter-spacing: .16em; text-transform: uppercase;
}
.bx-eyebrow::before {
    content: ""; width: 8px; height: 8px; flex: none;
    background: var(--accent);
    box-shadow: 8px 0 0 var(--accent-2), 0 8px 0 var(--accent-3);
    transform: scale(.75); transform-origin: left top;
    margin-right: 6px;
}
.bx-h1, .bx-page-head h1, .bx-hero h1 {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -.035em;
}
.bx-h2 {
    font-family: var(--font-display);
    font-size: clamp(28px, 3.6vw, 46px);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.1;
}
.bx-h3 { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.bx-lead { color: var(--text-2); font-size: clamp(16px, 1.4vw, 18.5px); line-height: 1.6; max-width: 620px; }
.bx-muted { color: var(--muted); }
.bx-gradient-text {
    background: linear-gradient(100deg, var(--accent-2) 0%, var(--accent) 45%, #ff6a2a 100%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}
.bx-section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 44px); }
.bx-section-head > div { display: grid; gap: 14px; max-width: 680px; }
.bx-section-head p { color: var(--muted); max-width: 440px; }
code, kbd {
    font: 600 .9em/1.2 ui-monospace, "SF Mono", Consolas, monospace;
    padding: .15em .45em; border-radius: 6px;
    background: rgba(255, 220, 180, .08); border: 1px solid var(--line);
    color: var(--accent-2);
    overflow-wrap: anywhere;
}

/* ---------- 4. Buttons & controls ---------- */
.bx-btn {
    --btn-bg: var(--surface-3);
    --btn-fg: var(--text);
    --btn-edge: rgba(0, 0, 0, .45);
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; padding: 12px 22px;
    border: 0; border-radius: var(--r-sm);
    background: var(--btn-bg); color: var(--btn-fg);
    font: 700 15px/1.1 var(--font-body);
    letter-spacing: .005em;
    white-space: nowrap;
    box-shadow: inset 0 -4px 0 var(--btn-edge), inset 0 1px 0 rgba(255, 255, 255, .12);
    transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .2s, filter .2s;
    -webkit-tap-highlight-color: transparent;
}
.bx-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.bx-btn:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 var(--btn-edge), inset 0 1px 0 rgba(255, 255, 255, .1); }
.bx-btn:disabled, .bx-btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.bx-btn-primary {
    --btn-bg: linear-gradient(180deg, #ffbe55 0%, #ff9b2b 55%, #ff8a1f 100%);
    --btn-fg: var(--accent-ink);
    --btn-edge: rgba(130, 50, 0, .55);
    box-shadow: inset 0 -4px 0 var(--btn-edge), inset 0 2px 0 rgba(255, 255, 255, .4), 0 14px 30px -14px var(--accent-glow);
}
.bx-btn-primary:active { box-shadow: inset 0 -1px 0 var(--btn-edge), inset 0 2px 0 rgba(255, 255, 255, .35), 0 6px 16px -10px var(--accent-glow); }
.bx-btn-ghost {
    --btn-bg: rgba(255, 230, 200, .06);
    --btn-edge: rgba(0, 0, 0, .35);
    box-shadow: inset 0 0 0 1px var(--line-2), inset 0 -3px 0 var(--btn-edge);
    backdrop-filter: blur(8px);
}
.bx-btn-ghost:hover { --btn-bg: rgba(255, 230, 200, .1); }
.bx-btn-ghost:active { box-shadow: inset 0 0 0 1px var(--line-2), inset 0 -1px 0 var(--btn-edge); }
.bx-btn-sm { min-height: 40px; padding: 9px 16px; font-size: 14px; border-radius: 10px; }
.bx-btn-lg { min-height: 56px; padding: 15px 28px; font-size: 16.5px; border-radius: 14px; }
.bx-btn-block { width: 100%; }
.bx-btn .bx-icon { flex: none; }

.bx-icon-btn {
    display: inline-grid; place-items: center;
    width: 42px; height: 42px; padding: 0;
    border: 1px solid var(--line-2); border-radius: 12px;
    background: rgba(255, 230, 200, .05); color: var(--text);
    transition: background .2s, border-color .2s;
}
.bx-icon-btn:hover { background: rgba(255, 230, 200, .1); border-color: var(--line-3); }

.bx-link {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--accent-2); font-weight: 600;
}
.bx-link .bx-icon { transition: transform .2s var(--ease); }
.bx-link:hover .bx-icon { transform: translateX(3px); }

/* server address chip */
.bx-address {
    display: inline-flex; align-items: stretch; gap: 0;
    min-height: 56px; padding: 0; text-align: left;
    background: rgba(18, 14, 11, .72);
    border: 1px solid var(--line-2); border-radius: 14px;
    color: var(--text);
    backdrop-filter: blur(10px);
    transition: border-color .2s, background .2s, transform .15s var(--ease);
    overflow: hidden;
    -webkit-user-select: none; user-select: none;
}
.bx-address:hover { border-color: rgba(255, 180, 90, .45); background: rgba(30, 24, 18, .85); }
.bx-address:active { transform: translateY(1px); }
.bx-address > span { display: grid; align-content: center; gap: 3px; padding: 8px 16px; }
.bx-address small { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.bx-address strong { font: 600 15px/1.1 var(--font-display); letter-spacing: -.01em; }
.bx-address-port { border-left: 1px dashed var(--line-2); }
/* The copy icon never shrinks; on a narrow card the address gives way first (smaller type, then an ellipsis). */
.bx-address-text { min-width: 0; }
.bx-address-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bx-address-icon {
    flex: none; place-items: center; padding-inline: 16px !important;
    border-left: 1px solid var(--line); color: var(--accent);
    background: rgba(255, 159, 46, .06);
}
.bx-address .bx-icon-done { display: none; color: var(--good); }
.bx-address.is-copied .bx-icon-done { display: block; }
.bx-address.is-copied .bx-address-icon .bx-icon:not(.bx-icon-done) { display: none; }
.bx-address.is-copied { border-color: rgba(127, 224, 141, .5); }
.bx-address-wide { display: flex; width: 100%; }
.bx-address-wide .bx-address-text { flex: 1; }

.bx-chip {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 38px; padding: 7px 14px;
    border: 1px solid var(--line-2); border-radius: 999px;
    background: rgba(255, 230, 200, .04);
    color: var(--text-2); font-size: 14px; font-weight: 600;
    transition: background .2s, border-color .2s, color .2s;
    white-space: nowrap;
}
.bx-chip:hover { border-color: var(--line-3); color: var(--text); }
.bx-chip[aria-pressed="true"], .bx-chip.is-active {
    background: var(--accent-soft); border-color: rgba(255, 159, 46, .5); color: var(--accent-2);
}

.bx-dot {
    width: 8px; height: 8px; border-radius: 50%; flex: none;
    background: var(--good);
    box-shadow: 0 0 0 0 rgba(127, 224, 141, .6);
    animation: bx-pulse 2s infinite;
}
.bx-dot.is-off { background: var(--dim); animation: none; }
@keyframes bx-pulse {
    0% { box-shadow: 0 0 0 0 rgba(127, 224, 141, .55); }
    70% { box-shadow: 0 0 0 8px rgba(127, 224, 141, 0); }
    100% { box-shadow: 0 0 0 0 rgba(127, 224, 141, 0); }
}

/* form fields */
.bx-field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.bx-input, .bx-select {
    min-height: 44px; padding: 10px 14px;
    background: var(--bg-soft); color: var(--text);
    border: 1px solid var(--line-2); border-radius: 12px;
    font-size: 15px; font-weight: 500;
    transition: border-color .2s, box-shadow .2s;
    color-scheme: dark;
}
.bx-input:hover, .bx-select:hover { border-color: var(--line-3); }
.bx-input:focus, .bx-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bx-select {
    appearance: none; padding-right: 40px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23a69684' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}
.bx-select option { background: var(--surface); }
.bx-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--text-2); font-weight: 500; }
.bx-switch input { appearance: none; width: 40px; height: 24px; margin: 0; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); position: relative; cursor: pointer; transition: background .2s; flex: none; }
.bx-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .2s var(--ease), background .2s; }
.bx-switch input:checked { background: var(--accent); border-color: var(--accent); }
.bx-switch input:checked::after { transform: translateX(16px); background: var(--accent-ink); }

/* ---------- 5. Surfaces ---------- */
.bx-card {
    position: relative;
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow-1);
}
.bx-card-pad { padding: clamp(20px, 3vw, 32px); }
.bx-panel {
    background: rgba(23, 19, 15, .7);
    border: 1px solid var(--line);
    border-radius: var(--r);
    backdrop-filter: blur(12px);
}
.bx-callout {
    display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start;
    padding: 18px 20px; border-radius: var(--r-sm);
    background: var(--accent-soft); border: 1px solid rgba(255, 159, 46, .28);
    color: var(--text-2);
}
.bx-callout > .bx-icon { color: var(--accent-2); margin-top: 2px; }
.bx-callout strong { color: var(--text); display: block; margin-bottom: 4px; }
.bx-callout ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.bx-callout-danger { background: var(--danger-soft); border-color: rgba(255, 107, 91, .35); }
.bx-callout-danger > .bx-icon { color: var(--danger); }
.bx-callout-info { background: var(--violet-soft); border-color: rgba(165, 133, 255, .3); }
.bx-callout-info > .bx-icon { color: var(--violet); }

/* ---------- 6. Header ---------- */
.bx-header {
    position: sticky; top: 0; z-index: 100;
    height: var(--header-h);
    background: rgba(12, 10, 9, .55);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    transition: background .25s, border-color .25s;
    -webkit-user-select: none; user-select: none;
}
.bx-header.is-scrolled { background: rgba(12, 10, 9, .86); border-bottom-color: var(--line); }
.bx-header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.bx-brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.bx-brand img { width: 40px; height: 40px; image-rendering: pixelated; filter: drop-shadow(0 4px 12px rgba(255, 150, 40, .35)); transition: transform .3s var(--ease); }
.bx-brand:hover img { transform: rotate(-8deg) scale(1.06); }
.bx-brand-word { font: 800 18px/1 var(--font-display); letter-spacing: -.04em; }
.bx-brand-word b { color: var(--accent); font-weight: 800; }

/* `.bx-header .bx-nav` (not just `.bx-nav`) so third-party CSS that styles bare `nav` (TradeMC widget) can't win. */
.bx-header .bx-nav {
    position: static; inset: auto; transform: none; width: auto; padding: 0; z-index: auto;
    background: none; overflow: visible; color: inherit; transition: none;
    flex: 1; display: flex; align-items: center; gap: 20px; min-width: 0;
}
:where(.bx) h2 { padding: 0; }
:where(.bx) h2 > span { margin-top: 0; line-height: inherit; }
.bx-nav-list { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.bx-nav-list a {
    position: relative; display: block;
    padding: 9px 14px; border-radius: 10px;
    color: var(--text-2); font-weight: 600; font-size: 15px;
    transition: color .2s, background .2s;
}
.bx-nav-list a:hover { color: var(--text); background: rgba(255, 230, 200, .06); }
.bx-nav-list a[aria-current="page"] { color: var(--text); }
.bx-nav-list a[aria-current="page"]::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 3px;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    border-radius: 2px;
    box-shadow: 0 0 12px var(--accent-glow);
}
.bx-nav-extra { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.bx-live-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 12px; border-radius: 999px;
    background: var(--good-soft); border: 1px solid rgba(127, 224, 141, .25);
    color: #c8f5cf; font-size: 13px; font-weight: 600; white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.bx-live-pill:hover { border-color: rgba(127, 224, 141, .5); }
.bx-lang { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(255, 230, 200, .05); border: 1px solid var(--line); }
.bx-lang a { padding: 5px 9px; border-radius: 7px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted); transition: color .2s, background .2s; }
.bx-lang a:hover { color: var(--text); }
.bx-lang a[aria-current="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .35); }

.bx-menu-toggle {
    display: none; margin-left: auto;
    width: 46px; height: 46px; padding: 0;
    border: 1px solid var(--line-2); border-radius: 12px;
    background: rgba(255, 230, 200, .05);
}
.bx-menu-bars { position: relative; display: block; width: 18px; height: 14px; margin: auto; }
.bx-menu-bars i { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: var(--text); transition: transform .25s var(--ease), opacity .2s, top .25s var(--ease); }
.bx-menu-bars i:nth-child(1) { top: 0; }
.bx-menu-bars i:nth-child(2) { top: 6px; }
.bx-menu-bars i:nth-child(3) { top: 12px; }
.bx-menu-toggle[aria-expanded="true"] i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.bx-menu-toggle[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.bx-menu-toggle[aria-expanded="true"] i:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* ---------- 7. Footer ---------- */
.bx-footer { position: relative; margin-top: clamp(40px, 6vw, 80px); padding: clamp(32px, 4vw, 48px) 0 28px; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(23, 19, 15, .6), transparent 320px); }
.bx-footer-cta {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap;
    margin-bottom: clamp(32px, 4vw, 48px);
    padding: clamp(22px, 3vw, 32px) clamp(22px, 3.5vw, 40px);
    border-radius: var(--r-lg);
    background:
        radial-gradient(500px 200px at 100% 0%, rgba(255, 159, 46, .28), transparent 70%),
        radial-gradient(400px 220px at 0% 100%, rgba(165, 133, 255, .16), transparent 70%),
        var(--surface-2);
    border: 1px solid var(--line-2);
    box-shadow: var(--shadow-2);
}
.bx-footer-title { font: 800 clamp(22px, 2.6vw, 30px)/1.1 var(--font-display); letter-spacing: -.03em; margin-bottom: 6px; }
.bx-footer-cta p { color: var(--text-2); }
.bx-footer-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.bx-footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; padding-block: 12px 36px; }
.bx-footer-brand p { margin-top: 14px; color: var(--muted); max-width: 380px; font-size: 15px; }
.bx-socials { display: flex; gap: 10px; margin-top: 20px; }
.bx-socials a {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
    background: rgba(255, 230, 200, .05); border: 1px solid var(--line);
    color: var(--text-2); transition: color .2s, background .2s, transform .2s var(--ease), border-color .2s;
}
.bx-socials a:hover { color: var(--accent-2); background: var(--accent-soft); border-color: rgba(255, 159, 46, .35); transform: translateY(-2px); }
.bx-footer .bx-footer-col { position: static; transform: none; width: auto; padding: 0; z-index: auto; background: none; overflow: visible; color: inherit; transition: none; display: grid; align-content: start; gap: 10px; }
.bx-footer-col h3 { font: 600 12px/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.bx-footer-col a { color: var(--text-2); width: fit-content; transition: color .2s; }
.bx-footer-col a:hover { color: var(--accent-2); }
.bx-footer-bottom { display: flex; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }

/* ---------- 8. Dialog, toast ---------- */
.bx-dialog {
    width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
    padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-lg);
    background: var(--surface); color: var(--text);
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .9);
    overflow: auto; overscroll-behavior: contain;
}
/* While any modal dialog is open the page behind it stays put (the gutter keeps the layout from jumping). */
html:has(dialog:modal) { overflow: hidden; scrollbar-gutter: stable; }
.bx-dialog::backdrop { background: rgba(6, 4, 3, .72); backdrop-filter: blur(6px); }
.bx-dialog[open] { animation: bx-pop .3s var(--ease); }
.bx-dialog[open]::backdrop { animation: bx-fade .3s var(--ease); }
@keyframes bx-pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes bx-fade { from { opacity: 0; } }
.bx-dialog-close-form { position: absolute; top: 14px; right: 14px; z-index: 2; margin: 0; }
.bx-dialog-art {
    position: relative; height: 150px; overflow: hidden;
    display: grid; place-items: center;
    background:
        radial-gradient(300px 140px at 0% 0%, rgba(165, 133, 255, .2), transparent 70%),
        linear-gradient(180deg, var(--surface-3), var(--surface));
}
/* Glow behind the logo: sized to fade out completely before the art's bottom edge, so it is never cut off. */
.bx-dialog-art::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 260px; height: 130px; translate: -50% -50%;
    background: radial-gradient(closest-side, rgba(255, 159, 46, .38), rgba(255, 159, 46, .12) 55%, transparent);
    pointer-events: none; z-index: -1;
}
.bx-dialog-art { isolation: isolate; } /* keeps the glow above the art's background but under the cubes and logo */
.bx-dialog-art::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 230, 200, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 230, 200, .05) 1px, transparent 1px); background-size: 20px 20px; -webkit-mask-image: linear-gradient(180deg, #000, transparent); mask-image: linear-gradient(180deg, #000, transparent); }
.bx-dialog-art > img { position: relative; z-index: 1; width: 96px; height: 96px; image-rendering: pixelated; filter: drop-shadow(0 6px 12px rgba(255, 140, 30, .5)); animation: bx-bob 4s ease-in-out infinite; }

/* ---------- Minecraft-style CSS blocks ---------- */
.bx-cube-float {
    --s: 60px;
    --size: calc(var(--s) * var(--cube-k, 1)); /* --cube-k shrinks blocks on small screens without moving them */
    position: absolute; left: var(--x, 50%); top: var(--y, 50%);
    width: var(--size); height: var(--size); margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
    animation: bx-float 7s ease-in-out infinite; animation-delay: var(--d, 0s);
    pointer-events: none;
}
.bx-cube {
    position: absolute; inset: 0;
    transform-style: preserve-3d;
    transform: rotateX(-30deg) rotateY(45deg);
    animation: bx-cube-sway 12s ease-in-out infinite; animation-delay: var(--d, 0s);
}
.bx-cube > i {
    position: absolute; inset: 0;
    background: var(--side, #6b4a2b) center / 100% 100% no-repeat;
    image-rendering: pixelated;
    backface-visibility: hidden;
}
.bx-cube > .t { background-image: var(--top); background-color: var(--top-c, #6fae3d); transform: rotateX(90deg) translateZ(calc(var(--size) / 2)); }
.bx-cube > .b { background-image: var(--bottom); background-color: var(--side-c, #6b4a2b); transform: rotateX(-90deg) translateZ(calc(var(--size) / 2)); filter: brightness(.45); }
.bx-cube > .f { background-image: var(--side); background-color: var(--side-c, #6b4a2b); transform: translateZ(calc(var(--size) / 2)); filter: brightness(.82); }
.bx-cube > .k { background-image: var(--side); background-color: var(--side-c, #6b4a2b); transform: rotateY(180deg) translateZ(calc(var(--size) / 2)); filter: brightness(.6); }
.bx-cube > .r { background-image: var(--side); background-color: var(--side-c, #6b4a2b); transform: rotateY(90deg) translateZ(calc(var(--size) / 2)); filter: brightness(.64); }
.bx-cube > .l { background-image: var(--side); background-color: var(--side-c, #6b4a2b); transform: rotateY(-90deg) translateZ(calc(var(--size) / 2)); filter: brightness(.74); }
.bx-cube[data-cube="wheat"] { --top-c: #d6aa44; --side-c: #c99a34; }
.bx-cube[data-cube="gold"] { --top-c: #f7d24a; --side-c: #e2b52c; }
.bx-cube[data-cube="stone"] { --top-c: #8a8a8a; --side-c: #7a7a7a; }
.bx-cube[data-cube="planks"] { --top-c: #b8874c; --side-c: #a97a42; }
@keyframes bx-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes bx-cube-sway { 0%, 100% { transform: rotateX(-30deg) rotateY(45deg); } 50% { transform: rotateX(-26deg) rotateY(62deg); } }
@keyframes bx-bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
.bx-dialog-body { display: grid; gap: 14px; padding: 4px clamp(20px, 4vw, 32px) clamp(22px, 4vw, 32px); }
.bx-dialog-body h2 { font: 800 26px/1.15 var(--font-display); letter-spacing: -.03em; }
.bx-dialog-body > p { color: var(--text-2); }
.bx-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bx-dialog-note { font-size: 13px; color: var(--dim) !important; }

.bx-toast {
    position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 300;
    transform: translateX(-50%);
    display: inline-flex; align-items: center; gap: 10px;
    padding: 12px 18px; border-radius: 14px;
    background: #231c16; border: 1px solid var(--line-3);
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .8);
    font-weight: 600; font-size: 14.5px;
    animation: bx-toast-in .3s var(--ease);
}
.bx-toast::before { content: ""; width: 10px; height: 10px; background: var(--good); box-shadow: 0 0 12px var(--good); }
.bx-toast.is-error::before { background: var(--danger); box-shadow: 0 0 12px var(--danger); }
@keyframes bx-toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------- 9. Reveal on scroll ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--delay, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ==========================================================================
   HOME
   ========================================================================== */
.bx-hero {
    position: relative; isolation: isolate;
    min-height: min(860px, calc(100svh - var(--header-h) + 10px));
    margin-top: calc(-1 * var(--header-h));
    padding-top: var(--header-h);
    display: flex; flex-direction: column; justify-content: center;
    overflow: hidden;
}
.bx-hero-glow {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(520px 420px at 74% 48%, rgba(255, 150, 40, .22), transparent 70%),
        radial-gradient(420px 360px at 90% 10%, rgba(165, 133, 255, .12), transparent 70%);
    -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
}
.bx-hero-inner {
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); grid-template-areas: "content art";
    align-items: center; gap: 24px;
    padding-block: clamp(40px, 7vh, 90px) clamp(80px, 12vh, 130px);
}
/* Text sits above the art so flying cubes never cover the headline. */
.bx-hero-content { grid-area: content; display: grid; gap: 24px; max-width: 700px; position: relative; z-index: 2; }
.bx-hero-content .bx-eyebrow, .bx-hero-content h1 { -webkit-user-select: none; user-select: none; }
.bx-hero-art { grid-area: art; position: relative; z-index: 1; width: 100%; max-width: 560px; aspect-ratio: 1; justify-self: center; container-type: inline-size; }
.bx-hero-art > * { position: absolute; inset: 0; transition: transform .6s var(--ease); }
.bx-hero-ring {
    margin: 17%; border-radius: 50%; pointer-events: none;
    border: 2px dashed rgba(255, 200, 120, .16);
    background: radial-gradient(circle, rgba(255, 160, 50, .2), rgba(255, 150, 40, .06) 50%, transparent 72%);
    box-shadow: inset 0 0 80px rgba(255, 150, 40, .12), 0 0 60px rgba(255, 150, 40, .08);
    animation: bx-spin 90s linear infinite reverse;
}
.bx-hero-logo { display: grid; place-items: center; pointer-events: none; }
.bx-hero-cat {
    pointer-events: auto; width: 58%; padding: 0; border: 0; background: none; cursor: pointer;
    border-radius: 24px; -webkit-tap-highlight-color: transparent;
}
.bx-cat-art {
    position: relative; display: block;
    filter: drop-shadow(0 26px 34px rgba(255, 130, 20, .45)) drop-shadow(0 0 1px rgba(255, 220, 160, .6));
    animation: bx-bob 6s ease-in-out infinite;
    transition: filter .3s;
}
.bx-cat-art > img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.bx-hero-cat:hover .bx-cat-art { filter: drop-shadow(0 26px 40px rgba(255, 150, 40, .65)) drop-shadow(0 0 1px rgba(255, 220, 160, .8)); }
/* No jump on click for the hero cat: it reacts with its tail, ears and eyes instead (the small header logo still jumps). */

/* Tail: the sprite has one pixel per logo cell (34×25); site.js bends it on the canvas, which covers
   logo cells -5..21 × 4..28 so the tail can swing past the logo's edges. */
.bx-cat-art > .bx-cat-tail-img { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; }
.bx-cat-tail { position: absolute; left: -14.7059%; top: 16%; width: 79.4118%; height: 100%; image-rendering: pixelated; pointer-events: none; visibility: hidden; }
.bx-cat-art.is-live .bx-cat-tail-img { visibility: hidden; }
.bx-cat-art.is-live .bx-cat-tail { visibility: visible; }
/* Ears: same idea; their canvas covers logo cells 12..33 × -1..11. */
.bx-cat-art > .bx-cat-ears-img { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; }
.bx-cat-ears { position: absolute; left: 35.2941%; top: -4%; width: 64.7059%; height: 52%; image-rendering: pixelated; pointer-events: none; visibility: hidden; }
.bx-cat-art.is-live-ears .bx-cat-ears-img { visibility: hidden; }
.bx-cat-art.is-live-ears .bx-cat-ears { visibility: visible; }
/* Eyes: blink frames laid over the face; only the frame named in data-eyes is visible. */
.bx-cat-art > .bx-cat-eyes { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; visibility: hidden; }
.bx-cat-art[data-eyes="half"] > .bx-cat-eyes[data-eyes="half"],
.bx-cat-art[data-eyes="closed"] > .bx-cat-eyes[data-eyes="closed"],
.bx-cat-art[data-eyes="happy"] > .bx-cat-eyes[data-eyes="happy"] { visibility: visible; }
/* Seasonal accessory (pumpkin, party hat): 34×34-cell sprite whose row 9 is logo row 0, so it can rise above the head. */
.bx-cat-art > .bx-cat-acc { position: absolute; left: 0; top: -36%; width: 100%; height: 136%; image-rendering: pixelated; pointer-events: none; }
.bx-hero-cat:focus-visible { outline-offset: 8px; }
.bx-hero-cubes { pointer-events: none; }
.bx-sparks { pointer-events: none; overflow: hidden; border-radius: 50%; }
.bx-sparks i {
    position: absolute; left: var(--sx); bottom: 10%;
    width: var(--ss); height: var(--ss);
    background: var(--accent-2); box-shadow: 0 0 8px var(--accent);
    opacity: 0; animation: bx-spark 7s linear infinite; animation-delay: var(--sd);
}
@keyframes bx-spark { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: .9; } 100% { opacity: 0; transform: translateY(-340px); } }
.bx-hero h1 { font-size: clamp(42px, 6.6vw, 92px); line-height: 1.02; }
.bx-hero .bx-lead { font-size: clamp(16.5px, 1.5vw, 19px); max-width: 540px; }
.bx-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; margin-top: 8px; }
.bx-hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.bx-stat {
    display: grid; gap: 2px;
    min-width: 150px; padding: 14px 18px;
    background: rgba(18, 14, 11, .6); border: 1px solid var(--line);
    border-radius: 14px; backdrop-filter: blur(10px);
}
.bx-stat strong { display: flex; align-items: center; gap: 10px; font: 700 22px/1.2 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bx-stat span { color: var(--muted); font-size: 13px; font-weight: 500; }
.bx-hero-scroll {
    position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
    display: grid; justify-items: center; gap: 8px;
    color: var(--dim); font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
}
.bx-hero-scroll i { width: 22px; height: 34px; border: 2px solid var(--line-3); border-radius: 12px; position: relative; }
.bx-hero-scroll i::after { content: ""; position: absolute; left: 50%; top: 6px; width: 4px; height: 7px; margin-left: -2px; border-radius: 2px; background: var(--accent); animation: bx-scroll 1.8s infinite; }
@keyframes bx-scroll { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }

/* modes */
.bx-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .bx-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bx-mode {
    --mode: var(--accent);
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center;
    padding: 20px; min-height: 132px;
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--line); border-radius: var(--r);
    transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.bx-mode::before {
    content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0;
    background: radial-gradient(260px 140px at 0% 0%, color-mix(in srgb, var(--mode) 22%, transparent), transparent 70%);
    transition: opacity .3s;
}
.bx-mode > * { position: relative; }
.bx-mode:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--mode) 45%, transparent); box-shadow: 0 22px 44px -26px color-mix(in srgb, var(--mode) 70%, transparent); }
.bx-mode:hover::before { opacity: 1; }
.bx-mode-icon {
    grid-row: span 2;
    display: grid; place-items: center; width: 64px; height: 64px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--mode) 13%, var(--surface-3));
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.bx-mode-icon > img { width: 40px; height: 40px; image-rendering: pixelated; transition: transform .3s var(--ease); }
.bx-mode:hover .bx-mode-icon > img { transform: scale(1.12) rotate(-4deg); }
.bx-mode h3 { font: 700 18px/1.2 var(--font-display); letter-spacing: -.02em; align-self: end; }
.bx-mode p { color: var(--muted); font-size: 14px; line-height: 1.45; align-self: start; }
.bx-mode-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text-2); }
/* Live online pill: green and noticeable, muted when nobody is playing */
.bx-mode-live {
    display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 8px; border-radius: 999px;
    font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
    color: var(--good); background: rgba(127, 224, 141, .1); border: 1px solid rgba(127, 224, 141, .28);
}
.bx-mode-live.is-empty { color: var(--muted); background: rgba(255, 255, 255, .04); border-color: var(--line-2); }
.bx-mode-live.is-empty .bx-dot { background: var(--dim); animation: none; box-shadow: none; }
.bx-mode-foot .bx-icon { color: var(--mode); transition: transform .2s var(--ease); }
.bx-mode:hover .bx-mode-foot .bx-icon { transform: translateX(4px); }
.bx-mode[data-mode="sw"] { --mode: #4fd6a0; }
.bx-mode[data-mode="bw"] { --mode: #ff7b5a; }
.bx-mode[data-mode="mm"] { --mode: #ff5f7e; }
.bx-mode[data-mode="surv"] { --mode: #8bd65a; }
.bx-mode[data-mode="duels"] { --mode: #a585ff; }
.bx-mode[data-mode="arcades"] { --mode: #ffc861; }
.bx-mode[data-mode="sg"] { --mode: #5ec4ff; }
.bx-mode[data-mode="all"] { --mode: var(--good); background: radial-gradient(240px 140px at 100% 100%, rgba(127, 224, 141, .1), transparent 70%), linear-gradient(180deg, var(--surface-2), var(--surface)); border-style: dashed; border-color: var(--line-2); }

/* steps */
.bx-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: step; }
.bx-step { display: grid; align-content: start; gap: 12px; padding: clamp(22px, 2.6vw, 30px); }
.bx-step-num {
    display: grid; place-items: center; width: 48px; height: 48px;
    font: 800 20px/1 var(--font-display); color: var(--accent-ink);
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
    border-radius: 12px;
    box-shadow: inset 0 -4px 0 rgba(130, 50, 0, .5), inset 0 2px 0 rgba(255, 255, 255, .4), 0 10px 26px -12px var(--accent-glow);
    margin-bottom: 6px;
}
.bx-step p { color: var(--muted); font-size: 15px; }
.bx-step .bx-btn, .bx-step .bx-address { margin-top: auto; justify-self: start; }
/* The address in a step card sizes itself to the card (three narrow columns on desktop, one on phones). */
.bx-step-foot { container-type: inline-size; }
.bx-step .bx-address { display: flex; width: 100%; justify-self: stretch; }
.bx-step .bx-address-text { flex: 1; }
@container (max-width: 300px) {
    .bx-address > span { padding-inline: 10px; }
    .bx-address-icon { padding-inline: 10px !important; }
    .bx-address strong { font-size: 13px; }
}
.bx-step-foot { margin-top: 8px; }

/* destinations bento */
.bx-bento { display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: auto auto; gap: 14px; }
.bx-dest {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; flex-direction: column; gap: 12px;
    min-height: 230px; padding: clamp(22px, 3vw, 32px);
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--line); border-radius: var(--r-lg);
    transition: transform .25s var(--ease), border-color .25s;
}
.bx-dest:hover { transform: translateY(-4px); border-color: var(--line-3); }
.bx-dest-big { grid-row: span 2; min-height: 474px; justify-content: flex-end; }
.bx-dest-big::before {
    content: ""; position: absolute; inset: 0; z-index: -2;
    background:
        radial-gradient(360px 280px at 50% 30%, rgba(255, 190, 80, .3), transparent 70%),
        radial-gradient(300px 200px at 100% 0%, rgba(165, 133, 255, .14), transparent 70%),
        linear-gradient(180deg, var(--surface-3), var(--surface));
}
.bx-dest-art { position: absolute; inset: 0 0 38% 0; z-index: -1; transition: transform .6s var(--ease); }
.bx-dest-art::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 230, 200, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 230, 200, .05) 1px, transparent 1px); background-size: 32px 32px; -webkit-mask-image: radial-gradient(circle at 50% 40%, #000, transparent 65%); mask-image: radial-gradient(circle at 50% 40%, #000, transparent 65%); }
.bx-dest.bx-dest-big .bx-link { margin-top: 4px; }
.bx-perks { inset: 0 0 36% 0; }
.bx-perk {
    position: absolute; height: auto;
    filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .55));
    animation: bx-float 7s ease-in-out infinite;
    transition: translate .5s var(--ease), scale .5s var(--ease);
}
.bx-perk.is-mvppp { left: 50%; top: 4%; width: 40%; margin-left: -20%; z-index: 1; animation-delay: -1s; }
.bx-perk.is-mvpp { left: 24%; top: 20%; width: 30%; margin-left: -15%; rotate: -14deg; animation-delay: -2.6s; }
.bx-perk.is-mvp { left: 76%; top: 20%; width: 30%; margin-left: -15%; rotate: 13deg; animation-delay: -4s; }
.bx-perk.is-vip { left: 36%; top: 54%; width: 24%; margin-left: -12%; rotate: -6deg; z-index: 2; animation-delay: -.4s; }
.bx-perk.is-coins { left: 66%; top: 58%; width: 24%; margin-left: -12%; z-index: 2; animation-delay: -3.4s; }
.bx-dest-big:hover .bx-perk { scale: 1.06; }
.bx-dest-big:hover .is-mvpp { translate: -10px -4px; }
.bx-dest-big:hover .is-mvp { translate: 10px -4px; }
.bx-dest-big:hover .is-mvppp { translate: 0 -8px; }
.bx-dest-big .bx-link { margin-top: 4px; }
.bx-dest-big .bx-dest-icon { background: rgba(255, 159, 46, .2); backdrop-filter: blur(8px); }
.bx-dest-wide {
    grid-column: 1 / -1; min-height: 0;
    flex-direction: row; align-items: center; gap: 18px 24px; flex-wrap: wrap;
    background: radial-gradient(360px 180px at 0% 50%, rgba(255, 159, 46, .16), transparent 70%), linear-gradient(180deg, var(--surface-2), var(--surface));
    border-color: rgba(255, 159, 46, .24);
}
.bx-dest-wide-copy { flex: 1 1 260px; display: grid; gap: 6px; min-width: 0; }
.bx-dest-wide .bx-link { margin-left: auto; margin-top: 0; }

/* ---------- Clicker PWA embed (/clicker/) ---------- */
.bx-clicker-page {
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px;
    padding-block: 18px 36px;
}
.bx-clicker-bar {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 12px 20px; flex-wrap: wrap;
}
.bx-clicker-title {
    margin-top: 6px;
    font: 800 clamp(22px, 3vw, 32px)/1.1 var(--font-display);
    letter-spacing: -.03em;
}
.bx-clicker-bar-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.bx-clicker-frame-wrap {
    width: 100%; min-width: 0;
    height: clamp(600px, calc(100dvh - var(--header-h) - 110px), 840px);
    border-radius: var(--r-lg); overflow: hidden;
    border: 1px solid var(--line-2); background: var(--bg);
    box-shadow: var(--shadow-2);
}
.bx-clicker-frame { display: block; width: 100%; height: 100%; border: 0; }
.bx-dest-icon {
    display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
    background: var(--accent-soft); color: var(--accent-2);
    border: 1px solid rgba(255, 159, 46, .25);
}
.bx-dest-big .bx-dest-icon { width: 60px; height: 60px; }
.bx-dest h3 { font: 700 clamp(22px, 2.4vw, 28px)/1.15 var(--font-display); letter-spacing: -.03em; }
.bx-dest p { color: var(--muted); max-width: 420px; }
.bx-dest .bx-link { margin-top: auto; }
.bx-dest-bars { position: absolute; right: 26px; top: 26px; display: flex; align-items: end; gap: 5px; height: 64px; opacity: .9; }
.bx-dest-bars i { width: 9px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--good), rgba(127, 224, 141, .25)); animation: bx-bars 3s ease-in-out infinite alternate; transform-origin: bottom; }
.bx-dest-bars i:nth-child(1) { height: 35%; animation-delay: -.4s; }
.bx-dest-bars i:nth-child(2) { height: 60%; animation-delay: -1.2s; }
.bx-dest-bars i:nth-child(3) { height: 45%; animation-delay: -.8s; }
.bx-dest-bars i:nth-child(4) { height: 90%; animation-delay: -2s; }
.bx-dest-bars i:nth-child(5) { height: 70%; animation-delay: -1.6s; }
.bx-dest-bars i:nth-child(6) { height: 100%; animation-delay: -.2s; }
@keyframes bx-bars { from { transform: scaleY(.55); } to { transform: scaleY(1); } }

/* news */
.bx-news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.bx-post {
    display: flex; flex-direction: column; overflow: hidden;
    width: 100%; padding: 0; text-align: left;
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--line); border-radius: var(--r);
    color: var(--text);
    transition: transform .25s var(--ease), border-color .25s;
}
.bx-post:hover { transform: translateY(-4px); border-color: var(--line-3); }
.bx-post-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: radial-gradient(120% 120% at 80% 0%, rgba(255, 159, 46, .2), var(--surface-3)); }
.bx-post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.bx-post:hover .bx-post-media img { transform: scale(1.05); }
.bx-post-media .bx-post-placeholder { position: absolute; inset: 0; display: grid; place-items: center; }
.bx-post-media .bx-post-placeholder img { width: 56px; height: 56px; image-rendering: pixelated; opacity: .6; object-fit: contain; }
.bx-post-body { display: grid; gap: 8px; padding: 18px 20px 20px; flex: 1; align-content: start; }
.bx-post-title { font: 700 16.5px/1.3 var(--font-display); letter-spacing: -.015em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bx-post-text { color: var(--muted); font-size: 14.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bx-post-stats { display: flex; gap: 14px; margin-top: auto; padding-top: 10px; color: var(--dim); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bx-post-stats span { display: inline-flex; align-items: center; gap: 5px; }
.bx-post-stats svg { width: 15px; height: 15px; }
.bx-news-dialog { width: min(760px, calc(100% - 32px)); }
.bx-news-dialog .bx-news-media img { width: 100%; max-height: 380px; object-fit: cover; }
.bx-news-dialog .bx-dialog-body { padding-top: 24px; }
.bx-news-dialog h2 { font-size: 22px; padding-right: 48px; }
.bx-news-body { color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.bx-news-body a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.bx-news-error { padding: 18px 20px; border-radius: var(--r-sm); background: rgba(255, 230, 200, .04); border: 1px dashed var(--line-2); color: var(--muted); }

/* community */
.bx-community {
    position: relative; overflow: hidden; isolation: isolate;
    display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center;
    padding: clamp(28px, 5vw, 56px);
    border-radius: var(--r-lg);
    background:
        radial-gradient(600px 300px at 0% 0%, rgba(165, 133, 255, .18), transparent 70%),
        radial-gradient(600px 320px at 100% 100%, rgba(255, 159, 46, .2), transparent 70%),
        var(--surface);
    border: 1px solid var(--line-2);
}
.bx-community::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background-image: linear-gradient(rgba(255, 230, 200, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 230, 200, .04) 1px, transparent 1px);
    background-size: 28px 28px;
    -webkit-mask-image: radial-gradient(circle at 80% 50%, #000, transparent 70%);
    mask-image: radial-gradient(circle at 80% 50%, #000, transparent 70%);
}
.bx-community > div:first-child { display: grid; gap: 14px; }
.bx-community p { color: var(--text-2); max-width: 460px; }
.bx-community-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bx-social-card {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 18px; border-radius: 16px;
    background: rgba(12, 10, 9, .55); border: 1px solid var(--line-2);
    font-weight: 700; transition: transform .2s var(--ease), border-color .2s, background .2s;
}
.bx-social-card .bx-icon:first-child { color: var(--accent-2); }
.bx-social-card .bx-icon:last-child { margin-left: auto; color: var(--dim); transition: transform .2s var(--ease), color .2s; }
.bx-social-card:hover { transform: translateY(-2px); border-color: rgba(255, 159, 46, .4); background: rgba(30, 24, 18, .8); }
.bx-social-card:hover .bx-icon:last-child { transform: translate(2px, -2px); color: var(--accent-2); }
.bx-social-card small { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); }

/* ==========================================================================
   INNER PAGES — shared page head
   ========================================================================== */
.bx-page-head { position: relative; isolation: isolate; overflow: hidden; margin-top: calc(-1 * var(--header-h)); padding: calc(var(--header-h) + clamp(40px, 6vw, 76px)) 0 clamp(36px, 5vw, 60px); }
.bx-page-head-art {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(420px 300px at 82% 45%, rgba(255, 150, 40, .16), transparent 70%),
        radial-gradient(380px 260px at 100% 0%, rgba(165, 133, 255, .12), transparent 70%);
}
@media (max-width: 760px) { .bx-page-head-art .bx-cube-float { opacity: .35; } .bx-page-head-art .bx-cube-float:nth-child(n+3) { display: none; } }
.bx-page-head-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px 48px; flex-wrap: wrap; }
.bx-page-head-text { display: grid; gap: 16px; max-width: 760px; }
.bx-page-head h1 { font-size: clamp(34px, 5vw, 64px); line-height: 1.04; }
.bx-page-head-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.bx-page-body { padding-bottom: clamp(48px, 6vw, 88px); }

/* ==========================================================================
   SHOP
   ========================================================================== */
.bx-shop-layout { display: grid; gap: 18px; }
.bx-mode-tabs {
    display: flex; gap: 8px; padding: 8px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
    overflow-x: auto; scrollbar-width: none;
    position: sticky; top: calc(var(--header-h) + 8px); z-index: 20;
    backdrop-filter: blur(12px);
}
.bx-mode-tabs::-webkit-scrollbar { display: none; }
.bx-mode-tab {
    display: inline-flex; align-items: center; gap: 10px; flex: 1 0 auto;
    min-height: 52px; padding: 8px 16px 8px 10px;
    border: 1px solid transparent; border-radius: 12px;
    background: transparent; color: var(--text-2);
    font-weight: 700; font-size: 14.5px; white-space: nowrap;
    transition: background .2s, color .2s, border-color .2s;
}
.bx-mode-tab > img { width: 32px; height: 32px; image-rendering: pixelated; }
.bx-mode-tab:hover { background: rgba(255, 230, 200, .05); color: var(--text); }
.bx-mode-tab[aria-pressed="true"] {
    background: linear-gradient(180deg, rgba(255, 190, 85, .18), rgba(255, 140, 30, .1));
    border-color: rgba(255, 159, 46, .45); color: var(--text);
    box-shadow: inset 0 -3px 0 rgba(130, 50, 0, .35);
}
.bx-mode-tab:disabled { opacity: .5; cursor: not-allowed; }
.bx-catalog { padding: clamp(18px, 3vw, 32px); }
.bx-catalog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 20px; }
.bx-catalog-head h2 { font: 700 clamp(22px, 2.4vw, 28px)/1.2 var(--font-display); letter-spacing: -.03em; }
.bx-catalog-head h2 span { color: var(--accent-2); }
.bx-currency { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
.bx-catalog-status { display: grid; justify-items: center; gap: 16px; padding: 48px 16px; text-align: center; color: var(--muted); }
.bx-catalog-status.is-error { color: var(--text-2); }
.bx-spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: bx-spin .8s linear infinite; }
@keyframes bx-spin { to { transform: rotate(360deg); } }
.bx-shop-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.bx-shop-guide .bx-card { display: grid; gap: 8px; padding: 22px; }
.bx-shop-guide h3 { display: flex; align-items: center; gap: 12px; font: 700 17px/1.2 var(--font-display); }
.bx-shop-guide .bx-step-num { width: 36px; height: 36px; font-size: 15px; border-radius: 10px; margin: 0; }
.bx-shop-guide p { color: var(--muted); font-size: 14.5px; }
.bx-help-strip { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-top: 14px; padding: 18px 22px; }
.bx-help-strip p { display: flex; align-items: center; gap: 12px; color: var(--text-2); }
.bx-help-strip .bx-icon { color: var(--violet); flex: none; }

/* FAQ */
.bx-faq { display: grid; gap: 34px; max-width: 860px; }
.bx-faq-group { display: grid; gap: 10px; }
.bx-faq-group h2 { font: 700 clamp(20px, 2.2vw, 24px)/1.2 var(--font-display); letter-spacing: -.02em; margin-bottom: 4px; }
.bx-faq-item { padding: 0; overflow: hidden; scroll-margin-top: calc(var(--header-h) + 16px); }
.bx-faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; cursor: pointer; list-style: none; font-weight: 700; font-size: 16px; }
.bx-faq-item summary::-webkit-details-marker { display: none; }
.bx-faq-item summary .bx-icon { flex: none; color: var(--muted); transition: transform .3s var(--ease), color .2s; }
.bx-faq-item summary:hover .bx-icon { color: var(--accent-2); }
.bx-faq-item[open] summary .bx-icon { transform: rotate(180deg); color: var(--accent-2); }
.bx-faq-item[open] { border-color: rgba(255, 159, 46, .3); }
.bx-faq-answer { display: grid; gap: 10px; padding: 0 22px 20px; color: var(--text-2); line-height: 1.6; }
.bx-faq-answer a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.bx-faq-answer b { color: var(--text); }
.bx-faq-answer ul { display: grid; gap: 6px; margin: 0; padding-left: 22px; list-style: disc; }
.bx-faq-answer li::marker { color: var(--accent-2); }
.bx-faq .bx-help-strip { margin-top: 0; }
.bx-help-actions { display: flex; flex-wrap: wrap; gap: 10px; }


/* "choose a mode" state shown before a mode is picked */
.bx-pick { display: grid; justify-items: center; gap: 12px; padding: clamp(28px, 5vw, 56px) 12px clamp(20px, 4vw, 36px); text-align: center; }
.bx-pick-arrow {
    display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px;
    background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink);
    box-shadow: inset 0 -4px 0 rgba(130, 50, 0, .5), inset 0 2px 0 rgba(255, 255, 255, .4), 0 14px 30px -12px var(--accent-glow);
    animation: bx-nudge 1.6s ease-in-out infinite;
}
@keyframes bx-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.bx-pick h3 { font: 800 clamp(22px, 2.6vw, 28px)/1.15 var(--font-display); letter-spacing: -.03em; margin-top: 6px; }
.bx-pick p { color: var(--muted); max-width: 420px; }
.bx-pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: min(640px, 100%); margin-top: 14px; }
.bx-pick-mode {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left;
    border: 1px solid var(--line-2); border-radius: 14px; background: rgba(255, 230, 200, .04); color: var(--text);
    font-weight: 700; font-size: 15px; transition: transform .2s var(--ease), border-color .2s, background .2s;
}
.bx-pick-mode > img { width: 40px; height: 40px; image-rendering: pixelated; }
.bx-pick-mode:hover { transform: translateY(-2px); border-color: rgba(255, 159, 46, .5); background: var(--accent-soft); }
.bx-catalog-status.is-empty .bx-spinner { display: none; }
@media (max-width: 640px) { .bx-pick-grid { grid-template-columns: 1fr 1fr; } }

/* ==========================================================================
   MONITOR
   ========================================================================== */
.bx-monitor { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.bx-monitor > * { min-width: 0; }
.bx-status-banner { display: flex; align-items: flex-start; gap: 12px; }
.bx-status-banner strong { display: block; font-weight: 700; margin-bottom: 2px; }
.bx-status-banner p { color: var(--text-2); font-size: 14px; }
.bx-callout-warn { background: var(--accent-soft); border-color: rgba(255, 159, 46, .34); color: var(--accent-2); }
.bx-callout-info { background: var(--violet-soft); border-color: rgba(165, 133, 255, .34); color: #cbb8ff; }

.bx-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); gap: 12px; }
.bx-kpi {
    --mode: var(--accent);
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center;
    padding: 16px; min-height: 88px;
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--line); border-radius: 16px;
    transition: border-color .3s;
}
.bx-kpi img { grid-row: span 2; width: 40px; height: 40px; padding: 6px; border-radius: 12px; image-rendering: pixelated; background: color-mix(in srgb, var(--mode) 14%, var(--surface-3)); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .3); transition: opacity .25s, filter .25s; }
.bx-kpi-value { font: 700 26px/1.1 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.bx-kpi-name { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.bx-kpi-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bx-kpi-sub { flex: none; color: var(--dim); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bx-kpi-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 220, 180, .05); }
.bx-kpi-bar i { display: block; height: 100%; background: var(--mode); opacity: .75; transition: width .35s var(--ease); }
.bx-kpi.is-off { border-color: rgba(255, 107, 91, .2); }
.bx-kpi.is-off img { opacity: .45; filter: grayscale(.6); }
.bx-kpi.is-off .bx-kpi-value {
    display: inline-flex; align-items: center; gap: 6px; width: fit-content; max-width: 100%;
    padding: 4px 9px; border-radius: 8px;
    background: var(--danger-soft); border: 1px solid rgba(255, 107, 91, .28);
    color: var(--danger); font: 600 12px/1.2 var(--font-body); letter-spacing: 0; white-space: nowrap;
}
.bx-kpi.is-off .bx-kpi-value::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--danger); flex: none; }
.bx-kpi.is-off .bx-kpi-sub { color: var(--danger); opacity: .75; }
.bx-kpi.is-bump { border-color: color-mix(in srgb, var(--mode) 55%, transparent); }
.bx-kpi-total {
    grid-column: span 2;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0 14px;
    background: radial-gradient(260px 140px at 0% 0%, rgba(127, 224, 141, .16), transparent 70%), linear-gradient(180deg, var(--surface-2), var(--surface));
    border-color: rgba(127, 224, 141, .25);
}
.bx-kpi-total-info { display: grid; gap: 3px; min-width: 0; }
.bx-kpi-total .bx-kpi-value { font-size: 34px; color: #d6fbdc; }
.bx-kpi-total .bx-kpi-badge { grid-row: auto; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--good-soft); color: var(--good); }
.bx-kpi-total .bx-kpi-name { justify-content: flex-start; gap: 8px; }
.bx-kpi-record {
    display: inline-flex; align-items: center; align-self: center; justify-self: end;
    padding: 6px 12px; border-radius: 10px;
    background: rgba(255, 159, 46, .10); border: 1px solid rgba(255, 159, 46, .26);
    color: var(--accent-2); font-size: 12.5px; font-weight: 700;
    font-variant-numeric: tabular-nums; white-space: nowrap;
}

.bx-panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.bx-panel-title h2 { font: 700 20px/1.2 var(--font-display); letter-spacing: -.02em; }
.bx-panel-title small { color: var(--dim); font-size: 13px; font-weight: 500; }
.bx-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: clamp(16px, 2.4vw, 24px); min-width: 0; }
.bx-controls > * { min-width: 0; }
.bx-controls-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; min-width: 0; }
.bx-controls-row > .bx-field { min-width: 0; }
.bx-controls-row .bx-input, .bx-controls-row .bx-select { max-width: 100%; min-width: 0; }
.bx-controls-modes { padding-top: 2px; }
.bx-segment { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line); }
.bx-segment button { min-height: 36px; padding: 6px 13px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-size: 13.5px; font-weight: 600; transition: background .2s, color .2s; }
.bx-segment button:hover { color: var(--text); background: rgba(255, 230, 200, .05); }
.bx-segment button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .35), inset 0 0 0 1px var(--line-2); }
.bx-server-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bx-server-chip { position: relative; }
.bx-server-chip input { position: absolute; opacity: 0; pointer-events: none; }
.bx-server-chip span {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 38px; padding: 6px 14px 6px 10px;
    border: 1px solid var(--line-2); border-radius: 999px;
    background: rgba(255, 230, 200, .03); color: var(--text-2);
    font-size: 14px; font-weight: 600; cursor: pointer; user-select: none;
    transition: background .2s, border-color .2s, color .2s;
}
.bx-server-chip span i { width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--accent)); opacity: .35; transition: opacity .2s; }
.bx-server-chip img { width: 22px; height: 22px; image-rendering: pixelated; }
.bx-server-chip input:checked + span { background: color-mix(in srgb, var(--c) 14%, transparent); border-color: color-mix(in srgb, var(--c) 55%, transparent); color: var(--text); }
.bx-server-chip input:checked + span i { opacity: 1; }
.bx-server-chip input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.bx-controls-actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 16px; }
.bx-controls-actions > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.bx-live-switch { gap: 8px; }
.bx-live-switch-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--dim); transition: background .2s, box-shadow .2s; }
.bx-live-switch:has(input:checked) { color: #d6fbdc; }
.bx-live-switch:has(input:checked) .bx-live-switch-dot { background: var(--good); box-shadow: 0 0 0 4px rgba(127, 224, 141, .2); animation: bx-live-pulse 1.4s ease-in-out infinite; }
@keyframes bx-live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.bx-range-label.is-live { border-color: rgba(127, 224, 141, .38); background: rgba(127, 224, 141, .1); color: #d6fbdc; }

.bx-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bx-summary-card { padding: 16px 18px; display: grid; gap: 4px; }
.bx-summary-label { color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.bx-summary-val { font: 700 26px/1.15 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text); }
.bx-summary-sub { color: var(--dim); font-size: 12.5px; font-weight: 500; min-height: 18px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bx-delta { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--surface-3); color: var(--text-2); }
.bx-delta.is-up { background: var(--good-soft); color: var(--good); }
.bx-delta.is-down { background: var(--danger-soft); color: var(--danger); }

.bx-chart-card { padding: clamp(16px, 2.4vw, 24px); position: relative; min-width: 0; }
.bx-chart-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px; min-width: 0; }
.bx-chart-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.bx-zoom-hint { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); font-size: 12.5px; }
.bx-range-label { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 230, 200, .05); border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; max-width: 100%; }
.bx-range-label span { overflow-wrap: anywhere; }
.bx-avg { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.bx-avg-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; max-width: 100%; }
.bx-avg-pill i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.bx-avg-pill b { color: var(--text); font-weight: 700; }
.bx-avg-pill.is-hint { background: transparent; border-style: dashed; color: var(--dim); }
.bx-chart-wrap { position: relative; height: clamp(260px, 42vw, 440px); width: 100%; min-width: 0; overflow: hidden; }
.bx-uplot-host { width: 100%; max-width: 100%; height: 100%; }
.bx-uplot-host .u-wrap { background: transparent; max-width: 100%; }
.bx-uplot-host .u-select { background: rgba(255, 159, 46, .16); border-inline: 1px solid rgba(255, 159, 46, .45); }
.bx-uplot-host .u-cursor-x, .bx-uplot-host .u-cursor-y { border-color: rgba(255, 220, 180, .28); }
.bx-uplot-tooltip {
    position: absolute; top: 0; left: 0; z-index: 5; pointer-events: none;
    min-width: 170px; max-width: min(260px, calc(100% - 16px)); padding: 10px 12px;
    background: rgba(20, 16, 13, .96); border: 1px solid var(--line-2); border-radius: 12px;
    box-shadow: var(--shadow-2); font-size: 12.5px; color: var(--text-2);
    will-change: transform;
}
.bx-tt-title { font-weight: 700; color: var(--text); margin-bottom: 6px; padding-bottom: 5px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.bx-tt-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 2px 0; font-variant-numeric: tabular-nums; }
.bx-tt-row span { display: inline-flex; align-items: center; gap: 7px; }
.bx-tt-row i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.bx-tt-row b { color: var(--text); font-weight: 700; }
.bx-tt-row b small { color: var(--muted); font-weight: 500; }
.bx-tt-row.is-cmp { margin-top: 4px; padding-top: 5px; border-top: 1px dashed var(--line-2); color: var(--accent-2); }
.bx-chart-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(23, 19, 15, .55); border-radius: 12px; backdrop-filter: blur(2px); color: var(--muted); font-weight: 600; z-index: 2; }
.bx-chart-empty { display: grid; place-items: center; gap: 10px; text-align: center; height: 100%; color: var(--muted); }

.bx-heatmap-card { padding: clamp(16px, 2.4vw, 24px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.bx-heatmap-card > * { min-width: 0; }
.bx-heatmap-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 100%; }
.bx-heatmap-scroll { overflow-x: auto; max-width: 100%; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.bx-heatmap-grid {
    display: grid;
    grid-template-columns: 36px repeat(24, minmax(18px, 1fr));
    gap: 4px;
    min-width: 560px;
    align-items: center;
}
.bx-hm-hour { text-align: center; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.bx-hm-day { font-size: 12px; font-weight: 600; color: var(--muted); padding-right: 4px; }
.bx-hm-cell { aspect-ratio: 1 / 1; min-height: 18px; border-radius: 5px; border: 1px solid rgba(255, 220, 180, .06); transition: transform .15s, border-color .15s; }
.bx-hm-cell:hover { transform: scale(1.16); border-color: var(--accent-2); z-index: 1; }
.bx-hm-cell.is-empty { background: var(--bg-soft); }
.bx-heatmap-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.bx-heatmap-empty { color: var(--muted); font-size: 13.5px; }
.bx-heatmap-legend { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; color: var(--dim); font-size: 12px; }
.bx-heatmap-scale { display: inline-flex; gap: 3px; }
.bx-heatmap-scale i { width: 14px; height: 14px; border-radius: 4px; }
.bx-heatmap-scale i:nth-child(1) { background: rgba(255, 159, 46, .16); }
.bx-heatmap-scale i:nth-child(2) { background: rgba(255, 159, 46, .36); }
.bx-heatmap-scale i:nth-child(3) { background: rgba(255, 159, 46, .56); }
.bx-heatmap-scale i:nth-child(4) { background: rgba(255, 159, 46, .76); }
.bx-heatmap-scale i:nth-child(5) { background: rgba(255, 159, 46, .95); }

/* ==========================================================================
   RULES
   ========================================================================== */
.bx-rules { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 20px; align-items: start; }
.bx-toc { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow: auto; padding: 20px 14px 20px 20px; }
.bx-toc-title { display: flex; align-items: center; gap: 10px; font: 600 12px/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin-bottom: 12px; }
.bx-toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.bx-toc ul ul { padding-left: 12px; margin: 2px 0 4px; border-left: 1px solid var(--line); margin-left: 10px; }
/* The Google Docs TOC builder wraps lists in empty <ul>s when the document skips heading levels — flatten them. */
.bx-toc ul:not(:has(> li)) > ul { padding-left: 0; margin: 0; border-left: 0; }
.bx-toc a { display: block; padding: 7px 10px; border-radius: 9px; color: var(--muted); font-size: 14px; line-height: 1.35; font-weight: 500; transition: color .2s, background .2s; }
.bx-toc a:hover { color: var(--text); background: rgba(255, 230, 200, .05); }
.bx-toc a.active { color: var(--accent-2); background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.bx-rules-card { padding: clamp(22px, 4vw, 48px); }
.bx-rules-mobile-bar { display: none; }
.bx-prose { color: var(--text-2); font-size: 16.5px; line-height: 1.75; overflow-wrap: anywhere; }
.bx-prose > :first-child { margin-top: 0 !important; }
.bx-prose h1, .bx-prose h2, .bx-prose h3, .bx-prose h4 { color: var(--text); font-family: var(--font-display); letter-spacing: -.02em; line-height: 1.25; scroll-margin-top: calc(var(--header-h) + 20px); }
.bx-prose h1 { font-size: clamp(24px, 2.6vw, 30px); margin: 2.2em 0 .7em; padding-top: 1.1em; border-top: 1px solid var(--line); }
.bx-prose h1:first-child { border-top: 0; padding-top: 0; }
.bx-prose h2 { font-size: clamp(20px, 2.1vw, 24px); margin: 1.9em 0 .6em; }
.bx-prose h3 { font-size: 18px; margin: 1.6em 0 .5em; }
.bx-prose h4 { font-size: 16px; margin: 1.4em 0 .4em; }
.bx-prose p { margin: 0 0 1em; text-align: left !important; }
.bx-prose ul, .bx-prose ol { margin: .6em 0 1.2em; padding-left: 1.4em; }
.bx-prose li { margin: .35em 0; }
.bx-prose li::marker { color: var(--accent); }
.bx-prose a { color: var(--accent-2); text-decoration: underline; text-decoration-color: rgba(255, 200, 97, .4); text-underline-offset: 3px; }
.bx-prose a:hover { text-decoration-color: var(--accent-2); }
.bx-prose strong, .bx-prose b { color: var(--text); font-weight: 700; }
.bx-prose blockquote { margin: 1.2em 0; padding: 14px 18px; border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; background: var(--accent-soft); }
.bx-prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1em 0 1.4em; font-size: 15px; }
.bx-prose th, .bx-prose td { border: 1px solid var(--line-2); padding: 10px 12px; vertical-align: top; }
.bx-prose th { background: var(--surface-3); color: var(--text); }
.bx-prose img { max-width: 100%; height: auto; border-radius: 12px; margin: 1em 0; }
.bx-prose hr { border: 0; height: 1px; background: var(--line-2); margin: 2em 0; }
.bx-prose .rules-error { color: var(--danger); padding: 14px; border: 1px dashed var(--danger); border-radius: 12px; background: var(--danger-soft); }
.bx-prose [style*="color"] { color: inherit !important; }
.bx-to-top {
    position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 60;
    opacity: 0; transform: translateY(10px); pointer-events: none;
    transition: opacity .25s, transform .25s var(--ease);
}
.bx-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.bx-toc-dialog { width: min(440px, calc(100% - 24px)); }
.bx-toc-dialog .bx-toc { position: static; max-height: none; padding: 24px 20px; }

/* ==========================================================================
   DOWNLOAD
   ========================================================================== */
.bx-platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.bx-platform {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; flex-direction: column; gap: 14px;
    padding: clamp(22px, 3vw, 30px);
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--line); border-radius: var(--r-lg);
    transition: transform .25s var(--ease), border-color .25s;
}
.bx-platform:hover { transform: translateY(-4px); border-color: var(--line-3); }
.bx-platform.is-recommended { border-color: rgba(255, 159, 46, .5); box-shadow: 0 30px 60px -36px var(--accent-glow); }
.bx-platform.is-recommended::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(380px 200px at 100% 0%, rgba(255, 159, 46, .18), transparent 70%); }
.bx-platform-badge { position: absolute; top: 18px; right: 18px; padding: 5px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.bx-platform-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--surface-3); color: var(--text); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06); }
.bx-platform[data-platform="android"] .bx-platform-icon { color: #9be27c; }
.bx-platform[data-platform="ios"] .bx-platform-icon { color: #f2ecff; }
.bx-platform[data-platform="windows"] .bx-platform-icon { color: #6cc4ff; }
.bx-platform h2 { font: 700 24px/1.2 var(--font-display); letter-spacing: -.03em; }
.bx-platform p { color: var(--muted); font-size: 15px; }
.bx-platform-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.bx-platform-meta span { padding: 4px 10px; border-radius: 8px; background: rgba(255, 230, 200, .05); border: 1px solid var(--line); }
.bx-platform-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: auto; padding-top: 8px; }
.bx-have-mc { display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; margin-top: 14px; padding: clamp(20px, 3vw, 30px); }
.bx-have-mc h2 { font: 700 22px/1.2 var(--font-display); letter-spacing: -.02em; margin-bottom: 6px; }
.bx-have-mc p { color: var(--muted); }

.bx-guide-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.bx-guide-aside { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 14px; }
.bx-guide-aside .bx-card { padding: 22px; display: grid; gap: 14px; }
.bx-guide-aside h3 { font: 600 12px/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.bx-file-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.bx-file-row b { color: var(--text); font-weight: 600; overflow-wrap: anywhere; text-align: right; }
.bx-other-platforms { display: grid; gap: 8px; }
.bx-other-platforms a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 230, 200, .04); border: 1px solid var(--line); font-weight: 600; transition: border-color .2s, background .2s; }
.bx-other-platforms a:hover { border-color: var(--line-3); background: rgba(255, 230, 200, .07); }
.bx-other-platforms a .bx-icon:last-child { margin-left: auto; color: var(--dim); }
.bx-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 18px; }
.bx-tabs button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 18px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-weight: 700; font-size: 14.5px; transition: background .2s, color .2s; }
.bx-tabs button[aria-selected="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .35), inset 0 0 0 1px var(--line-2); }
.bx-guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: gstep; }
.bx-guide-step { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 0 20px; padding-bottom: 28px; }
.bx-guide-step::before {
    counter-increment: gstep; content: counter(gstep);
    display: grid; place-items: center; width: 48px; height: 48px;
    font: 800 18px/1 var(--font-display); color: var(--accent-ink);
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
    border-radius: 13px;
    box-shadow: inset 0 -4px 0 rgba(130, 50, 0, .5), inset 0 2px 0 rgba(255, 255, 255, .4);
    position: relative; z-index: 1;
}
.bx-guide-step::after { content: ""; position: absolute; left: 23px; top: 56px; bottom: 6px; width: 2px; background: repeating-linear-gradient(180deg, var(--line-2) 0 6px, transparent 6px 12px); }
.bx-guide-step:last-child::after { display: none; }
.bx-guide-step-body { display: grid; gap: 12px; min-width: 0; padding: 4px 0 0; }
.bx-guide-step-body > .bx-card { padding: clamp(18px, 2.4vw, 24px); display: grid; gap: 12px; }
.bx-guide-step h3 { font: 600 17.5px/1.55 var(--font-body); color: var(--text); padding-top: 10px; }
.bx-guide-step h3 code { font-size: .85em; }
.bx-guide-step p, .bx-guide-step li { color: var(--text-2); }
.bx-guide-step b { color: var(--text); font-weight: 700; }
.bx-guide-step ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.bx-guide-step a:not(.bx-btn) { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.bx-guide-note { padding: 12px 14px; border-radius: 12px; background: var(--violet-soft); border: 1px solid rgba(165, 133, 255, .25); color: var(--text-2); font-size: 14.5px; }
.bx-guide-warn { padding: 12px 14px; border-radius: 12px; background: var(--danger-soft); border: 1px solid rgba(255, 107, 91, .3); color: var(--text-2); font-size: 14.5px; }
/* --- screenshot carousel (inside a guide step) --- */
.bx-carousel { position: relative; display: grid; gap: 10px; max-width: 640px; }
.bx-carousel-viewport { position: relative; border-radius: 16px; background: var(--bg-soft); border: 1px solid var(--line-2); overflow: hidden; }
.bx-carousel-track {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    overscroll-behavior-x: contain; scrollbar-width: none; outline: none;
}
.bx-carousel-track::-webkit-scrollbar { display: none; }
.bx-carousel-track:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-2); }
.bx-carousel-track.is-dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; }
.bx-slide { flex: 0 0 100%; scroll-snap-align: center; margin: 0; display: grid; place-items: center; padding: 10px; }
.bx-shot { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: transparent; cursor: zoom-in; }
.bx-shot img { width: 100%; height: clamp(220px, 34vw, 400px); object-fit: contain; transition: transform .4s var(--ease); -webkit-user-drag: none; user-select: none; }
.bx-shot:hover img { transform: scale(1.02); }
.bx-shot-zoom {
    position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
    background: rgba(12, 10, 9, .75); border: 1px solid var(--line-2); color: var(--text); backdrop-filter: blur(6px);
    opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s var(--ease);
}
.bx-shot:hover .bx-shot-zoom, .bx-shot:focus-visible .bx-shot-zoom { opacity: 1; transform: none; }
.bx-carousel-btn {
    position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
    display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%;
    background: rgba(18, 14, 11, .82); border: 1px solid var(--line-3); color: var(--text);
    backdrop-filter: blur(8px); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .8);
    transition: opacity .2s, background .2s, transform .2s var(--ease);
}
.bx-carousel-btn:hover { background: rgba(40, 32, 24, .95); transform: translateY(-50%) scale(1.06); }
.bx-carousel-btn[data-prev] { left: 10px; }
.bx-carousel-btn[data-next] { right: 10px; }
.bx-carousel-btn:disabled { opacity: 0; pointer-events: none; }
.bx-carousel-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bx-carousel-count { font: 600 13px/1 var(--font-body); color: var(--muted); font-variant-numeric: tabular-nums; }
.bx-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.bx-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 3px; background: var(--line-3); transition: width .25s var(--ease), background .2s; }
.bx-dots button[aria-current="true"] { width: 26px; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.bx-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.bx-thumbs::-webkit-scrollbar { display: none; }
.bx-thumbs button { flex: none; width: 64px; height: 44px; padding: 0; border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: var(--bg-soft); opacity: .55; transition: opacity .2s, border-color .2s; }
.bx-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.bx-thumbs button:hover { opacity: .85; }
.bx-thumbs button[aria-current="true"] { opacity: 1; border-color: var(--accent); }

/* --- fullscreen gallery --- */
.bx-gallery {
    width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0;
    background: rgba(8, 6, 5, .97); color: var(--text); overflow: hidden;
}
.bx-gallery[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: bx-fade .25s var(--ease); }
.bx-gallery::backdrop { background: rgba(0, 0, 0, .8); }
.bx-gallery-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(12px, env(safe-area-inset-top)) 16px 10px; }
.bx-gallery-title { display: grid; gap: 2px; min-width: 0; }
.bx-gallery-title b { font: 700 15px/1.2 var(--font-display); }
.bx-gallery-title span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.bx-gallery-tools { display: flex; gap: 8px; }
.bx-gallery-stage { position: relative; overflow: hidden; touch-action: none; cursor: zoom-in; display: grid; place-items: center; }
.bx-gallery-stage.is-zoomed { cursor: grab; }
.bx-gallery-stage.is-panning { cursor: grabbing; }
.bx-gallery-img { max-width: calc(100% - 32px); max-height: calc(100% - 16px); object-fit: contain; border-radius: 10px; user-select: none; -webkit-user-drag: none; transition: transform .3s var(--ease), opacity .2s; will-change: transform; }
.bx-gallery-stage.is-panning .bx-gallery-img, .bx-gallery-stage.is-swiping .bx-gallery-img { transition: none; }
.bx-gallery .bx-carousel-btn { width: 52px; height: 52px; }
.bx-gallery .bx-carousel-btn[data-prev] { left: 16px; }
.bx-gallery .bx-carousel-btn[data-next] { right: 16px; }
.bx-gallery-bottom { display: grid; justify-items: center; gap: 10px; padding: 10px 16px max(14px, env(safe-area-inset-bottom)); }
.bx-gallery-bottom .bx-thumbs { max-width: 100%; }
.bx-gallery-hint { color: var(--dim); font-size: 12.5px; }
@media (max-width: 640px) { .bx-gallery .bx-carousel-btn { display: none; } .bx-gallery-hint { display: none; } }
.bx-server-data { display: grid; gap: 6px; padding: 14px 16px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 15px; }
.bx-server-data b { color: var(--accent-2); }
.bx-done { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; padding: clamp(20px, 3vw, 28px); background: radial-gradient(400px 200px at 100% 0%, rgba(127, 224, 141, .14), transparent 70%), linear-gradient(180deg, var(--surface-2), var(--surface)); }
.bx-done h3 { font: 800 22px/1.2 var(--font-display); letter-spacing: -.02em; margin-bottom: 4px; }
.bx-done p { color: var(--muted); }

/* ==========================================================================
   PLAY & 404
   ========================================================================== */
.bx-center-page { display: grid; place-items: center; min-height: calc(100vh - var(--header-h) - 200px); padding-block: clamp(40px, 8vw, 96px); }
.bx-center-card { width: min(720px, 100%); padding: clamp(26px, 5vw, 48px); display: grid; gap: 18px; text-align: left; overflow: hidden; }
.bx-center-card h1 { font: 800 clamp(32px, 5vw, 52px)/1.05 var(--font-display); letter-spacing: -.035em; }
.bx-manual-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: ms; }
.bx-manual-steps li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: center; color: var(--text-2); }
.bx-manual-steps li::before { counter-increment: ms; content: counter(ms); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--surface-3); color: var(--accent-2); font: 700 14px/1 var(--font-display); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .35); }
.bx-404-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* --- 404: broken, glitching page --- */
.bx-page-404 { overflow-x: hidden; }
.bx-page-404 .bx-center-card { position: relative; isolation: isolate; animation: bx-card-shake 6s infinite steps(1); }
.bx-page-404 .bx-center-card::before {
    content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px);
    mix-blend-mode: overlay;
}
.bx-page-404 .bx-center-card::after {
    content: ""; position: absolute; left: 0; right: 0; height: 18%; z-index: 3; pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(255, 159, 46, .08), transparent);
    animation: bx-scan 4.5s linear infinite;
}
.bx-glitch {
    position: relative; display: inline-block; width: fit-content;
    font: 800 clamp(110px, 22vw, 220px)/.9 var(--font-display); letter-spacing: -.06em;
    color: var(--accent-2);
    text-shadow: 0 0 40px rgba(255, 150, 40, .35);
    animation: bx-glitch-skew 3.2s infinite steps(1);
}
.bx-glitch::before, .bx-glitch::after {
    content: attr(data-text); position: absolute; inset: 0; pointer-events: none;
}
.bx-glitch::before { color: #ff3d6e; mix-blend-mode: screen; animation: bx-glitch-a 2.4s infinite steps(1); }
.bx-glitch::after { color: #3df2ff; mix-blend-mode: screen; animation: bx-glitch-b 1.9s infinite steps(1); }
.bx-glitch-text { position: relative; display: inline-block; }
.bx-glitch-text.is-glitching { animation: bx-text-jitter .35s steps(2) 1; text-shadow: 2px 0 #ff3d6e, -2px 0 #3df2ff; }
.bx-404-cracks { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; border-radius: inherit; }
.bx-404-cracks svg { position: absolute; right: -10px; top: -10px; width: 60%; height: auto; opacity: .35; }
.bx-404-blocks { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 4; }
.bx-404-blocks i {
    position: absolute; top: var(--y); left: var(--x); width: var(--s); height: var(--s);
    background: var(--c); box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .3), inset 3px 3px 0 rgba(255, 255, 255, .25);
    animation: bx-fall 5s cubic-bezier(.55, 0, .9, .4) infinite; animation-delay: var(--d);
}
.bx-noise { position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .06; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: bx-noise .4s steps(4) infinite; }
.bx-page-404 .bx-btn-primary { animation: bx-btn-flicker 5s infinite steps(1); }
@keyframes bx-glitch-a {
    0%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
    8% { clip-path: inset(12% 0 60% 0); transform: translate(-6px, 2px); }
    10% { clip-path: inset(70% 0 8% 0); transform: translate(5px, -2px); }
    12% { clip-path: inset(0 0 100% 0); }
    46% { clip-path: inset(40% 0 38% 0); transform: translate(-10px, 0); }
    48% { clip-path: inset(0 0 100% 0); }
    74% { clip-path: inset(85% 0 2% 0); transform: translate(8px, 1px); }
    76% { clip-path: inset(0 0 100% 0); }
}
@keyframes bx-glitch-b {
    0%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
    14% { clip-path: inset(55% 0 22% 0); transform: translate(7px, -1px); }
    16% { clip-path: inset(5% 0 80% 0); transform: translate(-4px, 2px); }
    18% { clip-path: inset(0 0 100% 0); }
    60% { clip-path: inset(25% 0 55% 0); transform: translate(9px, 0); }
    63% { clip-path: inset(0 0 100% 0); }
}
@keyframes bx-glitch-skew { 0%, 100% { transform: none; } 9% { transform: skewX(-8deg) translateX(-4px); } 11% { transform: none; } 47% { transform: skewX(6deg) scaleY(1.04); } 49% { transform: none; } 75% { transform: translateX(6px); } 77% { transform: none; } }
@keyframes bx-card-shake { 0%, 100% { transform: none; filter: none; } 47% { transform: translate(-3px, 1px); filter: hue-rotate(20deg) saturate(1.4); } 48% { transform: translate(3px, -1px); filter: none; } 49% { transform: none; } 83% { transform: skewX(1.5deg); } 84% { transform: none; } }
@keyframes bx-scan { from { top: -20%; } to { top: 110%; } }
@keyframes bx-text-jitter { 0% { transform: translateX(-3px); } 50% { transform: translateX(3px) skewX(-6deg); } 100% { transform: none; } }
@keyframes bx-fall { 0% { transform: translateY(0) rotate(0); opacity: 0; } 8% { opacity: 1; } 100% { transform: translateY(var(--fall, 420px)) rotate(var(--r, 90deg)); opacity: 0; } }
@keyframes bx-noise { 0% { transform: translate(0, 0); } 25% { transform: translate(-5%, 3%); } 50% { transform: translate(4%, -4%); } 75% { transform: translate(-3%, -2%); } 100% { transform: translate(2%, 5%); } }
@keyframes bx-btn-flicker { 0%, 100% { opacity: 1; } 62% { opacity: .55; } 63% { opacity: 1; } 64% { opacity: .7; } 65% { opacity: 1; } }

/* ==========================================================================
   NAV PROGRESS, WEATHER, SNOW, TOASTS, MEOW
   ========================================================================== */
.bx-nav-progress {
    position: fixed; left: 0; top: 0; z-index: 400; height: 3px; width: 0; opacity: 0;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    box-shadow: 0 0 12px var(--accent-glow);
    transition: width .3s var(--ease), opacity .3s;
}
.bx-nav-progress.is-active { opacity: 1; width: 70%; transition: width 6s cubic-bezier(.1, .7, .2, 1), opacity .1s; }
.bx-nav-progress.is-done { opacity: 0; width: 100%; transition: width .2s, opacity .4s .2s; }
#bx-view { display: flex; flex-direction: column; flex: 1 0 auto; view-transition-name: bx-view; }
#bx-view > main { flex: 1 0 auto; }
.bx-header { view-transition-name: bx-header; }
::view-transition-group(bx-header) { z-index: 2; animation: none; }
::view-transition-old(bx-header) { display: none; }
::view-transition-new(bx-header) { animation: none; }
::view-transition-old(bx-view) { animation: bx-view-out .18s var(--ease) both; }
::view-transition-new(bx-view) { animation: bx-view-in .32s var(--ease) both; }
@keyframes bx-view-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes bx-view-in { from { opacity: 0; transform: translateY(12px); } }

.bx-weather {
    position: relative; display: inline-grid; place-items: center;
    width: 40px; height: 40px; padding: 0; border-radius: 10px;
    border: 1px solid var(--line); background: rgba(255, 230, 200, .05); color: var(--muted);
    transition: color .2s, background .2s, border-color .2s;
}
.bx-weather:hover { color: var(--text); border-color: var(--line-3); }
.bx-weather .bx-icon { grid-area: 1 / 1; transition: transform .4s var(--ease), opacity .3s; }
.bx-weather .bx-weather-snow { opacity: 0; transform: rotate(-90deg) scale(.5); }
.bx-weather[aria-pressed="true"] { color: #bfe6ff; background: rgba(120, 190, 255, .12); border-color: rgba(140, 200, 255, .35); }
.bx-weather[aria-pressed="true"] .bx-weather-snow { opacity: 1; transform: none; }
.bx-weather[aria-pressed="true"] .bx-weather-sun { opacity: 0; transform: rotate(90deg) scale(.5); }
.bx-weather-label { display: none; }
.bx-snow { position: fixed; inset: 0; z-index: 95; width: 100vw; height: 100vh; pointer-events: none; image-rendering: pixelated; }

.bx-toasts {
    position: fixed; z-index: 280; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
    display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none;
}
.bx-toast-card {
    position: relative; overflow: hidden; pointer-events: auto;
    display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start;
    padding: 16px 16px 18px; border-radius: 18px;
    background: radial-gradient(260px 140px at 0% 0%, rgba(255, 159, 46, .2), transparent 70%), linear-gradient(180deg, #241d16, #1a1511);
    border: 1px solid rgba(255, 180, 90, .3);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .06);
    animation: bx-toast-card-in .5s var(--ease) both;
}
.bx-toast-card.is-leaving { animation: bx-toast-card-out .3s var(--ease) both; }
.bx-toast-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink); box-shadow: inset 0 -4px 0 rgba(130, 50, 0, .5), inset 0 2px 0 rgba(255, 255, 255, .4); }
.bx-toast-icon img { width: 34px; height: 34px; object-fit: contain; image-rendering: pixelated; }
.bx-toast-icon.has-image { background: var(--surface-3); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .35); }
.bx-toast-body { display: grid; gap: 4px; min-width: 0; }
.bx-toast-body strong { font: 800 15.5px/1.25 var(--font-display); letter-spacing: -.02em; }
.bx-toast-body p { color: var(--text-2); font-size: 14px; line-height: 1.45; }
.bx-toast-body p b, .bx-toast-body p strong { color: var(--accent-2); font: inherit; font-weight: 800; }
.bx-toast-meta { color: var(--muted); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bx-toast-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.bx-toast-close { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: grid; place-items: center; }
.bx-toast-close:hover { background: rgba(255, 230, 200, .08); color: var(--text); }
.bx-toast-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transform-origin: left; animation: bx-toast-timer var(--dur, 9s) linear forwards; }
.bx-toast-card:hover .bx-toast-progress, .bx-toast-card:focus-within .bx-toast-progress { animation-play-state: paused; }
@keyframes bx-toast-card-in { from { opacity: 0; transform: translateY(20px) scale(.96); } }
@keyframes bx-toast-card-out { to { opacity: 0; transform: translateX(30px) scale(.96); } }
@keyframes bx-toast-timer { to { transform: scaleX(0); } }

.bx-brand-meow { padding: 0; border: 0; background: none; color: inherit; cursor: pointer; position: relative; }
.bx-brand-meow:active img { transform: scale(.9) rotate(-10deg); }
.bx-brand.is-meowing img { animation: bx-meow .6s var(--ease); }
@keyframes bx-meow { 0% { transform: none; } 25% { transform: scale(1.25) rotate(-12deg); } 55% { transform: scale(.92) rotate(8deg); } 100% { transform: none; } }
.bx-meow-bubble {
    position: fixed; z-index: 320; pointer-events: none;
    padding: 6px 12px; border-radius: 12px 12px 12px 4px;
    background: #fff4e3; color: var(--accent-ink); font: 800 14px/1 var(--font-display);
    box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .7);
    animation: bx-bubble 1.4s var(--ease) forwards;
}
.bx-meow-heart { position: fixed; z-index: 319; pointer-events: none; line-height: 0; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .35)); animation: bx-heart 1.2s ease-out forwards; }
.bx-meow-heart svg { display: block; }
@keyframes bx-bubble { 0% { opacity: 0; transform: translateY(6px) scale(.6); } 15% { opacity: 1; transform: translateY(-4px) scale(1.05); } 75% { opacity: 1; transform: translateY(-12px); } 100% { opacity: 0; transform: translateY(-22px); } }
@keyframes bx-heart { 0% { opacity: 0; transform: translate(0, 0) scale(.5); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--hx), -60px) scale(1.1); } }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 980px) {
    .bx-hero-inner { grid-template-columns: 1fr; grid-template-areas: "art" "content"; }
    .bx-hero-art { max-width: 420px; margin-bottom: -20px; }
    .bx-hero-glow { background: radial-gradient(420px 340px at 50% 22%, rgba(255, 150, 40, .22), transparent 70%), radial-gradient(400px 300px at 100% 0%, rgba(165, 133, 255, .14), transparent 70%); }
}
@media (max-width: 1100px) {
    /* tighter header so the cart button never lands on top of "Play" just above the mobile breakpoint */
    .bx-header-inner { gap: 14px; }
    .bx-header .bx-nav { gap: 12px; }
    .bx-nav-extra { gap: 8px; }
    .bx-nav-list a { padding: 9px 8px; }
    .bx-live-pill { display: none !important; }
    .bx-guide-layout { grid-template-columns: 1fr; }
    .bx-guide-aside { position: static; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
    :root { --header-h: 68px; }
    .bx-menu-toggle { display: grid; place-items: center; }
    .bx-header .bx-nav {
        position: fixed; inset: var(--header-h) 0 auto 0; z-index: 99;
        max-height: calc(100dvh - var(--header-h)); overflow: auto;
        flex-direction: column; align-items: stretch; gap: 18px;
        padding: 18px var(--gutter) 26px;
        background: #0e0b09; border-bottom: 1px solid var(--line-2);
        backdrop-filter: blur(16px);
        box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8);
        opacity: 0; visibility: hidden; transform: translateY(-8px);
        transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s;
    }
    .bx-header.is-open .bx-nav { opacity: 1; visibility: visible; transform: none; transition: opacity .25s var(--ease), transform .25s var(--ease); }
    .bx-header.is-open { background: rgba(14, 11, 9, .97); }
    .bx-nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
    .bx-nav-list a { padding: 14px 12px; font-size: 17px; border-radius: 12px; }
    .bx-nav-list a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-2); }
    .bx-nav-list a[aria-current="page"]::after { display: none; }
    .bx-nav-extra { margin: 0; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--line); }
    .bx-nav-extra .bx-btn { flex: 1; min-height: 48px; }
    .bx-live-pill { display: inline-flex !important; }
    .bx-live-pill[hidden] { display: none !important; }
    .bx-steps { grid-template-columns: 1fr; }
    .bx-bento { grid-template-columns: 1fr 1fr; }
    .bx-dest-big { grid-column: 1 / -1; grid-row: auto; min-height: 340px; }
    .bx-news-grid { grid-template-columns: 1fr 1fr; }
    .bx-news-grid > :nth-child(3) { display: none; }
    .bx-community { grid-template-columns: 1fr; }
    .bx-footer-grid { grid-template-columns: 1fr 1fr; }
    .bx-footer-brand { grid-column: 1 / -1; }
    .bx-platforms { grid-template-columns: 1fr; }
    .bx-platform { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: start; }
    .bx-platform-icon { grid-row: span 3; }
    .bx-platform-actions, .bx-platform-meta { grid-column: 2; }
    .bx-rules { grid-template-columns: 1fr; }
    .bx-rules > .bx-toc { display: none; }
    .bx-rules-mobile-bar { display: flex; position: sticky; top: calc(var(--header-h) + 8px); z-index: 20; margin-bottom: 12px; }
    .bx-rules-mobile-bar .bx-btn { width: 100%; justify-content: space-between; background: rgba(30, 25, 20, .92); backdrop-filter: blur(12px); }
    .bx-shop-guide { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .bx-hero { min-height: auto; }
    .bx-hero-inner { padding-block: 8px 72px; gap: 4px; }
    .bx-hero-art { max-width: 320px; margin-bottom: 8px; }
    /* smaller blocks that stay at the edges (scaling the whole layer pulled them onto the cat) */
    .bx-hero-art .bx-hero-cubes { --cube-k: .6; }
    .bx-hero-actions { display: grid; grid-template-columns: 1fr; }
    .bx-hero-actions .bx-btn, .bx-hero-actions .bx-address { width: 100%; }
    .bx-address-wide, .bx-hero-actions .bx-address { display: flex; }
    .bx-hero-actions .bx-address .bx-address-text { flex: 1; }
    .bx-stat { flex: 1 1 auto; min-width: 0; padding: 12px 14px; }
    .bx-stat strong { font-size: 19px; }
    .bx-hero-scroll { display: none; }
    .bx-modes { grid-template-columns: 1fr; gap: 10px; }
    .bx-mode { min-height: 0; padding: 16px; }
    .bx-mode-icon { width: 56px; height: 56px; }
    .bx-mode-icon img { width: 34px; height: 34px; }
    .bx-bento { grid-template-columns: 1fr; }
    .bx-dest { min-height: 200px; }
    .bx-dest-big { min-height: 300px; }
    .bx-dest-wide { min-height: 0; align-items: flex-start; }
    .bx-dest-wide .bx-link { margin-left: 0; }
    .bx-clicker-page { padding-block: 12px 24px; }
    .bx-clicker-bar-actions, .bx-clicker-bar-actions .bx-btn { width: 100%; justify-content: center; }
    .bx-clicker-frame-wrap { height: calc(100dvh - var(--header-h) - 96px); min-height: 540px; border-radius: var(--r); }
    .bx-news-grid { grid-template-columns: 1fr; }
    .bx-news-grid > :nth-child(3) { display: flex; }
    .bx-community-links { grid-template-columns: 1fr; }
    .bx-footer-cta-actions, .bx-footer-cta-actions > * { width: 100%; }
    .bx-footer-cta-actions .bx-address { display: flex; }
    .bx-footer-cta-actions .bx-address-text { flex: 1; }
    .bx-footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
    .bx-dialog-actions { grid-template-columns: 1fr; }
    .bx-page-head-actions, .bx-page-head-actions > * { width: 100%; }
    .bx-page-head-actions .bx-address { display: flex; }
    .bx-page-head-actions .bx-address-text { flex: 1; }
    .bx-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
    .bx-kpi { padding: 12px; grid-template-columns: 1fr; gap: 4px; min-width: 0; }
    .bx-kpi img { grid-row: auto; width: 34px; height: 34px; margin-bottom: 4px; }
    .bx-kpi-total { grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0 12px; padding: 14px; }
    .bx-kpi-total .bx-kpi-badge { width: 44px; height: 44px; }
    .bx-kpi-value { font-size: 22px; }
    .bx-kpi-total .bx-kpi-value { font-size: 28px; }
    .bx-kpi-record { padding: 5px 10px; font-size: 12px; }
    .bx-summary-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .bx-summary-card { padding: 12px 14px; min-width: 0; }
    .bx-summary-val { font-size: 20px; }
    .bx-controls { padding: 14px; }
    .bx-controls-row > * { width: 100%; min-width: 0; }
    .bx-segment { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
    .bx-segment button { padding: 6px 4px; font-size: 12px; line-height: 1.2; white-space: normal; text-align: center; min-width: 0; }
    .bx-server-chip span { font-size: 13px; padding: 5px 11px 5px 8px; min-height: 34px; }
    .bx-controls-actions { flex-direction: column; align-items: stretch; gap: 12px; }
    .bx-controls-actions > div { width: 100%; }
    .bx-controls-actions > div:first-child { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .bx-controls-actions > div:first-child .bx-btn { width: 100%; justify-content: center; }
    .bx-controls-tools { display: flex; flex-wrap: wrap; gap: 8px; }
    .bx-controls-tools .bx-switch { flex: 1 1 100%; }
    .bx-controls-tools .bx-btn { flex: 1 1 0; justify-content: center; padding-inline: 10px; }
    .bx-chart-card { padding: 14px; }
    .bx-chart-wrap { height: 280px; }
    .bx-avg { gap: 6px; }
    .bx-avg-pill { font-size: 12px; padding: 5px 9px; }
    .bx-range-label { font-size: 12px; padding: 5px 10px; }
    .bx-zoom-hint { display: none; }
    .bx-heatmap-card { padding: 14px; }
    .bx-heatmap-controls { width: 100%; }
    .bx-heatmap-controls .bx-select { flex: 1 1 100%; }
    .bx-heatmap-controls .bx-segment { flex: 1 1 100%; }
    .bx-guide-step { grid-template-columns: 1fr; gap: 12px; }
    .bx-guide-step::after { display: none; }
    .bx-guide-step::before { width: 40px; height: 40px; font-size: 16px; border-radius: 11px; }
    .bx-guide-step h3 { padding-top: 0; }
    .bx-guide-aside { grid-template-columns: 1fr; }
    .bx-carousel-btn { width: 38px; height: 38px; }
    .bx-shot img { height: 300px; }
    .bx-platform { display: flex; }
    .bx-platform-actions { grid-template-columns: 1fr; }
    .bx-tabs { display: flex; }
    .bx-tabs button { flex: 1; justify-content: center; padding-inline: 10px; }
    .bx-mode-tabs { margin-inline: calc(-1 * var(--gutter)); border-radius: 0; border-inline: 0; padding-inline: var(--gutter); }
    .bx-mode-tab { flex: none; }
    .bx-catalog { padding: 14px; }
}
@media (max-width: 420px) {
    .bx-address > span { padding-inline: 12px; }
    .bx-address > .bx-address-port { padding-inline: 10px; }
    .bx-address-icon { padding-inline: 10px !important; }
    .bx-address strong { font-size: clamp(12px, 3.7vw, 15px); }
    .bx-step .bx-address { display: flex; justify-self: stretch; }
    .bx-step .bx-address-text { flex: 1; }
}
@media (max-width: 380px) {
    .bx-brand-word { font-size: 16px; }
}
@media (max-width: 330px) {
    .bx-kpis { grid-template-columns: 1fr; }
    .bx-kpi-total { grid-column: auto; }
    .bx-footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .js [data-reveal] { opacity: 1; transform: none; }
}

/* ==========================================================================
   ANIMATED MODE ICONS (bow, sword, flint and steel) — driven by site.js
   ========================================================================== */
.bx-anim { position: relative; display: inline-block; flex: none; width: var(--icon, 40px); height: var(--icon, 40px); }
.bx-anim > img, .bx-anim > svg { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
/* bow */
.bx-bowstring { overflow: visible; }
.bx-bowstring polyline { fill: none; stroke: #7d7d7d; stroke-width: .95; stroke-linejoin: miter; }
.bx-bow-arrow { opacity: 0; will-change: transform, opacity; }
/* sword */
.bx-sword { transform-origin: 22% 80%; }
.bx-anim-sword.is-playing .bx-sword { animation: bx-sword-swing .75s cubic-bezier(.3, .1, .2, 1) both; }
.bx-slash { overflow: visible; pointer-events: none; }
.bx-slash path { fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; opacity: 0; stroke-dasharray: 60; stroke-dashoffset: 60; filter: drop-shadow(0 0 4px rgba(255, 255, 255, .7)); }
.bx-anim-sword.is-playing .bx-slash path { animation: bx-slash .75s ease-out both; }
@keyframes bx-sword-swing {
    0% { transform: none; }
    30% { transform: rotate(32deg) translate(-2px, 2px); }
    52% { transform: rotate(-58deg) translate(3px, -2px); }
    62% { transform: rotate(-48deg); }
    100% { transform: none; }
}
@keyframes bx-slash {
    0%, 36% { opacity: 0; stroke-dashoffset: 60; }
    50% { opacity: .9; stroke-dashoffset: 0; }
    75% { opacity: 0; stroke-dashoffset: -50; }
    100% { opacity: 0; }
}
/* flint and steel */
.bx-steel { transform-origin: 30% 35%; z-index: 2; }
.bx-flint { z-index: 1; }
.bx-anim-fire .bx-fire { inset: auto; left: 44%; top: 10%; width: 48%; height: 54%; z-index: 1; opacity: 0; transform-origin: 50% 100%; overflow: visible; }
.bx-fire g { opacity: 0; }
.bx-fire .f1 { opacity: 1; }
.bx-anim-fire.is-playing .bx-fire { animation: bx-fire-life 2.1s ease-out both; }
.bx-anim-fire.is-playing .bx-fire .f1 { animation: bx-fire-f1 .36s steps(1) infinite; }
.bx-anim-fire.is-playing .bx-fire .f2 { animation: bx-fire-f2 .36s steps(1) infinite; }
.bx-anim-fire.is-playing .bx-fire .f3 { animation: bx-fire-f3 .36s steps(1) infinite; }
.bx-anim-fire.is-playing .bx-steel { animation: bx-steel-strike 2.1s cubic-bezier(.3, .1, .2, 1) both; }
.bx-anim-fire.is-playing .bx-flint { animation: bx-flint-hit 2.1s linear both; }
.bx-burst, .bx-smoke { position: absolute; left: 50%; top: 52%; width: 0; height: 0; z-index: 3; pointer-events: none; }
.bx-burst i, .bx-smoke i { position: absolute; left: 0; top: 0; width: 3px; height: 3px; opacity: 0; }
.bx-burst i { background: #ffd23f; box-shadow: 0 0 6px #ff8a1f; }
.bx-anim-fire.is-playing .bx-burst i { animation: bx-spark-fly .55s ease-out .38s both; }
.bx-smoke { top: 18%; left: 62%; }
.bx-smoke i { width: 5px; height: 5px; background: #8a8580; }
.bx-smoke i:nth-child(2) { left: -6px; }
.bx-smoke i:nth-child(3) { left: 5px; }
.bx-anim-fire.is-playing .bx-smoke i { animation: bx-smoke-rise .8s ease-out 1.55s both; }
.bx-anim-fire.is-playing .bx-smoke i:nth-child(2) { animation-delay: 1.65s; }
.bx-anim-fire.is-playing .bx-smoke i:nth-child(3) { animation-delay: 1.75s; }
@keyframes bx-steel-strike {
    0% { transform: none; }
    16% { transform: translate(-6%, -8%) rotate(14deg); }
    19% { transform: translate(18%, 14%) rotate(-22deg); }
    24% { transform: translate(10%, 8%) rotate(-12deg); }
    34%, 84% { transform: translate(-10%, -6%) rotate(10deg); }
    100% { transform: none; }
}
@keyframes bx-flint-hit { 0%, 18% { transform: none; } 20% { transform: translate(4%, 3%); } 25%, 100% { transform: none; } }
@keyframes bx-fire-life {
    0%, 19% { opacity: 0; transform: scale(.1); }
    30% { opacity: 1; transform: scale(1.05); }
    36%, 66% { opacity: 1; transform: scale(1); }
    82% { opacity: .6; transform: scale(.35); }
    90%, 100% { opacity: 0; transform: scale(.1); }
}
@keyframes bx-fire-f1 { 0% { opacity: 1; } 33.3% { opacity: 0; } }
@keyframes bx-fire-f2 { 0% { opacity: 0; } 33.3% { opacity: 1; } 66.6% { opacity: 0; } }
@keyframes bx-fire-f3 { 0% { opacity: 0; } 66.6% { opacity: 1; } }
@keyframes bx-spark-fly { 0% { opacity: 1; transform: translate(0, 0); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)); } }
@keyframes bx-smoke-rise { 0% { opacity: .7; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(2px, -16px) scale(1.6); } }
@media (prefers-reduced-motion: reduce) { .bx-anim * { animation: none !important; } }

/* ==========================================================================
   SHOP CATALOGUE (shop/catalog.js)
   ========================================================================== */
.bx-select-sm { min-height: 38px; padding: 6px 34px 6px 12px; font-size: 14px; border-radius: 10px; background-position: right 10px center; }
.bx-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.bx-chips .bx-chip span { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: rgba(255, 230, 200, .08); font-size: 12px; color: var(--muted); }
.bx-chips .bx-chip[aria-pressed="true"] span { background: rgba(255, 159, 46, .2); color: var(--accent-2); }
.bx-chip-static { cursor: default; min-height: 32px; padding: 5px 12px; font-size: 13px; }
.bx-chip-static img { image-rendering: pixelated; }
.bx-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.bx-item {
    position: relative; display: flex;
    background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
    border: 1px solid var(--line-2); border-radius: 18px;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .3);
    transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.bx-item:hover { transform: translateY(-4px); border-color: rgba(255, 159, 46, .55); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .3), 0 24px 40px -24px var(--accent-glow); }
.bx-item.is-in-cart { border-color: rgba(127, 224, 141, .45); }
.bx-item-main { flex: 1; display: flex; flex-direction: column; padding: 10px; border: 0; background: none; color: var(--text); text-align: left; border-radius: inherit; }
.bx-item-pic {
    position: relative; isolation: isolate; display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; overflow: hidden;
    background: radial-gradient(60% 55% at 50% 58%, rgba(255, 180, 90, .2), transparent 72%), linear-gradient(180deg, rgba(255, 230, 200, .05), rgba(0, 0, 0, .12));
    box-shadow: inset 0 0 0 1px var(--line);
}
.bx-item-pic img { width: 86%; height: 86%; object-fit: contain; transition: transform .35s var(--ease); filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45)); }
.bx-item:hover .bx-item-pic img { transform: translateY(-3px) scale(1.05) rotate(-1.5deg); }
.bx-item-sale {
    position: absolute; top: 16px; left: 16px; z-index: 2;
    padding: 5px 9px; border-radius: 9px; background: linear-gradient(180deg, #ff7a5c, #f04a3a); color: #fff;
    font: 800 13px/1 var(--font-display); box-shadow: 0 8px 18px -8px rgba(255, 80, 60, .8);
}
/* sale countdown on a card (shop/catalog.js): a dark badge at the bottom of the picture */
.bx-item-countdown {
    position: absolute; left: 8px; bottom: 8px; z-index: 2; max-width: calc(100% - 16px);
    display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 8px;
    background: rgba(18, 12, 10, .78); backdrop-filter: blur(6px); box-shadow: inset 0 0 0 1px rgba(255, 120, 90, .35);
    color: #ffb3a3; font: 700 12px/1 var(--font-body); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.bx-item-countdown svg { flex: none; }
.bx-item-countdown[hidden] { display: none; }
.bx-item-body { display: grid; gap: 4px; padding: 12px 52px 4px 6px; }
.bx-item-cat { color: var(--dim); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.bx-item-body strong { font: 700 15.5px/1.25 var(--font-display); letter-spacing: -.015em; }
.bx-item:hover .bx-item-body strong { color: var(--accent-2); }
.bx-item-price { color: var(--accent-2); font: 800 17px/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.bx-item-price s, .bx-item-cost s, .bx-cart-price s, .bx-cart-recs s { color: var(--dim); font: 600 12.5px/1 var(--font-body); margin-left: 4px; }
.bx-item-add {
    position: absolute; right: 12px; bottom: 12px; z-index: 2;
    display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 12px;
    background: linear-gradient(180deg, #ffbe55, #ff8a1f); color: var(--accent-ink);
    box-shadow: inset 0 -3px 0 rgba(130, 50, 0, .5), inset 0 2px 0 rgba(255, 255, 255, .4);
    transition: transform .15s var(--ease), filter .2s;
}
.bx-item-add:hover { filter: brightness(1.08); transform: translateY(-1px); }
.bx-item-add:active { transform: translateY(2px); }
.bx-item.is-in-cart .bx-item-add { background: linear-gradient(180deg, #9aeba6, #5fcb73); color: #08260f; box-shadow: inset 0 -3px 0 rgba(0, 70, 20, .45), inset 0 2px 0 rgba(255, 255, 255, .4); }

/* item dialog */
.bx-item-dialog { width: min(920px, calc(100% - 24px)); }
.bx-item-view { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.bx-item-hero {
    position: relative; display: grid; place-items: center; min-height: 100%; padding: 32px;
    background: radial-gradient(60% 50% at 50% 50%, rgba(255, 170, 70, .28), transparent 72%), linear-gradient(180deg, var(--surface-3), var(--surface-2));
}
.bx-item-hero img { width: min(100%, 360px); aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 22px 30px rgba(0, 0, 0, .55)); animation: bx-bob 6s ease-in-out infinite; }
.bx-item-hero .bx-item-sale { top: 20px; left: 20px; font-size: 15px; }
.bx-item-detail { display: grid; align-content: start; gap: 14px; padding: clamp(26px, 3.4vw, 40px) clamp(22px, 3vw, 32px) clamp(22px, 3vw, 32px); max-height: calc(100dvh - 40px); overflow: auto; }
.bx-item-tags { display: flex; flex-wrap: wrap; gap: 8px; padding-right: 48px; }
.bx-item-detail h2 { font: 800 clamp(24px, 3vw, 32px)/1.1 var(--font-display); letter-spacing: -.03em; }
.bx-item-cost { display: flex; align-items: baseline; gap: 6px; }
.bx-item-cost strong { color: var(--accent-2); font: 800 28px/1 var(--font-display); }
.bx-item-cost s { font-size: 15px; }
.bx-item-timer { color: #ffb3a3; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bx-item-timer:empty { display: none; }
.bx-item-desc { color: var(--text-2); font-size: 15px; line-height: 1.65; padding: 14px 16px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line); max-height: 260px; overflow: auto; }
.bx-item-buy { display: grid; gap: 12px; padding-top: 4px; }
.bx-item-qty { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-weight: 600; font-size: 14px; }
.bx-item-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; }
.bx-stepper { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line-2); }
.bx-stepper button { width: 34px; height: 34px; border: 0; border-radius: 9px; background: var(--surface-3); color: var(--text); font-size: 18px; font-weight: 700; line-height: 1; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .35); }
.bx-stepper button:disabled { opacity: .4; cursor: not-allowed; }
.bx-stepper output { min-width: 34px; text-align: center; font: 700 15px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.bx-units { display: grid; gap: 6px; }
.bx-units input { min-height: 40px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-soft); color: var(--text); font-weight: 700; width: 100%; color-scheme: dark; }
.bx-units small { color: var(--muted); font-weight: 500; }
.bx-item-qty.bx-units { align-items: stretch; flex-direction: column; }

/* recent purchases */
.bx-recent h2 { font: 700 20px/1.2 var(--font-display); letter-spacing: -.02em; margin-bottom: 12px; }
.bx-recent-marquee { overflow: hidden; padding: 2px 0; }
.bx-recent-marquee.is-moving { -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.bx-recent-list { display: flex; width: max-content; margin: 0; padding: 0; list-style: none; }
.bx-recent-list li { margin-right: 10px; }
.is-moving .bx-recent-list { animation: bx-marquee var(--dur, 40s) linear infinite; }
.bx-recent-marquee:hover .bx-recent-list, .bx-recent-marquee:focus-within .bx-recent-list { animation-play-state: paused; }
@keyframes bx-marquee { to { transform: translateX(calc(-1 * var(--loop, 50%))); } }
.bx-recent-list li { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.bx-recent-list img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; background: rgba(255, 230, 200, .04); }
.bx-recent-list span { display: grid; }
.bx-recent-list strong { font-size: 14px; }
.bx-recent-list small { color: var(--muted); font-size: 12.5px; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==========================================================================
   CART DRAWER (main/scripts/cart.js)
   ========================================================================== */
.bx-cart-trigger {
    position: relative; display: grid; place-items: center; flex: none;
    width: 44px; height: 44px; padding: 0; border-radius: 12px;
    border: 1px solid var(--line-2); background: rgba(255, 230, 200, .05); color: var(--text);
    transition: background .2s, border-color .2s;
}
.bx-cart-trigger:hover { background: var(--accent-soft); border-color: rgba(255, 159, 46, .4); color: var(--accent-2); }
.bx-cart-trigger.is-bump { animation: bx-cart-bump .6s var(--ease); }
@keyframes bx-cart-bump { 0% { transform: none; } 30% { transform: scale(1.18) rotate(-8deg); } 60% { transform: scale(.94) rotate(4deg); } 100% { transform: none; } }
.bx-cart-count {
    display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 999px; background: var(--accent); color: var(--accent-ink);
    font: 800 11.5px/1 var(--font-body); font-variant-numeric: tabular-nums;
}
.bx-cart-trigger .bx-cart-count { position: absolute; top: -6px; right: -6px; box-shadow: 0 0 0 2px var(--bg); }
.bx-cart-big .bx-cart-count { background: var(--accent-ink); color: var(--accent-2); }

.bx-cart {
    width: min(480px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
    margin: 0 0 0 auto; padding: 0; border: 0; border-left: 1px solid var(--line-2);
    background: var(--surface); color: var(--text);
    box-shadow: -40px 0 100px -20px rgba(0, 0, 0, .9);
    overflow: hidden;
}
.bx-cart[open] { display: flex; flex-direction: column; animation: bx-drawer-in .35s var(--ease); }
.bx-cart::backdrop { background: rgba(6, 4, 3, .62); backdrop-filter: blur(4px); animation: bx-fade .3s var(--ease); }
@keyframes bx-drawer-in { from { transform: translateX(40px); opacity: 0; } }
.bx-cart-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.bx-cart-titles { flex: 1; display: grid; gap: 8px; min-width: 0; }
.bx-cart-head h2 { font: 800 21px/1.15 var(--font-display); letter-spacing: -.02em; }
.bx-cart-steps { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bx-cart-steps li { flex: 1; height: 4px; border-radius: 4px; background: var(--line-2); transition: background .3s; }
.bx-cart-steps li.is-done { background: var(--accent-3); }
.bx-cart-steps li.is-current { background: linear-gradient(90deg, var(--accent-2), var(--accent)); box-shadow: 0 0 10px var(--accent-glow); }
.bx-cart-body { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 18px; display: grid; align-content: start; gap: 16px; }
.bx-cart-foot { display: grid; gap: 10px; padding: 16px 18px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.bx-cart-alert { padding: 12px 14px; border-radius: 12px; background: var(--danger-soft); border: 1px solid rgba(255, 107, 91, .35); color: #ffd1ca; font-size: 14.5px; }
.bx-cart-note { padding: 12px 14px; border-radius: 12px; background: var(--violet-soft); border: 1px solid rgba(165, 133, 255, .3); color: var(--text-2); font-size: 14px; }
.bx-cart-lead { color: var(--text-2); font-weight: 600; }
.bx-cart-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.bx-cart-item {
    position: relative; display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; align-items: start;
    padding: 10px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line);
}
.bx-cart-pic { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 12px; background: radial-gradient(60% 55% at 50% 58%, rgba(255, 180, 90, .2), transparent 72%), var(--bg-soft); }
.bx-cart-pic img { width: 84%; height: 84%; object-fit: contain; }
.bx-cart-info { display: grid; gap: 4px; min-width: 0; }
.bx-cart-mode { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.bx-cart-mode img { image-rendering: pixelated; }
.bx-cart-info strong { font: 700 15px/1.25 var(--font-display); letter-spacing: -.01em; }
.bx-cart-price { color: var(--accent-2); font: 800 15.5px/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.bx-cart-price small { display: block; margin-top: 2px; color: var(--muted); font: 500 12.5px/1.3 var(--font-body); }
.bx-cart-info .bx-stepper { justify-self: start; margin-top: 4px; }
.bx-cart-info .bx-units { margin-top: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.bx-cart-remove { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--dim); }
.bx-cart-remove:hover { background: var(--danger-soft); color: var(--danger); }
.bx-cart-recs { padding: 14px; border-radius: 16px; border: 1px dashed var(--line-2); }
.bx-cart-recs h3 { font: 600 12px/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.bx-cart-recs ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bx-cart-recs li { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; }
.bx-cart-recs img { width: 44px; height: 44px; object-fit: contain; }
.bx-cart-recs span { display: grid; min-width: 0; }
.bx-cart-recs strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bx-cart-recs small { color: var(--accent-2); font-weight: 700; }
.bx-cart-recs .bx-icon-btn { width: 36px; height: 36px; border-radius: 10px; }
.bx-cart-form { display: grid; gap: 12px; }
.bx-cart-nick small { color: var(--dim); font-weight: 500; font-size: 12.5px; }
/* "For me / For a friend" switch above the nickname */
.bx-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line-2); }
.bx-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-weight: 700; font-size: 14px; transition: background .2s, color .2s; }
.bx-seg button:hover { color: var(--text); }
.bx-seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .35), 0 0 0 1px var(--line-2); }
.bx-seg button[data-act="gift-on"][aria-pressed="true"] { color: var(--accent-2); }
.bx-gift-icon { flex: none; }
.bx-confirm-row strong { display: inline-flex; align-items: center; gap: 6px; }
.bx-link-btn.bx-item-gift { display: inline-flex; align-items: center; gap: 7px; justify-self: center; margin-top: 4px; text-decoration: none; }
.bx-link-btn.bx-item-gift span, .bx-link-btn.bx-item-gift { text-underline-offset: 4px; }
.bx-link-btn.bx-item-gift:hover { text-decoration: underline dashed; }
.bx-field.is-invalid .bx-input { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.bx-field.is-invalid small, .bx-field-error { color: #ff9c90 !important; font-size: 13px; }
.bx-coupon { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.bx-coupon.is-applied { display: flex; justify-content: space-between; padding: 10px 14px; border-radius: 12px; background: var(--good-soft); border: 1px solid rgba(127, 224, 141, .3); color: #c8f5cf; font-weight: 600; font-size: 14px; }
.bx-link-btn { justify-self: start; padding: 0; border: 0; background: none; color: var(--accent-2); font-weight: 600; font-size: 14px; text-decoration: underline dashed; text-underline-offset: 4px; }
.bx-cart-sum { display: grid; gap: 6px; margin: 0; }
.bx-cart-sum div { display: flex; justify-content: space-between; color: var(--muted); font-size: 14.5px; }
.bx-cart-sum dd { margin: 0; font-variant-numeric: tabular-nums; }
.bx-cart-sum .is-discount dd { color: var(--good); }
.bx-cart-sum .is-total { color: var(--text); font: 800 20px/1.2 var(--font-display); }
.bx-cart-sum .is-total dd { color: var(--accent-2); }
.bx-cart-trust { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--dim); font-size: 12.5px; text-align: center; }
.bx-cart-trust a { color: var(--muted); text-decoration: underline; }
.bx-spinner-sm { width: 18px; height: 18px; border-width: 2px; border-top-color: var(--accent-ink); }
.bx-cart-empty, .bx-cart-loading, .bx-cart-result { display: grid; justify-items: center; gap: 12px; padding: 48px 12px; text-align: center; }
.bx-cart-empty p, .bx-cart-result p { color: var(--muted); max-width: 320px; }
.bx-cart-empty h3, .bx-cart-result h3 { font: 800 22px/1.2 var(--font-display); letter-spacing: -.02em; }
.bx-cart-empty-icon, .bx-cart-result-icon { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 24px; background: var(--accent-soft); color: var(--accent-2); }
.bx-cart-result.is-success .bx-cart-result-icon { background: var(--good-soft); color: var(--good); animation: bx-pop .5s var(--ease); }
.bx-cart-result.is-fail .bx-cart-result-icon { background: var(--danger-soft); color: var(--danger); }
.bx-cart-pending { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); border: 1px solid rgba(255, 159, 46, .3); }
.bx-cart-pending div { display: grid; gap: 2px; font-size: 13.5px; color: var(--text-2); }
.bx-cart-pending strong { color: var(--text); font-size: 14.5px; }
/* payment methods */
.bx-ways h3 { font: 600 12px/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.bx-ways-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bx-way {
    display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 12px; text-align: left;
    border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface-2); color: var(--text);
    font-weight: 700; font-size: 14px; line-height: 1.2;
    transition: border-color .2s, background .2s, transform .15s var(--ease);
}
.bx-way:hover { border-color: rgba(255, 159, 46, .55); background: var(--surface-3); transform: translateY(-1px); }
.bx-way-logo { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 10px; background: #fff; overflow: hidden; }
.bx-way-logo img { width: 30px; height: 30px; object-fit: contain; }
.bx-confirm-card { display: grid; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.bx-confirm-way { display: flex; align-items: center; gap: 12px; }
.bx-confirm-way div { flex: 1; display: grid; }
.bx-confirm-way small { color: var(--dim); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.bx-confirm-way strong { font: 700 16px/1.2 var(--font-display); }
.bx-confirm-row { display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.bx-confirm-row strong { color: var(--text); }
.bx-confirm-items { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bx-confirm-items li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
.bx-confirm-items img { width: 32px; height: 32px; object-fit: contain; }
.bx-way-types { display: flex; }
.bx-check { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; color: var(--text-2); font-size: 14px; line-height: 1.45; cursor: pointer; }
.bx-check input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; cursor: pointer; }
.bx-check-box { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-3); background: var(--bg-soft); display: grid; place-items: center; transition: background .2s, border-color .2s; }
.bx-check input:checked + .bx-check-box { background: var(--accent); border-color: var(--accent); }
.bx-check input:checked + .bx-check-box::after { content: ""; width: 10px; height: 6px; border: solid var(--accent-ink); border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg); }
.bx-check input:focus-visible + .bx-check-box { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.bx-check.is-invalid .bx-check-box { border-color: var(--danger); }
.bx-check a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 760px) {
    .bx-item-view { grid-template-columns: 1fr; }
    .bx-item-hero { padding: 24px; min-height: 0; }
    .bx-item-hero img { width: min(70%, 260px); }
    .bx-item-detail { max-height: none; }
    .bx-item-dialog { max-height: calc(100dvh - 24px); }
}
@media (max-width: 640px) {
    .bx-items { grid-template-columns: 1fr 1fr; gap: 10px; }
    .bx-item-main { padding: 7px; }
    .bx-item-body { padding: 10px 4px 50px; }
    .bx-item-body strong { font-size: 13.5px; }
    .bx-item-price { font-size: 15px; }
    .bx-item-add { right: 10px; bottom: 10px; width: 38px; height: 38px; }
    .bx-item-sale { top: 12px; left: 12px; font-size: 12px; }
    .bx-item-actions { grid-template-columns: 1fr; }
    .bx-cart { width: 100vw; border-left: 0; }
    .bx-cart-item { grid-template-columns: 64px minmax(0, 1fr) auto; }
    .bx-cart-pic { width: 64px; height: 64px; }
    .bx-ways-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) { .bx-header-inner .bx-cart-trigger { margin-left: auto; } .bx-header-inner .bx-cart-trigger:not([hidden]) + .bx-menu-toggle { margin-left: 0; } }
.bx-item-cost small { color: var(--muted); font-weight: 600; font-size: 15px; }
.bx-coupon-field { gap: 6px; }
.bx-coupon-field small:empty { display: none; }
.bx-coupon-field.is-invalid small { color: #ff9c90; font-size: 13px; font-weight: 600; }
.bx-cart-foot .bx-cart-alert { margin: 0; font-size: 14px; animation: bx-pop .3s var(--ease); }
.bx-coupon-field { scroll-margin-bottom: 16px; }
.bx-shop-layout > * { min-width: 0; }

/* ---------- more animated mode icons ---------- */
.bx-anim > span, .bx-anim .bx-eye > img, .bx-anim .bx-block > img, .bx-anim .bx-pad > img, .bx-anim .bx-block > svg { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }

/* SkyWars — eye of ender */
.bx-eye { transform-origin: 50% 50%; transition: transform .4s var(--ease); }
.bx-pupil { transition: transform .12s ease-out; will-change: transform; }
.bx-anim-eye.is-active .bx-eye { transform: translateY(-6%) scale(1.06); filter: drop-shadow(0 0 6px rgba(80, 255, 170, .45)); }
.bx-anim-eye.is-blinking .bx-eye { animation: bx-blink .26s steps(2) 1; }
@keyframes bx-blink { 50% { transform: translateY(-6%) scale(1.06, .12); } }
.bx-portal { pointer-events: none; overflow: visible; }
.bx-portal i { position: absolute; bottom: 10%; left: calc(var(--px, 50) * 1%); width: 3px; height: 3px; background: #c77dff; box-shadow: 0 0 6px #9d4dff; opacity: 0; }
.bx-portal i:nth-child(1) { --px: 18; }
.bx-portal i:nth-child(2) { --px: 34; animation-delay: .35s !important; }
.bx-portal i:nth-child(3) { --px: 52; animation-delay: .7s !important; }
.bx-portal i:nth-child(4) { --px: 68; animation-delay: .2s !important; }
.bx-portal i:nth-child(5) { --px: 82; animation-delay: .55s !important; }
.bx-portal i:nth-child(6) { --px: 44; animation-delay: .9s !important; }
.bx-anim-eye.is-active .bx-portal i { animation: bx-portal-rise 1.1s ease-out infinite; }
@keyframes bx-portal-rise { 0% { opacity: 0; transform: translate(0, 0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-3px, -26px); } }

/* BedWars — bed destroyed */
.bx-piece { opacity: 0; }
.bx-anim-bed.is-playing .bx-bed { animation: bx-bed-main 1.7s linear both; }
.bx-anim-bed.is-playing .bx-piece { animation: bx-bed-piece 1.7s cubic-bezier(.3, .1, .2, 1) both; }
.bx-anim-bed.is-playing .p1 { --tx: -9px; --ty: -8px; --r: -22deg; }
.bx-anim-bed.is-playing .p2 { --tx: 9px; --ty: -9px; --r: 18deg; }
.bx-anim-bed.is-playing .p3 { --tx: 10px; --ty: 9px; --r: 26deg; }
.bx-anim-bed.is-playing .p4 { --tx: -10px; --ty: 8px; --r: -16deg; }
@keyframes bx-bed-main {
    0% { opacity: 1; transform: none; } 6% { transform: translate(-1.5px, 0) rotate(-3deg); } 12% { transform: translate(1.5px, 0) rotate(3deg); }
    18% { transform: translate(-1px, 0); } 22% { opacity: 1; transform: none; } 23%, 76% { opacity: 0; } 76.1%, 100% { opacity: 1; transform: none; }
}
@keyframes bx-bed-piece {
    0%, 22% { opacity: 0; transform: none; }
    23% { opacity: 1; transform: none; }
    40% { opacity: 1; transform: translate(var(--tx), var(--ty)) rotate(var(--r)); }
    58% { opacity: .9; transform: translate(calc(var(--tx) * 1.2), calc(var(--ty) * 1.2 + 6px)) rotate(calc(var(--r) * 1.4)); }
    76% { opacity: 1; transform: none; }
    /* the whole bed is already back at 76.1%, so the pieces can vanish at once without a flash */
    77.9% { opacity: 1; transform: none; }
    78%, 100% { opacity: 0; transform: none; }
}
.bx-dust { pointer-events: none; }
.bx-dust i { position: absolute; left: 50%; top: 55%; width: 4px; height: 4px; background: #e8dfd6; opacity: 0; }
.bx-dust i:nth-child(1) { --dx: -16px; --dy: -6px; } .bx-dust i:nth-child(2) { --dx: 15px; --dy: -8px; } .bx-dust i:nth-child(3) { --dx: -6px; --dy: -15px; }
.bx-dust i:nth-child(4) { --dx: 9px; --dy: 10px; } .bx-dust i:nth-child(5) { --dx: -12px; --dy: 10px; }
.bx-anim-bed.is-playing .bx-dust i { animation: bx-spark-fly .6s ease-out .38s both; }

/* Survival — mining the grass block */
.bx-cracks rect { fill: rgba(20, 12, 6, .7); }
.bx-cracks g { opacity: 0; }
.bx-anim-block.is-playing .bx-block { animation: bx-block-life 2.2s linear both; }
.bx-anim-block.is-playing .c1 { animation: bx-crack-1 2.2s steps(1) both; }
.bx-anim-block.is-playing .c2 { animation: bx-crack-2 2.2s steps(1) both; }
.bx-anim-block.is-playing .c3 { animation: bx-crack-3 2.2s steps(1) both; }
@keyframes bx-crack-1 { 0% { opacity: 0; } 8% { opacity: 1; } 46% { opacity: 0; } }
@keyframes bx-crack-2 { 0% { opacity: 0; } 22% { opacity: 1; } 46% { opacity: 0; } }
@keyframes bx-crack-3 { 0% { opacity: 0; } 35% { opacity: 1; } 46% { opacity: 0; } }
@keyframes bx-block-life {
    0% { transform: none; } 10% { transform: translate(-1px, 0); } 14% { transform: translate(1px, 0); } 24% { transform: translate(-1px, 1px); } 28% { transform: none; }
    38% { transform: translate(1px, -1px); } 44% { transform: scale(1.04); }
    46%, 82% { transform: scale(0); opacity: 0; }
    92% { transform: scale(1.1); opacity: 1; } 100% { transform: none; opacity: 1; }
}
.bx-chunks { pointer-events: none; }
.bx-chunks i { position: absolute; left: 48%; top: 50%; width: 4px; height: 4px; opacity: 0; background: #845732; }
.bx-chunks i:nth-child(odd) { background: #6bbf2a; }
.bx-anim-block.is-playing .bx-chunks i { animation: bx-chunk-fly .6s cubic-bezier(.2, .6, .4, 1) 1.01s both; }
@keyframes bx-chunk-fly { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 10px)) rotate(90deg); } }
.bx-drop { inset: auto !important; left: 32% !important; top: 40% !important; width: 36% !important; height: 36% !important; opacity: 0; }
.bx-anim-block.is-playing .bx-drop { animation: bx-drop 2.2s ease-out both; }
@keyframes bx-drop {
    0%, 47% { opacity: 0; transform: translateY(-10px) rotate(0); }
    55% { opacity: 1; transform: translateY(4px) rotate(30deg); }
    62% { transform: translateY(0) rotate(45deg); }
    70% { transform: translateY(-3px) rotate(70deg); }
    78% { opacity: 1; transform: translateY(0) rotate(90deg); }
    84%, 100% { opacity: 0; transform: translateY(0) rotate(100deg) scale(.6); }
}

/* Arcades — gamepad combo */
.bx-pad-lights i {
    position: absolute; left: calc(var(--x) / 18 * 100%); top: calc(var(--y) / 18 * 100%);
    width: calc(100% / 18); height: calc(100% / 18); background: var(--c); opacity: 0;
    box-shadow: 0 0 6px var(--c), 0 0 12px var(--c);
}
.bx-anim-pad.is-playing .bx-pad { animation: bx-rumble 1.8s linear both; }
.bx-anim-pad.is-playing .bx-pad-lights i { animation: bx-button 1.8s steps(1) both; animation-delay: calc(var(--n) * .09s); }
@keyframes bx-rumble {
    0% { transform: none; } 4% { transform: translate(-1.5px, .5px) rotate(-2deg); } 8% { transform: translate(1.5px, -.5px) rotate(2deg); }
    12% { transform: translate(-1px, 0) rotate(-1deg); } 16% { transform: translate(1px, .5px) rotate(1deg); } 20%, 100% { transform: none; }
}
@keyframes bx-button { 0%, 20% { opacity: 0; } 22% { opacity: 1; } 34% { opacity: 0; } 44% { opacity: 1; } 58%, 100% { opacity: 0; } }
.bx-plus-one {
    position: absolute; left: 50%; top: 0; transform: translate(-50%, 0); opacity: 0; pointer-events: none;
    font: 800 13px/1 var(--font-display); color: var(--good); text-shadow: 0 2px 0 rgba(0, 0, 0, .6), 0 0 8px rgba(127, 224, 141, .6);
}
.bx-anim-pad.is-playing .bx-plus-one { animation: bx-plus-one 1.8s ease-out both; }
@keyframes bx-plus-one { 0%, 60% { opacity: 0; transform: translate(-50%, 4px) scale(.6); } 70% { opacity: 1; transform: translate(-50%, -10px) scale(1.15); } 88% { opacity: 1; transform: translate(-50%, -16px) scale(1); } 100% { opacity: 0; transform: translate(-50%, -22px); } }

/* All servers — castle flag and gate light */
.bx-anim-castle img { position: absolute; inset: 0; width: 100%; height: 100%; }
.bx-flag { inset: auto !important; left: 47% !important; top: -22% !important; width: 36% !important; height: 44% !important; clip-path: inset(0 -20% 0 0); }
.bx-flag svg { width: 100%; height: 100%; transform: translateY(70%); opacity: 0; transition: transform .5s var(--ease), opacity .3s; }
.bx-flag .w2 { opacity: 0; }
.bx-anim-castle.is-active .bx-flag svg { transform: none; opacity: 1; }
.bx-anim-castle.is-active .bx-flag .w1 { animation: bx-wave-a .5s steps(1) infinite; }
.bx-anim-castle.is-active .bx-flag .w2 { animation: bx-wave-b .5s steps(1) infinite; }
@keyframes bx-wave-a { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes bx-wave-b { 0% { opacity: 0; } 50% { opacity: 1; } }
.bx-gate-glow { inset: auto !important; left: 34% !important; top: 42% !important; width: 32% !important; height: 34% !important; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 200, 90, .95), rgba(255, 150, 40, .4) 60%, transparent); opacity: 0; transition: opacity .4s; z-index: 1; mix-blend-mode: screen; }
.bx-anim-castle img { z-index: 0; }
.bx-anim-castle.is-active .bx-gate-glow { opacity: 1; animation: bx-flicker 1.6s ease-in-out infinite; }
@keyframes bx-flicker { 0%, 100% { opacity: .85; } 40% { opacity: 1; } 70% { opacity: .7; } }

/* ---------- Easter egg: achievement card for petting the cat 100 times (site style) ---------- */
.bx-ach {
    position: fixed; z-index: 330; left: 50%; top: calc(var(--header-h) + 14px);
    display: flex; align-items: center; gap: 16px; width: min(400px, calc(100vw - 24px));
    padding: 14px 18px 14px 14px; border-radius: 20px; cursor: pointer;
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(255, 196, 77, .18), transparent 55%),
        linear-gradient(160deg, var(--surface-3), var(--surface));
    border: 1px solid rgba(255, 200, 90, .55);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 18px 50px -12px rgba(0, 0, 0, .85), 0 0 36px -6px rgba(255, 170, 50, .45);
    transform: translate(-50%, -24px) scale(.94); opacity: 0;
    transition: transform .55s cubic-bezier(.2, 1.4, .4, 1), opacity .3s;
}
.bx-ach.is-in { transform: translate(-50%, 0) scale(1); opacity: 1; }
.bx-ach-icon {
    position: relative; overflow: hidden; display: grid; place-items: center; flex: none;
    width: 64px; height: 64px; border-radius: 16px;
    background: radial-gradient(circle at 50% 40%, #ffd76a, #f29a1e 70%, #c76a10);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25), inset 0 2px 0 rgba(255, 255, 255, .35), 0 6px 18px -4px rgba(255, 150, 30, .6);
}
.bx-ach-icon img { position: relative; z-index: 1; width: 52px; height: auto; image-rendering: pixelated; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .25)); }
.bx-ach-icon::after { /* shine sweeping across the golden tile */
    content: ""; position: absolute; inset: -40%; z-index: 2;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .7) 50%, transparent 60%);
    transform: translateX(-70%); animation: bx-ach-shine 2.6s ease-in-out .5s infinite;
}
@keyframes bx-ach-shine { 0% { transform: translateX(-70%); } 45%, 100% { transform: translateX(70%); } }
.bx-ach-body { display: grid; gap: 3px; min-width: 0; flex: 1; }
.bx-ach-label { display: inline-flex; align-items: center; gap: 6px; color: #ffc94d; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.bx-ach-name { font: 800 21px/1.15 var(--font-display); letter-spacing: -.02em; color: var(--text); }
.bx-ach-text { color: var(--muted); font-size: 13px; }
.bx-ach-progress { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.bx-ach-progress b { flex: none; color: #ffc94d; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.bx-ach-bar { flex: 1; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bx-ach-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #ff9f2e, #ffd76a); box-shadow: 0 0 10px rgba(255, 200, 80, .6); transition: width 1.1s cubic-bezier(.3, .8, .3, 1) .35s; }
.bx-ach.is-in .bx-ach-bar i { width: 100%; }
@media (prefers-reduced-motion: reduce) { .bx-ach, .bx-ach-bar i { transition: none; } .bx-ach-icon::after { animation: none; display: none; } }
/* pixel icons (fun.js) sit on a dark inset so gold and pale icons stay readable on the golden tile */
.bx-ach-icon svg { position: relative; z-index: 1; box-sizing: content-box; padding: 4px; border-radius: 10px; background: rgba(48, 24, 4, .55); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .35); filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .3)); }

/* ---------- Achievements collection (main/scripts/fun.js): footer badge + dialog ---------- */
.bx-ach-badge {
    display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px; cursor: pointer;
    border: 1px solid rgba(255, 200, 90, .3); background: rgba(255, 180, 60, .07); color: #ffc94d; font: inherit; font-size: 13px; font-weight: 700;
    transition: background .2s, border-color .2s, transform .2s;
}
.bx-footer-brand .bx-ach-badge { margin-top: 16px; }
.bx-ach-badge:hover { background: rgba(255, 180, 60, .15); border-color: rgba(255, 200, 90, .6); transform: translateY(-1px); }
.bx-ach-badge b { font-variant-numeric: tabular-nums; color: var(--text); }
.bx-ach-badge.is-complete { box-shadow: 0 0 18px -4px rgba(255, 190, 60, .7); }
.bx-ach-dialog { width: min(660px, calc(100% - 32px)); }
.bx-ach-dialog .bx-dialog-body { padding-top: clamp(22px, 4vw, 32px); }
.bx-ach-dialog h2 { padding-right: 40px; }
.bx-ach-dialog-text { color: var(--muted); }
.bx-ach-summary { display: flex; align-items: center; gap: 12px; }
.bx-ach-summary .bx-ach-bar { height: 8px; }
.bx-ach-summary b { color: #ffc94d; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bx-ach-dialog .bx-ach-bar i { transition: width .6s var(--ease); }
.bx-ach-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; }
.bx-ach-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.bx-ach-item.is-got { border-color: rgba(255, 200, 90, .4); background: radial-gradient(120% 140% at 0% 0%, rgba(255, 196, 77, .12), transparent 60%), rgba(255, 255, 255, .02); }
.bx-ach-item-icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.bx-ach-item.is-got .bx-ach-item-icon { background: radial-gradient(circle at 50% 40%, #ffd76a, #f29a1e 70%, #c76a10); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25); }
.bx-ach-item.is-got .bx-ach-item-icon svg { padding: 2px; border-radius: 8px; background: rgba(48, 24, 4, .5); }
.bx-ach-item:not(.is-got) .bx-ach-item-icon svg { filter: grayscale(1) brightness(.6); opacity: .7; }
.bx-ach-item-body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.bx-ach-item-body strong { font: 800 15px/1.2 var(--font-display); }
.bx-ach-item:not(.is-got) .bx-ach-item-body strong { color: var(--muted); }
.bx-ach-item-body small { color: var(--dim); font-size: 12.5px; line-height: 1.35; }
.bx-ach-item-body em { font-style: normal; color: #ffc94d; font-size: 11.5px; font-weight: 700; margin-top: 2px; }
.bx-ach-item .bx-ach-progress { margin-top: 5px; }
.bx-ach-item .bx-ach-progress b { color: var(--muted); font-weight: 600; }

/* ---------- Hero cat moods (site.js initCatMoods) ---------- */
.bx-cat-art[data-eyes="look-l"] > .bx-cat-eyes[data-eyes="look-l"],
.bx-cat-art[data-eyes="look-r"] > .bx-cat-eyes[data-eyes="look-r"],
.bx-cat-art[data-eyes="look-u"] > .bx-cat-eyes[data-eyes="look-u"],
.bx-cat-art[data-eyes="look-d"] > .bx-cat-eyes[data-eyes="look-d"],
.bx-cat-art[data-eyes="look-ul"] > .bx-cat-eyes[data-eyes="look-ul"],
.bx-cat-art[data-eyes="look-ur"] > .bx-cat-eyes[data-eyes="look-ur"],
.bx-cat-art[data-eyes="look-dl"] > .bx-cat-eyes[data-eyes="look-dl"],
.bx-cat-art[data-eyes="look-dr"] > .bx-cat-eyes[data-eyes="look-dr"] { visibility: visible; }
.bx-hero-cat { touch-action: pan-y; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } /* sideways strokes reach the cat instead of the page; holding it shows no phone menu (the hold is the secret) */
.bx-hero-cat.is-yawning { animation: bx-yawn 1.1s var(--ease); }
@keyframes bx-yawn { 0% { transform: none; } 30% { transform: scale(1.05, .93) translateY(4%); } 55% { transform: scale(.97, 1.06) translateY(-3%); } 100% { transform: none; } }
.bx-cat-z {
    position: absolute; left: 80%; top: 6%; z-index: 3; pointer-events: none;
    font: 900 calc(clamp(18px, 4.4cqi, 30px) * var(--zs, 1))/1 var(--font-display); color: #cfe3ff;
    text-shadow: 2px 2px 0 #3d6fc4, 0 0 12px rgba(140, 190, 255, .6);
    animation: bx-z 2.6s ease-out forwards;
}
@keyframes bx-z { 0% { opacity: 0; transform: translate(0, 0) scale(.5) rotate(-10deg); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(60%, -170%) scale(1.15) rotate(12deg); } }
/* night (23:00–06:00): a pixel moon and twinkling stars, a cooler glow */
.bx-night-sky { pointer-events: none; }
.bx-night-sky .bx-moon { position: absolute; left: 30%; top: 2%; width: 12%; height: auto; image-rendering: pixelated; filter: drop-shadow(0 0 18px rgba(255, 240, 170, .55)); animation: bx-bob 9s ease-in-out infinite; }
.bx-night-sky i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); background: #fff6d0; box-shadow: 0 0 8px rgba(255, 246, 208, .8); animation: bx-twinkle 3.2s ease-in-out infinite; animation-delay: var(--d); }
@keyframes bx-twinkle { 0%, 100% { opacity: .15; transform: scale(.6); } 50% { opacity: 1; transform: scale(1); } }
.bx-hero-art.is-night .bx-hero-ring { background: radial-gradient(circle, rgba(120, 150, 255, .16), rgba(90, 110, 220, .05) 50%, transparent 72%); border-color: rgba(170, 190, 255, .16); }

/* ---------- Breakable hero blocks + chunks, XP orbs, confetti (fun.js) ---------- */
.bx-hero-cubes[data-mineable] .bx-cube-float { pointer-events: auto; cursor: crosshair; transition: scale .1s, opacity .15s; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.bx-hero-cubes[data-mineable] .bx-cube-float.is-broken { scale: 0; opacity: 0; pointer-events: none; transition: scale .12s, opacity .12s; }
.bx-hero-cubes[data-mineable] .bx-cube-float:not(.is-broken) { transition: scale .35s cubic-bezier(.3, 1.6, .5, 1), opacity .2s; }
.bx-cube > i::after { content: ""; position: absolute; inset: 0; background: center / 100% 100% no-repeat; image-rendering: pixelated; pointer-events: none; }
.bx-cube-float[data-crack="1"] .bx-cube > i::after { background-image: var(--crack-1); }
.bx-cube-float[data-crack="2"] .bx-cube > i::after { background-image: var(--crack-2); }
.bx-cube-float[data-crack="3"] .bx-cube > i::after { background-image: var(--crack-3); }
.bx-chunk { position: fixed; left: 0; top: 0; z-index: 318; pointer-events: none; box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .25); }
.bx-xp-orb { position: fixed; left: 0; top: 0; z-index: 318; pointer-events: none; line-height: 0; filter: drop-shadow(0 0 6px rgba(170, 255, 80, .9)); animation: bx-xp-glow .4s steps(2) infinite; }
.bx-xp-orb svg { display: block; image-rendering: pixelated; }
@keyframes bx-xp-glow { 50% { filter: drop-shadow(0 0 9px rgba(255, 250, 120, 1)) hue-rotate(-30deg); } }
.bx-confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 317; pointer-events: none; }
.bx-rules-end { display: block; height: 1px; }

/* ---------- Mode pages (/modes/<slug>/, modes/mode-page.php) ---------- */
.bx-mode-page { display: grid; gap: clamp(36px, 5vw, 56px); }
.bx-mode-section { display: grid; gap: 18px; }
.bx-mode-intro {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px 28px;
    padding: clamp(20px, 3vw, 30px);
}
.bx-mode-intro-icon { --icon: 96px; display: grid; place-items: center; width: 120px; height: 120px; border-radius: 22px; background: var(--surface-3); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .35), 0 0 0 1px var(--line-2); }
.bx-mode-intro-text { display: grid; gap: 8px; justify-items: start; }
.bx-mode-intro-text h2 { font: 800 clamp(22px, 2.6vw, 30px)/1.1 var(--font-display); letter-spacing: -.03em; }
.bx-mode-intro-text p { color: var(--text-2); }
.bx-mode-how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.bx-mode-how li { display: grid; align-content: start; gap: 12px; padding: 20px; }
.bx-mode-how p { color: var(--text-2); font-weight: 600; }
.bx-mode-perks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.bx-mode-perks article { display: grid; align-content: start; gap: 8px; padding: 22px; }
.bx-mode-perks h3 { font: 700 18px/1.25 var(--font-display); letter-spacing: -.02em; }
.bx-mode-perks p { color: var(--muted); }
.bx-mode-page .bx-help-strip { margin-top: 0; }
@media (max-width: 980px) {
    .bx-mode-intro { grid-template-columns: auto 1fr; }
    .bx-mode-intro .bx-address { grid-column: 1 / -1; }
    .bx-mode-how { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bx-mode-perks { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .bx-mode-intro { grid-template-columns: 1fr; justify-items: start; }
    .bx-mode-intro-icon { width: 96px; height: 96px; --icon: 76px; }
    .bx-mode-intro .bx-address { display: flex; width: 100%; }
    .bx-mode-intro .bx-address-text { flex: 1; }
    .bx-mode-how { grid-template-columns: 1fr; }
}

/* ---------- Home: "Minecraft PE / Bedrock server on your phone" text block (for search engines and new players) ---------- */
.bx-seo-text { display: grid; gap: 14px; max-width: 900px; padding: clamp(22px, 3.2vw, 36px); }
.bx-seo-text p { color: var(--text-2); line-height: 1.65; }
.bx-seo-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 4px; }
.bx-seo-links a { color: var(--accent-2); font-weight: 600; text-decoration: underline; text-decoration-style: dashed; text-underline-offset: 4px; }
.bx-seo-links a:hover { text-decoration-style: solid; }

/* ---------- Text guides for search (/join/, /play-with-friends/; main/guide.php) ---------- */
.bx-text-guide { display: grid; gap: 16px; max-width: 900px; }
.bx-guide-block { display: grid; gap: 14px; padding: clamp(20px, 3vw, 30px); }
.bx-guide-block > p, .bx-guide-block p { color: var(--text-2); line-height: 1.65; }
.bx-guide-block a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.bx-guide-block b { color: var(--text); }
.bx-text-guide .bx-faq-group { margin-top: 12px; }
.bx-text-guide .bx-help-strip { margin-top: 8px; }

/* ---------- /versions/: supported game version cards ---------- */
.bx-version-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bx-version { display: grid; gap: 6px; padding: 18px 20px; border-radius: 16px; background: var(--bg-soft); border: 1px solid var(--line-2); }
.bx-version small { color: var(--muted); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.bx-version strong { font: 800 clamp(26px, 3.4vw, 34px)/1.05 var(--font-display); letter-spacing: -.02em; color: var(--accent-2); }
.bx-version p { color: var(--text-2); font-size: 14.5px; }
@media (max-width: 560px) { .bx-version-grid { grid-template-columns: 1fr; } }

/* ---------- 404 mini-game (main/scripts/runner.js) ---------- */
.bx-runner { display: grid; gap: 10px; margin-top: 8px; padding-top: 18px; border-top: 1px dashed var(--line-2); }
.bx-runner-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.bx-runner-head strong { font: 800 16px/1.25 var(--font-display); }
.bx-runner-hud { display: inline-flex; gap: 14px; color: var(--muted); font-size: 13px; }
.bx-runner-hud b { color: #ffc94d; font-variant-numeric: tabular-nums; }
.bx-runner-stage { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: linear-gradient(180deg, #120d1c, #1d1420 70%, #2a1a12); }
.bx-runner canvas { display: block; width: 100%; height: auto; aspect-ratio: 32 / 9; image-rendering: pixelated; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.bx-runner-msg { position: absolute; left: 50%; top: 14%; translate: -50% 0; margin: 0; padding: 6px 12px; border-radius: 99px; background: rgba(12, 10, 9, .78); color: var(--text); font-size: 13px; font-weight: 600; text-align: center; width: max-content; max-width: calc(100% - 24px); pointer-events: none; }
.bx-runner-msg[hidden] { display: none; }
.bx-runner.is-hit .bx-runner-stage { animation: bx-card-shake .35s linear; }
