/* как и style.css — без gap у flex и без backdrop-filter */

:root {
  --r-bg: rgba(22, 22, 28, 0.94);
  --r-title-bg: #101015;
  --r-cell: #262633;
  --r-cell-hover: #303040;
  --r-row-hover: var(--accent-soft);
  --r-accent: var(--accent-light);
  --r-accent-strong: var(--accent);
  --r-group: var(--accent-pale);
  --r-sub: var(--accent-dim);
  --r-text: #e9e9f2;
  --r-muted: #8b8ba1;
  --r-danger: #f0597a;

  --r-width: 360px;
  --r-height: 640px;
  --r-row: 21px;
  --r-cell-width: 118px;
}

#retro {
  position: relative;
  display: none; /* показывает render() в app.js */
  flex-direction: column;
  width: var(--r-width);
  height: var(--r-height);
  max-height: calc(100% - 32px);
  background: var(--r-bg);
  border: 1px solid #000;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  font-family: var(--font);
  font-size: 13px;
  color: var(--r-text);
}

.r-title {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  height: 28px;
  padding: 0 10px;
  background: var(--r-title-bg);
  border-bottom: 1px solid #000;
  cursor: move;
}

.r-logo {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-right: 7px;
}

.r-name { flex: 1; font-weight: bold; }
.r-version { color: var(--r-muted); }
/* без вертикальных отступов, чтобы пустая строка не занимала места */
.r-update {
  flex: 0 0 auto;
  padding: 0 10px;
  background: var(--r-title-bg);
  color: var(--r-text);
  font-size: 12px;
  line-height: 20px;
}
.r-update.error { color: var(--r-danger); }

.r-status {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 5px 10px;
  background: var(--r-title-bg);
  border-top: 1px solid #000;
  color: var(--r-muted);
  font-size: 12px;
  line-height: 14px;
}

.r-status.message { color: var(--r-accent); }
.r-status.error { color: var(--r-danger); }

.r-body {
  flex: 1;
  min-height: 0;
  padding: 2px 0 8px;
  overflow-y: auto;
}

