@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/golos-text-latin-400-normal.woff2")
    format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/golos-text-latin-500-normal.woff2")
    format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/golos-text-latin-600-normal.woff2")
    format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/golos-text-latin-700-normal.woff2")
    format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/golos-text-cyrillic-400-normal.woff2")
    format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/golos-text-cyrillic-500-normal.woff2")
    format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/golos-text-cyrillic-600-normal.woff2")
    format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/golos-text-cyrillic-700-normal.woff2")
    format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

.er-button,
.er-field,
.er-toggle,
.er-badge,
.er-navigation,
.er-navigation-tabs {
  box-sizing: border-box;
  font-family: var(--er-font-family, sans-serif);
  font-size: 14px;
  line-height: 1.4;
}

.er-button {
  --er-button-height: 36px;
  display: inline-flex;
  position: relative;
  align-items: center;
  justify-content: center;
  min-height: var(--er-button-height);
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--er-accent);
  color: var(--er-text);
  font-weight: 600;
  cursor: pointer;
  vertical-align: middle;
}

.er-button--md {
  --er-button-height: 48px;
}
.er-button--neutral {
  background: var(--er-hover);
}
.er-button--danger {
  background: var(--er-danger-bg);
  color: var(--er-danger);
}
.er-button--ghost {
  background: transparent;
}
.er-button--ghost.er-button--primary {
  color: var(--er-focus);
}
.er-button--ghost.er-button--neutral {
  color: var(--er-muted);
}
.er-button:not(:disabled):hover {
  background: var(--er-accent-hover);
}
.er-button:not(:disabled):active {
  background: var(--er-accent-pressed);
}
.er-button--neutral:not(:disabled):hover {
  background: var(--er-border);
}
.er-button--neutral:not(:disabled):active {
  background: var(--er-inset);
}
.er-button--danger:not(:disabled):hover {
  background: color-mix(in srgb, var(--er-danger-bg), var(--er-danger) 12%);
}
.er-button--danger:not(:disabled):active {
  background: color-mix(in srgb, var(--er-danger-bg), var(--er-danger) 20%);
}
.er-button--ghost.er-button--neutral:not(:disabled):hover {
  background: var(--er-hover);
}
.er-button--ghost.er-button--primary:not(:disabled):hover {
  background: color-mix(in srgb, var(--er-accent) 20%, transparent);
}
.er-button--ghost.er-button--primary:not(:disabled):active {
  background: color-mix(in srgb, var(--er-accent) 30%, transparent);
}
.er-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}
.er-button[data-loading] {
  cursor: wait;
  opacity: 0.8;
}
.er-button[data-icon-only] {
  width: var(--er-button-height);
  padding: 0;
  flex: 0 0 var(--er-button-height);
}
.er-button[data-full-width] {
  width: 100%;
}
.er-button[data-align="start"] {
  justify-content: flex-start;
}
.er-button__content {
  display: inline-flex;
  align-items: center;
  justify-content: inherit;
  gap: 8px;
}
.er-button__leading {
  display: inline-flex;
  position: relative;
  align-items: center;
  justify-content: center;
  flex: none;
}
.er-button__visual {
  display: inline-flex;
}
.er-button__visual > svg {
  display: block;
  width: 16px;
  height: 16px;
}
.er-button__visual > img {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
.er-button--md .er-button__visual > img {
  width: 32px;
  height: 32px;
}
.er-button[data-loading] .er-button__visual {
  visibility: hidden;
}
.er-button__spinner {
  position: absolute;
  right: 2px;
  top: calc(50% - 6px);
  width: 12px;
  height: 12px;
  animation: er-spin 0.8s linear infinite;
}
.er-button__leading .er-button__spinner {
  left: calc(50% - 8px);
  right: auto;
  top: calc(50% - 8px);
  width: 16px;
  height: 16px;
}
.er-button[data-icon-only] .er-button__spinner {
  left: calc(50% - 8px);
  right: auto;
  top: calc(50% - 8px);
  width: 16px;
  height: 16px;
}

.er-button:focus-visible,
.er-navigation__item:focus-visible,
.er-navigation__panel:focus-visible {
  outline: 2px solid var(--er-focus);
  outline-offset: 2px;
}

.er-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 6px;
  color: var(--er-text);
}
.er-field__label {
  color: var(--er-muted);
}
.er-field__control {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  box-sizing: border-box;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--er-border);
  border-radius: 999px;
  background: var(--er-inset);
}
.er-field__control:focus-within {
  border-color: var(--er-focus);
  outline: 1px solid var(--er-focus);
}
.er-field__control--search {
  min-height: 60px;
  padding: 0 12px 0 20px;
}
.er-field__control--textarea {
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
}
.er-field__input {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
}
.er-field__input::placeholder {
  color: var(--er-muted);
  opacity: 1;
}
input.er-field__input {
  align-self: stretch;
}
textarea.er-field__input {
  resize: vertical;
  min-height: 4.2em;
}
.er-field__input::-webkit-search-cancel-button {
  display: none;
}
.er-field__leading {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  color: var(--er-muted);
}
.er-field__leading > svg {
  width: 16px;
  height: 16px;
}
.er-field__message {
  font-size: 12px;
  color: var(--er-muted);
}
.er-field[data-invalid] .er-field__control {
  border-color: var(--er-danger);
}
.er-field[data-invalid] .er-field__message {
  color: var(--er-danger);
}
.er-field[data-disabled] {
  opacity: 0.4;
}
.er-field[data-disabled] .er-field__input {
  cursor: not-allowed;
}

