:root{--bg:#090b10;--panel:#10141d;--panel2:#151b27;--line:#2a3345;--text:#f5f7fb;--muted:#99a4b8;--blue:#2a7fff;--cyan:#20d5e8;--pink:#e83e9f;--yellow:#ffd43b;--orange:#ff7a21;--ok:#34d399;--warn:#fbbf24;--danger:#fb7185;--shadow:0 16px 48px rgba(0,0,0,.35);--radius:14px;--header:70px;--tabs:54px;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color-scheme:dark}
*{box-sizing:border-box}html,body{height:100%;margin:0;background:var(--bg);color:var(--text)}body{overflow:hidden}.skip-link{position:fixed;left:10px;top:-60px;background:#fff;color:#000;padding:10px 14px;z-index:9999;border-radius:8px}.skip-link:focus{top:10px}.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}button,input,select,textarea{font:inherit}button,a,label.file-label{touch-action:manipulation}.studio-shell{height:100%;display:grid;grid-template-rows:var(--header) var(--tabs) 1fr;min-width:320px}.studio-header{display:flex;align-items:center;gap:18px;padding:0 20px;border-bottom:1px solid var(--line);background:rgba(10,13,19,.96);backdrop-filter:blur(18px);z-index:30}.brand{display:flex;align-items:center;gap:9px;text-decoration:none;color:#fff;min-width:max-content}.brand-mark{display:flex;gap:0;font-weight:900;font-size:25px;letter-spacing:-4px}.brand-mark i{font-style:normal;display:inline-block}.brand-mark i:nth-child(1){color:#29c5ff}.brand-mark i:nth-child(2){color:#ffd43b}.brand-mark i:nth-child(3){color:#3b82f6}.brand-mark i:nth-child(4){color:#e83e9f}.brand-print{font-size:11px;letter-spacing:.34em;margin-left:3px;color:#dfe5ef}.project-title-wrap{min-width:150px;flex:1;display:flex;align-items:center;gap:10px}.project-name{background:transparent;border:1px solid transparent;color:#fff;font-weight:700;font-size:15px;padding:8px 10px;border-radius:9px;min-width:120px;max-width:320px}.project-name:hover,.project-name:focus{border-color:var(--line);background:var(--panel);outline:none}.save-state{color:var(--muted);font-size:11px;white-space:nowrap}.header-actions{display:flex;align-items:center;gap:8px}.icon-btn,.btn,.file-label,.workspace-toolbar button,.tool-grid button,.tool-button,.icon-grid button,.preset-grid button,.template-grid button,.step-tab{border:1px solid var(--line);background:var(--panel2);color:var(--text);border-radius:9px;cursor:pointer;transition:border-color .15s,background .15s,transform .15s,opacity .15s}.icon-btn:hover,.btn:hover,.file-label:hover,.workspace-toolbar button:hover,.tool-grid button:hover,.tool-button:hover,.icon-grid button:hover,.preset-grid button:hover,.template-grid button:hover{border-color:#4a5b77;background:#1d2636}.icon-btn:active,.btn:active,.workspace-toolbar button:active{transform:translateY(1px)}button:disabled{opacity:.38;cursor:not-allowed}.icon-btn{width:36px;height:36px;font-size:19px}.btn,.file-label{min-height:38px;padding:9px 14px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;font-weight:700;font-size:13px}.btn.compact{min-height:34px;padding:7px 11px;font-size:12px}.btn-primary{background:linear-gradient(135deg,#1b72f8,#3b82f6);border-color:#5d9bff}.btn-primary:hover{background:linear-gradient(135deg,#287efb,#5594ff)}.btn-accent{background:linear-gradient(110deg,#1fc6e1,#2777ff 48%,#e83e9f);border-color:transparent;box-shadow:0 10px 28px rgba(42,127,255,.2)}.btn-secondary{background:#171d29}.btn-ghost{background:transparent}.btn.full{width:100%;margin:0 0 9px}.step-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:8px 18px;background:#0d1118;border-bottom:1px solid var(--line);gap:8px;z-index:20}.step-tab{height:38px;display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;font-weight:800;background:transparent;color:var(--muted)}.step-tab span{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#222c3d;color:#cdd5e2}.step-tab.active{background:#16253b;border-color:#2e6dcb;color:#fff}.step-tab.active span{background:var(--blue);color:#fff}.studio-main{min-height:0;display:grid;grid-template-columns:340px minmax(420px,1fr) 300px}.control-panel,.inspector{min-height:0;overflow:auto;background:var(--panel);scrollbar-color:#39445a transparent}.control-panel{border-right:1px solid var(--line);padding:18px}.inspector{border-left:1px solid var(--line)}.panel-page{display:none}.panel-page.active{display:block}.panel-heading{margin-bottom:20px}.panel-heading h1,.panel-heading h2{font-size:25px;line-height:1.05;margin:3px 0 9px}.panel-heading p{font-size:12px;line-height:1.55;color:var(--muted);margin:0}.eyebrow{font-size:10px!important;letter-spacing:.19em;color:var(--cyan)!important;font-weight:900}.control-group{border:0;padding:0;margin:0 0 23px}.control-group legend{font-size:12px;font-weight:900;margin:0 0 10px;padding:0;text-transform:uppercase;letter-spacing:.05em}.material-grid{display:grid;gap:8px}.material-card{display:block;border:1px solid var(--line);background:#131923;padding:11px;border-radius:10px;cursor:pointer;position:relative}.material-card input{position:absolute;opacity:0}.material-card strong{display:block;font-size:13px;margin-bottom:3px}.material-card small{display:block;color:var(--muted);font-size:10.5px;line-height:1.4}.material-card.selected{border-color:#3f83ef;background:#14233a;box-shadow:inset 3px 0 0 var(--blue)}.preset-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-bottom:10px}.preset-grid button{min-height:34px;padding:7px;font-size:11px}.preset-grid button.active{background:#17305a;border-color:#3e82ee;color:#fff}.field-row{display:grid;gap:10px;margin-top:10px}.field-row.two{grid-template-columns:repeat(2,minmax(0,1fr))}.field-row.align-end{align-items:end}.field-row label,.select-label,.control-group>label:not(.material-card):not(.file-label){display:flex;flex-direction:column;gap:6px;color:#cbd3df;font-size:11px;font-weight:700}.field-row input,.field-row select,.select-label input,.select-label select,.control-group>label input,.control-group>label select,.object-field input,.object-field select,.object-field textarea{width:100%;height:38px;border:1px solid var(--line);border-radius:8px;background:#090d14;color:#fff;padding:8px 10px;outline:none}.object-field textarea{height:76px;resize:vertical}.field-row input:focus,.field-row select:focus,.select-label input:focus,.select-label select:focus,.object-field input:focus,.object-field select:focus,.object-field textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(42,127,255,.12)}input[type=color]{padding:3px;height:38px}.inline-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:9px}.hint{font-size:9.5px;line-height:1.35;color:var(--muted);text-align:right}.link-btn{border:0;background:none;color:#77aaff;font-size:11px;padding:3px 0;cursor:pointer}.link-btn:hover{text-decoration:underline}.template-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.template-grid button{padding:10px;text-align:left;min-height:92px}.template-grid strong,.template-grid small{display:block}.template-grid strong{font-size:11px;margin:7px 0 2px}.template-grid small{font-size:9px;color:var(--muted);line-height:1.3}.template-icon{display:inline-grid;place-items:center;min-width:35px;height:29px;padding:0 7px;border-radius:6px;background:linear-gradient(135deg,#12376c,#55215b);font-weight:900;color:#fff;font-size:12px}.tool-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.tool-grid button,.tool-button{min-height:67px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:7px;font-size:9.5px;font-weight:800;text-align:center}.tool-grid span,.tool-button span{font-size:22px;line-height:1}.icon-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:6px}.icon-grid button{height:40px;font-size:19px}.switch-list{display:grid;gap:8px}.switch-list label,.check-row{display:flex!important;flex-direction:row!important;align-items:center;gap:8px!important;font-size:11px!important;color:#cbd3df!important;cursor:pointer}.switch-list input,.check-row input{accent-color:var(--blue)}.keyboard-help,.production-note,.privacy-note{border:1px solid var(--line);border-radius:10px;padding:12px;background:#111824}.keyboard-help strong,.production-note strong,.privacy-note strong{font-size:11px}.keyboard-help p,.production-note p,.privacy-note p{font-size:10px;line-height:1.5;color:var(--muted);margin:5px 0 0}.conditional-box{margin-top:10px;padding:11px;border:1px dashed #384760;border-radius:10px;background:#0d121b}.conditional-box>*+*{margin-top:10px}.review-actions{margin-top:16px}.preflight-summary{display:grid;gap:8px}.preflight-card{border:1px solid var(--line);border-radius:9px;padding:10px 11px;display:grid;grid-template-columns:24px 1fr;gap:8px;background:#101620}.preflight-card .status-icon{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:900}.preflight-card.ok .status-icon{background:rgba(52,211,153,.16);color:var(--ok)}.preflight-card.warn .status-icon{background:rgba(251,191,36,.15);color:var(--warn)}.preflight-card.error .status-icon{background:rgba(251,113,133,.15);color:var(--danger)}.preflight-card strong{display:block;font-size:11px}.preflight-card p{margin:2px 0 0;color:var(--muted);font-size:9.5px;line-height:1.4}.workspace{min-width:0;min-height:0;display:grid;grid-template-rows:44px 1fr 30px;background:#080a0f}.workspace-toolbar{display:flex;align-items:center;justify-content:space-between;padding:5px 10px;border-bottom:1px solid var(--line);background:#0f131b;gap:8px;overflow-x:auto}.toolbar-group{display:flex;gap:5px;min-width:max-content}.workspace-toolbar button{height:30px;padding:5px 9px;font-size:10px}.view-controls{margin-left:auto;align-items:center}.view-controls button{width:30px;padding:0;font-size:15px}.view-controls span{font-size:10px;color:var(--muted);min-width:78px;text-align:center}.canvas-scroll{min-height:0;overflow:auto;position:relative;background-color:#11151d;background-image:linear-gradient(45deg,#151a23 25%,transparent 25%),linear-gradient(-45deg,#151a23 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#151a23 75%),linear-gradient(-45deg,transparent 75%,#151a23 75%);background-size:24px 24px;background-position:0 0,0 12px,12px -12px,-12px 0}.canvas-stage{min-width:100%;min-height:100%;padding:55px;display:grid;place-items:center}.canvas-stage svg{display:block;background:#fff;box-shadow:0 22px 70px rgba(0,0,0,.55);overflow:visible;user-select:none;touch-action:none}.workspace-status{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:0 12px;background:#0e1219;border-top:1px solid var(--line);font-size:9.5px;color:var(--muted);white-space:nowrap;overflow:hidden}.workspace-status span{overflow:hidden;text-overflow:ellipsis}.workspace-status b{color:#d8e0eb}.inspector-section{padding:15px;border-bottom:1px solid var(--line)}.inspector-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.inspector-title h2{font-size:12px;margin:0}.inspector-title span{font-size:9px;color:var(--muted);border:1px solid var(--line);padding:3px 6px;border-radius:6px}.empty-inspector,.empty-state{color:var(--muted);font-size:10px;line-height:1.5}.object-form{display:grid;gap:11px}.object-field{display:flex;flex-direction:column;gap:5px;color:#cbd3df;font-size:10px;font-weight:700}.object-field-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.color-inline{display:grid;grid-template-columns:38px 1fr;gap:8px}.color-inline input[type=color]{width:38px}.text-format-row{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}.text-format-row button{height:32px;border:1px solid var(--line);background:#101620;color:#fff;border-radius:7px}.text-format-row button.active{background:#1b4f96;border-color:#3f83ef}.layers-list{display:grid;gap:6px}.layer-item{display:grid;grid-template-columns:27px 1fr auto;align-items:center;gap:7px;padding:7px;border:1px solid var(--line);border-radius:8px;background:#101620;cursor:pointer}.layer-item.selected{border-color:#3d80ea;background:#14223a}.layer-icon{width:25px;height:25px;border-radius:6px;display:grid;place-items:center;background:#202a3b;font-size:11px}.layer-name{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.layer-actions{display:flex;gap:2px}.layer-actions button{border:0;background:transparent;color:#aab4c5;width:21px;height:23px;padding:0;cursor:pointer}.quick-preflight{display:grid;gap:6px}.quick-row{display:flex;gap:7px;align-items:flex-start;font-size:9.5px;line-height:1.35;color:#c8d0dc}.quick-dot{width:8px;height:8px;border-radius:50%;margin-top:2px;flex:none}.quick-dot.ok{background:var(--ok)}.quick-dot.warn{background:var(--warn)}.quick-dot.error{background:var(--danger)}.toast-region{position:fixed;right:18px;bottom:18px;z-index:100;display:grid;gap:8px;pointer-events:none}.toast{width:min(360px,calc(100vw - 36px));background:#181f2b;border:1px solid #3b485f;border-radius:10px;box-shadow:var(--shadow);padding:11px 13px;font-size:11px;line-height:1.45;animation:toast-in .18s ease}.toast.ok{border-left:4px solid var(--ok)}.toast.warn{border-left:4px solid var(--warn)}.toast.error{border-left:4px solid var(--danger)}@keyframes toast-in{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}.modal[hidden]{display:none}.modal{position:fixed;inset:0;z-index:200;display:grid;place-items:center;padding:20px}.modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.68);backdrop-filter:blur(4px)}.modal-dialog{position:relative;width:min(430px,100%);background:#151b25;border:1px solid #354157;border-radius:14px;box-shadow:var(--shadow);padding:22px}.modal-dialog h2{margin:0 0 8px;font-size:18px}.modal-dialog p{margin:0;color:var(--muted);font-size:12px;line-height:1.55}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}
/* SVG editor */
#artboard .object{cursor:move}#artboard .selection-box{fill:none;stroke:#1678ff;stroke-width:1.2;vector-effect:non-scaling-stroke;stroke-dasharray:5 3;pointer-events:none}#artboard .selection-handle{fill:#fff;stroke:#1678ff;stroke-width:1.2;vector-effect:non-scaling-stroke;cursor:nwse-resize}#artboard .selection-handle[data-handle="ne"],#artboard .selection-handle[data-handle="sw"]{cursor:nesw-resize}#artboard .rotation-handle{fill:#fff;stroke:#e83e9f;stroke-width:1.2;vector-effect:non-scaling-stroke;cursor:grab}#artboard .trim-guide{fill:none;stroke:#e83e9f;stroke-width:.8;vector-effect:non-scaling-stroke;stroke-dasharray:8 4;pointer-events:none}#artboard .safe-guide{fill:none;stroke:#20b8cf;stroke-width:.7;vector-effect:non-scaling-stroke;stroke-dasharray:4 3;pointer-events:none}#artboard .bleed-label,#artboard .guide-label{font-size:7px;fill:#e83e9f;font-family:Arial,sans-serif;pointer-events:none}#artboard .hole-guide{fill:rgba(255,255,255,.75);stroke:#dc2626;stroke-width:.7;vector-effect:non-scaling-stroke;pointer-events:none}#artboard .locked{cursor:not-allowed}
@media(max-width:1180px){.studio-main{grid-template-columns:320px minmax(380px,1fr)}.inspector{position:fixed;right:0;top:calc(var(--header) + var(--tabs));bottom:0;width:310px;transform:translateX(100%);z-index:45;box-shadow:var(--shadow);transition:transform .2s}.inspector.open{transform:none}.workspace-toolbar:after{content:"Vlastnosti";display:inline-flex;align-items:center;height:30px;padding:0 9px;border:1px solid var(--line);border-radius:8px;font-size:10px;color:#fff;cursor:pointer}}
@media(max-width:860px){:root{--header:58px;--tabs:50px}.studio-header{padding:0 10px;gap:8px}.brand-print,.save-state,.header-actions .btn-secondary,.header-actions .btn-ghost{display:none}.brand-mark{font-size:20px}.project-name{font-size:13px;padding:6px;max-width:170px}.header-actions{gap:5px}.icon-btn{width:32px;height:32px}.step-tabs{padding:6px;gap:4px}.step-tab{font-size:0;height:37px}.step-tab span{font-size:11px}.step-tab.active{font-size:10px}.studio-main{display:block;position:relative}.control-panel{position:fixed;left:0;top:calc(var(--header) + var(--tabs));bottom:0;width:min(340px,88vw);z-index:44;transform:translateX(-100%);transition:transform .2s;box-shadow:var(--shadow)}.control-panel.open{transform:none}.workspace{height:100%}.canvas-stage{padding:30px}.workspace-toolbar:before{content:"Nastavení";display:inline-flex;align-items:center;height:30px;padding:0 9px;border:1px solid var(--line);border-radius:8px;font-size:10px;color:#fff;cursor:pointer}.toolbar-group:nth-of-type(2),.toolbar-group:nth-of-type(3){display:none}.workspace-status span:nth-child(2){display:none}.inspector{top:calc(var(--header) + var(--tabs));width:min(310px,88vw)}.toast-region{right:10px;bottom:40px}}
@media(max-width:520px){.project-title-wrap{min-width:0}.project-name{width:115px}.header-actions .icon-btn:nth-of-type(1){display:none}.step-tab.active{font-size:0}.canvas-stage{padding:22px}.workspace-status{justify-content:center}.workspace-status span:not(:first-child){display:none}.field-row.two{grid-template-columns:1fr}.template-grid{grid-template-columns:1fr 1fr}}
@media print{body{overflow:visible;background:#fff}.studio-header,.step-tabs,.control-panel,.inspector,.workspace-toolbar,.workspace-status{display:none!important}.studio-shell,.studio-main,.workspace,.canvas-scroll,.canvas-stage{display:block;height:auto;overflow:visible;background:#fff;padding:0}.canvas-stage svg{box-shadow:none;width:100%!important;height:auto!important}}

/* MATU PRINT Cedule Studio v111.39.9.25 — profesionální mobilní pracovní režim */
.mobile-dock,.mobile-project-panel,.mobile-project-menu,.mobile-preview-control,.tablet-inspector-toggle{display:none}

@media (min-width:861px) and (max-width:1180px){
  .workspace-toolbar::after{content:none!important;display:none!important}
  .tablet-inspector-toggle{display:inline-flex;align-items:center;justify-content:center;height:30px;padding:5px 9px;font-size:10px}
}

@media (max-width:860px){
  :root{--tabs:0px;--mobile-toolbar-h:66px}
  html,body{height:100%;height:100dvh;min-height:100%;overscroll-behavior:none}
  body{overflow:hidden;position:fixed;inset:0;width:100%;touch-action:manipulation}
  .studio-shell{height:var(--app-height,100dvh);min-height:0;display:flex;flex-direction:column;overflow:hidden}
  .studio-header{height:58px;flex:0 0 58px;padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right));z-index:70}
  .step-tabs{display:none!important}
  .studio-main{display:block;position:relative;flex:1 1 auto;min-height:0;overflow:hidden}
  .studio-main>.control-panel,.studio-main>.inspector{display:none!important}
  .workspace{height:100%;min-height:0;grid-template-rows:42px minmax(0,1fr) 28px}
  .workspace-toolbar{padding:5px max(7px,env(safe-area-inset-right)) 5px max(7px,env(safe-area-inset-left));gap:5px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}
  .workspace-toolbar::-webkit-scrollbar{display:none}
  .workspace-toolbar::before,.workspace-toolbar::after{content:none!important;display:none!important}
  .workspace-toolbar .toolbar-group{gap:4px}
  .workspace-toolbar button{height:32px;min-width:34px;padding:5px 8px;font-size:10px;white-space:nowrap}
  .workspace-toolbar .toolbar-group:nth-of-type(2),.workspace-toolbar .toolbar-group:nth-of-type(3){display:none}
  .workspace-toolbar .toolbar-group:first-child button{font-size:0;width:36px;padding:0}
  .workspace-toolbar .toolbar-group:first-child button::before{font-size:16px;line-height:1}
  #duplicate-object::before{content:"⧉"}
  #delete-object::before{content:"×";font-size:21px}
  .mobile-preview-control{display:flex!important;margin-left:auto}
  .mobile-preview-control button{display:inline-flex;align-items:center;gap:5px;background:#171d29}
  .mobile-preview-control button>span:first-child{font-size:15px}
  .view-controls{margin-left:0}
  .view-controls span{display:none}
  .tablet-inspector-toggle{display:none!important}
  .canvas-stage{padding:18px;transition:padding .18s ease}
  .workspace-status{height:28px;padding:0 9px;justify-content:center}
  .workspace-status span:not(:first-child){display:none}

  .mobile-project-menu{display:inline-grid;place-items:center}
  .mobile-dock{display:flex;flex:0 0 auto;min-height:0;flex-direction:column;position:relative;z-index:65;background:#0b0f16;border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}
  .mobile-sheet[hidden]{display:none!important}
  .mobile-sheet{display:flex;flex:0 0 auto;min-height:210px;height:clamp(245px,38dvh,360px);max-height:calc(var(--app-height,100dvh) - 58px - 155px);flex-direction:column;background:linear-gradient(180deg,#151b27 0%,#10141d 100%);border-top:1px solid #35435a;box-shadow:0 -18px 42px rgba(0,0,0,.38);animation:mobile-sheet-in .18s ease-out;overflow:hidden}
  .mobile-sheet.expanded{height:min(62dvh,560px);max-height:calc(var(--app-height,100dvh) - 58px - 125px)}
  @keyframes mobile-sheet-in{from{opacity:.5;transform:translateY(12px)}to{opacity:1;transform:none}}
  .mobile-sheet-grab{height:18px;min-height:18px;border:0;background:transparent;display:grid;place-items:center;padding:0;cursor:ns-resize;touch-action:none}
  .mobile-sheet-grab span{display:block;width:42px;height:4px;border-radius:999px;background:#4a566c}
  .mobile-sheet-header{height:45px;min-height:45px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 max(12px,env(safe-area-inset-right)) 0 max(14px,env(safe-area-inset-left));border-bottom:1px solid var(--line);background:rgba(16,20,29,.98)}
  .mobile-sheet-heading{min-width:0;display:flex;flex-direction:column;gap:2px}
  .mobile-sheet-heading span{font-size:8px;line-height:1.1;letter-spacing:.18em;font-weight:900;color:var(--cyan)}
  .mobile-sheet-heading strong{font-size:13px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mobile-sheet-actions{display:flex;gap:6px}
  .mobile-sheet-actions button{width:32px;height:32px;border:1px solid var(--line);border-radius:9px;background:#171d29;color:#fff;font-size:17px;display:grid;place-items:center;padding:0}
  .mobile-sheet-body{flex:1 1 auto;min-height:0;overflow:hidden}
  .mobile-sheet-body>.control-panel,.mobile-sheet-body>.inspector,.mobile-sheet-body>.mobile-project-panel{position:static!important;inset:auto!important;display:block!important;transform:none!important;width:100%!important;max-width:none!important;height:100%!important;min-height:0!important;border:0!important;box-shadow:none!important;background:transparent!important;overflow:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;scrollbar-gutter:stable;padding:12px max(14px,env(safe-area-inset-right)) 22px max(14px,env(safe-area-inset-left))}
  .mobile-sheet-body>.inspector{padding:0!important}
  .mobile-sheet .panel-heading{display:none}
  .mobile-sheet .control-group{margin-bottom:18px}
  .mobile-sheet .control-group:last-child{margin-bottom:6px}
  .mobile-sheet .keyboard-help{display:none}
  .mobile-sheet .material-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .mobile-sheet .material-card{padding:9px;min-height:82px}
  .mobile-sheet .material-card strong{font-size:11px}
  .mobile-sheet .material-card small{font-size:9px}
  .mobile-sheet .preset-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
  .mobile-sheet .preset-grid button{min-height:32px;font-size:9.5px;padding:5px 3px}
  .mobile-sheet .template-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
  .mobile-sheet .template-grid button{min-height:78px;padding:8px}
  .mobile-sheet .tool-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}
  .mobile-sheet .tool-grid button,.mobile-sheet .tool-button{min-height:62px;padding:6px 3px;font-size:8.5px}
  .mobile-sheet .tool-grid span,.mobile-sheet .tool-button span{font-size:19px}
  .mobile-sheet .icon-grid{grid-template-columns:repeat(6,1fr)}
  .mobile-sheet .production-note,.mobile-sheet .privacy-note{margin-bottom:4px}
  .mobile-sheet .review-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .mobile-sheet .review-actions .btn{margin:0;min-height:42px;padding:8px;font-size:10px}
  .mobile-sheet .review-actions .btn-accent{grid-column:1/-1}
  .mobile-sheet .inspector-section{display:none;padding:14px max(14px,env(safe-area-inset-right)) 24px max(14px,env(safe-area-inset-left));border-bottom:0}
  .mobile-sheet .inspector.mobile-view-object [data-inspector-panel="object"],.mobile-sheet .inspector.mobile-view-layers [data-inspector-panel="layers"],.mobile-sheet .inspector.mobile-view-preflight [data-inspector-panel="preflight"]{display:block}
  .mobile-sheet .object-form{gap:9px}
  .mobile-sheet .object-field textarea{height:64px}
  .mobile-sheet .layers-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .mobile-sheet .layer-item{min-width:0}

  .mobile-toolbar{height:var(--mobile-toolbar-h);min-height:var(--mobile-toolbar-h);display:grid;grid-template-columns:repeat(6,minmax(0,1fr));align-items:stretch;padding:3px max(3px,env(safe-area-inset-right)) 2px max(3px,env(safe-area-inset-left));background:rgba(9,12,18,.98);backdrop-filter:blur(16px)}
  .mobile-toolbar button{position:relative;min-width:0;border:0;border-radius:10px;background:transparent;color:#8793a8;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:4px 1px;font-size:8.5px;font-weight:800;line-height:1;cursor:pointer;touch-action:manipulation}
  .mobile-toolbar button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
  .mobile-toolbar button.active{color:#fff;background:#16233a}
  .mobile-toolbar button.active::before{content:"";position:absolute;left:25%;right:25%;top:1px;height:2px;border-radius:999px;background:linear-gradient(90deg,var(--cyan),var(--blue),var(--pink))}
  .mobile-toolbar button i{display:none;position:absolute;right:18%;top:8px;width:7px;height:7px;border-radius:50%;background:var(--pink);box-shadow:0 0 0 2px #0b0f16}
  .mobile-toolbar button.has-selection i{display:block}

  .mobile-project-panel{padding:0!important}
  .mobile-project-intro{padding:1px 1px 12px}
  .mobile-project-intro strong{display:block;font-size:13px}
  .mobile-project-intro p{margin:4px 0 0;color:var(--muted);font-size:10px;line-height:1.45}
  .mobile-project-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .mobile-project-grid button,.mobile-project-grid a{min-height:82px;border:1px solid var(--line);border-radius:11px;background:#131923;color:#fff;text-decoration:none;padding:10px;display:grid;grid-template-columns:30px 1fr;grid-template-rows:auto auto;text-align:left;column-gap:8px;align-content:center}
  .mobile-project-grid button>span,.mobile-project-grid a>span{grid-row:1/3;width:30px;height:30px;border-radius:8px;display:grid;place-items:center;background:#1b2d49;color:#77aaff;font-size:18px}
  .mobile-project-grid strong{font-size:10.5px;align-self:end}
  .mobile-project-grid small{font-size:8.5px;color:var(--muted);align-self:start;line-height:1.3}

  body.mobile-keyboard-open .mobile-sheet{height:clamp(190px,32dvh,245px);min-height:175px}
  body.mobile-keyboard-open .mobile-sheet.expanded{height:clamp(220px,42dvh,310px)}
  body.mobile-preview-mode .studio-header,body.mobile-preview-mode .mobile-dock{display:none!important}
  body.mobile-preview-mode .studio-main{flex:1 1 100%;height:100%}
  body.mobile-preview-mode .workspace{grid-template-rows:42px minmax(0,1fr)}
  body.mobile-preview-mode .workspace-status{display:none!important}
  body.mobile-preview-mode .workspace-toolbar>*{display:none!important}
  body.mobile-preview-mode .workspace-toolbar .mobile-preview-control{display:flex!important;margin-left:auto}
  body.mobile-preview-mode .canvas-stage{padding:12px}
  body.mobile-preview-mode #mobile-preview-label{font-size:0}
  body.mobile-preview-mode #mobile-preview-label::after{content:"Zpět";font-size:10px}
  .toast-region{right:max(10px,env(safe-area-inset-right));bottom:calc(var(--mobile-toolbar-h) + env(safe-area-inset-bottom) + 8px)}
  body.mobile-sheet-visible .toast-region{bottom:calc(var(--mobile-toolbar-h) + env(safe-area-inset-bottom) + 8px)}
}

@media (max-width:520px){
  .project-name{width:min(34vw,130px)}
  .mobile-sheet .material-grid{grid-template-columns:1fr 1fr}
  .mobile-sheet .preset-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .mobile-sheet .template-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mobile-sheet .tool-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .mobile-sheet .field-row.two{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mobile-sheet .field-row.two>label:only-child{grid-column:1/-1}
  .mobile-sheet .layers-list{grid-template-columns:1fr}
}

@media (max-width:380px){
  .project-name{width:98px}
  .mobile-toolbar button{font-size:7.8px}
  .mobile-toolbar button svg{width:18px;height:18px}
  .mobile-sheet .field-row.two{grid-template-columns:1fr}
  .mobile-sheet .preset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:860px) and (max-height:560px){
  .studio-header{height:50px;flex-basis:50px}
  .mobile-sheet{height:min(44dvh,220px);min-height:150px;max-height:calc(var(--app-height,100dvh) - 50px - 120px)}
  .mobile-sheet.expanded{height:min(55dvh,280px);max-height:calc(var(--app-height,100dvh) - 50px - 105px)}
  .mobile-toolbar{--mobile-toolbar-h:56px}
  .workspace{grid-template-rows:38px minmax(0,1fr)}
  .workspace-status{display:none}
  .canvas-stage{padding:12px}
}

/* v51: readable keyboard inputs and reliable touch targets. */
@media(max-width:860px){.mobile-sheet input:not([type=color]):not([type=checkbox]),.mobile-sheet select,.mobile-sheet textarea{font-size:16px}.mobile-sheet button:not(.mobile-sheet-grab),.mobile-sheet .file-label{min-height:44px}.layer-actions button{min-width:36px}.text-format-row{grid-template-columns:repeat(5,minmax(0,1fr))}.studio-header .icon-btn{min-width:36px;min-height:40px}}
