/* Final, scoped overrides: identical behavior in FA/EN and day/night. */
#subHeaderBar #lockLightBtn.locked,
#subHeaderBar #lockCameraBtn.locked,
body.night-mode #subHeaderBar #lockLightBtn.locked,
body.night-mode #subHeaderBar #lockCameraBtn.locked {
  background:#b93c45!important;border-color:#d85a63!important;color:#fff!important;
  box-shadow:0 0 0 2px rgba(185,60,69,.12)!important;
}
#lockLightBtn.locked *,#lockCameraBtn.locked * {color:inherit!important}

#global-header .subscribe-btn.has-active-plan,
body.night-mode #global-header .subscribe-btn.has-active-plan,
#global-header .subscribe-btn.has-active-plan:hover,
body.night-mode #global-header .subscribe-btn.has-active-plan:hover {
  background:#39404b!important;border-color:#555e6b!important;
  color:#d4dae2!important;box-shadow:none!important;
}

#photoStudioBtn {
  min-width:148px;height:40px;padding:0 15px;box-sizing:border-box;
  background:#b7c99b!important;color:#293c24!important;border:1px solid #98af7b!important;
  box-shadow:0 3px 9px rgba(86,111,57,.16)!important;
}
#photoStudioBtn:hover {background:#c5d5ae!important;filter:none}
#photoStudioBtn[aria-expanded="true"] {box-shadow:0 0 0 3px rgba(141,168,105,.25)!important}
#photoStudioBtn i,#photoStudioBtn span {color:inherit!important}
#updateAppBtn {white-space:nowrap;gap:7px;cursor:pointer}
#updateAppBtn[aria-busy="true"] i {animation:mm-update-spin 1s linear infinite}
@keyframes mm-update-spin {to {transform:rotate(360deg)}}
/* Both viewport notes are pinned to physical sides, unaffected by RTL/LTR. */
#canvas-wrapper > .mm-grid-note,
#canvas-wrapper > .vp-hint {
  position:absolute!important;
  top:60px!important;
  bottom:auto!important;
  transform:none!important;
  z-index:18!important;
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  padding:4px 9px!important;
  border:1px solid rgba(0,0,0,.045)!important;
  border-radius:20px!important;
  background:rgba(255,255,255,.66)!important;
  backdrop-filter:blur(7px)!important;
  color:#4f535d!important;
  opacity:.72!important;
  box-shadow:none!important;
  font-size:10px!important;
  line-height:1.7!important;
  pointer-events:none!important;
  box-sizing:border-box;
}
#canvas-wrapper > .mm-grid-note {
  left:auto!important;right:14px!important;
  max-width:calc(50% - 20px);
}
#canvas-wrapper > .vp-hint {
  left:14px!important;right:auto!important;
  max-width:calc(50% - 20px);
}
body.night-mode #canvas-wrapper > .mm-grid-note,
body.night-mode #canvas-wrapper > .vp-hint {
  background:rgba(20,20,35,.66)!important;
  color:#c0c2cb!important;
  opacity:.78!important;
}
body.viewport-fullscreen #canvas-wrapper > .mm-grid-note,
body.viewport-fullscreen #canvas-wrapper > .vp-hint {display:none!important}

/* Native <option> styling differs by browser. Expose the special HDRI source
   as a persistent, clearly identifiable control without replacing the select. */
#leftPanel .mm-environment-preset-row > .mm-environment-choice {
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:6px;
}
#leftPanel .mm-environment-choice > #environmentPreset {width:100%;min-width:0;max-width:100%;}
#leftPanel .mm-active-bg-hdri {
  width:100%;min-height:31px;display:flex;align-items:center;justify-content:center;
  gap:7px;padding:5px 9px;cursor:pointer;
  border:1px solid #e7bd76;border-radius:8px;
  background:#fff6e6;color:#91530d;font-family:inherit;font-size:10px;font-weight:750;line-height:1.4;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.38);
  transition:background .15s ease,border-color .15s ease,box-shadow .15s ease;
}
#leftPanel .mm-active-bg-hdri:not(:disabled):hover {background:#ffecd0;border-color:#d49a3f}
#leftPanel .mm-active-bg-hdri .mm-active-bg-check {display:none}
#leftPanel .mm-active-bg-hdri.is-active {
  background:#d8efdf;border-color:#5caa76;color:#205937;
  box-shadow:0 0 0 2px rgba(65,147,92,.12);
}
#leftPanel .mm-active-bg-hdri.is-active .mm-active-bg-check {display:inline}
#leftPanel .mm-active-bg-hdri:disabled {opacity:.48;cursor:not-allowed;box-shadow:none}
#leftPanel .mm-active-bg-hdri:focus-visible {outline:2px solid #d28b29;outline-offset:2px}
body.night-mode #leftPanel .mm-active-bg-hdri {background:#443625;color:#ffd79b;border-color:#947044}
body.night-mode #leftPanel .mm-active-bg-hdri.is-active {background:#254734;color:#baf0ce;border-color:#4da06f}

