/* СМОЛА / рабочая система · checkpoint 25.09.2026
   Порядок слоёв объявлен один раз. Legacy хранит геометрию старых компонентов и внешних страниц.
   ui-system: общая система рабочих экранов; ui-touch: крупные контролы постов. Печать изолирована.
   Новые компоненты: один источник правил, состояния и адаптив рядом с системой. */
@layer smolaLegacy, smolaDesign;
@layer smolaDesign {
  .ui-system {
    --bg:#f2f5f7; --card:#fff; --ink:#203442; --muted:#526574; --faint:#60717e;
    --line:#d6dfe5; --line2:#f5f7f9; --acc:#007f78; --acc-ink:#006e68; --acc2:#e8f5f2; --acc3:#a3d3ce;
    --head:#172b3a; --warn:#b42333; --warnbg:#fff1f2; --amber:#885817; --amber2:#fff4dc;
    --ok:var(--acc-ink); --okbg:var(--acc2);
    --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-6:24px; --space-8:32px;
    --text-xs:12px; --text-sm:13px; --text-base:14px; --text-lg:16px; --text-xl:20px; --text-title:28px;
    --radius-sm:4px; --radius:8px; --shadow:0 8px 28px #172b3a18;
    --control-height:36px; --focus:0 0 0 3px var(--acc3);
    font:var(--text-base)/1.5 system-ui,-apple-system,"Segoe UI",sans-serif;
    color:var(--ink); background:var(--bg);
  }
  .ui-system :where(*) {color:inherit;font-size:inherit}
  /* Typography: 12 / 13 / 14 / 16 / 20 / 28. No letter-spaced tiny labels. */
  .ui-system :where(h1,h2,h3,p) {margin-top:0}
  .ui-system :where(h1) {font-size:var(--text-title);line-height:1.2;font-weight:650;letter-spacing:-.025em;margin-bottom:8px}
  .ui-system :where(h2) {font-size:var(--text-xl);line-height:1.3;font-weight:650;margin:0 0 12px;letter-spacing:-.015em}
  .ui-system :where(h3) {display:block;font-size:var(--text-lg);line-height:1.4;font-weight:600;margin:20px 0 12px;text-transform:none;letter-spacing:0}
  .ui-system :where(p) {margin-bottom:12px}
  .ui-system :where(.small,small,.crumbs,.tag,.ui-eyebrow) {font-size:var(--text-xs);line-height:1.5}
  .ui-system :where(.muted,.faint,.cat-sub) {color:var(--muted)}
  .ui-system :where(a) {color:var(--acc-ink)}
  .ui-system :where(.ui-eyebrow) {display:block;color:var(--muted);font-weight:600;margin-bottom:4px}
  .ui-system :where(b,strong) {font-weight:650}
  .ui-system :where(.num,.cat-total,.cat-cost-lines dd) {font-variant-numeric:tabular-nums}
  .ui-system :where(main) {width:100%;max-width:1440px;margin:0 auto;padding:24px 32px 96px}
  .ui-system :where(.catalog,.catalog>*,.cat-model-head>div) {min-width:0}
  .ui-system :where(.crumbs) {margin:0 0 16px}
  /* Controls: labels above; hints below. Checkboxes intentionally retain their own size. */
  .ui-system :where(label,.ui-field) {display:flex;flex-direction:column;gap:6px;min-width:0;font-size:var(--text-sm);font-weight:500;color:var(--muted);margin:0}
  .ui-system :where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea) {
    display:block;width:100%;min-width:0;height:var(--control-height);padding:6px 10px;
    font:inherit;font-size:var(--text-base);line-height:22px;color:var(--ink);background:var(--card);
    border:1px solid #b8c6cf;border-radius:var(--radius-sm);box-shadow:0 1px 2px #172b3a05;
  }
  .ui-system :where(textarea) {height:auto;min-height:80px;resize:vertical}
  .ui-system :where(input::placeholder,textarea::placeholder) {color:var(--faint);opacity:1}
  .ui-system :where(input[type=checkbox],input[type=radio]) {width:16px;height:16px;flex-shrink:0;margin:0;accent-color:var(--acc)}
  .ui-system :where(.ui-check,.cat-file-choice,.lx-check,.cat-size-chip,label:has(>input[type=checkbox]),label:has(>input[type=radio])) {display:flex;flex-direction:row;align-items:center;gap:8px;color:var(--ink);font-size:var(--text-sm);font-weight:400;min-height:30px}
  .ui-system :where(label>.small,label>small) {font-size:var(--text-xs);font-weight:400;color:var(--muted)}
  .ui-system :where(input,select,textarea,button,a,summary):focus-visible {outline:2px solid var(--acc);outline-offset:3px;box-shadow:var(--focus)}
  .ui-system :where(input,select,textarea):disabled {color:var(--muted);background:var(--line2);border-color:var(--line);opacity:1;cursor:not-allowed}
  .ui-system :where([aria-invalid=true],input:user-invalid,textarea:user-invalid) {border-color:var(--warn);background:var(--warnbg)}
  .ui-system :where(.ui-error,.lx-neg) {color:var(--warn);font-size:var(--text-sm)}
  .ui-system :where(.btn) {
    display:inline-flex;align-items:center;justify-content:center;gap:8px;height:var(--control-height);min-height:var(--control-height);
    flex-shrink:0;max-width:100%;padding:0 14px;border:1px solid var(--acc);border-radius:var(--radius-sm);
    background:var(--acc);color:white;font:600 var(--text-sm)/1.3 system-ui,sans-serif;letter-spacing:0;
    text-decoration:none;white-space:nowrap;cursor:pointer;box-shadow:0 1px 2px #172b3a09;
  }
  .ui-system :where(.btn:hover) {filter:brightness(.95);text-decoration:none}
  .ui-system :where(.btn.sec) {background:var(--card);color:var(--ink);border-color:#b8c6cf}
  .ui-system :where(.btn[data-model-filter-reset]) {white-space:normal;text-align:center}
  .ui-system :where(.btn.ghost) {background:transparent;color:var(--muted);border-color:transparent;box-shadow:none}
  .ui-system :where(.btn.danger) {background:var(--card);color:var(--warn);border-color:#e9bdc4}
  .ui-system :where(.btn.ui-icon) {width:36px;padding:0}
  .ui-system :where(table .btn.sm) {height:30px;min-height:30px;padding:0 10px;font-size:var(--text-xs)}
  .ui-system :where(button:disabled,.btn:disabled) {opacity:.5;filter:none;cursor:not-allowed}
  .ui-system :where(.row,.ui-actions) {display:flex;flex-wrap:wrap;align-items:end;gap:12px}
  .ui-system :where(.task-fields) {display:flex;align-items:end;flex-wrap:wrap;gap:8px 4px;min-width:0}
  .ui-system :where(.task-fields .task-control) {gap:4px;font-size:var(--text-xs)}
  .ui-system :where(.task-recipient) {flex:1 0 100%}
  .ui-system :where(.task-deadline) {flex:1 0 min(100%,120px);max-width:160px}
  .ui-system :where(.task-fields .btn) {align-self:end;padding-inline:8px}
  .ui-system :where(.cat-fields,.ui-grid-2,.ui-grid-3,.ui-grid-4,.ui-settings-form) {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:16px}
  .ui-system :where(.ui-grid-3,.ui-settings-form) {grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}
  .ui-system :where(.ui-grid-4) {grid-template-columns:repeat(4,minmax(0,1fr))}
  .ui-system :where(.ui-span-2) {grid-column:span 2}
  .ui-system :where(.ui-span-all) {grid-column:1/-1}
  .ui-system :where(.ui-settings-actions) {grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding-top:16px;border-top:1px solid var(--line)}
  /* Panels, section rhythm, table containers and states. */
  .ui-system :where(.block,.card) {background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:24px;margin:0 0 16px;box-shadow:0 1px 2px #172b3a03}
  .ui-system :where(.board-heading,.cat-heading,.ui-section-heading) {display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 20px;flex-wrap:wrap}
  .ui-system :where(.board-heading>div:first-child) {flex:1;min-width:0}
  .ui-system :where(.board-heading p) {font-size:var(--text-sm);color:var(--muted);margin:0}
  .ui-system :where(.cat-heading h1,.cat-heading h2,.ui-section-heading h2) {margin-bottom:0}
  .ui-system :where(.ui-section-heading) {margin-top:24px;margin-bottom:16px}
  .ui-system :where(.ui-section-heading>.muted) {font-size:var(--text-sm);flex-basis:100%}
  .ui-system :where(.tag) {display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:var(--radius-sm);font-weight:500;background:#edf1f4;color:var(--muted);white-space:normal}
  .ui-system :where(.tag.ok,.tag.P1,.lx-pos) {background:var(--okbg);color:var(--ok)}
  .ui-system :where(.tag.warn,.tag.lx-st-cut) {background:var(--amber2);color:var(--amber)}
  .ui-system :where(.lx-warn,.cat-fabric-empty) {color:var(--amber)}
  .ui-system :where(.flash) {padding:12px 16px;border:1px solid var(--line);border-radius:var(--radius);background:var(--card);font-size:var(--text-sm)}
  .ui-system :where(.flash.ok) {color:var(--acc-ink);background:var(--acc2);border-color:var(--acc3)}
  .ui-system :where(.flash.error,.flash.err) {color:var(--warn);background:var(--warnbg);border-color:#e9bdc4}
  .ui-system :where(.cat-table-wrap,.development-table,.table-scroll,div.cat-table) {max-width:100%;overflow:auto;border:1px solid var(--line);border-radius:var(--radius-sm);margin:16px 0}
  .ui-system :where(table) {width:100%;border-collapse:collapse;margin:0;font-size:var(--text-sm)}
  .ui-system :where(td,th) {padding:12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}
  .ui-system :where(th) {font-size:var(--text-xs);font-weight:600;color:var(--muted);background:var(--line2)}
  .ui-system :where(tr:last-child td) {border-bottom:0}
  .ui-system :where(td.num,th.num) {text-align:right;white-space:nowrap}
  .ui-system :where(tfoot th) {border-top:1px solid var(--line);border-bottom:0;background:var(--acc2);color:var(--ink)}
  .ui-system :where(details>summary) {cursor:pointer;color:var(--ink);font-size:var(--text-base);font-weight:600}
  .ui-system :where(details.block) {padding:16px 20px}
  .ui-system :where(details.block>summary) {list-style:none;display:flex;align-items:center;gap:12px}
  .ui-system :where(details.block>summary)::before {content:'';width:16px;height:16px;flex:none;background:currentColor;color:var(--muted);-webkit-mask:var(--i-chev) center/16px 16px no-repeat;mask:var(--i-chev) center/16px 16px no-repeat;transform:rotate(-90deg);transition:transform .15s}
  .ui-system :where(details.block[open]>summary)::before {transform:none}
  /* Значки: шеврон и стрелки одной линией 1,8 px, цвет берут от текста (владелец 25.09.2026: «v» вместо стрелок — некрасиво). */
  .ui-system {
    --i-chev:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    --i-up:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 13V3M4 7l4-4 4 4'/%3E%3C/svg%3E");
    --i-down:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3v10M4 9l4 4 4-4'/%3E%3C/svg%3E");
    --i-x:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4l8 8M12 4l-8 8'/%3E%3C/svg%3E");
  }
  .ui-system :where(.ui-i,.ui-chev) {display:inline-block;width:16px;height:16px;flex:none;background:currentColor;-webkit-mask:var(--i) center/16px 16px no-repeat;mask:var(--i) center/16px 16px no-repeat}
  .ui-system :where(.ui-i-up) {--i:var(--i-up)}
  .ui-system :where(.ui-i-down) {--i:var(--i-down)}
  .ui-system :where(.ui-i-x) {--i:var(--i-x)}
  .ui-system :where(.ui-chev) {--i:var(--i-chev);opacity:.7;transition:transform .15s}
  .ui-system :where(details[open]>summary .ui-chev) {transform:rotate(180deg)}
  .ui-system :where(details.block[open]>summary) {margin-bottom:20px}
  .ui-system :where(summary::-webkit-details-marker) {display:none}
  /* Navigation: one desktop row, grouped disclosures work with mouse and keyboard. */
  .ui-system :where(header.top) {min-height:60px;padding:0 24px;gap:24px;background:var(--head);flex-wrap:nowrap;position:sticky;top:0;border:0}
  .ui-system :where(.module-switch) {flex-shrink:0;border:0;padding:0;gap:4px}
  .ui-system :where(.module-switch a) {font-size:var(--text-sm);padding:8px 12px;border-radius:4px;color:#fff}
  .ui-system :where(.module-switch a.on) {background:#304653;border:0}
  .ui-system :where(.section-nav) {display:flex;align-items:center;gap:4px;flex:1;flex-wrap:nowrap}
  .ui-system :where(.ui-menu) {position:relative;flex-shrink:0}
  .ui-system :where(.ui-menu>summary) {display:flex;align-items:center;gap:6px;padding:10px 12px;list-style:none;font-size:var(--text-sm);font-weight:500;color:#fff;border-radius:4px}
  .ui-system :where(.ui-menu.is-active>summary,.ui-menu[open]>summary) {background:#304653}
  .ui-system :where(.ui-menu.is-active>summary) {box-shadow:inset 0 -2px #61c6ba}
  .ui-system :where(.ui-menu-panel) {position:absolute;top:calc(100% + 8px);left:0;z-index:30;width:220px;padding:8px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
  .ui-system :where(.ui-menu-panel a) {display:block;padding:9px 12px;border:0;color:var(--ink);font-size:var(--text-sm);font-weight:500;border-radius:4px;white-space:normal}
  .ui-system :where(.ui-menu-panel a:hover,.ui-menu-panel a[aria-current]) {background:var(--acc2);color:var(--acc-ink);text-decoration:none}
  .ui-system :where(.ui-user) {margin-left:auto}
  .ui-system :where(.ui-user>.ui-menu-panel) {left:auto;right:0}
  .ui-system :where(.ui-popover) {position:relative;align-self:end}
  .ui-system :where(.ui-popover>form) {position:absolute;right:0;top:calc(100% + 8px);width:340px;max-width:calc(100vw - 40px);z-index:8;box-shadow:var(--shadow);padding:20px;gap:16px}
  /* Catalogue register: aligned rows, explicit model / state columns. */
  .ui-system :where(.board-filters) {padding:16px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);margin:0 0 16px}
  .ui-system :where(.board-filter-line) {display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;align-items:end}
  .ui-system :where(.board-filter-line label) {min-width:0;flex:initial}
  .ui-system :where(.board-search) {flex:initial}
  .ui-system :where(.cat-bulk) {margin:0;padding:16px 20px;background:var(--line2);border:1px solid var(--line);border-bottom:0;border-radius:8px 8px 0 0;align-items:end;gap:12px}
  .ui-system :where(.cat-bulk label) {font-size:var(--text-sm);gap:6px;display:flex;flex-direction:column;min-width:200px}
  .ui-system :where(.cat-list) {display:block;border:1px solid var(--line);border-radius:0 0 8px 8px;overflow:hidden;background:var(--card)}
  .ui-system :where(.cat-list-row) {display:grid;grid-template-columns:20px 48px minmax(0,1fr) 240px;gap:16px;padding:16px 20px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:var(--card);box-shadow:none}
  .ui-system :where(.cat-list-row:last-child) {border-bottom:0}
  .ui-system :where(.cat-list-row:hover) {background:#f8fafb;box-shadow:none}
  .ui-system :where(.cat-list-row:not(:has(>input))) {grid-template-columns:48px minmax(0,1fr) 240px}
  .ui-system :where(.cat-cover) {width:48px;height:64px;aspect-ratio:3/4;border-radius:4px;background:var(--line2);font-size:var(--text-xs);color:var(--muted)}
  .ui-system :where(.cat-list-title a) {display:block;font-size:var(--text-base);font-weight:500;color:var(--ink);line-height:1.5}
  .ui-system :where(.cat-list-title a strong) {font-weight:650;color:var(--acc-ink);letter-spacing:0}
  .ui-system :where(.cat-list-title .small) {font-size:var(--text-sm);color:var(--muted);margin-top:4px}
  .ui-system :where(.cat-list-status) {min-width:0;text-align:right;font-size:var(--text-xs);color:var(--muted);line-height:1.8}
  .ui-system :where(.ui-list-heading) {display:flex;justify-content:space-between;padding:12px 20px;background:var(--line2);border:1px solid var(--line);border-bottom:0;border-radius:8px 8px 0 0;font-size:var(--text-xs);color:var(--muted);font-weight:600}
  .ui-system :where(.ui-bulk-disclosure) {margin:0 0 16px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius)}
  .ui-system :where(.ui-bulk-disclosure>summary) {padding:12px 16px;font-size:var(--text-sm);font-weight:500}
  .ui-system :where(.ui-bulk-disclosure .cat-bulk) {border:0;border-top:1px solid var(--line);border-radius:0 0 8px 8px}
  .ui-system :where(.ui-item-settings) {display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:20px;align-items:start}
  .ui-system :where(.ui-item-settings>details) {margin:0}
  .ui-system :where(.ui-item-settings>details[open]) {grid-column:1/-1}
  .ui-system :where(.cat-variant-bar>.ui-popover:last-child) {margin-left:auto}
  /* Specification: work area + steady estimate rail. */
  .ui-system :where(.cat-model-head) {gap:16px;align-items:center;min-width:0;flex:1}
  .ui-system :where(.cat-model-head h1) {font-size:var(--text-title);margin:4px 0 8px}
  .ui-system :where(.cat-model-head .small.muted) {font-size:var(--text-sm);letter-spacing:0}
  .ui-system :where(.cat-hero-photo) {width:60px;height:80px;background:var(--line2);border:1px solid var(--line);object-fit:contain;border-radius:4px}
  .ui-system :where(.cat-settings,.cat-colors) {margin:0 0 12px}
  .ui-system :where(.cat-settings form,.cat-colors form) {margin-top:16px}
  .ui-system :where(.ui-export) {display:flex;align-items:start;gap:12px;margin:16px 0 24px}
  .ui-system :where(.cat-col) {display:grid;gap:16px;align-content:start;min-width:0}   /* колонка настроек модели */
  /* Файлы модели (26.09.2026): финальные — «в производстве», промежуточные ниже, старые свёрнуты. */
  .ui-system :where(.cat-files-group) {margin:0 0 16px}
  .ui-system :where(.cat-files-group>h3) {margin:8px 0 4px;font-size:var(--text-sm)}
  .ui-system :where(.cat-file-row) {display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:6px 8px;border-bottom:1px solid var(--line2);font-size:var(--text-sm)}
  .ui-system :where(.cat-file-row>a) {font-weight:500;overflow-wrap:anywhere}
  .ui-system :where(.cat-file-row>form) {margin-left:auto}
  .ui-system :where(.cat-file-row.is-prod) {background:var(--acc2);border-radius:var(--radius-sm)}
  .ui-system :where(.cat-files-more>summary) {font-size:var(--text-xs);color:var(--muted);font-weight:500;padding:6px 8px}
  .ui-system :where(.cat-files-upload) {display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding-top:12px;border-top:1px solid var(--line)}
  .ui-system :where(.cat-files-upload>select,.cat-files-upload>input[name=version]) {width:auto;max-width:160px}
  .ui-system :where(.cat-files-upload>input[type=file]) {width:auto;height:auto;padding:4px}
  /* «?» — пояснение по нажатию, без лишних строк на экране (владелец 26.09.2026) */
  .ui-system :where(.ui-hint) {position:relative;display:inline-block;vertical-align:middle;margin-left:4px}
  .ui-system :where(.ui-hint>summary) {list-style:none;display:grid;place-items:center;width:18px;height:18px;border:1px solid var(--line);border-radius:50%;font-size:11px;font-weight:600;color:var(--muted);background:var(--card);cursor:pointer}
  .ui-system :where(.ui-hint>summary::-webkit-details-marker) {display:none}
  .ui-system :where(.ui-hint[open]>summary) {color:var(--acc-ink);border-color:var(--acc3)}
  .ui-system :where(.ui-hint>p) {position:absolute;z-index:20;left:-8px;top:26px;width:260px;margin:0;padding:10px 12px;font-size:var(--text-xs);font-weight:400;line-height:1.5;color:var(--ink);background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
  .ui-system :where(.cat-total-row) {display:flex;align-items:center;gap:6px}
  .ui-system :where(.cat-estimate .ui-hint>p) {left:auto;right:-8px}      /* панель справа: пояснение раскрывается влево */
  .ui-system :where(.ui-export>.small) {max-width:540px;line-height:1.6}
  .ui-system :where(.cat-variant-bar) {display:flex;gap:12px;align-items:end;flex-wrap:wrap;justify-content:start;padding:16px 20px;margin:0 0 20px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius)}
  .ui-system :where(.cat-variant-tabs) {display:flex;gap:8px;flex-wrap:wrap;align-items:stretch;flex:1 1 420px;min-width:0}
  .ui-system :where(.cat-variant-tabs>a,.cat-hidden-variants>a) {display:inline-flex;flex-direction:column;justify-content:center;gap:2px;min-height:44px;padding:6px 14px;border:1px solid var(--line);border-radius:4px;background:var(--card);color:var(--ink);font-size:var(--text-sm);font-weight:500;line-height:1.25;text-decoration:none}
  .ui-system :where(.cat-variant-tabs>a:hover,.cat-hidden-variants>a:hover) {border-color:var(--acc3)}
  .ui-system :where(.cat-variant-tabs>a[aria-current=page],.cat-hidden-variants>a[aria-current=page]) {background:var(--acc2);border-color:var(--acc);color:var(--acc-ink)}
  .ui-system :where(.cat-variant-tabs small) {font-size:var(--text-xs);font-weight:400;color:var(--muted)}
  .ui-system :where(.cat-variant-tabs small.is-ok) {color:var(--ok)}
  .ui-system :where(.cat-hidden-variants) {display:grid;gap:8px;min-width:260px}
  .ui-system :where(.cat-hidden-variants>p) {margin:0}
  .ui-system :where(.cat-variant-remove) {min-width:280px}
  .ui-system :where(.cat-variant-remove p) {margin:0}
  .ui-system :where(.cat-spec-state) {display:flex;gap:8px;align-items:center;flex-wrap:wrap}
  .ui-system :where(.cat-editor-grid) {display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px;align-items:start}
  .ui-system :where(.cat-color-checks) {display:flex;align-items:center;gap:12px;margin:0 0 16px;flex-wrap:wrap}
  .ui-system :where(.cat-color-checks>span.muted) {font-size:var(--text-sm)}
  /* «Цвета материалов» (29.09.2026): свёрнутая панель, в заголовке — что не выбрано; этапы — отдельными рамками, у материала
     строки «цвет изделия — цвет материала», невыбранный — янтарным. */
  .ui-system :where(.cat-fabrics>summary) {flex-wrap:wrap;row-gap:4px}
  .ui-system :where(.cat-fabrics-note) {font-weight:400}
  .ui-system :where(.cat-fab-body) {display:grid;gap:12px}
  .ui-system :where(.cat-fab-body>p) {margin:0}
  .ui-system :where(.cat-fab-tools) {display:flex;justify-content:flex-end}
  .ui-system :where(.cat-fab-stage) {border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
  .ui-system :where(.cat-fab-stage-head) {display:flex;align-items:center;gap:12px;padding:8px 16px;background:var(--line2);border-bottom:1px solid var(--line);font-weight:600}
  .ui-system :where(.cat-fab-stage-head>.cat-number) {width:24px;height:24px;background:var(--card)}
  .ui-system :where(.cat-fabric) {padding:16px}
  .ui-system :where(.cat-fabric+.cat-fabric) {border-top:1px solid var(--line)}
  .ui-system :where(.cat-fabric-head) {display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin:0 0 12px}
  .ui-system :where(.cat-fabric-head:last-child) {margin:0}
  .ui-system :where(.cat-fabric-name) {font-weight:600;min-width:0;overflow-wrap:anywhere}
  .ui-system :where(.cat-fabric-head>.btn) {margin-left:auto}
  .ui-system :where(.cat-fabric-comment) {width:240px;max-width:100%;height:30px;padding:4px 8px;font-size:var(--text-sm)}
  .ui-system :where(.cat-fabric>p) {margin:0}
  .ui-system :where(.cat-fabric-map) {display:grid;grid-template-columns:minmax(0,220px) minmax(0,360px);gap:8px 16px;align-items:center}
  .ui-system :where(.cat-fabric-col) {font-size:var(--text-xs);font-weight:600;color:var(--muted)}
  .ui-system :where(.cat-fabric-color) {min-width:0;overflow-wrap:anywhere}
  .ui-system :where(.cat-fabric-map>select.is-empty) {border-color:#d9a54b;background:var(--amber2)}
  .ui-system :where(.ui-spec-main>.cat-heading) {margin:24px 0 12px}
  .ui-system :where(.ui-spec-main>.cat-heading h2) {font-size:var(--text-lg)}
  .ui-system :where(.cat-stage) {background:var(--card);border:1px solid var(--line);border-radius:var(--radius);margin:0 0 8px;overflow:hidden}
  .ui-system :where(.cat-stage[open]) {border-color:#7cb8b2;box-shadow:0 0 0 1px #007f7808}
  .ui-system :where(.cat-stage summary) {display:flex;align-items:center;gap:12px;padding:16px;list-style:none;color:var(--ink)}
  .ui-system :where(.cat-stage[open]>summary) {background:var(--acc2)}
  .ui-system :where(.cat-stage-title) {font-size:var(--text-base);font-weight:600;flex:1;min-width:0}
  .ui-system :where(.cat-stage-title small) {display:block;font-size:var(--text-xs);font-weight:400;color:var(--muted);line-height:1.5;margin-top:4px}
  .ui-system :where(.cat-number) {display:grid;place-items:center;width:28px;height:28px;flex-shrink:0;padding:0;background:var(--line2);border:1px solid var(--line);border-radius:4px;font-size:var(--text-xs);font-weight:600}
  .ui-system :where(.cat-drag) {color:var(--faint);padding:4px;cursor:grab}
  .ui-system :where(.cat-stage-body) {padding:20px;border-top:1px solid var(--line)}
  .ui-system :where(.cat-stage-body>h3:first-child) {margin-top:0}
  /* Выше / ниже / удалить — в строке этапа (владелец 25.09.2026) */
  .ui-system :where(.cat-stage-tools) {display:inline-flex;gap:6px;flex:none;align-items:center}
  .ui-system :where(.cat-stage-tools>.btn.sec) {color:var(--muted)}
  .ui-system :where(.cat-stage-tools>.btn.sec:not(:disabled):hover) {color:var(--ink);border-color:#8fa3b0;filter:none}
  .ui-system :where(.cat-stage-tools>.btn:disabled) {opacity:.35}
  .ui-system :where(.cat-stage-tools>.danger) {margin-left:10px}
  .ui-system :where(.cat-stage-tools>.danger:hover) {background:var(--warnbg);filter:none}
  /* Материалы и операции этапа — строка на позицию (владелец 26.09.2026): поля без подписей, подписи — в заголовке колонок. */
  .ui-system :where(.cat-lines) {display:grid;margin:0 0 16px}
  .ui-system :where(.cat-row) {display:grid;gap:10px;align-items:center;padding:6px 0;border-bottom:1px solid var(--line2);min-width:0}
  .ui-system :where(.cat-mat-row) {grid-template-columns:minmax(0,1fr) 150px 220px 100px 30px}
  /* Строка операции (27.09.2026): название · вид работ · секунды или штуки (или «₽ фикс») · рубли · ✕ */
  .ui-system :where(.cat-op-row) {grid-template-columns:minmax(0,1fr) 170px 180px 90px 30px}
  .ui-system :where(.cat-op-value) {display:flex;align-items:center;gap:6px;min-width:0}
  .ui-system :where(.cat-op-value>input) {width:72px;flex:none}
  .ui-system :where(.cat-op-value>select) {min-width:0;flex:1;padding-right:4px}
  .ui-system :where(.cat-op-sum) {font-size:var(--text-sm)}
  .ui-system :where(.cat-op-sum.warn) {color:var(--amber);font-size:var(--text-xs)}
  .ui-system :where(.cat-lines-add) {display:flex;align-items:center;gap:4px;flex-wrap:wrap;font-weight:400}
  .ui-system :where(.cat-ops-sum) {display:grid;justify-items:end;gap:4px;margin-right:40px;text-align:right}
  .ui-system :where(.cat-ops-secs) {font-weight:400}                     /* секунды по видам работ под итогом */
  .ui-system :where(.cat-ops-secs:empty) {display:none}
  /* Где шьём модель (владелец 26.09.2026): галочки производств и одно «по умолчанию». */
  .ui-system :where(.cat-sew) {display:grid;gap:6px;align-content:start}          /* рамка — общая у fieldset дизайн-системы */
  .ui-system :where(.cat-sew>legend) {padding:0 4px;font-size:var(--text-sm);font-weight:500;color:var(--muted)}
  .ui-system :where(.cat-sew-row) {display:flex;align-items:center;gap:16px;flex-wrap:wrap}
  .ui-system :where(.cat-sew-row>.cat-sew-default) {color:var(--muted);font-size:var(--text-xs);min-height:24px}
  .ui-system :where(.cat-site-one) {display:block;padding:6px 0;font-size:var(--text-base);font-weight:600;color:var(--ink)}
  /* Справочник операций: строка — название, где используется, «в выборе», сохранить, выше/ниже/удалить. */
  .ui-system :where(.op-dir>summary) {margin-bottom:0}
  .ui-system :where(.op-dir[open]>summary) {margin-bottom:12px}
  /* Виды работ (27.09.2026): название · как считаем · цена на каждом производстве · инструменты */
  .ui-system :where(.op-dir-row,.op-dir-head) {display:grid;grid-template-columns:minmax(0,1fr) 150px repeat(3,110px) 450px;gap:8px;align-items:center}
  .ui-system :where(.op-dir-row) {padding:6px 0;border-bottom:1px solid var(--line2)}
  .ui-system :where(.op-dir-head) {font-size:12px;color:var(--muted);padding-bottom:4px;border-bottom:1px solid var(--line2)}
  .ui-system :where(.op-dir-tools) {display:flex;gap:8px;align-items:center;justify-content:flex-end;white-space:nowrap}
  .ui-system :where(.op-price>input) {width:100%;text-align:right}
  .ui-system :where(.op-price>span) {display:none}
  .ui-system :where(.op-prices) {display:grid;gap:12px}
  .ui-system :where(.op-prices>p) {margin:0}
  .ui-system :where(.op-index,.op-prices-from) {display:flex;flex-direction:row;gap:12px;align-items:center;flex-wrap:wrap}
  .ui-system :where(.op-prices-from) {color:var(--ink);font-size:var(--text-sm)}
  .ui-system :where(.op-prices-from>input) {width:170px}
  .ui-system :where(.op-index-pct) {display:flex;flex-direction:row;align-items:center;gap:6px;color:var(--ink)}
  .ui-system :where(.op-index-pct>input) {width:64px;text-align:right}
  .ui-system :where(.op-rub) {grid-column:span 3}
  /* Где вид работ считается (28.09.2026): чип под названием, отметки производств — по раскрытию */
  .ui-system :where(.op-name) {display:flex;flex-direction:column;gap:4px;min-width:0}
  .ui-system :where(.op-sites>summary) {cursor:pointer;font-size:var(--text-xs);color:var(--muted);width:max-content}
  .ui-system :where(.op-sites[open]) {display:flex;flex-wrap:wrap;gap:4px 12px;align-items:center}
  .ui-system :where(.op-sites[open]>summary) {flex-basis:100%}
  .ui-system :where(.op-na) {text-align:center}
  .ui-system :where(.op-dir-row.is-off>input[name=name]) {color:var(--muted)}
  .ui-system :where(.op-dir-row.is-clean .op-save) {visibility:hidden}
  .ui-system :where(.op-dir-add) {display:flex;gap:8px;align-items:center;padding-top:12px}
  .ui-system :where(.op-dir-add>input) {max-width:420px}
  .ui-system :where(.cat-row-head) {padding:0 0 6px;border-bottom-color:var(--line);font-size:var(--text-xs);font-weight:600;color:var(--muted)}
  .ui-system :where(.cat-row input,.cat-row select) {height:30px;padding:4px 8px;font-size:var(--text-sm);line-height:20px}
  .ui-system :where(.cat-row .num,.cat-row input.num,.cat-lines-total) {text-align:right;font-variant-numeric:tabular-nums}
  .ui-system :where(.cat-row .btn.ui-icon) {width:30px;height:30px;min-height:30px}
  .ui-system :where(.cat-cell-name) {display:flex;align-items:center;gap:8px;min-width:0}
  .ui-system :where(.cat-op-row>.cat-cell-name) {flex-wrap:wrap}
  .ui-system :where(.cat-labor-role) {flex-basis:100%;padding-left:24px}
  .ui-system :where(.cat-mat-name) {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm);font-weight:500}
  .ui-system :where(.cat-mat-comment) {display:inline-block;flex:0 1 auto;min-width:48px;max-width:180px;padding:1px 6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-xs)}
  .ui-system :where(.cat-mat-comment[hidden]) {display:none}
  /* Подсчёт выделенного (02.10.2026): галочка у строки, полоса «Выделено» внизу — над панелью сохранения, если она поднята. */
  .ui-system :where(.cat-row input.cat-pick,.cat-pick-head>input.cat-pick) {width:16px;height:16px;min-height:0;padding:0;margin:0;flex:none;accent-color:var(--acc);cursor:pointer}
  .ui-system :where(.cat-pick-head) {display:inline-flex;align-items:center;gap:8px}
  .ui-system :where(.cat-row.is-picked) {background:var(--acc2)}
  .ui-system :where(.cat-pickbar) {position:fixed;left:32px;right:32px;bottom:16px;max-width:1376px;margin:0 auto;z-index:10;display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;padding:10px 16px;border:1px solid #7cb8b2;border-radius:var(--radius);background:#fff;box-shadow:var(--shadow);font-size:var(--text-sm);font-variant-numeric:tabular-nums}
  .ui-system :where(.cat-pickbar[hidden]) {display:none}
  .ui-system :where(.cat-pickbar>.btn) {margin-left:auto;width:30px;height:30px;min-height:30px}
  .ui-system :where(.ui-dirty .cat-pickbar) {bottom:var(--pick-offset,104px)}
  .ui-system :where(.cat-cell-norm,.cat-cell-price) {display:flex;align-items:center;gap:6px;min-width:0;white-space:nowrap;font-size:var(--text-sm)}
  .ui-system :where(.cat-cell-norm>input) {width:76px}
  .ui-system :where(.cat-cell-norm>select) {width:62px;padding-right:4px}
  .ui-system :where(.cat-cell-price>input) {width:84px}
  .ui-system :where(.cat-unit) {color:var(--muted);font-size:var(--text-xs)}
  .ui-system :where(.cat-cell-sum) {font-size:var(--text-sm)}
  .ui-system :where(.cat-src) {font-size:var(--text-xs);color:var(--muted);overflow:hidden;text-overflow:ellipsis}
  /* «Только для цветов» у строки (владелец 26.09.2026): чип рядом с названием, отметки — под строкой. */
  .ui-system :where(.btn.cat-color-chip) {flex:none;height:24px;min-height:24px;padding:0 8px;font-size:var(--text-xs);font-weight:500;color:var(--muted);border:1px dashed var(--line)}
  .ui-system :where(.btn.cat-color-chip.is-on) {color:var(--amber);background:var(--amber2);border:1px solid transparent}
  .ui-system :where(.cat-color-pick) {display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;padding:6px 0 10px}
  .ui-system :where(.cat-color-pick[hidden]) {display:none}
  .ui-system :where(.cat-star) {display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;padding:0;border:0;background:none;color:var(--muted);font-size:17px;line-height:1;cursor:pointer}
  .ui-system :where(.cat-star.is-on) {color:#d99a1b;cursor:default}
  .ui-system :where(button.cat-star:hover) {color:#d99a1b}
  .ui-system :where(.cat-star-hint) {margin:-8px 0 12px}
  .ui-system :where(.cat-cell-name>select) {min-width:0;flex:1}
  .ui-system :where(.cat-sticker-row .cat-cell-name) {flex-wrap:wrap}
  .ui-system :where(.cat-sticker-row .cat-sticker-pick) {flex:1 1 100%}
  .ui-system :where(.cat-op-auto) {color:var(--muted)}
  .ui-system :where(.st-row) {display:grid;grid-template-columns:minmax(0,1fr) 150px minmax(0,260px) 280px;gap:8px;align-items:center}
  .ui-system :where(.cs-row) {display:grid;grid-template-columns:minmax(0,1fr) 80px 130px minmax(0,240px) 280px;gap:8px;align-items:center}
  .ui-system :where(.cat-by-color) {margin-top:4px;padding-top:8px;border-top:1px dashed var(--line)}
  .ui-system :where(.cat-src.warn) {flex:none;color:var(--amber);background:var(--amber2);padding:1px 6px;border-radius:4px}
  .ui-system :where(.cat-mat-results) {display:flex;flex-wrap:wrap;gap:6px;padding:6px 0 10px;font-size:var(--text-sm);color:var(--muted)}
  .ui-system :where(.cat-mat-results[hidden]) {display:none}
  .ui-system :where(.cat-lines-foot) {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0 0;font-size:var(--text-sm);font-weight:600}
  .ui-system :where(.cat-mats .cat-lines-total) {margin-right:40px}           /* под колонкой «На изделие», не под ✕ */
  .ui-system :where(.cat-lines-empty) {display:flex;align-items:center;gap:16px;padding:0 0 4px;color:var(--muted);font-size:var(--text-sm)}
  .ui-system :where(.btn.cat-add) {color:var(--acc-ink);padding:0 8px;margin-left:-8px}
  .ui-system :where(.cat-work) {border-top:1px solid var(--line);padding-top:12px}
  .ui-system :where(.cat-work-head) {display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 8px}
  .ui-system :where(.cat-work-title) {font-size:var(--text-sm);font-weight:600;color:var(--ink)}
  .ui-system :where(.cat-work-head>select) {width:220px;height:30px;padding:4px 8px;font-size:var(--text-sm)}
  .ui-system :where(.cat-estimate) {position:sticky;top:calc(var(--app-header-height, 60px) + 24px);padding:20px;border-top:3px solid var(--acc);margin:0}
  .ui-system :where(.cat-estimate>h3:first-child) {margin:0;font-size:var(--text-lg)}
  .ui-system :where(.cat-total) {font-size:var(--text-title);font-weight:650;line-height:1.2;margin:12px 0 4px;letter-spacing:-.03em;color:var(--ink)}
  .ui-system :where(.cat-context) {display:grid;grid-template-columns:1fr;gap:12px;background:none;padding:16px 0;margin:16px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);border-radius:0}
  .ui-system :where(.cat-context>label) {min-width:0;flex:initial;font-size:var(--text-xs);grid-column:1/-1}

  .ui-system :where(.cat-cost-lines) {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin:16px 0;font-size:var(--text-sm)}
  .ui-system :where(.cat-cost-lines dd) {margin:0;text-align:right;font-weight:600}
  .ui-system :where(#cat-calc-state) {font-size:var(--text-xs);color:var(--muted);padding:12px;background:var(--line2);border-radius:4px;overflow-wrap:anywhere}
  .ui-system :where(.cat-estimate ul) {font-size:var(--text-xs);line-height:1.6;padding-left:16px;margin-bottom:0;color:var(--muted)}
  .ui-system :where(.ui-add-stage) {display:flex;gap:12px;align-items:end;flex-wrap:wrap;padding:16px 0}
  .ui-system :where(.ui-add-stage>label) {flex:1;min-width:160px}
  /* Long forms: original save controls move into a fixed rail only while dirty. */
  .ui-system :where(.ui-savebar) {display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;position:static;padding:16px 20px;margin-top:24px;border:1px solid var(--line);border-radius:var(--radius);background:var(--card);font-size:var(--text-sm)}
  .ui-system :where(.ui-dirty .ui-savebar) {position:fixed;bottom:16px;left:32px;right:32px;max-width:1376px;margin:0 auto;z-index:9;box-shadow:var(--shadow);border-color:#7cb8b2;background:#fff}
  .ui-system :where(.ui-dirty .ui-savebar>div:first-child) {color:var(--acc-ink);font-weight:600}
  /* Batch: metadata, quantities and actions each have their own aligned row. */
  .ui-system :where(.lx-launch) {padding:0;overflow:hidden;margin-bottom:24px}
  .ui-system :where(.lx-launch>.cat-heading) {padding:20px;margin:0;border-bottom:1px solid var(--line);background:#fafcfd;align-items:start;flex-wrap:nowrap}
  .ui-system :where(.lx-launch h2) {font-size:var(--text-lg);margin:0 0 12px;line-height:1.5}
  .ui-system :where(.lx-launch h2 a) {color:var(--ink)}
  .ui-system :where(.lx-launch>.cat-fields) {margin:20px}
  .ui-system :where(.lx-launch>.cat-table-wrap) {margin:0 20px 16px}
  .ui-system :where(.lx-plan-mini) {display:flex;align-items:flex-end;flex-direction:column;gap:4px;flex-shrink:0;max-width:240px}
  .ui-system :where(.lx-plan-mini b) {font-size:var(--text-xl);font-weight:650}
  .ui-system :where(.lx-plan-mini .small) {font-size:var(--text-xs);text-align:right}
  .ui-system :where(.lx-grid) {min-width:780px;table-layout:fixed}
  .ui-system :where(.lx-grid th:first-child) {width:300px}
  .ui-system :where(.lx-grid td) {padding:12px;vertical-align:middle}
  .ui-system :where(.lx-grid input) {width:100%;text-align:right}
  .ui-system :where(.lx-grid th.lx-height) {width:96px}          /* ростовка (02.10.2026): строка — цвет и рост, столбец — размер */
  .ui-system :where(.lx-grid td.lx-height) {white-space:nowrap;color:var(--muted);font-size:var(--text-sm)}
  .ui-system :where(.lx-cv) {margin:0;max-width:100%;font-size:var(--text-sm)}
  .ui-system :where(.ui-fabric-label) {margin-top:8px;font-size:var(--text-xs)}
  .ui-system :where(.lx-plan) {margin:16px 20px;font-size:var(--text-sm)}
  .ui-system :where(.lx-plan>summary) {font-size:var(--text-sm);font-weight:500}
  .ui-system :where(.lx-actions) {margin:0;padding:16px 20px;border-top:1px solid var(--line);align-items:center;background:var(--line2)}
  .ui-system :where(.ui-action-help) {flex-basis:100%;font-size:var(--text-xs);color:var(--muted);margin:0}
  .ui-system :where(.ui-ms-sync-text) {display:grid;gap:4px;flex:1;min-width:0}          /* «Остатки и цены из МойСклада» (материалы, 29.09.2026) */
  .ui-system :where(.ui-cost-section+.ui-cost-section) {margin-top:32px}   /* «Ставки и расходники»: разделы одной страницы */
  .ui-system :where(.ui-cost-section>.cat-heading) {margin-bottom:8px}
  /* «Материалы» (29.09.2026): группы по типу, цена и остаток справа, цвета с остатками — раскрываются под остатком */
  .ui-system :where(.mat-count) {margin:0 0 8px}
  .ui-system :where(.mat-table) {min-width:640px}
  .ui-system :where(.mat-table td:first-child) {width:55%}
  .ui-system :where(.mat-table td) {vertical-align:top}
  .ui-system :where(.mat-group th) {background:var(--line2);color:var(--ink);font-size:var(--text-sm);font-weight:600;text-align:left}
  .ui-system :where(.mat-table tr.is-off td) {color:var(--muted)}
  .ui-system :where(.mat-colors) {margin-top:4px;white-space:normal}
  .ui-system :where(.mat-colors>summary) {font-size:var(--text-xs);font-weight:500;color:var(--acc-ink)}
  .ui-system :where(.mat-colors ul) {list-style:none;margin:8px 0 0;padding:0;display:grid;gap:4px;min-width:220px;text-align:left}
  .ui-system :where(.mat-colors li) {display:flex;justify-content:space-between;gap:12px;font-size:var(--text-xs)}
  .ui-system :where(.mat-colors li>span:last-child) {white-space:nowrap;font-variant-numeric:tabular-nums}
  .ui-system :where(.mat-archived) {align-self:end;min-height:36px}
  .ui-system :where(.mat-archive-note) {display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:0 0 16px}
  .ui-system :where(.mat-archive) {margin:12px 0;padding-top:12px;border-top:1px solid var(--line)}
  .ui-system :where(.lx-deficit) {align-self:end;min-height:36px}   /* «Потребность»: только дефицит — к дозаказу */
  /* «Выпуск по списку» (29.09.2026): ввод годных и брака по строкам НЗП */
  .ui-system :where(.ui-grow) {flex:1 1 280px}
  .ui-system :where(.out-grid input.out-qty) {width:88px;margin-left:auto}
  .ui-system :where(.out-grid select) {min-width:160px}
  .ui-system :where(.out-grid tr.muted td) {color:var(--muted)}
  .ui-system :where(.out-add h3) {font-size:var(--text-base);margin:16px 0 8px}
  .ui-system :where(.out-actions) {margin-top:16px}
  .ui-system :where(.out-positions ul) {margin:8px 0;padding-left:18px}
  .ui-system :where(.out-model) {display:grid;gap:6px;max-width:640px}
  .ui-system :where(.out-model>label) {font-size:var(--text-sm);font-weight:500;color:var(--muted)}
  .ui-system :where(.out-model>p) {margin:0}
  .ui-system :where(.out-search) {position:relative}
  .ui-system :where(.out-suggest) {position:absolute;z-index:30;left:0;right:0;top:calc(100% + 4px);max-height:320px;overflow:auto;margin:0;padding:4px;list-style:none;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
  .ui-system :where(.out-suggest li) {padding:8px 12px;border-radius:var(--radius-sm);cursor:pointer;font-size:var(--text-sm)}
  .ui-system :where(.out-suggest li:hover,.out-suggest li.is-active) {background:var(--acc2)}
  .ui-system :where(.out-suggest li.muted) {cursor:default;color:var(--muted);background:none}
  .ui-system :where(.lx-add) {margin-top:24px;align-items:end;gap:16px}
  .ui-system :where(.lx-add label) {min-width:0;flex:1}
  .ui-system :where(.lx-outsource[hidden],[hidden]) {display:none}
  .ui-system :where(.cat-color-form) {grid-template-columns:1fr 1.4fr 1fr auto;gap:16px;align-items:start}
  .ui-system :where(.cat-size-picker) {grid-column:1/-1;order:1}
  /* Кнопка цветомодели — по нижней линии полей и по своей ширине, а не на всю колонку у подписей (владелец 25.09.2026). */
  .ui-system :where(.cat-color-form)>:where(button,.btn,div:not(.cat-size-picker)) {align-self:end}
  .ui-system :where(.cat-color-form)>:where(button,.btn) {justify-self:start}
  .ui-system :where(.cat-color-item>summary .tag) {font-size:var(--text-xs)}
  .ui-system :where(.cat-color-archive>summary) {color:var(--muted);font-weight:500}      /* «В архиве · N» — архивные цвета свёрнуты */
  .ui-system :where(.cat-color-archive>.cat-color-item) {margin-left:24px}
  .ui-system :where(.cat-size-options,.cat-size-matrix) {gap:8px}
  .ui-system :where(.cat-size-chip) {padding:8px;border:1px solid var(--line);border-radius:4px}
  .ui-system :where(.ui-table-scroll) {max-width:100%;overflow-x:auto}
  .ui-system :where(.ui-table-scroll>table) {min-width:600px}
  .ui-system .information-library {grid-template-columns:minmax(0,1fr)}
  .ui-system .information-compact-table>table {min-width:0}
  .ui-system .information-library :where(td, th, .information-notes) {overflow-wrap:anywhere}
  .ui-system .information-library td {white-space:pre-line}
  /* Shared screen components: registers, filter forms and development workspace. */
  .ui-system :where(.filters) {display:flex;flex-wrap:wrap;align-items:end;gap:16px;padding:16px;margin:16px 0;background:var(--card);border:1px solid var(--line);border-radius:var(--radius)}
  .ui-system :where(.filters .f) {flex:1 1 160px;min-width:0;display:grid;gap:6px}
  .ui-system :where(.filters .f>input,.filters .f>select) {width:100%}
  .ui-system :where(form.block.row>label) {flex:1 1 180px}
  .ui-system :where(form.block.row>.btn) {align-self:end}
  .ui-system :where(.row>.small.muted) {flex-basis:100%;margin:0}
  .ui-system :where(.row>label) {min-width:0}
  .ui-system :where(fieldset) {min-width:0;border:1px solid var(--line);border-radius:4px;padding:12px;margin:0}
  .ui-system :where(legend) {padding:0 4px;font-size:var(--text-xs);color:var(--muted)}
  .ui-system :where(.lx-statuses) {grid-column:1/-1;display:flex;gap:16px;flex-wrap:wrap;border:0;padding:0}
  .ui-system :where(.lx-statuses legend) {margin-bottom:8px}
  .ui-system :where(.lx-metrics) {display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:16px 0}
  .ui-system :where(.lx-metrics>div) {display:grid;align-content:start;gap:8px;padding:16px;border:1px solid var(--line);border-radius:4px;background:var(--line2)}
  .ui-system :where(.lx-metrics b) {font-size:var(--text-xl)}
  /* Подгонка ткани (30.09.2026): цифры — липкие под шапкой сайта, строки — карточками заказов, у цвета — выбор спецификации */
  .ui-system :where(.lx-fit-head) {position:sticky;top:var(--app-header-height, 60px);z-index:4;background:var(--card);padding:8px 0 4px;border-bottom:1px solid var(--line)}
  .ui-system :where(.lx-fit-head .lx-metrics) {margin:8px 0}
  .ui-system :where(.lx-fit-head .lx-metrics>div) {gap:4px;padding:10px 12px}
  .ui-system :where(.lx-reserved) {margin:12px 0}
  .ui-system :where(.lx-reserved p) {margin:8px 0 0;line-height:1.8}
  .ui-system :where(.lx-fit-order) {margin:16px 0;padding:12px 16px;border:1px solid var(--line);border-radius:4px;background:var(--card)}
  .ui-system :where(.lx-fit-order-head) {display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px}
  .ui-system :where(.lx-fit-order-need) {margin-left:auto}
  .ui-system :where(.lx-fit-color) {margin-top:12px}
  .ui-system :where(.lx-fit-color-head) {display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;margin-bottom:6px}
  .ui-system :where(.lx-fit-order .ui-table-scroll>table) {min-width:0}
  .ui-system :where(.lx-fit-q) {width:5em}
  .ui-system :where(.lx-fit-spec) {display:flex;align-items:center;gap:8px;margin-left:auto;min-width:0}
  .ui-system :where(.lx-fit-spec select) {max-width:min(560px,100%)}
  .ui-system :where(.tag.lx-st-confirmed,.tag.lx-st-closed,.tag.green) {color:var(--acc-ink);background:var(--acc2)}
  .ui-system :where(.tag.lx-st-cancelled,.tag.red,.overdue,.bad) {color:var(--warn)}
  .ui-system :where(.tag.wait,.tag.amber,.tag.age-warn,.board-wait,.legend-amber) {color:var(--amber);background:var(--amber2)}
  .ui-system :where(.tag.age-bad,.legend-red) {color:var(--warn);background:var(--warnbg)}
  .ui-system :where(.tag.P2) {color:var(--amber);background:var(--amber2)}
  .ui-system :where(.tag.P3) {color:var(--muted);background:var(--line2)}
  .ui-system :where(.cat-form) {display:grid;gap:16px;margin-top:16px}
  .ui-system :where(.cat-form .cat-fields) {margin:0}
  .ui-system :where(.cat-form>label) {gap:6px}
  .ui-system :where(.mat-supplier) {padding:16px 0;border-bottom:1px solid var(--line)}
  .ui-system :where(.mat-supplier>summary) {line-height:1.6}
  .ui-system :where(.stage-row>summary) {flex-wrap:wrap;line-height:1.5}
  .ui-system :where(.stage-row>summary .muted) {font-size:var(--text-xs)}
  .ui-system :where(.cat-heading>.muted) {font-size:var(--text-sm);flex-basis:100%}
  .ui-system :where(table th) {position:static}
  .ui-system :where(.table-scroll,div.cat-table,.development-table) {background:var(--card)}
  .ui-system :where(.table-scroll table,.development-table table,div.cat-table table) {min-width:650px}
  .ui-system :where(.cat-table-wrap td,.cat-table-wrap th) {min-width:80px}
  .ui-system :where(table input,table select) {min-width:80px}
  .ui-system :where(table input[type=checkbox]) {min-width:16px}
  .ui-system :where(.tabs,.board-views) {display:flex;gap:4px;flex-wrap:wrap;margin:16px 0;border-bottom:1px solid var(--line);background:transparent;border-radius:0;padding:0}
  .ui-system :where(.tabs a,.board-views a) {display:block;padding:10px 16px;font-size:var(--text-sm);color:var(--muted);border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent}
  .ui-system :where(.tabs a.on,.board-views a.on) {color:var(--acc-ink);border-bottom-color:var(--acc);background:transparent;font-weight:600}
  .ui-system :where(.section-nav>a) {font-size:var(--text-sm);color:white;padding:10px 8px;white-space:nowrap}
  .ui-system :where(.board-filter-chips) {display:flex;gap:8px;flex-wrap:wrap;grid-column:span 2;margin:0}
  .ui-system :where(.board-filter-chips button) {min-height:36px;padding:6px 12px;border:1px solid var(--line);border-radius:4px;color:var(--ink);background:var(--card);font:inherit;font-size:var(--text-xs)}
  .ui-system :where(.board-filter-chips button[aria-pressed=true]) {background:var(--acc2);border-color:var(--acc);color:var(--acc-ink)}
  .ui-system :where(.board-more) {padding-top:12px;margin-top:12px;border-top:1px solid var(--line)}
  .ui-system :where(.board-more>summary) {font-size:var(--text-sm);color:var(--muted)}
  .ui-system :where(.board-more .board-filter-line) {margin-top:16px}
  .ui-system :where(.board-caption,.board-card-meta,.board-card-footer,.board-article,.board-column-empty,.board-photo-empty,.board-brand,.board-col-number,.board-col-count) {font-size:var(--text-xs);color:var(--muted);letter-spacing:0}
  .ui-system :where(.board) {max-width:100%;overflow-x:auto}
  .ui-system :where(.col h3) {display:flex;font-size:var(--text-sm);margin:0;padding:16px 4px;letter-spacing:0;text-transform:none}
  .ui-system :where(.kcard) {background:var(--card);border:1px solid var(--line);border-radius:8px;color:var(--ink)}
  .ui-system :where(.board-card-name,.kcard .n) {font-size:var(--text-base);font-weight:600;color:var(--ink)}
  .ui-system :where(.kcard .a) {font-size:var(--text-sm);color:var(--acc-ink)}
  .ui-system :where(.board-wait) {font-size:var(--text-xs);padding:8px;line-height:1.5}
  .ui-system :where(.kcard details.quick>summary) {font-size:var(--text-xs);color:var(--acc-ink)}
  .ui-system :where(.entry) {padding:16px 0;overflow-wrap:anywhere}
  .ui-system :where(.entry .d) {font-size:var(--text-xs);color:var(--muted);margin-bottom:8px}
  .ui-system :where(.entry .txt) {font-size:var(--text-base);line-height:1.6}
  .ui-system :where(.refgrid) {grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:20px}
  .ui-system :where(.ref) {background:var(--card);border-color:var(--line);border-radius:8px;overflow:hidden}
  .ui-system :where(.ref .b) {padding:16px}
  .ui-system :where(.ref .t) {font-size:var(--text-lg)}
  .ui-system :where(.grid>*,.cat-editor-grid>*,.card-layout>*) {min-width:0}
  .ui-system :where(.login) {max-width:420px;margin:64px auto;padding:32px}
  .ui-system :where(.login label) {margin-top:16px;margin-bottom:6px}
  .ui-system :where(.login .btn) {width:100%;margin-top:24px}
  .ui-system.ui-touch {--control-height:48px}
  .ui-system :where(.kiosk) {font-size:18px}
  .ui-system :where(.kiosk .btn,.kiosk-choice,.kiosk input:not([type=checkbox]),.kiosk select) {min-height:48px;height:auto;font-size:18px;padding:12px 16px}
  .ui-system :where(.kiosk-scan input) {font-size:24px}
  .ui-system :where(.kiosk-done) {min-height:64px}
  .ui-system :where(.kiosk label) {font-size:16px}
  .ui-system :where(.kiosk .small,.kiosk-status,.kiosk-exit) {font-size:14px}
  .ui-system :where(.kiosk-msg,.kiosk-status.warn) {color:var(--amber)}
  .ui-system :where(.kiosk-bar,.kiosk-scan,.kiosk-pick,.kiosk-form,.kiosk-last) {padding:20px;border-radius:8px}
  .ui-system :where(.kiosk-kit) {display:grid;gap:8px;margin:12px 0;padding:12px 16px;border:1px solid var(--line);border-radius:8px;background:var(--card)}
  .ui-system :where(.kiosk-kit-row) {display:flex;flex-wrap:wrap;gap:2px 16px;align-items:baseline;justify-content:space-between}
  .ui-system :where(.kiosk-kit-row>.small) {flex-basis:100%;color:var(--muted)}
  .ui-system :where(.kiosk-kit-row.prep>span:first-child) {color:var(--muted)}
  .ui-system :where(.cat-kit-prep) {display:grid;gap:4px;margin:8px 0 4px;padding:8px 12px;border:1px dashed var(--line);border-radius:6px;color:var(--muted);font-size:var(--text-sm)}
  .ui-system.kiosk-page header.top {display:none}
  @media(max-width:760px) {
    .ui-system :where(.section-nav) {flex-wrap:wrap;justify-content:start}
    .ui-system :where(.filters) {display:grid;grid-template-columns:1fr 1fr;padding:16px;gap:12px}
    .ui-system :where(.filters>.btn,.filters>.ui-action-help,.filters>.row) {grid-column:1/-1}
    .ui-system :where(form.block.row>label) {flex-basis:100%}
    .ui-system :where(.row>label) {max-width:100%}
    .ui-system :where(.cat-form,.grid,.fields) {grid-template-columns:minmax(0,1fr)}
    .ui-system :where(.cat-form>*,.grid>*,.fields>*) {grid-column:auto;min-width:0;max-width:100%}
    .ui-system :where(.lx-metrics) {grid-template-columns:repeat(2,minmax(0,1fr))}
    .ui-system :where(.lx-statuses) {gap:8px}
    .ui-system :where(.board-filter-chips) {grid-column:1/-1}
    .ui-system :where(.ui-savebar>.btn) {white-space:normal;height:auto;min-height:36px;padding:8px 12px}
    .ui-system :where(.kiosk-fields) {grid-template-columns:minmax(0,1fr)}
    .ui-system :where(.kiosk-bar,.kiosk-scan,.kiosk-pick,.kiosk-form,.kiosk-last) {padding:16px}
    .ui-system :where(.kiosk-actions>.btn) {width:100%}
  }
  /* Model workflow and content tabs: shared semantic states. */
  .ui-system :where(.step) {display:flex;flex-direction:column;align-items:start;justify-content:start;gap:8px;min-height:88px;padding:12px;font:500 var(--text-xs)/1.4 system-ui,sans-serif;overflow-wrap:normal;color:var(--muted);background:var(--line2)}
  .ui-system :where(.step.cur) {background:var(--acc);color:white}
  .ui-system :where(.step.past) {background:var(--acc2);color:var(--acc-ink)}
  .ui-system :where(.step-number) {width:25px;min-width:25px;height:25px;flex:0 0 25px;font-size:var(--text-xs);color:var(--muted);background:#e2e8ec}
  .ui-system :where(.step.past .step-number) {background:var(--acc);color:white}
  .ui-system :where(.step.cur .step-number) {background:transparent;color:white;border:1px solid white}
  .ui-system :where(.ctabs) {display:flex;gap:4px;flex-wrap:wrap;padding:12px 0;margin-bottom:20px;border-bottom:1px solid var(--line)}
  .ui-system :where(.ctabs button) {padding:8px 12px;min-height:36px;font-size:var(--text-sm);color:var(--muted);border-radius:4px}
  .ui-system :where(.ctabs button.on) {background:var(--acc);color:white}
  .ui-system :where(.board-col-number) {background:var(--line2)}
  .ui-system :where(.detail-heading .art) {font-size:var(--text-lg);font-weight:500;color:var(--muted)}
  .ui-system :where(.btn:not(.sec):not(.ghost):not(.danger)) {color:white}
  .ui-system :where(.lbl-grid>*) {min-width:0}
  .ui-system :where(.lbl-fields) {gap:16px}
  .ui-system :where(.lbl-fields label) {align-self:start}
  .ui-system :where(.lbl-fields .lbl-bool) {min-height:36px;align-self:end}
  .ui-system :where(.lbl-preview>.row) {display:grid;grid-template-columns:minmax(0,1fr) 80px 110px;align-items:end}
  .ui-system :where(.lbl-preview>.lbl-toggles) {display:flex;gap:12px;flex-wrap:wrap}
  .ui-system :where(.lbl-preview>label) {margin-top:16px}
  @media(max-width:760px) {
    .ui-system :where(.step) {flex-direction:row;align-items:center;min-height:52px;padding:8px}
    .ui-system :where(.lbl-preview>.row) {grid-template-columns:1fr 1fr}
    .ui-system :where(.lbl-preview>.row>label:first-child) {grid-column:1/-1}
  }
  .ui-system :where(main.ui-fluid) {max-width:none}
  /* Доска, список и матрица разработки — на всю ширину экрана (владелец 05.10.2026: «столбцы не растянуты на весь экран») */
  .ui-system :where(main.wide:not(.card-detail)) {max-width:none}
  .ui-system :where(.users-register) {border:1px solid var(--line);border-radius:var(--radius);background:var(--card)}
  /* Липкая строка заголовков (владелец 06.10.2026): таблица прокручивается внутри себя — в блоке с горизонтальной прокруткой
     sticky держится за блок, а не за страницу */
  .ui-system :where(.users-register) {max-height:calc(100vh - var(--app-header-height, 60px) - 24px);overflow:auto}
  .ui-system :where(.users-table thead th) {position:sticky;top:0;z-index:2;background:var(--line2);box-shadow:inset 0 -1px 0 var(--line)}
  .ui-system :where(.users-register>.users-table) {min-width:1560px;table-layout:fixed}
  .ui-system :where(.users-login) {width:120px}
  .ui-system :where(.users-name) {width:240px}
  .ui-system :where(.users-kvant) {width:100px}
  .ui-system :where(.users-save) {width:120px}
  .ui-system :where(.users-table th) {vertical-align:top;overflow-wrap:break-word;line-height:1.5}
  .ui-system :where(.users-table td) {padding:16px 12px}
  .ui-system :where(.users-table input:not([type=checkbox])) {min-width:0;width:100%}
  .ui-system :where(.users-table .users-tools) {padding:12px;background:var(--line2);border-bottom:2px solid var(--line)}
  .ui-system :where(.users-tools select) {width:240px}
  /* Static layout utilities; use component grids for new forms. */
  .ui-system :where(.ui-align-center) {align-items:center}
  .ui-system :where(.ui-align-flex-start) {align-items:flex-start}
  .ui-system :where(.ui-border-bottom-2px-solid-var-line) {border-bottom:2px solid var(--line)}
  .ui-system :where(.ui-border-top-1px-solid-var-line) {border-top:1px solid var(--line)}
  .ui-system :where(.ui-col-1-1) {grid-column:1/-1}
  .ui-system :where(.ui-col-1-3) {grid-column:1/3}
  .ui-system :where(.ui-col-1-4) {grid-column:1/4}
  .ui-system :where(.ui-color-var-muted) {color:var(--muted)}
  .ui-system :where(.ui-cursor-pointer) {cursor:pointer}
  .ui-system :where(.ui-decoration-line-through) {text-decoration:line-through}
  .ui-system :where(.ui-display-block) {display:block}
  .ui-system :where(.ui-display-grid) {display:grid}
  .ui-system :where(.ui-display-inline-block) {display:inline-block}
  .ui-system :where(.ui-display-inline-flex) {display:inline-flex}
  .ui-system :where(.ui-flex-1) {flex:1}
  .ui-system :where(.ui-font-monospace) {font-family:monospace}
  .ui-system :where(.ui-gap-10px) {gap:10px}
  .ui-system :where(.ui-gap-16px) {gap:16px}
  .ui-system :where(.ui-gap-18px) {gap:18px}
  .ui-system :where(.ui-gap-20px) {gap:20px}
  .ui-system :where(.ui-gap-4px) {gap:4px}
  .ui-system :where(.ui-gap-5px) {gap:5px}
  .ui-system :where(.ui-gap-6px) {gap:6px}
  .ui-system :where(.ui-gap-8px) {gap:8px}
  .ui-system :where(.ui-h-32px) {height:32px}
  .ui-system :where(.ui-justify-space-between) {justify-content:space-between}
  .ui-system :where(.ui-list-none) {list-style:none}
  .ui-system :where(.ui-margin-4px-0) {margin:4px 0}
  .ui-system :where(.ui-margin-60px-auto) {margin:60px auto}
  .ui-system :where(.ui-margin-6px-0) {margin:6px 0}
  .ui-system :where(.ui-margin-6px-0-12px) {margin:-6px 0 12px}
  .ui-system :where(.ui-max-480px) {max-width:480px}
  .ui-system :where(.ui-max-640px) {max-width:640px}
  .ui-system :where(.ui-max-720px) {max-width:720px}
  .ui-system :where(.ui-max-760px) {max-width:760px}
  .ui-system :where(.ui-max-900px) {max-width:900px}
  .ui-system :where(.ui-max-980px) {max-width:980px}
  .ui-system :where(.ui-mb-10px) {margin-bottom:10px}
  .ui-system :where(.ui-mb-12px) {margin-bottom:12px}
  .ui-system :where(.ui-mb-14px) {margin-bottom:14px}
  .ui-system :where(.ui-mb-18px) {margin-bottom:18px}
  .ui-system :where(.ui-min-0) {min-width:0}
  .ui-system :where(.ui-min-200px) {min-width:200px}
  .ui-system :where(.ui-min-220px) {min-width:220px}
  .ui-system :where(.ui-min-240px) {min-width:240px}
  .ui-system :where(.ui-min-8em) {min-width:8em}
  .ui-system :where(.ui-ml-auto) {margin-left:auto}
  .ui-system :where(.ui-mt-0) {margin-top:0}
  .ui-system :where(.ui-mt-10px) {margin-top:10px}
  .ui-system :where(.ui-mt-12px) {margin-top:12px}
  .ui-system :where(.ui-mt-14px) {margin-top:14px}
  .ui-system :where(.ui-mt-18px) {margin-top:18px}
  .ui-system :where(.ui-mt-4px) {margin-top:4px}
  .ui-system :where(.ui-mt-6px) {margin-top:6px}
  .ui-system :where(.ui-mt-8px) {margin-top:8px}
  .ui-system :where(.ui-overflow-x-auto) {overflow-x:auto}
  .ui-system :where(.ui-pad-0-5px) {padding:0 5px}
  .ui-system :where(.ui-pad-0-6px) {padding:0 6px}
  .ui-system :where(.ui-pad-12px) {padding:12px}
  .ui-system :where(.ui-pad-5px-0) {padding:5px 0}
  .ui-system :where(.ui-pad-6px-12px) {padding:6px 12px}
  .ui-system :where(.ui-pad-6px-14px) {padding:6px 14px}
  .ui-system :where(.ui-position-absolute) {position:absolute}
  .ui-system :where(.ui-position-relative) {position:relative}
  .ui-system :where(.ui-pt-6px) {padding-top:6px}
  .ui-system :where(.ui-right-0) {right:0}
  .ui-system :where(.ui-space-pre-line) {white-space:pre-line}
  .ui-system :where(.ui-text-14px) {font-size:14px}
  .ui-system :where(.ui-text-16px) {font-size:16px}
  .ui-system :where(.ui-textalign-center) {text-align:center}
  .ui-system :where(.ui-top-36px) {top:36px}
  .ui-system :where(.ui-w-100) {width:100%}
  .ui-system :where(.ui-w-120px) {width:120px}
  .ui-system :where(.ui-w-130px) {width:130px}
  .ui-system :where(.ui-w-150px) {width:150px}
  .ui-system :where(.ui-w-170px) {width:170px}
  .ui-system :where(.ui-w-180px) {width:180px}
  .ui-system :where(.ui-w-6em) {width:6em}
  .ui-system :where(.ui-w-70px) {width:70px}
  .ui-system :where(.ui-w-80px) {width:80px}
  .ui-system :where(.ui-w-8em) {width:8em}
  .ui-system :where(.ui-weight-400) {font-weight:400}
  .ui-system :where(.ui-wrap-wrap) {flex-wrap:wrap}
  .ui-system :where(.ui-z-5) {z-index:5}
  @media(max-width:1100px) {
    .ui-system :where(header.top) {gap:12px;padding:0 16px}
    .ui-system :where(.module-switch a,.ui-menu>summary) {padding:10px 8px}
    .ui-system :where(.board-filter-line) {grid-template-columns:repeat(3,minmax(0,1fr))}
    .ui-system :where(.cat-variant-tabs) {flex-basis:100%}
    .ui-system :where(.lx-plan-mini) {max-width:180px}
  }
  @media(max-width:760px) {
    .ui-system :where(main) {padding:20px 16px 140px}
    .ui-system :where(header.top) {position:relative;display:grid;grid-template-columns:auto 1fr;gap:8px;padding:12px 16px}
    .ui-system :where(.lx-fit-head) {top:0}
    .ui-system :where(.lx-fit-head .lx-metrics) {grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
    .ui-system :where(.lx-fit-head .lx-metrics>div) {padding:6px 8px}
    .ui-system :where(.lx-fit-head .lx-metrics b) {font-size:var(--text-md, 16px)}
    .ui-system :where(.lx-fit-spec) {margin-left:0;flex-wrap:wrap;width:100%}
    .ui-system :where(.lx-fit-spec select) {width:100%}
    .ui-system :where(header.top .logo) {grid-column:1;grid-row:1}
    .ui-system :where(.module-switch) {grid-column:2;grid-row:1;justify-self:end}
    .ui-system :where(.section-nav) {grid-column:1/-1;grid-row:2;justify-content:space-between;width:100%}
    .ui-system :where(.ui-user) {grid-column:1/-1;justify-self:end}
    .ui-system :where(.section-nav>.ui-menu:nth-child(n+3)>.ui-menu-panel) {left:auto;right:0}
    .ui-system :where(.ui-menu>summary) {padding:8px;font-size:var(--text-sm)}
    .ui-system :where(h1,.cat-model-head h1) {font-size:var(--text-xl);line-height:1.3;overflow-wrap:anywhere}
    .ui-system :where(.board-heading,.cat-heading) {align-items:start;gap:16px}
    .ui-system :where(.board-heading>.row,.ui-page-heading>.btn) {width:100%}
    .ui-system :where(.board-heading>.row>.btn) {flex:1}
    .ui-system :where(.block,.card) {padding:16px}
    .ui-system :where(.ui-item-settings) {grid-template-columns:1fr}
    .ui-system :where(.ui-list-heading) {display:none}
    .ui-system :where(.cat-list) {border-radius:8px}
    .ui-system :where(.cat-editor-grid) {grid-template-columns:minmax(0,1fr);gap:20px}
    .ui-system :where(.cat-estimate) {position:static;padding:20px}
    .ui-system :where(.cat-fields,.ui-grid-2,.ui-grid-3,.ui-grid-4,.ui-settings-form,.cat-material .cat-fields,.cat-color-form) {grid-template-columns:minmax(0,1fr)}
    .ui-system :where(.ui-span-2) {grid-column:auto}
    .ui-system :where(.cat-context) {grid-template-columns:1fr 1fr}
    .ui-system :where(.cat-context>label) {min-width:0;width:auto}
    .ui-system :where(.cat-variant-bar) {padding:16px;gap:12px}
    .ui-system :where(.cat-variant-tabs>a) {flex:1 1 auto}
    .ui-system :where(.ui-settings-actions) {align-items:start;flex-direction:column}
    .ui-system :where(.cat-variant-bar>.ui-popover:last-child) {margin-left:0}
    .ui-system :where(.ui-popover>form) {left:0;right:auto;width:320px}
    .ui-system :where(.ui-popover:last-child>form) {left:auto;right:0}
    .ui-system :where(.ui-export) {flex-direction:column;gap:8px}
    .ui-system :where(.cat-stage summary) {padding:12px;gap:8px}
    .ui-system :where(.cat-drag) {display:none}
    .ui-system :where(.cat-stage-title small) {line-height:1.5}
    .ui-system :where(.cat-stage-body) {padding:16px}
    .ui-system :where(.cat-stage-tools .btn) {min-height:36px}
    .ui-system :where(.cat-stage summary) {flex-wrap:wrap}
    .ui-system :where(.cat-stage-tools) {order:9;width:100%;justify-content:flex-end}
    /* «Материалы» на телефоне: строка — карточка, название во всю ширину, под ним цена и остаток рядом (без прокрутки таблицы) */
    .ui-system :where(.mat-table) {min-width:0}
    .ui-system :where(.mat-table thead) {display:none}
    .ui-system :where(.mat-table tr) {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);border-bottom:1px solid var(--line)}
    .ui-system :where(.mat-table tbody tr:last-child) {border-bottom:0}
    .ui-system :where(.mat-table tr.mat-group) {display:block}
    .ui-system :where(.mat-group th) {display:block}
    .ui-system :where(.mat-table td) {border-bottom:0;padding:8px 12px}
    .ui-system :where(.mat-table td:first-child) {grid-column:1/-1;width:auto;padding-bottom:0}
    .ui-system :where(.mat-table td.num:nth-child(2)) {text-align:left}
    .ui-system :where(.mat-colors ul) {min-width:0}
    .ui-system :where(.cat-fab-stage-head) {padding:8px 12px}
    .ui-system :where(.cat-fabric) {padding:12px}
    .ui-system :where(.cat-fabric-head>.btn) {margin-left:0}
    .ui-system :where(.cat-fabric-comment) {width:100%}
    .ui-system :where(.cat-fabric-map) {grid-template-columns:minmax(0,1fr);gap:4px}
    .ui-system :where(.cat-fabric-col) {display:none}                  /* на телефоне: цвет изделия подписью над выбором */
    .ui-system :where(.cat-fabric-map>select:not(:last-child)) {margin-bottom:8px}
    .ui-system :where(.cat-row-head) {display:none}
    .ui-system :where(.cat-mat-row) {grid-template-columns:auto minmax(0,1fr) auto 30px;grid-template-areas:"name name name del" "norm price sum sum";row-gap:8px;padding:10px 0}
    .ui-system :where(.cat-mat-row>.cat-cell-name) {grid-area:name;flex-wrap:wrap;row-gap:6px}      /* название целиком, метки ниже */
    .ui-system :where(.cat-mat-row>.cat-cell-norm) {grid-area:norm}
    .ui-system :where(.cat-mat-row>.cat-cell-price) {grid-area:price}
    .ui-system :where(.cat-mat-row>.cat-cell-sum) {grid-area:sum}
    .ui-system :where(.cat-mat-row>.btn,.cat-mat-row>span:last-child:empty) {grid-area:del}
    .ui-system :where(.cat-op-row) {grid-template-columns:minmax(0,1fr) auto auto 30px;grid-template-areas:"name name name del" "kind value sum sum";row-gap:8px;padding:10px 0}
    .ui-system :where(.cat-op-row>.cat-cell-name) {grid-area:name}
    .ui-system :where(.cat-op-row>.cat-op-kind) {grid-area:kind;min-width:0}
    .ui-system :where(.cat-op-row>.cat-op-value) {grid-area:value}
    .ui-system :where(.cat-op-row>.cat-op-sum) {grid-area:sum}
    .ui-system :where(.cat-op-row>.btn,.cat-op-row>span:last-child:empty) {grid-area:del}
    .ui-system :where(.cat-ops .cat-lines-foot) {flex-wrap:wrap}
    .ui-system :where(.cat-ops-sum) {margin-right:0;flex:1 1 100%}     /* итог и секунды по видам — строкой под «+ Операция» */
    .ui-system :where(.cat-mats .cat-lines-total) {margin-right:0}
    .ui-system :where(.op-dir-row) {grid-template-columns:repeat(3,minmax(0,1fr));row-gap:6px}
    .ui-system :where(.op-dir-head) {display:none}
    .ui-system :where(.op-dir-row>.op-name,.op-dir-row>select,.op-dir-tools) {grid-column:1/-1}
    .ui-system :where(.op-dir-tools) {justify-content:flex-start;flex-wrap:wrap;white-space:normal}
    .ui-system :where(.op-dir-tools>span.small) {flex-basis:100%}
    .ui-system :where(.op-dir-row.is-clean .op-save) {display:none}
    .ui-system :where(.op-dir-add.st-row,.op-dir-add.cs-row) {grid-template-columns:repeat(2,minmax(0,1fr))}   /* кнопка 280 px не влезала */
    .ui-system :where(.op-dir-add>input[name=name],.op-dir-add>input[name=note],.op-dir-add>button) {grid-column:1/-1}
    .ui-system :where(.op-price>span) {display:block;font-size:11px;color:var(--muted)}
    .ui-system :where(.cat-work-head>select) {width:100%}
    .ui-system :where(.ui-add-stage>label) {flex-basis:100%}
    .ui-system :where(.ui-savebar) {padding:12px;gap:12px}
    .ui-system :where(.ui-savebar>.row) {width:100%;display:grid;grid-template-columns:1fr;gap:8px}
    .ui-system :where(.ui-dirty .ui-savebar) {left:12px;right:12px;bottom:12px}
    .ui-system :where(.cat-pickbar) {left:12px;right:12px;bottom:12px;padding:8px 10px 8px 12px;display:grid;grid-template-columns:minmax(0,1fr) 30px;gap:2px 8px;font-size:var(--text-xs)}
    .ui-system :where(.cat-pickbar>.btn) {grid-row:1/span 3;grid-column:2;align-self:center}
    .ui-system :where(.cat-pickbar[hidden]) {display:none}
    .ui-system :where(.ui-dirty .cat-pickbar) {bottom:var(--pick-offset,180px)}
    .ui-system :where(.lx-savebar>.btn) {width:100%}
    .ui-system :where(.lx-launch) {padding:0}
    .ui-system :where(.lx-launch>.cat-heading) {padding:16px;flex-wrap:wrap;gap:12px}
    .ui-system :where(.lx-plan-mini) {align-items:start;max-width:100%}
    .ui-system :where(.lx-plan-mini .small) {text-align:left}
    .ui-system :where(.lx-launch>.cat-fields) {margin:16px}
    .ui-system :where(.lx-launch>.cat-table-wrap) {margin:0 16px 16px}
    .ui-system :where(.lx-plan) {margin:16px}
    .ui-system :where(.lx-actions) {padding:16px}
    .ui-system :where(.lx-add) {display:grid;grid-template-columns:1fr}
    .ui-system :where(.lx-savebar .small) {font-size:var(--text-xs)}
    .ui-system :where(.board-filter-line) {grid-template-columns:1fr 1fr;gap:16px 12px}
    .ui-system :where(.board-search) {grid-column:1/-1}
    .ui-system :where(.cat-bulk) {padding:16px;display:grid;grid-template-columns:1fr}
    .ui-system :where(.cat-bulk label) {min-width:0}
    .ui-system :where(.cat-list-row) {grid-template-columns:16px 44px minmax(0,1fr);gap:12px;padding:16px}
    .ui-system :where(.cat-list-row:not(:has(>input))) {grid-template-columns:44px minmax(0,1fr)}
    .ui-system :where(.cat-cover) {width:44px;height:60px}
    .ui-system :where(.cat-list-status) {grid-column:3;text-align:left}
    .ui-system :where(.cat-list-row:not(:has(>input)) .cat-list-status) {grid-column:2}
    .ui-system :where(.cat-list-title .small) {font-size:var(--text-xs)}
    .ui-system :where(.cat-color-item>summary) {display:flex;flex-wrap:wrap}
  }
  /* Новые товары (04.10.2026): GTIN по размерам цвета */
  .ui-system :where(.np-sizes) {display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:8px 12px}
  .ui-system :where(.np-sizes label) {min-width:0}
  .ui-system :where(.np-form .row) {margin-top:8px}
  .ui-system :where(.np-counts) {display:flex;flex-wrap:wrap;gap:8px}
  /* Из разработки на странице изделия (05.10.2026) */
  .ui-system :where(.cat-dev-list) {display:grid;grid-template-columns:max-content 1fr;gap:4px 16px;margin:8px 0}
  .ui-system :where(.cat-dev-list dt) {color:var(--muted)}
  .ui-system :where(.cat-dev-list dd) {margin:0;white-space:pre-line}
  /* Раскладка (08.10.2026): этап на компьютере — карты таблицей, загрузка DXF в шапке, форма карты блоками, сверка сеткой */
  .ui-system :where(.nest-upload) {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
  .ui-system :where(.nest-upload form,.nest-inline) {display:flex;flex-wrap:nowrap;align-items:center;gap:8px;margin:0}
  .ui-system :where(.nest-upload input[type=file],.nest-inline input[type=file]) {width:auto;flex:1 1 auto;min-width:0;max-width:320px;font-size:var(--text-sm)}
  .ui-system :where(.nest-maps .warn,.nest-editor .warn,.nest-todo .warn) {color:var(--warn)}
  .ui-system :where(.nest-table td) {vertical-align:top}
  .ui-system :where(.nest-table tr.is-editing td) {background:var(--acc2)}
  .ui-system :where(.nest-table tr.nest-row) {cursor:pointer}
  .ui-system :where(.nest-table tr.nest-row:hover td) {background:var(--line2)}
  .ui-system :where(.nest-editor>.flash) {margin:0 0 16px}
  /* Подготовка (09.10.2026): заказы, ждущие печати карт, — шапка заказа с действиями, под ней его карты */
  .ui-system :where(.prep-table td) {vertical-align:top}
  .ui-system :where(.prep-table tbody.prep-order+tbody.prep-order tr.prep-head td) {border-top:8px solid var(--bg)}
  .ui-system :where(.prep-table tr.prep-head td) {background:var(--line2)}
  .ui-system :where(.prep-head-row) {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
  .ui-system :where(.prep-actions) {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
  .ui-system :where(.prep-actions form) {margin:0}
  .ui-system :where(.prep-table .warn,#printed .warn) {color:var(--warn)}
  .ui-system :where(.nest-files) {display:flex;gap:8px;margin-top:4px}
  .ui-system :where(.nest-actions) {white-space:nowrap;text-align:right}
  .ui-system :where(.nest-actions form) {display:inline;margin:0 0 0 4px}
  .ui-system :where(.nest-editor) {border-color:var(--acc3);scroll-margin-top:72px}
  .ui-system :where(.nest-editor-top) {display:grid;grid-template-columns:96px minmax(220px,300px) minmax(260px,440px);gap:16px;margin-bottom:16px}
  .ui-system :where(.nest-fieldset) {border:1px solid var(--line);border-radius:var(--radius);padding:12px 16px 16px;margin:0 0 16px;min-width:0}
  .ui-system :where(.nest-fieldset legend) {padding:0 6px;font-weight:600;font-size:var(--text-base)}
  .ui-system :where(.nest-fieldset>p) {margin:8px 0 0}
  .ui-system :where(.nest-sizes) {display:flex;flex-wrap:wrap;align-items:end;gap:8px 12px}
  .ui-system :where(.nest-size) {width:76px;margin:0;text-align:center;font-weight:600}
  .ui-system :where(.nest-size input) {text-align:center}
  .ui-system :where(.nest-per) {margin-left:8px;padding-bottom:8px;color:var(--muted)}
  .ui-system :where(.nest-per b) {color:var(--ink)}
  .ui-system :where(.nest-params) {display:grid;grid-template-columns:repeat(4,minmax(0,200px));gap:16px}
  .ui-system :where(.nest-colors) {width:auto;min-width:min(100%,640px);border:1px solid var(--line);border-radius:var(--radius-sm)}
  .ui-system :where(.nest-colors td,.nest-colors th) {padding:8px 12px}
  .ui-system :where(.nest-colors input) {display:block;width:96px;margin-left:auto;text-align:right}
  .ui-system :where(.nest-note) {display:block;margin-bottom:16px}
  .ui-system :where(.nest-save) {gap:8px}
  .ui-system :where(.nest-bottom) {display:grid;grid-template-columns:minmax(0,3fr) minmax(320px,2fr);gap:16px;align-items:start}
  .ui-system :where(.nest-grid td.short) {color:var(--warn);background:var(--warnbg)}
  .ui-system :where(.nest-grid td.over) {color:var(--amber);background:var(--amber2)}
  .ui-system :where(.nest-grid td.ok) {color:var(--ok)}
  .ui-system :where(.nest-todo) {margin:0 0 12px;padding-left:20px}
  .ui-system :where(.nest-file) {display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:8px}
  .ui-system :where(.nest-file form) {margin:0}
  @media(max-width:1100px) {
    .ui-system :where(.nest-bottom,.nest-editor-top) {grid-template-columns:minmax(0,1fr)}
    .ui-system :where(.nest-params) {grid-template-columns:repeat(2,minmax(0,1fr))}
  }
  @media(max-width:760px) {
    .ui-system :where(.nest-upload form,.nest-inline) {flex-wrap:wrap}
    .ui-system :where(.nest-upload input[type=file],.nest-inline input[type=file]) {max-width:100%}
  }
/* Увеличение фотографий, включая внешние ссылки. */
.photo-viewer{border:0;border-radius:10px;padding:48px 12px 12px;background:#18201e;color:#fff;max-width:96vw;max-height:96vh;overflow:auto}
.photo-viewer::backdrop{background:rgba(0,0,0,.8)}
.photo-viewer img{display:block;max-width:90vw;max-height:80vh;object-fit:contain;margin:auto}
.photo-viewer img[hidden]{display:none}
.photo-viewer .photo-viewer-close{position:absolute;right:6px;top:2px;width:44px;height:44px;border:0;background:transparent;color:#fff;font-size:32px;cursor:pointer}
.photo-viewer .photo-viewer-original{position:absolute;left:14px;top:12px;color:#fff;text-decoration:underline;line-height:24px;padding-right:44px}
.photo-viewer p{max-width:380px;padding:12px}
}

@layer smolaLegacy {
/* СМОЛА — дизайн-система. Токены и базовые компоненты, затем экраны. */
:root{--bg:#f5f4f0;--card:#fff;--ink:#1c1c1c;--muted:#6b6b6b;--faint:#9a9890;--line:#e2e0da;--line2:#efeee9;--acc:#2f6f5e;--acc2:#e8f1ee;--acc3:#bcd9cd;--head:#1f2d2a;--amber:#d98b2b;--amber2:#fbeedb;--warn:#b3261e;--warnbg:#fbe9e7;--ok:#2e7d32;--okbg:#e3f2e5;
--plan:#e6e6e6;--prep:#fff3cd;--work:#dbeafe;--finish:#e0f2e9;--done:#d1fae5;--off:#f3e8ff}
*{box-sizing:border-box}
body{margin:0;font:14px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;background:var(--bg);color:var(--ink)}
a{color:var(--acc);text-decoration:none}a:hover{text-decoration:underline}
h1{font-size:20px;margin:0 0 12px;font-weight:600;letter-spacing:-.01em}h2{font-size:16px;margin:18px 0 8px;font-weight:600}h3{font-size:14px;margin:12px 0 6px;font-weight:600}
.muted{color:var(--muted)}.faint{color:var(--faint)}.small{font-size:12px}.nowrap{white-space:nowrap}.right{text-align:right}
input,select,textarea{font:inherit;padding:6px 8px;border:1px solid #c9c7c0;border-radius:6px;background:#fff;max-width:100%}
textarea{width:100%;min-height:70px}label{display:block;font-size:12px;color:var(--muted);margin-bottom:2px}
input:focus,select:focus,textarea:focus,button:focus-visible{outline:2px solid var(--acc3);outline-offset:1px}

/* шапка */
header.top{background:var(--head);color:#fff;padding:0 16px;display:flex;align-items:center;gap:18px;min-height:48px;position:sticky;top:0;z-index:10;flex-wrap:wrap}
header.top .logo{display:flex;align-items:center}
header.top nav{display:flex;flex-wrap:wrap;gap:2px 0}header.top nav a{color:#cfe0da;margin-right:14px;white-space:nowrap;padding:6px 0}header.top nav a.on{color:#fff;border-bottom:2px solid #9fd3c1;padding-bottom:4px}
header.top .user{margin-left:auto;color:#bcd;font-size:13px}header.top .user a{color:#bcd}
@media(max-width:700px){header.top{gap:8px 14px;padding:4px 12px}header.top .user{margin-left:0;width:100%;padding-bottom:4px}table.t th{position:static}}
main{padding:16px 20px 32px;max-width:1240px;margin:0 auto}main.wide{max-width:none}

/* сообщения, кнопки, теги */
.flash{padding:8px 12px;border-radius:6px;margin-bottom:10px}.flash.ok{background:var(--acc2);color:var(--acc)}.flash.error{background:var(--warnbg);color:var(--warn)}
.btn{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1px solid var(--acc);background:var(--acc);color:#fff;border-radius:6px;cursor:pointer;font:inherit;font-size:13px;line-height:1.2;text-decoration:none}
.btn:hover{text-decoration:none;filter:brightness(1.06)}.btn.sec{background:#fff;color:var(--acc)}.btn.ghost{border-color:var(--line);color:var(--ink);background:#fff}.btn.sm{padding:4px 9px;font-size:12px}.btn.danger{border-color:var(--warn);color:var(--warn);background:#fff}
.tag{display:inline-flex;align-items:center;gap:4px;padding:1px 8px;border-radius:999px;font-size:11.5px;background:var(--line2);color:#333;white-space:nowrap;line-height:1.5}
.tag.P2{background:#fff0c2;color:#7a5a00}.tag.P3{background:#e7e7e7}.tag.low{background:#f3f3f3;color:#888}
.tag.st-plan{background:var(--plan)}.tag.st-prep{background:var(--prep)}.tag.st-work{background:var(--work)}.tag.st-finish{background:var(--finish)}.tag.st-done{background:var(--done)}.tag.st-off{background:var(--off)}
.tag.wait{background:var(--warnbg);color:var(--warn)}.tag.ok,.tag.P1{background:var(--okbg);color:var(--ok)}.tag.amber{background:var(--amber2);color:#7a4a08}.tag.brand{background:var(--head);color:#fff}
.tag.age{background:#eef0ec;color:#555}.tag.age-warn{background:#fff0c2;color:#7a5a00}.tag.age-bad{background:#fde2e1;color:#8a1c14}
.tags{display:flex;gap:6px;flex-wrap:wrap}

/* контейнеры */
.card{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:12px}
.block{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:14px 16px}
.block h3{margin:0 0 10px;font-size:12.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:600;display:flex;justify-content:space-between;align-items:center;gap:8px}
.block h3 .act{text-transform:none;letter-spacing:0;font-weight:400;font-size:12px}
.grid{display:grid;gap:12px}.g2{grid-template-columns:1fr 1fr}.g3{grid-template-columns:repeat(3,1fr)}
.stack{display:grid;gap:16px}
.cols{display:grid;grid-template-columns:1fr 360px;gap:18px;align-items:start}
@media(max-width:960px){.g2,.g3,.cols{grid-template-columns:1fr}}
.row{display:flex;gap:8px;flex-wrap:wrap;align-items:end}.inline{display:inline}
.dl{display:grid;grid-template-columns:150px 1fr;row-gap:7px;column-gap:14px;font-size:13px;margin:0}
.dl dt{color:var(--muted);margin:0}.dl dd{margin:0;white-space:pre-line}.dl dd.empty{color:var(--faint)}
#model-fields{grid-template-columns:150px minmax(0,1fr);scroll-margin-top:100px}#model-fields dd{min-width:0;overflow-wrap:anywhere}#model-fields select{width:100%;min-width:0;font:inherit}#model-fields dd:focus-visible{outline:2px solid var(--acc3)}@media(max-width:600px){#model-fields{grid-template-columns:110px minmax(0,1fr);column-gap:10px}}
table.t{width:100%;border-collapse:collapse;background:#fff;border:1px solid var(--line)}
table.t th,table.t td{padding:6px 8px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
table.t th{background:#f0efe9;font-weight:600;font-size:12px;color:var(--muted);position:sticky;top:48px}
table.t tr:hover td{background:#fafaf7}
.filters{display:flex;flex-wrap:wrap;gap:8px;align-items:end;margin-bottom:12px}.filters .f{display:flex;flex-direction:column}
.thumbs{display:flex;gap:8px;flex-wrap:wrap}.thumbs a img,.thumbs img{width:110px;height:auto;aspect-ratio:3/4;object-fit:contain;background:var(--line2);border-radius:6px;border:1px solid var(--line);display:block}
.thumbs span{position:relative;display:inline-block}.thumbs span form{position:absolute;top:4px;right:4px}
.ph{background:#e9e7e0;border-radius:6px;display:flex;align-items:center;justify-content:center;color:var(--faint)}
details summary{cursor:pointer;color:var(--acc)}
.imgdrop{border:1px dashed #bbb;padding:8px;border-radius:6px;background:#fafaf7}
.done{text-decoration:line-through;color:var(--muted)}.overdue{color:var(--warn)}
.login{max-width:340px;margin:80px auto}.login input{width:100%;margin-bottom:10px}
.tabs{display:flex;gap:14px;border-bottom:1px solid var(--line);margin:12px 0}.tabs a{padding:6px 0;color:var(--muted)}.tabs a.on{color:var(--ink);border-bottom:2px solid var(--acc)}

/* доска */
.board{display:flex;gap:10px;overflow-x:auto;overflow-y:hidden;padding-bottom:4px;align-items:stretch;scrollbar-width:auto}
.board::-webkit-scrollbar{height:12px}.board::-webkit-scrollbar-thumb{background:#bfbdb5;border-radius:6px}.board::-webkit-scrollbar-track{background:#e6e4dd;border-radius:6px}
.col{flex:1 1 220px;min-width:220px;background:#ecebe6;border-radius:8px;padding:8px;display:flex;flex-direction:column;max-height:100%}
.col .cards{overflow-y:auto;flex:1;min-height:0;padding-right:2px}.col .cards::-webkit-scrollbar{width:8px}.col .cards::-webkit-scrollbar-thumb{background:#c9c7bf;border-radius:4px}
.col h3{margin:0 0 8px;display:flex;justify-content:space-between;font-size:13px;flex:none}
.col.grp-plan h3{border-bottom:3px solid #bbb}.col.grp-prep h3{border-bottom:3px solid #e2b93b}.col.grp-work h3{border-bottom:3px solid #4a86e8}.col.grp-finish h3{border-bottom:3px solid #4caf85}.col.grp-done h3{border-bottom:3px solid #1b8f5a}
.kcard{background:#fff;border:1px solid var(--line);border-radius:6px;padding:7px 8px;margin-bottom:6px;font-size:12px}
.kcard .a{font-weight:600}.kcard .n{display:block}.kcard .meta{display:flex;gap:4px;flex-wrap:wrap;margin-top:4px}
.kcard img{width:100%;height:auto;aspect-ratio:3/4;object-fit:contain;border-radius:4px;margin-bottom:6px;background:#eee}
.priority-editor{display:inline-flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:4px;max-width:100%;vertical-align:middle}
.ui-system select.priority-picker.tag{width:auto;min-width:64px;min-height:28px;margin:0;padding:3px 7px;border:1px solid currentColor;border-radius:5px;font-family:inherit;font-size:11px;font-weight:650;line-height:1.25;cursor:pointer;appearance:auto}
.priority-picker option{color:#173148;background:#fff}
.priority-picker:focus-visible{outline:2px solid var(--acc);outline-offset:2px}
.priority-picker:disabled{cursor:wait;opacity:.65}
.priority-feedback{font-size:10px;font-weight:400;line-height:1.3;color:var(--muted);white-space:nowrap}
.priority-feedback:empty{display:none}
.priority-editor.is-error .priority-feedback{flex-basis:100%;max-width:180px;white-space:normal;color:#a12d28}
.kcard details.quick{margin-top:6px}.kcard details.quick summary{font-size:11px;color:var(--acc);cursor:pointer}
.kcard details.quick form{display:flex;flex-direction:column;gap:4px;margin-top:4px}
.kcard details.quick input,.kcard details.quick select,.kcard details.quick textarea{font-size:12px;padding:4px 6px;width:100%}
.kcard details.quick .row{gap:4px}.kcard details.quick .row select{flex:1}
table.matrix td{vertical-align:top;min-width:160px}table.matrix td .kcard{margin:2px 0}table.matrix th.parent{background:#e4e2da}
table.matrix .kcard{display:flow-root}table.matrix .kcard-cover{float:left;width:72px;margin:0 10px 6px 0}table.matrix .kcard-cover img{display:block;width:72px;height:96px;margin:0;object-fit:contain}table.matrix .kcard details.quick{clear:both}
.quick-set{display:flex;flex-wrap:wrap;align-items:flex-start;gap:0 14px}.quick-set>details.quick{flex:0 0 auto;margin-top:6px}.quick-set>details.quick[open]{flex-basis:100%;display:block}.quick-set>details.quick[open]>form{margin-top:6px}.quick-set .btn{align-self:flex-start}
.refgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}
.ref{background:#fff;border:1px solid var(--line);border-radius:8px;overflow:hidden}.ref img{width:100%;height:auto;aspect-ratio:3/4;object-fit:contain;display:block;background:#eee}
.ref .b{padding:8px}.ref .b .t{font-weight:600}
.check{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:4px;font-size:13px}.check .ok{color:var(--ok)}.check .no{color:var(--muted)}

/* карточка разработки */
.crumbs{font-size:12px;color:var(--muted);display:flex;gap:6px;margin-bottom:12px;flex-wrap:wrap;align-items:center}
.hero{display:grid;grid-template-columns:112px 1fr 320px;gap:20px;align-items:start}
.hero .cover{width:112px;height:auto;aspect-ratio:3/4;border-radius:8px;object-fit:contain;background:var(--line2);border:1px solid var(--line);display:block}
.hero .cover.ph{display:flex}
.hero h1{font-size:22px;margin:0 0 6px}.hero h1 .art{color:var(--muted);font-weight:500;margin-right:8px}
.steps{display:flex;gap:3px;margin:14px 0 4px}
.steps form{flex:1;display:flex;min-width:0}.steps form.cur{flex:1.7}
.step{flex:1;height:26px;border:0;border-radius:4px;background:var(--line2);color:var(--muted);font:inherit;font-size:11px;display:flex;align-items:center;justify-content:center;white-space:nowrap;overflow:hidden;padding:0 4px;cursor:pointer;min-width:0}
.step.past{background:var(--acc3);color:#1f4a3d}.step.cur{background:var(--acc);color:#fff;font-weight:600}
.step:hover{filter:brightness(.95)}
.steps-note{font-size:12px;color:var(--muted);display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.side{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:12px 14px}
.side .srow{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid var(--line2);font-size:13px}
.side .srow:last-of-type{border-bottom:0}.side .k{color:var(--muted);white-space:nowrap}
.side .actions{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.side .wform{display:flex;gap:4px;margin:2px 0 6px;flex-wrap:wrap}.side .wform input{font-size:12px;padding:4px 6px;min-width:0}.side .wform input[name=waiting_for]{flex:1;min-width:120px}
.ready{margin-top:16px;background:var(--card);border:1px solid var(--line);border-radius:8px;padding:10px 14px;display:grid;grid-template-columns:150px 1fr;gap:14px;align-items:center}
.ready .lbl{font-size:13px;font-weight:600}.ready .lbl small{display:block;color:var(--muted);font-weight:400;font-size:12px}
.bar{height:6px;background:var(--line2);border-radius:3px;overflow:hidden;margin-bottom:8px}.bar i{display:block;height:100%;background:var(--acc)}
.checks{display:flex;gap:6px;flex-wrap:wrap}.chk{font-size:12px;padding:2px 8px;border-radius:999px;border:1px solid var(--line);color:var(--muted);background:#fff}.chk.ok{border-color:var(--acc3);background:var(--acc2);color:#1f4a3d}
.ctabs{display:flex;gap:2px;margin-top:18px;border-bottom:1px solid var(--line);overflow-x:auto}
.ctabs button{font:inherit;font-size:14px;padding:9px 14px;border:0;background:transparent;color:var(--muted);cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap}
.ctabs button.on{color:var(--ink);border-bottom-color:var(--acc);font-weight:600}.ctabs button .n{font-size:11px;color:var(--faint);margin-left:4px}
.pane{display:none;padding-top:18px}.pane.on{display:block}
.task{display:flex;gap:8px;align-items:flex-start;padding:7px 0;border-bottom:1px solid var(--line2);font-size:13px}.task:last-child{border-bottom:0}
.task .tick{width:18px;height:18px;border:1.5px solid var(--acc3);border-radius:4px;flex:none;background:#fff;cursor:pointer;font-size:12px;line-height:1;color:var(--acc);padding:0}
.task .who{margin-left:auto;color:var(--muted);font-size:12px;white-space:nowrap}
.task.is-done,tr.is-done td{color:var(--muted)}.task.is-done .tick{background:var(--acc2)}.task-status{font-size:11px;color:var(--muted)}
.entry{padding:8px 0;border-bottom:1px solid var(--line2);font-size:13px}.entry:last-child{border-bottom:0}.entry .d{font-size:12px;color:var(--muted);margin-bottom:2px;display:flex;gap:6px;align-items:center}
.entry .txt{white-space:pre-line}
.entry.note{border-left:3px solid var(--acc);padding-left:10px}.entry.note .txt{font-weight:500}
.entry.task{padding-left:13px}.entry.task .txt::before{content:"☐ ";color:var(--muted)}
.entry.auto{padding:3px 0 3px 13px;font-size:12px;color:var(--muted)}.entry.auto .d{display:inline;margin:0 6px 0 0}.entry.auto .txt{display:inline}
.hide-auto .entry.auto{display:none}
.quick{display:flex;gap:8px;margin-bottom:10px}.quick input{flex:1;font-size:13px;padding:7px 10px}
.qform{background:var(--acc2);border:1px solid var(--acc3);border-radius:8px;padding:12px 14px;margin-top:14px;display:none}.qform.on{display:block}
.qform .grid{gap:8px}
@media(max-width:960px){.qform .grid{grid-template-columns:1fr!important}}
/* ТЗ */
.tz{display:grid;grid-template-columns:200px 1fr;gap:18px;align-items:start}
.toc{position:sticky;top:60px;background:var(--card);border:1px solid var(--line);border-radius:8px;padding:8px 0}
.toc a{display:block;padding:6px 14px;font-size:13px;color:var(--ink)}.toc a:hover{background:var(--line2);text-decoration:none}
.doc{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:22px 28px;max-width:860px}
.vbar{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--muted);padding-bottom:12px;border-bottom:1px solid var(--line);margin-bottom:6px;flex-wrap:wrap}
.vbar .v{font-weight:600;color:var(--ink)}.vbar .sp{flex:1}
.vers{display:flex;gap:4px}.vers a{padding:1px 7px;border-radius:999px;border:1px solid var(--line);font-size:12px;color:var(--ink)}.vers a.cur{background:var(--acc);color:#fff;border-color:var(--acc)}
.tzdoc{counter-reset:sec}.tzdoc h3{font-size:16px;margin:22px 0 6px;font-weight:600;border:0;padding:0;counter-increment:sec}.tzdoc h3::before{content:counter(sec) ". ";color:var(--muted)}.tzdoc h3.nonum{counter-increment:none}.tzdoc h3.nonum::before{content:""}.tzdoc h4{margin:12px 0 2px;font-size:14px}
html{scroll-padding-top:60px}.tzdoc{overflow-wrap:anywhere}.tzdoc p{margin:6px 0;max-width:70ch}.tzdoc ul,.tzdoc ol{margin:6px 0 6px 20px;padding:0}.tzdoc li{margin:3px 0}
.tzdoc table{border-collapse:collapse;font-size:13px;margin:8px 0;max-width:100%}.tzdoc th,.tzdoc td{border:1px solid var(--line);padding:4px 9px;text-align:left;vertical-align:top}.tzdoc th{background:var(--line2);font-weight:600}
.figs{display:flex;flex-wrap:wrap;gap:10px;margin:8px 0;align-items:flex-start}.figs figure{margin:0;flex:0 1 220px;max-width:260px}.figs img{width:100%;height:auto;max-height:260px;object-fit:contain;border-radius:6px;border:1px solid var(--line);display:block;background:#fff}.figs figcaption{font-size:12px;color:var(--muted);margin-top:4px;line-height:1.3}
.figs .att,.tzdoc .att{display:inline-block;padding:4px 10px;border:1px solid var(--line);border-radius:6px;background:#fff}.tzdoc .missing{color:#a33;font-size:12px}
.tzhead{padding:0 0 14px;margin-bottom:8px;border-bottom:1px solid var(--line)}.tzhead .t{font-size:18px;font-weight:600}.tzhead .art{font-weight:400;color:var(--muted);margin-left:8px}.tzhead .m{color:var(--muted);font-size:13px;margin:2px 0 8px}.tzhead .kv{display:grid;grid-template-columns:max-content 1fr;gap:3px 14px;font-size:13px}.tzhead .kv div:nth-child(odd){color:var(--muted)}
.tzhead.edit{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:12px 16px;margin-bottom:12px}
.toc a.sub{padding-left:26px;font-size:12px}
.tzedit{display:grid;grid-template-columns:1fr 300px;gap:18px;align-items:start}.tzedit .left textarea{width:100%;min-height:420px;font-size:15px;line-height:1.5;padding:14px 16px;resize:vertical}
.tzedit .left .hint{margin:8px 0 0}
.toastui-editor-defaultUI{border-color:var(--line);border-radius:8px;background:var(--card);font-family:inherit}.toastui-editor-defaultUI .toastui-editor-toolbar{border-radius:8px 8px 0 0}.toastui-editor-defaultUI .toastui-editor-md-tab-container{border-radius:0}.toastui-editor-contents{font-size:15px;font-family:inherit}.toastui-editor-contents h1,.toastui-editor-contents h2{font-size:18px;border-bottom:1px solid var(--line);padding-bottom:4px;margin:22px 0 8px}.toastui-editor-contents h3,.toastui-editor-contents h4{font-size:15px}.toastui-editor-contents img{max-width:260px;max-height:260px;border-radius:6px;border:1px solid var(--line)}.toastui-editor-contents table{font-size:13px}.toastui-editor-contents th{background:var(--line2)}.toastui-editor-mode-switch{background:var(--card)}.tzedit .hint{margin-bottom:6px}
.tzedit .fpanel{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:12px;position:sticky;top:60px;max-height:calc(100vh - 80px);overflow:auto}.tzedit .fpanel h3{margin:0 0 8px;font-size:14px}
.tzf{display:grid;grid-template-columns:64px 1fr;gap:8px;align-items:start;padding:6px 0;border-bottom:1px solid var(--line2)}.tzf img{width:64px;height:64px;object-fit:cover;border-radius:6px;border:1px solid var(--line);display:block}.tzf .c{display:flex;flex-direction:column;gap:4px}.tzf .r1{display:flex;gap:6px;align-items:center}.tzf .r1 input{flex:1;min-width:0;font-size:12px;padding:4px 6px}.tzf .n{font-weight:600;font-size:12px;color:var(--acc);min-width:14px}.tzf .r2{display:flex;justify-content:space-between;gap:6px}
.tzedit .bottom{grid-column:1/-1;background:var(--card);border:1px solid var(--line);border-radius:8px;padding:12px 16px}#preview{margin-top:12px}
.tzlink{padding:14px;border:1px dashed var(--line);border-radius:8px;font-size:14px}
.dl dd.ed{cursor:text;border-radius:4px;margin-left:-4px;padding-left:4px;white-space:pre-line}.dl dd.ed:hover{background:var(--line2)}.dl dd.ed input,.dl dd.ed textarea{font:inherit;padding:3px 6px}
.tzform textarea{min-height:60px}
.sharebox{background:#f4f8f6;border:1px dashed #9fd3c1;padding:8px;border-radius:6px;word-break:break-all;font-size:13px}
/* образцы */
.samples{display:grid;gap:14px;max-width:980px}
.sample{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:14px 16px;display:grid;grid-template-columns:1fr 300px;gap:18px}
.sample.old{opacity:.85}
.sample .hd{display:flex;align-items:center;gap:10px;margin-bottom:6px;flex-wrap:wrap}.sample .num{font-size:16px;font-weight:600}.sample .meta{color:var(--muted);font-size:13px}
.sample .res{font-size:13px;max-width:62ch;white-space:pre-line}
.sample .photos{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.sample .photos img,.sample .photos .ph{width:100%;aspect-ratio:3/4;object-fit:contain;background:var(--line2);border-radius:6px;border:1px solid var(--line)}
@media(max-width:960px){.tzedit{grid-template-columns:1fr}.tzedit .fpanel{position:static;max-height:none}.steps{flex-wrap:wrap}.steps form,.steps .step{flex:1 1 30%}.steps form.cur{flex:1 1 40%}.hero{grid-template-columns:80px 1fr}.hero .side{grid-column:1/-1}.hero .cover{width:80px;height:auto;aspect-ratio:3/4}.tz,.sample{grid-template-columns:1fr}.toc{position:static}.ready{grid-template-columns:1fr}}
/* файлы */
.file{display:flex;gap:10px;align-items:center;padding:6px 0;border-bottom:1px solid var(--line2);font-size:13px;flex-wrap:wrap}.file:last-child{border-bottom:0}.file .meta{color:var(--muted);font-size:12px;margin-left:auto;white-space:nowrap}
/* страница конструктора */
body.share main{padding:16px}
@media print{header.top,form,.btn,nav,.ctabs,.side .actions,.noprint,.toc,.vbar{display:none!important}.tz{display:block}.tzdoc a.md::after{content:" (" attr(href) ")";font-size:smaller;color:#555}body{background:#fff;font-size:12pt}main{padding:0;max-width:none}.card,.block,.doc{border:none;padding:0;box-shadow:none}.pane{display:block!important}
.tzdoc figure,.tzdoc table,.tzdoc li{break-inside:avoid}.tzdoc h3{break-after:avoid}.figs img{max-height:70mm;border:0}.figs figure{flex:0 1 45%}.tzdoc a{color:inherit;text-decoration:none}.tzhead{border-bottom:1px solid #000}}

.qrows{display:grid;grid-template-columns:170px 1fr;gap:8px 12px;align-items:center}.qrows label{margin:0;font-size:13px;color:var(--ink)}.qrows textarea{align-self:start}
@media(max-width:700px){.qrows{grid-template-columns:1fr}}

/* съёмка образцов на телефоне */
.snap{max-width:640px}
.snaplist{display:grid;gap:8px}
.snapitem{display:flex;gap:10px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:8px;padding:8px 10px;color:var(--ink);min-height:64px}
.snapitem:hover{text-decoration:none;border-color:var(--acc3)}
.snapitem img,.snapitem .ph{width:56px;height:auto;aspect-ratio:3/4;border-radius:6px;object-fit:contain;background:var(--line2);flex:none}
.snapitem .t{flex:1;line-height:1.3}.snapitem .cam{font-size:22px}
.snapbtn{display:block;background:var(--acc);color:#fff;border-radius:8px;padding:18px;text-align:center;font-size:17px;cursor:pointer}
.snapbtn input{display:none}



header.top .module-switch{gap:4px;border-right:1px solid #60736b;padding-right:12px}header.top .module-switch a{padding:7px 10px;margin:0;border-radius:5px;font-weight:500}header.top .module-switch a.on{background:#ffffff18;border-bottom:none;padding-bottom:7px}header.top .section-nav{flex:1}@media(max-width:900px){header.top .section-nav{order:3;flex-basis:100%;padding-bottom:6px}header.top .user{width:auto;margin-left:auto}header.top .module-switch{border-right:none;padding-right:0}}@media(max-width:480px){header.top .user{width:100%;order:4;margin-left:0}header.top .module-switch a{padding:7px 8px}}

/* Card: full-width workspace and a separate, wrapping stage rail. */
.card-detail .hero{grid-template-columns:112px minmax(0,1fr) minmax(300px,380px)}
.card-detail .hero>*,.card-detail .cols>*,.card-detail .stack{min-width:0}
.card-detail .hero h1{overflow-wrap:anywhere}
.card-detail .tags,.card-detail .crumbs{flex-wrap:wrap}
.card-detail .side .srow{flex-wrap:wrap;justify-content:flex-start}
.card-detail .side .tag,.card-detail .crumbs .tag{white-space:normal;overflow-wrap:anywhere}
.card-detail .card-stages{margin-top:18px;padding:14px;background:var(--card);border:1px solid var(--line);border-radius:8px}
.card-detail .card-stages h3{margin:0 0 10px;font-size:13px}
.card-detail .steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px;margin:0 0 10px}
.card-detail .steps form{min-width:0}
.card-detail .step{width:100%;height:auto;min-height:40px;padding:8px 10px;white-space:normal;overflow-wrap:anywhere;font-size:12px;line-height:1.4}
.card-detail .cols{grid-template-columns:minmax(0,2fr) minmax(300px,1fr)}
@media(max-width:960px){.card-detail .hero{grid-template-columns:80px minmax(0,1fr)}.card-detail .cols{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){main.card-detail{padding:12px 12px 28px}.card-detail .steps{grid-template-columns:repeat(2,minmax(0,1fr))}.card-detail .hero{gap:12px}.card-detail .hero h1{font-size:19px}}

textarea[data-autogrow]{overflow-y:hidden;resize:none;line-height:1.5;box-sizing:border-box}
textarea[data-autogrow][rows="1"]{min-height:34px}
.task-observers{grid-column:1/-1;min-width:0;margin:4px 0;padding:8px 10px;border:1px solid var(--line);border-radius:6px}
.task-observers summary{font-size:12px;color:var(--muted);cursor:pointer}
.task-observers[open]>summary{margin-bottom:8px}
.task-observers label{display:flex;align-items:center;gap:6px;margin:4px 0;font-size:13px;overflow-wrap:anywhere}
.kcard details.quick .task-observers input,.task-observers input[type=checkbox]{width:auto;flex:none}
.task-observer-names{display:block;white-space:normal}

/* Garment workspace: image / model / activity. Scoped to the card page. */
main.card-detail{padding:24px 28px 40px;background:#f5f4f0}
.card-detail .detail-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin:18px 0 22px}
.detail-heading>div{min-width:0}.detail-heading h1{font-size:28px;line-height:1.2;margin:0 0 10px;overflow-wrap:anywhere}
.detail-heading .art{display:block;font-size:14px;font-weight:400;color:var(--muted);margin-bottom:6px}
.detail-actions .actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.card-detail .card-stages{background:#fff;border:0;margin:0 0 22px;padding:14px 18px}
.card-detail .card-stages h3{display:none}.card-detail .steps{grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px}
.card-detail .step{border-radius:5px;min-height:42px;background:#f3f4f1;font-size:12px}
.card-detail .step.cur{background:var(--acc);color:white}.card-detail .step.past{background:#e8f0eb;color:var(--acc)}
.card-detail .steps-note{font-size:11px}
.detail-workspace{display:grid;grid-template-columns:minmax(220px,.85fr) minmax(420px,1.65fr) minmax(280px,1fr);gap:22px;align-items:start}
.detail-workspace>*{min-width:0}.detail-cover .cover{display:block;width:100%;height:auto;aspect-ratio:3/4;object-fit:contain;background:#e9e9e4;border-radius:6px}
.detail-cover .ph{display:flex;align-items:center;justify-content:center;color:var(--muted)}
.card-detail .detail-visual .ready{display:block;background:transparent;border:0;padding:18px 0;margin:0}
.detail-visual .ready .lbl{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.detail-visual .checks{display:grid;gap:6px}.detail-visual .chk{padding:0;border:0;background:transparent;font-size:12px;display:flex;gap:7px;align-items:center}
.detail-visual .chk::before{content:' ';width:12px;height:12px;flex:none;border:1px solid #a5ada7;border-radius:3px}
.detail-visual .chk.ok::before{content:'✓';background:var(--acc);color:#fff;border-color:var(--acc);font-size:10px;text-align:center;line-height:12px}
.detail-visual .block{padding:14px 0;background:transparent;border:0;border-top:1px solid var(--line)}
.detail-visual .thumbs{display:flex;flex-wrap:wrap;gap:7px}.detail-visual .thumbs img{width:70px;height:94px;object-fit:contain}
.detail-visual input[type=file]{width:100%;min-width:0;font-size:12px}
.detail-content{background:#fff;border-radius:6px;padding:0 20px 22px}
.detail-content .ctabs{margin-top:0;padding-top:8px}.detail-content .ctabs button{padding:14px 10px;font-size:13px}
.detail-content .block{padding:22px 0;border:0;background:transparent}.detail-content .block>h3,.detail-content .latest-sample>h3{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;font-size:17px;margin-bottom:20px}
.card-detail #model-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 22px}
.model-field{display:grid;grid-template-columns:minmax(85px,.8fr) minmax(0,1.2fr);gap:10px;padding:14px 0;border-bottom:1px solid #eeeee9;align-items:start;min-width:0}
.model-field.full{grid-column:1/-1}.model-field dt{font-size:12px}.model-field dd{font-size:13px;line-height:1.5}
.latest-sample{padding-top:24px;border-top:1px solid var(--line)}.latest-sample p{color:var(--muted);line-height:1.6;white-space:pre-line;overflow-wrap:anywhere}.latest-sample>a{display:block;margin-top:20px}
.detail-activity{background:white;border-radius:6px;padding:16px}.waiting-panel{padding:14px;background:#f3f5f2;border-radius:5px;margin-bottom:20px}.waiting-panel.is-waiting{background:#fff5e4}
.waiting-panel .srow{display:grid;gap:10px;margin-bottom:12px}.waiting-panel .k{font-weight:600;font-size:17px}.waiting-panel .tag{white-space:normal;overflow-wrap:anywhere;background:transparent;border:0;padding:0}
.waiting-edit summary{font-size:12px}.waiting-edit .wform{display:grid;gap:7px;margin-top:10px}.waiting-edit input{width:100%!important}
.detail-activity .block{padding:0 0 22px;border:0;border-bottom:1px solid var(--line);border-radius:0;margin-bottom:20px}
.detail-activity h3{font-size:17px}.detail-activity .task{display:grid;grid-template-columns:22px minmax(0,1fr);gap:7px;padding:15px 0;align-items:start}
.detail-activity .task>span{min-width:0;overflow-wrap:anywhere}.detail-activity .task>.who{grid-column:2;white-space:normal;line-height:1.7;margin:0}
.detail-activity .new-task>summary{padding:10px 0;font-size:13px}.detail-activity .quick{flex-wrap:wrap}.detail-activity .quick input{min-width:0}
.detail-activity .entry .txt{overflow-wrap:anywhere}.detail-activity .entry{border-bottom:0;border-left:2px solid #e3e9e4;padding-left:12px;margin:12px 0}
.detail-content .tz{display:block}.detail-content .toc{position:static;display:flex;flex-wrap:wrap;gap:4px;margin:16px 0;border-bottom:1px solid var(--line)}
.detail-content .toc a{padding:6px 10px}.detail-content .doc{padding:16px 0;border:0}.detail-content .vbar{flex-wrap:wrap}.detail-content .sample{grid-template-columns:minmax(0,1fr)}
.detail-content .samples{max-width:none}.detail-content .grid>*{min-width:0}
.detail-workspace.document-mode{grid-template-columns:minmax(0,1fr) minmax(280px,340px)}
.detail-workspace.document-mode .detail-visual{display:none}
.detail-workspace.document-mode .detail-activity{grid-column:2;grid-row:1}.detail-workspace.document-mode .detail-content{grid-column:1;grid-row:1}
@media(min-width:1800px){.detail-workspace{grid-template-columns:minmax(280px,.8fr) minmax(600px,1.8fr) minmax(330px,1fr)}}
@media(max-width:1200px){.detail-workspace{grid-template-columns:minmax(210px,.65fr) minmax(0,1.5fr)}.detail-activity{grid-column:2}.detail-visual{grid-row:1/3}.card-detail #model-fields{grid-template-columns:minmax(0,1fr)}}
@media(max-width:760px){main.card-detail{padding:14px 12px 30px}.card-detail .detail-heading{display:block}.detail-heading h1{font-size:23px}.detail-actions .actions{justify-content:flex-start;margin-top:14px}.detail-workspace,.detail-workspace.document-mode{display:flex;flex-direction:column;gap:18px}.detail-workspace>*{width:100%}.detail-visual{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}.detail-visual>.block{grid-column:1/-1}.detail-visual .ready .lbl{display:block}.detail-content{padding:0 14px 18px}.card-detail .steps{grid-template-columns:repeat(2,minmax(0,1fr))}.card-detail #model-fields{grid-template-columns:minmax(0,1fr)}.detail-activity{padding:14px}.detail-content .g3{grid-template-columns:minmax(0,1fr)}.detail-content .g3 textarea{grid-column:1!important}}
@media print{.detail-workspace,.detail-workspace.document-mode{display:block}.detail-activity,.detail-visual,.detail-actions,.card-stages{display:none}.detail-content{padding:0}}

.detail-thumbnails{margin-top:8px}.detail-thumbnails .thumbs:empty{display:none}
.card-detail .step{gap:7px;text-align:left;justify-content:flex-start}
.step-number{display:flex;align-items:center;justify-content:center;flex:0 0 22px;height:22px;border-radius:50%;background:#dfe7e1;color:var(--acc);font-size:11px}
.step.cur .step-number{background:#ffffff25;color:white}.step.past .step-number{background:var(--acc);color:white}
@media(max-width:760px){.detail-visual .detail-cover{grid-column:1;grid-row:1}.detail-visual .ready{grid-column:2;grid-row:1/3}.detail-thumbnails{grid-column:1;grid-row:2;margin:0}.detail-visual .thumbs img{width:44px;height:59px}}

/* Approved graphite / teal / amber card theme. Other screens retain their theme. */
body.card-page{background:var(--bg)}
.card-page header.top{background:var(--head);min-height:60px;border-bottom:1px solid #263f50}.card-page header.top nav a.on{border-bottom-color:#45c4b7}
.card-page header.top .module-switch a.on{background:#ffffff10}
.card-page main.card-detail{background:var(--bg);padding-top:24px}
.card-page .detail-heading h1{font-weight:700;letter-spacing:-.025em;display:flex;flex-wrap:wrap;align-items:baseline;gap:9px 16px}
.card-page .detail-heading .art{order:1;font-weight:500;letter-spacing:0;margin:0}
.card-page .detail-heading .tags{gap:8px}.card-page .detail-heading .tag{border:0;background:transparent;padding:0 7px 0 0}.card-page .detail-heading .tag.brand{font-weight:700}
.card-page .btn{border-radius:7px;font-weight:600}.card-page .btn:not(.sec):not(.ghost):not(.danger):hover{background:#006760}
.card-page .btn.sec{border-color:#c8d5dd;background:white}.card-page .btn.sec:hover{border-color:var(--acc)}
.card-page .card-stages{border:1px solid var(--line);border-radius:10px;padding:12px}
.card-page .steps{margin-bottom:0;gap:7px}.card-page .step{min-height:51px;background:#f2f5f7;padding:10px;border-radius:7px}
.card-page .step.past{background:#edf6f3}.card-page .step.cur{background:var(--acc)}
.card-page .step-number{background:#e2e8ec;flex-basis:25px;height:25px}
.card-page .step.past .step-number{background:var(--acc)}.card-page .step.cur .step-number{background:#ffffff26}
.card-page .detail-content,.card-page .detail-activity{border:1px solid var(--line);border-radius:10px}
.card-page .detail-content{padding:0 22px 24px}.card-page .detail-activity{padding:17px}
.card-page .detail-content .ctabs{gap:4px;padding:14px 0;margin:0 0 2px;align-items:center}
.card-page .ctabs button{padding:8px 11px;border:0;border-radius:6px;margin:0}
.card-page .ctabs button.on{background:var(--acc);font-weight:600}.card-page .ctabs button.on .n{background:#ffffff26}
.card-page .ctabs button:not(.on):hover{background:var(--line2)}
.card-page .detail-content .block>h3,.card-page .latest-sample>h3,.card-page .detail-activity .block>h3{font-weight:650;text-transform:none;letter-spacing:-.015em}
.card-page #model-fields{gap:0 24px}.card-page .model-field{display:block;padding:14px 0;border-color:#e8edf0}
.card-page .model-field dt{margin-bottom:6px}
.card-page #model-fields dd{line-height:1.55;font-weight:500;padding:5px 25px 5px 6px;margin-left:-6px;min-height:32px;position:relative}
.card-page #model-fields dd.empty{font-weight:400}
.card-page #model-fields dd.ed:hover,.card-page #model-fields dd.ed:focus-visible{background:var(--acc2)}
.card-page #model-fields dd.ed:not(:has(input,textarea,select)):hover::after{content:'✎';position:absolute;right:7px;top:5px;color:var(--acc);font-size:14px;pointer-events:none}
.card-page .detail-visual .ready{background:white;border:1px solid var(--line);border-radius:10px;padding:17px;margin-top:16px}.card-page .ready .lbl small{font-weight:700;white-space:nowrap}.card-page .bar{background:#e3eaee;margin-bottom:14px}
.card-page .detail-cover .cover{background:#dce4e8;border-radius:9px;border:1px solid #d2dde3}
.card-page .detail-thumbnails .thumbs img{border-color:#d2dde3;border-radius:6px}.card-page .detail-thumbnails a:hover img{border-color:var(--acc)}
.card-page .waiting-panel{background:#edf4f5;border:1px solid #dbe6e8;border-radius:7px;padding:16px;margin-bottom:23px}
.card-page .waiting-panel.is-waiting{background:#fff0cc;border-color:#f5dfa3}
.card-page .waiting-panel .tag.wait{line-height:1.6;font-weight:500}
.card-page .detail-activity .task{padding:16px 0;border-color:var(--line)}.card-page .detail-activity .task>span:first-of-type{font-weight:500}.card-page .detail-activity .task .overdue{font-weight:650}
.card-page .tick{border-color:#9baeb9;border-radius:50%;width:18px;height:18px}.card-page .tick:hover{border-color:var(--acc);background:var(--acc2)}
.card-page .detail-activity .new-task{margin:0 0 10px}.card-page .detail-activity .new-task>summary{display:inline-flex;align-items:center;list-style:none;background:var(--acc);padding:7px 12px;font-weight:650;border-radius:6px;cursor:pointer}
.card-page .new-task>summary::-webkit-details-marker{display:none}.card-page .detail-activity .new-task>summary:hover{background:#006760}.card-page .detail-activity .new-task[open]>summary{margin-bottom:7px}.card-page .detail-activity .entry{border-left-color:#d9e4e8}.card-page .latest-sample{border-color:var(--line)}
.card-page .tag.amber{background:#fff0cc}.card-page .tag.ok{background:#e8f4ee}
@media(min-width:1800px){.card-page .model-field:not(.full){display:grid;grid-template-columns:100px minmax(0,1fr);gap:8px;align-items:center}.card-page .model-field:not(.full) dt{margin:0}}
@media(max-width:760px){.card-page main.card-detail{padding-top:16px}.card-page .detail-content{padding:0 14px 20px}.card-page .detail-activity{padding:14px}.card-page .detail-visual .ready{padding:12px;margin-top:0}.card-page .step{padding:8px}.card-page .ctabs button{padding:8px}}
@media print{.card-page{background:white}.card-page .detail-content{border:0;padding:0}.card-page .ctabs{display:none}}

/* Development board: approved compact graphite / teal concept. */
body.board-page{background:var(--bg)}
.board-page header.top{background:var(--head);min-height:60px;border-bottom:1px solid #263f50}.board-page header.top nav a.on{border-bottom-color:#45c4b7}.board-page header.top .module-switch a.on{background:#ffffff10}
.board-page main{padding:24px 28px 20px}.board-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px}.board-heading h1{font-size:29px;font-weight:700;letter-spacing:-.025em;margin:0 0 7px}.board-heading p{font-size:13px;color:var(--muted);margin:0}.board-heading p strong{color:var(--ink)}
.board-page .btn{border-radius:7px;font-weight:600}.board-page .btn.sec{border-color:#c8d5dd}.board-page .btn:hover{filter:none;background:#006760}.board-page .btn.sec:hover{background:white;border-color:var(--acc)}
.board-views{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:18px}.board-views a{padding:10px 16px;border-bottom:3px solid transparent;color:var(--muted);font-size:13px}.board-views a.on{border-color:var(--acc);color:var(--acc);font-weight:650}.board-views a:hover{text-decoration:none;background:#e5efef}
.board-filters{background:white;border:1px solid var(--line);border-radius:10px;padding:14px 16px;margin-bottom:14px}.board-filter-line{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.board-filter-line>label{display:grid;gap:5px;font-size:11px;color:var(--muted);margin:0;min-width:120px}.board-filter-line input,.board-filter-line select{font-size:13px;border-color:#cbd8e0;min-height:36px;max-width:220px}.board-filter-line .board-search{flex:1;min-width:190px}.board-search input{max-width:none;width:100%}.board-filter-chips{display:flex;gap:7px;flex-wrap:wrap;margin-left:auto}.board-filter-chips button{font:inherit;font-size:12px;background:white;color:var(--muted);border:1px solid var(--line);border-radius:6px;padding:8px 10px;cursor:pointer}.board-filter-chips button[aria-pressed=true]{background:#fff0cc;color:#73520c;border-color:#e7ce8c}.board-more{margin-top:12px}.board-more>summary{font-size:12px;color:var(--acc)}.board-more[open]>.board-filter-line{padding-top:13px}.board-filter-flags{display:grid;gap:5px}.board-filter-flags label{display:flex;align-items:center;gap:6px;font-size:12px;margin:0}.board-filter-flags input{min-height:0}
.board-page .board-shelf.ok{background:#edf6f3;border:1px solid #cddfd9}.board-page .board-shelf.error{background:#fff4da;border:1px solid #f0dfb7}
.board-caption{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:11px;color:var(--muted);margin-bottom:10px}.legend-amber{color:#886010}.legend-red{color:#a34231}
.board-page .board{gap:14px;min-height:380px;padding-bottom:12px;scrollbar-color:#859ca9 #dfe7ed}.board-page .board::-webkit-scrollbar-thumb{background:#859ca9}.board-page .board::-webkit-scrollbar-track{background:#dfe7ed}
.board-page .col{flex:0 0 274px;min-width:0;width:274px;padding:0 9px 10px;background:#e3eaef;border:1px solid #d7e2e9;border-top:3px solid #8ca5b4;border-radius:9px}.board-page .col.grp-prep{border-top-color:#89b9b1}.board-page .col.grp-work{border-top-color:var(--acc);background:#e0ecec}.board-page .col.grp-finish{border-top-color:#53a899}.board-page .col.grp-done{border-top-color:#256454}.board-page .col.grp-off{border-top-color:#9994ac}
.board-page .col h3{display:flex;align-items:center;gap:8px;padding:14px 3px 12px;margin:0;border:0;min-height:51px}.board-page .col h3>span:nth-child(2){flex:1}.board-col-number{flex:none;font-size:10px;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:#cfdae1;color:#516976}.board-col-count{font-size:11px;background:#ffffffaa;border-radius:5px;padding:2px 7px;color:#526573;flex:none!important}
.board-page .col .cards{padding:1px 2px 5px;scrollbar-width:thin;scrollbar-color:#aec0ca transparent}.board-page .col .cards::-webkit-scrollbar-thumb{background:#aec0ca}
.board-archive-buttons{display:flex;gap:6px;margin:0 2px}
.board-archive-buttons:has(button:not([hidden])){margin-bottom:8px}
.board-archive-status{margin:0 2px 8px;color:var(--muted);font-size:12px}
.board-archive-status:empty{margin:0}
.board-archive [hidden],.board-archive-pick[hidden]{display:none}
.board-archive-pick{display:flex;align-items:center;gap:8px;min-height:34px;margin:0 0 8px;padding:3px 8px;border-radius:5px;background:var(--line2);font-size:12px;cursor:pointer}
.board-page .kcard .board-archive-pick input[type=checkbox]{width:16px;height:16px;margin:0}
.board-archive-pick:has(input:checked){background:var(--acc2);color:var(--acc-ink)}
.board-page .kcard{border:1px solid #d1dce3;border-radius:8px;margin-bottom:10px;padding:11px;transition:border-color .15s,box-shadow .15s}.board-page .kcard:hover{border-color:#74aaa5;box-shadow:0 3px 10px #19394b0b}.board-page .kcard[hidden]{display:none}
.board-card-top{display:flex;justify-content:space-between;align-items:center;gap:6px;margin-bottom:9px}.board-brand{font-size:10px;font-weight:750;letter-spacing:.05em;color:var(--acc)}.board-brand.ww{color:#46648b}.board-page .board-card-top .tag{white-space:normal;border-radius:4px;padding:2px 6px}.board-page .tag.P3{background:#f0f4f6}
.board-card-body{display:grid;grid-template-columns:78px minmax(0,1fr);gap:10px}.board-page .kcard-cover{display:block;height:104px;overflow:hidden;border-radius:5px;background:#dbe4e9}.board-page .kcard-cover img{display:block;width:78px;height:104px;object-fit:contain;margin:0;border-radius:5px}.board-photo-empty{height:100%;display:grid;place-items:center;font-size:11px;color:#718794}.board-card-info{min-width:0}.board-card-name{display:block;color:var(--ink);font-weight:650;font-size:14px;line-height:1.4;overflow-wrap:anywhere}.board-article{display:block;font-size:10px;letter-spacing:.02em;color:#657b8a;margin:5px 0;overflow-wrap:anywhere}.board-card-meta{font-size:10px;color:#647985;line-height:1.7;overflow-wrap:anywhere}
.board-wait{background:#fff0cc;color:#765716;font-size:11px;border-radius:5px;padding:7px 8px;margin-top:10px;line-height:1.5;overflow-wrap:anywhere}.board-card-footer{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:5px;border-top:1px solid #e8edf0;margin-top:11px;padding-top:9px;font-size:10px;color:#647986}.board-card-footer .tag{font-size:10px;padding:2px 5px;border-radius:4px}.board-page .tag.age{background:#f0f4f6}.board-page .tag.age-warn{background:#fff0cc}.board-page .tag.age-bad{background:#fde7e2}
.board-page .kcard details.quick{margin-top:9px}.board-page .kcard details.quick>summary{padding:3px 0}.board-page .kcard details.quick form{gap:7px;margin-top:10px}.board-page .kcard input[type=checkbox]{width:auto}.board-column-empty{border:1px dashed #bcccd5;color:#728994;border-radius:6px;padding:18px 10px;text-align:center;font-size:11px}.board-column-empty[hidden]{display:none}
@media(max-width:760px){.board-page main{padding:18px 14px}.board-heading{align-items:flex-start;flex-wrap:wrap}.board-heading h1{font-size:24px}.board-heading p{font-size:11px}.board-filter-line{gap:10px}.board-filter-line>label{min-width:0;flex:1}.board-filter-line .board-search{flex-basis:100%}.board-filter-line select{max-width:100%;width:100%}.board-filter-chips{margin:0}.board-page .col{flex-basis:260px;width:260px}.board-caption{align-items:flex-end}}

/* Shared development workspace; production keeps its own design tokens. */
body.development-page{background:var(--bg)}
.development-page header.top{background:var(--head);min-height:60px;border-bottom:1px solid #263f50}.development-page header.top nav a.on{border-bottom-color:#45c4b7}
.development-page header.top .module-switch a.on{background:#ffffff10}
.development-page input,.development-page select,.development-page textarea{border-color:#c8d5dd;accent-color:var(--acc)}
.development-page .btn{border-radius:7px;font-weight:600}.development-page .btn.sec{background:white;border-color:#c8d5dd}
.development-page .btn:not(.sec):not(.ghost):not(.danger):hover{background:#006760;filter:none}.development-page .btn.sec:hover{border-color:var(--acc);filter:none}
.development-page a:focus-visible,.development-page summary:focus-visible{outline:2px solid var(--acc);outline-offset:3px}
.development-surface main{padding:26px 28px 40px}.development-surface h1{font-weight:700;letter-spacing:-.025em;margin-bottom:20px;overflow-wrap:anywhere}
.development-surface h2{margin:24px 0 12px}.development-surface .block>h3{text-transform:none;letter-spacing:0;flex-wrap:wrap}
.development-surface .card,.development-surface .block,.development-surface .doc{border-radius:10px;padding:20px;border-color:var(--line)}
.development-surface .filters{background:white;border:1px solid var(--line);border-radius:10px;padding:16px;gap:12px;margin-bottom:20px}.development-surface .filters input:not([type=checkbox]),.development-surface .filters select{min-height:36px}
.development-surface .filters .f{min-width:0}.development-surface .grid{gap:16px}.development-surface .grid>div{min-width:0}
.development-surface form.card>.grid input:not([type=checkbox]):not([type=radio]),.development-surface form.card>.grid select{width:100%}
.development-surface form.card h2{padding-top:18px;border-top:1px solid var(--line)}
.development-surface .tabs{gap:4px;margin-bottom:20px}.development-surface .tabs a{padding:10px 16px;border-bottom:3px solid transparent}.development-surface .tabs a.on{border-color:var(--acc);font-weight:650}
.development-table{overflow-x:auto;border:1px solid var(--line);border-radius:10px;background:white}
.development-surface table.t{border:0}.development-surface table.t th{background:#e3eaef;padding:12px;top:60px}
.development-table table.t th{position:static}.development-surface table.t td{padding:12px;line-height:1.55}.development-surface table.t tr:hover td{background:#f4f9f9}
.development-surface table.t td a{font-weight:500}.development-surface table.t td{overflow-wrap:anywhere}
.development-surface table.matrix{min-width:850px}.development-surface table.matrix td:first-child{width:150px}.development-surface table.matrix td{min-width:220px}
.development-surface table.matrix th.parent{background:#dbe7e9}
.development-surface table.matrix .kcard{border-radius:8px;padding:12px;margin:0 0 10px;border-color:#d1dce3;background:white}.development-surface .kcard .n{margin:3px 0;font-weight:600}
.development-surface .tag.wait,.development-surface .tag.amber{background:#fff0cc}.development-surface .tag.P3{background:#f0f4f6}
.development-surface .refgrid{gap:20px;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}.development-surface .ref{border-radius:10px;border-color:#d1dce3}
.development-surface .ref img{background:#dce4e8}.development-surface .ref .b{padding:16px}.development-surface .ref .b .t{margin-bottom:8px}.development-surface .ref .b .row{gap:8px}
.development-surface .entry{padding:14px 0;overflow-wrap:anywhere}.development-surface .entry.note,.development-surface .entry.task,.development-surface .entry.auto{padding-left:14px}.development-surface .entry .d{flex-wrap:wrap;gap:5px;margin-bottom:7px}
.development-surface .entry.auto{padding-top:9px;padding-bottom:9px}.development-surface .entry.task{display:block}
.development-surface .tick{border-radius:50%;border-color:#9baeb9}.development-surface .overdue{font-weight:600}
.development-surface .toc{border-radius:10px;top:76px}.development-surface .toc a:hover{background:var(--acc2)}
.development-surface .tzedit>*{min-width:0}.development-surface .tzhead.edit{border-radius:10px;padding:18px}.development-surface .tzdoc h3{display:block;text-transform:none;letter-spacing:0}
.development-surface .snaplist{gap:12px}.development-surface .snapitem{border-radius:10px;padding:12px}.development-surface .snapitem:hover{border-color:var(--acc);background:#f8fcfb}
.development-surface .snapbtn{border-radius:7px;font-weight:600}.development-surface .snapbtn:hover{background:#006760}
.development-surface .imgdrop{background:var(--line2);border-color:#a4b8c4;border-radius:8px}
/* One vertical page scroll for the whole board, without column scroll areas. */
.board-page .board{height:auto;max-height:none;align-items:flex-start}.board-page .col{max-height:none}.board-page .col .cards{overflow:visible;flex:none}
@media(max-width:760px){.development-surface main{padding:18px 14px 30px}.development-surface .filters{padding:12px;gap:10px}.development-surface .filters .f{flex:1 1 135px}.development-surface .filters input:not([type=checkbox]),.development-surface .filters select{max-width:100%}.development-surface .card,.development-surface .block,.development-surface .doc{padding:14px}.development-surface .refgrid{grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}.development-surface table.t th{position:static}.development-surface .board-views a{padding:10px 12px}}
@media print{body.development-page{background:white}.development-surface main{padding:0;max-width:none}.development-surface .card,.development-surface .doc,.development-surface .block{border:0;padding:0}.development-table{overflow:visible;border:0}.development-surface .filters{display:none}}

/* Fixed native scrollbar mirrors the board while the page scrolls vertically. */
.board-page main{padding-bottom:50px}
.board-scrollbar{position:fixed;bottom:0;height:24px;overflow-x:scroll;overflow-y:hidden;z-index:20;background:#dfe7ed;border-top:1px solid #c8d5dd;box-shadow:0 -3px 12px #172b3a12;scrollbar-color:#718b9b #dfe7ed;scrollbar-width:auto}
.board-scrollbar[hidden]{display:none}.board-scrollbar>div{height:1px}
.board-scrollbar::-webkit-scrollbar{height:17px}.board-scrollbar::-webkit-scrollbar-thumb{background:#718b9b;border:3px solid #dfe7ed;border-radius:8px}.board-scrollbar::-webkit-scrollbar-track{background:#dfe7ed}
.board-scrollbar:focus-visible{outline:2px solid var(--acc);outline-offset:-2px}
@media print{.board-scrollbar{display:none}}

.clipboard-photo{width:100%;display:grid;gap:8px;padding:12px;border:1px dashed #9bb6c2;border-radius:7px;background:var(--line2)}
.clipboard-photo:focus-visible{outline:2px solid var(--acc);outline-offset:2px}.clipboard-photo .btn{justify-self:start}

.passport-task-dialog{width:min(620px,calc(100vw - 28px));max-height:90vh;overflow:auto;border:1px solid var(--line);border-radius:12px;padding:24px;color:var(--ink);background:white;box-shadow:0 18px 60px #172b3a40}.passport-task-dialog::backdrop{background:#172b3a80}.passport-task-dialog h2{margin-top:0;font-size:20px}.passport-task-dialog label{display:grid;gap:6px}.passport-task-dialog textarea,.passport-task-dialog select{width:100%;font-size:14px}.passport-task-dialog .btn:disabled{opacity:.6;cursor:wait}

}
/* Development artwork and placement approvals. */
#pane-prints .print-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap;margin:0 0 18px}
#pane-prints h3{margin:0 0 6px}#pane-prints h4{margin:20px 0 10px}
#pane-prints .print-main{display:grid;grid-template-columns:minmax(180px,240px) minmax(0,1fr);gap:24px}
#pane-prints .print-artwork{display:grid;gap:10px;align-content:start;min-width:0}
#pane-prints .print-artwork img{width:100%;height:180px;object-fit:contain;border:1px solid #d4e1e5;border-radius:10px;background:white}
#pane-prints .print-placeholder{padding:48px 16px;text-align:center;background:#f1f5f7;border-radius:10px;color:#64748b}
#pane-prints .print-parameters{margin:0;display:grid;grid-template-columns:130px minmax(0,1fr);gap:12px 16px;align-content:start}
#pane-prints dt{color:#64748b}#pane-prints dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
#pane-prints .print-references{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}
#pane-prints .print-references>div{min-width:0;display:grid;align-content:start;gap:8px}
#pane-prints .print-references img{width:100%;height:180px;object-fit:contain;background:#f4f7f8;border:1px solid #d4e1e5;border-radius:10px}
#pane-prints a.btn{white-space:normal;overflow-wrap:anywhere;max-width:100%;text-align:left}
#pane-prints .print-edit{margin-top:16px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
#pane-prints .wide{grid-column:1/-1}#pane-prints label{display:grid;gap:6px;min-width:0}
#pane-prints input:not([type=checkbox]),#pane-prints textarea,#pane-prints select{box-sizing:border-box;width:100%;min-width:0}
#pane-prints textarea{resize:vertical}#pane-prints small{line-height:1.5}
#pane-prints .print-remove{display:grid;gap:10px}#pane-prints .print-remove label{display:flex;align-items:center;overflow-wrap:anywhere}
#pane-prints .print-review,#pane-prints .print-edit-panel,#pane-prints .print-history{margin-top:20px;padding-top:16px;border-top:1px solid #d4e1e5}
#pane-prints .print-review .row{margin-top:12px}#pane-prints .print-approved{background:#e5f5ed;color:#176640;padding:12px;border-radius:8px}
#pane-prints .print-comment{padding:12px 16px;border-left:3px solid #008882;background:#f0f7f7;margin-top:16px}
#pane-prints .print-comment p,#pane-prints .print-text{white-space:pre-wrap;overflow-wrap:anywhere}
#pane-prints .print-history section{padding:14px 0;border-bottom:1px solid #e1e8ec}#pane-prints .print-add{color:#008882;font-weight:600}
@media(max-width:650px){#pane-prints .print-main,#pane-prints .print-edit{grid-template-columns:minmax(0,1fr)}#pane-prints .print-parameters{grid-template-columns:1fr;gap:5px}#pane-prints dd{margin-bottom:12px}}

/* Primary modules and their contextual navigation occupy separate rows. */
@layer smolaDesign {
  .ui-system header.top {display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:0 16px;min-height:0;padding:0;background:var(--head);border:0}
  .ui-system header.top>.logo {grid-column:1;grid-row:1;min-height:48px;margin-left:24px}
  .ui-system header.top>.module-switch {grid-column:2;grid-row:1;display:flex;flex-wrap:wrap;min-width:0;max-width:100%;border:0;padding:0}
  .ui-system header.top>.module-switch a {display:flex;align-items:center;min-height:48px;padding:8px 12px;font-size:14px;font-weight:600;border:0;border-radius:0;background:transparent;box-shadow:none}
  .ui-system header.top>.module-switch a.on {background:transparent;box-shadow:inset 0 -2px #61c6ba}
  .ui-system header.top>.module-switch a:hover {background:#ffffff0a;text-decoration:none}
  .ui-system header.top>.section-nav {grid-column:1/-1;grid-row:2;display:flex;align-self:stretch;flex-wrap:wrap;min-width:0;width:100%;margin:0;padding:0 20px;gap:8px;background:var(--card);color:var(--ink);border:0;border-bottom:1px solid var(--line)}
  .ui-system header.top>.section-nav>a,.ui-system header.top>.section-nav .ui-menu>summary {display:flex;align-items:center;min-height:44px;margin:0;padding:8px 12px;font-size:13px;font-weight:500;color:var(--ink);background:transparent;box-shadow:none;border:0;border-radius:0;text-decoration:none}
  .ui-system header.top>.section-nav>a.on,.ui-system header.top>.section-nav .ui-menu.is-active>summary {color:var(--acc-ink);background:transparent;box-shadow:inset 0 -2px var(--acc)}
  .ui-system header.top>.section-nav>a:hover,.ui-system header.top>.section-nav .ui-menu>summary:hover,.ui-system header.top>.section-nav .ui-menu[open]>summary {background:var(--line2);color:var(--acc-ink)}
  .ui-system header.top>.ui-user {grid-column:3;grid-row:1;min-width:0;margin-left:auto;margin-right:24px;max-width:240px}
  .ui-system header.top>.ui-user>summary {overflow-wrap:anywhere}
  .ui-system header.top>.ui-user .ui-chev {flex-shrink:0}
  .ui-system header.top .ui-menu-panel {max-width:calc(100vw - 32px)}
  .ui-system .materials-group {margin-top:28px}
  .ui-system .materials-grid {grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
  .ui-system .materials-link {margin:0;display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0;min-height:136px;padding:20px;text-decoration:none;overflow-wrap:anywhere}
  .ui-system .materials-link h3 {margin:0;font-size:17px;color:var(--acc-ink)}
  .ui-system .materials-link p {margin:0;line-height:1.5}
  .ui-system .materials-link:hover {border-color:var(--acc);background:var(--acc2)}
  @media(max-width:1150px) {
    .ui-system header.top>.logo {margin-left:16px}
    .ui-system header.top>.module-switch {justify-self:start}
    .ui-system header.top>.ui-user {grid-column:3;grid-row:1;margin-right:16px}
    .ui-system header.top>.section-nav {padding:0 4px;justify-content:flex-start}
  }
  @media(max-width:760px) {
    .ui-system header.top {grid-template-columns:auto minmax(0,1fr);gap:0 12px;position:relative}
    .ui-system header.top>.logo {min-height:44px}
    .ui-system header.top>.ui-user {grid-column:2;grid-row:1;justify-self:end;max-width:100%}
    .ui-system header.top>.module-switch {grid-column:1/-1;grid-row:2;justify-self:start;width:100%;padding:0 8px}
    .ui-system header.top>.section-nav {grid-column:1/-1;grid-row:3;padding:0 10px;gap:2px;justify-content:flex-start}
    .ui-system header.top .module-switch a {min-height:44px;display:flex;align-items:center;padding:8px}
    .ui-system header.top>.section-nav>a,.ui-system header.top>.section-nav .ui-menu>summary {min-height:44px;padding:8px 6px}
    .ui-system .materials-grid {grid-template-columns:minmax(0,1fr)}
    .ui-system .materials-link {min-height:100px;padding:16px}
  }
}

@layer smolaDesign {
  html:has(>body.ui-system:not(.tablet-post):not(.kiosk-page)) {scroll-padding-top:var(--app-header-height, 60px)}
  .ui-system .nest-editor {scroll-margin-top:12px}
  .ui-system #model-fields {scroll-margin-top:40px}
  @media(min-width:961px) {.ui-system .tzedit .fpanel {top:var(--app-header-height, 60px);max-height:calc(100vh - var(--app-header-height, 60px) - 20px)}}
  .ui-system.development-surface .toc {top:calc(var(--app-header-height, 60px) + 16px)}
}

.fabric-meter-warning {
  padding: .6rem .85rem;
  background: #ffeb3b;
  border: 2px solid #ad8000;
  border-radius: 8px;
  color: #302200;
  font-weight: 750;
}

.post-queue-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px 20px;
  margin: 16px 0;
}
.post-queue-tools .post-tabs { margin: 0; }
.post-map-search {
  display: grid;
  gap: 4px;
  width: min(100%, 24rem);
  font-weight: 600;
}
.post-map-search input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  font-size: 16px;
}
#queue > .post-map-search { margin: 0 0 14px; }
.post-map-results {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.post-map-results .post-map-result {
  width: 100%;
  min-height: 44px;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
.prep-order[hidden], .prep-order tr[hidden], #prep-search-list[hidden] { display: none !important; }

.post-sewing-destination {
  display: block;
  font-size: .9em;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
