:root {
  --async-bg: #080a0f;
  --async-bg-2: #12151f;
  --async-panel: rgba(255, 255, 255, 0.075);
  --async-panel-strong: rgba(255, 255, 255, 0.115);
  --async-panel-border: rgba(255, 255, 255, 0.16);
  --async-text: #f4f7fb;
  --async-muted: #b9c3d4;
  --async-accent: #f5c76b;
  --async-blue: #b8d7ff;
  --async-green: #86efac;
  --async-red: #fca5a5;

  --async-card-radius: 22px;
  --async-card-padding: 18px;
  --async-card-bg: linear-gradient(180deg, rgba(255,255,255,0.095), rgba(255,255,255,0.04));
  --async-card-shadow: 0 18px 40px rgba(0,0,0,0.18);
}

/* ============================================================
   Base Async Section
   ============================================================ */

body.home,
body.page {
  background: var(--async-bg) !important;
}

body .wp-site-blocks,
body .entry-content,
body .wp-block-post-content {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

body .wp-block-group.is-style-async-section {
  position: relative;
  overflow: hidden;
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
  padding: clamp(40px, 6vw, 72px) 24px;
  color: var(--async-text);
  background:
    radial-gradient(circle at 12% 12%, rgba(245, 199, 107, 0.20), transparent 32%),
    radial-gradient(circle at 86% 18%, rgba(125, 211, 252, 0.14), transparent 36%),
    linear-gradient(135deg, #080a0f 0%, #12151f 52%, #07080c 100%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body .wp-block-group.is-style-async-section,
body .wp-block-group.is-style-async-section *,
body .wp-block-group.is-style-async-section *::before,
body .wp-block-group.is-style-async-section *::after {
  box-sizing: border-box;
}

body .wp-block-group.is-style-async-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at top, black 0%, transparent 74%);
  pointer-events: none;
}

body .wp-block-group.is-style-async-section > * {
  position: relative;
  z-index: 1;
}

body .wp-block-group.is-style-async-section h1,
body .wp-block-group.is-style-async-section h2,
body .wp-block-group.is-style-async-section h3,
body .wp-block-group.is-style-async-section h4,
body .wp-block-group.is-style-async-section h5,
body .wp-block-group.is-style-async-section h6 {
  color: var(--async-text) !important;
}

body .wp-block-group.is-style-async-section p {
  color: var(--async-muted) !important;
}

body .async-shell {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   Global Async Box System
   This preserves your old look, but normalizes behavior globally.
   ============================================================ */

body .wp-block-group.is-style-async-card,
body .wp-block-group.is-style-async-stat-card,
body .wp-block-group.is-style-async-bot-card,
body .async-feature-item,
body .async-mini-status-card {
  border: 1px solid var(--async-panel-border);
  border-radius: var(--async-card-radius);
  background: var(--async-card-bg);
  box-shadow: var(--async-card-shadow);
  color: var(--async-text);
  margin: 0 !important;
}

body .wp-block-group.is-style-async-card > *,
body .wp-block-group.is-style-async-stat-card > *,
body .wp-block-group.is-style-async-bot-card > *,
body .async-feature-item > *,
body .async-mini-status-card > * {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}

/* Big glass card keeps premium look */
body .wp-block-group.is-style-async-card {
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,0.105), rgba(255,255,255,0.055));
  box-shadow: 0 26px 80px rgba(0,0,0,0.30);
  backdrop-filter: blur(18px);
  padding: clamp(20px, 4vw, 30px);
}

/* Stat card uses original dark dashboard look */
body .wp-block-group.is-style-async-stat-card {
  border-color: rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.18);
  box-shadow: none;
  padding: 20px;
  min-height: 120px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Bot card uses original compact style */