#proTextureEditorOverlay {inset:0!important;transform:none!important;z-index:30000!important}
#proTextureEditorOverlay #proTextureEditorWindow {
  position:fixed!important;min-width:0!important;min-height:0!important;
  width:min(992px,calc(100vw - 20px))!important;
  height:min(780px,calc(100dvh - 80px))!important;
  max-width:none!important;max-height:none!important;
}
#proTextureEditorOverlay #proTextureEditorWindow.maximized {
  inset:0!important;left:0!important;top:0!important;right:0!important;bottom:0!important;
  width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;
  transform:none!important;resize:none!important;border-radius:0!important;
}
#proTextureEditorOverlay #proSurfaceHeader {touch-action:none;cursor:move}
#proTextureEditorWindow.maximized #proSurfaceHeader {cursor:default}
#proTextureEditorOverlay #proCancelBtn,
#proTextureEditorOverlay #proCropCancel {
  background:#a63843!important;border-color:#cc5360!important;color:#fff!important;
}
#proTextureEditorOverlay #proApplyBtn {
  background:#31596a!important;border-color:#4f7c8c!important;color:#eef8fc!important;
}
#proTextureEditorOverlay #proOkBtn {
  background:#3a6f57!important;border-color:#558d72!important;color:#f2fff7!important;
}
#proTextureEditorOverlay #proCancelBtn:hover,
#proTextureEditorOverlay #proCropCancel:hover,
#proTextureEditorOverlay #proApplyBtn:hover,
#proTextureEditorOverlay #proOkBtn:hover {filter:brightness(1.12)}
#proTextureEditorOverlay #proCropBtn:not(.active),
#proTextureEditorOverlay #proFitBtn {
  background:#262b35!important;border-color:rgba(255,255,255,.10)!important;color:#cbd3dd!important;
}
#proTextureEditorOverlay #proCropBtn:not(.active):hover,
#proTextureEditorOverlay #proFitBtn:hover {background:#354253!important}
#proTextureEditorOverlay #proCropBtn.active {background:#254e6d!important;border-color:#4994ca!important}
@media(max-width:600px) {
  /* Do not force top with !important: the user must be able to drag vertically. */
  #proTextureEditorOverlay #proTextureEditorWindow:not(.maximized) {height:calc(100dvh - 24px)!important;top:12px}
  #canvas-wrapper > .mm-grid-note,
  #canvas-wrapper > .vp-hint {font-size:9px!important;max-width:calc(50% - 17px)}
}

/* Project save stays pale even in night mode: keep its label/icon legible. */
body.night-mode #projectSaveBtn,
body.night-mode #projectSaveBtn .mm-tool-text,
body.night-mode #projectSaveBtn > i {
  color:#302a65!important;
}


/* v2.1 — readable hover states for the model's design/material choices. */
body:not(.night-mode) #rightPanel .v4-map-launch-primary,
body:not(.night-mode) #rightPanel .v4-map-launch-secondary button {
  background:#edf2ff!important;
  border-color:#b9c9eb!important;
  color:#253b70!important;
}
body:not(.night-mode) #rightPanel .v4-map-launch-primary:hover,
body:not(.night-mode) #rightPanel .v4-map-launch-secondary button:hover,
body:not(.night-mode) #rightPanel .v4-map-launch-primary:focus-visible,
body:not(.night-mode) #rightPanel .v4-map-launch-secondary button:focus-visible {
  background:#dce9ff!important;
  border-color:#6d91d4!important;
  color:#1b386b!important;
}
body.night-mode #rightPanel .v4-map-launch-primary,
body.night-mode #rightPanel .v4-map-launch-secondary button {
  background:#262b35!important;
  border-color:#49576a!important;
  color:#dae6f4!important;
}
body.night-mode #rightPanel .v4-map-launch-primary:hover,
body.night-mode #rightPanel .v4-map-launch-secondary button:hover,
body.night-mode #rightPanel .v4-map-launch-primary:focus-visible,
body.night-mode #rightPanel .v4-map-launch-secondary button:focus-visible {
  background:#34495f!important;
  border-color:#719fc8!important;
  color:#f1f7ff!important;
}
#rightPanel .v4-map-launch-primary:hover > i,
#rightPanel .v4-map-launch-primary:hover > span:not(.map-state-dot),
#rightPanel .v4-map-launch-secondary button:hover > i,
#rightPanel .v4-map-launch-secondary button:hover > span:not(.map-state-dot),
#rightPanel .v4-map-launch-primary:focus-visible > i,
#rightPanel .v4-map-launch-primary:focus-visible > span:not(.map-state-dot),
#rightPanel .v4-map-launch-secondary button:focus-visible > i,
#rightPanel .v4-map-launch-secondary button:focus-visible > span:not(.map-state-dot) {
  color:inherit!important;
}

/* Two additional contrasts verified in the CSS: HDRI hover and dark-mode tabs. */
body.night-mode #leftPanel .mm-active-bg-hdri:not(:disabled):hover,
body.night-mode #leftPanel .mm-active-bg-hdri:not(:disabled):focus-visible {
  background:#57452b!important;
  border-color:#b18a51!important;
  color:#fff0d4!important;
}
body.night-mode #leftPanel .mm-active-bg-hdri.is-active:not(:disabled):hover,
body.night-mode #leftPanel .mm-active-bg-hdri.is-active:not(:disabled):focus-visible {
  background:#2d5b40!important;
  border-color:#69b887!important;
  color:#e0ffec!important;
}
body.night-mode .tab-btn:not(.active) {color:#bdc8d9!important;}
body.night-mode .tab-btn:hover:not(.active),
body.night-mode .tab-btn:focus-visible:not(.active) {
  background:#3a4659!important;
  color:#f1f5fb!important;
}
body:not(.night-mode) .tab-btn:not(.active) {color:#526071!important;}
body:not(.night-mode) .tab-btn:hover:not(.active),
body:not(.night-mode) .tab-btn:focus-visible:not(.active) {
  background:#e5ecf6!important;
  color:#2e3f59!important;
}
/* Material copy/paste controls had dark text on the dark panel. */
body.night-mode #rightPanel .v4-material-copy-row .v4-surface-open:not(:disabled) {
  color:#d6dfff!important;
  background:#2e3446!important;
  border-color:#536281!important;
}
body.night-mode #rightPanel .v4-material-copy-row .v4-surface-open:not(:disabled):hover,
body.night-mode #rightPanel .v4-material-copy-row .v4-surface-open:not(:disabled):focus-visible {
  color:#f6f8ff!important;
  background:#404e6b!important;
  border-color:#859cce!important;
}