.er-toggle {
  display: inline-flex;
  position: relative;
  align-items: center;
  gap: 8px;
  color: var(--er-text);
  cursor: pointer;
}
.er-toggle__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  opacity: 0;
}
.er-toggle__control {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  border: 1px solid var(--er-muted);
  border-radius: 5px;
  background: var(--er-inset);
}
.er-toggle__control > svg {
  visibility: hidden;
}
.er-toggle__input:checked + .er-toggle__control {
  background: var(--er-accent);
  border-color: var(--er-accent);
}
.er-toggle__input:checked + .er-toggle__control > svg {
  visibility: visible;
}
.er-toggle__input:focus-visible + .er-toggle__control {
  outline: 2px solid var(--er-focus);
  outline-offset: 2px;
}
.er-toggle--switch .er-toggle__control {
  width: 36px;
  border-radius: 999px;
  justify-content: flex-start;
  padding: 2px;
}
.er-toggle--switch .er-toggle__control::after {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--er-text);
}
.er-toggle--switch .er-toggle__input:checked + .er-toggle__control::after {
  transform: translateX(16px);
}
.er-toggle[data-disabled] {
  cursor: not-allowed;
  opacity: 0.4;
}

.er-badge {
  display: inline-flex;
  vertical-align: middle;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 18px;
  color: var(--er-muted);
  background: var(--er-inset);
}
.er-badge--info {
  color: var(--er-focus);
  background: color-mix(in srgb, var(--er-accent) 24%, var(--er-surface));
}
.er-badge--success {
  color: var(--er-success);
  background: var(--er-success-bg);
}
.er-badge--warning {
  color: var(--er-warning);
  background: var(--er-warning-bg);
}
.er-badge--danger {
  color: var(--er-danger);
  background: var(--er-danger-bg);
}
.er-badge__leading {
  display: inline-flex;
}
.er-badge__leading > svg {
  width: 12px;
  height: 12px;
}

.er-navigation {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  padding: 3px;
  border: 1px solid var(--er-border);
  border-radius: 999px;
  background: var(--er-surface);
}
.er-navigation__item {
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--er-muted);
  font: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.er-navigation__item:hover {
  background: var(--er-hover);
  color: var(--er-text);
}
.er-navigation__item[aria-current="page"],
.er-navigation__item[aria-selected="true"] {
  background: var(--er-accent);
  color: var(--er-text);
  font-weight: 600;
}
.er-navigation-tabs {
  color: var(--er-text);
}
.er-navigation__panel {
  margin-top: 16px;
  border-radius: 12px;
}

@keyframes er-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .er-button__spinner {
    animation: none;
  }
}

