/* Shared navigation and universe backdrop. Page styles load before this file. */
html { min-height: 100%; background: #050712; overflow-x: clip; }
body.space-page {
  --bg: #050712; --text: #eef6ff; --muted: #a4b4cd;
  --line: rgba(145, 204, 255, .18); --line-soft: rgba(145, 204, 255, .09);
  --accent: #8ad9ff; --danger: #ff9eb5; --tag: rgba(104, 173, 255, .15);
  color-scheme: dark; margin: 0; padding: 0; max-width: none; min-height: 100svh;
  overflow: visible; background: #050712; color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.space-page .universe.stage {
  position: fixed; inset: 0; width: 100%; height: 100svh; min-height: 0;
  padding: 0; z-index: 0; pointer-events: none;
}
.space-page:not(.space-home) .universe { opacity: .48; }
.space-page > main { position: relative; z-index: 1; }
.space-nav {
  position: relative; z-index: 10; min-height: 72px; width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 12px clamp(18px, 3vw, 48px);
  border-bottom: 1px solid rgba(175, 215, 255, .1);
  background: rgba(5, 7, 18, .64); backdrop-filter: blur(18px);
  font-size: 14px; line-height: 1.4;
}
.space-home .space-nav { position: absolute; top: 0; border: 0; background: transparent; backdrop-filter: none; }
.space-nav__left { display: flex; align-items: center; gap: 24px; min-width: 0; }
.space-nav__brand { color: #eef6ff; font-weight: 650; text-decoration: none; white-space: nowrap; }
.space-nav__account { display: flex; align-items: center; margin-left: auto; gap: 20px; flex-shrink: 0; }
.space-nav__account a { color: #b9c6da; text-decoration: none; padding: 8px 0; white-space: nowrap; }
.space-nav__account a:hover, .space-nav__account a[aria-current] { color: #fff; }
.space-nav a:focus-visible, .quiet-link:focus-visible { outline: 2px solid #8ad9ff; outline-offset: 5px; border-radius: 2px; }
.project-picker { position: relative; display: block; min-width: 0; }
.project-picker::after {
  content: ''; position: absolute; right: 15px; top: 46%; width: 6px; height: 6px;
  border-right: 1px solid #a9c3dd; border-bottom: 1px solid #a9c3dd;
  transform: rotate(45deg); pointer-events: none;
}
.space-page .project-picker select {
  appearance: none; display: block; width: 200px; max-width: 100%; min-height: 40px;
  padding: 10px 36px 10px 14px; margin: 0; border-radius: 8px;
  border: 1px solid rgba(175, 215, 255, .18); background: rgba(13, 22, 43, .6);
  color: #dceafb; font: 400 14px/1.4 Inter, ui-sans-serif, system-ui, sans-serif;
  cursor: pointer; box-shadow: none; text-transform: none; letter-spacing: normal;
}
.space-page .project-picker select:hover { border-color: rgba(175, 215, 255, .42); }
.space-page .project-picker select:focus-visible { outline: 2px solid #8ad9ff; outline-offset: 3px; }
.space-page .project-picker option { color: #eef6ff; background: #101a2e; }
.project-picker--hero { width: min(290px, 78vw); margin: 38px auto 0; }
.space-page .project-picker--hero select { width: 100%; min-height: 50px; padding-left: 20px; border-radius: 10px; background: rgba(8, 17, 36, .46); backdrop-filter: blur(16px); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.home-stage { min-height: 100svh; display: grid; place-items: center; padding: 80px 16px 36px; }
.space-home .hero { min-height: 65svh; padding: 40px 0; }
.space-home .hero h1 { padding-bottom: .14em; }
.page-center { min-height: calc(100svh - 72px); display: grid; place-items: center; padding: 40px 20px 70px; }
.glass-panel { border: 1px solid var(--line); border-radius: 18px; background: rgba(8, 15, 32, .78); backdrop-filter: blur(18px); box-shadow: 0 24px 90px rgba(0, 0, 0, .22); }
.account-panel { width: min(100%, 460px); padding: 40px; text-align: center; }
.space-page .page-title { max-width: none; margin: 0 0 12px; padding: 0; font-size: clamp(26px, 4vw, 36px); line-height: 1.2; font-weight: 600; letter-spacing: -.02em; color: #eef6ff; background: none; text-shadow: none; }
.account-panel p { color: var(--muted); overflow-wrap: anywhere; line-height: 1.6; }
.account-panel .project-picker--hero { margin-top: 28px; width: 100%; }
.account-panel .secondary-button { margin-top: 18px; }
.account-actions { margin-top: 24px; }
.account-actions:empty { display: none; }
.quiet-link { color: #a9cbe8; font-size: 14px; text-underline-offset: 4px; }
.space-page .admin-shell { margin: 0 auto; padding: 36px 0 60px; }
.space-page .admin-title h1 { font-size: 36px; line-height: 1.2; max-width: none; }
.space-page .admin-shell .panel { background: rgba(8, 15, 32, .8); border-radius: 14px; box-shadow: none; }
.space-page .admin-shell select option { color: #eef6ff; background: #101a2e; }
.research-page .app { padding: 28px clamp(16px, 3vw, 48px) 40px; }
.research-page .page-title { margin-bottom: 24px; font-size: 28px; }
.research-page .toolbar, .research-page .table-wrap, .research-page .form-panel { background: rgba(8, 15, 32, .84); backdrop-filter: blur(18px); border-color: var(--line); }
.research-page input, .research-page select, .research-page textarea, .research-page button { background: rgba(21, 34, 56, .78); color: var(--text); }
.research-page input::placeholder, .research-page textarea::placeholder { color: #8596b0; opacity: 1; }
.research-page input:focus, .research-page select:focus, .research-page textarea:focus { outline: 1px solid var(--accent); background: #14213a; }
.research-page thead th { background: #111c31; }
.research-page tbody tr:hover { background: rgba(111, 174, 255, .06); }
.research-page td input, .research-page td select, .research-page td textarea { background: transparent; }
.research-page button.primary { background: #235483; border-color: #5c9fc7; }
.research-page .tag { color: #b6d8ff; }
.research-page .table-wrap { max-height: calc(100svh - 290px); min-height: 120px; }
.space-page.converter-page .converter { width: min(740px, calc(100% - 32px)); margin: 52px auto 64px; padding: clamp(22px, 4vw, 40px); line-height: 1.6; }
.space-page.dereverb-page {
  --panel: rgba(8, 15, 32, .84); --panel-2: rgba(21, 34, 56, .78);
  --border: var(--line); --accent-2: #6c8dda;
}
.dereverb-page main { position: relative; z-index: 1; }
.dereverb-page .page-title { margin-bottom: 4px; font-size: 28px; }
.dereverb-page .panel { backdrop-filter: blur(18px); }
.converter-page #drop-zone { background: rgba(22, 42, 68, .4); padding: 48px 20px; border: 1px dashed rgba(138, 217, 255, .38); }
.converter-page #drop-zone:hover, .converter-page #drop-zone:focus-visible { border-color: #8ad9ff; outline-offset: 4px; }
.converter-page p.sub { color: #b3c2d7; opacity: 1; margin-bottom: 28px; }
.converter-page footer { color: #a4b4cd; opacity: 1; }
.converter-page .row .actions { margin: 0; gap: 10px; }
@media (max-width: 640px) {
  .space-nav { min-height: 64px; padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
  .space-nav__left { gap: 12px; flex: 1; flex-wrap: wrap; }
  .space-nav__brand { font-size: 13px; }
  .space-nav__account { gap: 14px; font-size: 13px; }
  .space-page:not(.space-home) .space-nav__left .project-picker { order: 2; flex-basis: 100%; }
  .space-page:not(.space-home) .space-nav__left .project-picker select { width: 100%; }
  .space-page:not(.space-home) .space-nav__account { align-self: flex-start; }
  .account-panel { padding: 28px 22px; }
  .project-picker--hero { margin-top: 26px; }
  .research-page .table-wrap { max-height: 65svh; }
  .space-page.converter-page .converter { margin-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .space-page .universe *, .space-page .universe::before, .space-page .hero::before { animation: none !important; }
}
