/* One site bar on phones and tablets; desktop keeps its inline navigation. */
.pub-header .site-mobile-control, .site-drawer, .site-drawer-backdrop,
.site-mobile-links, .site-drawer-consent { display: none; }

@media screen and (max-width: 960px) {
  .ea-banner {
    --ea-banner-h: auto; min-height: 22px; height: auto; padding: 2px 8px;
    white-space: normal; font-size: 11px; line-height: 1.35;
  }
  .pub-header { top: var(--sdeeka-banner-height, 0px); }
  .pub-header .pub-header-inner {
    display: flex; align-items: center; flex-wrap: nowrap; min-height: 50px; gap: 2px;
    padding: 2px max(8px, env(safe-area-inset-right)) 2px max(8px, env(safe-area-inset-left));
  }
  .pub-header .pub-nav, .app-shell .app-content-header { display: none; }
  .pub-header .brand { gap: 6px; min-width: 0; }
  .pub-header .brand-mark { width: 28px; height: 28px; border-radius: 7px; }
  .pub-header .brand-word { font-size: 19px; white-space: nowrap; }
  .pub-header .pub-header-right { margin-left: auto; flex: none; gap: 1px; }
  .pub-header .site-mobile-control, .pub-header .avatar-btn {
    display: inline-flex; align-items: center; justify-content: center;
    flex: none; width: 44px; height: 44px; padding: 0;
  }
  .pub-header .site-mobile-control {
    border: 1px solid #e4d7ca; background: white; border-radius: 12px; color: #44392f;
    text-decoration: none;
  }
  .pub-header .site-mobile-control + .site-mobile-control { margin-left: 3px; }
  .pub-header .avatar-btn { border-color: transparent; }
  .pub-header .avatar-btn .icon, .pub-header .avatar-name { display: none; }
  .pub-header .pub-header-right > .btn {
    min-height: 44px; padding: 6px 10px; color: #28231e; background: white; border-color: #e4d7ca;
  }
  .pub-header .pub-header-right > .btn:hover { color: #803003; border-color: #cb7944; }
  .pub-header :is(a,button):focus-visible, :is(.site-drawer,.app-sidebar) :is(a,button):focus-visible {
    outline: 2px solid #9e450d; outline-offset: -2px;
  }
  .pub-header .dropdown a, .pub-header .dropdown button { min-height: 44px; }

  .site-drawer {
    position: fixed; z-index: 200; left: 0; top: 0; width: min(338px, calc(100vw - 28px));
    height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: #d8c9ba transparent;
    overscroll-behavior: contain; background: #fffaf5; color: #28231e; border-right: 1px solid #dbcdbf;
    box-shadow: 0 0 60px #0004;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
  .site-drawer-backdrop { display: block; position: fixed; inset: 0; z-index: 170; background: rgba(17,18,19,.5); }
  .site-drawer-heading {
    display: flex; flex: none; justify-content: space-between; align-items: center;
    padding: 6px 12px 4px 16px; color: #28231e;
  }
  .site-drawer-heading strong { font-size: 17px; }
  .site-drawer-close {
    display: inline-flex; width: 44px; height: 44px; border: 1px solid #e5d9ce;
    border-radius: 50%; background: white; color: #51453b;
  }
  .site-drawer-new {
    display: flex; align-items: center; justify-content: center; flex: none; min-height: 44px; margin: 2px 14px 0; gap: 8px;
    border: 1px solid #282521; border-radius: 11px; background: #282521; color: white;
  }
  .site-drawer-new .icon { width: 18px; height: 18px; color: #ffb782; }
  :is(.site-drawer,.app-sidebar) .site-drawer-new:focus-visible { outline-color: #ffd5b1; }
  .site-mobile-links {
    display: grid; flex: none; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin: 10px 14px 4px;
  }
  .site-mobile-links a {
    display: flex; align-items: center; gap: 7px; min-width: 0; min-height: 44px; padding: 5px 8px;
    color: #3b332d; background: white; border: 1px solid #decfc2; border-radius: 10px;
    font-size: .86rem; font-weight: 600; line-height: 1.4; text-decoration: none;
  }
  .site-mobile-links .drawer-tile-icon { width: 17px; height: 17px; flex: none; color: #786250; }
  .site-mobile-links a[aria-current="page"] { color: #803003; background: #fff0e3; border-color: #cb7944; font-weight: 700; }
  .site-mobile-links a[aria-current="page"] .icon { color: #944118; }
  .site-drawer-history {
    display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 4px 14px; padding: 4px 8px;
    color: #783308; font-size: .88rem; text-underline-offset: 3px;
  }
  .site-drawer-consent, .consent-reopen { display: none !important; }
  .app-backdrop { z-index: 170; }
  .site-drawer[hidden], .site-drawer-backdrop[hidden] { display: none; }
}
@media screen and (max-width: 960px) and (max-height: 420px) {
  .site-mobile-links { margin-top: 6px; gap: 3px; }
}
@media screen and (max-width: 380px) {
  .pub-header .pub-header-right > .btn { width: 44px; }
  .pub-header .pub-header-right > .btn span {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
  }
}
