/* Оценщик — общий стиль: тёмный серый минимализм, светлая тема по системной настройке */
:root {
  --bg: #18181b; --panel: #222226; --line: #34343a; --fg: #ececf0; --muted: #9a9aa4;
  --accent: #8b8bf0; --good: #4cc27c; --bad: #e66b6b; --chip: #2c2c31;
  --font-d: "Manrope", "Inter", system-ui, sans-serif;
  --font-b: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f1f1f3; --panel: #ffffff; --line: #d9d9de; --fg: #1d1d22; --muted: #6c6c76;
    --accent: #5b5bd6; --good: #2f9e5b; --bad: #d14b4b; --chip: #e7e7eb; color-scheme: light; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--fg); font: 15px/1.45 var(--font-b);
  padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left));
}
.wrap { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.wide-wrap { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
h1 { font: 800 20px var(--font-d); margin: 0; letter-spacing: -0.01em; }
h2 { font: 800 18px var(--font-d); margin: 0; }
.count { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); }
.bar { height: 4px; background: var(--chip); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.card { background: #000; border-radius: 22px; overflow: hidden; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; max-width: 100%; }
.card.r16-9 { aspect-ratio: 16 / 9; }
.card.r9-16 { aspect-ratio: 9 / 16; max-height: 62vh; margin: 0 auto; }
.card.r1-1 { aspect-ratio: 1 / 1; }
.card video, .card img { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.meta span { background: var(--chip); padding: 3px 9px; border-radius: 999px; }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
@media (max-width: 460px) { .scale { grid-template-columns: repeat(5, 1fr); } }
.scale button { font: 700 18px var(--font-d); height: 46px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel); color: var(--fg); cursor: pointer; font-variant-numeric: tabular-nums; }
.scale button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.scale-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: -6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { border: 1px solid var(--line); background: var(--chip); color: var(--fg); border-radius: 999px;
  padding: 7px 12px; font: 500 14px var(--font-b); cursor: pointer; }
.chips button.on.pos { background: color-mix(in srgb, var(--good) 22%, var(--chip)); border-color: var(--good); }
.chips button.on.neg { background: color-mix(in srgb, var(--bad) 22%, var(--chip)); border-color: var(--bad); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.btn { border: 1px solid var(--line); background: var(--panel); color: var(--fg); border-radius: 12px;
  padding: 11px 16px; font: 600 15px var(--font-b); cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; flex: 1; }
.btn:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=text], input[type=password], textarea { width: 100%; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel); color: var(--fg); padding: 11px 12px; font: 15px/1.4 var(--font-b); }
textarea { min-height: 84px; resize: vertical; }
.boxed { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.comment-saved { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px;
  display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; }
.comment-saved p { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.link { background: none; border: 0; color: var(--accent); font: 600 14px var(--font-b); cursor: pointer; padding: 0; }
.nums { display: flex; gap: 18px; flex-wrap: wrap; font: 800 26px var(--font-d); font-variant-numeric: tabular-nums; }
.nums small { display: block; font: 500 12px var(--font-b); color: var(--muted); }
.diff-ok { color: var(--good); } .diff-bad { color: var(--bad); }
.nav { display: flex; gap: 10px; } .nav .btn { flex: 1; }
.state { text-align: center; color: var(--muted); padding: 40px 10px; }
.err { color: var(--bad); font-size: 13px; }
.boring-show { font-size: 14px; color: var(--bad); font-variant-numeric: tabular-nums; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.thumb { width: 120px; border-radius: 8px; background: #000; display: block; }
/* страница оценки: основная колонка + подсказка по шкале */
.layout { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.layout .main { width: 100%; }
.legend { color: var(--muted); font-size: 13px; line-height: 1.45; min-width: 0; }
.legend summary { cursor: pointer; font-weight: 600; color: var(--muted); padding: 6px 0; }
.legend-scale { list-style: none; margin: 8px 0 14px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.legend-scale li { display: grid; grid-template-columns: 26px 1fr; gap: 6px; }
.legend-scale b { font: 700 14px var(--font-d); color: var(--fg); opacity: .7; font-variant-numeric: tabular-nums; }
.legend-look ul { margin: 6px 0 0; padding-left: 16px; display: flex; flex-direction: column; gap: 5px; }
.legend-look b { color: var(--fg); opacity: .75; font-weight: 600; }
@media (min-width: 980px) {
  .layout { max-width: 920px; display: grid; grid-template-columns: minmax(0, 560px) 300px; gap: 40px; justify-content: center; align-items: start; }
  .legend { position: sticky; top: 14px; padding-top: 44px; }
  .legend summary { pointer-events: none; list-style: none; }
  .legend summary::-webkit-details-marker { display: none; }
}
@media (prefers-reduced-motion: reduce) { .bar > i { transition: none; } }
