/* Мобильная сборка: существующие поля, три шага. Десктопная форма не меняется. */
.mf-section-title,.mf-header-title,.mf-file-tools,.mf-scope-hint,.mf-team-modes,.mf-quick-dates,.mf-time-hint,.mf-timezone-phone{display:none}
@media(max-width:899px){
  html.kg-mobile-form{scroll-padding-top:92px;scroll-padding-bottom:180px}
  html.kg-mobile-form .nf-wizard-open .kg-top{min-height:60px;padding:10px 16px;position:sticky;top:0;z-index:30;background:var(--bg);display:grid;grid-template-columns:68px minmax(0,1fr) 68px;gap:4px;border-bottom:1px solid var(--line)}
  html.kg-mobile-form .nf-wizard-open .kg-top>a{display:none}
  html.kg-mobile-form .nf-wizard-open .nf-back{position:static;font:400 14px var(--body);text-align:left;margin:0;padding:8px 0;white-space:nowrap}
  html.kg-mobile-form .nf-wizard-open .mf-header-title{display:block;grid-column:2;grid-row:1;text-align:center;font:600 16px var(--body);color:var(--text);white-space:nowrap}
  html.kg-mobile-form .nf-wizard-open .nf-body{padding:12px 16px calc(170px + env(safe-area-inset-bottom));gap:0}
  html.kg-mobile-form .nf-wizard-open .nf-aside,html.kg-mobile-form .nf-wizard-open .nf-foot{display:none}
  html.kg-mobile-form .nf-form{gap:0}
  #mfWizard{min-width:0;width:100%}
  .mf-steps{display:flex;gap:10px;margin-bottom:24px}
  .mf-steps button{flex:1;min-width:0;border:0;border-top:4px solid var(--line);border-radius:2px 2px 0 0;background:transparent;padding:10px 0 0;color:var(--label);font:400 11px/1.4 var(--mono);text-align:left;white-space:nowrap;cursor:pointer;min-height:44px}
  .mf-steps button.is-current,.mf-steps button.is-done{border-top-color:var(--text)}
  .mf-steps button.is-current{color:var(--text);font-weight:500}
  .mf-steps i{font-style:normal;margin-right:4px}
  .mf-panel{display:flex;flex-direction:column;gap:18px;padding:0;min-width:0}
  .nf .mf-title{font:700 30px/1.12 var(--body);letter-spacing:-.025em;text-transform:none;color:var(--text);margin:0;outline-offset:5px}
  .mf-intro{font-size:15px;line-height:1.5;color:var(--muted);margin-top:-7px}
  html.kg-mobile-form .nf-sec,html.kg-mobile-form .nf-sec+.nf-sec{gap:14px;padding:0;border:0}
  html.kg-mobile-form #programSec>.nf-hrow,html.kg-mobile-form #teamSec>.nf-h,html.kg-mobile-form #eventSec>.nf-h,html.kg-mobile-form #scopeSec .nf-hnote{display:none}
  html.kg-mobile-form #scopeSec,html.kg-mobile-form #roleSec{padding-top:18px;border-top:1px solid var(--line)}
  html.kg-mobile-form #scopeSec .nf-h,html.kg-mobile-form #roleSec .nf-h{display:none}
  html.kg-mobile-form .nf .mf-section-title{display:block;margin:0;font:500 14px/1.4 var(--body);color:var(--muted);letter-spacing:0;text-transform:none}
  html.kg-mobile-form .nf #drop{display:none}
  .mf-file-tools{display:flex;flex-direction:column;gap:9px}
  .mf-file-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .mf-file-buttons button{border:1px dashed var(--line3,var(--label));border-radius:12px;background:transparent;color:var(--text);font:400 15px var(--body);min-height:76px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;cursor:pointer}
  .mf-file-buttons svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
  .mf-file-tools p,.mf-scope-hint,.mf-time-hint{font:400 12px/1.5 var(--body);color:var(--label)}
  .mf-scope-hint,.mf-time-hint{display:block}
  html.kg-mobile-form .nf .kg-files{margin:0;display:flex;flex-direction:column;gap:8px}
  html.kg-mobile-form .nf .kg-files:empty{display:none}
  html.kg-mobile-form .nf .kg-files>li{display:grid;grid-template-columns:38px minmax(0,1fr) 36px;gap:2px 10px;padding:10px;min-height:68px;border:1px solid var(--line);border-radius:12px}
  html.kg-mobile-form .nf .kg-files>li>.nf-ext{grid-column:1;grid-row:1/3;align-self:center;display:grid;place-items:center;width:36px;height:38px;padding:0;background:var(--accent);color:#111;font-size:10px;letter-spacing:0;border-radius:8px}
  html.kg-mobile-form .nf .kg-files>li>span{grid-column:2;grid-row:1;min-width:0;white-space:normal;overflow-wrap:anywhere;font-size:14px;font-weight:600;line-height:1.35}
  html.kg-mobile-form .nf .kg-files>li>.nf-size{grid-column:2;grid-row:2;font-size:12px;align-self:start}
  html.kg-mobile-form .nf .kg-files>li>.kg-x{grid-column:3;grid-row:1/3;align-self:center;width:36px;height:44px}
  html.kg-mobile-form .nf .kg-files .kg-sheets{grid-column:1/-1;margin-top:10px;min-width:0}
  html.kg-mobile-form .nf-opts{display:flex;flex-wrap:wrap;gap:8px}
  html.kg-mobile-form .nf .kg-mode{position:relative;display:block;width:auto;max-width:100%;padding:11px 14px;border:1px solid var(--line);border-radius:24px;background:var(--field);cursor:pointer}
  html.kg-mobile-form .nf .kg-mode b{font:400 14px/1.35 var(--body);display:block;overflow-wrap:anywhere}
  html.kg-mobile-form .nf .kg-mode input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
  html.kg-mobile-form .nf .kg-mode small{display:none}
  html.kg-mobile-form .nf .kg-mode:has(input:checked){background:var(--text);border-color:var(--text);color:var(--bg)}
  html.kg-mobile-form .nf .kg-mode:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:3px}
  html.kg-mobile-form .nf .kg-mode:has(input:checked) b{color:var(--bg)}
  html.kg-mobile-form .nf #teamFileBox{padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--field);line-height:1.45;align-items:center}
  html.kg-mobile-form .nf #teamFileBox input{flex:none}
  .mf-team-modes{display:flex;gap:4px;padding:4px;background:var(--line);border-radius:12px;margin:8px 0}
  .mf-team-modes button{flex:1;border:0;min-height:42px;border-radius:9px;background:transparent;color:var(--muted);font:400 14px var(--body);cursor:pointer}
  .mf-team-modes button[aria-pressed=true]{background:var(--field);color:var(--text);font-weight:600}
  html.kg-mobile-form .nf-thead,html.kg-mobile-form .nf #teamUnits,html.kg-mobile-form .nf #teamPaste{display:none}
  html.kg-mobile-form .nf .kg-team{gap:10px}
  html.kg-mobile-form .nf .kg-trow,html.kg-mobile-form .nf .kg-team.is-nogroups .kg-trow{position:relative;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--field);align-items:start}
  html.kg-mobile-form .nf .kg-trow .kg-in{font-size:16px;min-width:0;height:46px;background:var(--bg);padding:0 10px}
  html.kg-mobile-form .nf .kg-trow [data-t=name]{grid-column:1/-1;width:calc(100% - 34px);font-weight:500}
  html.kg-mobile-form .nf .kg-trow [data-t=role]{grid-column:1;grid-row:2}
  html.kg-mobile-form .nf .kg-trow [data-t=group]{grid-column:2;grid-row:2}
  html.kg-mobile-form .nf .kg-team.is-nogroups .kg-trow [data-t=role]{grid-column:1/-1}
  html.kg-mobile-form .nf .kg-trow .kg-x{position:absolute;right:4px;top:13px;width:36px;height:44px}
  html.kg-mobile-form .nf .kg-trow.is-unit::after{content:'цех целиком, без имён';grid-column:1/-1;color:var(--label);font-size:12px;line-height:1.4}
  html.kg-mobile-form .nf .kg-trow__fix,html.kg-mobile-form .nf .kg-hints{grid-column:1/-1}
  html.kg-mobile-form .nf #teamAdd{width:100%;height:46px;border-style:dashed;background:transparent;font-size:15px}
  html.kg-mobile-form .nf #teamFile{font-size:13px}
  html.kg-mobile-form .nf .nf-tacts{gap:4px;margin-top:7px}
  html.kg-mobile-form .nf #teamList{padding:12px;background:var(--field);border:1px solid var(--line);border-radius:12px;order:0}
  html.kg-mobile-form .nf .kg-field>span{font:500 12px/1.4 var(--body);letter-spacing:0;text-transform:none;color:var(--label)}
  html.kg-mobile-form .nf #eventSec .nf-grid{gap:16px}
  html.kg-mobile-form .nf .nf-chip span{min-height:40px;height:auto;padding:9px 12px;font-size:13px;white-space:normal}
  html.kg-mobile-form .nf .kg-in,html.kg-mobile-form .nf .kg-ta{font-size:16px;min-width:0;max-width:100%}
  html.kg-mobile-form .nf input[type=date],html.kg-mobile-form .nf input[type=time]{min-width:0;max-width:100%;padding:0 10px;-webkit-appearance:none}
  .mf-quick-dates{display:flex;gap:8px;margin-top:-8px}
  .mf-quick-dates button,.mf-timezone-phone{min-height:38px;padding:7px 12px;border:1px solid var(--line);border-radius:8px;background:var(--field);color:var(--text);font:400 13px var(--body);cursor:pointer}
  .mf-timezone-phone{display:inline-block;align-self:flex-start;max-width:100%;text-align:left}
  html.kg-mobile-form .nf select[name=timezone_offset]{font-size:14px;padding-right:24px}
  html.kg-mobile-form .nf #daysNote{font-size:12px}
  html.kg-mobile-form .nf .nf-send__hint{display:none}
  html.kg-mobile-form .mf-footer{position:fixed;left:0;right:0;bottom:0;z-index:40;padding:10px 16px calc(12px + env(safe-area-inset-bottom));background:var(--bg);border-top:1px solid var(--line);display:flex;flex-direction:column;gap:8px}
  .mf-summary{color:var(--muted);font:400 12px/1.4 var(--body);max-width:100%;overflow-wrap:anywhere}
  html.kg-mobile-form .nf .mf-footer .kg-btn{height:52px;min-height:52px;width:100%;border-radius:12px;font:600 16px var(--body);color:#111}
  .mf-footer-hint{font-size:11px;line-height:1.35;text-align:center;color:var(--label)}
  #mfErrors:empty{display:none}
  #mfErrors .kg-err{padding:12px;margin:0 0 18px;border-radius:10px;border:1px solid currentColor;font-size:14px;overflow-wrap:anywhere}
  .mf-panel [tabindex=-1]:focus:not(:focus-visible){outline:none}
  .mf-panel input,.mf-panel textarea,.mf-panel select{scroll-margin-block:100px 180px}
}
