/* Aureality floating sidebar, top-bar menus and the sites strip: shared by the globe (aureality.cloud), the maps and the app's 3D space.
   Colours come from the site's tokens when present, with the brand values as fallbacks. */
.au-sb, .au-tb {
  --sb-bg: var(--panel, #151920); --sb-alt: var(--alt, #0E1116); --sb-line: var(--line, #262C36);
  --sb-text: var(--text, #F5F7FB); --sb-muted: var(--muted, #A4ADBA); --sb-on: var(--button, #2563EB); --sb-hi: var(--hi, #8DBBFF);
  /* pane fill: nearly solid so text reads cleanly over the bright globe */
  --sb-glass: var(--au-pane, rgba(17, 21, 27, .96));
}
.au-sb {
  --sb-top: calc(var(--ax-top-h, 64px) + 12px + env(safe-area-inset-top, 0px));
  position: fixed; z-index: 15;
  top: var(--sb-top);
  left: max(16px, env(safe-area-inset-left, 0px));
  width: min(300px, calc(100vw - 32px));
  max-height: calc(100% - var(--sb-top) - 16px - env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column;
  background: var(--sb-glass); color: var(--sb-text);
  border: 1px solid var(--sb-line); border-radius: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.03);
  backdrop-filter: blur(14px) saturate(1.1); -webkit-backdrop-filter: blur(14px) saturate(1.1);
  font: 400 14px/1.4 var(--font, "Outfit", system-ui, sans-serif); font-feature-settings: "ss01" 0;
}
.au-sb[data-collapsed="true"] { width: auto; max-height: none; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.au-sb[data-collapsed="true"] .au-sb-body, .au-sb[data-collapsed="true"] .au-sb-title, .au-sb[data-collapsed="true"] .au-sb-foot { display: none; }
.au-sb-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--sb-line); }
.au-sb[data-collapsed="true"] .au-sb-head { padding: 0; border: 0; }
.au-sb-title { flex: 1; margin: 0; font-size: 15px; font-weight: 500; letter-spacing: 0; }
.au-sb-fold {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 8px 12px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-weight: 500; font-size: 14px; line-height: 1; color: var(--sb-text); background: var(--sb-alt); border: 1px solid var(--sb-line);
}
.au-sb-fold:hover { border-color: var(--sb-hi); }
.au-sb-fold svg { width: 16px; height: 16px; }
.au-sb[data-collapsed="true"] .au-sb-fold { background: color-mix(in srgb, var(--sb-bg) 85%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.au-sb-body { overflow: auto; padding: 6px 0 10px; overscroll-behavior: contain; }
.au-sb-group { border-bottom: 1px solid var(--sb-line); }
.au-sb-group:last-child { border-bottom: 0; }
.au-sb-group > summary {
  list-style: none; display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer;
  font-weight: 500; font-size: 14px; letter-spacing: .005em;
}
.au-sb-group > summary::-webkit-details-marker { display: none; }
.au-sb-group > summary::before { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--sb-muted); border-bottom: 1.5px solid var(--sb-muted); transform: rotate(-45deg); transition: transform .15s; flex: none; }
.au-sb-group[open] > summary::before { transform: rotate(45deg); }
.au-sb-count { margin-left: auto; font: 400 11px/1 var(--mono, ui-monospace, monospace); color: var(--sb-hi); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.au-sb-items { list-style: none; margin: 0; padding: 0 8px 8px; }
.au-sb-item { padding: 2px 0; }
.au-sb-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 6px 8px 22px; border-radius: 8px;
  background: none; border: 0; color: var(--sb-text); font: inherit; text-align: left; cursor: pointer;
}
.au-sb-row:hover:not([aria-disabled="true"]) { background: var(--sb-alt); }
.au-sb-row[aria-disabled="true"] { cursor: default; color: var(--sb-muted); }
.au-sb-label { flex: 1; min-width: 0; font-size: 14px; line-height: 1.3; }
.au-sb-label small { display: block; margin-top: 2px; color: var(--sb-muted); font-size: 12.5px; line-height: 1.35; font-weight: 300; letter-spacing: .005em; }
.au-sb-tag { font: 400 10px/1 var(--mono, ui-monospace, monospace); text-transform: uppercase; letter-spacing: .08em; color: var(--sb-muted); border: 1px solid var(--sb-line); border-radius: 999px; padding: 4px 7px; }
.au-sb-switch { position: relative; width: 32px; height: 18px; flex: none; border-radius: 999px; background: var(--sb-line); transition: background .15s; }
.au-sb-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--sb-muted); transition: transform .15s, background .15s; }
.au-sb-row[aria-checked="true"] .au-sb-switch { background: var(--sb-on); }
.au-sb-row[aria-checked="true"] .au-sb-switch::after { transform: translateX(14px); background: #fff; }
.au-sb-detail { padding: 2px 6px 8px 22px; color: var(--sb-muted); font-size: 12px; }
.au-sb-detail:empty { display: none; }
.au-sb-foot { padding: 10px 14px 12px; border-top: 1px solid var(--sb-line); color: var(--sb-muted); font-size: 12px; font-weight: 300; line-height: 1.45; }
.au-sb-foot:empty { display: none; }
.au-sb :focus-visible { outline: 2px solid var(--sb-hi); outline-offset: 2px; }
@media (max-width: 640px) {
  .au-sb:not([data-collapsed="true"]) {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 62%;
    border-radius: 18px 18px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .au-sb[data-collapsed="true"] { top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}
/* ---------- top bar menus (groups with top: true) ---------- */
.au-tb { display: flex; align-items: center; gap: 0; padding: 0; border-radius: 999px; color: var(--sb-text);
  background: none; border: 0;
  font: 400 14px/1.4 var(--font, "Outfit", system-ui, sans-serif); }
.au-tb:empty { display: none; }
.au-tb-menu { position: relative; }
.au-tb-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 8px 12px; border-radius: 999px; border: 0; cursor: pointer;
  background: none; color: color-mix(in srgb, var(--sb-text) 78%, transparent); font: 400 14.5px/1 var(--font, "Outfit", system-ui, sans-serif); white-space: nowrap; }
.au-tb-btn::after { content: ""; width: 5px; height: 5px; border-right: 1.25px solid currentColor; border-bottom: 1.25px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .6; }
.au-tb-btn { text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.au-tb-btn:hover, .au-tb-btn[aria-expanded="true"] { color: var(--sb-text); background: rgba(255,255,255,.07); }
.au-tb-btn .au-sb-count { display: none; }
.au-tb-pop { position: absolute; z-index: 30; top: calc(100% + 10px); left: 0; width: 320px; max-height: min(70vh, 560px); overflow: auto; padding: 6px 0;
  background: var(--sb-glass); border: 1px solid var(--sb-line); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overscroll-behavior: contain; }
.au-tb-pop[hidden] { display: none; }
.au-tb-intro { margin: 6px 14px 8px; color: var(--sb-muted); font-size: 13px; font-weight: 300; line-height: 1.45; }
.au-tb .au-sb-items { padding: 0 6px; }
.au-tb .au-sb-row { padding-left: 10px; }
.au-tb .au-sb-detail { padding-left: 10px; }
.au-sb-link { text-decoration: none; }
.au-sb-go { color: var(--sb-muted); font-size: 15px; }
.au-sb-row:hover .au-sb-go { color: var(--sb-hi); }
.au-sb-note { padding: 6px 10px 8px; color: var(--sb-muted); font-size: 12px; }
.au-tb :focus-visible { outline: 2px solid var(--sb-hi); outline-offset: 2px; }
@media (max-width: 640px) {
  /* no blur or scrolling here: either would trap the fixed menu sheet inside the bar */
  .au-tb { padding: 3px; border-radius: 999px; border: 1px solid var(--sb-line); background: rgba(17, 21, 27, .96); justify-content: space-between; gap: 0; }
  .au-tb-btn { text-shadow: none; }
  .au-tb-pop { backdrop-filter: none; -webkit-backdrop-filter: none; background: #11151B; }
  .au-tb-btn { padding: 7px 9px; gap: 6px; font-size: 13.5px; }
  .au-tb-pop { position: fixed; left: 8px; right: 8px; top: auto; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); width: auto; max-height: 64vh; }
}

/* ---------- fine strip with all Aureality sites (top edge of every site) ---------- */
.au-sites { position: fixed; z-index: 16; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 2px;
  height: calc(28px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px));
  background: rgba(7, 9, 13, .74); border-bottom: 1px solid rgba(38, 44, 54, .85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font: 400 12px/1 var(--font, "Outfit", system-ui, sans-serif); white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.au-sites::-webkit-scrollbar { display: none; }
.au-sites-k { margin-right: 8px; color: var(--muted, #A4ADBA); font: 500 10px/1 var(--mono, ui-monospace, monospace); letter-spacing: .14em; text-transform: uppercase; }
.au-sites a { flex: none; padding: 6px 10px; border-radius: 999px; color: var(--muted, #A4ADBA); text-decoration: none; font: 500 12.5px/1 var(--font, "Outfit", system-ui, sans-serif); letter-spacing: .01em; }
.au-sites a small { margin-left: 6px; font: 400 11px/1 var(--font, "Outfit", system-ui, sans-serif); color: var(--muted, #A4ADBA); opacity: .8; }
/* items read "aureality.cloud  Globe": the full domain is the name, the role is the subtitle */
.au-sites a:hover { color: var(--text, #F5F7FB); background: rgba(255, 255, 255, .06); }
.au-sites a[aria-current="page"] { color: var(--text, #F5F7FB); background: rgba(141, 187, 255, .13); }
.au-sites a[aria-current="page"] small { color: var(--hi, #8DBBFF); opacity: 1; }
.au-sites a:focus-visible { outline: 2px solid var(--hi, #8DBBFF); outline-offset: -2px; }
.au-sites-sep { width: 1px; height: 12px; margin: 0 4px; background: var(--line, #262C36); flex: none; }

@media (prefers-reduced-motion: reduce) { .au-sb-switch, .au-sb-switch::after, .au-sb-group > summary::before { transition: none; } }

/* (i) next to a layer: opens its details and settings in the right pane */
.au-sb-line { display: flex; align-items: center; gap: 2px; }
.au-sb-line > .au-sb-row { flex: 1; min-width: 0; }
.au-sb-info { flex: none; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--sb-muted); cursor: pointer; }
.au-sb-info svg { width: 16px; height: 16px; }
.au-sb-info:hover, .au-sb-info[aria-pressed="true"] { color: var(--sb-hi); background: var(--sb-alt); }
.au-sb-info:focus-visible { outline: 2px solid var(--sb-hi); outline-offset: 1px; }
.au-sb-info svg { opacity: .85; }
@media (pointer: coarse) { .au-sb-info { width: 44px; height: 44px; } }

/* subtrees inside a group, and the "Find a layer" box */
.au-sb-subli { padding: 0; }
.au-sb-sub > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 7px 10px 7px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.au-sb-sub > summary::-webkit-details-marker { display: none; }
.au-sb-sub > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--sb-muted); border-bottom: 1.5px solid var(--sb-muted); transform: rotate(-45deg); transition: transform .15s; flex: none; }
.au-sb-sub[open] > summary::before { transform: rotate(45deg); }
.au-sb-sub > summary:hover { background: var(--sb-alt); }
.au-sb-sub > summary .au-sb-label { font-weight: 500; }
.au-sb-subitems { margin-left: 7px; padding: 0 0 4px 3px; border-left: 1px solid var(--sb-line); }
.au-sb-findwrap { padding: 10px 10px 8px; border-bottom: 1px solid var(--sb-line); }
.au-sb[data-collapsed="true"] .au-sb-findwrap { display: none; }
.au-sb-finding .au-sb-body > :not(.au-sb-group):not(.au-sb-none) { display: none; } /* while filtering, only matching layers */
.au-sb-find { width: 100%; box-sizing: border-box; height: 36px; padding-left: 32px !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238DBBFF' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m16 16 4.5 4.5'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: 9px center !important; background-size: 16px !important; padding: 0 10px; border: 1px solid var(--sb-line); border-radius: 8px; background: var(--sb-alt); color: inherit; font: inherit; font-size: 13px; }
.au-sb-find::placeholder { color: var(--sb-muted); }
.au-sb-find:focus { outline: none; border-color: var(--sb-hi); }
.au-sb-none { margin: 8px 14px; color: var(--sb-muted); font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .au-sb-sub > summary::before { transition: none; } }
