/* 02_base.css - KP Equipment minimal base: box model, page background, house bar, app frame.
 * Uses tokens from 01_tokens.css only; defines no global token. No breakpoints yet (design pass). */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-size: var(--kp-size);
  line-height: 1.45;
  background: var(--bg);
  color: var(--ink);
}

.kp-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 52px;
  padding: 0 var(--sp-4);
  background: var(--kp-bar);
  color: var(--kp-bar-ink);
  box-shadow: var(--kp-bar-shadow);
}

.kp-bar-title { font-weight: 600; }

.app-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--sp-4);
}

:focus-visible { outline: 2px solid transparent; outline-offset: 2px; box-shadow: var(--ring); }

/* T89a: "did not start" card. Shown by 00_bootguard.js (html[data-boot-fail]) when a script fails to load or the
 * start throws; shown by CSS alone after 8 s if the start never finished; always shown inside <noscript>. */
.boot-fail { position: fixed; left: 50%; top: 50%; z-index: 2000; width: min(420px, calc(100vw - 32px)); transform: translate(-50%, -50%);
  padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .28); visibility: hidden; animation: boot-fail-late 0s linear 8s forwards; }
@keyframes boot-fail-late { to { visibility: visible; } }
html[data-boot="ok"] .boot-fail { display: none; }
html[data-boot-fail] .boot-fail, noscript .boot-fail { display: block; visibility: visible; animation: none; }
/* T89b: with JavaScript off the card inside noscript is the only message; the late card must not come up over it after 8 s. */
noscript:has(.boot-fail) ~ .boot-fail { display: none; }
.boot-fail-title { margin: 0 0 6px; font-size: 18px; font-weight: 600; line-height: 1.3; }
.boot-fail-text { margin: 0 0 16px; color: var(--ink-soft); }
.boot-fail-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 999px;
  background: var(--ink); color: var(--surface); font-weight: 600; text-decoration: none; }
@media (forced-colors: active) { .boot-fail { border: 2px solid CanvasText; } .boot-fail-btn { border: 2px solid ButtonText; } }
