/* Mazel 1.12 — Телефон Pro (только ≤ 760 px). ПК не затрагивается. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
#tabbar,.mtop{display:none}
@media (max-width:760px){
  /* iPhone увеличивает страницу при поле < 16 px — поэтому везде 16 px */
  input,select,textarea,.in{font-size:16px!important}
  html.mzph,html.mzph body{overflow-x:clip;max-width:100%}
  html.mzph .side-l .side{display:none!important}
  html.mzph .shell.side-l{display:block}
  html.mzph .main{padding:0 12px calc(78px + env(safe-area-inset-bottom))!important;min-width:0}
  html.mzph #view{min-width:0}
  /* верхняя строка */
  html.mzph .mtop{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;position:sticky;top:0;z-index:41;margin:0 -12px;padding:calc(6px + env(safe-area-inset-top)) 12px 6px;background:#fff}
  html.mzph .mt-logo,html.mzph .mt-b{border:0;background:none;padding:0;width:36px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:10px}
  html.mzph .mt-b:active{background:#F2F2F7}
  html.mzph .mt-logo .logo{width:30px;height:30px;font-size:10.5px;border-radius:9px;box-shadow:none}
  html.mzph .mt-t{font-size:17px;font-weight:700;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}
  html.mzph .sumbar{background:#F4F5F8!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;margin:0 -12px 10px!important;padding:0 12px!important;min-height:40px!important;top:var(--sbt,48px)!important;border-top:1px solid #E5E5EA}
  html.mzph .sb-i{padding:4px 12px 4px 0!important;margin-right:12px!important}
  html.mzph .sb-i small{font-size:11px}
  html.mzph .sb-i b{font-size:14px!important}
  /* поиск: по кнопке-лупе */
  html.mzph .msrch{display:none!important}
  html.mzph.sq .msrch{display:block!important;margin:4px 0 10px!important}
  /* нижняя панель разделов */
  html.mzph #tabbar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:45;justify-content:space-around;padding:6px 4px calc(6px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #E0E0E5}
  html.mzph #tabbar button{flex:1 1 0;min-width:0;border:0;background:none;display:flex;flex-direction:column;align-items:center;gap:3px;padding:2px 0;font:inherit;font-size:10.5px;font-weight:600;color:#3A3A3C;position:relative}
  html.mzph #tabbar button span:not(.ic):not(.badge){max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  html.mzph #tabbar .ic{width:32px;height:32px;border-radius:10px;display:flex;align-items:center;justify-content:center}
  html.mzph #tabbar .ic svg{width:18px;height:18px}
  html.mzph #tabbar button.on{color:#1463F3}
  html.mzph #tabbar button.on{color:#1463F3;font-weight:800}html.mzph #tabbar button.on::before{content:'';position:absolute;inset:-2px 4px -2px 4px;border-radius:14px;background:#EAF1FF;z-index:-1}html.mzph #tabbar button{z-index:0;color:#1D1D1F!important}html.mzph #tabbar button.on{color:#1463F3!important}
  html.mzph #tabbar .badge{position:absolute;top:0;left:calc(50% + 8px);min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:#FF3B30;color:#fff;font-size:10.5px;display:flex;align-items:center;justify-content:center}
  .tm-ic{background:#636366;color:#fff;font-size:11px;font-weight:800}
  /* лист действий */
  #asheet{position:fixed;inset:0;z-index:70}
  #asheet .as-bg{position:absolute;inset:0;background:rgba(10,20,40,.35)}
  #asheet .as-box{position:absolute;left:0;right:0;bottom:0;max-height:80vh;overflow:auto;background:#fff;border-radius:20px 20px 0 0;padding:8px 14px calc(14px + env(safe-area-inset-bottom));animation:pop .22s both}
  #asheet .as-h{display:flex;align-items:center;justify-content:space-between;padding:8px 2px 10px;position:sticky;top:-8px;background:#fff}
  #asheet .as-h b{font-size:17px}
  #asheet .as-i{width:100%;display:flex;align-items:center;gap:12px;min-height:50px;padding:8px 6px;border:0;border-top:1px solid #EFEFF4;background:none;font:inherit;font-size:16px;color:#1D1D1F;text-align:left}
  #asheet .as-i.on{color:#1463F3;font-weight:700}
  #asheet .as-i.red{color:#E5002B}
  #asheet .as-i .ic{width:30px;height:30px;border-radius:9px;display:flex;align-items:center;justify-content:center;flex:none}
  #asheet .as-i svg{flex:none}
  /* окна = лист на весь экран */
  html.mzph #modal{padding:0!important;align-items:stretch!important;justify-content:stretch!important}
  html.mzph #modal-box{max-width:none!important;width:100%!important;height:100%!important;max-height:none!important;border-radius:0!important;padding:0 16px calc(28px + env(safe-area-inset-bottom))!important;animation:none;box-shadow:none;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  html.mzph #modal-box .mhead{position:sticky;top:0;z-index:6;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;margin:0 -16px 12px;padding:calc(8px + env(safe-area-inset-top)) 10px 8px;background:rgba(255,255,255,.96);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border-bottom:1px solid #E5E5EA}
  html.mzph .mh-x,html.mzph .mh-ok{border:0;background:none;font:inherit;font-size:16px;min-height:40px;padding:0 8px;border-radius:10px;color:#1463F3;white-space:nowrap}
  html.mzph .mh-ok{background:#1463F3;color:#fff;font-weight:700;padding:0 16px}
  html.mzph .mh-ok.red{background:#E5002B}
  html.mzph .mh-t{font-size:16px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  html.mzph .mh-hid{display:none!important}
  html.mzph #modal-box [style*="max-height"]{max-height:none!important;overflow:visible!important}
  html.mzph #modal-box .grid.g2,html.mzph #modal-box .g3,html.mzph #modal-box .fields,html.mzph #modal-box .grid.g4{grid-template-columns:minmax(0,1fr)!important}
  html.mzph #modal-box [style*="grid-column"]{grid-column:auto!important}
  html.mzph #modal-box select,html.mzph #modal-box .in{width:100%;max-width:100%}
  html.mzph #modal-box .row{flex-wrap:wrap}
  html.mzph #modal-box table{display:block;overflow-x:auto}
  /* шапки (hero) компактно; цифры только в полосе сверху */
  html.mzph .hero{padding:14px 16px!important;border-radius:18px!important;box-shadow:none!important;margin-bottom:12px}
  html.mzph .hero h1{font-size:22px!important;margin:0 0 4px!important;line-height:1.2}
  html.mzph .hero :is(h1,h2,[style*="font-size:2"],[style*="font-size:3"],[style*="font-size:4"]){font-size:22px!important;line-height:1.2!important}
  html.mzph .hero .sub{font-size:13px}
  html.mzph .hero :is(.grid,.g2,.g3,.g4,.kpis):has(> .glass){display:none!important}
  html.mzph .hero > .row,html.mzph .hero .row{flex-wrap:wrap!important;gap:8px!important}
  html.mzph .hero > .row > .grow{flex:1 1 100%!important;min-width:0}
  html.mzph .row>div[style*="flex:1 1 340px"]{flex:1 1 100%!important;min-width:0}
  /* Главная: разделы компактно 2 × 64 px */
  html.mzph .home-tiles{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin:10px 0!important}
  html.mzph .home-tiles .house{min-height:64px!important;padding:10px 12px!important;border-radius:16px!important;box-shadow:none!important;justify-content:center}
  html.mzph .home-tiles .house>div:first-child{display:none!important}
  html.mzph .home-tiles .house>div:nth-child(2){font-size:15px!important}
  html.mzph .home-tiles .house>div:nth-child(3){font-size:12px!important;line-height:1.3}
  /* карточки и списки */
  html.mzph .card{padding:14px!important;border-radius:16px!important}
  html.mzph .card h2,html.mzph #view h2{font-size:17px!important}
  html.mzph #view h1{font-size:24px!important}
  html.mzph .grid.g3,html.mzph .grid.g4:not(.home-tiles){grid-template-columns:minmax(0,1fr)!important}
  html.mzph .tiles,html.mzph .pts{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  html.mzph .link.grow,html.mzph .td-t{white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
  html.mzph #view b{overflow-wrap:anywhere}
  html.mzph button.link{min-height:32px;padding-top:6px;padding-bottom:6px;white-space:normal!important;text-overflow:clip!important;overflow:visible!important}
  html.mzph .tile b,html.mzph .tile span{white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
  html.mzph #modal-box a.btn{max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:left}
  html.mzph .btn.small{min-height:34px}
  html.mzph select{text-overflow:ellipsis}
  html.mzph .muted:only-child{padding:6px 0}
  html.mzph .m-hid{display:none!important}
  html.mzph .mact{flex-wrap:wrap!important;gap:8px!important}
  html.mzph .m-more{background:#F2F2F7!important;color:#1D1D1F!important;box-shadow:none!important}
  html.mzph .set-bar{position:static!important}
  html.mzph .set-bar .seg{flex-wrap:wrap!important;overflow:visible!important}
  html.mzph .set-bar .seg::-webkit-scrollbar{display:none}
  html.mzph #dropov{display:none!important}
  /* таблицы → карточки строк */
  html.mzph table.m-cards{display:block;width:100%!important;min-width:0!important}
  html.mzph table.m-cards thead,html.mzph table.m-cards tr:has(> th){display:none}
  html.mzph table.m-cards tbody{display:block}
  html.mzph table.m-cards tr{display:block;padding:8px 0;border-top:1px solid #E5E5EA}
  html.mzph table.m-cards td{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:2px 0!important;border:0!important;text-align:right!important;white-space:normal!important;width:auto!important;max-width:none!important}
  html.mzph table.m-cards td::before{content:attr(data-l);flex:none;max-width:45%;text-align:left;font-size:12.5px;color:#636366;font-weight:500}
  html.mzph table.m-cards td:not([data-l])::before,html.mzph table.m-cards td[data-l=""]::before{content:none}
  html.mzph table.m-cards td:first-child{font-weight:700}
  html.mzph table.m-cards .m-v{min-width:0;flex:1 1 auto;text-align:right;overflow-wrap:anywhere}
  html.mzph table.m-cards .m-v>*{max-width:100%}
  html.mzph table.m-cards td:empty{display:none}
  html.mzph .card:has(> table.m-cards),html.mzph .card:has(table.m-cards){overflow-x:visible!important}
}
@media (max-width:760px){
  html.mzph .ce-pr{flex-wrap:wrap!important}
  html.mzph .ce-pr > .grow{flex:1 1 100%!important}
  html.mzph #modal-box .row > a.btn.small, html.mzph #modal-box .row > button.btn.small{white-space:nowrap;flex:none}
  html.mzph .row:has(> .grow) > a.btn.small{white-space:nowrap}
}
@media (max-width:760px){html.mzph table.m-cards td:not([data-l]) .m-v,html.mzph table.m-cards td[data-l=""] .m-v{text-align:left}html.mzph table.m-cards td:not([data-l]),html.mzph table.m-cards td[data-l=""]{justify-content:flex-start}}

@media (max-width:760px){
  html.mzph,html.mzph body{overscroll-behavior-y:none}
  html.mzph #modal-box,#asheet .as-box{overscroll-behavior:contain}
  #docfab{position:fixed;right:14px;bottom:calc(74px + env(safe-area-inset-bottom));z-index:44;border:0;background:none;padding:0;display:flex;flex-direction:column;align-items:center;gap:3px}
  #docfab .fab-c{width:56px;height:56px;border-radius:50%;background:var(--g-pink);display:flex;align-items:center;justify-content:center;box-shadow:0 8px 22px rgba(255,55,95,.35);position:relative}
  #docfab .fab-l{font-size:11px;font-weight:700;color:#1D1D1F;background:rgba(255,255,255,.95);padding:1px 6px;border-radius:8px}
  #docfab .fab-n{position:absolute;top:-2px;right:-2px;min-width:20px;height:20px;border-radius:10px;background:#FF3B30;color:#fff;font-size:11.5px;display:flex;align-items:center;justify-content:center;border:2px solid #fff}
  html.mzph .main{padding-bottom:calc(150px + env(safe-area-inset-bottom))!important}
  body:has(#modal:not([hidden])) #docfab,body:has(#asheet) #docfab{display:none}
}
@media (min-width:761px){#docfab{display:none}}
@media (max-width:760px){
  #asheet .mm-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:4px 0 10px}
  #asheet .mm-i{position:relative;border:0;background:#F5F6F8;border-radius:16px;min-height:82px;padding:10px 4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;font:inherit;font-size:13px;font-weight:600;color:#1D1D1F;text-align:center}
  #asheet .mm-i.on{background:#EAF1FF;color:#1463F3}
  #asheet .mm-i .ic{width:36px;height:36px;border-radius:11px;display:flex;align-items:center;justify-content:center}
  #asheet .mm-i .badge{position:absolute;top:6px;right:10px;min-width:18px;height:18px;border-radius:9px;background:#FF3B30;color:#fff;font-size:11px;display:flex;align-items:center;justify-content:center}
  #asheet .mm-row{display:flex;align-items:center;gap:12px;padding:12px 2px;border-top:1px solid #EFEFF4}
  #asheet .mm-k{font-size:15px;font-weight:600;flex:1}
  #asheet .mm-lang{margin:0;flex:none}
  #asheet .mm-lang button{min-width:52px;min-height:36px}
  #asheet .mm-me .av{width:38px;height:38px;border-radius:50%;background:var(--g-indigo);color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center;flex:none}
  #asheet .mm-me small{display:block;color:#636366;font-size:12.5px}
  #asheet .mm-ver{text-align:center;font-size:11.5px;color:#8E8E93;padding:6px 0 2px}
  html.mzph #view .pts{display:none!important}
}