/* Unframed, single-stroke heart; the transparent 32px click target remains. */
.library-modal .model-card .fav-btn,
body.night-mode .library-modal .model-card .fav-btn {
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  width:32px;height:32px;
  opacity:1!important;
  color:#a32642!important;
  text-shadow:none!important;
}
.library-modal .model-card .fav-btn:hover,
.library-modal .model-card .fav-btn:focus-visible,
body.night-mode .library-modal .model-card .fav-btn:hover,
body.night-mode .library-modal .model-card .fav-btn:focus-visible {
  background:transparent!important;
  color:#d21849!important;
  transform:scale(1.12);
}
.library-modal .model-card .fav-btn.faved,
body.night-mode .library-modal .model-card .fav-btn.faved {
  color:#df2254!important;
}
.library-modal .model-card .fav-btn .fav-icon {
  font-size:19px!important;
  filter:drop-shadow(0 1px 1px rgba(255,255,255,.9));
}
.library-modal .model-card .fav-btn:focus-visible {
  outline:2px solid #b72c53!important;
  outline-offset:1px;
  border-radius:4px!important;
}


/* Export: both choices are PNG; the buttons choose whether to retain the background. */
#subHeaderBar .shb-format-group { gap:3px; align-items:center; }
#subHeaderBar .shb-format-group .format-btn {
  padding:5px 8px!important;
  min-height:30px;
  font-size:11px!important;
  white-space:nowrap;
  line-height:1.35;
}
#subHeaderBar .shb-format-group .format-btn:hover,
#subHeaderBar .shb-format-group .format-btn:focus-visible {
  border-color:#8fb9db!important;
  background:#e7f1fa!important;
  color:#224e75!important;
}
#subHeaderBar .shb-format-group .format-btn.active:hover,
#subHeaderBar .shb-format-group .format-btn.active:focus-visible {
  background:#d9eafa!important;
  color:#184e7d!important;
}
body.night-mode #subHeaderBar .shb-format-group .format-btn:hover,
body.night-mode #subHeaderBar .shb-format-group .format-btn:focus-visible {
  border-color:#6385a8!important;
  background:#334458!important;
  color:#f0f7ff!important;
}
body.night-mode #subHeaderBar .shb-format-group .format-btn.active:hover,
body.night-mode #subHeaderBar .shb-format-group .format-btn.active:focus-visible {
  background:#254b6c!important;
  color:#e7f6ff!important;
}

/* Favorites filter: stable label/layout; only the heart lights when active. */
.library-modal .library-search-row #filterFavBtn,
body.night-mode .library-modal .library-search-row #filterFavBtn {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border:1px solid rgba(195,55,90,.19);
  border-radius:11px;
  background:#fff5f7;
  color:#384350;
  font-weight:700;
  box-shadow:none;
  transition:background .18s ease,border-color .18s ease;
}
.library-modal .library-search-row #filterFavBtn .fav-icon,
body.night-mode .library-modal .library-search-row #filterFavBtn .fav-icon {
  color:#b84b68;
  font-size:17px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  filter:none;
  transform:none;
  transition:color .18s ease,filter .18s ease,transform .18s ease;
}
.library-modal .library-search-row #filterFavBtn:hover {
  background:#ffe9ef;
  border-color:#e5a0b3;
}
/* Active state keeps the exact same button/label appearance; only the heart changes. */
.library-modal .library-search-row #filterFavBtn.active,
body.night-mode .library-modal .library-search-row #filterFavBtn.active {
  box-shadow:none;
}
.library-modal .library-search-row #filterFavBtn.active .fav-icon,
body.night-mode .library-modal .library-search-row #filterFavBtn.active .fav-icon {
  color:#ef285d;
  filter:drop-shadow(0 0 4px rgba(242,42,94,.90)) drop-shadow(0 0 8px rgba(242,42,94,.48));
  transform:scale(1.08);
}
body.night-mode .library-modal .library-search-row #filterFavBtn {
  background:#30232c;
  color:#e9dbe1;
  border-color:#725062;
}
body.night-mode .library-modal .library-search-row #filterFavBtn:hover {
  background:#442a38;
  color:#fff0f4;
}
body.night-mode .library-modal .library-search-row #filterFavBtn.active {
  background:#30232c;
  border-color:#725062;
  color:#e9dbe1;
}
.library-modal .library-search-row #filterFavBtn:focus-visible {
  outline:2px solid #d12e60;
  outline-offset:2px;
}
@media (prefers-reduced-motion:reduce) {
  .library-modal .library-search-row #filterFavBtn,
  .library-modal .library-search-row #filterFavBtn .fav-icon {transition:none!important;}
}


