/* Mobile workspace: centered brand, real panel previews and three equal footer actions. */
.mobile-only,#mobile-tools-sheet,#mobile-shade{display:none}
.notice-close{display:none}
/* Shared tool exit, reachable without scrolling back to the heading. */
.inspector-footer{position:sticky;bottom:0;z-index:4;margin-top:18px;padding:12px 0;background:#fff;border-top:1px solid #dce5e0;box-shadow:0 -8px 14px #ffffffed}
.inspector-footer>.primary{display:block;width:100%;min-height:46px;border-radius:8px;font-size:14px}
.studio .inspector,#mobile-tools-sheet{scroll-padding-bottom:96px}
/* In normal page flow, directly below the header/temporary acceptance notice. */
#studio-notices{flex-shrink:0;background:#fff4df}
#studio-notices #checks{position:relative;inset:auto;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:0 12px;width:100%;max-height:none;margin:0;padding:4px 20px;border-radius:0;font-size:12px;line-height:1.4;overflow:visible}
#studio-notices #checks-text{display:block;max-height:none;overflow:visible;overflow-wrap:anywhere}
#studio-notices #checks .print-help-open{min-height:36px;padding:5px 0}
#studio-notices #checks-open{position:static;display:block;max-width:none;width:auto;min-height:44px;margin:0 auto;padding:6px 12px;border:0;background:transparent;color:#775215;font-size:12px;text-decoration:underline;text-underline-offset:3px}
#snap-guides{position:absolute;inset:0;pointer-events:none;z-index:6}
#snap-guides .snap-x{position:absolute;left:50%;top:-24px;bottom:-24px;border-left:1px dashed #008b71;box-shadow:1px 0 #fff}
#snap-guides .snap-y{position:absolute;top:50%;left:-20px;right:-20px;border-top:1px dashed #008b71;box-shadow:0 1px #fff}
@media(max-width:760px), (max-width:980px) and (max-height:600px){
  body.mobile-design{height:100dvh;overflow:hidden;display:flex;flex-direction:column}
  .top{height:42px;min-height:42px;padding:0 10px;gap:8px;border:0;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
  .top .brand{display:block;grid-area:1/2;justify-self:center}.top .brand img{width:72px;max-height:34px}
  .top .product{grid-area:1/1;min-width:0}.top #saved{grid-area:1/3;justify-self:end;white-space:nowrap}
  .top .product{padding:0}.top .product strong{font-size:10px;letter-spacing:.7px}.top .product span{display:none}
  .top #saved{font-size:10px;min-height:30px;padding:4px}
  #trial{position:relative;padding:5px 34px 5px 8px;font-size:9px;line-height:14px;flex-shrink:0}
  #trial>span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .notice-close{display:block;position:absolute;right:0;top:0;width:30px;height:100%;min-height:24px;padding:0;border:0;border-radius:0;background:transparent;color:inherit;font-size:20px;line-height:1}
  .steps{display:none}
  .mobile-design main{min-height:0;flex:1;display:flex}
  .mobile-design .studio{display:block;width:100%;height:100%;min-height:0;padding:0;margin:0}
  .mobile-design .workspace{height:100%;width:100%;padding:5px 8px 12px;border:0;border-radius:0;overflow:hidden;background:radial-gradient(ellipse,#fff 20%,#f4f7f5)}
  .mobile-design .viewbar{flex-shrink:0;height:39px;margin:0;justify-content:center;position:relative}
  .mobile-design .viewbar .segmented{padding:2px;border-radius:22px;box-shadow:none}
  .mobile-design .segmented button{min-height:31px;padding:5px 13px;border-radius:18px;font-size:11px}
  .mobile-design .segmented #view-flat{order:-1}
  .mobile-design .viewbar>.row{position:absolute;right:0;gap:0}
  .mobile-design .viewbar>.row button{width:30px;min-height:36px;padding:3px;font-size:19px;border:0}
  .mobile-design .viewbar .segmented{margin-right:58px}
  .mobile-design .zoom-controls{top:55px;left:5px;z-index:7;padding:1px;border-radius:18px;background:#ffffffdf;border:1px solid #dce5e0;box-shadow:none;gap:0}
  .mobile-design .workspace:has(#selection-toolbar:not([hidden])) .zoom-controls{top:99px}
  .mobile-design .zoom-controls button{min-height:30px;width:30px;height:30px;font-size:17px}
  .mobile-design #pan-view,.mobile-design #focus-element,.mobile-design .zoom-controls output{display:none}
  .mobile-design #flat-view{flex:1;min-height:0;width:100%;padding:6px 29px 18px;margin:0;overflow:hidden;isolation:isolate}
  .mobile-design .workspace:has(#selection-toolbar[hidden]) #flat-view{padding-top:6px}
  .mobile-design #stage:not([hidden]){flex:1;min-height:0;width:100%;border:0;margin:0}
  .mobile-design #selection-toolbar{position:relative;top:auto;left:auto;transform:none;flex-shrink:0;max-width:calc(100% - 12px);height:40px;min-height:40px;padding:3px;margin:0 0 2px;justify-content:flex-start;border-radius:20px;box-shadow:none;scrollbar-width:none}
  .mobile-design #selection-toolbar button{width:36px;flex-basis:36px;min-height:32px;font-size:20px}
  .mobile-design #selection-toolbar button:last-child{border-radius:50%;position:sticky;right:0;box-shadow:-4px 0 7px white}
  .mobile-design .panel-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));order:0;flex-shrink:0;margin:0;width:100%;gap:3px;height:60px}
  .mobile-design .panel-tabs button{min-width:0;width:100%;max-width:none;min-height:60px;height:60px;font-size:9px;line-height:11px;border:1px solid #dce6df;border-radius:7px;padding:3px 1px;white-space:normal}
  .mobile-design .panel-tabs button img{display:block;width:29px;height:29px;object-fit:contain;margin:0 auto 3px}
  .mobile-design .panel-tabs .panel-name{display:flex;align-items:center;justify-content:center;min-height:22px}
  .mobile-design .panel-tabs button[aria-pressed=true]{background:#eaf3ee;color:#14583f}
  .mobile-design .panel-tabs:has(>button:nth-child(6)){display:flex;flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:none}
  .mobile-design .panel-tabs:has(>button:nth-child(6))::-webkit-scrollbar{display:none}
  .mobile-design .panel-tabs:has(>button:nth-child(6))>button{flex:0 0 calc((100% - 12px)/5)}
  .mobile-design #view-hint{display:none}.mobile-design #render-state{position:absolute;bottom:1px;font-size:8px;margin:0;line-height:10px;pointer-events:none}
  #studio-notices #checks{display:grid;grid-template-columns:minmax(0,1fr) 40px;gap:0 6px;padding:5px 6px 5px 12px}
  #studio-notices #checks-text,#studio-notices #checks .print-help-open{grid-column:1;text-align:left}
  #studio-notices #checks .print-help-open{justify-self:start}
  #studio-notices #checks .notice-close{position:static;grid-column:2;grid-row:1/3;align-self:center;width:40px;height:44px;min-height:44px;font-size:24px}
  .mobile-design .tool-rail{display:none}
  .bottom{display:flex;height:auto;min-height:44px;padding:4px 8px max(5px,env(safe-area-inset-bottom));gap:0;z-index:10;box-shadow:0 -3px 16px #19372906}
  .mobile-design .bottom{position:relative;flex-shrink:0}
  .bottom>div:first-child{display:none}
  .bottom .actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;width:100%;gap:5px}
  .bottom .actions button,.bottom #save,.bottom #share{width:100%;min-width:0;height:36px;font-size:10px;min-height:36px;padding:5px 4px;border:1px solid #becdc7;border-radius:6px;line-height:1.2;white-space:nowrap}
  .bottom .actions #next{grid-column:auto;margin:0;border-color:#166951}
  .mobile-design #mobile-canvas-actions{display:flex;position:relative;align-items:center;justify-content:center;width:100%;height:44px;flex-shrink:0}
  .mobile-design #mobile-add{display:block;min-height:35px;height:35px;padding:4px 12px;border-radius:22px;background:#c52b32;border-color:#c52b32;font-size:12px;color:#fff}
  .mobile-design #mobile-add:active{background:#a91f26;border-color:#a91f26;color:#fff}@media (hover:hover) and (pointer:fine){.mobile-design #mobile-add:hover{background:#a91f26;border-color:#a91f26;color:#fff}}
  .mobile-design #mobile-add:focus-visible{outline:3px solid #8f1920;outline-offset:3px}
  .flow>#previous{min-height:34px;font-size:11px;margin-bottom:10px;padding:5px 12px}
  .flow{padding-bottom:80px}
  .mobile-design .inspector{display:none;position:fixed;inset:auto 0 0;z-index:41;height:auto;max-height:min(79dvh,calc(var(--mobile-visible-height,100dvh) - 14px));padding:0 18px max(24px,env(safe-area-inset-bottom));border:1px solid #dce5e0;border-bottom:0;border-radius:22px 22px 0 0;box-shadow:0 -12px 45px #1133291f;overflow:auto;overscroll-behavior:contain;scroll-padding-top:78px}
  .mobile-inspector-open .inspector{display:block}
  .mobile-design .inspector-heading{position:sticky;top:0;z-index:2;background:white;margin:0 -18px 15px;padding:19px 18px 13px;border-bottom:1px solid #e5ece8;border-radius:22px 22px 0 0}
  .mobile-design .inspector-heading .eyebrow{display:none}.mobile-design .inspector-heading h1{font-size:19px;letter-spacing:-.3px}
  .mobile-design .panel-nav .icon-button{width:40px;height:40px;min-height:40px}
  .mobile-design .inspector input:not([type=range]):not([type=checkbox]):not([type=color]),.mobile-design .inspector select,.mobile-design .inspector textarea{font-size:16px}
  .mobile-design .inspector .tool-page{padding-bottom:4px}
  .mobile-design .inspector-footer{padding-bottom:max(12px,env(safe-area-inset-bottom))}
  .mobile-design .inspector-footer>.primary{min-height:48px;font-size:16px}
  .mobile-design .inspector .gallery{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .mobile-design .inspector .gallery button{min-height:80px}.mobile-design .inspector .gallery img{height:48px;width:48px}
  .mobile-design .inspector #element-section{border:0;margin-top:0;padding-top:0}
  .mobile-design #colors:before{content:'Farben';grid-column:1/-1;font-size:12px;font-weight:700}
  .mobile-element-details .tool-page[data-page=design]{display:none}
  .mobile-element-details .element-heading{display:none}
  #mobile-add-layer{display:block;margin:14px 0 4px;border-style:dashed;color:#176950}
  #mobile-shade{display:block;position:fixed;inset:0;background:#123b2d30;z-index:40;backdrop-filter:blur(1px)}
  #mobile-tools-sheet{display:block;position:fixed;inset:auto 0 0;z-index:41;background:white;border:1px solid #dce5e0;border-bottom:0;border-radius:22px 22px 0 0;padding:18px 18px max(24px,env(safe-area-inset-bottom));max-height:calc(var(--mobile-visible-height,100dvh) - 15px);overflow:auto;overscroll-behavior:contain;box-shadow:0 -12px 45px #1133291f}
  #mobile-tools-sheet header{display:flex;align-items:center;justify-content:space-between}#mobile-tools-sheet h2{font-size:21px;margin:0}#mobile-tools-sheet header button{width:40px;height:40px}
  #mobile-tools-sheet p{font-size:12px;color:#6a7d73;margin:7px 0 17px}
  .mobile-tool-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
  .mobile-tool-grid button{display:grid;grid-template-columns:30px 1fr;gap:3px 5px;text-align:left;background:#f3f7f4;border:1px solid #e1eae5;border-radius:12px;min-height:88px;padding:12px 9px}
  .mobile-tool-grid button>span{grid-row:1/3;align-self:center;text-align:center;font-size:27px;color:#176950}.mobile-tool-grid strong{font-size:13px;align-self:end}.mobile-tool-grid small{font-size:10px;font-weight:400;line-height:1.35;color:#6a7d73}
  #message{bottom:56px;z-index:60}
  dialog{max-height:calc(var(--mobile-visible-height,100dvh) - 20px);overflow:auto;border-radius:18px}dialog input:not([type=range]):not([type=checkbox]):not([type=color]),dialog textarea{font-size:16px}
  #color-dialog .ink-inputs input{font-size:16px;padding:5px;appearance:textfield;-moz-appearance:textfield}#color-dialog .ink-inputs input::-webkit-inner-spin-button,#color-dialog .ink-inputs input::-webkit-outer-spin-button{appearance:none;margin:0}
  .flow input,.flow select{font-size:16px}
  .mobile-design .inspector,#mobile-tools-sheet{bottom:var(--mobile-keyboard-inset,0px)}
}
@media(max-width:360px){.bottom .actions{gap:3px}.bottom .actions button,.bottom #save,.bottom #share{padding:5px;font-size:10px}.mobile-design .viewbar .segmented{margin-right:48px}.mobile-design .segmented button{padding:5px 11px}.mobile-design .viewbar>.row button{width:25px}.mobile-tool-grid button{padding:10px 6px}.mobile-tool-grid small{font-size:9px}}
@media(max-width:760px) and (max-height:700px){#color-dialog{padding:14px}#color-field{height:105px}#color-dialog .hint{font-size:9px!important}#color-dialog .quick-colors{margin:8px 0}#color-dialog .dialog-head{margin-bottom:9px}}
@media(max-width:980px) and (max-height:600px){.mobile-design .panel-tabs{height:40px}.mobile-design .panel-tabs button{min-height:40px;height:40px;display:flex;align-items:center;justify-content:center;gap:4px}.mobile-design .panel-tabs button img{width:21px;height:26px;margin:0}.mobile-design #render-state{display:none}.mobile-design #flat-view{padding-bottom:7px}.mobile-design .workspace{padding-bottom:0}.mobile-design #mobile-canvas-actions{height:39px}}
