/* Mobile — isolated from the desktop layout */
@media (max-width: 700px) {
  :root { --header-height: 64px; }

  html, body { max-width: 100%; overflow-x: hidden; }
  body.nav-open { overflow: hidden; }
  .shell { width: calc(100% - 32px); }

  .site-header { height: var(--header-height); }
  .header-inner { min-height: var(--header-height); }
  .brand img { width: 38px; height: 38px; }
  .brand-wordmark { font-size: .82rem; }
  .nav-toggle {
    display: grid;
    width: 44px;
    height: 44px;
    place-content: center;
    gap: 6px;
    border: 1px solid rgba(219, 164, 255, .16);
    border-radius: 12px;
    background: rgba(14, 10, 18, .72);
  }
  .nav-toggle span { width: 19px; }
  .main-nav {
    top: 0;
    bottom: 0;
    left: auto;
    width: min(86vw, 340px);
    align-content: start;
    padding: calc(var(--header-height) + 28px) 24px 28px;
    border-left: 1px solid rgba(214, 146, 255, .15);
    border-bottom: 0;
    background: linear-gradient(160deg, rgba(25, 13, 32, .99), rgba(7, 6, 10, .995) 58%);
    box-shadow: -30px 0 80px rgba(0, 0, 0, .55);
    transform: translateX(110%);
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav > a {
    min-height: 58px;
    display: flex;
    align-items: center;
    padding: 0 4px;
    font-size: .9rem;
  }
  .main-nav .nav-play { margin-top: 18px; border-radius: 12px; }
  .nav-toggle { position: relative; z-index: 81; }

  .home-hero { min-height: auto; }
  .hero-shell {
    min-height: 760px;
    padding-top: 126px;
    padding-bottom: 20px;
  }
  .hero-copy { max-width: 100%; margin-bottom: 54px; }
  .eyebrow { font-size: .62rem; letter-spacing: .17em; }
  .hero-copy h1 {
    max-width: 100%;
    margin-top: 18px;
    font-size: clamp(3.35rem, 16.5vw, 5rem);
    line-height: .9;
    letter-spacing: -.072em;
  }
  .hero-backdrop img {
    width: 100%;
    height: 100%;
    object-position: 56% center;
    transform: scale(1.04);
  }
  .hero-backdrop::after {
    background:
      linear-gradient(180deg, rgba(7, 6, 10, .3), rgba(7, 6, 10, .18) 32%, rgba(7, 6, 10, .98) 78%),
      linear-gradient(90deg, rgba(7, 6, 10, .7), rgba(7, 6, 10, .08));
  }
  .hero-fx { opacity: .58; }
  .fx-grid { display: none; }
  .hero-actions { gap: 10px; }
  .hero-actions .button { min-height: 52px; border-radius: 11px; }

  .server-status {
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border-radius: 15px;
    background: rgba(9, 7, 12, .86);
    backdrop-filter: blur(18px);
  }
  .status-cell, .status-copy { min-width: 0; min-height: 70px; padding: 14px; }
  .status-state { grid-column: auto; border-right: 1px solid var(--line); border-bottom: 0; }
  .status-discord { border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
  .status-copy { grid-column: auto; border-top: 1px solid var(--line); }
  .status-label { font-size: .52rem; letter-spacing: .08em; }
  .status-cell strong { font-size: .82rem; }
  .status-copy strong { font-size: .67rem; overflow-wrap: anywhere; }
  .copy-action { font-size: .58rem; }

  .brand-ticker-track { gap: 24px; padding-block: 13px; }
  .brand-ticker-track span { font-size: .62rem; }

  .showcase-layout { gap: 10px; padding-top: 54px; padding-bottom: 64px; }
  .showcase-stage { min-height: 285px; }
  .stage-ring-one { width: min(78vw, 300px); height: min(78vw, 300px); }
  .stage-ring-two { width: min(61vw, 235px); height: min(61vw, 235px); }
  .stage-sweep { width: min(70vw, 270px); height: min(70vw, 270px); }
  .stage-core { width: 150px; height: 150px; }
  .stage-core img { width: 98px; height: 98px; }
  .showcase-copy { text-align: center; }
  .showcase-copy .eyebrow { justify-content: center; }
  .showcase-copy h2 { font-size: clamp(3rem, 17vw, 4.5rem); }
  .showcase-actions { width: 100%; gap: 18px; margin-top: 28px; }
  .showcase-actions .button { width: 100%; }
  .showcase-actions .text-link { margin-inline: auto; }

  .footer-inner {
    min-height: auto;
    align-items: center;
    gap: 20px;
    padding-block: 30px;
    text-align: center;
  }
  .footer-links { justify-content: center; }

  .rules-hero { min-height: 420px; }
  .rules-hero-inner { min-height: 420px; padding-top: 112px; padding-bottom: 46px; }
  .rules-hero h1 {
    max-width: calc(100vw - 32px);
    font-size: clamp(3.15rem, 15vw, 4.65rem);
    line-height: .91;
    overflow-wrap: normal;
  }
  .rules-hero-bg img { object-position: 57% center; transform: scale(1.04); }
  .rules-hero-code {
    right: -58px;
    bottom: 28px;
    width: 155px;
    height: 155px;
    opacity: .3;
  }

  .rules-area { padding: 28px 0 74px; }
  .rules-layout { gap: 18px; }
  .rules-sidebar {
    position: sticky;
    top: var(--header-height);
    z-index: 35;
    margin-inline: -16px;
    padding-inline: 16px;
    border-radius: 0;
    background: rgba(7, 6, 10, .96);
  }
  .toc-toggle { min-height: 54px; }
  .toc-nav {
    grid-template-columns: 1fr;
    max-height: 58vh;
    gap: 4px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px 0 16px;
  }
  .toc-nav a { min-height: 46px; padding-inline: 12px; }
  .rules-tools {
    position: static;
    margin-bottom: 14px;
    padding: 7px;
    border-radius: 13px;
  }
  .rules-search { min-height: 48px; }
  .rules-search input { font-size: 16px; }
  .rules-notice { gap: 11px; padding: 15px; border-radius: 13px; }
  .rules-notice p { font-size: .78rem; line-height: 1.55; }

  .rule-section {
    margin-top: 14px;
    padding: 24px 17px;
    border-radius: 17px;
    transform: none !important;
  }
  .rule-header { display: block; margin-bottom: 22px; }
  .rule-header p { margin-bottom: 7px; font-size: .55rem; }
  .rule-header h2 {
    font-size: clamp(1.9rem, 10vw, 2.65rem);
    line-height: 1;
    overflow-wrap: anywhere;
  }
  .rule-body { gap: 16px; padding-left: 0; }
  .rule-list li {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 15px 12px 15px 30px;
    font-size: .8rem;
    line-height: 1.55;
  }
  .rule-list li::before { left: 13px; }
  .sanction { width: fit-content; max-width: 100%; font-size: .52rem; }
  .rule-split { grid-template-columns: 1fr; gap: 10px; }
  .split-panel { min-width: 0; padding: 18px 15px; border-radius: 13px; }
  .split-panel p, .split-panel li { font-size: .78rem; line-height: 1.55; }
  .rule-callout { padding: 15px; font-size: .76rem; line-height: 1.55; }
  .zone-list { gap: 9px; }
  .zone-row { grid-template-columns: 1fr; gap: 7px; padding: 15px; }
  .zone-row span { font-size: .76rem; line-height: 1.5; }
  .rules-help {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    margin-top: 18px;
    padding: 19px 16px;
    border-radius: 16px;
  }
  .rules-help img { width: 44px; height: 44px; }
  .rules-help h2 { font-size: 1.35rem; }
  .rules-help .button { grid-column: 1 / -1; width: 100%; min-height: 50px; }
  .back-top { right: 14px; bottom: 14px; width: 46px; height: 46px; }

  .rules-footer .footer-inner { align-items: center; }

  .pointer-glow { display: none; }
  .button-primary::after, .nav-play::after { display: none; }
}

@media (max-width: 380px) {
  .shell { width: calc(100% - 24px); }
  .hero-shell { padding-top: 112px; }
  .hero-copy h1 { font-size: 3.2rem; }
  .status-cell, .status-copy { padding: 12px 10px; }
  .status-copy strong { font-size: .61rem; }
  .showcase-copy h2 { font-size: 3rem; }
  .rules-sidebar { margin-inline: -12px; padding-inline: 12px; }
  .rule-section { padding-inline: 14px; }
  .rules-hero h1 { font-size: 3rem; }
}

@media (hover: none) and (pointer: coarse) {
  .rule-section:hover { transform: none; }
  .hero-backdrop img, .rules-hero-bg img,
  .hero-emblem, .rules-hero-code, .showcase-stage { transition: none; }
}
