@font-face{font-family:'Aref Ruqaa';src:url('fonts/ArefRuqaa-Regular.ttf') format('truetype');font-display:swap}@font-face{font-family:Katibeh;src:url('fonts/Katibeh-Regular.ttf') format('truetype');font-display:swap}@font-face{font-family:Lalezar;src:url('fonts/Lalezar-Regular.ttf') format('truetype');font-display:swap}
/* Quran Video Studio 6.0 - simplified responsive layout.
   Loaded last. Layout and look only: no change to app logic, tools or features.
   Desktop: tools 15% | video preview 40% (centre) | tool settings 45%. */
:root{--v6-r:18px;--v6-shadow:0 10px 30px rgba(20,50,35,.07)}
body[data-theme="dark"]{--v6-shadow:0 10px 30px rgba(0,0,0,.35)}
body .page{max-width:1760px!important;padding:10px clamp(8px,1.4vw,22px) 20px!important}

/* ---- header: one slim line ---- */
body .site-header{height:56px!important;min-height:56px!important;margin:0 0 8px!important;border-radius:var(--v6-r)!important;box-shadow:var(--v6-shadow)!important}
body .site-header .brand .sub{display:none!important}
body .site-header .brand h1{font-size:16px!important}
body .header-link{padding:8px 12px!important;font-size:12px!important;border-radius:999px!important}
body .header-actions select{font-size:12px!important}

