/* Stable editing shell: one live card, independently scrolling controls. */
body{font-family:Inter,Vazirmatn,sans-serif;font-size:14px;line-height:1.6}
body[data-ui-locale=fa]{font-family:Vazirmatn,Inter,sans-serif}
.afghanMedia{direction:inherit;font-family:inherit}
.mediaNetwork,.mediaNetworkInfo small,.mediaEnglish,.mediaHeading small{text-align:start}
.mediaNetworkInfo small,.mediaEnglish{display:none}
.mediaLayout{direction:inherit}
.cardLanguageRow{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px;font-size:12px}
.cardLanguageRow select{border:1px solid var(--line);border-radius:8px;padding:6px;background:#fff;color:var(--ink);max-width:150px}
#studioReferences{display:none;max-width:1100px;margin:auto;padding:28px 20px}
body[data-studio-page=references] #studioReferences{display:block}
body[data-studio-page=references] .workspace,body[data-studio-page=references] .mobileDock{display:none!important}
.referenceCards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.referenceCards article{background:white;border:1px solid var(--line);border-radius:12px;padding:18px}
#expandPreview{align-self:center;margin:4px auto}
@media(min-width:1101px){
 body[data-studio-page=workspace] .workspace{height:calc(100dvh - 114px);min-height:0;overflow:hidden}
 .workspace .stage,.workspace .settings,.workspace .gallery{height:100%;max-height:100%;overflow-y:auto}
 .workspace .stage{position:relative}
 #expandPreview{display:none}
}
@media(max-width:1100px){
 :root{--dock:68px;--live-preview-height:clamp(150px,29dvh,245px)}
 header{height:54px!important}
 header .brand{gap:6px}header h1{font-size:12px!important}header .studioHomeBtn{padding:5px;font-size:10px}
 header .logoMark{display:none}header .actions{gap:4px}header small{max-width:160px;font-size:9px}
 .studioNav{height:46px;min-height:46px}
 body[data-studio-page=workspace]{height:100dvh;overflow:hidden}
 body[data-studio-page=workspace] .workspace{display:flex!important;flex-direction:column;height:calc(100dvh - 100px - var(--dock) - env(safe-area-inset-bottom));min-height:0;overflow:hidden}
 .workspace .stage{display:flex!important;order:-1;flex:none;height:var(--live-preview-height);min-height:0;padding:5px 8px!important;border-bottom:1px solid var(--line);position:relative;overflow:hidden;background:#edf2ef}
 .workspace .stage .guideBar,.workspace .stage .stageFooter,.workspace .stage .stageHint,.workspace .stage .mediaBackLink,.workspace .stage .previewZoom,.workspace .stage .stageBar .muted{display:none!important}
 .workspace .stageBar{height:32px;min-height:32px;flex-wrap:nowrap;margin:0;gap:8px}
 .workspace .stageBar h2{font-size:10px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:190px}
 .workspace .faceSwitch{padding:1px}.workspace .faceSwitch button{padding:3px 10px;min-height:30px;font-size:11px}
 .workspace .previewWrap{display:flex;flex:1;min-height:0;height:calc(100% - 38px);align-items:center;justify-content:center}
 .workspace .previewWrap .face{height:100%;width:100%;min-height:0;flex:none}
 .workspace .previewWrap .face h3{display:none}
 .workspace .previewWrap .face>div{height:100%;display:flex;align-items:center;justify-content:center}
 .workspace .previewWrap svg.cardSvg{height:100%!important;width:auto!important;max-width:95%;max-height:100%;object-fit:contain;border-radius:4px}
 .workspace #expandPreview{position:absolute;bottom:5px;inset-inline-end:8px;margin:0;min-height:30px;font-size:10px;padding:4px 7px}
 .workspace .gallery,.workspace .settings{flex:1;min-height:0!important;height:auto!important;max-height:none!important;overflow-y:auto!important;overscroll-behavior:contain;scroll-padding-top:110px}
 .workspace .settingsHead{position:sticky;top:0;background:#fff;z-index:10}
 .workspace .settingsBody{padding-bottom:28px!important}
 .mobileDock{direction:inherit!important;display:grid;grid-template-columns:repeat(4,minmax(0,1fr))!important;left:0!important;right:0!important;bottom:0!important;border-radius:0!important;height:calc(var(--dock) + env(safe-area-inset-bottom))!important;padding:4px 6px calc(4px + env(safe-area-inset-bottom))!important}
 .mobileDock button{min-height:48px!important;border-radius:9px!important}
 body.previewExpanded .workspace .stage{height:100%;flex:1}
 body.previewExpanded .workspace .gallery,body.previewExpanded .workspace .settings{display:none!important}
 .referenceCards{grid-template-columns:1fr}
 .mediaDetail{scroll-margin-top:12px}
}
@media(max-height:520px) and (max-width:1100px){:root{--live-preview-height:130px}.workspace .stageBar{height:27px;min-height:27px}}
@media print{#studioReferences,#expandPreview,.cardLanguageRow{display:none!important}body{height:auto!important;overflow:visible!important}}