.r-body::-webkit-scrollbar { width: 10px; }
.r-body::-webkit-scrollbar-thumb { background: #3a3a4c; border: 2px solid #14141b; }
.r-body::-webkit-scrollbar-track { background: #14141b; border-left: 1px solid #000; }

.r-header {
  padding: 9px 10px 3px;
  color: var(--r-accent);
  font-weight: bold;
}

.r-sub {
  padding: 5px 10px 1px;
  color: var(--r-sub);
  font-size: 12px;
}

.r-note {
  padding: 2px 10px 3px;
  color: var(--r-muted);
  font-size: 12px;
}

.r-row {
  display: flex;
  align-items: center;
  height: var(--r-row);
  padding: 0 8px 0 10px;
}

.r-row:hover { background: var(--r-row-hover); }

.r-d1 { padding-left: 26px; }
.r-d2 { padding-left: 42px; }
.r-d3 { padding-left: 58px; }

.r-label {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.r-row.disabled .r-label { color: var(--r-muted); }
.r-row.disabled .r-cell { color: #5c5c70; cursor: default; }

.r-group .r-label {
  color: var(--r-group);
  cursor: pointer;
}

.r-group.r-d1 .r-label { color: var(--r-sub); }
.r-group.open .r-label { color: #fff; }

.r-box {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 7px;
  border: 1px solid var(--r-accent-strong);
  color: #fff;
  font-size: 11px;
  line-height: 9px;
  text-align: center;
  vertical-align: 0;
}

.r-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--r-cell-width);
  width: var(--r-cell-width);
  height: 17px;
  margin-left: 8px;
  background: var(--r-cell);
  color: #c9c9d6;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}

.r-cell:hover { background: var(--r-cell-hover); }

.r-check.on { color: var(--r-accent); font-weight: bold; }

.r-choice .r-value,
.r-number .r-value {
  flex: 1;
  text-align: center;
  overflow: hidden;
}

.r-number .r-value { cursor: ew-resize; }

.r-arrow {
  flex: 0 0 18px;
  text-align: center;
  color: var(--r-muted);
  font-size: 9px;
}

.r-arrow:hover { color: #fff; }

.r-key.waiting { color: #fff; background: var(--accent-wash); }

.r-button { color: var(--r-accent); }
.r-go { font-size: 10px; }

.r-colors { justify-content: space-around; padding: 0 3px; cursor: default; }
.r-colors:hover { background: var(--r-cell); }

.r-swatch {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.r-swatch.active { border-color: #fff; }

.r-input {
  flex: 1;
  height: 17px;
  padding: 0 6px;
  background: var(--r-cell);
  border: 1px solid #000;
  color: var(--r-text);
  font-family: inherit;
  font-size: 12px;
  outline: none;
}

.r-input:focus { border-color: var(--r-accent-strong); }

.r-accents { justify-content: space-around; padding: 0 6px; cursor: default; }
.r-accents:hover { background: var(--r-cell); }
.r-accent-dot { width: 11px; height: 11px; border-radius: 50%; border: 1px solid transparent; cursor: pointer; }
.r-accent-dot.active { border-color: #fff; }

/* Classic: класс skin-classic ставит renderRetro() */
:root {
  --classic-bg: rgba(0, 0, 0, 0.74);
  --classic-header: #e1c68c;
  --classic-text: #ffffff;
  --classic-muted: #8f8f8f;
}

#retro.skin-classic {
  width: 384px; /* жирный шрифт шире, иначе длинные подписи обрезаются */
  background: var(--classic-bg);
  border: none;
  box-shadow: none;
  font-family: var(--font);
  font-weight: bold;
  color: var(--classic-text);
}

.skin-classic .r-title { height: 40px; padding: 0 16px; background: transparent; border-bottom: none; }
.skin-classic .r-logo { flex-basis: 24px; width: 24px; height: 24px; margin-right: 8px; }
.skin-classic .r-name { font-size: 20px; color: var(--accent-light); }
.skin-classic .r-version { color: var(--classic-muted); }

.skin-classic .r-header { padding: 12px 16px 4px; color: var(--classic-header); font-size: 14px; }
.skin-classic .r-sub { padding-left: 16px; color: #bdbdbd; }
.skin-classic .r-note { color: var(--classic-muted); }

.skin-classic .r-row { height: 23px; padding: 0 16px; }
.skin-classic .r-d1 { padding-left: 32px; }
.skin-classic .r-d2 { padding-left: 48px; }
.skin-classic .r-d3 { padding-left: 64px; }
.skin-classic .r-row:hover { background: transparent; }
.skin-classic .r-row:hover .r-label { color: var(--accent-light); }

.skin-classic .r-group .r-label,
.skin-classic .r-group.r-d1 .r-label { color: var(--classic-text); }
.skin-classic .r-group.open .r-label { color: var(--accent-light); }
.skin-classic .r-box { width: 12px; border: none; color: var(--classic-header); font-size: 14px; }

.skin-classic .r-cell { justify-content: flex-end; background: transparent; color: var(--classic-text); font-size: 13px; }
.skin-classic .r-cell:hover { background: transparent; color: var(--accent-light); }
.skin-classic .r-choice .r-value,
.skin-classic .r-number .r-value { flex: 0 0 auto; padding: 0 3px; }
.skin-classic .r-check.on { color: var(--accent-light); }
.skin-classic .r-arrow { flex: 0 0 12px; color: var(--classic-muted); font-size: 13px; }
.skin-classic .r-button { color: var(--accent-light); }
.skin-classic .r-key.waiting { background: transparent; color: var(--accent-light); }
.skin-classic .r-colors:hover,
.skin-classic .r-accents:hover { background: transparent; }
.skin-classic .r-accent-dot,
.skin-classic .r-swatch { margin-left: 5px; } /* ячейка прижата вправо, без отступа кружки слипаются */
.skin-classic .r-input { background: rgba(255, 255, 255, 0.08); border-color: #444; font-weight: bold; }

.skin-classic .r-status { padding: 6px 16px 10px; background: transparent; border-top: none; color: var(--classic-muted); }
.skin-classic .r-status.message { color: var(--accent-light); }

.skin-classic .r-body::-webkit-scrollbar-thumb { background: #555; border-color: transparent; }
.skin-classic .r-body::-webkit-scrollbar-track { background: transparent; border-left: none; }

.r-plain { cursor: default; }
.r-plain:hover { background: var(--r-cell); }

.r-themes { display: flex; padding-top: 4px; padding-bottom: 6px; padding-right: 8px; }
.r-theme { flex: 1; min-width: 0; margin-right: 8px; cursor: pointer; }
.r-theme:last-child { margin-right: 0; }
.r-theme:hover .tps { border-color: #44445a; }
.r-theme.active .tps { border-color: var(--accent); }
.r-theme-name {
  margin-top: 3px;
  color: var(--r-muted);
  font-size: 11px;
  font-weight: normal;
  text-align: center;
}
.r-theme.active .r-theme-name { color: #fff; }

.skin-classic .r-plain:hover { background: transparent; }
.skin-classic .r-themes { padding-left: 32px; padding-right: 16px; }
