/* Бараны и кальян: шерсть, угли, дым */
:root {
  --bg: #f4ecdf;
  --bg-2: #efe3d0;
  --surface: #fffaf2;
  --surface-2: #f8f0e3;
  --ink: #2b1e16;
  --ink-2: #5a4636;
  --muted: #86725f;
  --line: #e5d8c4;
  --accent: #d9581f;        /* раскалённый уголь */
  --accent-ink: #fff6ec;
  --accent-soft: #fbe2d2;
  --smoke: #8f82a8;         /* дымок */
  --ok: #3d8a55;
  --bad: #c03a28;
  --bad-soft: #f9dcd5;
  --shadow: 0 1px 0 rgba(60, 35, 15, .05), 0 6px 18px -8px rgba(60, 35, 15, .25);
  --radius: 16px;

  --wool: #fffdf8;
  --wool-edge: #dccbb1;
  --face: #3a2a20;
  --horn: #b88a55;
  --metal: #9a8f86;
  --glass: rgba(120, 170, 190, .35);
  --water: rgba(90, 150, 180, .45);
  --puff: rgba(143, 130, 168, .35);

  --seg-0: #e0672e; --seg-1: #3fa58a; --seg-2: #b8426f;
  --seg-3: #e3b53c; --seg-4: #7b6cc4; --seg-5: #4f8fc8;

  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15100c; --bg-2: #1b140f; --surface: #211913; --surface-2: #2a2019;
    --ink: #f4eadb; --ink-2: #d5c4b0; --muted: #a39080; --line: #3a2d23;
    --accent: #ff7a3c; --accent-ink: #1a0f08; --accent-soft: #4a2414;
    --smoke: #b3a6cc; --ok: #6cc187; --bad: #ff7a66; --bad-soft: #4a1d16;
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 10px 24px -12px rgba(0,0,0,.7);
    --wool: #efe6d8; --wool-edge: #b9a68c; --face: #2a1d15; --horn: #c99a62;
    --metal: #8d847c; --glass: rgba(120, 170, 190, .22); --water: rgba(90, 150, 180, .35);
    --puff: rgba(190, 180, 215, .25);
    --seg-0: #ff8a4c; --seg-1: #4fc4a4; --seg-2: #e0679a; --seg-3: #f0c859; --seg-4: #9d8ff0; --seg-5: #6fb0ec;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15100c; --bg-2: #1b140f; --surface: #211913; --surface-2: #2a2019;
  --ink: #f4eadb; --ink-2: #d5c4b0; --muted: #a39080; --line: #3a2d23;
  --accent: #ff7a3c; --accent-ink: #1a0f08; --accent-soft: #4a2414;
  --smoke: #b3a6cc; --ok: #6cc187; --bad: #ff7a66; --bad-soft: #4a1d16;
  --wool: #efe6d8; --wool-edge: #b9a68c; --face: #2a1d15; --horn: #c99a62;
  --seg-0: #ff8a4c; --seg-1: #4fc4a4; --seg-2: #e0679a; --seg-3: #f0c859; --seg-4: #9d8ff0; --seg-5: #6fb0ec;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex; flex-direction: column;
  background:
    radial-gradient(circle at 12% -10%, var(--bg-2) 0 220px, transparent 221px),
    radial-gradient(circle at 92% 8%, var(--bg-2) 0 160px, transparent 161px),
    var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
h1, h2, h3 { font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .4em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; }
h2 { font-size: 1.3rem; font-weight: 750; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--accent); margin-bottom: .35rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- каркас ---------- */
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 20px 16px 48px; flex: 1; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 10px max(16px, calc((100% - 1160px) / 2 + 16px));
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.2rem; font-family: ui-rounded, system-ui, sans-serif; }
.brand small { display: block; font-size: .7rem; font-weight: 600; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-top: -3px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 7px 12px; border-radius: 999px; font-weight: 600; }
.nav a:hover { background: var(--surface-2); }
.nav a.on { background: var(--ink); color: var(--surface); }
.who { display: flex; align-items: center; gap: 12px; }
.who form { margin: 0; }
.role { color: var(--ink); text-decoration: none; font-weight: 650; display: flex; flex-direction: column; line-height: 1.15; }
.role small { color: var(--muted); font-weight: 500; font-size: .72rem; }
.linkish { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 4px; }
.linkish:hover { color: var(--accent); }
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px max(16px, calc((100% - 1160px) / 2 + 16px)); color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }

