/* base — reset, document defaults, accessibility, backdrop */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html, body { height: 100%; }
  body, h1, h2, h3, h4, p, ul, figure { margin: 0; padding: 0; }
  ul { list-style: none; }
  button { font: inherit; color: inherit; background: none; border: 0; margin: 0; padding: 0; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  button:disabled { cursor: not-allowed; }
  textarea, input { font: inherit; color: inherit; }
  em, i { font-style: normal; }
  svg { display: block; }
  /* important inside an earlier layer outranks every normal rule: nothing can un-hide a [hidden] node */
  [hidden] { display: none !important; }
}

@layer base {
  html { overscroll-behavior: none; }
  body {
    font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--bg);
    overflow: hidden; overscroll-behavior: none; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
  }
  b, strong { font-weight: 800; }
  ::selection { background: rgba(92, 200, 255, .35); }
  .sprite { display: none; }

  :where(button, [href], [tabindex]):focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }
  :where(button, [href], [tabindex]):focus:not(:focus-visible) { outline: none; }

  /* long-press buys continuously, so selection and callouts must not interfere */
  .app { -webkit-user-select: none; user-select: none; }
  .tab, .card, .talent, .capstone, .btn, .icon-btn, .act { touch-action: manipulation; -webkit-touch-callout: none; }

  .muted { color: var(--ink-3); }
  .small { font-size: 12px; }
  .gold { color: var(--dust-ink); }

  .tab-body, .sheet, .modal, .archive-panes, .help-body, .settings-body { scrollbar-width: thin; scrollbar-color: rgba(160, 185, 255, .3) transparent; }

  .space-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
  .backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: var(--bg); }
  .bd-nebula { position: absolute; inset: -6%; background: url("../assets/space-bg.jpg") center / cover no-repeat; opacity: .5; filter: saturate(1.1) brightness(.6); }
  .bd-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 16, 32, .3), rgba(11, 16, 32, .86) 68%, var(--bg)); }
}
