/* ==========================================================================
   Сайт мастеров VIZIR — «рабочий инструмент», а не витрина.
   Принципы: плотная сетка, сильный контраст, табличные цифры, линии вместо
   теней, никаких градиентов и эмодзи-иконок. Подпись стиля — карточка заказа
   как наряд-заказ: моноширинный номер, пунктирный отрыв, статусный штамп.
   Темы: светлая (по умолчанию — мастера работают на улице) и тёмная.
   ========================================================================== */

:root {
  --g-900: #0f1319;
  --g-800: #161b22;
  --g-700: #1e242d;
  --g-600: #2a323d;
  --g-500: #3b4553;

  --paper: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --line: #dde1e7;
  --line-strong: #c6ccd5;

  --text: #0f141b;
  --text-2: #414c5a;
  --muted: #5c6875;

  --signal: #ff6a13;
  --signal-dark: #e35a08;
  --signal-soft: #fff1e6;
  --signal-ink: #1a1005;

  --ok: #128a4b;
  --ok-soft: #e6f6ed;
  --warn: #b26a00;
  --warn-soft: #fff4e0;
  --bad: #c62828;
  --bad-soft: #fdeaea;
  --info: #1a5fb4;
  --info-soft: #e8f1fc;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --tap: 46px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --maxw: 1120px;
  --nav-h: 58px;
}

