:root{--bg:#f3f3f2;--panel:#fff;--line:#dadcde;--ink:#17191b;--muted:#666;--blue:#1676d2;--dark:#151617}
*{box-sizing:border-box}html,body{margin:0;height:100%;font-family:Arial,Helvetica,sans-serif;color:var(--ink);background:var(--bg)}
header{height:58px;background:linear-gradient(90deg,#111,#242526);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 18px;box-shadow:0 2px 8px #0003}
.brand{display:flex;gap:12px;align-items:center;min-width:0}.brand-logo-img{height:42px;width:auto;max-width:210px;object-fit:contain;display:block;filter:drop-shadow(0 1px 1px #0006)}.brand h1{font-size:17px;margin:0;white-space:normal}
.brand-title{
  display:flex;
  flex-direction:column;
  justify-content:center;
  line-height:1.05;
  min-width:128px;
  max-width:180px;
  flex:0 1 auto;
}
.brand-title span{display:block;white-space:nowrap}
.brand-title span:first-child{font-size:12px;font-weight:600;letter-spacing:.02em;opacity:.92;margin-bottom:3px}
.brand-title span:last-child{font-size:15px;font-weight:800}.head-actions{display:flex;gap:6px;font-size:12px;align-items:center}.head-actions button{border:1px solid #fff8fc35;background:#fff8fc0d;color:#fff;border-radius:5px;padding:7px 8px;cursor:pointer}.head-actions button:hover{background:#fff8fc1c}
.app{display:grid;grid-template-columns:var(--left-panel-w,300px) minmax(520px,1fr) 315px;gap:10px;padding:10px;height:calc(100vh - 58px)}
.panel,.topbar{background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 1px 3px #0000000b}.panel{overflow:auto}.panel.left{overflow:hidden;display:flex;flex-direction:column;min-height:0}.panel.left>.section-title,.panel.left>.catalog-main-tabs,.panel.left>#catalogSubcategoryArea{flex:0 0 auto}.panel.left>#catalogSubcategoryArea{position:relative;z-index:2;background:#fafafa;box-shadow:0 2px 5px rgba(0,0,0,.06)}.panel.left>#catalogScrollArea{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}.section-title{font-size:14px;font-weight:800;padding:13px 14px;border-bottom:1px solid #e5e5e5}.catalog-item{display:grid;grid-template-columns:148px 1fr;gap:12px;padding:12px;border-bottom:1px solid #e5e5e5;cursor:pointer}.catalog-item:hover{background:#f7fafe}.thumb{height:138px;width:144px;object-fit:contain;border-radius:7px;background:linear-gradient(#fff,#f4f1eb);display:block;border:1px solid #eee}.meta strong{display:block;margin:5px 0 6px}.meta small{display:block;line-height:1.45}.catalog-price{margin-top:14px;padding:10px 0 8px;border-top:1px solid #333;border-bottom:1px solid #333;color:#111}.catalog-price-label{display:block;font-size:12px;margin-bottom:5px}.catalog-price-value{display:block;font-size:18px;font-weight:800;line-height:1.15}.catalog-price-missing{font-size:12px;color:#666;font-weight:400}.left-footer{padding:12px;text-align:center;color:#666;font-size:12px}.catalog-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:8px;border-bottom:1px solid #ddd;background:#fafafa}.catalog-tab{border:1px solid #c8cdd2;background:#fff;border-radius:5px;padding:8px 4px;font-weight:700;cursor:pointer}.catalog-tab.active{background:#1976d2;color:#fff;border-color:#1976d2}.panel.left>.catalog-main-tabs{position:relative;z-index:2;box-shadow:0 2px 5px rgba(0,0,0,.08)}.wardrobe-thumb{width:150px;height:205px;object-fit:contain;background:#fff;border-radius:6px}
.center{display:grid;grid-template-rows:auto 1fr;gap:10px;min-width:0}.topbar{padding:11px 14px;display:grid;grid-template-columns:1fr auto;gap:18px;align-items:end}.dims{display:grid;grid-template-columns:repeat(3,minmax(115px,1fr));gap:13px}.field label{display:block;font-size:11px;font-weight:700;margin-bottom:6px}.stepper{display:grid;grid-template-columns:1fr 34px 34px}.stepper input{width:100%;min-width:0;border:1px solid var(--line);border-radius:5px 0 0 5px;padding:9px}.stepper button{border:1px solid var(--line);background:#fff;font-size:20px}.toggles{display:flex;align-items:center;gap:16px;height:38px;font-size:12px}.toggles label{white-space:nowrap}.toggles input{accent-color:var(--blue)}
.viewer{position:relative;min-height:450px;overflow:hidden;border-radius:8px;background:#d8d0c6;border:1px solid #ccc}.viewer canvas{display:block;width:100%;height:100%}
/* v152 – čisté katalogové náhledy bez drátěné kontury */
.catalog-item{position:relative;transition:background .16s ease,box-shadow .16s ease}
.catalog-item:hover{background:#f6f9fc;box-shadow:inset 3px 0 0 #1976d2}
.catalog-item .thumb,.catalog-item .wardrobe-thumb{
  background:#fff;border:1px solid #d5d5d5;box-shadow:0 2px 6px rgba(0,0,0,.10);
  filter:contrast(1.04) saturate(1.02);
  transition:filter .16s ease,box-shadow .16s ease,border-color .16s ease
}

.catalog-source-thumb{
  object-fit:contain!important;
  background:#fff!important;
  filter:none!important;
  padding:2px!important;
}
.catalog-item:hover .catalog-source-thumb{filter:none!important}
.catalog-item:hover .thumb,.catalog-item:hover .wardrobe-thumb{
  border-color:#9bb6cf;box-shadow:0 3px 9px rgba(0,0,0,.15);filter:contrast(1.07) saturate(1.03)
}
.atyp-project-badge{
  position:absolute;
  top:8px;
  left:10px;
  z-index:39;
  max-width:300px;
  padding:8px 10px;
  border-radius:7px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(0,0,0,.18);
  box-shadow:0 2px 9px rgba(0,0,0,.13);
  font-size:11px;
  line-height:1.35;
  color:#222;
  pointer-events:none;
}
.atyp-project-badge strong{
  display:block;
  font-size:11px;
  letter-spacing:.035em;
  margin-bottom:2px;
}

.project-pan-h{
  position:absolute;
  left:12px;
  right:34px;
  bottom:6px;
  height:18px;
  z-index:18;
  display:flex;
  align-items:center;
  pointer-events:auto;
}
.project-pan-v{
  position:absolute;
  top:12px;
  bottom:34px;
  right:6px;
  width:18px;
  z-index:18;
  display:flex;
  justify-content:center;
  pointer-events:auto;
}
.project-pan-h input,
.project-pan-v input{
  margin:0;
  padding:0;
  cursor:pointer;
  accent-color:#666;
}
.project-pan-h input{
  width:100%;
  height:18px;
}
.project-pan-v input{
  width:calc(100% - 2px);
  height:100%;
  writing-mode:vertical-lr;
  direction:rtl;
  appearance:slider-vertical;
}
.toolbox{position:absolute;bottom:92px;left:50%;transform:translateX(-50%);background:#fff;display:flex;border-radius:9px;padding:4px;box-shadow:0 3px 14px #0003}.toolbox button{border:0;background:#fff;padding:10px 14px;font-size:12px;font-weight:700;border-right:1px solid #eee}.toolbox button:last-child{border-right:0}.toolbox button.active{color:var(--blue)}
.orientation-control{display:flex;align-items:center;border-right:1px solid #eee;white-space:nowrap}
.orientation-control button{border-right:0!important;padding-left:8px!important;padding-right:8px!important;font-weight:600;cursor:pointer}
.orientation-control button.active{color:var(--blue)}
.orientation-sep{color:#111;font-weight:700;padding:0 1px}.hint{position:absolute;bottom:34px;left:50%;transform:translateX(-50%);background:#fffde8;padding:8px 12px;border-radius:7px;font-size:12px;line-height:1.35;box-shadow:0 1px 5px #0002;white-space:normal;text-align:center;width:max-content;max-width:82%;font-weight:600}
.right-section{border-bottom:1px solid #e5e5e5;padding:12px}.right-section h3{margin:0 0 10px;font-size:14px}.opening-card{border:1px solid var(--line);border-radius:7px;padding:9px;margin-bottom:9px;background:#fbfbfb}.opening-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.opening-head strong{font-size:12px}.opening-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.opening-grid label{font-size:10px;font-weight:bold}.opening-grid input,.opening-grid select{width:100%;padding:6px;border:1px solid var(--line);border-radius:4px;margin-top:4px}.open-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.btn{border:1px solid var(--line);background:#fff;border-radius:5px;padding:8px;cursor:pointer}.btn.primary{background:var(--blue);border-color:var(--blue);color:#fff}
#viewModeBar #designViewBtn.active,#viewModeBar #photoViewBtn.active{
  background:#1976d2!important;border-color:#1976d2!important;color:#fff!important;
  box-shadow:0 0 0 2px rgba(25,118,210,.18);font-weight:800;
}
.btn.danger{color:#a22}.assembly-item{display:grid;grid-template-columns:1fr auto auto;gap:6px;align-items:center;border-bottom:1px solid #eee;padding:8px 0;font-size:12px}.info-row{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #eee;font-size:12px}.swatches{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.swatch{height:58px;border:1px solid #bbb;border-radius:5px;cursor:pointer;background-size:cover;background-position:center}
.swatch.project-decor-selected{
  outline:3px solid #1676d2;
  outline-offset:2px;
  box-shadow:0 0 0 2px rgba(255,255,255,.95),0 0 0 5px rgba(22,118,210,.22);
}
.swatch.active{outline:2px solid var(--blue);outline-offset:2px}
.swatch[draggable="true"]{cursor:grab}
.swatch[draggable="true"]:active{cursor:grabbing}
.swatch.dragging{opacity:.55;transform:scale(.96)}
.viewer.material-drop-active{outline:3px solid #1676d2;outline-offset:-3px}
.material-drop-hint{position:absolute;top:12px;left:50%;transform:translateX(-50%);z-index:90;background:#1676d2;color:#fff;padding:8px 12px;border-radius:6px;font-size:12px;font-weight:700;pointer-events:none;display:none;box-shadow:0 2px 8px #0003}
.viewer.material-drop-active .material-drop-hint{display:block}.decor-block{margin-bottom:12px}.decor-block h4{margin:0 0 7px;font-size:11px}.decor-disabled{opacity:.45;pointer-events:none}.selection-status{font-size:12px;padding:8px;border-radius:5px;background:#eef6ff;color:#124f86;margin-bottom:10px}.note{font-size:11px;color:#666;margin-top:8px}.control-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.control-grid .btn{font-size:11px}.project-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.project-grid label{font-size:10px;font-weight:700}.project-grid input,.project-grid select{width:100%;margin-top:4px;padding:7px;border:1px solid var(--line);border-radius:5px}.price-row{display:grid;grid-template-columns:1fr 90px;gap:8px;align-items:center;padding:5px 0;border-bottom:1px solid #eee;font-size:11px}.price-row input{width:100%;padding:6px;border:1px solid var(--line);border-radius:4px;text-align:right}.total-box{margin-top:9px;padding:10px;background:#eef6ff;border-radius:6px;display:flex;justify-content:space-between;font-weight:800}.dim-label{pointer-events:none}@media print{header,.left,.topbar,.toolbox,.hint,.right .right-section:not(.print-keep){display:none!important}.app{display:block;height:auto;padding:0}.center{display:block}.viewer{height:70vh;border:0}.right{display:block;position:static}.panel{border:0;box-shadow:none}}
@media(max-width:1050px){.app{grid-template-columns:210px minmax(340px,1fr) 245px;gap:6px;padding:6px}.right{display:block}.catalog-item{grid-template-columns:92px 1fr;gap:7px;padding:8px}.thumb{width:88px;height:92px}.right-section{padding-left:9px;padding-right:9px}}@media(max-width:760px){.app{display:block;height:auto}.left{display:none}.center{height:calc(100vh - 70px)}.topbar{grid-template-columns:1fr}.viewer{min-height:500px}}

.top-project-input{
  width:170px;
  height:28px;
  box-sizing:border-box;
  border:1px solid #cfd3d7;
  border-radius:2px;
  background:#fff;
  color:#111;
  padding:2px 8px;
  font:600 13px Arial,sans-serif;
  text-align:center;
  outline:none;
}
.top-project-input::placeholder{color:#555;opacity:1}
.top-project-input:focus{border-color:#1976d2;box-shadow:0 0 0 1px #1976d2}
.top-customer-input{width:170px}
.top-sep{color:#ddd;font-weight:700;margin:0 2px}
header .actions{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}

#assemblySection #priceSummary{margin-top:6px}
#assemblySection #priceSummary .total-box{margin-top:8px}
#projectWorkStack,#roomOpeningsSection{display:block}

#undoBtn:disabled,#redoBtn:disabled{opacity:.38;cursor:default}

.order-modal-backdrop{position:fixed;inset:0;background:#0008;display:none;align-items:center;justify-content:center;z-index:99999}
.order-modal-backdrop.open{display:flex}
.order-modal{width:min(560px,calc(100vw - 32px));background:#fff;color:#222;border-radius:10px;box-shadow:0 18px 60px #0007;padding:20px}
.order-modal h2{margin:0 0 12px;font-size:20px}
.order-modal p{margin:0 0 10px;color:#555;font-size:13px}
.order-modal textarea{width:100%;min-height:150px;resize:vertical;box-sizing:border-box;border:1px solid #bbb;border-radius:7px;padding:10px;font:14px Arial}
.order-modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.order-modal-actions button{border:1px solid #aaa;background:#f5f5f5;border-radius:6px;padding:8px 13px;cursor:pointer}
.order-modal-actions .primary{background:#222;color:#fff;border-color:#222}

<style>
.sliding-section-backdrop{position:fixed;inset:0;background:#0008;display:flex;align-items:center;justify-content:center;z-index:100000}
.sliding-section-dialog{width:min(520px,calc(100vw - 32px));background:#fff;border-radius:10px;box-shadow:0 18px 60px #0007;padding:20px;color:#222}
.sliding-section-dialog h3{margin:0 0 8px;font-size:19px}
.sliding-section-dialog p{margin:0 0 14px;font-size:13px;color:#555;line-height:1.45}
.sliding-section-buttons{display:grid;gap:8px}
.sliding-section-buttons.two{grid-template-columns:repeat(2,1fr)}
.sliding-section-buttons.three{grid-template-columns:repeat(3,1fr)}
.sliding-section-buttons button{padding:14px 8px;border:1px solid #aaa;border-radius:7px;background:#f7f7f7;font-weight:800;cursor:pointer}
.sliding-section-buttons button:hover{background:#eef6ff;border-color:#1676d2}
.sliding-section-cancel{margin-top:12px;width:100%;padding:9px;border:1px solid #bbb;border-radius:6px;background:#fff;cursor:pointer}

.wall-material-box{margin-top:10px;padding-top:10px;border-top:1px solid #ddd}
.wall-material-box h4{margin:0 0 7px;font-size:12px}
.wall-side-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin-bottom:8px}
.wall-side-btn{border:1px solid #bbb;background:#fff;border-radius:5px;padding:6px 4px;font-size:11px;font-weight:700;cursor:pointer}
.wall-side-btn.active{background:#111;color:#fff;border-color:#111}
.wall-material-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;max-height:250px;overflow:auto;padding-right:2px}
.wall-material-card{border:1px solid #ccc;border-radius:5px;background:#fff;padding:3px;cursor:pointer;text-align:left}
.wall-material-card.active{border:2px solid #111;padding:2px}
.wall-material-card img{display:block;width:100%;height:48px;object-fit:cover;border-radius:3px;background:#eee}
.wall-material-card span{display:block;font-size:9px;line-height:1.15;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wall-material-current{font-size:10px;color:#555;margin:5px 0 7px}

.floor-material-box{margin-top:12px;padding-top:10px;border-top:1px solid #ddd}
.floor-material-box h4{margin:0 0 7px;font-size:12px}
.floor-material-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;max-height:250px;overflow:auto;padding-right:2px}
.floor-material-card{border:1px solid #ccc;border-radius:5px;background:#fff;padding:3px;cursor:pointer;text-align:left}
.floor-material-card.active{border:2px solid #111;padding:2px}
.floor-material-card img{display:block;width:100%;height:48px;object-fit:cover;border-radius:3px;background:#eee}
.floor-material-card span{display:block;font-size:9px;line-height:1.15;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.floor-material-current{font-size:10px;color:#555;margin:5px 0 7px}



.sliding-accessory-card{cursor:grab}
.sliding-accessory-card:active,.sliding-accessory-card.dragging{cursor:grabbing;opacity:.72}



/* v205 – resize úchyty pouze pro TV a OBRAZ */
.decor-resize-handle{
  position:absolute;z-index:95;display:none;background:#fff;
  border:2px solid #1676d2;box-shadow:0 1px 5px #0005;
  pointer-events:auto;user-select:none;touch-action:none
}
#decorResizeRight{width:10px;height:34px;border-radius:6px;cursor:ew-resize;transform:translate(-50%,-50%)}
#decorResizeBottom{width:34px;height:10px;border-radius:6px;cursor:ns-resize;transform:translate(-50%,-50%)}
#decorResizeCorner{width:16px;height:16px;border-radius:4px;cursor:nwse-resize;transform:translate(-50%,-50%);background:#1676d2;border-color:#fff}



/* ============================================================
   v349 – PC rozhraní pro různé monitory a Windows 100/125/150 %
   Funkce konfigurátoru se nemění. Řeší se pouze rozmístění UI.
   ============================================================ */

:root{
  --relax-header-h:58px;
  --relax-ui-gap:10px;
  --relax-hint-space:62px;
}

/* Výška se vždy řídí skutečně dostupným viewportem. */
html,body{height:100%;height:100dvh;overflow:hidden}
header{height:var(--relax-header-h);min-height:var(--relax-header-h)}
.app{
  height:calc(100vh - var(--relax-header-h));
  height:calc(100dvh - var(--relax-header-h));
  min-height:0;
  overflow:hidden;
}
.center{
  min-width:0;
  min-height:0;
  overflow:hidden;
  grid-template-rows:auto minmax(0,1fr);
}
.viewer{
  min-width:0;
  min-height:0;
  height:100%;
}

/* Levý i pravý panel scrollují uvnitř sebe a nikdy nezvětší celý viewport. */
.panel.left,.panel.right{min-height:0;max-height:100%;overscroll-behavior:contain}
.panel.right{overflow-y:auto;overflow-x:hidden}

/* Horní část nesmí vytlačit scénu při užším středu. */
.topbar{min-width:0}
.dims{min-width:0}
.toggles{min-width:0;flex-wrap:wrap;height:auto;row-gap:3px}

/* Spodní prvky jsou ukotvené ke scéně, ne k monitoru. */
.viewer .hint{
  bottom:30px;
  max-width:min(88%,900px);
  z-index:21;
}
.viewer .toolbox{
  bottom:calc(30px + var(--relax-hint-space));
  max-width:calc(100% - 42px);
  z-index:22;
  flex-wrap:wrap;
  justify-content:center;
}
.project-pan-h{z-index:24}
.project-pan-v{z-index:24}

/* FOTO/NÁVRH nesmí přetéct mimo scénu. */
#viewModeBar{
  max-width:calc(100% - 24px);
  flex-wrap:wrap;
  justify-content:flex-end;
}
#floatingFurnitureTools{
  max-width:calc(100% - 28px);
  flex-wrap:wrap;
  justify-content:center;
}

/* Nadstandardní informace se při užším středu posune pod FOTO lištu. */
@container relaxviewer (max-width:700px){
  .atyp-project-badge{top:52px}
}
.viewer{container-type:inline-size;container-name:relaxviewer}

/* 1600×900, 1920×1080 při 125 %, menší notebooky apod. */
@media (max-width:1350px){
  :root{--relax-ui-gap:7px}
  header{padding-left:10px;padding-right:10px}
  .brand{gap:7px}
  .brand-logo-img{max-width:175px;height:38px}
  .brand h1{font-size:15px}
  .head-actions,header .actions{gap:4px;min-width:0}
  .head-actions button,header .actions button{padding:6px 6px}
  .top-project-input,.top-customer-input{width:clamp(105px,11vw,150px)}

  .app{
    grid-template-columns:250px minmax(430px,1fr) 280px;
    gap:7px;
    padding:7px;
  }
  .topbar{padding:8px 10px;gap:10px}
  .dims{grid-template-columns:repeat(3,minmax(100px,1fr));gap:7px}
  .toggles{gap:8px;font-size:11px}
  .catalog-item{grid-template-columns:118px 1fr;gap:8px;padding:9px}
  .thumb{width:114px;height:112px}
}

/* 1366×768, 1600×900 při 150 %, případně velmi úzké desktopové okno. */
@media (max-width:1050px){
  :root{--relax-header-h:52px;--relax-hint-space:56px}
  header{padding:0 7px}
  .brand-logo-img{height:34px;max-width:140px}
  .brand h1{font-size:13px}
  .head-actions button,header .actions button{font-size:11px;padding:5px}
  .top-project-input,.top-customer-input{width:105px;height:26px;font-size:11px}

  .section-title{padding:9px 8px;font-size:12px}
  .catalog-tabs{padding:5px;gap:4px}
  .catalog-tab{padding:6px 3px;font-size:11px}
  .topbar{padding:6px 8px;gap:7px}
  .topbar b{font-size:11px!important}
  .dims{grid-template-columns:repeat(3,minmax(82px,1fr));gap:5px}
  .dims label{font-size:9px}
  .stepper input{min-width:0}
  .toggles{gap:6px;font-size:10px}

  .viewer .hint{
    bottom:27px;
    padding:6px 8px;
    font-size:10px;
    line-height:1.25;
    max-width:92%;
  }
  .viewer .toolbox{
    bottom:calc(27px + var(--relax-hint-space));
    padding:3px;
    gap:2px;
  }
  .viewer .toolbox button{padding:5px 7px;font-size:10px}
  #viewModeBar{top:6px!important;right:25px!important;padding:3px!important;gap:3px!important}
  #viewModeBar .btn{padding:5px 7px;font-size:10px}
  .atyp-project-badge{max-width:220px;padding:6px 7px;font-size:9px}
}

/* Nízké monitory / Windows 125–150 %: zmenšujeme jen mezery a ovládání,
   nikoliv celý konfigurátor nebo 3D scénu. */
@media (max-height:850px){
  :root{--relax-header-h:52px;--relax-hint-space:54px}
  header{height:52px;min-height:52px}
  .brand-logo-img{height:35px}
  .topbar{padding-top:6px;padding-bottom:6px}
  .field label{margin-bottom:2px}
  .viewer .hint{font-size:10px;padding:5px 8px;bottom:26px}
  .viewer .toolbox{bottom:calc(26px + var(--relax-hint-space))}
  .viewer .toolbox button{padding-top:5px;padding-bottom:5px}
}

/* Velmi nízký efektivní viewport (typicky 1366×768 při 150 %). */
@media (max-height:650px){
  :root{--relax-header-h:46px;--relax-hint-space:46px}
  header{height:46px;min-height:46px}
  .brand-logo-img{height:31px}
  .brand h1{font-size:12px}
  .topbar{padding:4px 7px}
  .topbar b{font-size:10px!important}
  .dims{gap:4px}
  .field label{font-size:8px}
  .stepper input,.stepper button{height:25px!important;font-size:10px}
  .toggles{font-size:9px;gap:5px}
  .viewer .hint{
    bottom:24px;
    font-size:9px;
    line-height:1.18;
    padding:4px 7px;
    max-width:94%;
  }
  .viewer .toolbox{
    bottom:calc(24px + var(--relax-hint-space));
  }
  .viewer .toolbox button{font-size:9px;padding:4px 6px}
  .project-pan-h{bottom:4px}
  .project-pan-v{top:8px;bottom:28px}
}

/* Šířka 1060–1190 CSS px bývá častá při 125/150% měřítku.
   Zachováme tři sloupce a jen je zúžíme. */
@media (min-width:1051px) and (max-width:1190px){
  .app{grid-template-columns:225px minmax(380px,1fr) 255px;gap:6px;padding:6px}
  .catalog-item{grid-template-columns:100px 1fr;gap:7px;padding:8px}
  .thumb{width:96px;height:98px}
  .right-section{padding-left:9px;padding-right:9px}
}

/* Stávající mobilní pravidlo pod 760 px zůstává jako nouzová hranice.
   PC verze se při běžném 1366×768/150 % do něj nedostane. */

/* v351 – dvouřádkový název hlavičky, aby se při Windows 125/150 % nepřekrýval. */
@media (max-width:1350px){
  .brand-title{min-width:112px;max-width:145px}
  .brand-title span:first-child{font-size:10px;margin-bottom:2px}
  .brand-title span:last-child{font-size:12px}
}
@media (max-width:1050px){
  .brand-title{min-width:95px;max-width:112px}
  .brand-title span:first-child{font-size:9px}
  .brand-title span:last-child{font-size:10px}
}
@media (max-height:650px){
  .brand-title span:first-child{font-size:8px}
  .brand-title span:last-child{font-size:9px}
}




#startupLoadingOverlay{
  position:fixed;inset:0;z-index:1000000;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#f7f7f5,#e9e6e1);
  font-family:Arial,Helvetica,sans-serif;color:#222;
}
#startupLoadingOverlay.hidden{display:none}
#startupLoadingCard{
  width:min(430px,calc(100vw - 36px));
  background:rgba(255,255,255,.97);
  border:1px solid #d5d5d2;border-radius:12px;
  box-shadow:0 12px 40px rgba(0,0,0,.18);
  padding:24px 26px;text-align:center;
}
#startupLoadingLogo{max-width:230px;max-height:58px;object-fit:contain;margin:0 auto 14px;display:block}
#startupLoadingSpinner{
  width:34px;height:34px;margin:5px auto 14px;
  border:4px solid #ddd;border-top-color:#1676d2;border-radius:50%;
  animation:relaxStartupSpin .85s linear infinite;
}
#startupLoadingCard strong{display:block;font-size:17px;margin-bottom:7px}
#startupLoadingCard span{display:block;font-size:12px;line-height:1.45;color:#666}
@keyframes relaxStartupSpin{to{transform:rotate(360deg)}}



  @page{
    size:A4 portrait;
  }
  *{box-sizing:border-box}
  html,body{margin:0;padding:0}
  body{
    font:11px Arial,sans-serif;
    color:#222;
    padding:0;
  }
  .company-header{
    display:flex;
    align-items:flex-start;
    gap:12px;
    border-bottom:1.5px solid #222;
    padding-bottom:7px;
    margin-bottom:8px;
  }
  .company-header img{
    width:58mm;
    height:auto;
    max-height:15mm;
    object-fit:contain;
    object-position:left center;
  }
  .company-contact{
    font-size:10px;
    line-height:1.45;
    padding-top:1px;
  }
  .company-contact div{white-space:nowrap}
  h1{font-size:18px;margin:0 0 4px}
  p{margin:3px 0}
  .room-preview{
    width:100%;
    height:112mm;
    overflow:hidden;
    margin:5px 0 7px;
    border:1px solid #bbb;
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .room-preview img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center;
    border:0;
    margin:0;
  }
  table{
    width:100%;
    border-collapse:collapse;
    margin-top:5px;
    table-layout:fixed;
    font-size:8.5px;
  }
  th,td{
    border:1px solid #bbb;
    padding:3px 4px;
    text-align:left;
    vertical-align:top;
    overflow-wrap:anywhere;
  }
  th{background:#f0f0f0;font-weight:700}
  th:nth-child(1){width:12%}
  th:nth-child(2){width:22%}
  th:nth-child(3){width:18%}
  th:nth-child(4){width:18%}
  th:nth-child(5){width:5%;text-align:center}
  th:nth-child(6){width:12%;text-align:right}
  th:nth-child(7){width:13%;text-align:right}
  td:nth-child(5){text-align:center}
  td:nth-child(6),td:nth-child(7){
    text-align:right;
    white-space:nowrap;
  }
  .total{
    text-align:right;
    font-size:16px;
    font-weight:bold;
    margin-top:7px
  }
  .note{font-size:9px;margin-top:5px}
  .actions{margin-top:10px}
  @media print{
    .actions{display:none}
    body{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  }

/* v361 – velké, čitelné náhledy úchytek */
.catalog-item.handle-catalog-item{
  display:block !important;
  padding:10px 8px 12px !important;
}
.handle-catalog-thumb{
  display:block;
  width:calc(100% - 8px);
  height:210px;
  margin:0 auto 8px;
  object-fit:contain;
  border:1px solid #ddd;
  border-radius:7px;
  background:#f8f7f4;
}
.handle-catalog-meta{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:2px 10px;
  padding:0 5px;
}
.handle-catalog-meta strong{grid-column:1/-1;font-size:14px}
@media (max-height:820px){
  .handle-catalog-thumb{height:175px}
}


/* v370 – čitelnost sestavy a jasný aktivní světelný režim. */
#assemblySection .assembly-item{font-size:13px;line-height:1.25}
#assemblySection .assembly-item span[style*="font-size:11px"]{font-size:12px!important;line-height:1.25}
#assemblySection #priceSummary .total-box{font-size:19px;line-height:1.1;padding:11px 10px;font-weight:900}
#viewModeBar #dayTopBtn.active,#viewModeBar #nightTopBtn.active{
  background:#1976d2!important;border-color:#1976d2!important;color:#fff!important;
  box-shadow:0 0 0 2px rgba(25,118,210,.25)!important;font-weight:900!important;
}

/* v370 LOCAL TEST – čitelnější levý katalog bez změny šířek/layoutu. */
.panel.left .catalog-tab{font-size:14px}
.panel.left .catalog-item .meta strong{font-size:17px;line-height:1.2}
.panel.left .catalog-item .meta small{font-size:14px;line-height:1.5}
.panel.left .catalog-price-label,.panel.left .catalog-price-missing{font-size:13px}

/* v371 – rozšiřitelný katalog + dvě velikosti náhledů */
.panel.left{position:relative}
.catalog-resize-handle{position:absolute;right:-6px;top:0;bottom:0;width:12px;cursor:col-resize;z-index:50;background:transparent}
.catalog-resize-handle:hover:after,.panel.left.resizing .catalog-resize-handle:after{content:"";position:absolute;left:5px;top:0;bottom:0;width:2px;background:#1976d2}
.catalog-view-tools{display:flex;align-items:center;gap:5px;padding:6px 8px;border-bottom:1px solid #ddd;background:#f7f7f7;font-size:11px;font-weight:700}
.catalog-size-btn{border:1px solid #bcc3ca;background:#fff;border-radius:5px;padding:5px 7px;font-weight:700;cursor:pointer}
.catalog-size-btn.active{background:#1976d2;color:#fff;border-color:#1976d2}
#catalog{display:grid;grid-template-columns:repeat(auto-fill,minmax(285px,1fr));align-content:start}
#catalog .catalog-item{min-width:0}
.panel.left.catalog-small #catalog{grid-template-columns:repeat(auto-fill,minmax(145px,1fr))}
.panel.left.catalog-small .catalog-item{display:block;padding:7px;text-align:center;border-right:1px solid #e5e5e5}
.panel.left.catalog-small .catalog-item .thumb,.panel.left.catalog-small .catalog-item .wardrobe-thumb{width:100%;height:88px;max-width:110px;margin:0 auto 5px;object-fit:contain}
.panel.left.catalog-small .catalog-item .meta strong{font-size:12px;margin:2px 0 3px}
.panel.left.catalog-small .catalog-item .meta small{font-size:10px;line-height:1.25}
.panel.left.catalog-small .catalog-price{margin-top:5px;padding:4px 0}
.panel.left.catalog-small .catalog-price-label{font-size:9px;margin-bottom:2px}
.panel.left.catalog-small .catalog-price-value{font-size:13px}
/* v371 – výrazná žlutá systémová hlášení */
.yellow-notice-backdrop{display:none;position:fixed;inset:0;z-index:5000;background:rgba(0,0,0,.38);align-items:center;justify-content:center;padding:20px}
.yellow-notice-backdrop.open{display:flex}
.yellow-notice-box{width:min(560px,calc(100vw - 36px));background:#fff4b8;border:2px solid #d3a400;border-radius:10px;box-shadow:0 12px 38px rgba(0,0,0,.3);padding:18px;color:#2b260e}
.yellow-notice-text{white-space:pre-wrap;font-size:14px;line-height:1.5;font-weight:700}
.yellow-notice-box button{display:block;margin:14px 0 0 auto;border:1px solid #9c7600;background:#ffe477;border-radius:6px;padding:8px 22px;font-weight:800;cursor:pointer}
#orderFormError{background:#fff4b8!important;border-color:#d3a400!important;color:#5a4300!important}
.viewer.furniture-drop-active{outline:3px dashed #1976d2;outline-offset:-5px}
.catalog-item[draggable="true"]{cursor:grab}.catalog-item[draggable="true"]:active{cursor:grabbing}

/* v371 FIX1 – výrazně viditelný úchyt změny šířky katalogu */
.catalog-resize-handle{
  right:-7px!important;width:15px!important;
  background:linear-gradient(90deg,transparent 5px,#1976d2 5px,#1976d2 8px,transparent 8px)!important;
}
.catalog-resize-handle:before{
  content:"↔";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  width:25px;height:42px;border:2px solid #1976d2;border-radius:7px;background:#fff;color:#1976d2;
  display:flex;align-items:center;justify-content:center;font-size:17px;font-weight:900;box-shadow:0 2px 7px rgba(0,0,0,.18);
}
.catalog-resize-handle:hover:before,.panel.left.resizing .catalog-resize-handle:before{background:#1976d2;color:#fff}


/* v375 - NÁVOD, živá cena a nová nápověda */
.center>.topbar{display:flex;align-items:center;gap:16px;min-width:0}
.center>.topbar>div:first-child{flex:1 1 auto;min-width:380px}
.topbar-display-block{flex:0 1 auto;min-width:360px}
.topbar-guide-total{margin-left:auto;display:flex;align-items:center;justify-content:flex-end;gap:16px;white-space:nowrap;align-self:stretch}
.top-help-btn{
  min-width:100px;height:38px;padding:7px 14px!important;
  border:2px solid #1976d2!important;color:#0d5fab!important;background:#fff!important;
  font-weight:900!important;font-size:14px!important
}
.top-help-btn:hover{background:#edf6ff!important}
.top-total{display:flex;align-items:baseline;gap:8px;font-size:19px;color:#111;padding:4px 4px 4px 8px}
.top-total span{font-weight:700}
.top-total strong{font-size:24px;font-weight:900;letter-spacing:-.02em}

.guide-backdrop{
  display:none;position:fixed;inset:0;z-index:5200;background:rgba(0,0,0,.56);
  align-items:center;justify-content:center;padding:20px
}
.guide-backdrop.open{display:flex!important}
.intro-guide-box{
  width:min(720px,calc(100vw - 36px));max-height:calc(100vh - 40px);overflow:auto;
  background:#fff;border-radius:12px;padding:22px;box-shadow:0 14px 48px rgba(0,0,0,.38)
}
.guide-title-row h2,.help-guide-header h2{margin:0 0 5px;font-size:22px}
.guide-subtitle{font-size:13px;color:#555;line-height:1.45}
.intro-guide-content{display:grid;gap:10px;margin-top:16px;font-size:14px;line-height:1.55}
.intro-guide-content p{margin:0}
.guide-tip{background:#fff4b8;border:1px solid #d3a400;border-radius:7px;padding:10px 12px}
.guide-controls{background:#edf6ff;border:1px solid #b7d4ef;border-radius:7px;padding:10px 12px}
.intro-guide-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}

.help-guide-box{
  width:min(900px,calc(100vw - 36px));height:min(760px,calc(100vh - 40px));
  display:flex;flex-direction:column;background:#fff;border-radius:12px;overflow:hidden;
  box-shadow:0 14px 48px rgba(0,0,0,.42)
}
.help-guide-header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:18px 20px 12px;border-bottom:1px solid #ddd}
.help-close{border:0;background:transparent;font-size:30px;line-height:1;cursor:pointer;color:#555;padding:0 3px}
.help-search-row{display:flex;gap:8px;padding:12px 20px;background:#f6f7f8;border-bottom:1px solid #ddd}
.help-search-row input{flex:1;min-width:0;border:2px solid #9ba8b3;border-radius:7px;padding:10px 12px;font-size:16px;outline:none}
.help-search-row input:focus{border-color:#1976d2;box-shadow:0 0 0 3px rgba(25,118,210,.14)}
.help-guide-content{flex:1;overflow:auto;padding:14px 20px 22px}
.help-section{border:1px solid #ddd;border-radius:8px;padding:12px 14px;margin-bottom:10px;background:#fff}
.help-section h3{margin:0 0 6px;font-size:16px}
.help-section p{margin:0 0 6px;font-size:13.5px;line-height:1.5}
.help-section p:last-child{margin-bottom:0}
.help-section.search-match{border-color:#d3a400;background:#fffbe5}
.help-no-results{margin:14px 20px 0;padding:12px;background:#fff4b8;border:1px solid #d3a400;border-radius:7px;font-weight:700}
.help-guide-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;border-top:1px solid #ddd;background:#fafafa;font-size:12px}
.help-pdf-link{text-decoration:none;white-space:nowrap}

@media(max-width:1250px){
  .center>.topbar{flex-wrap:wrap}
  .topbar-guide-total{margin-left:0;flex:1 1 100%;justify-content:flex-end;min-height:38px}
}
@media(max-width:850px){
  .topbar-guide-total{justify-content:space-between}
  .top-total strong{font-size:20px}
  .help-guide-footer{align-items:stretch;flex-direction:column}
}


/* v377 ----------------------------------------------------------- */
.catalog-title-hidden{display:none!important}

/* Rozměry místnosti: pouze nativní šipky číselného pole. */
.stepper{display:block!important}
.stepper input{
  width:100%!important;
  border-radius:5px!important;
  padding:8px 9px!important;
}
.stepper button{display:none!important}

/* Zvýraznění aktuální L/P volby v plovoucím ovládání. */
#floatDoorSideBtn .lp-active{color:#0b6dcc;font-weight:900;font-size:1.12em}
#floatDoorSideBtn .lp-slash{color:#7a7a7a;padding:0 2px}

/* Startovací progress místo točícího kolečka. */
#startupLoadingSpinner{display:none!important}
#startupLoadingProgressWrap{
  width:100%;height:12px;margin:7px 0 7px;
  border-radius:999px;background:#e1e4e7;overflow:hidden;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.12)
}
#startupLoadingProgressBar{
  width:0;height:100%;border-radius:999px;background:#1676d2;
  transition:width .16s ease
}
#startupLoadingPercent{
  font-size:14px;font-weight:900;color:#1676d2;margin:0 0 12px
}

/* Přehlednější horní lišta a méně místa v levém katalogu. */
.center>.topbar>div:first-child{min-width:300px}
.topbar-display-block{min-width:255px}
.topbar-guide-total{gap:10px}
.top-help-btn{min-width:108px}
.catalog-view-tools{padding-top:5px;padding-bottom:5px}

/* Efektivní viewport typický pro 125 % Windows/browser zoom. */
@media (max-width:1650px){
  .center>.topbar{gap:8px;padding:7px 8px;align-items:center}
  .center>.topbar>div:first-child{min-width:280px}
  .topbar-display-block{min-width:245px}
  .dims{grid-template-columns:repeat(3,minmax(78px,1fr));gap:5px}
  .dims label{font-size:9px;margin-bottom:3px}
  .stepper input{height:32px;padding:5px 7px!important;font-size:12px}
  .toggles{gap:7px;font-size:10.5px;line-height:1.15}
  .topbar-guide-total{gap:7px;min-width:195px}
  .top-help-btn{height:32px;min-width:94px;padding:5px 8px!important;font-size:12px!important}
  .top-total{font-size:15px;gap:5px;padding-left:3px}
  .top-total strong{font-size:19px}

  .panel.left .catalog-main-tabs,
  .panel.left #dresserSeriesTabs,
  .panel.left #hangingSeriesTabs,
  .panel.left #bedSeriesTabs,
  .panel.left #slidingHeightTabs,
  .panel.left #slidingDoorTabs{gap:4px!important;padding:5px!important}
  .panel.left .catalog-tab{padding:5px 3px!important;font-size:11.5px!important;line-height:1.12}
  .catalog-view-tools{padding:4px 6px;font-size:10.5px}
  .catalog-size-btn{padding:4px 6px;font-size:10.5px}
}

/* Ještě kompaktnější při 150 % / velmi malém efektivním viewportu. */
@media (max-width:1250px){
  .center>.topbar{gap:6px}
  .center>.topbar>div:first-child{min-width:260px}
  .topbar-display-block{min-width:225px}
  .topbar-guide-total{flex:0 0 auto!important;margin-left:auto!important;min-height:32px!important}
  .panel.left .catalog-tab{padding:4px 2px!important;font-size:10.5px!important}
}

/* v395 – veřejný informační text pro návštěvníky i vyhledávače */
.relax-seo-info{
  box-sizing:border-box;
  width:min(1180px,calc(100% - 32px));
  margin:22px auto 34px;
  padding:18px 22px;
  border:1px solid rgba(0,0,0,.12);
  border-radius:10px;
  background:#fff;
  font-size:14px;
  line-height:1.55;
}
.relax-seo-info h2{margin:0 0 10px;font-size:20px;line-height:1.25}
.relax-seo-info p{margin:7px 0}

/* v402 – TIP výše a malé náhledy vždy dvě vedle sebe */
#bottomTip{
  bottom:64px!important;
  z-index:30!important;
  max-width:min(88%,920px)!important;
}
.panel.left.catalog-small #catalog{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
@media (max-height:850px){
  #bottomTip{bottom:56px!important}
}
@media (max-height:650px){
  #bottomTip{bottom:50px!important}
}

/* v403 – pozice upozornění, malování klikem a posuvný pravý panel */
#bottomTip{
  bottom:112px!important;
  z-index:31!important;
  max-width:min(88%,920px)!important;
}
#atypProjectBadge{
  top:64px!important;
  z-index:46!important;
  pointer-events:auto!important;
}
#atypProjectClose{
  z-index:47!important;
  pointer-events:auto!important;
}
@media (max-width:1600px){
  #atypProjectBadge{top:88px!important}
}
@media (max-height:850px){
  #bottomTip{bottom:96px!important}
}
@media (max-height:650px){
  #bottomTip{bottom:82px!important}
}

.viewer.paint-click-mode canvas{cursor:crosshair!important}
#paintClickModeBtn.active{
  background:#1976d2!important;
  border-color:#1976d2!important;
  color:#fff!important;
}

.panel.right{position:relative}
.right-resize-handle{
  position:absolute;
  left:-8px;
  top:0;
  bottom:0;
  width:16px;
  cursor:col-resize;
  z-index:60;
  background:transparent;
}
.right-resize-handle:before{
  content:"↔";
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  width:25px;
  height:42px;
  border:2px solid #1976d2;
  border-radius:7px;
  background:#fff;
  color:#1976d2;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:17px;
  font-weight:900;
  box-shadow:0 2px 7px rgba(0,0,0,.18);
}
.right-resize-handle:hover:before,.panel.right.resizing .right-resize-handle:before{
  background:#1976d2;
  color:#fff;
}
@media (min-width:761px){
  .app{
    grid-template-columns:var(--left-panel-w,300px) minmax(430px,1fr) var(--right-panel-w,315px)!important;
  }
}