.er-card,
.er-brand,
.er-header,
.er-dialog,
.er-toast,
.er-tooltip {
  box-sizing: border-box;
  font-family: var(--er-font-family, "Golos Text", sans-serif);
  color: var(--er-text, #ededed);
}
.er-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 20px;
  background: var(--er-surface, #222);
  border: 1px solid var(--er-border, #3b3b3b);
  border-radius: 24px;
}
.er-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.er-card__main {
  min-width: 0;
  display: grid;
  gap: 12px;
}
.er-card__title {
  font-size: 16px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.er-card__content {
  min-width: 0;
  overflow-wrap: anywhere;
}
.er-card__meta {
  color: var(--er-muted, #aaa);
  font-size: 13px;
}
.er-card__actions {
  display: flex;
  align-items: flex-start;
  margin-left: auto;
  flex-shrink: 0;
  gap: 4px;
  position: relative;
  z-index: 2;
}
.er-card__link {
  color: inherit;
  text-decoration: none;
}
.er-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  z-index: 1;
}
.er-card__link--standalone {
  position: absolute;
  inset: 0;
}
.er-card__content :is(a, button, input, select, textarea) {
  position: relative;
  z-index: 2;
}
.er-card:has(.er-card__link:hover) {
  background: var(--er-inset, #282828);
}
.er-card__link:focus-visible {
  outline: none;
}
.er-card__link:focus-visible::after {
  outline: 2px solid var(--er-focus, #a7c0ff);
  outline-offset: 3px;
  border-radius: 24px;
}
.er-card[data-selected] {
  border-color: var(--er-accent, #426dcf);
}
.er-card--row {
  display: flex;
  align-items: center;
}
.er-card--row .er-card__main {
  flex: 1;
}
.er-card--row :is(.er-card__meta, .er-card__actions) {
  flex-shrink: 0;
}
.er-card--row .er-card__meta {
  grid-column: auto;
}
.er-card--row .er-card__actions {
  grid-column: -2;
  grid-row: 1;
  align-items: center;
}
.er-brand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--er-border, #3b3b3b);
  background: var(--er-surface, #222);
  text-decoration: none;
}
.er-brand__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--er-accent, #426dcf);
  font-size: 12px;
  font-weight: 700;
}
.er-brand__logo > :is(img, svg) {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.er-brand__name {
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
}
.er-brand__version {
  align-self: center;
  position: relative;
  top: 3px;
  color: var(--er-muted, #aaa);
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
}
.er-brand:focus-visible {
  outline: 2px solid var(--er-focus, #a7c0ff);
  outline-offset: 3px;
}
a.er-brand:hover {
  background: var(--er-inset, #282828);
}
.er-header {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  width: 100%;
}
.er-header__navigation {
  min-width: 0;
}
.er-header__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}
.er-dialog {
  max-width: min(480px, calc(100vw - 32px));
  width: 480px;
  max-height: calc(100dvh - 48px);
  padding: 0;
  overflow: visible;
  border: 1px solid var(--er-border, #3b3b3b);
  border-radius: 24px;
  background: var(--er-surface, #222);
}
.er-dialog::backdrop {
  background: rgb(0 0 0 / 64%);
}
.er-dialog__surface {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 50px);
  border-radius: inherit;
  overflow: hidden;
}
.er-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 12px 24px;
  flex-shrink: 0;
}
.er-dialog__header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.er-dialog__content {
  overflow-y: auto;
  min-height: 0;
  padding: 4px 24px 24px;
  overscroll-behavior: contain;
}
.er-dialog__footer {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding: 0 24px 24px;
}
.er-toast,
.er-tooltip {
  position: fixed;
  margin: 0;
  border: 1px solid var(--er-border, #3b3b3b);
  background: var(--er-surface, #222);
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 8px 32px rgb(0 0 0 / 20%);
}
.er-toast {
  inset: 24px auto auto 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  border-radius: 999px;
  padding: 12px 20px;
  z-index: 1001;
  pointer-events: none;
}
.er-toast[data-tone="success"] {
  color: var(--er-success, #a3d3be);
  background: var(--er-success-bg, #203f32);
}
.er-toast[data-tone="error"] {
  color: var(--er-danger, #ffabb5);
  background: var(--er-danger-bg, #452a31);
}
.er-tooltip {
  inset: auto;
  max-width: min(320px, calc(100vw - 16px));
  padding: 8px 12px;
  border-radius: 12px;
  z-index: 1002;
  overflow-wrap: anywhere;
  user-select: text;
}
.er-toast::backdrop,
.er-tooltip::backdrop {
  background: transparent;
  pointer-events: none;
}


:root {
  --er-font-family: "Golos Text", system-ui, sans-serif;
  --er-bg: #161616;
  --er-surface: #222222;
  --er-inset: #282828;
  --er-hover: #303030;
  --er-pressed: #383838;
  --er-border: #3b3b3b;
  --er-border-control: #777777;
  --er-text: #ededed;
  --er-muted: #aaaaaa;
  --er-disabled-text: #767676;
  --er-accent: #426dcf;
  --er-accent-hover: #466fd2;
  --er-accent-pressed: #345bb4;
  --er-focus: #a7c0ff;
  --er-on-accent: #ffffff;
  --er-success: #a3d3be;
  --er-success-bg: #203f32;
  --er-warning: #e8c78a;
  --er-warning-bg: #403722;
  --er-danger: #ffabb5;
  --er-danger-bg: #452a31;
  --er-danger-hover: #57303b;
  --er-info: #a7c0ff;
  --er-info-bg: #25334d;
  --er-overlay: rgb(0 0 0 / 64%);
}

/* Тема ограничена контейнером: подключение библиотеки не меняет чужую страницу. */
.er-theme {
  color-scheme: dark;
  background: var(--er-bg);
  color: var(--er-text);
  font-family: var(--er-font-family);
  font-size: 14px;
  line-height: 1.5;
}

[class^="er-"],
[class*=" er-"] {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
  [class^="er-"],
  [class*=" er-"] {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
