/* Общие стили: кабинет и комната */
:root {
  --bg: #f4f5f2;
  --surface: #ffffff;
  --ink: #17201c;
  --muted: #5d6963;
  --line: #dde2dd;
  --accent: #1f6f5c;
  --accent-ink: #ffffff;
  --rec: #d23a2f;
  --warn: #b7791f;
  --ok: #2f855a;
  --stage: #0f1513;
  --stage-2: #1a2320;
  --stage-ink: #e8eeea;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111614; --surface: #19201d; --ink: #e6ece8; --muted: #9aa69f; --line: #2b3531;
    --accent: #4fb397; --accent-ink: #0d1411; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
/* без приближения страницы двойным тапом (Safari на iPhone) */
html, body, button, a, input, select, textarea, label { touch-action: manipulation; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }

.btn { border: 0; border-radius: var(--r); padding: 11px 18px; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--rec); color: #fff; }

label.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 11px 13px; color: var(--ink); }
.input:focus { border-color: var(--accent); outline: none; }
.error { color: var(--rec); font-size: 14px; min-height: 1.4em; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--muted); white-space: nowrap; }
.tag.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.tag.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.tag.bad { background: color-mix(in srgb, var(--rec) 15%, transparent); color: var(--rec); }

.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rec); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }
