/* Aureality floating sidebar: shared by the globe (aureality.info) and the app's 3D space.
   Colours come from the site's tokens when present, with the brand values as fallbacks. */
.au-sb {
  --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);
  --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(--ax-glass, rgba(21, 25, 32, .90)); color: var(--sb-text);
  border: 1px solid var(--sb-line); border-radius: 16px; box-shadow: 0 16px 48px rgba(0,0,0,.45);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font: 400 14px/1.4 var(--font, "Outfit", system-ui, sans-serif);
}
.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: .01em; }
.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: .02em;
}
.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: 500 11px/1 var(--mono, ui-monospace, monospace); color: var(--sb-hi); }
.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; }
.au-sb-label small { display: block; color: var(--sb-muted); font-size: 12px; }
.au-sb-tag { font: 500 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; }
.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)); }
}
@media (prefers-reduced-motion: reduce) { .au-sb-switch, .au-sb-switch::after, .au-sb-group > summary::before { transition: none; } }