body .wp-block-group.is-style-async-bot-card {
  padding: 15px 18px;
  min-height: 104px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Feature boxes use original subtle homepage style */
body .async-feature-item {
  border-color: rgba(255,255,255,0.10);
  border-radius: 20px;
  background: rgba(0,0,0,0.16);
  box-shadow: none;
  padding: 18px;
  min-height: 145px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Mini status boxes use original right-card style */
body .async-mini-status-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 14px 15px;
  border-radius: 18px;
  background: rgba(0,0,0,0.22);
  border-color: rgba(255,255,255,0.09);
  box-shadow: none;
}

/* ============================================================
   Topbar / Brand
   ============================================================ */

body .wp-block-group.is-style-async-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding: 0;
}

body .async-brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

body .async-logo-box {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #f5c76b, #fff0b8);
  color: #111 !important;
  font-weight: 900;
  font-size: 24px;
  line-height: 1;
}

body .async-brand-name {
  margin: 0;
  color: #ffffff !important;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.03em;
}

body .async-nav-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

/* ============================================================
   Grids
   ============================================================ */

body .wp-block-group.is-style-async-stat-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

body .wp-block-group.is-style-async-bot-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

body .async-feature-strip {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  grid-auto-rows: 1fr;
  margin-top: 34px;
}

body .async-home-mini-list {
  display: grid !important;
  gap: 12px;
}

/* ============================================================
   Headings / Text
   ============================================================ */

body .wp-block-heading.is-style-async-hero-title {
  margin: 0;
  color: var(--async-text) !important;
  font-size: clamp(42px, 6vw, 66px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  font-weight: 950;
}

body .wp-block-heading.is-style-async-section-title {
  margin: 0;
  color: var(--async-accent) !important;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.05em;
  font-weight: 900;
}

body .wp-block-heading.is-style-async-card-title {
  margin: 0 !important;
  color: #ffffff !important;
  font-size: 19px;
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
}

body p.is-style-async-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin: 0 0 16px;
  padding: 8px 13px;
  border: 1px solid var(--async-panel-border);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--async-muted) !important;
  font-size: 14px;
}

body p.is-style-async-meta,
body .is-style-async-meta {
  margin: 3px 0 0 !important;
  color: var(--async-blue) !important;
  font-size: 14px;
  line-height: 1.35;
}

body .async-card-copy {
  margin-top: 14px;
  color: var(--async-muted) !important;
  line-height: 1.65;
}

body .async-stat-number {
  margin: 0 0 10px !important;
  color: #ffffff !important;
  font-size: 26px;
  font-weight: 900;
  line-height: 1 !important;
  letter-spacing: -0.05em;
}

body .async-stat-label {
  margin: 0 !important;
  color: var(--async-muted) !important;
  font-size: 14px;
  line-height: 1.4;
}

body .async-mini-line {
  margin: 8px 0 0 !important;
  color: var(--async-muted) !important;
  font-size: 13px;
  line-height: 1.4;
}

body .async-feature-title {
  margin: 0 0 8px !important;
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 850;
}

body .async-feature-text {
  margin: 0 !important;
  color: var(--async-muted) !important;
  font-size: 14px;
  line-height: 1.5;
}

body .async-mini-status-title {
  margin: 0 !important;
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

body .async-mini-status-sub {
  margin: 4px 0 0 !important;
  color: var(--async-muted) !important;
  font-size: 13px;
  line-height: 1.35;
}

/* ============================================================
   Badges
   ============================================================ */

body p.is-style-async-badge-ready,
body p.is-style-async-badge-busy,
body p.is-style-async-badge-offline {
  display: inline-block;
  width: fit-content;
  margin: 0;
  border-radius: 999px;
  padding: 7px 11px;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.03em;
  border: 1px solid rgba(255,255,255,0.14);
  white-space: nowrap;
}

body p.is-style-async-badge-ready {
  color: var(--async-green) !important;
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.28);
}

body p.is-style-async-badge-busy {
  color: var(--async-accent) !important;
  background: rgba(245,199,107,0.12);
  border-color: rgba(245,199,107,0.28);
}

body p.is-style-async-badge-offline {
  color: var(--async-red) !important;
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.28);
}

/* ============================================================
   Buttons
   ============================================================ */