@media (max-width: 720px) {
  .topbar { gap: 8px 12px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .who { margin-left: auto; }
}

/* ---------- элементы ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 650;
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .08s, background .15s, border-color .15s;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { border-color: var(--ink); filter: brightness(1.05); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn-danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn-sm { padding: 5px 11px; font-size: .85rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline { display: inline; margin: 0; }

input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface-2);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 9px 12px; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.form.narrow { max-width: 440px; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 760px; }
.grid-form .span2 { grid-column: 1 / -1; }
@media (max-width: 600px) { .grid-form { grid-template-columns: 1fr; } }

.flashes { display: grid; gap: 8px; margin-bottom: 18px; }
.flash { padding: 11px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 550; }
.flash-ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); box-shadow: inset 4px 0 0 var(--ok); }
.flash-error { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); box-shadow: inset 4px 0 0 var(--bad); background: var(--bad-soft); }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 0; flex-basis: 100%; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 32px 0 12px; }
.section-head h2 { margin: 0; }
.crumbs { margin: 0 0 10px; color: var(--muted); font-size: .9rem; }
.crumbs a { color: var(--ink-2); }
.empty { text-align: center; color: var(--ink-2); padding: 32px 20px; }
.empty p { margin: 0; }
.empty.big { padding: 40px 16px; }
.empty-art { width: 220px; margin: 0 auto 8px; display: block; }

/* шкалы */
.meter { display: inline-flex; align-items: center; gap: 7px; vertical-align: middle; }
.meter-bar { width: 58px; height: 7px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--seg-3), var(--accent)); }
.meter b { font-variant-numeric: tabular-nums; font-size: .9rem; min-width: 1.4em; }
.horns { display: inline-flex; align-items: center; gap: 2px; vertical-align: middle; }
.horns b { margin-left: 5px; font-variant-numeric: tabular-nums; font-size: .95rem; }
.horn-i {
  width: 16px; height: 16px; display: inline-block;
  -webkit-mask: url("horn.svg") center / contain no-repeat; mask: url("horn.svg") center / contain no-repeat;
  background: var(--line);
}
.horn-i.full { background: var(--horn); }
.horn-i.half { background: linear-gradient(90deg, var(--horn) 50%, var(--line) 50%); }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: .82rem; font-weight: 600; text-decoration: none; cursor: pointer; font-family: inherit; }
.tag small { color: var(--muted); font-weight: 500; }
.tag.on, a.tag:hover, button.tag:hover { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.tags { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.chip { display: inline-flex; gap: 8px; align-items: center; background: var(--accent-soft); border-radius: 999px; padding: 4px 6px 4px 12px; font-weight: 600; font-size: .9rem; }
.chip a { text-decoration: none; font-size: 1.1rem; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); }
.active-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.out-pill { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--bad); background: var(--bad-soft); padding: 2px 8px; border-radius: 99px; }
.warn-line { margin: 10px 0 0; font-size: .82rem; color: var(--bad); position: relative; z-index: 1; }

/* чекбокс-«уголёк» */
.check { position: relative; display: inline-grid; width: 24px; height: 24px; cursor: pointer; vertical-align: middle; }
.check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; }
.check span { border: 2px solid var(--line); border-radius: 7px; background: var(--surface); transition: .15s; display: grid; place-items: center; }
.check input:checked + span { background: var(--bad); border-color: var(--bad); }
.check input:checked + span::after { content: ""; width: 10px; height: 6px; border: 2.5px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.check input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); }
.check input:disabled + span { opacity: .5; }
.check-label { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; white-space: nowrap; }

