@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800;900&family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap");

/*
 * MASO / EVENT ZONE — shared, final-loaded chrome.
 *
 * events-hub-page is the approved reference and is deliberately excluded.
 * Namespaced tokens never replace --bg, --grad, --cyan, --font-* or any
 * collectible/game token. Equipped panel/backdrop rules keep their cascade.
 * Only the enumerated chrome selectors below are styled: no universal font
 * reset, blanket h1/button/card rules, runtime DOM changes, or pseudo-element
 * overlays on body (those belong to equipped collection FX).
 */
body.maso-arcade:not(.events-hub-page) {
  --arc-ink: #f4eeff;
  --arc-muted: #b9afd3;
  --arc-dim: #a594be;
  --arc-cyan: #63f3f4;
  --arc-pink: #ff71d7;
  --arc-line: #ac7dff45;
  --arc-panel: #18132c;
  --arc-display: "Barlow Condensed", sans-serif;
  --arc-body: "DM Sans", sans-serif;
  --arc-mono: "DM Mono", monospace;
  min-height: 100dvh;
  font-family: var(--arc-body);
  -webkit-font-smoothing: antialiased;
}

/* Default backdrop only. Do not suppress purchased backdrops or panel FX. */
body.maso-arcade:not(.events-hub-page):not([class*="panel-"]):not([class*="bg-"]):not([class*="backdrop-"]) {
  color: var(--arc-ink);
  background: radial-gradient(ellipse at 83% 24%, #331354 0, transparent 47%),
    radial-gradient(ellipse at 6% 65%, #102953 0, transparent 50%), #100c23;
}
body.maso-arcade:not(.events-hub-page):not([class*="panel-"]):not([class*="bg-"]):not([class*="backdrop-"]) > .aurora {
  background: radial-gradient(ellipse at 83% 24%, #331354 0, transparent 47%),
    radial-gradient(ellipse at 6% 65%, #102953 0, transparent 50%), #100c23;
}
body.maso-arcade:not(.events-hub-page):not([class*="panel-"]):not([class*="bg-"]):not([class*="backdrop-"]) > .aurora::before,
body.maso-arcade:not(.events-hub-page):not([class*="panel-"]):not([class*="bg-"]):not([class*="backdrop-"]) > .aurora::after {
  /* Replace legacy, full-screen animated blur with static radial light. */
  content: none;
}

/* Shared navigation: sizing, wrapping and mobile open/close remain local. */
.maso-arcade:not(.events-hub-page) :is(.nav, .events-nav, .topbar) {
  color: var(--arc-ink);
  background: #100c23ed;
  border-bottom-color: var(--arc-line);
}
.maso-arcade:not(.events-hub-page) :is(.brand, .events-brand, .wordmark) {
  color: var(--arc-ink);
  font-family: var(--arc-display);
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: -.025em;
  text-shadow: 0 0 24px #a97cff66;
}
.maso-arcade:not(.events-hub-page) .brand-sub {
  max-width: 90px;
  color: #c7b4eb;
  font: 500 .58rem/1.5 var(--arc-mono);
  letter-spacing: .13em;
  text-shadow: none;
}
.maso-arcade:not(.events-hub-page) :is(.nav-links a, .nav-report, .nav-back, .events-links a, .back-link) {
  font-family: var(--arc-body);
  font-size: .8rem;
  color: #cfc2e4;
  border-radius: 6px;
}
.maso-arcade:not(.events-hub-page) :is(.nav-links a, .nav-report, .nav-back, .events-links a, .back-link):hover {
  color: var(--arc-cyan);
}
.maso-arcade:not(.events-hub-page) .nav-toggle {
  border: 1px solid #b89bff55;
  border-radius: 4px;
  background: #211536;
  color: var(--arc-ink);
}
.maso-arcade:not(.events-hub-page) :is(.footer, .disclaimer) {
  color: var(--arc-muted);
  border-color: var(--arc-line);
  font-family: var(--arc-body);
}

/* Display typography is assigned to chrome, never collectible nameplates,
 * card art, boards, reward previews, or all heading elements indiscriminately.
 * Existing sizes/spacing retain homepage top/bottom alignment. */
.maso-arcade:not(.events-hub-page) :is(
  .hero-copy > h1, .section-head h2, .collection-page-head h1,
  .shop-h1, .mk-hero h1, .mk-section-head h2, .ace-heading h1, .showcase-state h1,
  .events-hero h1, .events-section-head h2, .push-intro h1,
  .mast h1, .section-title h2,
  .console-plus h2, .console-plus-brand, .console-plus-buy,
  .pusher-plus h2, .pusher-plus-brand,
  .cards > .card > h3, .store-ad h3,
  .maintenance-notice h2, .tagcall h3, .upd-card h3,
  .shop-sh-title, .shop-eyebrow, .market-cat,
  .locker-heading h2, .locker-column h3,
  .showcase-hero h1, .showcase-section-head h2,
  .mc-plate h1, .mc-club-head h2, .mc-lounge h3, .mc-roster h3,
  .rules-heading h2, .cover-card h2, .wins-feed h2,
  .mk-loadout-head h4, .legend-head h3, .ladder-head h3,
  .dev-section > h3, .legal-wrap .inv-section > h3,
  .inv-section > h3, .hub-title, .theme-lock h2,
  .chat-gate-card h2, .ace-console-head h2
) {
  font-family: var(--arc-display);
  font-weight: 800;
  letter-spacing: -.015em;
  text-transform: uppercase;
}
.maso-arcade:not(.events-hub-page) :is(.section-head h2, .hero-copy > h1, .shop-h1, .ace-heading h1) {
  font-weight: 900;
}
.maso-arcade:not(.events-hub-page) main > .section-head h2 {
  font-size: clamp(3.2rem, 6.8vw, 5.4rem);
  line-height: .95;
}
/* A condensed face needs its own scale, not the old wide-face metrics.
 * The explicit span break holds MASO / MINI GAMES on desktop and phone.
 * Keep the existing stretch column + auto sale margin: top and bottom
 * alignment still belongs to console-panel.css, not a fixed-height spacer. */
.maso-arcade:not(.events-hub-page) .hero-copy > h1 {
  font-size: clamp(4.8rem, 8.8vw, 7.3rem);
  line-height: .84;
  letter-spacing: -.025em;
}
.maso-arcade:not(.events-hub-page) .hero-copy > h1 > .grad-text {
  display: block;
  margin-top: .055em;
}
.maso-arcade:not(.events-hub-page) .console-plus h2 {
  font-size: clamp(2.2rem, 3.5vw, 2.75rem);
  line-height: .98;
  font-weight: 900;
  letter-spacing: -.025em;
}
.maso-arcade:not(.events-hub-page) :is(.section-head h2, .hero-copy > h1) {
  text-shadow: 0 0 30px #a97cff20;
}
.maso-arcade:not(.events-hub-page):not([class*="panel-"]) :is(.hero-copy > h1, .section-head h2) .grad-text {
  background: none;
  color: var(--arc-pink);
  -webkit-text-fill-color: var(--arc-pink);
  text-shadow: 0 0 32px #ef42dc40;
}
.maso-arcade:not(.events-hub-page) :is(
  .eyebrow, .console-top > .label, .collection-page-summary,
  .hub-live, .shop-rotate-info, .upd-date, .mk-kicker, .mk-label,
  .console-plus-brand span, .console-plus-perks li,
  .console-plus-benefits-toggle, .console-plus-play,
  .console-balance-tabs button, .console-reward-balances .k,
  .console-reward-balances .v, .pusher-plus-brand span,
  .pusher-plus-status, .pusher-plus-perks li, .top-status, .wordmark b,
  .ace-sidebar-label, .ace-console-kicker,
  .stat .num, .maintenance-notice-kicker, .sri-label, .sri-val,
  .shop-cdval, .shop-sh-sub, .drop-price, .pt-price, .sfx-price,
  .locker-kicker, .locker-collapse, .locker-btn, .locker-msg, .share-url
) {
  font-family: var(--arc-mono);
}
.maso-arcade:not(.events-hub-page):not([class*="panel-"]) .eyebrow {
  color: var(--arc-cyan);
  letter-spacing: .16em;
}
.maso-arcade:not(.events-hub-page) :is(.hero-copy > .lead, .section-head > p, .collection-page-head > p) {
  color: var(--arc-muted);
  font-family: var(--arc-body);
}

/* Default shells only. Equipped panels own their backgrounds, borders,
 * gradients, and shadows, including inline/important cosmetic declarations. */
.maso-arcade:not(.events-hub-page):not([class*="panel-"]) :is(
  .cards > .card:not(.store-ad):not(.nuke-run-card),
  .hub-card, .inv-login, .chat-gate-card,
  .dev-section, .dev-knob, .upl-item,
  .inv-section, .upd-card, .upd-empty,
  .ace-console, .ace-sidebar
):not([class*="pnl-"]) {
  border-color: var(--arc-line);
  background: radial-gradient(ellipse at 100% 0%, #45235c44, transparent 75%), var(--arc-panel);
  border-radius: 8px;
}
.maso-arcade:not(.events-hub-page) :is(.hub-head, .ace-console-head) {
  border-bottom-color: var(--arc-line);
}
.maso-arcade:not(.events-hub-page) :is(.hub-title, .dev-section > h3, .legal-wrap .inv-section > h3) {
  color: var(--arc-ink);
}
.maso-arcade:not(.events-hub-page) :is(.legal-list, .legal-wrap .inv-section p, .dev-sub) {
  color: var(--arc-muted);
}
.maso-arcade:not(.events-hub-page) :is(.upd-date, .shop-sh-sub, .sri-label) {
  color: var(--arc-dim);
}
.maso-arcade:not(.events-hub-page) .legal-wrap a {
  color: var(--arc-cyan);
  text-underline-offset: 3px;
}

/* KAOS portal uses spans, not heading tags. Keep the glitch wordmark and all
 * --ks-* economy tokens intact; only these navigation cards adopt hub chrome.
 * No per-card token overrides: equipped panels retain their own card colors. */
.maso-arcade:not(.events-hub-page) .kp-card {
  text-align: left;
  border-radius: 8px;
  padding: 28px 26px 24px;
  transition: transform .18s ease;
}
.maso-arcade:not(.events-hub-page) .kp-name {
  font: 800 clamp(2.7rem, 4vw, 3.5rem)/.95 var(--arc-display);
  letter-spacing: -.02em;
}
.maso-arcade:not(.events-hub-page) .kp-sub {
  max-width: 38ch;
  margin-left: 0;
  font: 400 .88rem/1.65 var(--arc-body);
}
.maso-arcade:not(.events-hub-page) .kp-go {
  font: 500 .66rem/1.5 var(--arc-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  padding-top: 16px;
  border-top: 1px solid currentColor;
}
.maso-arcade:not(.events-hub-page) .kp-badge {
  font: 500 .6rem/1.4 var(--arc-mono);
  letter-spacing: .08em;
}
.maso-arcade:not(.events-hub-page):not([class*="panel-"]) .kp-card:not([class*="pnl-"]) {
  color: var(--arc-ink);
  border-color: #63f3f470;
  background: radial-gradient(ellipse at 95% 0%, #194f6e55, transparent 75%),
    linear-gradient(125deg, #16213e, #131229 75%);
  box-shadow: inset 0 2px #63f3f4, 0 0 24px #42e9f20c;
}
.maso-arcade:not(.events-hub-page):not([class*="panel-"]) .kp-card:nth-child(2):not([class*="pnl-"]) {
  border-color: #ff71d77a;
  background: radial-gradient(ellipse at 95% 0%, #692d8355, transparent 75%),
    linear-gradient(125deg, #281733, #17122f 75%);
  box-shadow: inset 0 2px #ff71d7, 0 0 24px #ff71d710;
}
.maso-arcade:not(.events-hub-page):not([class*="panel-"]) .kp-name {
  color: var(--arc-ink);
}
.maso-arcade:not(.events-hub-page):not([class*="panel-"]) .kp-sub {
  color: var(--arc-muted);
}
.maso-arcade:not(.events-hub-page):not([class*="panel-"]) .kp-go {
  color: var(--arc-cyan);
  border-top-color: #63f3f433;
}
.maso-arcade:not(.events-hub-page):not([class*="panel-"]) .kp-card:nth-child(2) .kp-go {
  color: var(--arc-pink);
  border-top-color: #ff71d733;
}
.maso-arcade:not(.events-hub-page):not([class*="panel-"]) .kp-ico {
  filter: none;
  color: var(--arc-cyan);
}
.maso-arcade:not(.events-hub-page):not([class*="panel-"]) .kp-badge {
  color: #ffb4ed;
  background: #ff71d71a;
  border-color: #ff71d76b;
  animation: none;
}

/* Standard controls. Purpose-built membership/sale/game/currency buttons
 * deliberately keep their own colors. Never restyle every button or input. */
.maso-arcade:not(.events-hub-page) :is(.btn, .inv-login a, .upl-form input, .upl-form textarea, .dev-knob input, .dev-knob button, .dev-own-tools input) {
  font-family: var(--arc-body);
}
.maso-arcade:not(.events-hub-page) :is(
  .theme-act, .theme-modal-close, .theme-rail, .inv-tab,
  .ks-search, .ks-chip, .ksa-tab, .ks-cartfab, .kh-swap, .pt-select,
  .mk-button, .mk-tab, .mk-icon-button, .missing-cards-toggle,
  .ace-earlier, .ace-new, .ace-submit, .ace-retry,
  .chat-text, .chat-send, .chat-jump, .chat-share-btn,
  .retry-button, .wins-retry, .event-btn
) {
  font-family: var(--arc-body);
}
.maso-arcade:not(.events-hub-page) .btn:not(.btn-mclub):not(.event-launch):not(.console-kaos) {
  border-radius: 6px;
}
.maso-arcade:not(.events-hub-page):not([class*="panel-"]) .btn-primary:not(.store-cta):not(.console-kaos) {
  color: #f4eeff;
  border: 1px solid #b89bff70;
  background: linear-gradient(115deg, #6235a0, #843b89);
  box-shadow: 0 0 20px #a97cff20;
}
.maso-arcade:not(.events-hub-page):not([class*="panel-"]) .btn-ghost:not(.console-kaos) {
  color: var(--arc-ink);
  background: #211536;
  border-color: #b89bff55;
}
.maso-arcade:not(.events-hub-page) :is(.upl-form input, .upl-form textarea, .dev-knob input, .dev-own-tools input) {
  border-color: #b89bff55;
  background: #100c23;
  color: var(--arc-ink);
}
.maso-arcade:not(.events-hub-page) :is(.upl-actions button, .dev-knob button) {
  border-color: #b89bff65;
  border-radius: 5px;
}
.maso-arcade:not(.events-hub-page) :is(.market-subnav, .ksa-tabs) {
  font-family: var(--arc-mono);
}
.maso-arcade:not(.events-hub-page):not([class*="panel-"]) .market-subnav a.active {
  color: var(--arc-cyan);
  background: #63f3f412;
}

/* Existing dialog behavior, visibility, focus management and IDs untouched.
 * Only the neutral modal shell changes, not reward art or equipped previews. */
.maso-arcade:not(.events-hub-page):not([class*="panel-"]) :is(
  .console-plus-benefits-dialog, .support-dialog, .wallet-send-dialog,
  .theme-modal:not([class*="pnl-"])
) {
  color: var(--arc-ink);
  background: #18132c;
  border-color: #b89bff88;
}
.maso-arcade:not(.events-hub-page) .theme-modal-title {
  background: none;
  color: var(--arc-ink);
  font-family: var(--arc-display);
  font-size: 1.6rem;
  letter-spacing: .01em;
}
.maso-arcade:not(.events-hub-page) .console-plus-benefits-dialog .console-drawer-head h2 {
  font-family: var(--arc-display);
  font-size: 1.3rem;
}

/* Card Event: update only its navigation/hero/section chrome. Its collection
 * cards, rarity colors, purchase controls and artwork keep event tokens. */
.maso-arcade.events-page .events-hero h1 {
  color: var(--arc-ink);
}
.maso-arcade.events-page .events-hero h1 :is(em, span) {
  color: var(--arc-pink);
}
.maso-arcade.events-page :is(.events-kicker, .events-section-head h2) {
  color: var(--arc-cyan);
}
.maso-arcade.events-page :is(.events-hero p, .events-section-head p) {
  font-family: var(--arc-body);
  color: var(--arc-muted);
}

/* Standalone Nuke Run intentionally does not import styles.css: no board,
 * tile, reactor, badge, reward or odds token is changed here. */
.maso-arcade.arcade-nuke .mast h1 { color: var(--arc-ink); }
.maso-arcade.arcade-nuke .mast h1 span {
  color: var(--arc-pink);
  text-shadow: 0 0 32px #ef42dc40;
}
.maso-arcade.arcade-nuke .mast .kicker {
  color: var(--arc-cyan);
  font-family: var(--arc-mono);
}
.maso-arcade.arcade-nuke .deck {
  color: var(--arc-muted);
  font-family: var(--arc-body);
}

/* Keyboard visibility without changing icon fonts or preview typography. */
.maso-arcade:not(.events-hub-page) :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid #f5da8e;
  outline-offset: 4px;
}
.maso-arcade:not(.events-hub-page) :is(.btn, .nav-links a, .nav-back, .market-subnav a) {
  transition: transform .18s ease, opacity .18s ease;
}

@media (max-width: 940px) {
  .maso-arcade:not(.events-hub-page) .nav-links.open {
    background: #17102bf5;
    border-color: #9261ba88;
  }
}
@media (max-width: 767px) {
  .maso-arcade:not(.events-hub-page) .hero-copy > h1 {
    font-size: clamp(3.5rem, 14vw, 6rem);
  }
  .maso-arcade:not(.events-hub-page) .console-plus h2 {
    font-size: clamp(2.2rem, 8.5vw, 2.75rem);
  }
  .maso-arcade:not(.events-hub-page) :is(.nav-back, .nav-links a, .nav-report, .btn, .market-subnav a) {
    min-height: 44px;
  }
  .maso-arcade:not(.events-hub-page) .nav-toggle {
    min-width: 44px;
    min-height: 44px;
  }
  .maso-arcade.arcade-nuke .topbar { flex-wrap: wrap; gap: 12px; padding-block: 12px; }
  .maso-arcade.arcade-nuke .top-status { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(body.maso-arcade:not(.events-hub-page)) { scroll-behavior: auto; }
  .maso-arcade:not(.events-hub-page) :is(.btn, .nav-links a, .nav-back, .market-subnav a) {
    transition: none;
  }
  .maso-arcade:not(.events-hub-page) .kp-card {
    transition: none;
  }
  .maso-arcade:not(.events-hub-page) .kp-card:hover {
    transform: none;
  }
  .maso-arcade:not(.events-hub-page) .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