body .wp-block-button.is-style-async-gold .wp-block-button__link {
  color: #121212 !important;
  background: linear-gradient(135deg, #f5c76b, #fff0b8) !important;
  border: 0 !important;
  border-radius: 14px;
  padding: 14px 20px;
  font-weight: 850;
  box-shadow: 0 18px 46px rgba(245, 199, 107, 0.22);
}

body .wp-block-button.is-style-async-dark .wp-block-button__link {
  color: var(--async-text) !important;
  background: rgba(255,255,255,0.07) !important;
  border: 1px solid var(--async-panel-border) !important;
  border-radius: 14px;
  padding: 14px 20px;
  font-weight: 850;
}

/* ============================================================
   Bot card inner layout
   ============================================================ */

body .async-bot-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px !important;
}

body .async-bot-name-wrap {
  min-width: 0;
}

body .async-subhead-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 26px auto 14px;
  max-width: 1180px;
}

body .async-right-note {
  margin: 0;
  color: var(--async-muted) !important;
  font-size: 14px;
}

/* ============================================================
   Homepage
   ============================================================ */

body .async-home-hero {
  min-height: 100vh;
  display: block;
  padding-top: 42px !important;
  padding-bottom: 72px !important;
}

body .async-home-hero .is-style-async-topbar {
  margin-bottom: 48px;
}

body .async-home-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 36px;
  align-items: center;
}

body .async-home-copy {
  max-width: 680px;
}

body .async-hero-wordmark {
  margin: 0;
  color: #ffffff !important;
  font-size: clamp(58px, 9vw, 106px);
  line-height: 0.9;
  letter-spacing: -0.075em;
  font-weight: 950;
}

body .async-hero-wordmark strong {
  display: block;
  color: var(--async-accent) !important;
  font-weight: 950;
}

body .async-hero-subtitle {
  max-width: 680px;
  margin-top: 24px;
  color: var(--async-muted) !important;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.65;
}

body .async-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

body .async-home-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

body .async-home-note {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.10);
  color: var(--async-muted) !important;
  font-size: 14px;
  line-height: 1.55;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1180px) {
  body .wp-block-group.is-style-async-bot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  body .async-home-layout {
    grid-template-columns: 1fr;
  }

  body .async-home-copy {
    max-width: none;
  }
}

@media (max-width: 900px) {
  body .wp-block-group.is-style-async-bot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body .wp-block-group.is-style-async-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body .async-feature-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  body .wp-block-group.is-style-async-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  body .async-nav-buttons {
    justify-content: flex-start;
  }

  body .wp-block-group.is-style-async-bot-grid,
  body .wp-block-group.is-style-async-stat-grid {
    grid-template-columns: 1fr;
  }

  body .wp-block-group.is-style-async-section {
    padding: 32px 16px;
  }

  body .async-home-hero {
    min-height: auto;
    padding-top: 32px !important;
    padding-bottom: 48px !important;
  }

  body .async-home-hero .is-style-async-topbar {
    margin-bottom: 34px;
  }
}

/* Homepage supported dungeon card */
body .async-dungeon-card {
  max-width: 100%;
}

body .async-dungeon-list {
  display: grid !important;
  gap: 10px;
}

body .async-dungeon-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.09);
}

body .async-dungeon-title {
  margin: 0 !important;
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
}

body .async-dungeon-level {
  margin: 0 !important;
  color: var(--async-muted) !important;
  font-size: 13px;
  line-height: 1.35;
}

@media (min-width: 1100px) {
  body .async-dungeon-list {
    gap: 9px;
  }

  body .async-dungeon-row {
    padding: 10px 14px;
  }
}

body .async-mini-status-card {
  padding: 10px 14px;
  min-height: 58px;
}

body .async-mini-status-title {
  font-size: 15px;
}

body .async-mini-status-sub {
  font-size: 12px;
  margin-top: 2px !important;
}

body .async-home-mini-list {
  gap: 8px;
}

body .async-home-card-head {
  margin-bottom: 12px;
}

body .async-home-note {
  margin-top: 12px;
  padding-top: 12px;
}

/* ============================================================
   AsyncStuff Mobile Polish
   ============================================================ */

