/* Full-height navigation with world and account menus. */
.logo-picker { min-width: 0; padding: 0; margin: 28px 0 0; border: 0; }
.logo-picker-title { display: block; margin-top: 8px; font-size: 1.5rem; font-weight: 700; }
.logo-background-picker { border: 0; padding: 0; margin: 20px 0 24px; min-width: 0; }
.logo-background-picker legend { font-weight: 700; font-size: 1rem; }
.logo-background-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }
@media (max-width: 600px) { .logo-background-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
.logo-background-option { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font-size: 12px; text-align: center; cursor: pointer; }
.logo-background-option input { position: absolute; top: 7px; left: 7px; margin: 0; width: 14px; height: 14px; }
.logo-background-option:has(input:checked) { outline: 2px solid var(--accent); outline-offset: 2px; }
.logo-background-option:has(input:focus-visible) { outline: 3px solid var(--text); outline-offset: 3px; }
.logo-surface { display: block; box-sizing: border-box; aspect-ratio: 1; border-radius: 4px; overflow: hidden; }
.logo-surface > img { box-sizing: border-box; padding: 0; }
.logo-surface[data-logo-background="custom"] { background: var(--logo-custom-background, #f7f0dd); }
.logo-custom-color { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.logo-custom-color[hidden] { display: none; }
.logo-custom-color input[type="color"] { width: 52px; height: 42px; padding: 3px; cursor: pointer; }
.logo-custom-color input[type="text"] { width: 120px; font-family: monospace; }
.logo-surface[data-logo-background="ivory"] { background: #f7f0dd; }
.logo-surface[data-logo-background="sand"] { background: #d9b981; }
.logo-surface[data-logo-background="navy"] { background: #12263b; }
.logo-surface[data-logo-background="charcoal"] { background: #252a2e; }
.logo-surface[data-logo-background="burned-paper"] { background: #e6c58b url('/static/themes/frontier-parchment.webp') center / 100% 100%; }
.logo-surface[data-logo-background="linen"] { background: repeating-linear-gradient(0deg,#9a85681c 0 1px,transparent 1px 3px), repeating-linear-gradient(90deg,#fff4da88 0 1px,transparent 1px 3px), #e9ddc5; }
.logo-surface[data-logo-background="wood"] { background: #3c2818 url('/static/themes/frontier-wood.webp') center / cover; }
.logo-surface[data-logo-background="console"] { background: #062d35 url('/static/themes/orbital-grid.svg') center / cover; }
.logo-background-swatch.logo-surface { width: 52px; height: 52px; border: 1px solid #8885; }
.logo-background-swatch[data-logo-background="none"] { background: repeating-conic-gradient(#8883 0% 25%,transparent 0% 50%) 0 / 12px 12px; }
.logo-option .logo-surface { width: 110px; height: 110px; }
.logo-option .logo-surface img { width: 100%; height: 100%; }
.sidebar-logo .logo-surface { width: 100%; max-width: 180px; }
.logo-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 12px; margin-top: 16px; }
.logo-option { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; text-align: center; background: var(--card); }
.logo-option input { position: absolute; top: 10px; left: 10px; width: 16px; height: 16px; margin: 0; }
.logo-option img { width: 110px; height: 110px; object-fit: contain; }
.logo-option strong { font-size: 14px; line-height: 1.4; }
.logo-option small { color: var(--muted); font-size: 12px; }
.logo-option:has(input:checked) { outline: 2px solid var(--accent); outline-offset: 2px; }
.logo-option:has(input:focus-visible) { outline: 3px solid var(--text); outline-offset: 3px; }
@media (max-width: 400px) { .logo-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .logo-option { padding: 14px 8px; } .logo-option .logo-surface { width: 90px; height: 90px; } }
:root { --appbar-height: 0px; }
body { padding-top: 0; }
#appShell { height: 100dvh; min-height: 0; max-height: 100dvh; }
#appShell > .main { margin-top: 0; min-height: 0; }
.shell > .nav { overflow-y: auto; scrollbar-width: thin; }
.shell > .nav > * { flex-shrink: 0; }
.sidebar-logo { display: flex; align-self: stretch; justify-content: center; flex-shrink: 0; border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.brand-logo-image { display: block; width: 100%; max-width: 180px; height: auto; aspect-ratio: 1; object-fit: contain; }
.nav-section-heading { display: flex; align-items: center; justify-content: space-between; align-self: stretch; gap: 8px; border-top: 1px solid var(--line); margin-top: 12px; padding: 12px 0 6px; }
.nav-section-heading .nav-section-label { margin: 0; padding: 0 10px; }
.nav-section-heading .nav-hamburger { align-self: center; margin: 0; }
.sidebar-account { margin-top: auto; padding-top: 20px; align-self: stretch; }
.nav-menu-dropdown { position: relative; min-width: 0; align-self: stretch; }
.nav-menu-dropdown > summary {
  display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
  border: 1px solid var(--line); border-radius: 8px; padding: 8px; min-height: 48px;
}
.nav-menu-dropdown > summary::-webkit-details-marker { display: none; }
.nav-menu-dropdown > summary:hover, .nav-menu-dropdown[open] > summary { background: #8882; }
.nav-menu-dropdown > summary > svg { flex-shrink: 0; }
.nav-menu-world-copy { display: grid; gap: 2px; min-width: 0; flex: 1; }
.nav-menu-world-copy > span { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.nav-menu-world-copy > strong { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-menu-dropdown-panel {
  position: fixed; z-index: 10200; left: 8px; top: 8px;
  width: 290px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px);
  overflow-y: auto; padding: 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg2); color: var(--text); box-shadow: var(--shadow);
}
.nav-menu-field-label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.nav-menu-dropdown-panel .world-select { width: 100%; margin: 0 0 10px; }
.nav-menu-link {
  display: block; width: 100%; padding: 11px 12px; border: 0; border-radius: 6px;
  text-align: left; background: transparent; color: inherit; font: inherit; font-size: 14px; cursor: pointer;
}
.nav-menu-link:hover, .nav-menu-link[aria-current="page"] { background: var(--card2); }
.nav-menu-profile-name { font-weight: 700; overflow-wrap: anywhere; padding: 8px 12px 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.profile-menu-panel { width: 240px; }
.nav-menu-avatar { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; object-fit: cover; background: #8882; }
.nav-menu-profile-copy { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
body[data-world-theme="western"] .nav-menu-dropdown-panel { --text:#352317; --muted:#674c32; --line:#967044; --card2:#ceb080; color:var(--text); }
body[data-world-theme="scifi"] .nav-menu-dropdown-panel { border-radius: 0; background: var(--console-corners), var(--bg2); }
.mobile-nav-launcher { display: none; }
@media (min-width: 1101px) {
  #appShell > .nav { height: 100dvh; }
  .native-map-shell .brand-logo-image { max-width: 48px; }
  .native-map-shell .sidebar-logo .logo-surface { max-width: 48px; }
  .nav-collapsed .brand-logo-image { max-width: 36px; }
  .nav-collapsed .sidebar-logo .logo-surface { max-width: 36px; }
  :is(.nav-collapsed,.native-map-shell) .nav-menu-world-copy,
  :is(.nav-collapsed,.native-map-shell) .nav-menu-profile-copy,
  :is(.nav-collapsed,.native-map-shell) .nav-menu-chevron { display: none; }
  :is(.nav-collapsed,.native-map-shell) .nav-menu-dropdown > summary { justify-content: center; padding: 4px 0; border-color: transparent; }
  :is(.nav-collapsed,.native-map-shell) .nav-section-heading { justify-content: center; }
  :is(.nav-collapsed,.native-map-shell) .nav-section-label { display: none; }
}
@media (max-width: 1100px) {
  .mobile-nav-launcher { display: flex; align-items: center; gap: 8px; position: fixed; bottom: 14px; left: 12px; z-index: 10000; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); color: var(--text); font: inherit; box-shadow: var(--shadow); cursor: pointer; }
  .mobile-nav-open .mobile-nav-launcher { visibility: hidden; }
  .mobile-nav-open .shell > .nav { top: 0; align-items: stretch; }
  .mobile-nav-scrim:not([hidden]) { top: 0; height: 100dvh; }
  .mobile-nav-open .nav .nav-label { width: auto; }
  .mobile-nav-open .nav .nav-section-label { height: auto; opacity: 1; padding: 0 10px; }
  body.play-keyboard-open #appShell, body:has(.composer textarea:focus) #appShell { max-height: var(--play-viewport-height,100dvh); }
}
