/* Shared navigation; no data loading or account permissions are changed. */
.app-shell-nav {
  --app-nav-gutter: 34px;
  --ink: #f7f8fc; --muted: #9299aa; --line: #272c3a; --panel: #11141d;
  position: sticky; top: 0; z-index: 70; display: block; min-height: 0; padding: 0;
  border-bottom: 1px solid var(--line); background: #07080d;
  font-family: Inter, Pretendard, "Noto Sans KR", Arial, sans-serif; font-size: 16px; line-height: 1.5;
}
.app-shell-nav .global-nav-inner {
  position: relative; display: flex; align-items: center; flex-wrap: nowrap;
  width: min(100%, var(--app-desktop-frame-width, 1500px)); min-height: 72px; margin: 0 auto;
  padding: 10px var(--app-nav-gutter); gap: 28px;
}
.app-shell-nav .brand { display: flex; align-items: center; flex: 0 0 auto; gap: 12px; color: var(--ink); font-size: 16px !important; font-weight: 400; line-height: 1.5; text-decoration: none; }
.app-shell-nav .brand > span:last-child { display: block; }
.app-shell-nav .brand strong { display: block; font-size: 16px; font-weight: 700; letter-spacing: normal; }
.app-shell-nav .brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.app-shell-nav .brand .logo { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; background: var(--brand-primary); color: var(--brand-on-primary); font-weight: 900; }
.app-shell-nav :is(.global-menu, .service-nav) { display: flex; align-items: center; gap: 6px; }
.app-shell-nav :is(.global-menu, .service-nav) a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: transparent; font-size: 13px !important; font-weight: 800; line-height: 1.5; text-decoration: none; }
.app-shell-nav :is(.global-menu, .service-nav) a:hover { color: var(--ink); background: var(--brand-subtle); }
.app-shell-nav :is(.global-menu, .service-nav) a[aria-current="page"] { color: var(--brand-text); background: var(--brand-subtle); }
.app-shell-nav .nav-actions { display: flex; align-items: center; margin-left: auto; }
.app-shell-nav .nav-actions > a { display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); color: var(--ink); font-size: 12px !important; font-weight: 800; line-height: 1.5; text-decoration: none; }
.app-shell-nav .optical-control > .control-label { transform: none; }
/* Explicit navigation type sizes override legacy dashboard mobile !important rules. */
/* Opaque white in light mode; keep the existing dark-mode palette. */
:root[data-theme="light"] .app-shell-nav { --ink: #15204a; --muted: #667085; --line: #e3e7f0; --panel: #fff; background: #fff; }
.app-shell-nav .brand { min-width: 44px; min-height: 44px; }
.app-shell-nav .nav-actions { flex-wrap: nowrap; gap: 6px; }
.app-shell-nav .nav-actions > :not(.app-icon-action) { min-width: 44px; min-height: 44px; }
.app-shell-nav .app-icon-action { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); color: var(--ink); font-size: 16px !important; font-weight: 700; line-height: 1.5; cursor: pointer; }
.app-shell-nav .app-icon-action .control-ink { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.app-shell-nav .app-icon-action .control-icon { font-size: 23px; line-height: 1; }
.app-shell-nav #themeToggle { font-size: 23px !important; line-height: 1; color: var(--brand-text) !important; }
.app-shell-nav .nav-actions > :is(a,button):hover { border-color: var(--brand-text); background: var(--brand-subtle); }
.app-nav-icon { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-service-icon { display: none; }
.app-shell-nav .app-account-menu { position: absolute; inset: calc(100% + 8px) var(--app-nav-gutter) auto auto; z-index: 80; display: grid; gap: 2px; width: min(244px, calc(100vw - 24px)); min-width: 0; max-height: calc(100dvh - 160px); overflow-y: auto; overscroll-behavior: contain; padding: 8px; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); color: var(--ink); box-shadow: 0 14px 40px #0003; }
.app-shell-nav .app-account-menu[hidden] { display: none; }
.app-shell-nav .app-account-menu a, .app-shell-nav .app-account-menu button { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 10px; background: transparent; color: inherit; text-decoration: none; font: inherit; font-size: 14px !important; font-weight: 400; line-height: 1.5; text-align: left; cursor: pointer; }
.app-shell-nav .app-account-menu :is(a,button):hover { background: var(--soft, var(--panel2)); }
.app-shell-nav .app-account-menu button { border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.app-shell-nav [hidden] { display: none !important; }
@media (max-width: 768px) {
  html { scroll-padding-top: 80px; scroll-padding-bottom: 110px; }
  body.app-navigation-mobile { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .app-shell-nav { --app-nav-gutter: max(12px, env(safe-area-inset-right, 0px)); padding: 0; }
  .app-shell-nav .global-nav-inner, .app-shell-nav:not(:has(.global-nav-inner)) { display: flex; align-items: center; flex-wrap: nowrap; gap: 8px; min-height: 64px; padding: calc(8px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px)); }
  .app-shell-nav .brand { flex: 0 0 auto; width: auto; max-width: none; gap: 7px; }
  .app-shell-nav .brand .logo { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 10px; }
  .app-shell-nav .brand strong { font-size: 14px; letter-spacing: -.03em; }
  .app-shell-nav .brand small { display: none; }
  .app-shell-nav .nav-actions { width: auto; margin-left: auto; flex: 0 0 auto; }
  .app-shell-nav .nav-actions > :not(.app-icon-action) { flex: 0 0 auto; width: auto; min-width: 44px; min-height: 44px; padding: 8px; font-size: 12px; }
  /* Keep the fixed dock outside the filtered header's containing block. */
  .app-mobile-services { position: fixed; inset: auto auto calc(12px + env(safe-area-inset-bottom, 0px)) 50%; transform: translateX(-50%); z-index: 60; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; width: min(300px, calc(100vw - 32px)); padding: 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); box-shadow: 0 8px 30px #0002; }
  .app-mobile-services a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 54px; padding: 6px 10px; border: 0; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 700; line-height: 1.25; touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
  .app-mobile-services a[aria-current="page"] { color: var(--brand-text); background: var(--brand-subtle); }
  body.app-navigation-mobile .app-mobile-services.has-feedback a[aria-current="page"] { color: var(--muted); background: transparent; }
  body.app-navigation-mobile .app-mobile-services.has-feedback a.is-feedback { color: var(--brand-on-primary, #fff); background: var(--brand-primary); }
  .app-mobile-services a>* { pointer-events: none; }
  .app-mobile-services .app-service-icon { display: block; }
  /* Mobile source links must not flash in the header before deferred enhancement. */
  body.mobile-design .app-shell-nav :is(.global-menu,.service-nav),
  .app-navigation-mobile .app-shell-nav :is(.global-menu,.service-nav) { display: none; }
  .app-navigation-mobile .toast { bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
  .app-mobile-services[hidden], .is-onboarding .app-mobile-services { display: none !important; }
}
@media (min-width: 769px) { .app-mobile-services { display: none; } }
@media (max-width: 359px) {
  .app-shell-nav { --app-nav-gutter: 8px; }
  .app-shell-nav .global-nav-inner, .app-shell-nav:not(:has(.global-nav-inner)) { gap: 4px; padding-inline: 8px; }
  .app-shell-nav .nav-actions { gap: 2px; }
  .app-shell-nav .brand { gap: 5px; }
  .app-shell-nav .brand strong { font-size: 12px; }
}
@media (max-width: 299px) { .app-shell-nav .brand > span:last-child { display: none; } }

/* Use the same service identity and active-tab colors at every screen width. */
  :root[data-theme] .app-shell-nav{background:var(--brand-primary);border-bottom-color:transparent}
  .app-shell-nav .brand,
  .app-shell-nav .brand small,
  .app-shell-nav :is(.global-menu,.service-nav) a{color:#fff}
  .app-shell-nav .brand .logo{background:#fff;color:var(--brand-primary)}
  .app-shell-nav :is(.global-menu,.service-nav) a{border-radius:var(--app-desktop-radius,6px)}
  .app-shell-nav :is(.global-menu,.service-nav) a:hover{background:rgb(255 255 255/.1);color:#fff}
  .app-shell-nav :is(.global-menu,.service-nav) a[aria-current="page"]{
    color:#fff;
    background:#000;
  }
  .app-shell-nav :is(.global-menu,.service-nav) a[aria-current="page"]:hover{background:#000}
  .app-shell-nav .nav-actions > :is(a,button){background:transparent;color:#fff;border-color:rgb(255 255 255/.65)}
  .app-shell-nav .nav-actions > :is(a,button):hover{background:rgb(255 255 255/.1);border-color:#fff}
  .app-shell-nav #themeToggle{color:#fff!important}
  .app-shell-nav :is(.brand,.global-menu a,.service-nav a,.nav-actions > a,.nav-actions > button):focus-visible{outline:2px solid #000;outline-offset:2px}
@media(min-width:900px){
  .app-shell-nav{--app-nav-gutter:var(--app-desktop-gutter,34px)}
  html:has(.app-shell-nav){scrollbar-gutter:stable}
}
@media(max-width:899px){
  .app-shell-nav .brand .logo,
  .app-shell-nav .nav-actions > :is(a,button),
  .app-shell-nav .app-account-menu{border-radius:6px}
}

/* Hide scroll indicators in member screens without changing scroll containers,
   touch gestures, sticky headers, or pull-to-refresh behavior. */
html:has(body.mobile-design),
body.mobile-design,
body.mobile-design * {
  scrollbar-width: none !important;
  scrollbar-gutter: auto !important;
}
html:has(body.mobile-design)::-webkit-scrollbar,
body.mobile-design::-webkit-scrollbar,
body.mobile-design *::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
