/* GRAND MERIT V37 - MOBILE FOUNDATION */

:root {
  --gm37-bg: #0b0b0d;
  --gm37-surface: #18181b;
  --gm37-surface-alt: #242428;
  --gm37-gold: #e4b94f;
  --gm37-gold-light: #f6d681;
  --gm37-text: #f5f1e8;
  --gm37-muted: #a9a9ad;
  --gm37-border: #4b3c22;
}

@media (max-width: 800px) {
  body {
    background: var(--gm37-bg);
    color: var(--gm37-text);
  }

  .gm37-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 10px 16px;
    background: #111113;
    border-bottom: 1px solid var(--gm37-border);
  }

  .gm37-mobile-logo {
    max-width: 150px;
    max-height: 48px;
    object-fit: contain;
  }

  .gm37-icon-button {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--gm37-gold);
    font-size: 23px;
  }

  .gm37-auth-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px 16px;
    background: #111113;
  }

  .gm37-auth-button {
    min-height: 48px;
    border-radius: 8px;
    border: 1px solid var(--gm37-gold);
    font-weight: 700;
  }

  .gm37-auth-button.primary {
    background: var(--gm37-gold);
    color: #17120a;
  }

  .gm37-auth-button.secondary {
    background: transparent;
    color: var(--gm37-gold);
  }

  .gm37-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, .7);
  }

  .gm37-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 9999;
    width: min(82vw, 380px);
    overflow-y: auto;
    background: var(--gm37-surface);
    color: var(--gm37-text);
    box-shadow: 0 0 35px #0009;
  }

  .gm37-drawer.left {
    left: 0;
  }

  .gm37-drawer.right {
    right: 0;
  }

  .gm37-drawer-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 17px 20px;
    border: 0;
    border-bottom: 1px solid #ffffff10;
    background: transparent;
    color: var(--gm37-text);
    text-align: left;
  }

  .gm37-drawer-item.active {
    background: #3c301b;
    color: var(--gm37-gold-light);
  }
}

@media (min-width: 801px) {
  .gm37-mobile-header,
  .gm37-auth-actions,
  .gm37-drawer,
  .gm37-drawer-backdrop {
    display: none !important;
  }
}


/* GRAND MERIT V37 - MOBILE UI */
@media(max-width:800px) {
  body { background:#0b0b0d!important; }
  body > .gm-brand-v4,
  body > header,
  body > .gm-user-panel-v19 {
    display:none!important;
  }
  .gm37-mobile-header {
    display:flex!important;
    position:relative;
    z-index:100;
    gap:10px;
  }
  .gm37-mobile-header .gm37-logo-link {
    display:flex;
    flex:1;
    justify-content:center;
    min-width:0;
  }
  .gm37-mobile-header .gm37-mobile-logo {
    width:145px!important;
    height:46px!important;
    object-fit:contain;
  }
  .gm37-auth-actions {
    display:grid!important;
    position:relative;
    z-index:90;
  }
  .gm37-auth-actions[hidden] {
    display:none!important;
  }
  .gm37-account-strip {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    padding:12px 15px;
    background:#18181b;
    border-bottom:1px solid #4b3c22;
  }
  .gm37-account-strip[hidden] {
    display:none!important;
  }
  .gm37-account-strip strong {
    color:#f6d681;
    font-size:13px;
  }
  .gm37-account-strip span {
    font-size:12px;
  }
  .gm37-account-strip button {
    border:1px solid #e4b94f;
    border-radius:8px;
    background:transparent;
    color:#e4b94f;
    padding:9px;
  }
  .gm37-drawer-backdrop[hidden],
  .gm37-drawer[hidden] {
    display:none!important;
  }
  .gm37-drawer {
    display:block!important;
    padding-bottom:30px;
  }
  .gm37-drawer-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:18px;
    border-bottom:1px solid #4b3c22;
    color:#f6d681;
  }
  .gm37-drawer-head button {
    background:none;
    border:0;
    color:#f6d681;
    font-size:25px;
  }
  .gm37-drawer-item {
    font-size:14px;
    text-decoration:none;
  }
  .gm37-drawer-section {
    padding:15px 20px 8px;
    font-size:11px;
    letter-spacing:1.5px;
    color:#a9a9ad;
  }
  .gm37-profile-summary {
    padding:18px 20px;
    background:#242428;
    line-height:1.8;
    font-size:14px;
  }
  .gm37-profile-summary strong {
    color:#f6d681;
  }
  .gm37-drawer .gm37-auth-button {
    display:block;
    width:calc(100% - 36px);
    margin:18px;
  }
  body.gm37-drawer-open {
    overflow:hidden;
  }
  .layout main {
    padding:12px!important;
  }
  .mobile-bottom {
    z-index:100!important;
  }
  .notice {
    font-size:11px;
  }
}