/* ---- top bar: video size + export ---- */
body .global-commandbar{border-radius:var(--v6-r)!important;box-shadow:var(--v6-shadow)!important;margin:0 0 10px!important;overflow:visible!important}
body .global-commandbar .commandbar-caption{display:none!important}
body .global-format-section,body .global-commandbar .ratio-quickbar{min-width:0!important}
body .ratio-option{border-radius:999px!important}
body .ratio-option[aria-pressed="true"],body .ratio-option.active{background:var(--v5-green)!important;color:#fff!important;border-color:var(--v5-green)!important}
body .ratio-option[aria-pressed="true"] *,body .ratio-option.active *{color:#fff!important}
body .export-command-button,body .export-main{border-radius:999px!important;font-weight:800!important}

/* ---- studio workspace ---- */
body .studio-grid.v5-workspace{display:grid!important;direction:rtl!important;gap:12px!important;align-items:stretch!important;
  grid-template-columns:15fr 40fr 45fr!important;grid-template-areas:"tools preview settings"!important;
  height:calc(100dvh - 150px)!important;min-height:560px!important}
body .studio-grid.v5-workspace>.panel,body .studio-grid.v5-workspace>.settings-rail{border-radius:var(--v6-r)!important;box-shadow:var(--v6-shadow)!important;border:1px solid var(--v5-line)!important;background:var(--v5-surface)!important;min-width:0!important;min-height:0!important;position:static!important;max-height:none!important;width:auto!important;margin:0!important}
body .studio-grid.v5-workspace>.settings-rail{grid-area:tools!important;padding:12px 10px!important;overflow:auto!important;display:flex!important;flex-direction:column!important;gap:8px!important}
body .studio-grid.v5-workspace>.preview{grid-area:preview!important;overflow:auto!important;padding:14px!important}
body .studio-grid.v5-workspace>.controls{grid-area:settings!important;overflow:auto!important;padding:18px 20px!important;min-height:0!important}
body .settings-rail .rail-heading{font-size:12px!important;color:var(--v5-muted)!important;text-align:center!important;padding:0 0 4px!important}
body .settings-rail .settings-nav{display:flex!important;flex-direction:column!important;gap:6px!important}
body .settings-rail .settings-tab{display:flex!important;align-items:center!important;gap:10px!important;width:100%!important;min-height:46px!important;padding:8px 12px!important;border-radius:14px!important;font-size:14px!important;font-weight:700!important;text-align:start!important;justify-content:flex-start!important}
body .settings-rail .settings-tab.active,body .settings-rail .settings-tab[aria-pressed="true"]{background:var(--v5-green)!important;color:#fff!important;border-color:var(--v5-green)!important;box-shadow:0 6px 16px rgba(22,118,77,.28)!important}
body .settings-rail .settings-tab.active *,body .settings-rail .settings-tab[aria-pressed="true"] *{color:#fff!important}
body .settings-rail .settings-tab:hover:not(.active){background:var(--v5-surface3)!important}
body .rail-collapse,body .panel-collapse,body .restore-row{display:none!important}
body .inspector-heading{display:none!important}
body .controls .pane-heading{font-size:18px!important;padding:0 0 12px!important;margin-bottom:10px!important;border-bottom:1px solid var(--v5-line)!important}
body .controls .editor-section{border-radius:14px!important}
body .controls select,body .controls input[type=number],body .controls input[type=text],body .controls textarea{border-radius:12px!important;min-height:42px}

/* preview column */
body .preview .preview-head{gap:8px!important;margin-bottom:10px!important}
body .preview .preview-head h2{font-size:15px!important}
body .preview .preview-viewport,body .preview #stage{border-radius:14px!important}
body .preview .stage{box-shadow:0 8px 26px rgba(0,0,0,.25)!important}
body .preview .timeline-control{border-radius:14px!important}
body .preview .clip-transport button{min-height:44px!important;border-radius:12px!important}
body .accuracy-note{margin:10px 0 0!important}
body .footer{margin-top:10px!important;font-size:11px!important}

/* ---- tablet: preview on top, tools bar, settings ---- */
@media (max-width:1099px){
  body .studio-grid.v5-workspace{height:auto!important;min-height:0!important;grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"preview" "tools" "settings"!important}
  body .studio-grid.v5-workspace>.preview{overflow:visible!important;padding:12px!important}
  body .studio-grid.v5-workspace>.preview .preview-viewport{max-width:720px!important;margin-inline:auto!important}
  body .studio-grid.v5-workspace>.settings-rail{padding:8px!important;overflow:visible!important;flex-direction:row!important;position:sticky!important;top:0!important;z-index:40!important}
  body .settings-rail .rail-heading{display:none!important}
  body .settings-rail .settings-nav{flex-direction:row!important;overflow-x:auto!important;scrollbar-width:none!important;gap:6px!important;width:100%!important;padding:2px!important}
  body .settings-rail .settings-nav::-webkit-scrollbar{display:none}
  body .settings-rail .settings-tab{flex:0 0 auto!important;width:auto!important;min-height:44px!important;padding:8px 16px!important;white-space:nowrap!important;border-radius:999px!important}
  body .studio-grid.v5-workspace>.controls{overflow:visible!important;padding:16px!important;min-height:300px!important}
}
/* ---- phone ---- */
@media (max-width:600px){
  body .page{padding:6px 6px 16px!important}
  body .site-header{height:auto!important;min-height:50px!important;padding:6px 8px!important}
  body .site-header .brand h1{font-size:14px!important}
  body .header-links .header-link{padding:8px!important;font-size:0!important}
  body .header-links .header-link .header-link-icon{font-size:17px!important}
  body .header-actions select{max-width:84px!important}
  body .global-commandbar{display:flex!important;flex-wrap:wrap!important;gap:6px!important;padding:6px!important}
  body .global-commandbar .ratio-quickbar{overflow-x:auto!important;flex-wrap:nowrap!important;scrollbar-width:none!important}
  body .studio-grid.v5-workspace{gap:8px!important}
  body .studio-grid.v5-workspace>.preview{padding:8px!important}
  body .studio-grid.v5-workspace>.controls{padding:12px!important}
  body .preview .preview-head{flex-wrap:wrap!important}
  body .controls .row{grid-template-columns:1fr 1fr!important}
}
/* keep the 16px-field rule for phones so iOS does not zoom */
@media (max-width:820px){body .controls input,body .controls select,body .controls textarea{font-size:16px!important}}

/* ---- alignment + polish fixes ---- */
body #studioView,body .studio-view,body #homeView{margin-inline:0!important;width:auto!important;max-width:none!important;padding-inline:0!important;box-sizing:border-box!important}
body .site-header{margin-inline:0!important}
body .accuracy-note>summary{background:var(--v5-surface2)!important;color:var(--v5-ink)!important;border:1px solid var(--v5-line)!important;border-radius:12px!important;padding:12px 14px!important;font-size:13px!important}
body .accuracy-note{background:transparent!important;border:0!important;box-shadow:none!important}
@media (max-width:600px){
  body .site-header{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:space-between!important;gap:6px!important;height:52px!important}
  body .site-header .brand h1{font-size:13px!important;white-space:nowrap!important}
  body .header-links{display:flex!important;gap:2px!important}
  body .header-links .header-link{font-size:0!important;padding:0!important;width:36px!important;height:36px!important;min-height:36px!important;display:grid!important;place-items:center!important}
  body .header-actions{gap:4px!important}
  body .header-actions select{font-size:11px!important;min-height:36px!important;max-width:72px!important;padding:4px!important}
  body .header-actions .icon-btn{width:34px!important;min-height:36px!important;height:36px!important;padding:0!important}
  body .brand-mark{width:32px!important;height:32px!important;font-size:18px!important}
  body .global-commandbar .ratio-option{min-height:38px!important;padding:4px 10px!important;flex:0 0 auto!important}
  body .settings-rail .settings-tab{min-height:40px!important;padding:6px 14px!important;font-size:13px!important}
  body .settings-rail .settings-tab .tab-icon,body .settings-rail .settings-tab>span:first-child:not(:last-child){display:none!important}
}
body #studioView>*{margin-inline:clamp(8px,1.4vw,22px)!important}
body #studioView>.studio-grid,body #studioView>.global-commandbar{width:auto!important}
@media (max-width:600px){body #studioView>*{margin-inline:6px!important}}

/* ---- preview size ---- */
body .preview .preview-viewport{padding:8px!important;overflow:hidden!important}
@media (min-width:1100px){body .preview .preview-viewport{height:clamp(300px,50vh,620px)!important}}
@media (min-width:601px) and (max-width:1099px){body .preview .preview-viewport{height:clamp(300px,46vh,520px)!important}}
@media (max-width:600px){
  body .preview .preview-viewport{height:clamp(220px,36vh,400px)!important}
  body .header-links{display:none!important}
  body .site-header .header-actions{flex-wrap:nowrap!important;margin-inline-start:auto!important}
  body .site-header .brand{flex:1 1 auto!important;min-width:0!important}
  body .site-header .brand>div:last-child{min-width:0!important}
  body .site-header .brand h1{overflow:hidden!important;text-overflow:ellipsis!important}
  body .header-actions #interfaceLanguage{max-width:78px!important}
  body .header-actions .theme-select{max-width:86px!important}
}
@media (max-width:600px){
  body .header-actions #interfaceLanguage{max-width:64px!important;padding-inline:4px!important}
  body .header-actions .theme-select{max-width:66px!important;padding-inline:4px!important}
  body .header-actions .icon-btn{width:32px!important}
  body .site-header .brand h1{font-size:12px!important;direction:ltr!important}
}

/* ======== v6.1 revisions ======== */
/* 1) Text and elements in the preview can be DRAGGED to move, but cannot be resized there:
      resize handles are hidden. Size stays in the settings panel. */
body .stage .layer-resize-handle,body .stage .mask-handle,body .stage .ruler{display:none!important}
body .stage .layer{cursor:move!important}
body .stage .layer.selected,body .stage .layer.dragging{outline:1px dashed rgba(22,118,77,.8)!important;outline-offset:3px}
body .stage .layer:not(.selected):not(.dragging){outline:none!important}
body .stage .logo-layer,body .stage .mask-layer{border:0!important}
body .stage{touch-action:none}
/* 2) Desktop split: tools 15% | preview 55% | settings 30% */
@media (min-width:1100px){
  body .studio-grid.v5-workspace{grid-template-columns:15fr 55fr 30fr!important}
  body .preview .preview-viewport{height:clamp(340px,60vh,720px)!important}
}
/* 3) Simpler, tidier */
body .preview .preview-head{border-bottom:1px solid var(--v5-line);padding-bottom:10px}
body .preview .clip-badge{display:none!important}
body .controls .hint{font-size:12px!important;opacity:.85}
body .controls .field{margin-bottom:14px!important}
body .controls label{font-size:13px!important;font-weight:700!important}
body .controls .editor-section{background:var(--v5-surface2)!important;border:1px solid var(--v5-line)!important;margin-top:12px!important;padding:12px 14px!important}
body .controls .editor-section>summary{font-size:14px!important}
body .global-commandbar{padding:8px 12px!important}
body .global-commandbar .dimensions-chip,body #canvasDimensionsLabel{background:var(--v5-surface3)!important;color:var(--v5-ink)!important;border:0!important;border-radius:999px!important}
@media (min-width:1100px) and (max-width:1399px){body .settings-rail .settings-tab{font-size:13px!important;padding:8px!important}}
@media (min-width:1100px){
  body .preview .preview-viewport{height:clamp(360px,62vh,760px)!important;min-height:360px!important;max-height:none!important}
}
@media (min-width:601px) and (max-width:1099px){
  body .preview .preview-viewport{height:clamp(300px,46vh,520px)!important;min-height:300px!important;max-height:none!important}
}
@media (max-width:600px){
  body .preview .preview-viewport{height:clamp(220px,36vh,400px)!important;min-height:220px!important;max-height:none!important}
}
@media (min-width:1100px){body .preview .preview-viewport{height:clamp(340px,52vh,700px)!important;min-height:340px!important}}

/* ======== v6.3: clean dimensions + export bar ======== */
body .global-commandbar{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto auto auto auto!important;grid-auto-flow:row!important;align-items:center!important;gap:8px 10px!important;padding:10px 12px!important;position:static!important;background:var(--v5-surface)!important}
body .global-commandbar .global-format-section,body .global-commandbar .command-export,body .global-commandbar .quickbar-actions,body .global-commandbar .ai-review-notice{display:contents!important}
body .global-commandbar .commandbar-caption,body .global-commandbar .format-heading,body .global-commandbar .command-export>.hint,body .global-commandbar .ratio-select-source{display:none!important}
/* ratio buttons as one segmented control */
body .global-commandbar .ratio-quickbar{grid-column:1;order:1;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:4px!important;padding:4px!important;background:var(--v5-surface3)!important;border-radius:14px!important;overflow:visible!important;flex-wrap:nowrap!important;min-width:0!important}
body .global-commandbar .ratio-option{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;gap:6px!important;min-height:38px!important;height:auto!important;padding:4px 8px!important;border:0!important;border-radius:11px!important;background:transparent!important;color:var(--v5-ink)!important;font-size:13px!important;font-weight:800!important;box-shadow:none!important;width:auto!important;flex:none!important}
body .global-commandbar .ratio-option .ratio-icon{font-size:15px!important}
body .global-commandbar .ratio-option .ratio-label{font-size:13px!important}
body .global-commandbar .ratio-option[aria-pressed="true"],body .global-commandbar .ratio-option.active{background:var(--v5-green)!important;color:#fff!important}
body .global-commandbar #canvasDimensionsLabel{order:2;grid-column:2;font-size:12px!important;white-space:nowrap!important;padding:9px 12px!important;text-align:center!important;margin:0!important}
body .global-commandbar .format-quality-details{order:3;grid-column:3;position:relative!important;margin:0!important}
body .global-commandbar .format-quality-details>summary{display:flex!important;align-items:center!important;justify-content:center!important;min-height:40px!important;padding:6px 12px!important;border:1px solid var(--v5-line)!important;border-radius:12px!important;background:var(--v5-surface2)!important;color:var(--v5-ink)!important;font-size:13px!important;font-weight:700!important;white-space:nowrap!important;cursor:pointer;list-style:none}
body .global-commandbar .format-quality-details>summary::-webkit-details-marker{display:none}
body .global-commandbar .sync-review-toggle{order:4;grid-column:4;min-height:40px!important;margin:0!important;white-space:nowrap!important;border-radius:12px!important;font-size:13px!important}
body .global-commandbar .notice-toggle{order:5;grid-column:5;min-height:40px!important;margin:0!important;white-space:nowrap!important;border-radius:12px!important;font-size:13px!important}
body .global-commandbar #exportBtn{order:6;grid-column:6;min-height:42px!important;padding:8px 22px!important;border-radius:12px!important;background:var(--v5-green)!important;color:#fff!important;border:0!important;font-size:14px!important;font-weight:800!important;white-space:nowrap!important;margin:0!important;box-shadow:0 6px 14px rgba(22,118,77,.25)!important}
body .global-commandbar #exportBtn:disabled{opacity:.45!important;box-shadow:none!important;background:var(--v5-green)!important;color:#fff!important}
body .global-commandbar #cancelExportBtn{order:7;grid-column:6;min-height:36px!important;border-radius:12px!important}
body .global-commandbar #cancelExportBtn:disabled{display:none!important}
body .global-commandbar .format-reset-icon{display:none!important}
body .global-commandbar #customDimensions:not([hidden]){order:8;grid-column:1/-1;display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}
body .global-commandbar #exportProgressBox:not(.hidden){order:9;grid-column:1/-1;display:block!important}
body .global-commandbar .format-quality-details[open]>.row{position:absolute!important;top:calc(100% + 6px)!important;inset-inline-start:0!important;z-index:150!important;min-width:260px!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;padding:12px!important;background:var(--v5-surface)!important;border:1px solid var(--v5-line)!important;border-radius:14px!important;box-shadow:0 14px 34px rgba(0,0,0,.18)!important}
body .global-commandbar .ai-review-notice .notice-message{display:none!important}
body .global-commandbar .ai-review-notice.notice-open .notice-message{display:block!important;grid-column:1/-1;order:10;padding:10px 12px;border-radius:12px;background:var(--v5-surface2);border:1px solid var(--v5-line);font-size:12px;line-height:1.8}

/* tablet: two rows */
@media (max-width:1099px){
  body .global-commandbar{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  body .global-commandbar .ratio-quickbar{grid-column:1/-1}
  body .global-commandbar #canvasDimensionsLabel{grid-column:1;order:2}
  body .global-commandbar .format-quality-details{grid-column:2;order:3}
  body .global-commandbar .sync-review-toggle{grid-column:3;order:4}
  body .global-commandbar .notice-toggle{grid-column:4;order:5}
  body .global-commandbar #exportBtn{grid-column:1/-1;order:6}
  body .global-commandbar #cancelExportBtn{grid-column:1/-1}
  body .global-commandbar .format-quality-details[open]>.row{inset-inline-start:auto;inset-inline-end:0}
}
/* phone: ordered 2-column grid */
@media (max-width:600px){
  body .global-commandbar{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;padding:8px!important}
  body .global-commandbar .ratio-quickbar{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body .global-commandbar .ratio-option{min-height:42px!important}
  body .global-commandbar #canvasDimensionsLabel{grid-column:1/-1;order:2;padding:8px!important}
  body .global-commandbar .format-quality-details{grid-column:1;order:3}
  body .global-commandbar .sync-review-toggle{grid-column:2;order:4}
  body .global-commandbar .notice-toggle{grid-column:1/-1;order:5}
  body .global-commandbar .format-quality-details>summary,body .global-commandbar .sync-review-toggle,body .global-commandbar .notice-toggle{width:100%!important;min-height:44px!important;font-size:13px!important;padding:6px 8px!important}
  body .global-commandbar #exportBtn{grid-column:1/-1;order:6;width:100%!important;min-height:48px!important}
  body .global-commandbar .format-quality-details[open]{grid-column:1/-1}
  body .global-commandbar .format-quality-details[open]>.row{position:static!important;margin-top:8px!important;box-shadow:none!important;min-width:0!important}
}

/* v6.3 fixes: beat the old small-screen rules that shrink these controls */
body .global-commandbar .ratio-option .ratio-label{display:inline!important;font-size:13px!important;line-height:1.2!important}
body .global-commandbar .ratio-option .ratio-icon{display:inline!important}
body .global-commandbar #canvasDimensionsLabel{display:block!important;max-width:none!important;overflow:visible!important;font-size:12px!important;padding:9px 12px!important}
body .global-commandbar .ai-review-notice .notice-toggle{width:auto!important;min-width:0!important;height:auto!important;min-height:40px!important;padding:6px 14px!important;font-size:13px!important;position:static!important;border:1px solid var(--v5-line)!important;background:var(--v5-surface2)!important;color:var(--v5-ink)!important}
body .global-commandbar .ai-review-notice .notice-toggle::before{content:none!important}
body .global-commandbar .sync-review-toggle.sync-top{height:auto!important;min-height:40px!important;min-width:0!important;padding:6px 14px!important;font-size:13px!important}
body .global-commandbar .format-quality-details>summary{height:auto!important;font-size:13px!important}
body .global-commandbar #exportBtn{font-size:14px!important;height:auto!important;width:auto!important;min-width:0!important;text-indent:0!important}
@media (max-width:600px){
  body .global-commandbar .ai-review-notice .notice-toggle,body .global-commandbar .sync-review-toggle.sync-top{width:100%!important;min-height:44px!important}
  body .global-commandbar #exportBtn{width:100%!important;min-height:48px!important}
  body .global-commandbar .ratio-option{flex-direction:column!important;gap:2px!important;padding:4px!important}
  body .global-commandbar .ratio-option .ratio-label{font-size:12px!important}
  body .global-commandbar .ratio-option .ratio-icon{font-size:14px!important}
  body .global-commandbar #canvasDimensionsLabel{font-size:12px!important}
}

/* v6.3: export button, strongest selector so old icon-only rules lose */
body .global-commandbar .global-format-section #exportBtn.export-main{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:auto!important;min-width:150px!important;max-width:none!important;height:auto!important;min-height:44px!important;padding:8px 22px!important;font-size:14px!important;font-weight:800!important;border-radius:12px!important;background:var(--v5-green)!important;color:#fff!important;border:0!important;overflow:visible!important;white-space:nowrap!important;filter:none!important;opacity:1!important}
body .global-commandbar .global-format-section #exportBtn.export-main:disabled{opacity:.5!important;filter:none!important}
body .global-commandbar .global-format-section #exportBtn.export-main::before,body .global-commandbar #exportBtn::before{content:none!important}
@media (max-width:1099px){body .global-commandbar .global-format-section #exportBtn.export-main{width:100%!important;min-height:48px!important}}
body .global-commandbar .format-quality-details>summary{overflow:visible!important;text-overflow:clip!important;max-width:none!important;width:100%!important}
body .global-commandbar .format-quality-details{overflow:visible!important;min-width:0!important;max-width:none!important;width:auto!important}
@media (max-width:600px){body .global-commandbar .format-quality-details>summary{font-size:12px!important;padding:6px 4px!important}}

/* ======== v6.4: compact dimensions + export bar on phones ======== */
@media (max-width:600px){
  body .global-commandbar{grid-template-columns:44px 44px 44px minmax(0,1fr)!important;gap:6px!important;padding:6px!important;margin-bottom:6px!important}
  /* row 1: ratios, one swipeable line */
  body .global-commandbar .ratio-quickbar{grid-column:1/-1!important;order:1!important;display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;gap:4px!important;padding:3px!important;border-radius:12px!important;scrollbar-width:none!important}
  body .global-commandbar .ratio-quickbar::-webkit-scrollbar{display:none}
  body .global-commandbar .ratio-option{flex:1 0 auto!important;flex-direction:row!important;gap:5px!important;min-height:36px!important;padding:4px 12px!important}
  body .global-commandbar .ratio-option .ratio-label{font-size:13px!important}
  /* row 2: three icon buttons + export */
  body .global-commandbar #canvasDimensionsLabel{display:none!important}
  body .global-commandbar .format-quality-details{grid-column:1!important;order:2!important}
  body .global-commandbar .sync-review-toggle.sync-top{grid-column:2!important;order:3!important}
  body .global-commandbar .ai-review-notice .notice-toggle{grid-column:3!important;order:4!important}
  body .global-commandbar .global-format-section #exportBtn.export-main{grid-column:4!important;order:5!important;width:100%!important;min-width:0!important;min-height:44px!important;padding:6px 8px!important;font-size:14px!important}
  body .global-commandbar .format-quality-details>summary,
  body .global-commandbar .ai-review-notice .notice-toggle,
  body .global-commandbar .sync-review-toggle.sync-top{font-size:0!important;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;display:flex!important;align-items:center!important;justify-content:center!important}
  body .global-commandbar .format-quality-details>summary::before{content:"\2699";font-size:20px}
  body .global-commandbar .sync-review-toggle.sync-top::before{content:"\2637";font-size:20px}
  body .global-commandbar .ai-review-notice .notice-toggle::before{content:"\24D8"!important;font-size:20px!important}
  body .global-commandbar .format-quality-details[open]{grid-column:1/-1!important;order:6!important}
  body .global-commandbar .format-quality-details[open]>summary{width:44px!important}
  body .global-commandbar #customDimensions:not([hidden]){order:7!important}
  body .global-commandbar #exportProgressBox:not(.hidden){order:8!important}
  body .global-commandbar .ai-review-notice.notice-open .notice-message{order:9!important}
  body .studio-grid.v5-workspace{gap:6px!important}
  body .preview .preview-viewport{height:clamp(200px,34vh,380px)!important;min-height:200px!important}
  body .preview .preview-head{padding-bottom:6px!important;margin-bottom:6px!important}
}
@media (max-width:600px){
  body .global-commandbar .ratio-option{width:max-content!important;min-width:max-content!important;max-width:none!important;flex:0 0 auto!important;overflow:visible!important;white-space:nowrap!important;gap:6px!important;padding:4px 14px!important}
  body .global-commandbar .ratio-option .ratio-label,body .global-commandbar .ratio-option .ratio-icon{white-space:nowrap!important;position:static!important;display:inline-block!important;width:auto!important}
  body .global-commandbar .ratio-quickbar{justify-content:flex-start!important}
}

/* ======== v6.5: tidy header (language, theme, undo/redo) ======== */
body .site-header .header-actions{display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:2px!important;padding:3px!important;background:var(--v5-surface3)!important;border-radius:14px!important;flex:none!important}
body .site-header .header-actions>*{margin:0!important}
body .site-header .header-actions select,body .site-header .header-actions .icon-btn{height:36px!important;min-height:36px!important;border:0!important;border-radius:11px!important;background:transparent!important;box-shadow:none!important;color:var(--v5-ink)!important;font-size:13px!important;font-weight:700!important}
body .site-header .header-actions select{width:auto!important;min-width:0!important;max-width:none!important;padding:0 8px!important;-webkit-appearance:none;appearance:none;cursor:pointer;text-align:center}
body .site-header .header-actions .icon-btn{width:36px!important;min-width:36px!important;padding:0!important;font-size:18px!important}
body .site-header .header-actions select:hover,body .site-header .header-actions .icon-btn:hover:not(:disabled){background:var(--v5-surface)!important}
body .site-header .header-actions .icon-btn:disabled{opacity:.4!important}
body .site-header .header-actions #interfaceLanguage{width:76px!important}
body .site-header .header-actions .theme-select{width:92px!important}
body .site-header .header-actions #undoBtn{border-inline-start:1px solid var(--v5-line)!important;border-radius:0 11px 11px 0!important}
@media (max-width:600px){
  body .site-header{height:54px!important;padding:6px 8px!important;gap:6px!important}
  body .site-header .brand{flex:1 1 auto!important;min-width:0!important;gap:8px!important}
  body .site-header .brand h1{font-size:13px!important;overflow:visible!important;text-overflow:clip!important;white-space:nowrap!important;direction:ltr!important;text-align:right}
  body .site-header .header-actions #interfaceLanguage{width:58px!important;padding:0 2px!important;font-size:12px!important}
  body .site-header .header-actions .theme-select{width:38px!important;padding:0!important;overflow:hidden!important;text-overflow:clip!important;font-size:17px!important}
  body .site-header .header-actions select,body .site-header .header-actions .icon-btn{height:38px!important;min-height:38px!important}
  body .site-header .header-actions .icon-btn{width:34px!important;min-width:34px!important;font-size:17px!important}
}
body header.site-header .header-actions #undoBtn,body header.site-header .header-actions #redoBtn{border:0!important;background:transparent!important;box-shadow:none!important;border-radius:11px!important;width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;padding:0!important;color:var(--v5-ink)!important}
body header.site-header .header-actions #redoBtn{border-inline-end:0!important}
body header.site-header .header-actions #undoBtn{border-inline-start:1px solid var(--v5-line)!important;border-radius:0!important}
@media (max-width:600px){
  body header.site-header .header-actions #themeSelect{width:40px!important;min-width:40px!important;max-width:40px!important;padding:0!important;text-indent:6px;overflow:hidden!important;font-size:16px!important}
  body header.site-header .header-actions #interfaceLanguage{width:60px!important;min-width:60px!important;max-width:60px!important;font-size:12px!important}
  body header.site-header .header-actions #undoBtn,body header.site-header .header-actions #redoBtn{width:34px!important;min-width:34px!important;height:38px!important;min-height:38px!important}
  body header.site-header .brand h1{font-size:12px!important}
}
@media (max-width:600px){body header.site-header .header-actions #themeSelect{direction:ltr!important;text-align:left!important;text-indent:9px!important;width:40px!important}}
@media (max-width:600px){
  body header.site-header .header-actions #themeSelect{font-size:0!important;color:transparent!important;text-indent:0!important;background-repeat:no-repeat!important;background-position:center!important;background-size:22px 22px!important;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ctext x='11' y='17' font-size='17' text-anchor='middle'%3E%E2%98%80%EF%B8%8F%3C/text%3E%3C/svg%3E")!important}
  body[data-theme="dark"] header.site-header .header-actions #themeSelect{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ctext x='11' y='17' font-size='17' text-anchor='middle'%3E%F0%9F%8C%99%3C/text%3E%3C/svg%3E")!important}
  body header.site-header .header-actions #themeSelect option{font-size:16px;color:#17231d}
}
@keyframes qvsFlash{0%,100%{box-shadow:0 0 0 0 rgba(15,138,122,0)}30%{box-shadow:0 0 0 4px rgba(15,138,122,.55)}}
body .qvs-flash{animation:qvsFlash 1.5s ease-out 1!important;border-radius:14px}
