/* MOBILE DRAWER REBUILD — mobile only. Desktop menu is intentionally untouched. */
@media (min-width: 861px){
  #touMobileBackdrop,#touMobileDrawer{display:none!important;}
}
@media (max-width: 860px){
  :root{--tou-mobile-header:60px;}
  html,body{width:100%!important;max-width:100%!important;overflow-x:hidden!important;-webkit-text-size-adjust:100%;}
  body{padding-top:var(--tou-mobile-header)!important;padding-bottom:18px!important;}

  /* Remove legacy mobile/bottom nav systems only on mobile. */
  .mobile-quick-nav,.ux-mobile-quick-nav,.mobile-bottom-nav,.bottom-nav,.quick-nav,.floating-mobile-nav,
  .stream-nav,.old-mobile-nav,.legacy-mobile-menu{
    display:none!important;visibility:hidden!important;pointer-events:none!important;max-height:0!important;overflow:hidden!important;
  }

  /* Keep the existing desktop-derived header as a compact mobile bar. */
  #shared-site-menu{position:fixed!important;top:0!important;left:0!important;right:0!important;height:var(--tou-mobile-header)!important;z-index:2147483000!important;pointer-events:none!important;}
  #shared-site-menu .arch-global-nav{pointer-events:auto!important;position:relative!important;width:100%!important;min-height:var(--tou-mobile-header)!important;max-height:var(--tou-mobile-header)!important;overflow:visible!important;padding:8px 10px calc(7px + env(safe-area-inset-top,0px))!important;border-radius:0 0 16px 16px!important;background:rgba(16,10,16,.985)!important;-webkit-backdrop-filter:blur(14px)!important;backdrop-filter:blur(14px)!important;border-bottom:1px solid rgba(215,180,106,.30)!important;box-shadow:0 10px 32px rgba(0,0,0,.42)!important;box-sizing:border-box!important;}
  #shared-site-menu .arch-nav-inner{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto!important;align-items:center!important;gap:7px!important;width:100%!important;max-width:none!important;margin:0!important;}
  #shared-site-menu .arch-brand{grid-column:1!important;min-width:0!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-family:Georgia,'Times New Roman',serif!important;font-size:.88rem!important;line-height:1.1!important;padding:9px 10px!important;border-radius:999px!important;color:#f7e4b6!important;}
  #shared-site-menu .shared-menu-language{grid-column:2!important;grid-row:1!important;display:block!important;width:auto!important;margin:0!important;}
  #shared-site-menu .shared-menu-language select{width:auto!important;max-width:94px!important;height:38px!important;padding:7px 8px!important;font-size:12px!important;line-height:1!important;border-radius:999px!important;color:#fff7e8!important;background:#171018!important;border:1px solid rgba(215,180,106,.35)!important;-webkit-appearance:none!important;appearance:none!important;}
  #shared-site-menu .arch-mobile-toggle{grid-column:3!important;grid-row:1!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:54px!important;height:38px!important;padding:0 11px!important;margin:0!important;font-size:0!important;border-radius:999px!important;touch-action:manipulation!important;cursor:pointer!important;border:1px solid rgba(215,180,106,.42)!important;background:rgba(255,247,232,.06)!important;color:#d7b46a!important;}
  #shared-site-menu .arch-mobile-toggle::before{content:'☰'!important;font-size:21px!important;line-height:1!important;color:#d7b46a!important;}
  html[data-tou-mobile-open='true'] #shared-site-menu .arch-mobile-toggle::before{content:'×'!important;font-size:24px!important;}

  /* Hide the old generated dropdown panel on mobile; the rebuilt drawer below is the only mobile menu. */
  #shared-site-menu .arch-menu-wrap{display:none!important;visibility:hidden!important;pointer-events:none!important;}
  #shared-site-menu .arch-menu-backdrop{display:none!important;visibility:hidden!important;pointer-events:none!important;}

  /* Lightweight backdrop keeps page visible and closes on tap. */
  #touMobileBackdrop{display:none;position:fixed;inset:var(--tou-mobile-header) 0 0 0;background:rgba(0,0,0,.26);z-index:2147482996;}
  html[data-tou-mobile-open='true'] #touMobileBackdrop{display:block!important;}

  /* Compact drawer: not full screen; Safari/Android friendly. */
  #touMobileDrawer{display:block;position:fixed;top:calc(var(--tou-mobile-header) + 8px);left:10px;width:min(340px,calc(100vw - 20px));max-height:calc(100dvh - var(--tou-mobile-header) - 24px);max-height:calc(100vh - var(--tou-mobile-header) - 24px);overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;z-index:2147482997;padding:11px;border:1px solid rgba(215,180,106,.34);border-radius:20px;background:linear-gradient(180deg,rgba(31,21,25,.992),rgba(13,7,13,.992));box-shadow:0 24px 80px rgba(0,0,0,.64);box-sizing:border-box;transform:translate3d(-108%,0,0);opacity:0;visibility:hidden;transition:transform .24s ease,opacity .2s ease,visibility .2s ease;color:#fff7e8;font-family:Georgia,'Times New Roman',serif;}
  html[data-tou-mobile-open='true'] #touMobileDrawer{transform:translate3d(0,0,0);opacity:1;visibility:visible;}
  #touMobileDrawer .tou-mobile-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:0 0 10px;padding:9px 10px;border-radius:14px;background:rgba(215,180,106,.09);color:#f3d28b;font-size:.86rem;letter-spacing:.08em;text-transform:uppercase;}
  #touMobileDrawer .tou-mobile-close{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:999px;border:1px solid rgba(215,180,106,.35);background:rgba(255,247,232,.06);color:#f3d28b;font-size:20px;line-height:1;}
  #touMobileDrawer .tou-mobile-section{border:1px solid rgba(215,180,106,.18);border-radius:15px;background:rgba(255,247,232,.045);overflow:hidden;margin:7px 0;}
  #touMobileDrawer .tou-mobile-parent{width:100%;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 13px;border:0;background:transparent;color:#d7b46a;font-family:Georgia,'Times New Roman',serif;font-size:.98rem;line-height:1.2;text-align:left;touch-action:manipulation;}
  #touMobileDrawer .tou-mobile-parent::after{content:'+';font-size:18px;opacity:.85;}
  #touMobileDrawer .tou-mobile-section.is-open .tou-mobile-parent::after{content:'−';}
  #touMobileDrawer .tou-mobile-links{display:none;gap:5px;padding:7px;border-top:1px solid rgba(215,180,106,.16);background:rgba(0,0,0,.22);}
  #touMobileDrawer .tou-mobile-section.is-open .tou-mobile-links{display:grid;}
  #touMobileDrawer .tou-mobile-links a{display:block;width:100%;box-sizing:border-box;padding:10px 11px;border-radius:11px;color:#fff7e8;text-decoration:none;background:rgba(255,255,255,.035);border:1px solid rgba(215,180,106,.10);font-family:Georgia,'Times New Roman',serif;font-size:.93rem;line-height:1.25;text-align:left;overflow-wrap:anywhere;}
  #touMobileDrawer .tou-mobile-links a:active,#touMobileDrawer .tou-mobile-links a:focus{background:rgba(215,180,106,.14);outline:1px solid rgba(215,180,106,.35);}
  #touMobileDrawer .tou-mobile-lang{margin:10px 0 2px;padding:10px;border-radius:14px;background:rgba(215,180,106,.075);border:1px solid rgba(215,180,106,.18);}
  #touMobileDrawer .tou-mobile-lang label{display:block;margin-bottom:6px;color:#d7b46a;font-size:.8rem;text-transform:uppercase;letter-spacing:.08em;}
  #touMobileDrawer .tou-mobile-lang select{width:100%;height:40px;border-radius:12px;border:1px solid rgba(215,180,106,.32);background:#171018;color:#fff7e8;padding:0 10px;font-family:Georgia,'Times New Roman',serif;}
  html[data-tou-mobile-open='true'],html[data-tou-mobile-open='true'] body{overflow:hidden!important;}

  #touLivingWorldWidget{right:12px!important;bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;max-width:min(86vw,320px)!important;z-index:99990!important;}
}