/* фильтры */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px; margin-bottom: 14px; }
.filters input[type=search] { flex: 1 1 240px; }
.filters select { flex: 0 1 200px; width: auto; }
.seg-control { display: inline-flex; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; }
.seg-control label { cursor: pointer; }
.seg-control input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-control span { display: block; padding: 5px 12px; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.seg-control input:checked + span { background: var(--ink); color: var(--surface); }
.seg-control input:focus-visible + span { outline: 3px solid var(--accent); }

/* таблицы */
.table-wrap { overflow-x: auto; padding: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; background: var(--surface-2); position: sticky; top: 0; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .b { font-weight: 700; }
.table .flavor { color: var(--ink); font-weight: 650; text-decoration: none; }
.table .flavor:hover { color: var(--accent); text-decoration: underline; }
.row-actions { text-align: right; white-space: nowrap; }
.row-actions form { margin-left: 4px; }
.stock-col { width: 44px; text-align: center !important; }
.stock-form { margin: 0; }
.desc-col { max-width: 320px; color: var(--ink-2); }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
tr.is-out td:not(.stock-col) { opacity: .5; }
tr.is-out .flavor { text-decoration: line-through; }
.table.mini { font-size: .8rem; }
.table.mini th, .table.mini td { padding: 6px 8px; white-space: nowrap; }
@media (max-width: 760px) { .desc-col { display: none; } .table th, .table td { padding: 9px 8px; } }

/* ---------- hero и баран ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: center; min-height: 62vh; }
.hero h1 { font-size: clamp(2.6rem, 8vw, 4.6rem); line-height: .98; margin-bottom: .3em; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 34em; }
.hero-art { width: 100%; max-width: 460px; justify-self: center; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 12px; } .hero-art { max-width: 300px; order: -1; } }

.welcome { display: grid; grid-template-columns: 1fr 240px; gap: 20px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px 24px; box-shadow: var(--shadow); }
.welcome h1 { margin-bottom: 14px; }
.welcome .actions { margin-top: 16px; }
.welcome-art { width: 100%; }
@media (max-width: 720px) { .welcome { grid-template-columns: 1fr; } .welcome-art { display: none; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { display: flex; flex-direction: column; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
a.stat:hover { border-color: var(--accent); }
.stat b { font-size: 1.7rem; font-family: ui-rounded, system-ui, sans-serif; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat span { font-size: .8rem; color: var(--muted); }
.stat.bad b { color: var(--bad); }

.auth { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; max-width: 860px; margin: 3vh auto 0; }
.auth .form { max-width: 400px; width: 100%; }
.auth h1 { font-size: 1.8rem; }
.auth-art { width: 100%; max-width: 340px; justify-self: center; }
@media (max-width: 720px) { .auth { grid-template-columns: 1fr; } .auth-art { max-width: 200px; } }

.sheep-art { overflow: visible; }
.sheep-art .wool, .sheep-art .wool circle { fill: var(--wool); stroke: var(--wool-edge); stroke-width: 1.5; }
.sheep-art .face { fill: var(--face); }
.sheep-art .horn { fill: none; stroke: var(--horn); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.sheep-art .lid { fill: none; stroke: #f6e9d6; stroke-width: 2.5; stroke-linecap: round; }
.sheep-art .nose { fill: #5b4334; }
.sheep-art .leg { fill: var(--face); }
.sheep-art .mouthpiece { fill: var(--metal); }
.sheep-art .metal { fill: var(--metal); }
.sheep-art .bowl { fill: #b5623a; }
.sheep-art .coal { fill: var(--accent); animation: glow 2.6s ease-in-out infinite; }
.sheep-art .coal + .coal { animation-delay: -1.3s; }
.sheep-art .vase { fill: var(--glass); stroke: var(--metal); stroke-width: 2; }
.sheep-art .vase-water { fill: var(--water); }
.sheep-art .bubble { fill: rgba(255, 255, 255, .7); animation: bubble 1.8s ease-in infinite; }
.sheep-art .bubble.b2 { animation-delay: -.9s; }
.sheep-art .hose { stroke: var(--smoke); stroke-width: 6; stroke-linecap: round; }
.sheep-art .puff { fill: var(--puff); transform-box: fill-box; transform-origin: center; animation: puff 4.5s ease-out infinite; }
.sheep-art .p2 { animation-delay: -1.5s; }
.sheep-art .p3 { animation-delay: -3s; }
@keyframes glow { 50% { fill: #ffb347; } }
@keyframes bubble { from { transform: translateY(0); opacity: .8; } to { transform: translateY(-18px); opacity: 0; } }
@keyframes puff { 0% { transform: translate(-6px, 30px) scale(.4); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(10px, -30px) scale(1.25); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheep-art * { animation: none !important; } }

/* ---------- забивки ---------- */
.mix-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.mix-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; transition: transform .12s, border-color .12s; }
.mix-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.mix-link { position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.mix-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mix-card time { font-weight: 700; color: var(--ink-2); font-size: .92rem; }
.mix-card footer { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; font-size: .85rem; color: var(--muted); }
.kv { display: inline-flex; gap: 6px; align-items: center; }
.bowl-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--line); }
.bowl-bar .seg { min-width: 4px; }
.bowl-bar.preview { height: 16px; margin-top: 12px; }
.seg-empty { background: transparent; }
.seg-0 { background: var(--seg-0); } .seg-1 { background: var(--seg-1); } .seg-2 { background: var(--seg-2); }
.seg-3 { background: var(--seg-3); } .seg-4 { background: var(--seg-4); } .seg-5 { background: var(--seg-5); }
.seg-stroke.seg-0 { stroke: var(--seg-0); background: none; } .seg-stroke.seg-1 { stroke: var(--seg-1); background: none; }
.seg-stroke.seg-2 { stroke: var(--seg-2); background: none; } .seg-stroke.seg-3 { stroke: var(--seg-3); background: none; }
.seg-stroke.seg-4 { stroke: var(--seg-4); background: none; } .seg-stroke.seg-5 { stroke: var(--seg-5); background: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.dot:not([class*="seg-"]) { background: var(--line); }
.mix-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.mix-items li { display: flex; align-items: baseline; gap: 8px; font-size: .93rem; }
.mix-items .dot { transform: translateY(1px); }
.pct { font-variant-numeric: tabular-nums; min-width: 2.6em; }
.tname { color: inherit; text-decoration: none; }
a.tname:hover .tf { color: var(--accent); text-decoration: underline; }
.tname .tb { font-weight: 700; }
.tname .tl { color: var(--muted); }
.tname .tf { font-weight: 550; }
.tname.gone { text-decoration: line-through; text-decoration-color: var(--bad); opacity: .65; }
.mix-items.big li { font-size: 1.05rem; }

.top-list { list-style: none; margin: 0; padding: 6px; }
.top-list li a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.top-list li a:hover { background: var(--surface-2); }
.top-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--surface); font-weight: 800; flex: none; }
.top-list li:first-child .top-n { background: var(--accent); }
.top-mix { flex: 1; min-width: 0; font-weight: 600; }
.top-mix small { color: var(--muted); font-weight: 500; }

