* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scrollbar-color: var(--color-border-strong) var(--color-bg-canvas);
}
html::-webkit-scrollbar { width: 12px; }
html::-webkit-scrollbar-track { background: var(--color-bg-canvas); }
html::-webkit-scrollbar-thumb {
  min-height: 48px;
  background: var(--color-border-strong);
  border: 3px solid var(--color-bg-canvas);
  border-radius: var(--radius-pill);
}
html::-webkit-scrollbar-thumb:hover { background: var(--color-text-secondary); }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: var(--font-size);
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
  /* `hidden` also turns body into a vertical scroll container (`hidden auto`).
     That can trap physical wheel input while the real page scroller is html. */
  overflow-x: clip;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; font-size: inherit; }
input, textarea, select {
  font-family: inherit; font-size: inherit;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; width: 100%; outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.2); }
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}
label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 4px; font-weight: 500; }
.field { margin-bottom: 14px; }

.skip-link {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 1000;
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-inverse);
  background: var(--color-accent-active);
  border-radius: var(--radius-md);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* M2.6.2 — Platform Layout Service (CardEditor.renderForm(), FieldDefinition.group): несколько
   полей с одинаковым group рендерятся в одну строку вместо стопки полноширинных .field. */
.field-group { display: flex; gap: 8px; }
.field-group .field { flex: 1; margin-bottom: 14px; min-width: 0; }