@media (max-width: 700px) {
  body .wp-block-group.is-style-async-section {
    padding: 24px 16px 42px !important;
  }

  body .async-shell {
    width: 100%;
  }

  /* Topbar */
  body .wp-block-group.is-style-async-topbar {
    gap: 18px;
    margin-bottom: 34px;
  }

  body .async-brand-row {
    gap: 10px;
  }

  body .async-brand-name {
    font-size: 20px;
  }

  body .async-nav-buttons {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  body .wp-block-button.is-style-async-dark .wp-block-button__link,
  body .wp-block-button.is-style-async-gold .wp-block-button__link {
    width: 100%;
    text-align: center;
    padding: 12px 10px;
    font-size: 13px;
    border-radius: 13px;
  }

  /* Hero */
  body .async-home-hero {
    min-height: auto;
    padding-top: 22px !important;
  }

  body .async-home-layout {
    gap: 34px;
  }

  body .async-hero-wordmark {
    font-size: clamp(56px, 19vw, 76px);
    line-height: 0.88;
  }

  body .async-hero-subtitle {
    margin-top: 20px;
    font-size: 18px;
    line-height: 1.55;
  }

  body p.is-style-async-kicker {
    font-size: 13px;
    line-height: 1.35;
    padding: 8px 12px;
  }

  body .async-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 24px;
  }

  /* Feature cards */
  body .async-feature-strip {
    gap: 12px;
    margin-top: 28px;
  }

  body .async-feature-item {
    min-height: auto;
    padding: 16px;
    border-radius: 18px;
  }

  body .async-feature-title {
    font-size: 15px;
  }

  body .async-feature-text {
    font-size: 14px;
    line-height: 1.45;
  }

  /* Supported dungeons card */
  body .wp-block-group.is-style-async-card {
    padding: 20px;
    border-radius: 24px;
  }

  body .async-home-card-head {
    align-items: center;
    margin-bottom: 14px;
  }

  body .async-home-card-head .async-brand-name {
    font-size: 18px;
  }

  body .async-home-mini-list {
    gap: 8px;
  }

  body .async-mini-status-card {
    min-height: auto;
    padding: 11px 13px;
    border-radius: 16px;
  }

  body .async-mini-status-title {
    font-size: 14px;
    line-height: 1.15;
  }

  body .async-mini-status-sub {
    font-size: 12px;
    line-height: 1.3;
  }

  body p.is-style-async-badge-ready,
  body p.is-style-async-badge-busy,
  body p.is-style-async-badge-offline {
    font-size: 11px;
    padding: 6px 9px;
  }

  body .async-home-note {
    margin-top: 12px;
    padding-top: 12px;
    font-size: 13px;
    line-height: 1.45;
  }

  /* Bot dashboard */
  body .async-dynamic-stats {
    gap: 12px;
  }

  body .wp-block-group.is-style-async-stat-card {
    min-height: 96px;
    padding: 18px;
  }

  body .async-stat-number {
    font-size: 25px;
  }

  body .async-subhead-row {
    margin-top: 34px;
    margin-bottom: 16px;
    align-items: flex-start;
  }

  body .wp-block-heading.is-style-async-section-title {
    font-size: 34px;
  }

  body .async-right-note {
    font-size: 13px;
  }

  body .wp-block-group.is-style-async-bot-card {
    min-height: auto;
    padding: 16px 18px;
  }

  body .wp-block-heading.is-style-async-card-title {
    font-size: 18px;
  }

  body .async-mini-line {
    font-size: 13px;
  }
}

body .async-bot-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-top: 4px;
}

body .async-bot-meta-left,
body .async-bot-meta-right {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body .async-bot-meta-left {
  min-width: 0;
}

body .async-bot-meta-right {
  text-align: right;
  flex-shrink: 0;
}

body .async-timer-line {
  color: var(--async-text) !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 520px) {
  body.home .async-feature-strip {
    display: none !important;
  }
}

@media (max-width: 700px) {
  body .async-bot-meta-row {
    gap: 10px;
  }

  body .async-timer-line {
    font-size: 12px !important;
  }
}