/* V232: compact and refined smart desk */
#md223-desk{margin:26px 0 24px;padding:18px;border:1px solid #dceee8;border-radius:26px;background:linear-gradient(180deg,#fcfffe,#f5faf8);box-shadow:0 12px 30px rgba(0,80,61,.05);color:#173f3a;overflow:hidden}
#md223-desk *{box-sizing:border-box}
.md223-intro{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}.md223-eyebrow{font:800 11px/1.6 Arial,sans-serif;color:#0b957f;letter-spacing:1.4px}.md223-intro h2{font-size:clamp(21px,2vw,28px);color:#045d52;margin:3px 0 6px;font-weight:900}.md223-intro p{color:#66857f;font-size:12px;line-height:1.9;margin:0;max-width:700px}.md223-intro-stats{display:grid;grid-template-columns:repeat(3,minmax(84px,1fr));gap:8px;flex:none}.md223-intro-stats div{background:#fff;border:1px solid #e0efea;border-radius:14px;padding:10px 11px;text-align:center}.md223-intro-stats strong{display:block;font-size:18px;color:#006d60}.md223-intro-stats span{display:block;font-size:10px;color:#6e8c86;margin-top:3px}
.md223-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}.md223-tab{padding:9px 15px;border:1px solid #d2e8e1;color:#0b655a;background:#fff;border-radius:999px;font-weight:800;font-size:12px;transition:all .18s ease}.md223-tab:hover{transform:translateY(-1px);border-color:#0ea388}.md223-tab.is-active{background:#0a7868;color:#fff;border-color:#0a7868;box-shadow:0 8px 18px rgba(0,108,94,.14)}
.md223-workspace{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(305px,.95fr);gap:14px;align-items:start}.md223-photo-wrap{display:flex;flex-direction:column;gap:10px;min-width:0}.md223-photo{position:relative;min-width:0;height:clamp(290px,28vw,360px);border:1px solid #cfe9e2;border-radius:22px;overflow:hidden;background:#e8f6f2;isolation:isolate}.md223-photo>img{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:cover;object-position:left center;transform-origin:var(--focus-x,50%) var(--focus-y,50%);transition:filter .2s ease}.md223-photo.is-zoomed>img{transform:none;filter:saturate(1.03)}.md223-shade{position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,rgba(0,44,38,.04),rgba(0,54,49,.03) 35%,rgba(0,58,50,.18))}.md223-markers{position:absolute;inset:0}.md223-zone{position:absolute;left:calc(var(--x) - (var(--w) / 2));top:calc(var(--y) - (var(--h) / 2));width:var(--w);height:var(--h);background:transparent;border:0;padding:0;margin:0;cursor:pointer;z-index:2;border-radius:14px;overflow:visible}.md223-zone-outline{position:absolute;inset:-2px;border-radius:16px;border:1px solid transparent;background:rgba(9,144,123,0);box-shadow:0 0 0 0 rgba(0,170,140,0);transition:border-color .16s ease,background .16s ease,box-shadow .16s ease}.md223-zone:hover .md223-zone-outline,.md223-zone.is-hover .md223-zone-outline,.md223-zone.is-active .md223-zone-outline,.md223-zone:focus-visible .md223-zone-outline{border-color:rgba(255,255,255,.9);background:rgba(12,167,138,.08);box-shadow:0 0 0 6px rgba(0,176,143,.12)}.md223-zone-tooltip{display:none !important}.md223-zone:focus-visible{outline:none}
.md223-photo-guide{display:flex;align-items:center;gap:9px;background:#f7fcfa;border:1px solid #dceee8;color:#0a6e62;padding:10px 13px;border-radius:14px;font-size:11px;font-weight:800;box-shadow:0 3px 10px rgba(0,59,50,.05)}.md223-photo-guide span{flex:none;color:#00b599;font-size:14px}.md223-photo-guide p{margin:0;line-height:1.9}
.md223-panel{min-width:0;max-height:clamp(290px,28vw,360px);border:1px solid #dceee8;border-radius:22px;background:#fff;padding:15px;box-shadow:0 8px 24px rgba(0,61,48,.045);display:flex;flex-direction:column;gap:12px;overflow:auto}.md223-panel::-webkit-scrollbar{width:8px}.md223-panel::-webkit-scrollbar-thumb{background:#d7e8e2;border-radius:999px}.md223-detail-kicker{font-size:10px;color:#00a38a;font-weight:850}.md223-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.md223-panel h3{font-size:20px;color:#055d52;margin:3px 0}.md223-detail-desc{font-size:12px;color:#718983;margin:0;line-height:1.9}.md223-zoom-hint{border:1px solid #d8ece5;background:#f6fcfa;color:#0b6d61;border-radius:12px;padding:7px 10px;font:800 11px Vazirmatn,sans-serif;white-space:nowrap}.md223-modes{display:flex;gap:6px;flex-wrap:wrap}.md223-modes button{border:1px solid #d6eae4;background:#f9fdfb;color:#0b6458;border-radius:999px;padding:7px 11px;font:800 11px Vazirmatn,sans-serif}.md223-modes button.is-active{background:#0a7868;color:#fff;border-color:#0a7868}.md223-stat-row{display:flex;gap:6px;flex-wrap:wrap}.md223-stat-row span{padding:5px 9px;border-radius:999px;background:#f3faf7;border:1px solid #dcefe9;color:#5b7c74;font-size:10px;font-weight:700}
.md223-section-title{font-size:11px;color:#0b6c61;font-weight:900;margin-bottom:8px}.md223-feature-wrap,.md223-alt-wrap{display:flex;flex-direction:column;gap:9px}.md223-alt-list{display:flex;flex-direction:column;gap:8px}.md223-item{display:grid;grid-template-columns:72px minmax(0,1fr);gap:10px;border:1px solid #e6f2ee;border-radius:16px;background:#fcfffe;padding:10px}.md223-item.is-featured{border-color:#d0e7df;background:linear-gradient(180deg,#fcfffe,#f7fcfa)}.md223-item>img{width:72px;height:72px;border-radius:12px;object-fit:contain;background:#fff;border:1px solid #edf5f1}.md223-item-body{display:flex;flex-direction:column;gap:8px;min-width:0}.md223-item-top{display:flex;flex-direction:column;gap:3px}.md223-item-top strong{font-size:12px;line-height:1.8;color:#153f39;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.md223-item-top span{font-size:10px;color:#7a958e}.md223-item-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.md223-item-meta b{font-size:12px;color:#007969}.md223-item-meta small{font-size:10px;color:#68857d}.md223-inline-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.md223-qty{display:inline-flex;align-items:center;border:1px solid #d9ece6;border-radius:12px;overflow:hidden;background:#fff}.md223-qty button{width:30px;height:32px;border:0;background:#f4faf7;color:#0d6c5f;font-size:17px;font-weight:700}.md223-qty input{width:44px;height:32px;border:0;text-align:center;font:700 12px Vazirmatn,sans-serif;color:#184842;background:transparent}.md223-primary,.md223-soft,.md223-link-btn{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 12px;border-radius:11px;font:800 11px Vazirmatn,sans-serif;text-decoration:none}.md223-primary{background:#0a7868;color:#fff;border:1px solid #0a7868}.md223-primary[disabled]{opacity:.45;cursor:not-allowed}.md223-soft{background:#f4faf7;color:#0d6b5f;border:1px solid #d7ebe5}.md223-link-btn{background:#fff;color:#0d6b5f;border:1px solid #d7ebe5}.md223-item-tools{display:flex;gap:6px;flex-wrap:wrap}.md223-chip-btn{padding:6px 9px;border-radius:999px;border:1px solid #dcece7;background:#fff;color:#0c6358;font:800 10px Vazirmatn,sans-serif}.md223-chip-btn.danger{color:#a24444;border-color:#edd4d4}.md223-empty{font-size:12px;line-height:2;color:#68847a;padding:6px 0}.md223-bundle-box{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:12px;border-radius:16px;background:#f7fcfa;border:1px solid #dcefe8}.md223-bundle-box p{margin:5px 0 0;font-size:11px;color:#68837d;line-height:1.8}.md223-bundle-side{display:flex;flex-direction:column;align-items:flex-end;gap:8px;white-space:nowrap}.md223-bundle-side strong{font-size:16px;color:#045f53}.md223-bundle-actions{display:flex;flex-direction:column;gap:7px;align-items:stretch;min-width:148px}
.md223-bottom-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.95fr);gap:14px;margin-top:14px}.md223-scene-summary,.md223-scene-saved{border:1px solid #deeee8;border-radius:20px;background:#fff;padding:14px}.md223-summary-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px}.md223-summary-head h4{margin:0;color:#095f54;font-size:14px}.md223-summary-head p{margin:4px 0 0;font-size:11px;color:#728b84;line-height:1.8}.md223-summary-list{display:flex;flex-wrap:wrap;gap:7px}.md223-summary-chip{padding:7px 10px;border-radius:999px;border:1px solid #d9ebe6;background:#f8fdfb;color:#0d665b;font:800 11px Vazirmatn,sans-serif}.md223-summary-chip.is-active{background:#0a7868;color:#fff;border-color:#0a7868}.md223-saved-box{display:flex;flex-direction:column;gap:8px}.md223-saved-box.empty{min-height:58px;justify-content:center;color:#78918b;font-size:11px}.md223-saved-item{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1px solid #e3f0eb;border-radius:14px;background:#fbfefd;padding:10px 11px}.md223-saved-item strong{display:block;font-size:11px;color:#17413a}.md223-saved-item small{display:block;font-size:10px;color:#738d86;margin-top:3px}.md223-saved-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
@keyframes md223Pulse{0%{transform:scale(.85);opacity:.7}70%{transform:scale(1.25);opacity:0}100%{transform:scale(1.25);opacity:0}}
@media(max-width:1180px){.md223-workspace{grid-template-columns:minmax(0,1fr)}.md223-photo,.md223-panel{height:auto;max-height:none}.md223-photo{height:340px}.md223-bottom-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:820px){.md223-intro{flex-direction:column}.md223-intro-stats{width:100%}.md223-bundle-box{flex-direction:column}.md223-bundle-side{align-items:flex-start}.md223-bundle-actions{min-width:0;width:100%}.md223-inline-actions{align-items:stretch}.md223-primary,.md223-soft,.md223-link-btn{flex:1}}
@media(max-width:600px){#md223-desk{padding:14px;margin:24px 0 20px;border-radius:22px}.md223-tab{padding:9px 12px;font-size:11px}.md223-photo{height:280px}.md223-zone-tooltip{display:none !important}.md223-photo-guide{font-size:10px;padding:8px 10px}.md223-panel h3{font-size:18px}.md223-item{grid-template-columns:60px minmax(0,1fr)}.md223-item>img{width:60px;height:60px}.md223-item-meta{align-items:flex-start;flex-direction:column}.md223-inline-actions{flex-direction:column;align-items:stretch}.md223-qty{align-self:flex-start}.md223-saved-item,.md223-summary-head,.md223-panel-head{flex-direction:column;align-items:stretch}.md223-saved-actions{justify-content:flex-start}}
@media(prefers-reduced-motion:reduce){#md223-desk *,#md223-desk *::before,#md223-desk *::after{transition:none!important;animation:none!important}}

/* V238: discoverable whole-object hover. No visible dots, exact image-aligned hit regions. */
#md223-desk .md223-photo{height:auto;aspect-ratio:1350 / 724;position:relative;overflow:hidden;cursor:default;touch-action:manipulation}
#md223-desk .md223-photo>img{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;transform:none!important;pointer-events:none;user-select:none}
#md223-desk .md223-shade{pointer-events:none}
#md223-desk .md223-region-svg{position:absolute;inset:0;width:100%;height:100%;overflow:hidden;pointer-events:none;z-index:2}
#md223-desk .md223-region-svg polygon.md223-region-guide{fill:rgba(5,115,99,.085);stroke:rgba(255,255,255,.7);stroke-width:.25;stroke-dasharray:1.1 1.2;vector-effect:non-scaling-stroke}
#md223-desk .md223-region-svg polygon.md223-region-active{fill:rgba(2,159,129,.11);stroke:rgba(255,255,255,.94);stroke-width:1.7;vector-effect:non-scaling-stroke;filter:drop-shadow(0 0 2px rgba(4,74,63,.35))}
#md223-desk .md223-photo.md223-has-hit{cursor:pointer}
#md223-desk .md223-cursor-hint{position:absolute;z-index:4;min-height:56px;pointer-events:none;max-width:220px;direction:rtl;text-align:right;display:flex;flex-direction:column;gap:3px;background:rgba(14,51,46,.95);border:1px solid rgba(255,255,255,.25);color:#fff;padding:9px 12px;border-radius:12px;box-shadow:0 8px 22px rgba(0,39,32,.22);font-size:11px}
#md223-desk .md223-cursor-hint[hidden]{display:none!important}
#md223-desk .md223-cursor-hint strong{font-size:12px;color:#fff}
#md223-desk .md223-cursor-hint span{font-size:10px;color:#e0efeb;line-height:1.7}
#md223-desk .md223-photo-guide{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:8px 11px}
#md223-desk .md223-photo-guide p{flex:1;min-width:140px}
#md223-desk .md223-photo-guide button{background:#fff;border:1px solid #cde7dd;border-radius:9px;padding:6px 10px;color:#0c7263;font:700 11px Vazirmatn,Tahoma,sans-serif;white-space:nowrap}
#md223-desk .md223-photo-guide button[aria-pressed="true"]{background:#e4f6ef;border-color:#90d2bd}
#md223-desk .md223-tool-list{background:#fff;border:1px solid #dceee7;border-radius:15px;padding:10px 12px}
#md223-desk .md223-tool-list>strong{display:block;color:#16534a;font-size:12px;margin-bottom:9px}
#md223-desk .md223-tool-chips{display:flex;flex-wrap:wrap;gap:7px;max-height:95px;overflow:auto;scrollbar-width:thin}
#md223-desk .md223-tool-chip{border:1px solid #d8e9e2;background:#f8fcfa;color:#1e675c;border-radius:9px;font:700 11px Vazirmatn,Tahoma,sans-serif;padding:6px 10px;min-height:30px}
#md223-desk .md223-tool-chip:hover,#md223-desk .md223-tool-chip:focus-visible{background:#e8f8f1;border-color:#65bea7}
#md223-desk .md223-tool-chip.is-active{background:#0a7868;color:white;border-color:#0a7868}
#md223-desk .md223-panel{max-height:none;height:auto;min-height:320px;max-height:480px}
@media(max-width:1180px){#md223-desk .md223-photo{height:auto;aspect-ratio:1350/724}#md223-desk .md223-panel{min-height:0;max-height:420px}}
@media(max-width:600px){#md223-desk .md223-photo{height:auto;aspect-ratio:1350/724}#md223-desk .md223-tool-chips{max-height:130px}#md223-desk .md223-panel{max-height:none}#md223-desk .md223-cursor-hint{max-width:170px;padding:7px 9px;font-size:10px}}

/* Compact saved lists and correct non-dedicated photo crops. */
#md223-desk .md223-photo.md223-generic-photo>img{object-fit:cover}
#md223-desk .md223-bottom-grid{display:block;margin-top:10px}
#md223-desk .md223-scene-saved{padding:10px 14px;border-radius:14px;box-shadow:none}
#md223-desk .md223-scene-saved summary{cursor:pointer;display:flex;align-items:center;gap:10px;color:#0a6e61;font-size:12px;font-weight:800}
#md223-desk .md223-scene-saved summary span{font-size:10px;font-weight:500;color:#7b968e}
#md223-desk .md223-scene-saved .md223-saved-box{margin-top:9px}

/* V240: no on-image tooltip or hover/selection outlines; only invisible hit testing remains. */
#md223-desk .md223-region-svg,#md223-desk .md223-zone-tooltip{display:none!important}
#md223-desk .md223-cursor-hint{display:flex;position:absolute;z-index:6;pointer-events:none;max-width:220px;min-width:145px;min-height:0;left:8px;top:8px}
#md223-desk .md223-cursor-hint[hidden]{display:none!important}
#md223-desk .md223-photo.md223-has-hit{cursor:pointer}
#md223-desk #md223-guide-copy{min-width:0;white-space:normal}

/* V247 — single-viewport, side-by-side tabbed workspace */
@media(min-width:901px){
 #md223-desk{height:clamp(425px,calc(100dvh - 106px),650px);min-height:0;max-height:calc(100dvh - 92px);margin:15px 0 18px;padding:13px 16px;display:flex;flex-direction:column;gap:9px;overflow:hidden;scroll-margin-top:86px}
 #md223-desk .md223-intro{flex:none;min-height:0;margin:0;align-items:center;gap:12px}
 #md223-desk .md223-intro h2{font-size:clamp(18px,1.65vw,24px);margin:0 0 2px;line-height:1.55}
 #md223-desk .md223-eyebrow{font-size:9px;line-height:1.4}
 #md223-desk .md223-intro p{font-size:11px;line-height:1.6;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
 #md223-desk .md223-intro-count{flex:none;font-size:11px;font-weight:800;color:#117465;border:1px solid #d6eee5;background:#fff;border-radius:999px;padding:6px 11px}
 #md223-desk .md223-tabs{margin:0;display:flex;flex:none;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;min-height:37px;gap:7px;padding:1px 0 3px}
 #md223-desk .md223-tab{flex:none;white-space:nowrap;padding:7px 13px;font-size:11px;line-height:1.7}
 #md223-desk .md223-workspace{flex:1;min-height:0;height:auto;display:grid;grid-template-columns:minmax(0,1.65fr) minmax(315px,1fr);align-items:stretch;gap:13px}
 #md223-desk .md223-photo-wrap{display:block;min-width:0;height:100%;min-height:0}
 #md223-desk .md223-photo{width:100%;height:100%;min-height:0;aspect-ratio:auto;border-radius:17px}
 #md223-desk .md223-photo>img,#md223-desk .md223-photo.md223-generic-photo>img{object-fit:contain!important;object-position:center center!important}
}
#md223-desk .md223-intro-count{font-size:11px;font-weight:800;color:#117465;white-space:nowrap}
#md223-desk .md223-side{height:100%;min-height:0;min-width:0;display:flex;flex-direction:column;background:#fff;border:1px solid #dceee8;border-radius:17px;overflow:hidden;box-shadow:0 7px 24px rgba(0,65,53,.05)}
#md223-desk .md223-side-tabs{display:flex;flex:none;gap:5px;background:#f6faf8;padding:8px;border-bottom:1px solid #e2efe9}
#md223-desk .md223-side-tab{flex:1;min-width:0;border:1px solid transparent;border-radius:10px;background:transparent;color:#44766d;font:800 11px Vazirmatn,Tahoma,sans-serif;padding:10px 5px;line-height:1.4;white-space:nowrap;cursor:pointer}
#md223-desk .md223-side-tab:hover{background:#edf7f2;color:#046b5b}
#md223-desk .md223-side-tab.is-active{background:#087e6c;color:white;box-shadow:0 3px 9px rgba(3,99,77,.14)}
#md223-desk .md223-side-pane{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:15px;scrollbar-width:thin;scrollbar-color:#c9e4db transparent}
#md223-desk .md223-side-pane[hidden]{display:none!important}
#md223-desk .md223-panel{border:0;border-radius:0;box-shadow:none;display:block;padding:15px;height:auto;min-height:0;max-height:none}
#md223-desk #md223-panel{display:flex;flex-direction:column;gap:12px}
#md223-desk .md223-tools-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px;color:#075c50;font-size:13px}
#md223-desk .md223-tools-head span{color:#568178;font-size:11px;border:1px solid #e0efe9;padding:3px 9px;border-radius:999px}
#md223-desk .md223-tools-help{color:#6c8a82;font-size:11px;line-height:1.9;margin:0 0 12px}
#md223-desk .md223-tool-chips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:none!important;overflow:visible!important}
#md223-desk .md223-tool-chip{min-height:39px;line-height:1.7;text-align:right;white-space:normal;padding:7px 10px;border-radius:11px}
#md223-desk .md223-saved-pane h3{margin:0 0 6px;color:#0a6657;font-size:16px}
#md223-desk .md223-saved-item{align-items:flex-start;flex-direction:column}
#md223-desk .md223-saved-actions{justify-content:flex-start}
#md223-desk .md223-bundle-box{flex-direction:column}
#md223-desk .md223-bundle-side{align-items:stretch;width:100%;white-space:normal}
#md223-desk .md223-bundle-actions{flex-direction:row;flex-wrap:wrap;min-width:0}
#md223-desk .md223-bundle-actions button{flex:1 1 115px}
@media(max-width:900px){
 #md223-desk{height:auto;max-height:none;display:block;overflow:visible;padding:14px;margin:20px 0;scroll-margin-top:68px}
 #md223-desk .md223-intro{margin-bottom:12px}
 #md223-desk .md223-intro-count{display:none}
 #md223-desk .md223-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px;max-width:100%;margin:0 0 13px;scrollbar-width:thin}
 #md223-desk .md223-tab{flex:none;white-space:nowrap}
 #md223-desk .md223-workspace{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
 #md223-desk .md223-photo-wrap{width:100%}
 #md223-desk .md223-photo{width:100%;height:auto;aspect-ratio:1350/724}
 #md223-desk .md223-photo>img,#md223-desk .md223-photo.md223-generic-photo>img{object-fit:contain!important;object-position:center!important}
 #md223-desk .md223-side{height:370px;max-height:60vh;min-height:270px}
}
@media(max-width:560px){
 #md223-desk .md223-intro h2{font-size:19px}
 #md223-desk .md223-intro p{font-size:11px}
 #md223-desk .md223-side{height:385px;max-height:none}
 #md223-desk .md223-side-tab{font-size:10px;padding:9px 4px}
 #md223-desk .md223-side-pane{padding:10px}
 #md223-desk .md223-tool-chip{font-size:10px;padding:7px 8px}
}
@media(max-height:610px) and (min-width:901px){
 #md223-desk{height:calc(100dvh - 82px);max-height:calc(100dvh - 82px);padding:8px 11px;gap:5px}
 #md223-desk .md223-intro p{display:none}
 #md223-desk .md223-intro h2{font-size:18px}
 #md223-desk .md223-side-tabs{padding:5px}
 #md223-desk .md223-side-tab{padding:7px 4px}
}
/* Fit the image naturally; avoid unnecessary bands above and below it. */
@media(min-width:901px){
 #md223-desk{height:auto;max-height:none}
 #md223-desk .md223-workspace{flex:none;height:auto;align-items:stretch}
 #md223-desk .md223-photo-wrap{height:auto;aspect-ratio:1350/724;max-height:min(470px,calc(100dvh - 224px))}
 #md223-desk .md223-photo{height:100%;aspect-ratio:auto}
}
@media(min-width:901px){
 #md223-desk .md223-photo-wrap{aspect-ratio:auto!important;width:100%;min-width:0;height:min(32vw,calc(100dvh - 225px),460px);max-height:none}
 #md223-desk .md223-photo{height:100%;min-height:0;width:100%}
}
@media(min-width:901px){
 #md223-desk .md223-workspace{height:min(32vw,calc(100dvh - 225px),460px)!important;min-height:0;grid-template-rows:minmax(0,1fr)}
 #md223-desk .md223-photo-wrap{height:100%!important}
 #md223-desk .md223-side{height:100%;max-height:100%;min-height:0}
}


/* V248 - One-glance dental desk: single compact toolbar, no inherited height conflict. */
@media(min-width:901px){
 #md223-desk{
  --md248-work-height:max(190px,min(390px,calc(100dvh - 205px),calc((100vw - 92px) * .316)));
  position:relative;
  display:grid!important;
  grid-template-rows:42px minmax(0,var(--md248-work-height))!important;
  align-content:start!important;
  gap:10px!important;
  box-sizing:border-box;
  height:auto!important;min-height:0!important;max-height:none!important;
  margin:12px 0 16px!important;padding:11px!important;
  border-radius:20px;
  overflow:visible!important;
  scroll-margin-top:clamp(72px,11vh,140px);
 }
 #md223-desk .md248-toolbar{display:flex;align-items:center;gap:12px;min-height:0;max-height:42px}
 #md223-desk .md248-label{display:flex;flex-direction:column;justify-content:center;flex:none;min-width:100px}
 #md223-desk .md248-label strong{font-size:13px;color:#075b50;white-space:nowrap;line-height:1.4}
 #md223-desk .md248-label span{font-size:10px;color:#7d9690;white-space:nowrap;line-height:1.5}
 #md223-desk .md223-tabs{display:flex;flex:1;min-width:0;min-height:0;max-height:42px;align-items:center;gap:5px;margin:0!important;padding:0 2px!important;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;white-space:nowrap}
 #md223-desk .md223-tabs::-webkit-scrollbar{display:none}
 #md223-desk .md223-tab{font-size:11px;min-height:32px;padding:6px 11px;line-height:1.4;flex:none;border-radius:999px}
 #md223-desk .md248-focus{flex:none;display:inline-flex;align-items:center;gap:6px;background:#f7fcfa;color:#12695e;font-size:11px;font-weight:800;border:1px solid #d5ebe3;border-radius:10px;padding:7px 11px;white-space:nowrap;min-height:31px}
 #md223-desk .md248-focus:hover{background:#e8f7f0}
 #md223-desk .md223-workspace{
  width:100%;height:var(--md248-work-height)!important;max-height:var(--md248-work-height)!important;
  min-height:0;display:grid;grid-template-columns:minmax(0,min(59%,calc(var(--md248-work-height) * 1.865))) minmax(0,1fr);
  grid-template-rows:minmax(0,1fr);gap:11px!important;align-items:stretch;margin:0;
 }
 #md223-desk .md223-photo-wrap{display:block;width:100%;height:100%!important;max-height:none!important;min-height:0!important;aspect-ratio:auto!important}
 #md223-desk .md223-photo{width:100%;height:100%!important;max-height:100%!important;min-height:0!important;aspect-ratio:auto!important;border-radius:15px}
 #md223-desk .md223-photo>img{width:100%!important;height:100%!important;object-fit:fill!important;object-position:center!important}
 #md223-desk .md223-side{height:100%!important;min-height:0;max-height:100%!important;border-radius:15px}
 #md223-desk .md223-side-tabs{height:43px;padding:5px;gap:4px}
 #md223-desk .md223-side-tab{font-size:11px;padding:6px 3px;border-radius:9px}
 #md223-desk .md223-side-pane{padding:10px 12px;overflow-y:auto;overscroll-behavior:contain}
 #md223-desk .md223-tools-head{margin:0 0 5px}
 #md223-desk .md223-tools-help{font-size:10px;line-height:1.65;margin-bottom:8px}
 #md223-desk .md223-tool-chips{gap:6px!important}
 #md223-desk .md223-tool-chip{min-height:34px!important;padding:5px 9px!important;font-size:11px!important;line-height:1.55}
 #md223-desk .md223-panel{padding:10px 12px!important;max-height:none!important;min-height:0!important;height:100%!important}
}
#md223-desk .md248-toolbar{display:flex;align-items:center;gap:10px}
#md223-desk .md248-focus{cursor:pointer}
@media(max-width:900px){
 #md223-desk{height:auto!important;max-height:none!important;overflow:visible!important}
 #md223-desk .md248-toolbar{display:block}
 #md223-desk .md248-label{display:flex;gap:6px;align-items:center;margin-bottom:9px;font-size:13px}
 #md223-desk .md248-label span{color:#7a9990;font-size:10px}
 #md223-desk .md223-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px;white-space:nowrap}
 #md223-desk .md248-focus{display:none}
 #md223-desk .md223-photo{height:auto!important;aspect-ratio:1350/724!important}
}
/* Keep the global shopping assistant available elsewhere, never on top of the tool workspace. */
@media(min-width:901px){html.md248-desk-visible body:has(#md223-desk) #md-chat-root:not(:has(.md-chat-panel.open)){opacity:0;pointer-events:none;transition:opacity .15s ease}}

/* V249: dynamically fit the ENTIRE desk to the actually visible browser viewport. */
@media (min-width:901px){
 #md223-desk{
  --md248-work-height:var(--md249-work-height, 270px)!important;
  height:calc(var(--md249-work-height,270px) + 61px)!important;
  max-height:calc(100dvh - 8px)!important;
  min-height:0!important;
  display:grid!important;
  grid-template-rows:40px minmax(0, 1fr)!important;
  gap:7px!important;
  padding:7px!important;
  margin:5px 0!important;
  overflow:hidden!important;
 }
 #md223-desk .md248-toolbar{height:40px!important;min-height:0!important;max-height:40px!important;overflow:hidden}
 #md223-desk .md223-workspace{height:100%!important;max-height:100%!important;min-height:0!important;grid-template-rows:minmax(0,1fr)!important;overflow:hidden}
 #md223-desk .md223-photo-wrap,#md223-desk .md223-side{height:100%!important;max-height:100%!important;min-height:0!important;overflow:hidden}
 #md223-desk .md223-photo{height:100%!important;min-height:0!important;max-height:100%!important}
 #md223-desk .md223-side-pane{min-height:0;overflow-y:auto!important}
}