/* 2026-09-22: update button is a maintenance action, not destructive reset. */
#global-header {height:79px!important;min-height:79px!important;}
@media(max-width:720px){
  #global-header{height:111px!important;min-height:111px!important;}
}
#global-header .header-left > #languageToggle{flex-shrink:0;}
#subHeaderBar #updateAppBtn,
body.night-mode #subHeaderBar #updateAppBtn{
  background:#e7f0f8!important;
  color:#315b7c!important;
  border-color:#b8d2e5!important;
  box-shadow:none!important;
}
#subHeaderBar #updateAppBtn:hover,
#subHeaderBar #updateAppBtn:focus-visible{
  background:#d7e7f5!important;
  color:#214b6d!important;
  border-color:#87b3d3!important;
  transform:translateY(-1px);
}
body.night-mode #subHeaderBar #updateAppBtn{
  background:#263b4f!important;
  color:#c4dff5!important;
  border-color:#486a88!important;
}
body.night-mode #subHeaderBar #updateAppBtn:hover,
body.night-mode #subHeaderBar #updateAppBtn:focus-visible{
  background:#304d69!important;
  color:#f1f8ff!important;
  border-color:#7197b7!important;
}
#subHeaderBar #updateAppBtn[data-update-state="ready"]{
  box-shadow:0 0 0 3px rgba(76,139,189,.10),0 7px 18px rgba(49,95,132,.14)!important;
}
#subHeaderBar #updateAppBtn[data-update-state="current"]{
  background:#eef1f4!important;color:#7b8792!important;border-color:#d6dde3!important;
  box-shadow:none!important;
}
body.night-mode #subHeaderBar #updateAppBtn[data-update-state="current"]{
  background:#2a3038!important;color:#8f9aa5!important;border-color:#404954!important;
}
#subHeaderBar #updateAppBtn[data-update-state="checking"],
#subHeaderBar #updateAppBtn[data-update-state="error"]{opacity:.72;box-shadow:none!important}
#subHeaderBar #updateAppBtn:disabled{cursor:default;transform:none!important}
#subHeaderBar #updateAppBtn:focus-visible{outline:2px solid #3c7ba9;outline-offset:2px}

/* The update confirmation is readable in both themes without red reset styling. */
#mmUpdateModal{z-index:22250;background:rgba(11,22,37,.57)}
#mmUpdateModal .mm-update-card{width:min(485px,calc(100vw - 28px));background:#f8fafc;color:#21354b;text-align:right}
#mmUpdateModal .mm-update-card::before{background:linear-gradient(90deg,transparent,#588ab2,transparent)}
#mmUpdateModal .mm-update-symbol{color:#2f6d9e;background:#e5f1fc;border-color:#c4ddf1}
#mmUpdateModal #mmUpdateDescription{font-weight:550;color:#42546a;line-height:1.95}
#mmUpdateModal .mm-update-warning{
  display:flex;align-items:flex-start;gap:9px;margin-top:13px;padding:11px 12px;
  background:#fff5e7;border:1px solid #efd7b2;border-radius:10px;
  color:#795119;font-weight:740;font-size:11px;line-height:1.9;
}
#mmUpdateModal .mm-update-warning i{margin-top:3px;flex-shrink:0}
#mmUpdateModal .mm-update-error{margin-top:10px;color:#ad3544;font-size:11px;font-weight:750;line-height:1.8}
#mmUpdateModal .mm-update-error[hidden]{display:none!important}
#mmUpdateModal .reset-app-actions{flex-wrap:wrap}
#mmUpdateModal .reset-app-actions button{min-height:37px;height:auto;padding:8px 12px}
#mmUpdateModal .mm-update-confirm{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  background:#2d658e;border-color:#2d658e;color:white;box-shadow:none;
}
#mmUpdateModal .mm-update-confirm:hover{background:#255776;border-color:#255776}
#mmUpdateModal .mm-update-confirm:disabled{opacity:.65;cursor:wait}
#mmUpdateModal .mm-update-confirm[aria-busy="true"] i{animation:mm-update-spin 1s linear infinite}
#mmUpdateModal button:focus-visible{outline:2px solid #347bab;outline-offset:2px}

/* Keep the site address visually secondary to the tutorial heading. */
#mmGuidedTour .mm-tour-card-top strong .mm-tour-brand{
  color:#939dab!important;-webkit-text-fill-color:#939dab!important;
  font-size:11px;font-weight:600;letter-spacing:.1px;
}
/* Explicit night-mode treatment; the global design system uses !important. */
body.night-mode #mmUpdateModal .mm-update-card{
  background:#283243!important;color:#f2f5fb!important;border-color:#45576d!important;
}
body.night-mode #mmUpdateModal .mm-update-card h3{color:#f1f6fc!important}
body.night-mode #mmUpdateModal #mmUpdateDescription{color:#cedae8!important}
body.night-mode #mmUpdateModal .mm-update-warning{background:#393427;border-color:#766044;color:#ffe0b3}
body.night-mode #mmUpdateModal .reset-app-cancel{background:#364457;border-color:#5b6c82;color:#e2edf9}
body.night-mode #mmUpdateModal .reset-app-close{background:#38495e;color:#e2edf9}
body.night-mode #mmUpdateModal .mm-update-error{color:#ffc2c9}

