.mobile-menu-button,
.mobile-drawer,
.mobile-content-tabs { display: none; }

@media (max-width: 640px) {
  body { padding-top: 60px; }
  body.mobile-menu-open { overflow: hidden; }

  .topbar {
    position: fixed;
    z-index: 70;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 60px;
    padding: 0 14px;
    background: rgba(7, 12, 20, .94);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
    backdrop-filter: blur(16px);
  }

  .topbar > .brand { gap: 7px; font-size: 14px; }
  .topbar > .brand span:last-child { display: inline; }
  .topbar .brand-mark,
  .topbar .brand-mark img { width: 32px; height: 32px; }
  .patch-link,
  .header-actions { display: none; }

  .mobile-menu-button {
    display: grid;
    width: 42px;
    height: 42px;
    margin-left: auto;
    padding: 10px;
    place-content: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #0c1724;
    cursor: pointer;
  }

  .mobile-menu-button span { display: block; width: 20px; height: 2px; border-radius: 9px; background: var(--accent); }
  .mobile-menu-backdrop { position: fixed; z-index: 80; inset: 0; background: rgba(0, 0, 0, .62); backdrop-filter: blur(2px); }
  .mobile-menu-backdrop[hidden] { display: none; }

  .mobile-drawer {
    position: fixed;
    z-index: 81;
    inset: 0 auto 0 0;
    display: flex;
    width: min(82vw, 310px);
    padding: 18px;
    flex-direction: column;
    border-right: 1px solid #31536b;
    background: linear-gradient(160deg, #102235, #07101a 75%);
    box-shadow: 20px 0 50px rgba(0, 0, 0, .48);
    transform: translateX(-105%);
    transition: transform .22s ease;
  }

  .mobile-drawer.is-open { transform: translateX(0); }
  .mobile-drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid rgba(117, 217, 255, .17); }
  .mobile-drawer-head .brand { color: var(--text); text-decoration: none; }
  .mobile-menu-close { width: 38px; height: 38px; padding: 0; color: #9fc9dc; border: 1px solid var(--line); border-radius: 9px; background: transparent; font-size: 27px; line-height: 1; cursor: pointer; }
  .mobile-drawer-nav { display: grid; gap: 7px; padding-top: 18px; }
  .mobile-drawer-nav a { position: relative; padding: 14px 15px; color: #b8c8d3; border: 1px solid transparent; border-radius: 10px; text-decoration: none; font-size: 14px; font-weight: 700; }
  .mobile-drawer-nav a::after { content: "›"; position: absolute; right: 15px; color: #54758c; }
  .mobile-drawer-nav a.active { color: #06131d; border-color: var(--accent); background: var(--accent); }
  .mobile-drawer-nav a.active::after { color: #1b5269; }

  .mobile-content-tabs {
    position: sticky;
    z-index: 24;
    top: 68px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin: 0 0 12px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(8, 19, 31, .95);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .2);
    backdrop-filter: blur(12px);
  }

  .mobile-content-tabs button {
    min-width: 0;
    min-height: 44px;
    padding: 0 8px;
    overflow: hidden;
    color: #8fa7b8;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
  }

  .mobile-content-tabs button.active { color: #06131d; background: var(--accent); box-shadow: 0 5px 14px rgba(117, 217, 255, .15); }
  [data-pane-group].mobile-pane-hidden { display: none !important; }

  .exp-hero h1,
  .job-hero h1,
  .guide-hero h1,
  .magic-hero h1,
  .patch-hero h1 {
    font-size: clamp(38px, 11vw, 50px);
    line-height: 1.18;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .exp-hero > p:last-child,
  .job-hero > p,
  .guide-hero > p,
  .magic-hero > p,
  .patch-hero > p {
    line-height: 1.65;
    word-break: keep-all;
  }
}