.mix-full { display: flex; flex-direction: column; gap: 20px; padding: 24px; }
.mix-full-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.mix-full-head h1 { margin: 0; }
.facts { display: flex; gap: 22px; margin: 0; flex-wrap: wrap; }
.facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.facts dd { margin: 4px 0 0; font-weight: 600; }
.bowl-wrap { display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: center; }
.bowl-donut { width: 150px; height: 150px; transform: rotate(0deg); }
@media (max-width: 520px) { .bowl-wrap { grid-template-columns: 1fr; } .bowl-donut { margin: 0 auto; width: 130px; height: 130px; } }
.desc { white-space: pre-wrap; background: var(--surface-2); border-radius: 12px; padding: 14px 16px; border: 1px solid var(--line); color: var(--ink-2); margin: 0; }
.mix-full footer { border-top: 1px solid var(--line); padding-top: 16px; }

.tob-hero { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; padding: 24px; }
.tob-hero h1 { margin-bottom: 14px; }
.tob-hero .desc { margin-top: 16px; max-width: 60ch; }
.tob-hero.is-out h1 { text-decoration: line-through; text-decoration-color: var(--bad); }

/* форма забивки */
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .row3 { grid-template-columns: 1fr 1fr; } .row3 label:first-child { grid-column: 1 / -1; } }
.bowl-fieldset { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.bowl-fieldset legend { font-weight: 800; padding: 0 6px; font-family: ui-rounded, system-ui, sans-serif; font-size: 1.05rem; }
#items { display: flex; flex-direction: column; gap: 8px; }
.item-row { display: grid; grid-template-columns: 12px 1fr 108px 36px; gap: 8px; align-items: center; }
.pct-input { flex-direction: row !important; align-items: center; gap: 4px !important; }
.pct-input input { text-align: right; }
.pct-input span { color: var(--muted); font-weight: 700; }
.bowl-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pct-sum { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.pct-sum.ok { color: var(--ok); }
.pct-sum.bad { color: var(--bad); }
.tob-filter { font-size: .9rem; }
@media (max-width: 520px) { .item-row { grid-template-columns: 10px 1fr 86px 30px; gap: 6px; } }

/* импорт */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }
.drop { position: relative; border: 2px dashed var(--line); border-radius: var(--radius); padding: 30px 16px; text-align: center; cursor: pointer; background: var(--surface-2); transition: .15s; }
.drop:hover, .drop:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-text { display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
.drop-text small { color: var(--muted); font-weight: 500; }
.radios { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.radios legend { font-weight: 700; margin-bottom: 6px; color: var(--ink-2); font-size: .92rem; }
.radios label { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 500 !important; }
.radios input { width: auto; accent-color: var(--accent); }
.help h2 { margin-bottom: 8px; }
.result { margin-top: 16px; }
.errors { color: var(--bad); font-size: .9rem; padding-left: 20px; max-height: 300px; overflow: auto; }

.danger-zone { margin-top: 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.role-badge { padding: 4px 12px; border-radius: 99px; font-weight: 700; font-size: .85rem; background: var(--surface-2); border: 1px solid var(--line); }
.role-badge.role-hookahman { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.table select { width: auto; padding: 5px 10px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 10px 18px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow); z-index: 50; transition: opacity .4s, transform .4s; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.gone { opacity: 0; transform: translate(-50%, 10px); }