/* Editor-only help. The dialog remains attached to the draggable editor. */
#proTextureEditorOverlay .pro-help-btn {flex:0 0 31px;color:#a8c9ef;background:rgba(92,142,200,.13);border-color:rgba(125,173,231,.32)}
#proTextureEditorOverlay .pro-help-btn:hover,
#proTextureEditorOverlay .pro-help-btn:focus-visible {color:#fff;background:#30547a;border-color:#8bbded;outline:2px solid rgba(139,189,237,.35);outline-offset:2px}
#proTextureEditorWindow .pro-editor-help-overlay {
  position:absolute;inset:0;z-index:10020;display:none;align-items:center;justify-content:center;
  padding:15px;background:rgba(8,12,22,.67);backdrop-filter:blur(3px);pointer-events:auto;
}
#proTextureEditorWindow .pro-editor-help-overlay.open {display:flex}
#proTextureEditorWindow .pro-editor-help-card {
  width:min(510px,100%);max-height:calc(100% - 12px);overflow:auto;
  padding:20px;border-radius:15px;background:#222836;color:#edf3fd;
  border:1px solid #4e6079;box-shadow:0 22px 65px rgba(0,0,0,.44);
  text-align:start;direction:rtl;
}
#proTextureEditorWindow .pro-editor-help-head {display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}
#proTextureEditorWindow .pro-editor-help-head h3 {font-size:15px;font-weight:800;color:#f6f8fc;margin:0}
#proTextureEditorWindow .pro-editor-help-head h3 i {color:#8ebcff;margin-left:7px}
#proTextureEditorWindow .pro-editor-help-body p {font-size:12px;line-height:2;color:#d1dbea;margin:0 0 9px}
#proTextureEditorWindow .pro-editor-help-body strong {color:#fff;font-weight:800}
#proTextureEditorWindow .pro-editor-help-done {min-height:36px;padding:7px 18px;margin-top:6px;border:1px solid #719cd0;border-radius:9px;background:#315b88;color:#fff;font:inherit;cursor:pointer}
#proTextureEditorWindow .pro-editor-help-done:hover {background:#4172a4}
#proTextureEditorWindow .pro-editor-help-done:focus-visible {outline:2px solid #9bc6fa;outline-offset:2px}

