/* ============================================================
   Nursia Clinic — the frame every mini-game is served in.

   Loaded after each game's own stylesheet (scripts/sync-clinic.mjs injects
   it), then followed by that game's theme layer, <slug>.css, which maps the
   game's own colour variables onto the tokens below.

   The rule for the theme layers: menus, panels, buttons, cards and result
   screens wear Nursia. The play surface itself — an ECG monitor, a 3D room,
   a syringe — keeps the look the game needs to be read correctly.
   ============================================================ */

:root {
  /* Same values as the site's @theme in src/app/globals.css. */
  --nc-paper: #fbfaf6;
  --nc-paper-2: #f4f2eb;
  --nc-card: #ffffff;
  --nc-ink: #14161a;
  --nc-ink-2: #3a3d44;
  --nc-muted: #6e6b63;
  --nc-rule: #e3dfd4;
  --nc-teal: #0b6b62;
  --nc-teal-dark: #084f49;
  --nc-highlight: #f5e85c;
  --nc-correct: #157f52;
  --nc-wrong: #b23a2e;

  --nc-font-ui: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --nc-font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --nc-font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --nc-radius: 4px;
  --nc-radius-btn: 3px;
  --nc-shadow: 0 1px 0 rgba(20, 22, 26, 0.04), 0 10px 24px -18px rgba(20, 22, 26, 0.35);

  /* Games that fill the viewport subtract this so the bar never covers play. */
  --nc-bar-h: 48px;
}

body {
  font-family: var(--nc-font-ui);
}
button,
input,
select,
textarea {
  font-family: inherit;
}
::selection {
  background: var(--nc-highlight);
  color: var(--nc-ink);
}

/* --- the bar ------------------------------------------------ */
.nc-bar {
  position: relative;
  z-index: 2147483000;
  box-sizing: border-box;
  height: var(--nc-bar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  background: var(--nc-paper);
  border-bottom: 1px solid var(--nc-rule);
  font-family: var(--nc-font-ui);
  color: var(--nc-ink);
  line-height: 1;
}
.nc-bar a {
  color: inherit;
  text-decoration: none;
}
.nc-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nc-logo img {
  display: block;
  height: 22px;
  width: auto;
}
.nc-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--nc-ink-2);
  padding-left: 12px;
  border-left: 1px solid var(--nc-rule);
}
.nc-back {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--nc-ink);
  border-radius: var(--nc-radius-btn);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.01em;
  transition: background-color 0.16s ease, color 0.16s ease;
}
.nc-back:hover {
  background: var(--nc-ink);
  color: var(--nc-paper);
}
.nc-bar a:focus-visible {
  outline: 2px solid var(--nc-teal);
  outline-offset: 2px;
}
@media (max-width: 420px) {
  .nc-title {
    display: none;
  }
  .nc-bar {
    justify-content: space-between;
  }
}