[data-theme="dark"] {
  --paper: #0c0f14;
  --surface: #141a21;
  --surface-2: #11161c;
  --line: #232b35;
  --line-strong: #33404e;

  --text: #e9eef4;
  --text-2: #b9c4d0;
  --muted: #8794a3;

  --signal-soft: #2a1a0e;
  --ok-soft: #10281c;
  --warn-soft: #2a1f0c;
  --bad-soft: #2b1414;
  --info-soft: #10203a;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.18; letter-spacing: -0.02em; }
p { margin: 0 0 10px; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
svg { display: block; }

.num, .mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.mono { font-family: var(--mono); }

/* ---------------------------------------------------------------- каркас -- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--g-900);
  color: #f2f5f8;
  border-bottom: 1px solid #000;
}
.topbar .inner {
  max-width: var(--maxw); margin: 0 auto; padding: 9px 14px;
  display: flex; align-items: center; gap: 12px; min-height: 52px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -0.02em; }
.brand-mark {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: 5px;
  background: var(--signal); color: var(--signal-ink);
  display: grid; place-items: center; font: 800 13px/1 var(--mono);
}
.brand b { font-weight: 800; }
.brand span { color: #9aa7b4; font-weight: 500; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.topbar .sp { flex: 1; }
.topbar .tlink {
  color: #cfd8e3; font-size: 13.5px; padding: 12px 11px; border-radius: var(--r-sm);
  border: 1px solid transparent;
}
.topbar .tlink:hover { border-color: #38424f; }

.layout { flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; display: flex; align-items: flex-start; }

.side {
  display: none; width: 224px; flex: 0 0 224px; padding: 18px 10px 40px 14px;
  position: sticky; top: 52px; align-self: flex-start;
}
.side a {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 600; font-size: 14px;
}
.side a:hover { background: var(--surface); color: var(--text); }
.side a.on { background: var(--g-900); color: #fff; }
.side a.on svg { color: var(--signal); }
.side .lbl {
  font: 700 10px/1 var(--font); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); padding: 16px 11px 7px;
}
.side .badge { margin-left: auto; }

main.content { flex: 1; min-width: 0; padding: 16px 14px calc(var(--nav-h) + 26px); }

/* нижнее меню — главная навигация на телефоне */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  background: var(--g-900); color: #dfe6ee;
  border-top: 1px solid #000;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: var(--nav-h); font-size: 10.5px; letter-spacing: 0.02em; color: #93a1b1; position: relative;
}
.tabbar a.on { color: #fff; }
.tabbar a.on::before {
  content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 2px; background: var(--signal);
}
.tabbar a.on svg { color: var(--signal); }
.tabbar .dot {
  position: absolute; top: 8px; right: 50%; margin-right: -18px;
  min-width: 17px; height: 17px; border-radius: 9px; background: var(--signal); color: var(--signal-ink);
  font: 800 11px/17px var(--font); text-align: center; padding: 0 4px;
}

/* ------------------------------------------------------------- блоки -- */
.wrap { max-width: 880px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin: 4px 0 14px; flex-wrap: wrap; }
.page-head h1 { font-size: 23px; }
.page-head .sub { color: var(--muted); font-size: 13px; }
.eyebrow {
  font: 700 11px/1 var(--font); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.rule { height: 1px; background: var(--line); margin: 14px 0; }
.rule.dashed { height: 0; border-top: 1px dashed var(--line-strong); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px; margin-bottom: 12px;
}
.card.tight { padding: 11px 12px; }
.card-h { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.card-h h2, .card-h h3 { font-size: 15px; }
.card-h .sp { flex: 1; }

.grid { display: grid; gap: 12px; }
.grid.c2 { grid-template-columns: 1fr; }
.grid.c3 { grid-template-columns: 1fr; }
.grid.svc { grid-template-columns: repeat(2, 1fr); gap: 8px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.xsmall { font-size: 11.5px; }
.b { font-weight: 700; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 6px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* -------------------------------------------------------------- кнопки -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 15px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-weight: 650; font-size: 14.5px; transition: background .12s, border-color .12s, transform .06s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn:hover { border-color: var(--text-2); }
.btn.primary { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
.btn.primary:hover { background: var(--signal-dark); border-color: var(--signal-dark); }
.btn.dark { background: var(--g-900); border-color: var(--g-900); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.bad { color: var(--bad); border-color: #e7bcbc; background: var(--bad-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--line); }
.btn.wide { width: 100%; }
.btn.sm { min-height: 40px; padding: 0 11px; font-size: 13.5px; }
.btn.lg { min-height: var(--tap); font-size: 16px; padding: 0 20px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .ic { width: 17px; height: 17px; flex: 0 0 17px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--text-2);
}
.chip.sig { background: var(--signal-soft); border-color: #ffd9bd; color: #a34700; }
[data-theme="dark"] .chip.sig { color: #ffb37a; border-color: #4a2a12; }
.chip.ok { background: var(--ok-soft); border-color: #bfe6cd; color: #0d6438; }
[data-theme="dark"] .chip.ok { color: #6fd79c; border-color: #1d4030; }
.chip.bad { background: var(--bad-soft); border-color: #f0c4c4; color: #992020; }
[data-theme="dark"] .chip.bad { color: #ef8f8f; border-color: #452222; }
.chip.info { background: var(--info-soft); border-color: #c3d9f5; color: #144a8c; }
[data-theme="dark"] .chip.info { color: #8fb8ef; border-color: #1e3556; }
.chip svg { width: 14px; height: 14px; }
.badge {
  min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; background: var(--signal);
  color: var(--signal-ink); font: 800 12px/21px var(--font); text-align: center;
}
.badge.gray { background: var(--g-600); color: #fff; }

.seg { display: flex; gap: 0; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; }
.seg button {
  flex: 1; min-height: 42px; background: var(--surface); border: 0; border-right: 1px solid var(--line);
  font-size: 13.5px; font-weight: 600; color: var(--text-2); padding: 0 10px;
}
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--g-900); color: #fff; }

/* --------------------------------------------------------------- формы -- */
label.f { display: block; margin-bottom: 10px; }
label.f > span { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
input[type="text"], input[type="tel"], input[type="number"], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: inherit;
}
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px rgba(255, 106, 19, .18); }
input.code { font: 700 22px/1 var(--mono); letter-spacing: 8px; text-align: center; height: 52px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.opts { display: flex; flex-wrap: wrap; gap: 7px; }
.opt {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface);
  font-size: 14px; font-weight: 600; color: var(--text-2);
}
.opt svg { width: 16px; height: 16px; }
.opt.on { border-color: var(--g-900); background: var(--g-900); color: #fff; }
.opt.on svg { color: var(--signal); }

/* переключатель «свободен / занят» */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  width: 52px; height: 30px; border-radius: 99px; background: var(--g-600); position: relative;
  transition: background .15s; flex: 0 0 52px;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; transition: transform .15s;
}
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { transform: translateX(22px); }
.switch .txt { font-weight: 700; font-size: 14px; }
.switch .txt small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }

/* --------------------------------------------------------------- карты -- */
/* Карточка заказа = наряд-заказ: моно-номер, штамп статуса, пунктирный отрыв. */
.order {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); margin-bottom: 10px; overflow: hidden;
}
.order::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--line-strong);
}
.order[data-status="new"]::before { background: var(--signal); }
.order[data-status="accepted"]::before { background: var(--info); }
.order[data-status="done"]::before { background: var(--ok); }
.order[data-status="cancelled"]::before { background: var(--bad); }
.order .head {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px 8px 14px;
  border-bottom: 1px dashed var(--line);
}
.order .oid { font: 700 12.5px/1 var(--mono); color: var(--muted); letter-spacing: 0.02em; }
.order .ago { font-size: 12px; color: var(--muted); }
.order .head .sp { flex: 1; }
.order .body { padding: 11px 12px 12px 14px; }
.order .title { font-weight: 700; font-size: 15.5px; margin-bottom: 5px; display: flex; align-items: center; gap: 8px; }
.order .title svg { width: 18px; height: 18px; color: var(--signal); flex: 0 0 18px; }
.order .desc { color: var(--text-2); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.order .desc.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.order .meta { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 9px; font-size: 13.5px; color: var(--text-2); }
.order .meta .m { display: flex; align-items: center; gap: 6px; min-width: 0; }
.order .meta svg { width: 15px; height: 15px; color: var(--muted); flex: 0 0 15px; }
.order .acts { display: flex; gap: 8px; padding: 10px 12px 12px 14px; flex-wrap: wrap; }
.order .acts .btn { flex: 1 1 auto; }
.order .phone { font: 700 15px/1 var(--mono); }
.order.flash { animation: flash 1.4s ease-out 2; }
@keyframes flash {
  0% { box-shadow: 0 0 0 0 rgba(255, 106, 19, .55); }
  100% { box-shadow: 0 0 0 14px rgba(255, 106, 19, 0); }
}

.stamp {
  font: 800 10.5px/1 var(--font); letter-spacing: 0.1em; text-transform: uppercase;
  border: 1.5px solid currentColor; border-radius: 4px; padding: 3px 6px; transform: rotate(-1.2deg);
}
.stamp.new { color: #b34700; }
.stamp.done { color: #0f6b3c; }
.stamp.cancelled { color: #a81f1f; }
.stamp.accepted { color: #14508f; }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.stat .k { font: 700 10.5px/1 var(--font); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.stat .v { font: 800 26px/1.15 var(--font); margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.stat.sig { border-color: #ffcfae; background: var(--signal-soft); }
.stat.sig .v { color: #a34700; }
[data-theme="dark"] .stat.sig .v { color: #ffb37a; }

.stars { display: inline-flex; gap: 2px; color: #e35a08; }
.stars svg { width: 15px; height: 15px; }
.stars .off { color: var(--line-strong); }

.rate-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.rate-row:last-child { border-bottom: 0; }

.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.empty svg { width: 46px; height: 46px; margin: 0 auto 10px; color: var(--line-strong); }
.empty .t { font-weight: 700; color: var(--text-2); margin-bottom: 4px; }

.skel { background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: var(--r-sm); }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skel.line { height: 12px; margin-bottom: 8px; }
.skel.card { height: 118px; margin-bottom: 10px; }

.toast-host { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 12px); z-index: 60; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  background: var(--g-900); color: #fff; border-radius: var(--r); padding: 11px 13px; font-size: 14px;
  border-left: 4px solid var(--signal); box-shadow: 0 8px 26px rgba(0, 0, 0, .25);
  display: flex; align-items: center; gap: 10px;
}
.toast.ok { border-left-color: var(--ok); }
.toast.bad { border-left-color: var(--bad); }
.toast .sp { flex: 1; }

.sheet-host { position: fixed; inset: 0; z-index: 70; display: none; }
.sheet-host.open { display: block; }
.sheet-bg { position: absolute; inset: 0; background: rgba(9, 12, 16, .55); }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 90vh; overflow: auto;
  background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 14px 14px calc(18px + env(safe-area-inset-bottom));
  border-top: 3px solid var(--signal);
}
.sheet-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sheet-h h2 { font-size: 17px; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 0 auto 12px; }

.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(18, 138, 75, .5); animation: pulse 2s infinite; }
.live.off .dot { background: var(--muted); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(18, 138, 75, 0); } 100% { box-shadow: 0 0 0 0 rgba(18, 138, 75, 0); } }

.notice { border: 1px solid var(--line-strong); border-left: 4px solid var(--info); background: var(--info-soft); padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; }
.notice.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.notice.bad { border-left-color: var(--bad); background: var(--bad-soft); }
.notice.ok { border-left-color: var(--ok); background: var(--ok-soft); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table td, .table th { padding: 8px 6px; border-bottom: 1px dashed var(--line); text-align: left; }
.table th { font: 700 10.5px/1 var(--font); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.table td.r, .table th.r { text-align: right; }

/* ------------------------------------------------------------- лендинг -- */
.landing section { margin-bottom: 26px; }
.board {
  background: var(--g-900); color: #eef2f7; border-radius: var(--r-lg); padding: 20px 18px;
  position: relative; overflow: hidden; border: 1px solid #000;
}
.board::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 28px 28px;
}
.board > * { position: relative; z-index: 1; }
.board h1 { font-size: clamp(27px, 6.4vw, 44px); letter-spacing: -0.03em; }
.board h1 em { font-style: normal; color: var(--signal); }
.board .lead { color: #b7c2cf; font-size: clamp(14.5px, 2.6vw, 17px); max-width: 560px; margin: 12px 0 18px; }
.board .row .btn { flex: 0 1 auto; }
.board .ticker { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid #2a323d; }
.board .ticker .t .k { font: 700 10px/1 var(--font); letter-spacing: 0.12em; text-transform: uppercase; color: #8d9aa8; }
.board .ticker .t .v { font: 800 24px/1.2 var(--font); font-variant-numeric: tabular-nums; }
.board .ticker .t .v small { font-size: 13px; color: #b7c2cf; font-weight: 600; }

.steps { counter-reset: s; display: grid; gap: 12px; }
.step { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 13px; }
.step .n {
  counter-increment: s; flex: 0 0 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line-strong);
  display: grid; place-items: center; font: 800 14px/1 var(--mono); color: var(--text-2);
}
.step .n::before { content: counter(s, decimal-leading-zero); }
.step h3 { font-size: 15px; margin-bottom: 3px; }
.step p { margin: 0; color: var(--text-2); font-size: 14px; }

.svc-tile {
  display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 12px; text-align: left; font-weight: 650; font-size: 14.5px;
}
.svc-tile svg { width: 22px; height: 22px; color: var(--signal); flex: 0 0 22px; }
.svc-tile:hover { border-color: var(--line-strong); }

.faq details { border-bottom: 1px dashed var(--line); padding: 11px 0; }
.faq summary { font-weight: 650; cursor: pointer; list-style: none; display: flex; gap: 9px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; font: 700 17px/1 var(--mono); color: var(--signal); }
.faq details[open] summary::before { content: "–"; }
.faq p { margin: 8px 0 0 22px; color: var(--text-2); font-size: 14px; }

.master-card { display: flex; gap: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.avatar {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 8px; background: var(--g-900); color: var(--signal);
  display: grid; place-items: center; font: 800 16px/1 var(--font);
}
.master-card .nm { font-weight: 700; font-size: 15px; }
.master-card .svc { color: var(--muted); font-size: 13px; margin-top: 2px; }

footer.site { border-top: 1px solid var(--line); padding: 18px 14px calc(var(--nav-h) + 20px); color: var(--muted); font-size: 13px; }
footer.site .inner { max-width: var(--maxw); margin: 0 auto; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
footer.site a { text-decoration: underline; text-decoration-color: var(--line-strong); }

/* ---------------------------------------------------------- лента работ -- */
/* Витрина выполненных работ: сетка карточек «фото сверху, подпись снизу».
   Медиа — 4:3, поэтому лента не «прыгает» при подгрузке картинок. */
.works-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.work-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
}
.work-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.work-media img, .work-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Вертикальное видео (снятое на телефон) не обрезаем: показываем целиком на
   тёмном фоне — в кадре обычно и есть вся суть работы. */
.work-media video { object-fit: contain; background: #0b0f14; }
.work-media img { cursor: zoom-in; }
.work-fallback {
  display: grid; place-items: center; gap: 6px; height: 100%;
  color: var(--muted); font-size: 12.5px;
}
.media-badge {
  position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px;
  background: rgba(9, 12, 16, .68); color: #fff; border-radius: 999px; padding: 3px 9px;
  font: 600 11.5px/1.4 var(--font); letter-spacing: .02em;
}
.work-body { padding: 11px 12px 12px; display: grid; gap: 5px; }
.work-svc {
  display: inline-flex; align-items: center; gap: 6px; color: var(--signal);
  font: 700 11.5px/1.4 var(--font); letter-spacing: .04em; text-transform: uppercase;
}
.work-body h3 { margin: 0; font-size: 15.5px; line-height: 1.3; }
.work-body p { margin: 0; }
.work-master {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 3px;
  color: var(--text-2); font-size: 13px; font-weight: 600; text-decoration: none;
}
.work-master .ic { color: var(--muted); }

/* --------------------------------------------------------------- прочее -- */
.only-mobile { display: block; }
.only-desktop { display: none; }

@media (min-width: 700px) {
  .grid.c2 { grid-template-columns: 1fr 1fr; }
  .grid.c3 { grid-template-columns: repeat(3, 1fr); }
  .grid.svc { grid-template-columns: repeat(3, 1fr); }
  .works-grid { grid-template-columns: repeat(2, 1fr); }
  main.content { padding: 20px 20px calc(var(--nav-h) + 30px); }
  .board { padding: 30px 28px; }
}

@media (min-width: 980px) {
  .side { display: block; }
  .tabbar { display: none; }
  .works-grid { grid-template-columns: repeat(3, 1fr); }
  main.content { padding: 22px 22px 60px; }
  .only-mobile { display: none; }
  .only-desktop { display: block; }
  .toast-host { left: auto; right: 20px; width: 340px; bottom: 20px; }
  .sheet { max-width: 620px; left: 50%; transform: translateX(-50%); border-radius: var(--r-lg) var(--r-lg) 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