/* 2026-09-22: header correction, readable grid warning, stable editor actions. */
#global-header{height:69px!important;min-height:69px!important}
@media(max-width:720px){#global-header{height:101px!important;min-height:101px!important}}
/* Keep the viewport hint legible over light product backgrounds in both modes. */
body.night-mode #canvas-wrapper > .mm-grid-note,
body.night-mode #canvas-wrapper > .mm-grid-note *,
body.night-mode #canvas-wrapper > .mm-grid-note i {
  color:#27303d!important;
}
body.night-mode #canvas-wrapper > .mm-grid-note {
  background:rgba(255,255,255,.91)!important;
  opacity:1!important;
  border-color:rgba(24,35,50,.10)!important;
}
#proTextureEditorWindow .pro-inspector-scroll {
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
}
#proTextureEditorWindow .pro-inspector > #proEditorActions {
  flex:0 0 auto!important;
  margin:0!important;
  padding:10px 12px 12px!important;
  background:#1a1b2b!important;
  border-top:1px solid rgba(255,255,255,.12)!important;
  position:relative!important;
  z-index:3!important;
}
#proTextureEditorWindow .action-divider {display:none!important}
#proTextureEditorWindow .mm-gray-adjust-fields {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;min-width:0;
}
#proTextureEditorWindow .mm-gray-adjust-fields .mm-gray-adjust-row {
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;
  align-items:center;margin:0;min-width:0;padding:2px 0;
}
#proTextureEditorWindow .mm-gray-adjust-fields .mm-gray-adjust-row > input[type="range"] {
  grid-column:1/-1;grid-row:2;width:100%;min-width:0;margin:0;
}
#proTextureEditorWindow .mm-gray-adjust-fields .mm-gray-adjust-row > output {grid-column:2;grid-row:1;}
#proTextureEditorWindow .mm-gray-adjust-fields .mm-gray-adjust-row > span {grid-column:1;grid-row:1;}
#proTextureEditorWindow .mm-editor-guidance {
  padding:5px 7px!important;margin:0 0 2px!important;line-height:1.35!important;
}
#proTextureEditorWindow .mm-editor-guidance strong {font-size:10px!important;margin-bottom:1px!important;line-height:1.4!important}
#proTextureEditorWindow .mm-editor-guidance span {font-size:9px!important;line-height:1.35!important}
#proTextureEditorWindow .pro-transform-section {gap:4px!important}
#proTextureEditorWindow .pro-transform-section > .pro-three-tools:first-of-type {margin-top:0!important}
@media(min-height:820px){#proTextureEditorWindow .pro-inspector-scroll{overflow-y:auto!important}}
/* Grid toggle is a pale-lavender selected chip even in night mode. Make its
   caption and icon dark for contrast without changing all toolbar controls. */
body.night-mode .mm-tool-icon:has(#gridToggle:checked),
body.night-mode .mm-tool-icon:has(#gridToggle:checked) > i,
body.night-mode .mm-tool-icon:has(#gridToggle:checked) .mm-tool-text {
  color:#25243c!important;
}
body.night-mode .mm-tool-icon:has(#gridToggle:checked){
  background:#e1e1fa!important;
}

/* Keep the always-bilingual copyright line in genuine RTL, even when the UI
   switches to English (and the footer layout itself remains physically LTR). */
#app-footer.mm-useful-footer .mm-footer-rights > span[lang="fa"] {
  direction:rtl!important;
  unicode-bidi:isolate!important;
}
#app-footer.mm-useful-footer .mm-footer-rights > span[lang="fa"] bdi {
  direction:ltr!important;
  unicode-bidi:isolate!important;
}


/* ================================================================
   Branded Update transition
   ================================================================ */
.mm-update-screen{
  position:fixed;inset:0;z-index:32000;display:flex;align-items:center;justify-content:center;
  background:#d9dde2;color:#263548;opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .28s ease,visibility .28s ease;
}
.mm-update-screen.is-visible{opacity:1;visibility:visible;pointer-events:auto}
.mm-update-screen.is-immediate{transition:none}
.mm-update-screen-inner{width:min(390px,calc(100vw - 44px));text-align:center;direction:ltr}
.mm-update-brand-logo{
  width:74px;height:74px;margin:0 auto 14px;border-radius:18px;overflow:hidden;
  background:#414757;border:1px solid rgba(255,255,255,.55);
  box-shadow:0 12px 32px rgba(38,53,72,.14);
}
.mm-update-brand-logo img{display:block;width:100%;height:100%;object-fit:contain}
.mm-update-brand-name{font-size:25px;line-height:1.1;font-weight:800;letter-spacing:.1px;color:#263548}
.mm-update-brand-domain{margin-top:5px;font-size:11px;font-weight:650;letter-spacing:.45px;color:#7a8490}
.mm-update-stage-title{margin-top:30px;font-size:12px;font-weight:800;letter-spacing:2.2px;text-transform:uppercase;color:#485b70}
.mm-update-progress-row{margin-top:9px;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:10px;font-weight:700;color:#75808c;direction:ltr}
#mmUpdateProgressText{min-width:33px;text-align:left;color:#40566b;font-variant-numeric:tabular-nums}
.mm-update-progress-note{direction:rtl;text-align:right;flex:1}
body.mm-language-en .mm-update-progress-note{direction:ltr;text-align:right}
.mm-update-complete-toast{
  position:fixed;left:50%;top:82px;z-index:31990;display:flex;align-items:center;gap:8px;
  transform:translate(-50%,-12px);padding:10px 15px;border-radius:11px;
  background:rgba(35,49,64,.94);color:#f5f8fb;box-shadow:0 12px 28px rgba(20,30,42,.20);
  font-size:11px;font-weight:750;opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .25s ease,transform .25s ease,visibility .25s ease;
}
.mm-update-complete-toast i{color:#7fd4a5}
.mm-update-complete-toast.is-visible{opacity:1;visibility:visible;transform:translate(-50%,0)}
html.mm-update-resume body{background:#d9dde2!important}
html.mm-update-resume body>*:not(#mmUpdateScreen):not(script){visibility:hidden!important}
html.mm-update-resume #mmUpdateScreen{visibility:visible!important;opacity:1!important}
@media (prefers-reduced-motion:reduce){
  .mm-update-screen,.mm-update-complete-toast,.mm-update-progress-bar{transition:none!important}
  .mm-update-loader span{animation:none!important;opacity:.8}
}


/* ========================================================================== */
/* Video Help Library                                                         */
/* ========================================================================== */
.mm-video-help-overlay{
  z-index:10080;
  background:rgba(7,10,15,.76);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.mm-video-help-card{
  width:min(1080px,94vw);
  max-width:1080px;
  max-height:min(90vh,920px);
  padding:0;
  overflow:hidden;
  border-radius:20px;
  background:#f7f8fa;
  color:#18202b;
  border:1px solid rgba(28,37,50,.10);
  box-shadow:0 28px 90px rgba(0,0,0,.35);
  display:flex;
  flex-direction:column;
}
.mm-video-help-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height:72px;
  padding:14px 18px;
  border-bottom:1px solid rgba(28,37,50,.10);
  background:#fff;
  flex:0 0 auto;
}
.mm-video-help-card.is-playing{
  width:min(1180px,92vw);
  max-width:1180px;
  max-height:90vh;
}
.mm-video-help-card.is-playing .mm-video-help-header{min-height:58px;padding:9px 12px 9px 16px}
.mm-video-help-heading{display:flex;align-items:center;gap:12px;min-width:0}
.mm-video-help-icon{
  width:42px;height:42px;border-radius:12px;display:grid;place-items:center;
  background:rgba(255,122,26,.12);color:#ef6c00;font-size:20px;flex:0 0 auto;
}
.mm-video-help-heading h3{margin:0;font-size:18px;line-height:1.35;color:#17202a}
.mm-video-help-heading p{margin:3px 0 0;font-size:12px;color:#6c7580}
.mm-video-help-header-actions{display:flex;align-items:center;gap:8px;margin-inline-start:auto}
.mm-video-help-close{
  width:38px;height:38px;border:0;border-radius:10px;background:#e9edf2;color:#2d3742;
  display:grid;place-items:center;cursor:pointer;font-size:17px;flex:0 0 auto;
}
.mm-video-help-close:hover{background:#dde3ea}
.mm-video-help-back,.mm-video-help-download,.mm-video-help-nav-btn{
  min-height:38px;border-radius:10px;border:1px solid rgba(30,40,52,.13);padding:0 12px;
  display:inline-flex;align-items:center;justify-content:center;gap:7px;background:#f1f4f7;color:#27313d;
  font:inherit;font-size:12px;font-weight:800;text-decoration:none;cursor:pointer;white-space:nowrap;
}
.mm-video-help-back[hidden]{display:none!important}
.mm-video-help-back:hover,.mm-video-help-nav-btn:hover{background:#e6ebf0}
.mm-video-help-gallery{
  padding:20px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  overflow:auto;
}
.mm-video-help-gallery[hidden]{display:none!important}
.mm-video-help-item{
  border:1.5px solid rgba(49,62,78,.20);
  border-radius:15px;
  padding:0;
  overflow:hidden;
  background:#fff;
  color:#1d2732;
  cursor:pointer;
  text-align:start;
  box-shadow:0 3px 11px rgba(29,39,50,.05);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.mm-video-help-item:hover{
  transform:translateY(-2px);
  border-color:rgba(239,108,0,.58);
  box-shadow:0 11px 28px rgba(30,38,48,.12);
}
.mm-video-help-item:focus-visible{outline:3px solid rgba(239,108,0,.24);outline-offset:2px;border-color:#ef6c00}
.mm-video-help-thumb{display:block;position:relative;aspect-ratio:16/9;background:linear-gradient(145deg,#dfe4e9,#c9d0d7);overflow:hidden;border-bottom:1px solid rgba(29,40,52,.10)}
.mm-video-help-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.mm-video-help-thumb img.mm-thumb-missing{display:none}
.mm-video-help-play{
  position:absolute;inset:0;margin:auto;width:50px;height:50px;border-radius:50%;
  display:grid;place-items:center;background:rgba(11,16,22,.70);color:#fff;font-size:17px;
  box-shadow:0 6px 18px rgba(0,0,0,.22);transition:transform .18s ease,background .18s ease;
}
.mm-video-help-item:hover .mm-video-help-play{transform:scale(1.06);background:rgba(239,108,0,.94)}
.mm-video-help-item-title{
  display:flex;
  align-items:center;
  min-height:74px;
  padding:12px 14px 13px;
  font-size:13px;
  font-weight:850;
  line-height:1.75;
  white-space:normal;
  overflow:visible;
}
.mm-video-help-player-view{min-height:0;overflow:hidden;background:#000}
.mm-video-help-player-view[hidden]{display:none!important}
.mm-video-help-stage{width:100%;aspect-ratio:1920/900;background:#000}
.mm-video-help-stage video{display:block;width:100%;height:100%;object-fit:contain;background:#000}
.mm-video-help-player-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:11px 14px;
  min-height:64px;
  background:#151b23;
  border-top:1px solid rgba(255,255,255,.08);
  color:#f4f6f8;
}
.mm-video-help-footer-title-wrap{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
.mm-video-help-current-title{
  min-width:0;
  font-size:13px;
  line-height:1.55;
  font-weight:850;
  color:#f5f7f9;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.mm-video-help-counter{
  flex:0 0 auto;
  padding:4px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  color:#b9c2cc;
  font-size:10.5px;
  font-weight:800;
  direction:rtl;
  white-space:nowrap;
}
.mm-video-help-footer-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.mm-video-help-player-footer .mm-video-help-nav-btn{
  background:#252e39;
  color:#f2f5f7;
  border-color:rgba(255,255,255,.10);
}
.mm-video-help-player-footer .mm-video-help-nav-btn:hover{background:#303b49}
.mm-video-help-download{background:#ef6c00;color:#fff;border-color:#ef6c00}
.mm-video-help-download:hover{background:#d96000;color:#fff}
body.night-mode .mm-video-help-card{background:#151a22;color:#edf1f5;border-color:rgba(255,255,255,.08)}
body.night-mode .mm-video-help-header{background:#181e27;border-color:rgba(255,255,255,.08)}
body.night-mode .mm-video-help-heading h3{color:#f3f5f7}
body.night-mode .mm-video-help-heading p{color:#9aa5b1}
body.night-mode .mm-video-help-close{background:#242b35;color:#eef2f6}
body.night-mode .mm-video-help-close:hover{background:#303946}
body.night-mode .mm-video-help-item{background:#1c222c;color:#f0f3f6;border-color:rgba(255,255,255,.13);box-shadow:0 3px 12px rgba(0,0,0,.14)}
body.night-mode .mm-video-help-item:hover{border-color:rgba(255,143,55,.58);box-shadow:0 11px 30px rgba(0,0,0,.34)}
body.night-mode .mm-video-help-back{background:#252d38;color:#eef2f5;border-color:rgba(255,255,255,.08)}
body.night-mode .mm-video-help-back:hover{background:#303a47}
@media (max-height:760px) and (min-width:621px){
  .mm-video-help-card.is-playing{width:min(1020px,92vw);max-width:1020px}
}
@media (max-height:660px) and (min-width:621px){
  .mm-video-help-card.is-playing{width:min(860px,92vw);max-width:860px}
}
@media (max-width:900px){
  .mm-video-help-gallery{grid-template-columns:repeat(2,minmax(0,1fr));padding:14px;gap:12px}
  .mm-video-help-player-footer{align-items:flex-start;flex-direction:column}
  .mm-video-help-footer-actions{width:100%;justify-content:flex-end}
  .mm-video-help-footer-title-wrap{width:100%}
}
@media (max-width:620px){
  .mm-video-help-card{width:96vw;max-height:94vh;border-radius:16px}
  .mm-video-help-card.is-playing{width:96vw;max-width:96vw}
  .mm-video-help-gallery{grid-template-columns:1fr;padding:12px;gap:11px}
  .mm-video-help-item-title{min-height:64px;font-size:12.5px}
  .mm-video-help-heading p{display:none}
  .mm-video-help-back span{display:none}
  .mm-video-help-download span{display:none}
  .mm-video-help-nav-btn span{display:none}
  .mm-video-help-back,.mm-video-help-close,.mm-video-help-download,.mm-video-help-nav-btn{min-width:40px;width:40px;padding:0}
  .mm-video-help-player-footer{padding:9px 10px}
  .mm-video-help-current-title{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
}

/* =========================================================
   Library + Video Help thumbnail hover color reveal
   Default: 92% grayscale + slightly softer contrast
   Hover: full color + normal contrast
   Soft transition ~7 frames at 60fps
   ========================================================= */

/* Library: every preview uses the same muted treatment until hover. */
.library-modal .model-card .thumb-wrapper img {
  filter: grayscale(92%) contrast(90%);
  transition: filter 120ms ease-out;
}

.library-modal .model-card:hover .thumb-wrapper img {
  filter: grayscale(0%) contrast(100%);
}

/* Video Help thumbnails use the same visual treatment. */
.mm-video-help-thumb img {
  filter: grayscale(92%) contrast(90%);
  transition: filter 120ms ease-out;
}

.mm-video-help-item:hover .mm-video-help-thumb img {
  filter: grayscale(0%) contrast(100%);
}

/* Keyboard navigation gets the same visual reveal without moving layout. */
.library-modal .model-card:focus-within .thumb-wrapper img,
.mm-video-help-item:focus-visible .mm-video-help-thumb img {
  filter: grayscale(0%) contrast(100%);
}

/* Remove the circular play overlay from tutorial thumbnails only. */
.mm-video-help-play {
  display: none !important;
}

/* =========================================================
   OBJ scale control — roomier numeric field + readable slider
   ========================================================= */
#objDimensionPanel .control-group:has(> .slider-input-row){
  grid-template-columns:54px minmax(0,1fr)!important;
  gap:10px!important;
}
#objDimensionPanel .control-group:has(> .slider-input-row) > label{
  font-size:11px!important;
}
#objDimensionPanel .slider-input-row{
  gap:9px!important;
  min-width:0;
}
#objDimensionPanel #objScale{
  --range-pct:0%;
  flex:1 1 auto!important;
  width:100%!important;
  min-width:90px!important;
  height:18px!important;
  -webkit-appearance:none!important;
  appearance:none!important;
  direction:ltr!important;
  border:0!important;
  outline:0!important;
  cursor:pointer!important;
  background:linear-gradient(90deg,
    var(--mm-blue-600,#397ee8) 0%,
    var(--mm-blue-600,#397ee8) var(--range-pct),
    #cbd4dd var(--range-pct),
    #cbd4dd 100%) center / 100% 4px no-repeat!important;
}
#objDimensionPanel #objScale::-webkit-slider-runnable-track{
  height:4px!important;
  border:0!important;
  border-radius:999px!important;
  background:transparent!important;
  box-shadow:none!important;
}
#objDimensionPanel #objScale::-webkit-slider-thumb{
  -webkit-appearance:none!important;
  width:17px!important;
  height:17px!important;
  margin-top:-6.5px!important;
  border:3px solid var(--mm-blue-600,#397ee8)!important;
  border-radius:50%!important;
  background:#fff!important;
  box-shadow:0 2px 5px rgba(31,39,51,.20)!important;
}
#objDimensionPanel #objScale::-moz-range-track{
  height:4px!important;
  border:0!important;
  border-radius:999px!important;
  background:transparent!important;
}
#objDimensionPanel #objScale::-moz-range-progress{
  height:4px!important;
  background:transparent!important;
}
#objDimensionPanel #objScale::-moz-range-thumb{
  width:11px!important;
  height:11px!important;
  border:3px solid var(--mm-blue-600,#397ee8)!important;
  border-radius:50%!important;
  background:#fff!important;
  box-shadow:0 2px 5px rgba(31,39,51,.20)!important;
}
#objDimensionPanel #objScaleInput{
  box-sizing:border-box!important;
  flex:0 0 64px!important;
  width:64px!important;
  min-width:64px!important;
  height:30px!important;
  padding:0 7px!important;
  border-radius:7px!important;
  font-size:11.5px!important;
  font-weight:650!important;
  line-height:30px!important;
  text-align:center!important;
  direction:ltr!important;
}
body.night-mode #objDimensionPanel #objScale{
  background:linear-gradient(90deg,
    var(--mm-blue-500,#5a91eb) 0%,
    var(--mm-blue-500,#5a91eb) var(--range-pct),
    rgba(255,255,255,.18) var(--range-pct),
    rgba(255,255,255,.18) 100%) center / 100% 4px no-repeat!important;
}
@media (max-width:1100px){
  #objDimensionPanel .control-group:has(> .slider-input-row){
    grid-template-columns:48px minmax(0,1fr)!important;
    gap:7px!important;
  }
  #objDimensionPanel .slider-input-row{gap:6px!important}
  #objDimensionPanel #objScaleInput{
    flex-basis:58px!important;
    width:58px!important;
    min-width:58px!important;
  }
}


/* Update state is driven by completed work, without visual timing. */
.mm-update-screen,.mm-update-screen *,.mm-update-complete-toast{animation:none!important;transition:none!important}
.mm-update-progress-row{margin-top:22px}
