.fm-page {
  --fm-bg: #080d15;
  --fm-surface: #111824;
  --fm-surface-muted: #0d141f;
  --fm-surface-raised: #151e2b;
  --fm-surface-hover: #1a2432;
  --fm-text: #f4f7fb;
  --fm-text-muted: #8d99ab;
  --fm-border: #273244;
  --fm-border-strong: #35445a;
  --fm-accent: #326bff;
  --fm-accent-hover: #477cff;
  --fm-danger: #ff6b73;
  --fm-radius-sm: 10px;
  --fm-radius-md: 14px;
  --fm-shadow: 0 18px 48px rgb(0 0 0 / 28%);
  --fm-space-1: 6px;
  --fm-space-2: 10px;
  --fm-space-3: 16px;
  --fm-space-4: 24px;
  --fm-space-5: 32px;
  --fm-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.fm-page, .fm-page * { box-sizing: border-box; }
.fm-standalone { min-height: 100%; margin: 0; background: var(--fm-bg); color: var(--fm-text); font-family: var(--fm-font); color-scheme: dark; }
.fm-page { min-height: 100vh; padding: 0; color: var(--fm-text); background: var(--fm-bg); font-family: var(--fm-font); }
.fm-page button, .fm-page input, .fm-page textarea, .fm-page select { font: inherit; }
.fm-page button { -webkit-tap-highlight-color: transparent; }
.fm-page--embedded { padding: 0; }
.fm-page--embedded .fm-editor { max-width: none; }
.fm-editor { position: relative; width: 100%; max-width: none; min-height: 100vh; margin: 0; overflow: hidden; background: var(--fm-bg); border: 0; border-radius: 0; box-shadow: none; }
.fm-editor__header { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 28px; background: linear-gradient(180deg, #0d131e 0%, #0a1019 100%); border-bottom: 1px solid var(--fm-border); }
.fm-editor__identity { display: flex; align-items: center; min-width: 0; }
.fm-editor__eyebrow { margin: 0; padding-right: 18px; color: #b8c1d0; font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; }
.fm-editor__title { margin: 0 0 0 18px; padding-left: 18px; border-left: 1px solid var(--fm-border); color: var(--fm-text); font-size: 1rem; font-weight: 760; letter-spacing: -.01em; white-space: nowrap; }
.fm-editor__subtitle { display: none; }
.fm-editor__body { display: grid; grid-template-columns: 112px minmax(0, 1fr) 360px; min-height: 0; background: var(--fm-bg); }
.fm-toolbar, .fm-panel { padding: 14px; background: var(--fm-surface-muted); }
.fm-toolbar { display: flex; flex-direction: column; gap: 8px; border-right: 1px solid var(--fm-border); }
.fm-panel { overflow-y: auto; border-left: 1px solid var(--fm-border); scrollbar-width: thin; scrollbar-color: #35445a transparent; }
.fm-tool { display: grid; width: 100%; min-height: 82px; margin: 0; padding: 10px 6px; place-items: center; align-content: center; gap: 8px; text-align: center; border: 1px solid transparent; border-radius: 12px; background: transparent; color: #aeb8c7; cursor: pointer; font-size: .72rem; font-weight: 650; transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 150ms ease; }
.fm-tool:hover:not(:disabled) { color: #eef3fb; background: #151e2a; border-color: #202c3d; }
.fm-tool.is-active { border-color: #3c70ff; background: linear-gradient(180deg, rgb(50 107 255 / 34%), rgb(50 107 255 / 19%)); color: #fff; box-shadow: inset 0 0 0 1px rgb(118 155 255 / 8%), 0 8px 22px rgb(0 0 0 / 16%); }
.fm-tool:disabled { opacity: .42; cursor: not-allowed; }
.fm-tool__icon { display: grid; width: 25px; height: 25px; place-items: center; color: currentColor; }
.fm-tool__icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.fm-panel__section + .fm-panel__section { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--fm-border); }
.fm-panel__title { margin: 0 0 14px; color: #f4f7fb; font-size: .92rem; font-weight: 760; letter-spacing: -.01em; }
.fm-file-info { margin: 0; }
.fm-file-info > div { padding: 10px 0; border-bottom: 1px solid var(--fm-border); }
.fm-file-info dt { color: var(--fm-text-muted); font-size: .78rem; }
.fm-file-info dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: .9rem; font-weight: 600; }
.fm-workspace { display: flex; flex-direction: column; min-width: 0; padding: 14px; background: #090f18; }
.fm-dropzone { position: relative; flex: 1; display: grid; min-height: 480px; place-items: center; overflow: hidden; border: 1px solid #253146; border-radius: var(--fm-radius-md); background: radial-gradient(circle at 50% 35%, #111a27 0%, #0b111a 58%, #080d14 100%); outline: none; box-shadow: inset 0 1px 0 rgb(255 255 255 / 2%), 0 14px 34px rgb(0 0 0 / 18%); transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.fm-dropzone:focus-visible, .fm-dropzone.is-dragover { border-color: var(--fm-accent); background: #0e1725; box-shadow: 0 0 0 3px rgb(50 107 255 / 16%), 0 14px 34px rgb(0 0 0 / 20%); }
.fm-dropzone__empty { max-width: 440px; padding: var(--fm-space-5); text-align: center; }
.fm-dropzone__icon { display: grid; width: 58px; height: 58px; margin: 0 auto var(--fm-space-3); place-items: center; border: 1px solid var(--fm-border); border-radius: 16px; background: var(--fm-surface-raised); color: #8eaeff; font-size: 2rem; box-shadow: 0 12px 30px rgb(0 0 0 / 24%); }
.fm-dropzone__title { margin: 0; color: var(--fm-text); font-size: 1.08rem; }
.fm-dropzone__text { margin: 8px 0 20px; color: var(--fm-text-muted); }
.fm-button { min-height: 40px; padding: 9px 14px; border: 1px solid transparent; border-radius: var(--fm-radius-sm); cursor: pointer; font-weight: 680; transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease; }
.fm-button:disabled { opacity: .42; cursor: not-allowed; }
.fm-button--primary { border-color: #4a7aff; background: linear-gradient(180deg, #3f75ff 0%, #2861ee 100%); color: #fff; box-shadow: 0 7px 18px rgb(27 77 208 / 24%); }
.fm-button--primary:hover:not(:disabled) { background: linear-gradient(180deg, #4c80ff 0%, #326bff 100%); box-shadow: 0 9px 22px rgb(27 77 208 / 30%); transform: translateY(-1px); }
.fm-button--secondary { border-color: var(--fm-border); background: #131b27; color: #e3e9f2; }
.fm-button--compact { min-height: 34px; padding: 7px 10px; background: var(--fm-accent); color: #fff; font-size: .78rem; }
.fm-button--full { width: 100%; }
.fm-stage { width: 100%; height: 100%; min-height: 476px; }
.fm-stage__viewport { position: relative; width: 100%; height: 100%; min-height: 476px; overflow: hidden; background: #070b11; }
.fm-stage__surface { position: relative; width: 100%; height: 100%; min-height: 476px; overflow: visible; background: #070b11; cursor: default; touch-action: none; user-select: none; transform: translate3d(var(--fm-workspace-pan-x, 0px), var(--fm-workspace-pan-y, 0px), 0) scale(var(--fm-workspace-scale, 1)); transform-origin: 50% 50%; will-change: transform; }
.fm-stage__surface:active { cursor: default; }
.fm-crop-aperture { position: absolute; z-index: 0; left: 0; top: 0; width: var(--fm-stage-width, 100%); height: var(--fm-stage-height, 100%); overflow: visible; pointer-events: none; }
.fm-stage__content { position: absolute; left: 0; top: 0; width: var(--fm-stage-width, 100%); height: var(--fm-stage-height, 100%); overflow: visible; }
.fm-stage__surface.is-crop-interactive { cursor: default; }
.fm-stage__surface.is-crop-dragging { cursor: grabbing; }
.fm-stage__viewport.is-workspace-pan-ready,
.fm-stage__viewport.is-workspace-pan-ready .fm-stage__surface { cursor: grab !important; }
.fm-stage__viewport.is-workspace-panning,
.fm-stage__viewport.is-workspace-panning .fm-stage__surface { cursor: grabbing !important; }
.fm-stage__viewport.is-workspace-pan-ready .fm-annotation-cursor,
.fm-stage__viewport.is-workspace-panning .fm-annotation-cursor { display: none !important; }
.fm-stage__pan-hint { position: absolute; right: 14px; top: 14px; z-index: 20; margin: 0; padding: 8px 11px; border: 1px solid rgb(255 255 255 / 13%); border-radius: 9px; background: rgb(9 14 22 / 78%); color: rgb(239 244 252 / 82%); box-shadow: 0 8px 22px rgb(0 0 0 / 18%); font-size: .69rem; line-height: 1.2; pointer-events: none; backdrop-filter: blur(12px) saturate(1.1); }
.fm-editor .fm-stage__pan-hint kbd { padding: 2px 6px; border: 1px solid rgb(255 255 255 / 18%); border-bottom-color: rgb(255 255 255 / 28%); border-radius: 5px; background: rgb(255 255 255 / 8%); color: #fff; font: inherit; font-weight: 800; }

.fm-workspace-controls { position: absolute; z-index: 21; left: 50%; bottom: 16px; translate: -50% 0; display: inline-flex; align-items: center; gap: 3px; min-height: 44px; padding: 5px; border: 1px solid rgb(255 255 255 / 11%); border-radius: 13px; background: rgb(12 18 28 / 88%); box-shadow: 0 14px 34px rgb(0 0 0 / 30%), inset 0 1px 0 rgb(255 255 255 / 4%); backdrop-filter: blur(18px) saturate(1.12); }
.fm-workspace-controls__button { display: grid; width: 34px; height: 34px; padding: 0; place-items: center; border: 0; border-radius: 9px; background: transparent; color: #c6cfdb; cursor: pointer; font: inherit; font-size: 1.05rem; transition: background 140ms ease, color 140ms ease, transform 140ms ease; }
.fm-workspace-controls__button:hover:not(:disabled) { background: rgb(255 255 255 / 7%); color: #fff; transform: translateY(-1px); }
.fm-workspace-controls__button:active:not(:disabled) { transform: translateY(0); }
.fm-workspace-controls__button:disabled { cursor: not-allowed; opacity: .34; }
.fm-workspace-controls__button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fm-workspace-controls__divider { width: 1px; height: 22px; margin: 0 2px; background: rgb(255 255 255 / 9%); }
.fm-workspace-controls__zoom { min-width: 58px; padding: 0 5px; color: #eef3fa; text-align: center; font-size: .72rem; font-weight: 760; letter-spacing: -.01em; }
.fm-workspace-controls:focus-within { border-color: rgb(78 126 255 / 36%); box-shadow: 0 0 0 3px rgb(50 107 255 / 10%), 0 14px 34px rgb(0 0 0 / 30%); }
.fm-stage__image { position: absolute; top: 50%; left: 50%; display: block; max-width: none; max-height: none; transform-origin: center; translate: -50% -50%; pointer-events: none; user-select: none; -webkit-user-drag: none; will-change: transform, width, height; }
.fm-crop-frame[hidden] { display: none !important; }
.fm-crop-frame { position: absolute; z-index: 2; box-sizing: border-box; border: 0; outline: 2px solid #fff; outline-offset: 0; box-shadow: 0 0 0 9999px rgb(0 0 0 / 58%); pointer-events: none; }
.fm-crop-aperture, .fm-stage__paper, .fm-stage__photo-window, .fm-product-guides, .fm-product-guides__trim, .fm-product-guides__safe { box-sizing: border-box; }
.fm-crop-frame::before, .fm-crop-frame::after { position: absolute; width: 18px; height: 18px; content: ""; border-color: #fff; }
.fm-crop-frame::before { top: -4px; left: -4px; border-top: 4px solid; border-left: 4px solid; }
.fm-crop-frame::after { right: -4px; bottom: -4px; border-right: 4px solid; border-bottom: 4px solid; }
.fm-crop-grid { position: absolute; background: rgb(255 255 255 / 52%); }
.fm-crop-grid--v1, .fm-crop-grid--v2 { top: 0; bottom: 0; width: 1px; }
.fm-crop-grid--v1 { left: 33.333%; }
.fm-crop-grid--v2 { left: 66.666%; }
.fm-crop-grid--h1, .fm-crop-grid--h2 { right: 0; left: 0; height: 1px; }
.fm-crop-grid--h1 { top: 33.333%; }
.fm-crop-grid--h2 { top: 66.666%; }
.fm-loader { display: flex; align-items: center; gap: 10px; color: var(--fm-text-muted); }
.fm-loader__spinner { width: 22px; height: 22px; border: 3px solid var(--fm-border); border-top-color: var(--fm-accent); border-radius: 50%; animation: fm-spin .8s linear infinite; }
.fm-message { margin-top: var(--fm-space-3); padding: 12px 14px; border-radius: var(--fm-radius-sm); }
.fm-message--error { background: #2b171c; color: #ff9098; border: 1px solid #6f333b; }
.fm-message--success { background: #10251f; color: #74d8b2; border: 1px solid #215d49; }
.fm-message--warning { background: #302711; color: #ffd86b; border: 1px solid #806622; }
.fm-import-notice {
  position: fixed;
  z-index: 100000;
  bottom: calc(30px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  display: flex;
  max-width: min(520px, calc(100vw - 32px));
  min-height: 50px;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  translate: -50% 0;
  border: 1px solid #d5d9df;
  border-radius: 16px;
  background: rgb(255 255 255 / 97%);
  color: #25282d;
  box-shadow: 0 14px 40px rgb(0 0 0 / 22%);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  pointer-events: none;
  backdrop-filter: blur(12px);
}
.fm-import-notice::before {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border: 3px solid #d9dde3;
  border-top-color: var(--fm-ref-green, #f0a000);
  border-radius: 50%;
  content: "";
  animation: fm-spin .8s linear infinite;
}
.fm-import-notice[hidden] { display: none !important; }
.fm-editor[data-import-in-flight] .fm-stage,
.fm-editor[data-import-in-flight] .fm-photo-project,
.fm-editor[data-import-in-flight] .fm-crop-handle-layer,
html[data-fm-import-in-flight] .fm-crop-handle-layer {
  pointer-events: none !important;
  user-select: none !important;
}
.fm-editor[data-import-in-flight] .fm-stage__surface { cursor: progress !important; }
.fm-ratio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.fm-ratio { min-height: 40px; padding: 8px; border: 1px solid var(--fm-border); border-radius: 9px; background: #131b27; color: #dfe6f0; cursor: pointer; }
.fm-ratio[aria-pressed="true"] { border-color: #3d72ff; background: rgb(50 107 255 / 16%); color: #cbd8ff; font-weight: 700; }
.fm-ratio:disabled { opacity: .45; cursor: not-allowed; }
.fm-custom-ratio { display: grid; grid-template-columns: 1fr auto 1fr; gap: 7px; align-items: end; margin-top: 12px; }
.fm-custom-ratio label span { display: block; margin-bottom: 4px; color: var(--fm-text-muted); font-size: .72rem; }
.fm-custom-ratio input { width: 100%; min-height: 38px; padding: 8px; border: 1px solid var(--fm-border); border-radius: 9px; background: #111925; color: var(--fm-text); }
.fm-custom-ratio .fm-button { grid-column: 1 / -1; }
.fm-control__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: #e8edf5; font-size: .8rem; font-weight: 680; }
.fm-range { width: 100%; height: 22px; margin: 0; background: transparent; accent-color: var(--fm-accent); appearance: none; }
.fm-range::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: #2a3546; }
.fm-range::-webkit-slider-thumb { width: 15px; height: 15px; margin-top: -5.5px; border: 2px solid #dfe8ff; border-radius: 50%; background: var(--fm-accent); box-shadow: 0 1px 6px rgb(0 0 0 / 34%); appearance: none; }
.fm-range::-moz-range-track { height: 4px; border: 0; border-radius: 999px; background: #2a3546; }
.fm-range::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--fm-accent); }
.fm-range::-moz-range-thumb { width: 13px; height: 13px; border: 2px solid #dfe8ff; border-radius: 50%; background: var(--fm-accent); box-shadow: 0 1px 6px rgb(0 0 0 / 34%); }
.fm-help { margin: 9px 0 14px; color: var(--fm-text-muted); font-size: .72rem; line-height: 1.5; }
.fm-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.fm-page [hidden] { display: none !important; }
@keyframes fm-spin { to { transform: rotate(360deg); } }
@media (max-width: 1100px) {
  .fm-editor__body { grid-template-columns: 96px minmax(0, 1fr) 320px; }
  .fm-tool { min-height: 74px; }
}
@media (max-width: 980px) {
  .fm-editor__body { grid-template-columns: 1fr; }
  .fm-toolbar { flex-direction: row; gap: 8px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--fm-border); }
  .fm-tool { min-width: 104px; min-height: 64px; }
  .fm-tool__icon { width: 21px; height: 21px; }
  .fm-panel { border-top: 1px solid var(--fm-border); border-left: 0; }
  .fm-dropzone, .fm-stage, .fm-stage__viewport, .fm-stage__surface { min-height: 440px; }
}
@media (max-width: 640px) {
  .fm-standalone .fm-page { padding: 0; }
  .fm-standalone .fm-editor { min-height: 100vh; border: 0; border-radius: 0; }
  .fm-editor__header { align-items: flex-start; padding: 14px 16px; }
  .fm-editor__identity { align-items: flex-start; flex-direction: column; gap: 3px; }
  .fm-editor__eyebrow { padding-right: 0; font-size: .64rem; }
  .fm-editor__title { margin-left: 0; padding-left: 0; border-left: 0; font-size: .96rem; }
  .fm-workspace { padding: 10px; }
  .fm-dropzone, .fm-stage, .fm-stage__viewport, .fm-stage__surface { min-height: 420px; }
}
@media (prefers-reduced-motion: reduce) { .fm-loader__spinner { animation-duration: 1.6s; } .fm-photo-project__item, .fm-photo-project__add, .fm-workspace-controls__button { transition-duration: .01ms !important; } }
.fm-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.fm-action-grid .fm-button { min-width: 0; padding-inline: 8px; }
.fm-panel__title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fm-link-button { padding: 0; border: 0; background: transparent; color: var(--fm-accent); cursor: pointer; font-size: .76rem; font-weight: 700; }
.fm-link-button[aria-pressed="true"] { text-decoration: underline; }
.fm-adjustments { display: grid; gap: 16px; margin-bottom: 16px; }
.fm-adjustment__row { display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 8px; align-items: center; }
.fm-reset-control { width: 32px; height: 32px; padding: 0; border: 1px solid var(--fm-border); border-radius: 8px; background: var(--fm-surface); color: var(--fm-text); cursor: pointer; }
.fm-reset-control:disabled { opacity: .45; cursor: not-allowed; }

/* ZIP 05 — historia i bezpieczeństwo pracy */
.fm-editor__header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.fm-history-actions { display: inline-flex; overflow: hidden; gap: 0; border: 1px solid var(--fm-border); border-radius: 10px; background: #111925; }
.fm-icon-button { display: inline-grid; width: 42px; height: 40px; padding: 0; place-items: center; border: 0; border-left: 1px solid var(--fm-border); border-radius: 0; background: transparent; color: #c5cedb; cursor: pointer; font-size: 1.12rem; font-weight: 650; }
.fm-icon-button:first-child { border-left: 0; }
.fm-icon-button:hover:not(:disabled), .fm-button--secondary:hover:not(:disabled), .fm-reset-control:hover:not(:disabled) { border-color: var(--fm-border-strong); background: var(--fm-surface-hover); color: #fff; }
.fm-icon-button:disabled { opacity: .34; cursor: not-allowed; }
.fm-save-status { display: inline-flex; align-items: center; gap: 7px; margin-right: 4px; color: #aab4c2; font-size: .72rem; font-weight: 650; white-space: nowrap; }
.fm-save-status::before { width: 7px; height: 7px; border-radius: 50%; background: #35c88a; box-shadow: 0 0 0 3px rgb(53 200 138 / 8%); content: ""; }
.fm-save-status.is-dirty { color: #e8b46a; }
.fm-save-status.is-dirty::before { background: #f5a623; box-shadow: 0 0 0 3px rgb(245 166 35 / 8%); }
.fm-header-add::before { content: "+"; margin-right: 6px; color: #9fb7ff; font-size: 1rem; line-height: 1; }
.fm-header-export { min-width: 108px; }
.fm-button--danger { border-color: #5b3038; background: #25161b; color: #ff8c95; }
.fm-button--danger:hover:not(:disabled) { border-color: #8b424c; background: #321a20; color: #ffb1b7; }
.fm-project-actions { display: grid; gap: 8px; }
.fm-stage__surface:focus-visible, .fm-button:focus-visible, .fm-icon-button:focus-visible, .fm-tool:focus-visible, .fm-ratio:focus-visible, .fm-link-button:focus-visible, .fm-reset-control:focus-visible, .fm-range:focus-visible, .fm-custom-ratio input:focus-visible { outline: 3px solid rgb(78 126 255 / 34%); outline-offset: 2px; }

@media (max-width: 760px) {
  .fm-editor__header { flex-direction: column; }
  .fm-editor__header-actions { width: 100%; justify-content: flex-start; }
  .fm-save-status { margin-right: auto; }
  .fm-header-export { margin-left: auto; }
}

/* ZIP 06 — eksport i kontrola jakości */
.fm-field { display: grid; gap: 6px; margin-bottom: 12px; color: var(--fm-text-muted); font-size: .78rem; font-weight: 700; }
.fm-field select, .fm-field input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--fm-border); border-radius: 9px; background: #111925; color: var(--fm-text); font: inherit; }
.fm-field input[readonly] { background: color-mix(in srgb, var(--fm-surface) 86%, var(--fm-border)); cursor: default; }
.fm-export-dimensions { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: end; }
.fm-export-dimensions__lock { display: grid; min-height: 40px; place-items: center; color: var(--fm-text-muted); font-size: .8rem; }
.fm-export-quality { margin: 4px 0 14px; }
.fm-export-quality.is-disabled { opacity: .58; }
.fm-export-summary { display: grid; gap: 7px; margin: 14px 0; font-size: .78rem; }
.fm-export-summary div { display: flex; justify-content: space-between; gap: 12px; }
.fm-export-summary dt { color: var(--fm-text-muted); }
.fm-export-summary dd { margin: 0; text-align: right; font-weight: 700; }
.fm-quality-status { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--fm-border); border-radius: 9px; background: #111925; color: var(--fm-text-muted); font-size: .74rem; line-height: 1.45; }
.fm-quality-status[data-level="good"] { border-color: #215d49; background: #10251f; color: #74d8b2; }
.fm-quality-status[data-level="notice"] { border-color: #264c7d; background: #101f34; color: #8db8ff; }
.fm-quality-status[data-level="warning"] { border-color: #6b4e22; background: #2a2113; color: #e8b46a; }
.fm-quality-status[data-level="poor"] { border-color: #6f333b; background: #2b171c; color: #ff9098; }
.fm-export .fm-button--primary[disabled] { opacity: .5; }

@media (max-width: 420px) {
  .fm-export-dimensions { grid-template-columns: 1fr; }
  .fm-export-dimensions__lock { display: none; }
}

/* ZIP 07 — workflow biura fotograficznego */
.fm-product-guides { position: absolute; z-index: 5; pointer-events: none; }
.fm-product-guides__trim, .fm-product-guides__safe { position: absolute; display: block; }
.fm-product-guides__trim { inset: var(--fm-trim-inset, 2.5%); border: 1px dashed rgb(255 199 0 / 92%); box-shadow: 0 0 0 1px rgb(0 0 0 / 22%); }
.fm-product-guides__safe { inset: var(--fm-safe-inset, 6%); border: 2px solid rgb(54 211 153 / 94%); box-shadow: 0 0 0 1px rgb(0 0 0 / 22%); }
.fm-product-guides.is-frame-preview .fm-product-guides__trim { display: none; }
.fm-product-guides.is-frame-preview .fm-product-guides__safe { inset: var(--fm-frame-safe-inset, 28px); border-width: 2px; border-color: rgb(83 234 176 / 90%); box-shadow: 0 0 0 1px rgb(0 0 0 / 18%), 0 0 0 1px rgb(83 234 176 / 15%) inset; }
.fm-order-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(96px, .55fr); gap: 10px; }
.fm-field textarea { width: 100%; resize: vertical; min-height: 76px; padding: 9px 10px; border: 1px solid var(--fm-border); border-radius: 9px; background: #111925; color: var(--fm-text); font: inherit; line-height: 1.45; }
.fm-risk-acceptance { display: flex; gap: 9px; align-items: flex-start; margin: 4px 0 14px; padding: 10px 12px; border: 1px solid #6f333b; border-radius: 8px; background: #2b171c; color: #ff9098; font-size: .76rem; line-height: 1.4; cursor: pointer; }
.fm-risk-acceptance input { margin-top: 2px; }
.fm-order-summary { display: grid; gap: 7px; margin: 14px 0; font-size: .78rem; }
.fm-order-summary div { display: flex; justify-content: space-between; gap: 12px; }
.fm-order-summary dt { color: var(--fm-text-muted); }
.fm-order-summary dd { margin: 0; max-width: 62%; text-align: right; font-weight: 700; }
.fm-order code { padding: 1px 4px; border-radius: 4px; background: color-mix(in srgb, var(--fm-surface) 82%, var(--fm-border)); font-size: .72rem; }
.fm-order [aria-invalid="true"] { border-color: var(--fm-danger); box-shadow: 0 0 0 2px rgb(217 45 32 / 10%); }
.fm-button.is-busy { cursor: progress; }

@media (max-width: 420px) {
  .fm-order-grid { grid-template-columns: 1fr; }
}

.fm-editor { position: relative; }
.fm-editor.is-interaction-locked { cursor: progress; }
.fm-editor.is-interaction-locked::after { content: ""; position: absolute; inset: 0; z-index: 30; background: rgb(255 255 255 / 1%); pointer-events: none; cursor: progress; }
.fm-honeypot { position: absolute !important; inline-size: 1px !important; block-size: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; }

/* ZIP 12 — non-destructive annotations */
.fm-editor .fm-annotation-canvas { position: absolute; inset: 0; z-index: 1; display: block; pointer-events: none; }
.fm-editor .fm-annotation-cursor { position: absolute; z-index: 4; width: var(--fm-annotation-cursor-size, 12px); height: var(--fm-annotation-cursor-size, 12px); border: 1px solid rgb(255 255 255 / 98%); border-radius: 50%; background: transparent; box-shadow: 0 0 0 1px rgb(0 0 0 / 92%), 0 1px 3px rgb(0 0 0 / 30%); translate: -50% -50%; pointer-events: none; will-change: left, top; }
.fm-editor .fm-annotation-cursor::after { display: none; content: none; }
.fm-editor .fm-stage__surface.is-annotating,
.fm-editor .fm-stage__surface.is-erasing { cursor: none; }
.fm-editor .fm-annotation-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.fm-editor .fm-annotation-tool { display: grid; min-width: 0; min-height: 76px; padding: 10px 5px; place-items: center; align-content: center; gap: 7px; color: #bec8d6; background: #131b27; border: 1px solid var(--fm-border); border-radius: 10px; font: inherit; font-size: .68rem; line-height: 1.15; text-align: center; cursor: pointer; transition: color 140ms ease, background 140ms ease, border-color 140ms ease, transform 140ms ease; }
.fm-editor .fm-annotation-tool::before { display: block; color: currentColor; font-size: 1.28rem; line-height: 1; }
.fm-editor .fm-annotation-tool[data-annotation-tool="pen"]::before { content: "✎"; }
.fm-editor .fm-annotation-tool[data-annotation-tool="marker"]::before { content: "▰"; transform: rotate(-25deg); }
.fm-editor .fm-annotation-tool[data-annotation-tool="eraser"]::before { content: "◇"; }
.fm-editor .fm-annotation-tool[data-annotation-tool="text"]::before { content: "T"; font-family: Georgia, serif; font-size: 1.18rem; }
.fm-editor .fm-annotation-tool[data-annotation-tool="sticker"]::before { content: "☺"; font-size: 1.18rem; }
.fm-editor .fm-annotation-tool:hover:not(:disabled) { color: #fff; background: #182231; border-color: #35445a; transform: translateY(-1px); }
.fm-editor .fm-annotation-tool.is-active { color: #fff; background: linear-gradient(180deg, rgb(50 107 255 / 36%), rgb(50 107 255 / 20%)); border-color: #3d72ff; box-shadow: inset 0 0 0 1px rgb(137 167 255 / 8%); }
.fm-editor .fm-annotation-tool:disabled { cursor: not-allowed; opacity: .55; }
.fm-editor .fm-annotation-color input[type="color"] { width: 100%; min-height: 42px; padding: 4px; border: 1px solid var(--fm-border); border-radius: var(--fm-radius-sm); background: #111925; }
.fm-editor .fm-annotation-tool:focus-visible, .fm-editor [data-annotation-setting]:focus-visible { outline: 3px solid rgb(78 126 255 / 34%); outline-offset: 2px; }
.fm-editor .fm-editor__body { height: calc(100vh - 76px); min-height: 640px; }
.fm-editor .fm-toolbar, .fm-editor .fm-panel, .fm-editor .fm-workspace { min-height: 0; }
.fm-editor .fm-panel { height: 100%; }
@media (max-width: 980px) {
  .fm-editor .fm-editor__body { height: auto; min-height: 0; }
  .fm-editor .fm-panel { height: auto; max-height: none; overflow: visible; }
  .fm-editor .fm-annotation-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ZIP 16 — synchronized range and number controls */
.fm-editor .fm-number-control { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 3px 7px; color: #eef3f9; background: #111925; border: 1px solid var(--fm-border); border-radius: 9px; font-weight: 680; }
.fm-editor .fm-number-control input { width: 70px; min-width: 0; padding: 3px 2px; color: inherit; background: transparent; border: 0; outline: 0; font: inherit; text-align: right; appearance: textfield; }
.fm-editor .fm-number-control input::-webkit-inner-spin-button, .fm-editor .fm-number-control input::-webkit-outer-spin-button { margin: 0; }
.fm-editor .fm-number-control:focus-within { outline: 3px solid rgb(78 126 255 / 34%); outline-offset: 2px; }
.fm-editor .fm-number-control:has(input[aria-invalid="true"]) { border-color: var(--fm-danger); box-shadow: 0 0 0 1px var(--fm-danger); }
.fm-editor .fm-number-control input:disabled { cursor: not-allowed; opacity: .6; }
.fm-editor kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 1.65em; min-height: 1.65em; padding: 0 .35em; border: 1px solid #3a4658; border-bottom-color: #4a586d; border-radius: 5px; background: #151e2a; color: #f1f5fb; font: 700 .78rem/1 system-ui, sans-serif; }
@media (max-width: 560px) { .fm-editor .fm-number-control input { width: 60px; } }

.fm-editor .fm-upload-progress { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--fm-border); border-radius: 10px; background: #111925; }
.fm-editor .fm-upload-progress[hidden] { display: none; }
.fm-editor .fm-upload-progress__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .82rem; }
.fm-editor .fm-upload-progress progress { width: 100%; height: 10px; accent-color: var(--fm-accent); }
.fm-editor.is-interaction-locked .fm-stage__surface { cursor: progress; }

/* ZIP 20 — interactive crop box */
.fm-editor .fm-crop-frame { pointer-events: none; }
.fm-editor .fm-crop-handle { position: absolute; z-index: 5; display: block; width: 14px; height: 14px; border: 2px solid #fff; border-radius: 3px; background: var(--fm-accent); box-shadow: 0 1px 4px rgb(0 0 0 / 55%); pointer-events: none; touch-action: none; }
.fm-editor .fm-crop-handle--nw { top: 0; left: 0; translate: -50% -50%; cursor: nwse-resize; }
.fm-editor .fm-crop-handle--n { top: 0; left: 50%; translate: -50% -50%; cursor: ns-resize; }
.fm-editor .fm-crop-handle--ne { top: 0; right: 0; translate: 50% -50%; cursor: nesw-resize; }
.fm-editor .fm-crop-handle--e { top: 50%; right: 0; translate: 50% -50%; cursor: ew-resize; }
.fm-editor .fm-crop-handle--se { right: 0; bottom: 0; translate: 50% 50%; cursor: nwse-resize; }
.fm-editor .fm-crop-handle--s { bottom: 0; left: 50%; translate: -50% 50%; cursor: ns-resize; }
.fm-editor .fm-crop-handle--sw { bottom: 0; left: 0; translate: -50% 50%; cursor: nesw-resize; }
.fm-editor .fm-crop-handle--w { top: 50%; left: 0; translate: -50% -50%; cursor: ew-resize; }
.fm-editor .fm-stage__surface.is-crop-interactive .fm-crop-frame { pointer-events: auto; cursor: grab; box-shadow: 0 0 0 9999px rgb(0 0 0 / 58%); }
.fm-editor .fm-stage__surface.is-crop-interactive .fm-crop-handle { pointer-events: auto; }
.fm-editor .fm-stage__surface.is-crop-dragging .fm-crop-frame { cursor: grabbing; }
.fm-editor .fm-stage__surface.is-resizing-crop { cursor: default; }
@media (pointer: coarse) {
  .fm-editor .fm-crop-handle { width: 20px; height: 20px; }
}

/* ZIP 26 — Levels & Curves */
.fm-editor .fm-tone-preview { position: absolute; top: 50%; left: 50%; display: block; max-width: none; max-height: none; transform-origin: center; translate: -50% -50%; pointer-events: none; user-select: none; will-change: transform, width, height; }
.fm-editor .fm-tone-preview[hidden] { display: none; }
.fm-editor .fm-tone-panel { margin-top: 14px; padding: 0; border: 1px solid var(--fm-border); border-radius: 11px; background: #111925; overflow: hidden; }
.fm-editor .fm-tone-panel > summary { padding: 11px 12px; color: var(--fm-text); font-size: .84rem; font-weight: 800; cursor: pointer; user-select: none; }
.fm-editor .fm-tone-panel[open] > summary { border-bottom: 1px solid var(--fm-border); }
.fm-editor .fm-tone-panel > :not(summary) { margin-inline: 12px; }
.fm-editor .fm-levels-histogram { display: block; width: calc(100% - 24px); height: 92px; margin-block: 12px; border: 1px solid var(--fm-border); border-radius: 8px; background: #fff; }
.fm-editor .fm-levels-grid { display: grid; gap: 10px; }
.fm-editor .fm-levels-grid .fm-adjustment { margin: 0; }
.fm-editor .fm-curves-canvas { display: block; width: calc(100% - 24px); height: 210px; margin-block: 12px; border: 1px solid var(--fm-border); border-radius: 8px; background: #fff; touch-action: none; cursor: crosshair; }
.fm-editor .fm-curves-canvas:focus-visible { outline: 3px solid rgb(78 126 255 / 34%); outline-offset: 2px; }
.fm-editor .fm-curve-point-controls { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, .7fr) minmax(0, 1fr); gap: 8px; align-items: end; margin-bottom: 8px; }
.fm-editor .fm-curve-point-controls .fm-field { margin: 0; }
.fm-editor .fm-tone-panel > .fm-button--full { width: calc(100% - 24px); margin-block: 10px 12px; }
.fm-editor .fm-tone-panel > .fm-help { margin-block: 8px 10px; }
@media (max-width: 560px) {
  .fm-editor .fm-curve-point-controls { grid-template-columns: 1fr 1fr; }
  .fm-editor .fm-curve-point-controls .fm-button { grid-column: 1 / -1; }
  .fm-editor .fm-curves-canvas { height: 190px; }
}

/* ZIP 27 — non-destructive Blur Brush */
.fm-editor .fm-blur-preview { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; pointer-events: none; }
.fm-editor .fm-blur-preview[hidden] { display: none; }
.fm-editor .fm-annotation-canvas { z-index: 2; }
.fm-editor .fm-object-canvas { position: absolute; inset: 0; z-index: 3; display: block; width: 100%; height: 100%; pointer-events: none; }
.fm-editor .fm-active-softness[hidden] { display: none; }
.fm-editor .fm-crop-frame { z-index: 4; }
.fm-editor .fm-annotation-cursor { z-index: 6; }
.fm-editor .fm-crop-handle { z-index: 7; }
.fm-editor .fm-stage__surface.is-blurring { cursor: none; }
.fm-editor .fm-blur-panel { margin-top: 16px; border: 1px solid var(--fm-border); border-radius: 11px; background: #111925; overflow: hidden; }
.fm-editor .fm-blur-panel > summary { padding: 11px 12px; color: var(--fm-text); font-size: .84rem; font-weight: 800; cursor: pointer; user-select: none; }
.fm-editor .fm-blur-panel[open] > summary { border-bottom: 1px solid var(--fm-border); }
.fm-editor .fm-blur-panel > :not(summary) { margin-inline: 12px; }
.fm-editor .fm-blur-panel .fm-blur-tools { margin-block: 12px; }
.fm-editor .fm-blur-panel .fm-range { margin-bottom: 12px; }
.fm-editor .fm-blur-panel > .fm-button--full { width: calc(100% - 24px); margin-block: 8px 10px; }
.fm-editor .fm-blur-panel > .fm-quality-status { margin-inline: 12px; margin-bottom: 12px; }

/* ZIP 29 / ZIP 40 — premium floating multi-photo filmstrip. */
.fm-editor .fm-photo-project { position: absolute; z-index: 30; left: calc(50% - 124px); bottom: 84px; translate: -50% 0; display: grid; width: min(calc(100% - 528px), 860px); min-width: 360px; padding: 0; overflow: hidden; border: 1px solid rgb(255 255 255 / 11%); border-radius: 18px; background: rgb(13 20 30 / 91%); box-shadow: 0 20px 50px rgb(0 0 0 / 38%), inset 0 1px 0 rgb(255 255 255 / 4%); backdrop-filter: blur(22px) saturate(1.12); transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease; }
.fm-editor .fm-photo-project:hover { border-color: rgb(255 255 255 / 16%); box-shadow: 0 24px 58px rgb(0 0 0 / 42%), inset 0 1px 0 rgb(255 255 255 / 5%); }
.fm-editor .fm-photo-project[hidden] { display: none; }
.fm-editor .fm-photo-project__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 38px; padding: 0 13px 0 15px; border: 0; border-bottom: 1px solid rgb(255 255 255 / 7%); background: rgb(18 27 40 / 72%); color: var(--fm-text); font: inherit; cursor: pointer; }
.fm-editor .fm-photo-project__title { color: #f1f5fa; font-size: .72rem; font-weight: 760; letter-spacing: .01em; }
.fm-editor .fm-photo-project__head-meta { display: inline-flex; align-items: center; gap: 8px; color: #8996a8; font-size: .66rem; font-weight: 650; }
.fm-editor .fm-photo-project__chevron { display: inline-grid; width: 20px; height: 20px; place-items: center; border-radius: 7px; background: rgb(255 255 255 / 5%); color: #c3ccd8; font-size: .82rem; line-height: 1; transition: transform 220ms cubic-bezier(.22,.88,.22,1), background 160ms ease, color 160ms ease; }
.fm-editor .fm-photo-project__head:hover .fm-photo-project__chevron { background: rgb(255 255 255 / 9%); color: #fff; }
.fm-editor .fm-photo-project[data-dock-state="collapsed"] .fm-photo-project__chevron { transform: rotate(180deg); }
.fm-editor .fm-photo-project__list { display: flex; align-items: stretch; gap: 9px; overflow-x: auto; overflow-y: hidden; padding: 10px 11px 11px; scrollbar-width: thin; scrollbar-color: #344157 transparent; scroll-snap-type: x proximity; transform-origin: center bottom; transition: max-height 300ms cubic-bezier(.22,.88,.22,1), opacity 220ms ease, transform 300ms cubic-bezier(.22,.88,.22,1), padding 230ms ease, clip-path 300ms cubic-bezier(.22,.88,.22,1); clip-path: inset(0 0 0 0 round 16px); }
.fm-editor .fm-photo-project[data-dock-state="collapsed"] .fm-photo-project__list { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; transform: translateY(12px) scale(.985); clip-path: inset(0 0 100% 0 round 16px); pointer-events: none; }
.fm-editor .fm-photo-project[data-dock-state="expanded"] .fm-photo-project__list { max-height: 178px; opacity: 1; transform: translateY(0) scale(1); clip-path: inset(0 0 0 0 round 16px); }
.fm-editor .fm-photo-project__item { --fm-dock-stagger: 0; position: relative; flex: 0 0 126px; display: grid; grid-template-rows: 78px 28px 30px; min-width: 0; overflow: hidden; border: 1px solid #2b3748; border-radius: 13px; background: #111925; box-shadow: 0 7px 18px rgb(0 0 0 / 20%); scroll-snap-align: start; transform: translateY(0) scale(1); transform-origin: center bottom; opacity: 1; filter: blur(0); transition: transform 210ms cubic-bezier(.2,.9,.2,1), border-color 160ms ease, box-shadow 160ms ease, opacity 200ms ease, filter 200ms ease; transition-delay: calc(var(--fm-dock-stagger) * 18ms); will-change: transform, opacity; }
.fm-editor .fm-photo-project__item:hover { z-index: 3; border-color: #43536a; box-shadow: 0 13px 26px rgb(0 0 0 / 30%); }
.fm-editor .fm-photo-project[data-dock-state="collapsed"] .fm-photo-project__item { opacity: 0; filter: blur(2px); transform: translateY(22px) scale(.91); transition-delay: 0ms; }
.fm-editor .fm-photo-project[data-dock-state="expanded"] .fm-photo-project__item { opacity: 1; filter: blur(0); }
.fm-editor .fm-photo-project__item.is-active { border-color: #4c7dff; box-shadow: 0 0 0 2px rgb(50 107 255 / 22%), 0 13px 28px rgb(0 0 0 / 28%); }
.fm-editor .fm-photo-project__item.is-active::after { position: absolute; inset: 0; border: 1px solid rgb(133 165 255 / 35%); border-radius: inherit; pointer-events: none; content: ""; }
.fm-editor .fm-photo-project__select { position: relative; display: block; min-width: 0; padding: 0; overflow: hidden; border: 0; background: #090e16; color: #fff; text-align: left; cursor: pointer; }
.fm-editor .fm-photo-project__thumb { display: block; width: 100%; height: 78px; object-fit: cover; background: #090e16; transition: transform 260ms cubic-bezier(.2,.8,.2,1), filter 180ms ease; }
.fm-editor .fm-photo-project__item:hover .fm-photo-project__thumb { transform: scale(1.025); }
.fm-editor .fm-photo-project__name { position: absolute; inset-inline: 0; bottom: 0; display: block; overflow: hidden; padding: 20px 8px 6px; background: linear-gradient(to bottom, transparent, rgb(4 8 14 / 83%)); color: #f5f7fb; text-overflow: ellipsis; white-space: nowrap; font-size: .58rem; font-weight: 720; }
.fm-editor .fm-photo-project__fit { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #263244; border-bottom: 1px solid #263244; }
.fm-editor .fm-photo-project__fit-button { min-height: 28px; padding: 3px 4px; border: 0; background: #111925; color: #7f8c9f; font: inherit; font-size: .53rem; font-weight: 760; line-height: 1.05; text-transform: uppercase; cursor: pointer; transition: background 140ms ease, color 140ms ease; }
.fm-editor .fm-photo-project__fit-button + .fm-photo-project__fit-button { border-left: 1px solid #263244; }
.fm-editor .fm-photo-project__fit-button:hover:not(:disabled) { background: #182231; color: #dce4ef; }
.fm-editor .fm-photo-project__fit-button.is-active { color: #a9c0ff; background: rgb(50 107 255 / 13%); }
.fm-editor .fm-photo-project__fit-button:focus-visible, .fm-editor .fm-photo-project__footer button:focus-visible, .fm-editor .fm-photo-project__quantity-input:focus-visible, .fm-editor .fm-photo-project__select:focus-visible, .fm-editor .fm-photo-project__head:focus-visible, .fm-editor .fm-photo-project__add:focus-visible { position: relative; z-index: 5; outline: 3px solid rgb(50 107 255 / 28%); outline-offset: -2px; }
.fm-editor .fm-photo-project__footer { display: grid; grid-template-columns: 28px 22px minmax(28px, 1fr) 22px 28px; min-height: 30px; }
.fm-editor .fm-photo-project__footer > * { min-width: 0; border: 0; border-left: 1px solid #263244; border-radius: 0; background: #111925; color: #b1bdcb; font: inherit; transition: background 140ms ease, color 140ms ease; }
.fm-editor .fm-photo-project__footer > :first-child { border-left: 0; }
.fm-editor .fm-photo-project__footer button:hover:not(:disabled) { background: #182231; color: #fff; }
.fm-editor .fm-photo-project__icon-action, .fm-editor .fm-photo-project__quantity-button { display: grid; place-items: center; padding: 0; font-size: .78rem; cursor: pointer; }
.fm-editor .fm-photo-project__duplicate { color: #8daaff; font-size: .82rem; }
.fm-editor .fm-photo-project__remove { color: #d77b83; font-size: 1rem; }
.fm-editor .fm-photo-project__remove:hover:not(:disabled) { background: #2a171d; color: #ff9da4; }
.fm-editor .fm-photo-project__quantity-button { font-size: .88rem; }
.fm-editor .fm-photo-project__quantity-button:disabled { cursor: not-allowed; opacity: .34; }
.fm-editor .fm-photo-project__quantity-input { width: 100%; min-height: 30px; padding: 1px 2px; text-align: center; appearance: textfield; font-size: .62rem; font-weight: 760; }
.fm-editor .fm-photo-project__quantity-input::-webkit-inner-spin-button, .fm-editor .fm-photo-project__quantity-input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.fm-editor .fm-photo-project__dirty { position: absolute; z-index: 4; top: 7px; left: 7px; width: 7px; height: 7px; border-radius: 50%; background: #f5a623; box-shadow: 0 0 0 2px #101824, 0 1px 5px rgb(0 0 0 / 45%); pointer-events: none; }
.fm-editor .fm-photo-project__add-item { flex: 0 0 82px; display: flex; scroll-snap-align: start; }
.fm-editor .fm-photo-project__add { flex: 1; display: grid; min-height: 136px; place-items: center; align-content: center; gap: 7px; padding: 10px 8px; border: 1px dashed #39485e; border-radius: 13px; background: rgb(17 25 37 / 62%); color: #8795a8; cursor: pointer; font: inherit; font-size: .6rem; font-weight: 720; transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 180ms cubic-bezier(.2,.9,.2,1), box-shadow 160ms ease; }
.fm-editor .fm-photo-project__add:hover { border-color: #567fff; background: rgb(50 107 255 / 10%); color: #dce6ff; transform: translateY(-3px); box-shadow: 0 10px 24px rgb(0 0 0 / 22%); }
.fm-editor .fm-photo-project__add-icon { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #40516a; border-radius: 11px; background: #162031; color: #a8bdff; font-size: 1.35rem; font-weight: 400; line-height: 1; transition: background 160ms ease, border-color 160ms ease, transform 180ms ease; }
.fm-editor .fm-photo-project__add:hover .fm-photo-project__add-icon { border-color: #5a83ff; background: rgb(50 107 255 / 16%); transform: scale(1.05); }
@media (max-width: 1100px) and (min-width: 981px) {
  .fm-editor .fm-photo-project { left: calc(50% - 112px); width: min(calc(100% - 472px), 760px); min-width: 320px; }
}
@media (max-width: 1024px) {
  .fm-editor .fm-editor__body { padding-bottom: 0; }
  .fm-editor .fm-photo-project { position: static; translate: none; width: auto; min-width: 0; margin: 10px 12px 0; border-radius: 16px; box-shadow: 0 12px 30px rgb(0 0 0 / 24%); }
  .fm-editor .fm-photo-project__list { max-height: none !important; opacity: 1 !important; transform: none !important; padding: 9px 10px 10px; }
}
@media (max-width: 700px) {
  .fm-editor .fm-photo-project { margin-inline: 9px; }
  .fm-editor .fm-photo-project__list { gap: 8px; }
  .fm-editor .fm-photo-project__item { flex-basis: 116px; grid-template-rows: 70px 28px 30px; }
  .fm-editor .fm-photo-project__thumb { height: 70px; }
  .fm-editor .fm-photo-project__add-item { flex-basis: 76px; }
  .fm-editor .fm-photo-project__add { min-height: 128px; }
  .fm-editor .fm-photo-project__fit-button { font-size: .5rem; }
}

/* ZIP 32 — Text Objects */
.fm-editor .fm-text-panel { display: grid; gap: 12px; margin-top: 14px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.fm-editor .fm-text-panel[hidden] { display: none; }
.fm-editor .fm-text-panel__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fm-editor .fm-text-panel__header h3 { margin: 0; font-size: .95rem; }
.fm-editor .fm-text-panel__header p { margin: 4px 0 0; color: var(--fm-text-muted); font-size: .74rem; line-height: 1.35; }
.fm-editor .fm-text-panel__header .fm-button { flex: 0 0 auto; padding: 8px 10px; font-size: .78rem; }
.fm-editor .fm-text-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fm-editor .fm-text-color input[type="color"] { width: 100%; min-height: 42px; padding: 4px; border: 1px solid var(--fm-border); border-radius: var(--fm-radius-sm); background: #111925; }
.fm-editor .fm-text-formatting { display: grid; grid-template-columns: 42px 1px repeat(3, 42px); gap: 7px; align-items: center; }
.fm-editor .fm-text-toggle { min-height: 38px; padding: 7px; }
.fm-editor .fm-text-toggle[aria-pressed="true"] { border-color: var(--fm-accent); background: color-mix(in srgb, var(--fm-accent) 9%, var(--fm-surface)); color: var(--fm-accent); }
.fm-editor .fm-text-formatting__separator { width: 1px; height: 28px; background: var(--fm-border); }
.fm-editor .fm-text-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fm-editor .fm-stage__surface.is-object-editing { cursor: default; }
.fm-editor .fm-stage__surface.is-object-editing:active { cursor: default; }
@media (max-width: 560px) {
  .fm-editor .fm-annotation-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-editor .fm-text-grid, .fm-editor .fm-text-actions { grid-template-columns: 1fr; }
  .fm-editor .fm-text-panel__header { flex-direction: column; }
  .fm-editor .fm-text-panel__header .fm-button { width: 100%; }
}

/* ZIP 33 — Sticker Objects */
.fm-editor .fm-sticker-panel { display: grid; gap: 14px; margin-top: 16px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.fm-editor .fm-sticker-panel[hidden] { display: none; }
.fm-editor .fm-sticker-panel__header h3 { margin: 0; font-size: .95rem; }
.fm-editor .fm-sticker-panel__header p { margin: 4px 0 0; color: var(--fm-text-muted); font-size: .74rem; line-height: 1.35; }
.fm-editor .fm-sticker-library { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fm-editor .fm-sticker-library__item { display: grid; place-items: center; gap: 6px; min-width: 0; min-height: 82px; padding: 7px 5px; border: 1px solid var(--fm-border); border-radius: 10px; background: #131b27; color: var(--fm-text); font: inherit; cursor: pointer; transition: border-color 140ms ease, background 140ms ease, transform 140ms ease, box-shadow 140ms ease; }
.fm-editor .fm-sticker-library__item:hover { border-color: #3a4960; background: #182231; transform: translateY(-1px); box-shadow: 0 7px 16px rgb(0 0 0 / 16%); }
.fm-editor .fm-sticker-library__item:focus-visible { outline: 3px solid color-mix(in srgb, var(--fm-accent) 25%, transparent); outline-offset: 2px; }
.fm-editor .fm-sticker-library__item:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.fm-editor .fm-sticker-library__preview { display: block; width: 48px; max-width: 100%; height: auto; aspect-ratio: 1 / 1; }
.fm-editor .fm-sticker-library__item span { overflow: hidden; max-width: 100%; color: #9ba8ba; font-size: .62rem; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.fm-editor .fm-sticker-formatting, .fm-editor .fm-sticker-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fm-editor .fm-sticker-toggle[aria-pressed="true"] { border-color: var(--fm-accent); background: color-mix(in srgb, var(--fm-accent) 9%, var(--fm-surface)); color: var(--fm-accent); }
@media (max-width: 560px) {
  .fm-editor .fm-sticker-library { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fm-editor .fm-sticker-actions, .fm-editor .fm-sticker-formatting { grid-template-columns: 1fr; }
}

/* ZIP53: print framing is the canonical print-fit control. */
.fm-editor .fm-print-framing { display: grid; gap: 12px; margin: 0 0 16px; padding: 13px; border: 1px solid #273448; border-radius: 13px; background: #0d1521; }
.fm-editor .fm-print-framing__format { margin: 0; }
.fm-editor .fm-print-framing__fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.fm-editor .fm-print-framing__fieldset legend { margin: 0 0 7px; padding: 0; color: var(--fm-text-muted); font-size: .78rem; font-weight: 760; }
.fm-editor .fm-print-framing__modes { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.fm-editor .fm-print-framing__mode { display: grid; min-width: 0; min-height: 72px; align-content: center; gap: 4px; padding: 10px; border: 1px solid #314056; border-radius: 10px; background: #111b29; color: #dce5f2; text-align: left; cursor: pointer; font: inherit; transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease; }
.fm-editor .fm-print-framing__mode strong { font-size: .78rem; line-height: 1.15; }
.fm-editor .fm-print-framing__mode span { color: #8d9aae; font-size: .62rem; font-weight: 620; line-height: 1.3; }
.fm-editor .fm-print-framing__mode:hover:not(:disabled) { border-color: #5079e8; background: #162238; }
.fm-editor .fm-print-framing__mode.is-active { border-color: #4b7cff; background: rgb(50 107 255 / 15%); box-shadow: inset 0 0 0 1px rgb(100 145 255 / 22%); }
.fm-editor .fm-print-framing__mode.is-active span { color: #b7c8ef; }
.fm-editor .fm-print-framing__mode:focus-visible { outline: 3px solid rgb(50 107 255 / 28%); outline-offset: 2px; }
.fm-editor .fm-print-framing__border { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 8px 10px; border: 1px solid #263348; border-radius: 10px; background: #111925; color: #dbe4ef; cursor: pointer; }
.fm-editor .fm-print-framing__border input { width: 18px; height: 18px; margin: 0; accent-color: var(--fm-accent); }
.fm-editor .fm-print-framing__border span { display: grid; gap: 2px; }
.fm-editor .fm-print-framing__border strong { font-size: .72rem; }
.fm-editor .fm-print-framing__border small { color: #8796aa; font-size: .6rem; font-weight: 600; }
.fm-editor .fm-print-framing__border.is-disabled { cursor: not-allowed; opacity: .46; }
.fm-editor .fm-print-framing__summary { margin: 0; color: #9cabbf; font-size: .65rem; font-weight: 620; line-height: 1.4; }
.fm-editor .fm-photo-project__item[data-fit-mode="frame"] .fm-photo-project__select { background: #fff; }
.fm-editor .fm-photo-project__item[data-fit-mode="frame"] .fm-photo-project__thumb { object-fit: contain; background: #fff; }
.fm-editor .fm-photo-project__item[data-fit-mode="frame"][data-extra-white-border="true"] .fm-photo-project__thumb { padding: 7px; }
@media (max-width: 540px) { .fm-editor .fm-print-framing__modes { grid-template-columns: 1fr; } }

/* ZIP54: explicit multi-photo selection for bulk editing. */
.fm-editor .fm-photo-project__bulk { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 11px; border-bottom: 1px solid rgb(255 255 255 / 7%); background: rgb(13 21 33 / 88%); }
.fm-editor .fm-photo-project[data-dock-state="collapsed"] .fm-photo-project__bulk { display: none; }
.fm-editor .fm-photo-project__bulk-status { color: #b9c5d5; font-size: .62rem; font-weight: 720; white-space: nowrap; }
.fm-editor .fm-photo-project__bulk-actions { display: inline-flex; gap: 6px; }
.fm-editor .fm-photo-project__bulk-actions button { min-height: 27px; padding: 4px 9px; border: 1px solid #334158; border-radius: 8px; background: #111a27; color: #aebbd0; font: inherit; font-size: .56rem; font-weight: 720; cursor: pointer; }
.fm-editor .fm-photo-project__bulk-actions button:hover:not(:disabled) { border-color: #557dff; color: #edf3ff; background: rgb(50 107 255 / 12%); }
.fm-editor .fm-photo-project__bulk-actions button:disabled { opacity: .38; cursor: default; }
.fm-editor .fm-photo-project__item.is-selected:not(.is-active) { border-color: #6f8fe6; box-shadow: 0 0 0 1px rgb(80 126 255 / 18%), 0 9px 22px rgb(0 0 0 / 24%); }
.fm-editor .fm-photo-project__selection-toggle { position: absolute; z-index: 6; top: 6px; right: 6px; display: grid; width: 22px; height: 22px; place-items: center; padding: 0; border: 1px solid #43526a; border-radius: 7px; background: rgb(8 14 23 / 88%); color: transparent; cursor: pointer; box-shadow: 0 2px 8px rgb(0 0 0 / 28%); }
.fm-editor .fm-photo-project__selection-toggle[aria-pressed="true"] { border-color: #6f96ff; background: #326bff; color: #fff; }
.fm-editor .fm-photo-project__selection-toggle[aria-pressed="true"]::before { content: "✓"; font-size: .72rem; font-weight: 900; line-height: 1; }
.fm-editor .fm-photo-project__selection-toggle:focus-visible { outline: 3px solid rgb(50 107 255 / 35%); outline-offset: 2px; }
.fm-editor[data-bulk-edit="true"] .fm-print-framing::before,
.fm-editor[data-bulk-edit="true"] [data-editor-section="adjustments"]::before { display: block; margin: 0 0 10px; padding: 7px 9px; border-radius: 8px; background: rgb(50 107 255 / 11%); color: #aac2ff; font-size: .66rem; font-weight: 720; content: "Zmiany zostaną zastosowane do zaznaczonych zdjęć"; }
@media (max-width: 760px) { .fm-editor .fm-photo-project__bulk { align-items: stretch; flex-direction: column; } .fm-editor .fm-photo-project__bulk-actions { width: 100%; } .fm-editor .fm-photo-project__bulk-actions button { flex: 1; } }


/* ZIP56 simple UI pass */
.fm-editor__subtitle { max-width: 34rem; font-size: 1.02rem; }
.fm-toolbar { gap: 10px; }
.fm-tool { min-height: 92px; font-size: 1.05rem; font-weight: 600; }
.fm-tool span:last-child { line-height: 1.2; }
.fm-panel__section { border-radius: 20px; background: color-mix(in srgb, var(--fm-panel, #0c1730) 82%, white 18%); padding: 20px; border: 1px solid color-mix(in srgb, var(--fm-border) 88%, white 12%); }
.fm-panel__section + .fm-panel__section { margin-top: 18px; }
.fm-panel__title { font-size: 1.25rem; }
.fm-panel__title-row .fm-panel__title { font-size: 1.25rem; }
.fm-help { font-size: 0.97rem; line-height: 1.5; color: var(--fm-muted); }
.fm-field > span, .fm-control__header label:not(.fm-number-control), .fm-print-framing__fieldset legend { font-size: 1rem; font-weight: 700; }
.fm-button, .fm-print-framing__mode, .fm-ratio, .fm-reset-control, .fm-icon-button, .fm-photo-project__bulk-actions button { min-height: 46px; }
.fm-button--full { min-height: 52px; font-size: 1rem; }
.fm-print-framing__modes { gap: 12px; }
.fm-print-framing__mode { border-radius: 18px; padding: 16px 14px; }
.fm-print-framing__mode strong { font-size: 1rem; }
.fm-print-framing__mode span { font-size: 0.93rem; line-height: 1.35; }
.fm-print-framing__border { padding: 14px 16px; border-radius: 16px; }
.fm-simple-advanced { margin-top: 16px; border: 1px solid var(--fm-border); border-radius: 16px; background: rgba(255,255,255,0.03); }
.fm-simple-advanced > summary { cursor: pointer; list-style: none; padding: 14px 16px; font-weight: 700; }
.fm-simple-advanced > summary::-webkit-details-marker { display: none; }
.fm-simple-advanced > *:not(summary) { margin-left: 16px; margin-right: 16px; }
.fm-simple-advanced > .fm-help { margin-top: 0; }
.fm-simple-advanced .fm-ratio-grid { margin-top: 12px; }
.fm-simple-advanced .fm-custom-ratio { margin-top: 12px; margin-bottom: 16px; }
.fm-filter-preset select, .fm-field select, .fm-field input, .fm-field textarea, .fm-number-control input { min-height: 46px; font-size: 1rem; }
.fm-order-summary dt, .fm-export-summary dt, .fm-file-info dt { font-size: 0.9rem; }
.fm-order-summary dd, .fm-export-summary dd, .fm-file-info dd { font-size: 0.98rem; }
.fm-photo-project__bulk { border-radius: 16px; }
.fm-workspace-controls__zoom { min-width: 64px; font-size: 1rem; font-weight: 700; }


/* ZIP57 print paper preview */
.fm-crop-aperture.is-print-preview {
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 16px 44px rgb(0 0 0 / 34%), 0 0 0 1px rgb(255 255 255 / 16%);
}
.fm-crop-aperture.is-print-preview.is-frame-fit {
  box-shadow: 0 16px 44px rgb(0 0 0 / 36%), 0 0 0 1px rgb(255 255 255 / 22%);
}
.fm-crop-aperture.is-print-preview .fm-stage__content {
  background: transparent;
}


/* ZIP58 print paper compositor */
.fm-stage__paper { position: absolute; inset: 0; display: none; background: #ffffff; border-radius: 4px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 6%); pointer-events: none; }
.fm-crop-aperture.is-print-preview { background: transparent; border-radius: 4px; box-shadow: 0 18px 48px rgb(0 0 0 / 34%); }
.fm-crop-aperture.is-print-preview .fm-stage__paper { display: block; }
.fm-crop-aperture.is-print-preview.is-paper-fit .fm-stage__paper { background: #ffffff; }
.fm-crop-aperture.is-print-preview.is-frame-fit .fm-stage__paper { background: linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%); }
.fm-crop-aperture.is-print-preview .fm-stage__content { background: transparent; }


/* ZIP59 crop-mode paper preview */
.fm-crop-aperture.is-print-preview .fm-stage__paper { z-index: 0; }


/* ZIP60 safe-frame white paper ring */
.fm-crop-aperture.is-print-preview.is-frame-fit { background: transparent; }
.fm-crop-aperture.is-print-preview.is-frame-fit .fm-stage__paper { background: #f1f2f3; }


/* ZIP60 explicit paper ring compositor */
.fm-stage__paper { z-index: 0; }
.fm-stage__photo-window { position: absolute; z-index: 1; pointer-events: none; }
.fm-stage__photo-window .fm-stage__content { position: absolute; }
.fm-crop-aperture.is-frame-fit .fm-stage__photo-window { overflow: hidden !important; }


/* ZIP61 prominent white paper preview */
.fm-crop-aperture.is-print-preview.is-frame-fit { background: transparent; box-shadow: 0 12px 28px rgb(0 0 0 / 16%); }
.fm-crop-aperture.is-print-preview.is-frame-fit .fm-stage__paper { background: #f1f2f3; box-shadow: inset 0 0 0 1px rgb(15 23 42 / 9%), 0 10px 24px rgb(15 23 42 / 13%); }
.fm-crop-aperture.is-print-preview.is-frame-fit .fm-stage__photo-window { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 35%); }
.fm-crop-aperture.is-print-preview.is-paper-fit { background: transparent; box-shadow: 0 12px 28px rgb(0 0 0 / 12%); }
.fm-crop-aperture.is-print-preview.is-paper-fit .fm-stage__paper { background: #f1f2f3; box-shadow: inset 0 0 0 1px rgb(15 23 42 / 9%), 0 10px 24px rgb(15 23 42 / 13%); }

/* ZIP63 task-focused panel architecture */
.fm-tool--info { margin-top: auto; }
.fm-panel__stack[hidden] { display: none !important; }
.fm-panel__stack { display: flex; flex-direction: column; gap: 18px; }
.fm-panel__stack > .fm-panel__section + .fm-panel__section { margin-top: 0; }
.fm-adjustments-advanced__body { display: grid; gap: 16px; padding: 0 16px 16px; }
.fm-adjustments-advanced__body > .fm-link-button { justify-self: start; }
.fm-adjustments-advanced .fm-adjustments { margin-top: 0; }
.fm-file-info-panel .fm-file-info > div:last-child { border-bottom: 0; }
@media (max-width: 980px) {
  .fm-tool--info { margin-top: 0; margin-left: auto; }
}

/* ========================================================================== */
/* FotoSmart reference-video UI pass — 2026-08-29                            */
/* Core editor logic remains intact; this block only remaps presentation.     */
/* ========================================================================== */

.fm-page {
  --fm-ref-green: #78df0b;
  --fm-ref-green-strong: #6ed500;
  --fm-ref-green-dark: #57ae00;
  --fm-ref-ink: #202124;
  --fm-ref-muted: #7c8189;
  --fm-ref-border: #d9dde1;
  --fm-ref-soft: #f3f5f7;
  --fm-ref-canvas: #f8f9fb;
  --fm-bg: #f8f9fb;
  --fm-surface: #ffffff;
  --fm-surface-muted: #ffffff;
  --fm-surface-raised: #ffffff;
  --fm-surface-hover: #f4f5f6;
  --fm-text: #202124;
  --fm-text-muted: #777c84;
  --fm-border: #dcdfe3;
  --fm-border-strong: #c7cbd0;
  --fm-accent: var(--fm-ref-green);
  --fm-accent-hover: #82e91a;
  --fm-danger: #e3001b;
  --fm-font: Arial, Helvetica, ui-sans-serif, system-ui, sans-serif;
}

.fm-standalone,
.fm-page {
  color-scheme: light;
  background: var(--fm-ref-canvas);
  color: var(--fm-ref-ink);
}

.fm-editor {
  min-height: 100vh;
  background: linear-gradient(180deg, #fafbfc 0 72%, #f1f6f9 72% 100%);
  color: var(--fm-ref-ink);
}

/* Header */
.fm-editor__header {
  position: relative;
  z-index: 80;
  display: flex;
  min-height: 80px;
  height: 80px;
  gap: 24px;
  padding: 0 20px 0 10px;
  background: #fff;
  border-bottom: 1px solid #dfe2e5;
  box-shadow: 0 1px 2px rgb(0 0 0 / 2%);
}
.fm-reference-back {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  flex: 0 0 44px;
  color: #68bc16;
  text-decoration: none;
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
}
.fm-editor__identity { gap: 52px; }
.fm-reference-brand {
  display: inline-flex;
  align-items: center;
  min-width: 202px;
  color: #2e3033;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1.1px;
  white-space: nowrap;
}
.fm-reference-brand__camera {
  position: relative;
  width: 35px;
  height: 27px;
  margin-right: 8px;
  border-radius: 4px;
  background: #24272a;
  transform: rotate(9deg);
}
.fm-reference-brand__camera::before {
  position: absolute;
  top: -5px;
  left: 7px;
  width: 12px;
  height: 6px;
  border-radius: 3px 3px 0 0;
  background: #24272a;
  content: "";
}
.fm-reference-brand__camera::after {
  position: absolute;
  top: 6px;
  left: 11px;
  width: 10px;
  height: 10px;
  border: 3px solid #fff;
  border-radius: 50%;
  content: "";
}
.fm-reference-brand__foto { font-weight: 500; }
.fm-reference-brand__smart { color: #83d71c; }
.fm-reference-brand--textonly { min-width: auto; letter-spacing: .35px; font-weight: 700; }
.fm-reference-project-name {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  font-size: 16px;
  white-space: nowrap;
}
.fm-reference-project-name span { color: #92969c; }
.fm-reference-project-name span::after {
  display: inline-block;
  width: 1px;
  height: 22px;
  margin-left: 14px;
  vertical-align: middle;
  background: #dadde1;
  content: "";
}
.fm-reference-project-name strong { font-size: 18px; font-weight: 700; }
.fm-editor__header-actions { flex-wrap: nowrap; gap: 12px; }
.fm-save-status,
.fm-history-actions { display: none !important; }
.fm-reference-print-count {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-right: 22px;
  color: #8e9297;
  font-size: 16px;
  white-space: nowrap;
}
.fm-reference-print-count b {
  display: grid;
  min-width: 31px;
  height: 31px;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--fm-ref-green);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}
.fm-editor[data-has-image="false"] .fm-reference-print-count { opacity: .5; }
.fm-reference-save,
.fm-reference-cart {
  display: inline-flex;
  min-width: 138px;
  height: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 700;
  box-shadow: none;
}
.fm-reference-save {
  border: 1px solid #e0e2e5;
  background: #fff;
  color: #4b4e53;
}
.fm-reference-save span { color: var(--fm-ref-green-dark); font-size: 22px; }
.fm-reference-cart {
  border: 1px solid var(--fm-ref-green);
  background: var(--fm-ref-green);
  color: #fff;
}
.fm-reference-cart span { font-size: 22px; }
.fm-reference-save:disabled,
.fm-reference-cart:disabled {
  border-color: #eceef0;
  background: #f6f7f8;
  color: #b6b9bd;
  opacity: 1;
}
.fm-reference-save:disabled span,
.fm-reference-cart:disabled span { color: #c7c9cc; filter: grayscale(1); }

/* Main layout */
.fm-editor__body { display: block; min-height: 0; background: transparent; }
.fm-toolbar { display: none !important; }
.fm-workspace {
  position: absolute;
  z-index: 1;
  inset: 80px 0 0;
  min-height: 0;
  padding: 0;
  background: linear-gradient(180deg, #fafbfc 0 69%, #f1f6f9 69% 100%);
}
.fm-editor[data-has-image="true"] .fm-workspace { display: none; }
.fm-dropzone {
  min-height: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.fm-dropzone:focus-visible,
.fm-dropzone.is-dragover {
  border: 0;
  background: rgb(120 223 11 / 3%);
  box-shadow: inset 0 0 0 3px rgb(120 223 11 / 24%);
}
.fm-dropzone__empty {
  width: 460px;
  max-width: calc(100vw - 40px);
  padding: 0 24px 58px;
  color: var(--fm-ref-ink);
}
.fm-dropzone__icon {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 30px;
  border: 1px solid #d8dbde;
  border-radius: 50%;
  background: #fff;
  color: var(--fm-ref-green);
  box-shadow: none;
}
.fm-dropzone__icon span {
  position: relative;
  display: block;
  width: 40px;
  height: 32px;
  border: 4px solid var(--fm-ref-green);
  border-radius: 4px;
}
.fm-dropzone__icon span::before {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 15px;
  height: 15px;
  border-right: 3px solid var(--fm-ref-green);
  border-bottom: 3px solid var(--fm-ref-green);
  transform: rotate(-45deg) skew(8deg,8deg);
  content: "";
}
.fm-dropzone__icon span::after {
  position: absolute;
  top: 5px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fm-ref-green);
  content: "";
}
.fm-dropzone__title { color: #222428; font-size: 24px; font-weight: 700; }
.fm-dropzone__text { margin: 12px 0 7px; color: #858a90; font-size: 18px; }
.fm-reference-drop-hint { margin: 0 0 28px; color: #c3c6c9; font-size: 16px; }
.fm-dropzone__empty .fm-button--primary {
  display: inline-flex;
  min-width: 210px;
  height: 60px;
  min-height: 60px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 0;
  border-radius: 7px;
  background: var(--fm-ref-green);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgb(65 133 0 / 18%);
}
.fm-dropzone__empty .fm-button--primary span { font-size: 26px; font-weight: 400; }

/* Project canvas / toolbar */
.fm-editor .fm-photo-project {
  position: absolute;
  z-index: 20;
  inset: 80px 340px 0 0;
  translate: none;
  display: block;
  width: auto;
  min-width: 0;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, #fafbfc 0 69%, #f1f6f9 69% 100%);
  box-shadow: none;
  backdrop-filter: none;
}
.fm-editor .fm-photo-project[hidden] { display: none; }
.fm-photo-project__head { display: none !important; }
.fm-reference-project-tools {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  width: min(920px, calc(100% - 100px));
  height: 56px;
  align-items: center;
  gap: 10px;
  margin: 14px auto 20px;
  padding: 7px 10px;
  border: 1px solid #e5e7e9;
  border-radius: 14px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 10px 20px rgb(48 54 61 / 14%);
}
.fm-reference-project-tools .fm-header-add {
  display: inline-flex !important;
  min-width: 188px;
  height: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: var(--fm-ref-green);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: none;
}
.fm-reference-project-tools .fm-header-add::before { display: none; }
.fm-reference-project-tools .fm-header-add span { font-size: 23px; }
.fm-reference-search,
.fm-reference-sort {
  display: flex;
  height: 40px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #d7dade;
  border-radius: 4px;
  background: #fff;
}
.fm-reference-search { flex: 1 1 310px; }
.fm-reference-sort { flex: 0 1 280px; }
.fm-reference-search > span,
.fm-reference-sort > span {
  display: grid;
  width: 42px;
  height: 100%;
  place-items: center;
  flex: 0 0 42px;
  background: var(--fm-ref-green);
  color: #fff;
  font-size: 24px;
}
.fm-reference-search input,
.fm-reference-sort select {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 14px;
  border: 0;
  outline: 0;
  background: #fff;
  color: #3d4044;
  font-size: 16px;
}
.fm-reference-sort select { appearance: auto; }
.fm-editor .fm-workspace-controls {
  position: static;
  display: inline-flex;
  min-height: 0;
  height: 40px;
  flex: 0 0 auto;
  translate: none;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.fm-editor .fm-workspace-controls[hidden] { display: none; }
.fm-editor .fm-workspace-controls__button {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: var(--fm-ref-green);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
.fm-editor .fm-workspace-controls__button:hover:not(:disabled) { background: var(--fm-ref-green-strong); transform: none; }
.fm-reference-center,
.fm-editor .fm-workspace-controls__zoom { display: none !important; }

/* Project cards */
.fm-editor .fm-photo-project__list {
  display: flex;
  min-height: calc(100% - 92px);
  align-items: flex-start;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 48px 92px;
  overflow: visible;
  padding: 0 58px 70px;
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
  scroll-snap-type: none;
}
.fm-editor .fm-photo-project[data-dock-state="collapsed"] .fm-photo-project__list,
.fm-editor .fm-photo-project[data-dock-state="expanded"] .fm-photo-project__list {
  max-height: none;
  opacity: 1;
  transform: none;
  clip-path: none;
  pointer-events: auto;
}
.fm-editor .fm-photo-project__item,
.fm-editor .fm-photo-project[data-dock-state="collapsed"] .fm-photo-project__item,
.fm-editor .fm-photo-project[data-dock-state="expanded"] .fm-photo-project__item {
  position: relative;
  flex: 0 0 384px;
  display: grid;
  grid-template-rows: 44px 378px 31px 58px 43px;
  width: 384px;
  height: 554px;
  overflow: hidden;
  border: 1px solid #d9dde0;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 3px 8px rgb(34 40 48 / 7%);
  opacity: 1;
  filter: none;
  transform: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.fm-editor .fm-photo-project__item:hover { z-index: auto; border-color: #cfd4d8; box-shadow: 0 4px 11px rgb(34 40 48 / 9%); }
.fm-editor .fm-photo-project__item.is-active,
.fm-editor .fm-photo-project__item.is-selected {
  border: 3px solid var(--fm-ref-green);
  box-shadow: 0 2px 6px rgb(51 123 0 / 13%);
}
.fm-editor .fm-photo-project__item.is-active::after { display: none; }
.fm-photo-project__card-head {
  display: flex;
  min-width: 0;
  align-items: center;
  border-bottom: 1px solid #e1e3e6;
  background: #fff;
}
.fm-editor .fm-photo-project__select {
  position: static;
  display: flex;
  min-width: 0;
  height: 100%;
  flex: 1;
  align-items: center;
  padding: 0 8px;
  overflow: hidden;
  border: 0;
  background: #fff;
  color: #1f2124;
  cursor: pointer;
}
.fm-editor .fm-photo-project__name {
  position: static;
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0;
  background: transparent;
  color: #202124;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
}
.fm-editor .fm-photo-project__selection-toggle {
  position: relative;
  z-index: 5;
  top: auto;
  right: auto;
  width: 45px;
  height: 24px;
  margin-right: 8px;
  border: 0;
  border-radius: 999px;
  background: #d9dce0;
  color: transparent;
  box-shadow: none;
}
.fm-editor .fm-photo-project__selection-toggle::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 24%);
  content: "";
  transition: transform 120ms ease;
}
.fm-editor .fm-photo-project__selection-toggle[aria-pressed="true"] {
  border: 0;
  background: var(--fm-ref-green);
  color: transparent;
}
.fm-editor .fm-photo-project__selection-toggle[aria-pressed="true"]::before { display: none; }
.fm-editor .fm-photo-project__selection-toggle[aria-pressed="true"]::after { transform: translateX(21px); }
.fm-photo-project__media {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  background: #f0f1f2;
  cursor: pointer;
}
.fm-editor .fm-photo-project__thumb {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #eceeef;
  transform: none !important;
}
.fm-editor .fm-photo-project__item.is-active .fm-photo-project__thumb { opacity: 0; }
.fm-photo-project__static-crop { position: absolute; inset: 0; z-index: 1; overflow: hidden; background: #eceeef; pointer-events: none; }
.fm-photo-project__static-crop.is-paper-fit, .fm-photo-project__static-crop.is-frame-fit { background: #eceeef; }
.fm-photo-project__static-aperture { position: absolute; overflow: hidden; transform-origin: 0 0; }
.fm-photo-project__static-paper { position: absolute; inset: 0; display: block; background: #f1f2f3; box-shadow: inset 0 0 0 1px rgb(15 23 42 / 9%), 0 9px 22px rgb(15 23 42 / 13%); }
.fm-photo-project__static-window { position: absolute; overflow: hidden; }
.fm-photo-project__static-content { position: absolute; overflow: visible; }
.fm-photo-project__static-image { position: absolute; top: 50%; left: 50%; display: block; max-width: none; max-height: none; translate: -50% -50%; transform-origin: center; user-select: none; -webkit-user-drag: none; }
.fm-editor .fm-photo-project__item.is-active .fm-photo-project__static-crop { display: none; }
.fm-photo-project__stage-slot { position: absolute; inset: 0; z-index: 2; background: #eceeef; }
.fm-photo-project__stage-slot .fm-stage,
.fm-photo-project__stage-slot .fm-stage__viewport,
.fm-photo-project__stage-slot .fm-stage__surface {
  width: 100%;
  height: 100%;
  min-height: 0;
}
.fm-photo-project__stage-slot .fm-stage { position: absolute; inset: 0; }
.fm-photo-project__stage-slot .fm-stage__viewport { background: #eceeef; }
.fm-photo-project__stage-slot .fm-stage__surface { background: #eceeef; }
.fm-photo-project__stage-slot .fm-stage__pan-hint { display: none !important; }
.fm-editor .fm-crop-handle {
  width: 16px;
  height: 16px;
  border: 2px solid #787878;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}
.fm-editor .fm-crop-frame { outline: 1px solid #4d4d4d; }
.fm-editor .fm-stage__surface.is-crop-interactive .fm-crop-frame { box-shadow: 0 0 0 9999px rgb(0 0 0 / 58%); }
.fm-editor .fm-photo-project__item.is-active .fm-crop-frame {
  opacity: 0;
  outline-color: transparent;
  box-shadow: none !important;
  transition: opacity 100ms ease;
}
.fm-editor .fm-photo-project__item.is-active:hover .fm-stage__surface { cursor: default; }
.fm-editor .fm-photo-project__item.is-active .fm-stage__surface.is-crop-dragging { cursor: grabbing; }
.fm-editor .fm-photo-project__item.is-active:hover .fm-stage__surface.is-crop-interactive .fm-crop-frame { cursor: grab; }
.fm-editor .fm-photo-project__item.is-active .fm-stage__surface.is-crop-dragging .fm-crop-frame { cursor: grabbing; }
.fm-editor .fm-photo-project__item.is-active:hover .fm-crop-frame,
.fm-editor .fm-photo-project__item.is-active .fm-stage__surface.is-crop-dragging .fm-crop-frame {
  opacity: 1;
  outline-color: #4d4d4d;
  box-shadow: 0 0 0 9999px rgb(0 0 0 / 58%) !important;
}
.fm-editor .fm-photo-project__item.is-active:hover .fm-crop-handle,
.fm-editor .fm-photo-project__item.is-active .fm-stage__surface.is-crop-dragging .fm-crop-handle {
  opacity: 1;
  pointer-events: auto;
}
.fm-editor[data-print-fit-mode="frame"] .fm-crop-handle {
  opacity: 0 !important;
  pointer-events: none !important;
  display: none;
}
.fm-editor .fm-crop-grid { opacity: .22; }
.fm-editor .fm-product-guides { display: none !important; }
.fm-editor .fm-photo-project__fit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #dfe2e5;
  border-bottom: 1px solid #dfe2e5;
  background: #fff;
}
.fm-editor .fm-photo-project__fit-button {
  min-height: 31px;
  padding: 0 4px;
  border: 0;
  background: #fff;
  color: #292b2f;
  font-size: 12px;
  font-weight: 700;
}
.fm-editor .fm-photo-project__fit-button + .fm-photo-project__fit-button { border-left: 1px solid #dfe2e5; }
.fm-editor .fm-photo-project__fit-button:hover:not(:disabled) { background: #f8f9fa; color: #202124; }
.fm-editor .fm-photo-project__fit-button.is-active { background: #fff; color: var(--fm-ref-green); }
.fm-editor .fm-photo-project__settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid #dfe2e5;
  background: #fff;
}
.fm-editor .fm-photo-project__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 7px 6px 8px;
  border-left: 1px solid #e0e2e4;
  background: #fff;
}
.fm-editor .fm-photo-project__field:first-child { border-left: 0; }
.fm-editor .fm-photo-project__field-label {
  color: #5f6368;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}
.fm-editor .fm-photo-project__field-select {
  width: 100%;
  min-height: 28px;
  padding: 0 24px 0 8px;
  border: 1px solid #d2d5d9;
  border-radius: 4px;
  background: #fff;
  color: #202124;
  font: inherit;
  font-size: 12px;
}
.fm-editor .fm-photo-project__field-select:hover { border-color: #b8bdc3; }
.fm-editor .fm-photo-project__field-select:focus-visible { outline: 2px solid rgb(50 107 255 / 26%); outline-offset: 0; border-color: #8ab0ff; }
.fm-editor .fm-photo-project__footer {
  display: grid;
  grid-template-columns: 44px 1fr 1fr 1fr 44px;
  min-height: 43px;
  background: #fff;
}
.fm-editor .fm-photo-project__footer > * {
  min-width: 0;
  border: 0;
  border-left: 1px solid #e0e2e4;
  background: #fff;
  color: #44474b;
  font-size: 16px;
}
.fm-editor .fm-photo-project__footer > :first-child { border-left: 0; }
.fm-editor .fm-photo-project__duplicate {
  background: #f1b500;
  color: #fff;
  font-size: 20px;
}
.fm-editor .fm-photo-project__duplicate:hover:not(:disabled) { background: #e5aa00; color: #fff; }
.fm-editor .fm-photo-project__remove {
  background: #e30620;
  color: #fff;
  font-size: 23px;
}
.fm-editor .fm-photo-project__remove:hover:not(:disabled) { background: #cf0018; color: #fff; }
.fm-editor .fm-photo-project__quantity-input { min-height: 43px; color: #222; font-size: 16px; font-weight: 500; }
.fm-editor .fm-photo-project__quantity-button { color: #555; font-size: 22px; }
.fm-editor .fm-photo-project__dirty { display: none; }
.fm-editor .fm-photo-project__add-item { display: none; }

/* Right settings rail */
.fm-panel {
  position: absolute;
  z-index: 60;
  top: 80px;
  right: 0;
  bottom: 0;
  display: block;
  width: 340px;
  padding: 18px 14px 38px;
  overflow-y: auto;
  border: 0;
  border-left: 1px solid #dadde0;
  background: #fff;
  color: var(--fm-ref-ink);
  scrollbar-color: #c9cdd0 transparent;
}
.fm-editor[data-has-image="false"] .fm-panel { display: none; }
.fm-panel [data-editor-section="crop"][hidden],
.fm-panel [data-editor-section="geometry"][hidden],
.fm-panel [data-editor-section="adjustments"][hidden],
.fm-panel .fm-export-hub[hidden] { display: block !important; }
.fm-panel [data-editor-section="annotations"],
.fm-panel [data-editor-section="info"],
.fm-panel .fm-export,
.fm-panel .fm-export-hub > .fm-panel__section:not(.fm-order) { display: none !important; }
.fm-editor .fm-panel__section,
.fm-editor .fm-panel__stack > .fm-panel__section {
  margin: 0;
  padding: 16px 0;
  border: 0;
  border-top: 1px solid #e0e2e4;
  border-radius: 0;
  background: #fff;
}
.fm-editor .fm-panel__section + .fm-panel__section { margin-top: 0; }
.fm-panel > .fm-photo-project__bulk {
  display: block;
  margin: 0;
  padding: 0 0 18px;
  border: 0;
  background: #fff;
}
.fm-photo-project__bulk-status {
  display: block;
  margin: 0 0 16px;
  color: #202124;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}
.fm-photo-project__bulk-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fm-editor .fm-photo-project__bulk-actions button {
  min-height: 56px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: #f1f2f4;
  color: #42454a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
}
.fm-editor .fm-photo-project__bulk-actions button:hover:not(:disabled) { border: 0; background: #e9ebed; color: #202124; }
.fm-editor .fm-photo-project__bulk-actions button:disabled { opacity: .5; }
.fm-panel__title {
  margin: 0 0 14px;
  color: #62666b;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.fm-field { gap: 6px; margin: 0 0 13px; color: #55595e; font-size: 13px; font-weight: 600; text-transform: uppercase; }
.fm-field > span,
.fm-control__header label:not(.fm-number-control),
.fm-print-framing__fieldset legend { color: #565a5f; font-size: 13px; font-weight: 600; text-transform: uppercase; }
.fm-field select,
.fm-field input,
.fm-field textarea,
.fm-number-control input,
.fm-filter-preset select {
  min-height: 40px;
  padding: 7px 11px;
  border: 1px solid #cfd3d6;
  border-radius: 5px;
  background: #fff;
  color: #202124;
  font-size: 15px;
  box-shadow: inset 0 1px 1px rgb(0 0 0 / 2%);
}
.fm-editor .fm-print-framing {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
}
.fm-print-framing__format,
.fm-print-framing__fieldset,
.fm-print-framing__border,
.fm-print-framing__summary,
.fm-simple-advanced,
[data-action="center-crop-frame"] { display: none !important; }
.fm-reference-fit-field { display: grid; }
.fm-reference-border-control { margin: 12px 0 0; }
.fm-reference-border-control > span {
  display: block;
  margin-bottom: 6px;
  color: #565a5f;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}
.fm-reference-segment { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fm-reference-segment button {
  height: 39px;
  border: 0;
  border-radius: 4px;
  background: #f1f2f3;
  color: #4a4d51;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.fm-reference-segment button.is-active { background: var(--fm-ref-green); color: #fff; }
.fm-reference-segment button:disabled { cursor: not-allowed; opacity: .5; }

/* Geometry = the two compact blocks from the reference */
.fm-panel [data-editor-section="geometry"] { padding-top: 0; border-top: 0; }
.fm-panel [data-editor-section="geometry"] > .fm-panel__title { display: none; }
.fm-reference-geometry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 0;
}
.fm-reference-geometry__group > span {
  display: block;
  margin: 0 0 7px;
  color: #565a5f;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}
.fm-reference-geometry__group > div { display: flex; gap: 10px; }
.fm-reference-geometry__group .fm-button {
  display: grid;
  width: 45px;
  height: 45px;
  min-height: 45px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: var(--fm-ref-green);
  color: #fff;
  font-size: 25px;
  font-weight: 400;
}
.fm-reference-orientation { background: #f1f2f3 !important; }
.fm-reference-orientation i {
  display: block;
  border: 1px solid #7a7e82;
  background: transparent;
}
.fm-reference-orientation--landscape i { width: 29px; height: 20px; }
.fm-reference-orientation--portrait i { width: 20px; height: 29px; }
.fm-reference-orientation:focus,
.fm-reference-orientation:hover { background: var(--fm-ref-green) !important; }
.fm-reference-orientation:focus i,
.fm-reference-orientation:hover i { border-color: #fff; }
.fm-panel [data-editor-section="geometry"] > .fm-control__header,
.fm-panel [data-editor-section="geometry"] > .fm-range,
.fm-panel [data-editor-section="geometry"] > .fm-help,
.fm-panel [data-editor-section="geometry"] > [data-action="reset-geometry"] { display: none !important; }

/* Filters */
.fm-panel [data-editor-section="adjustments"] { padding-top: 17px; }
.fm-panel [data-editor-section="adjustments"] > .fm-panel__title { margin-bottom: 12px; }
.fm-panel [data-editor-section="adjustments"] .fm-filter-preset { margin-bottom: 4px; }
.fm-panel .fm-adjustments-advanced {
  display: block !important;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
}
.fm-panel .fm-adjustments-advanced > summary {
  position: relative;
  padding: 4px 0 0 21px;
  color: #999da2;
  font-size: 14px;
  font-weight: 500;
}
.fm-panel .fm-adjustments-advanced > summary::before {
  position: absolute;
  left: 3px;
  top: 2px;
  color: #9da0a4;
  content: "⌄";
}
.fm-panel .fm-adjustments-advanced[open] > summary::before { transform: rotate(180deg); }
.fm-panel .fm-adjustments-advanced__body { padding: 12px 0 0; }

/* Global print settings */
.fm-panel .fm-order {
  display: block !important;
  padding-top: 17px;
}
.fm-panel .fm-order .fm-panel__title { margin-bottom: 14px; }
.fm-panel .fm-order-grid { display: block; }
.fm-panel .fm-order .fm-field:nth-of-type(n+4),
.fm-panel .fm-order .fm-risk-acceptance,
.fm-panel .fm-order-summary,
.fm-panel .fm-order-status,
.fm-panel [data-order-status],
.fm-panel [data-order-errors],
.fm-panel [data-order-upload-progress],
.fm-panel .fm-order > .fm-help,
.fm-panel .fm-honeypot { display: none !important; }
.fm-reference-line select:disabled { color: #202124; opacity: 1; -webkit-text-fill-color: #202124; }

/* Keep advanced editor controls visually coherent if opened. */
.fm-panel .fm-adjustment__row { grid-template-columns: minmax(0,1fr) 32px; }
.fm-panel .fm-range { accent-color: var(--fm-ref-green); }
.fm-panel .fm-reset-control { border-color: #d4d7da; background: #fff; color: #555; }
.fm-panel .fm-link-button { color: #5bb400; }
.fm-panel .fm-help { color: #8a8f94; }

/* Hide large-stage camera helpers in card mode. */
.fm-photo-project__stage-slot .fm-workspace-controls,
.fm-photo-project__stage-slot .fm-stage__pan-hint { display: none !important; }

/* Responsive fallback: preserve all editor functions below laptop widths. */
@media (max-width: 1180px) {
  .fm-editor .fm-photo-project { right: 300px; }
  .fm-panel { width: 300px; }
  .fm-reference-project-tools { width: calc(100% - 32px); }
  .fm-reference-project-tools .fm-header-add { min-width: 150px; }
  .fm-reference-search { flex-basis: 220px; }
  .fm-reference-sort { flex-basis: 220px; }
  .fm-editor .fm-photo-project__list { gap: 36px; padding-inline: 34px; }
  .fm-editor .fm-photo-project__item { flex-basis: 340px; width: 340px; grid-template-rows: 42px 330px 31px 58px 43px; height: 504px; }
}
@media (max-width: 900px) {
  .fm-editor { min-height: 100vh; overflow: auto; }
  .fm-editor__header { position: sticky; top: 0; height: auto; min-height: 70px; padding: 10px 12px; }
  .fm-reference-brand { min-width: auto; }
  .fm-reference-project-name { display: none; }
  .fm-reference-print-count { display: none; }
  .fm-reference-save,
  .fm-reference-cart { min-width: 94px; height: 42px; min-height: 42px; padding-inline: 10px; font-size: 14px; }
  .fm-workspace { inset: 70px 0 0; }
  .fm-editor .fm-photo-project { position: relative; inset: auto; width: 100%; min-height: calc(100vh - 70px); margin: 0; }
  .fm-panel { position: relative; top: auto; right: auto; bottom: auto; width: 100%; border-left: 0; border-top: 1px solid #dadde0; }
  .fm-editor[data-has-image="true"] .fm-editor__body { padding-top: 0; }
  .fm-reference-project-tools { flex-wrap: wrap; height: auto; }
  .fm-reference-search { min-width: 200px; }
  .fm-reference-sort { min-width: 210px; }
  .fm-editor .fm-photo-project__list { justify-content: center; }
}
@media (max-width: 560px) {
  .fm-reference-back { width: 32px; flex-basis: 32px; font-size: 30px; }
  .fm-reference-brand { font-size: 16px; }
  .fm-reference-brand__camera { width: 29px; height: 22px; }
  .fm-reference-save span,
  .fm-reference-cart span { display: none; }
  .fm-reference-save,
  .fm-reference-cart { min-width: 72px; }
  .fm-reference-project-tools { display: grid; grid-template-columns: 1fr 80px; }
  .fm-reference-project-tools .fm-header-add,
  .fm-reference-search,
  .fm-reference-sort { grid-column: 1 / -1; }
  .fm-editor .fm-photo-project__list { padding: 0 12px 32px; }
  .fm-editor .fm-photo-project__item { flex-basis: min(384px, 100%); width: min(384px, 100%); }
}


/* FotoSmart reference-video precision pass — 2026-08-29 */
.fm-editor__header {
  display: grid;
  grid-template-columns: 32px minmax(0,1fr) auto;
  column-gap: 46px;
  height: 80px;
  padding: 0 20px 0 8px;
}
.fm-editor__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 83px;
}
.fm-reference-brand { min-width: 167px; }
.fm-editor__header-actions { justify-self: end; }
.fm-reference-save svg,
.fm-reference-cart svg,
.fm-reference-project-tools svg,
.fm-dropzone__empty .fm-button svg,
.fm-photo-project__footer svg {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fm-reference-save > span,
.fm-reference-cart > span { font-size: inherit; }
.fm-reference-cart { min-width: 144px; }
.fm-reference-save { min-width: 138px; }
.fm-editor[data-has-image="false"] .fm-reference-print-count { visibility: hidden; }
.fm-reference-save:disabled svg,
.fm-reference-cart:disabled svg { color: #c7c9cc; }

.fm-workspace { background: linear-gradient(180deg, #fafbfc 0 64%, #f1f6f9 64% 100%); }
.fm-dropzone__empty { transform: translateY(24px); }
.fm-dropzone__empty .fm-button--primary svg { width: 25px; height: 25px; }
.fm-dropzone__empty .fm-button--primary > span { font-size: 18px; }

.fm-editor .fm-photo-project { inset-right: 350px; right: 350px; background: linear-gradient(180deg, #fafbfc 0 64%, #f1f6f9 64% 100%); }
.fm-reference-project-tools { margin-top: 9px; margin-bottom: 20px; }
.fm-reference-project-tools .fm-header-add svg { width: 25px; height: 25px; }
.fm-reference-project-tools .fm-header-add > span { font-size: 16px; }
.fm-reference-search > span svg,
.fm-reference-sort > span svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.fm-editor .fm-workspace-controls__button svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fm-editor .fm-photo-project__list { padding-top: 0; }
.fm-editor .fm-photo-project__duplicate svg,
.fm-editor .fm-photo-project__remove svg { width: 22px; height: 22px; }
.fm-editor .fm-photo-project__duplicate svg { stroke-width: 1.7; }
.fm-editor .fm-photo-project__remove svg { stroke-width: 1.8; }

.fm-panel { width: 350px; padding: 20px 14px 38px 20px; }
.fm-editor .fm-photo-project__bulk-status {
  margin: 0 0 16px;
  color: #202124;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}
.fm-editor .fm-photo-project__bulk-actions button {
  min-height: 56px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: #f1f2f4;
  color: #42454a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
}
.fm-panel [data-editor-section="crop"] > .fm-help { display: none !important; }
.fm-panel [data-editor-section="crop"] { padding-bottom: 13px; }
.fm-panel [data-editor-section="geometry"] { padding-bottom: 16px; }
.fm-panel [data-editor-section="adjustments"] { padding-top: 16px; padding-bottom: 16px; }
.fm-panel [data-editor-section="adjustments"] > .fm-panel__title { margin-bottom: 15px; }
.fm-panel .fm-order { padding-top: 16px; }
.fm-panel .fm-order .fm-field:has([data-order="customerName"]),
.fm-panel .fm-order .fm-field:has([data-order="reference"]),
.fm-panel .fm-order .fm-field:has([data-order="notes"]),
.fm-panel .fm-order .fm-risk-acceptance,
.fm-panel .fm-order-summary,
.fm-panel .fm-order-status,
.fm-panel [data-order-status],
.fm-panel [data-order-errors],
.fm-panel [data-order-upload-progress],
.fm-panel .fm-order > .fm-help,
.fm-panel .fm-honeypot { display: block; }
.fm-panel .fm-order .fm-field:has([data-order="customerName"]),
.fm-panel .fm-order .fm-field:has([data-order="reference"]),
.fm-panel .fm-order .fm-field:has([data-order="notes"]),
.fm-panel .fm-order .fm-risk-acceptance,
.fm-panel .fm-order-summary,
.fm-panel .fm-order-status,
.fm-panel [data-order-status],
.fm-panel [data-order-errors],
.fm-panel [data-order-upload-progress],
.fm-panel .fm-order > .fm-help,
.fm-panel .fm-honeypot { display: none !important; }
/* Keep the required current workflow fields below the visible reference controls, rather than deleting them. */
.fm-panel .fm-order .fm-field:has([data-order="customerName"]),
.fm-panel .fm-order .fm-field:has([data-order="reference"]),
.fm-panel .fm-order .fm-field:has([data-order="notes"]) { display: grid !important; }
.fm-panel .fm-order-grid .fm-field:has([data-order="quantity"]) { display: none !important; }
.fm-panel .fm-order .fm-field:has([data-order="customerName"]) { margin-top: 26px; }

.fm-reference-orientation--landscape { background: var(--fm-ref-green) !important; }
.fm-reference-orientation--landscape i { border-color: #fff; }
.fm-reference-orientation--portrait:focus,
.fm-reference-orientation--portrait:hover { background: #f1f2f3 !important; }
.fm-reference-orientation--portrait:focus i,
.fm-reference-orientation--portrait:hover i { border-color: #7a7e82; }

@media (max-width: 1180px) {
  .fm-editor .fm-photo-project { right: 300px; }
  .fm-panel { width: 300px; padding-left: 14px; }
  .fm-editor__identity { gap: 28px; }
}


/* FotoSmart interaction-state alignment */
.fm-reference-back { display: grid; place-items: center; }
.fm-reference-back svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.fm-dropzone__icon > svg { width: 48px; height: 48px; fill: none; stroke: var(--fm-ref-green); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fm-dropzone__icon > span { display: none; }

.fm-panel { padding-left: 28px; padding-right: 28px; }
.fm-editor .fm-photo-project__bulk-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fm-panel [data-editor-section="crop"] { padding-top: 8px; }
.fm-panel [data-editor-section="geometry"] { padding-top: 0; padding-bottom: 12px; }
.fm-panel [data-editor-section="adjustments"] { padding-top: 12px; }

.fm-reference-orientation { background: #f1f2f3 !important; }
.fm-reference-orientation i { border-color: #7a7e82; }
.fm-reference-orientation.is-active { background: var(--fm-ref-green) !important; }
.fm-reference-orientation.is-active i { border-color: #fff; }
.fm-reference-orientation--landscape:not(.is-active):focus,
.fm-reference-orientation--landscape:not(.is-active):hover,
.fm-reference-orientation--portrait:not(.is-active):focus,
.fm-reference-orientation--portrait:not(.is-active):hover { background: #e9ebed !important; }
.fm-reference-orientation--landscape:not(.is-active):focus i,
.fm-reference-orientation--landscape:not(.is-active):hover i,
.fm-reference-orientation--portrait:not(.is-active):focus i,
.fm-reference-orientation--portrait:not(.is-active):hover i { border-color: #7a7e82; }

.fm-reference-bulk-quantity,
.fm-reference-bulk-actions-panel { display: none; margin: 0; padding: 14px 0; border-top: 1px solid #e0e2e4; background: #fff; }
.fm-editor[data-bulk-edit="true"] .fm-reference-bulk-quantity,
.fm-editor[data-bulk-edit="true"] .fm-reference-bulk-actions-panel { display: block; }
.fm-reference-bulk-quantity h2,
.fm-reference-bulk-actions-panel h2 { margin: 0 0 13px; color: #62666b; font-size: 14px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.fm-reference-bulk-stepper { display: grid; grid-template-columns: 43px 1fr 43px; height: 41px; overflow: hidden; border: 1px solid #d9dcdf; border-radius: 5px; }
.fm-reference-bulk-stepper button { border: 0; background: var(--fm-ref-green); color: #fff; font-size: 21px; font-weight: 400; }
.fm-reference-bulk-stepper output { display: grid; place-items: center; background: #fff; color: #202124; font-size: 16px; }
.fm-reference-bulk-actions-panel > div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fm-reference-bulk-actions-panel button { min-height: 43px; border: 1px solid #e0e2e4; border-radius: 5px; background: #fff; color: #3e4247; font-size: 13px; font-weight: 600; text-transform: uppercase; }
.fm-reference-bulk-actions-panel button:hover { background: #f6f7f8; }

@media (max-width:1180px) { .fm-panel { padding-left: 14px; padding-right: 14px; } }

/* Reference bulk mode intentionally keeps the sidebar clean. */
.fm-editor[data-bulk-edit="true"] .fm-print-framing::before,
.fm-editor[data-bulk-edit="true"] [data-editor-section="adjustments"]::before { display: none !important; content: none !important; }
.fm-reference-save svg { color: var(--fm-ref-green-dark); }
.fm-editor .fm-photo-project[data-dock-state] .fm-photo-project__item.is-active,
.fm-editor .fm-photo-project[data-dock-state] .fm-photo-project__item.is-selected {
  border: 3px solid var(--fm-ref-green);
  box-shadow: 0 2px 6px rgb(51 123 0 / 13%);
}

/* Native desktop sizing matched to the 3024×1442 reference capture (1512×721 CSS px at 2× DPR). */
@media (min-width: 1181px) {
  .fm-editor__header {
    grid-template-columns: 27px minmax(0,1fr) auto;
    column-gap: 39px;
    height: 67px;
    padding: 0 17px 0 7px;
  }
  .fm-editor__identity { gap: 70px; }
  .fm-reference-back { width: 27px; font-size: 27px; }
  .fm-reference-back svg { width: 22px; height: 22px; }
  .fm-reference-brand { min-width: 141px; font-size: 16px; letter-spacing: 1px; }
  .fm-reference-brand__camera { width: 31px; height: 23px; margin-right: 8px; border-radius: 3px; }
  .fm-reference-brand__camera::before { width: 8px; height: 5px; top: -4px; left: 6px; }
  .fm-reference-brand__camera::after { width: 8px; height: 8px; border-width: 2px; }
  .fm-reference-project-name { gap: 12px; font-size: 13.5px; }
  .fm-reference-project-name span::after { height: 19px; margin-left: 12px; }
  .fm-reference-project-name strong { font-size: 15px; }
  .fm-editor__header-actions { gap: 10px; }
  .fm-reference-print-count { gap: 9px; margin-right: 18px; font-size: 13.5px; }
  .fm-reference-print-count b { min-width: 26px; height: 26px; padding: 0 7px; font-size: 14px; }
  .fm-reference-save,
  .fm-reference-cart {
    min-width: 116px;
    height: 40px;
    min-height: 40px;
    gap: 8px;
    padding: 0 15px;
    border-radius: 12px;
    font-size: 14px;
  }
  .fm-reference-cart { min-width: 121px; }
  .fm-reference-save svg,
  .fm-reference-cart svg { width: 20px; height: 20px; flex-basis: 20px; }

  .fm-workspace { inset: 67px 0 0; }
  .fm-dropzone__empty { width: 388px; padding: 0 20px 49px; transform: translateY(20px); }
  .fm-dropzone__icon { width: 81px; height: 81px; margin: 0 auto 25px; }
  .fm-dropzone__icon > svg { width: 40px; height: 40px; }
  .fm-dropzone__title { font-size: 20px; }
  .fm-dropzone__text { margin: 10px 0 6px; font-size: 15px; }
  .fm-reference-drop-hint { margin: 0 0 24px; font-size: 13.5px; }
  .fm-dropzone__empty .fm-button--primary {
    min-width: 177px;
    height: 51px;
    min-height: 51px;
    gap: 9px;
    border-radius: 6px;
    font-size: 15px;
  }
  .fm-dropzone__empty .fm-button--primary svg { width: 21px; height: 21px; }
  .fm-dropzone__empty .fm-button--primary > span { font-size: 15px; }

  .fm-editor .fm-photo-project { inset: 67px 294px 0 0; right: 294px; }
  .fm-reference-project-tools {
    width: min(776px, calc(100% - 84px));
    height: 47px;
    gap: 8px;
    margin: 8px auto 17px;
    padding: 6px 8px;
    border-radius: 12px;
    box-shadow: 0 8px 17px rgb(48 54 61 / 14%);
  }
  .fm-reference-project-tools .fm-header-add {
    min-width: 159px;
    height: 34px;
    min-height: 34px;
    gap: 8px;
    padding: 0 13px;
    font-size: 13.5px;
  }
  .fm-reference-project-tools .fm-header-add svg { width: 21px; height: 21px; }
  .fm-reference-project-tools .fm-header-add > span { font-size: 13.5px; }
  .fm-reference-search,
  .fm-reference-sort { height: 34px; }
  .fm-reference-search { flex-basis: 262px; }
  .fm-reference-sort { flex-basis: 236px; }
  .fm-reference-search > span,
  .fm-reference-sort > span { width: 35px; flex-basis: 35px; font-size: 20px; }
  .fm-reference-search > span svg,
  .fm-reference-sort > span svg { width: 19px; height: 19px; }
  .fm-reference-search input,
  .fm-reference-sort select { padding: 0 12px; font-size: 13.5px; }
  .fm-editor .fm-workspace-controls { height: 34px; gap: 7px; }
  .fm-editor .fm-workspace-controls__button { width: 34px; height: 34px; font-size: 13px; }
  .fm-editor .fm-workspace-controls__button svg { width: 19px; height: 19px; }

  .fm-editor .fm-photo-project__list {
    min-height: calc(100% - 78px);
    gap: 40px 78px;
    padding: 0 49px 59px;
  }
  .fm-editor .fm-photo-project__item,
  .fm-editor .fm-photo-project[data-dock-state="collapsed"] .fm-photo-project__item,
  .fm-editor .fm-photo-project[data-dock-state="expanded"] .fm-photo-project__item {
    flex-basis: 324px;
    grid-template-rows: 37px 320px 26px 54px 37px;
    width: 324px;
    height: 474px;
    border-radius: 13px;
  }
  .fm-editor .fm-photo-project[data-dock-state] .fm-photo-project__item.is-active,
  .fm-editor .fm-photo-project[data-dock-state] .fm-photo-project__item.is-selected { border-width: 2px; }
  .fm-editor .fm-photo-project__select { padding: 0 7px; }
  .fm-editor .fm-photo-project__name { font-size: 13px; }
  .fm-editor .fm-photo-project__selection-toggle { width: 38px; height: 20px; margin-right: 7px; }
  .fm-editor .fm-photo-project__selection-toggle::after { top: 2.5px; left: 2.5px; width: 15px; height: 15px; }
  .fm-editor .fm-photo-project__selection-toggle[aria-pressed="true"]::after { transform: translateX(18px); }
  .fm-editor .fm-crop-handle { width: 13px; height: 13px; border-width: 1.5px; }
  .fm-editor .fm-photo-project__fit-button { min-height: 26px; padding: 0 3px; font-size: 10px; }
  .fm-editor .fm-photo-project__settings { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fm-editor .fm-photo-project__field { padding: 5px 5px 6px; border-top: 0; }
  .fm-editor .fm-photo-project__field-label { font-size: 9px; }
  .fm-editor .fm-photo-project__field-select { min-height: 27px; padding-left: 6px; padding-right: 20px; font-size: 10.5px; }
  .fm-editor .fm-photo-project__footer { grid-template-columns: 37px 1fr 1fr 1fr 37px; min-height: 37px; }
  .fm-editor .fm-photo-project__footer > * { font-size: 13.5px; }
  .fm-editor .fm-photo-project__quantity-input { min-height: 37px; font-size: 13.5px; }
  .fm-editor .fm-photo-project__quantity-button { font-size: 18px; }
  .fm-editor .fm-photo-project__duplicate svg,
  .fm-editor .fm-photo-project__remove svg { width: 18px; height: 18px; }

  .fm-panel {
    top: 67px;
    width: 294px;
    padding: 17px 24px 32px;
  }
  .fm-panel > .fm-photo-project__bulk { padding-bottom: 15px; }
  .fm-editor .fm-photo-project__bulk-status { margin-bottom: 13px; font-size: 15px; }
  .fm-editor .fm-photo-project__bulk-actions { gap: 8px; }
  .fm-editor .fm-photo-project__bulk-actions button { min-height: 47px; padding: 7px 8px; border-radius: 6px; font-size: 12px; }
  .fm-editor .fm-panel__section,
  .fm-editor .fm-panel__stack > .fm-panel__section { padding: 13px 0; }
  .fm-panel [data-editor-section="crop"] { padding-top: 7px; padding-bottom: 11px; }
  .fm-panel [data-editor-section="geometry"] { padding: 0 0 10px; }
  .fm-panel [data-editor-section="adjustments"] { padding: 10px 0 13px; }
  .fm-panel .fm-order { padding-top: 13px; }
  .fm-panel__title { margin-bottom: 12px; font-size: 12px; }
  .fm-field { gap: 5px; margin-bottom: 11px; font-size: 11px; }
  .fm-field > span,
  .fm-control__header label:not(.fm-number-control),
  .fm-print-framing__fieldset legend { font-size: 11px; }
  .fm-field select,
  .fm-field input,
  .fm-field textarea,
  .fm-number-control input,
  .fm-filter-preset select {
    min-height: 34px;
    padding: 6px 9px;
    border-radius: 4px;
    font-size: 13px;
  }
  .fm-reference-border-control { margin-top: 10px; }
  .fm-reference-border-control > span { margin-bottom: 5px; font-size: 11px; }
  .fm-reference-segment { gap: 7px; }
  .fm-reference-segment button { height: 33px; border-radius: 3px; font-size: 12px; }
  .fm-reference-geometry { gap: 27px; }
  .fm-reference-geometry__group > span { margin-bottom: 6px; font-size: 11px; }
  .fm-reference-geometry__group > div { gap: 8px; }
  .fm-reference-geometry__group .fm-button { width: 38px; height: 38px; min-height: 38px; border-radius: 3px; font-size: 21px; }
  .fm-reference-orientation--landscape i { width: 24px; height: 17px; }
  .fm-reference-orientation--portrait i { width: 17px; height: 24px; }
  .fm-panel [data-editor-section="adjustments"] > .fm-panel__title { margin-bottom: 13px; }
  .fm-panel [data-editor-section="adjustments"] .fm-filter-preset { margin-bottom: 3px; }
  .fm-panel .fm-adjustments-advanced > summary { padding: 3px 0 0 18px; font-size: 12px; }
  .fm-panel .fm-adjustments-advanced > summary::before { left: 3px; top: 2px; }
  .fm-panel .fm-order .fm-panel__title { margin-bottom: 12px; }

  .fm-reference-bulk-quantity,
  .fm-reference-bulk-actions-panel { padding: 12px 0; }
  .fm-reference-bulk-quantity h2,
  .fm-reference-bulk-actions-panel h2 { margin-bottom: 11px; font-size: 12px; }
  .fm-reference-bulk-stepper { grid-template-columns: 36px 1fr 36px; height: 35px; border-radius: 4px; }
  .fm-reference-bulk-stepper button { font-size: 18px; }
  .fm-reference-bulk-stepper output { font-size: 13.5px; }
  .fm-reference-bulk-actions-panel > div { gap: 8px; }
  .fm-reference-bulk-actions-panel button { min-height: 36px; border-radius: 4px; font-size: 11px; }
  .fm-panel .fm-order .fm-field:has([data-order="customerName"]) { margin-top: 22px; }
}

/* Reference viewport containment fix. */
@media (min-width: 1181px) {
  .fm-editor__header { min-height: 67px; }
  .fm-editor .fm-editor__body { height: calc(100vh - 67px); min-height: 0; }
  .fm-editor .fm-panel { height: auto; }
}

/* ZIP111: manual crop controls are meaningful only in Pełny papier. */
.fm-editor[data-print-fit-mode="frame"] [data-editor-section="crop"] .fm-simple-advanced,
.fm-editor[data-print-fit-mode="frame"] [data-editor-section="crop"] > .fm-help,
.fm-editor[data-print-fit-mode="frame"] [data-editor-section="crop"] > [data-action="center-crop-frame"] {
  display: none !important;
}

/* ZIP116 — mobile interaction freeze */
/* Crop chrome follows the actual interactive state, not CSS :hover. */
.fm-editor .fm-photo-project__item.is-active .fm-stage__surface.is-crop-interactive .fm-crop-frame {
  opacity: 1;
  outline-color: #4d4d4d;
  box-shadow: 0 0 0 9999px rgb(0 0 0 / 58%) !important;
  cursor: grab;
}
.fm-editor .fm-photo-project__item.is-active .fm-stage__surface.is-crop-interactive .fm-crop-handle {
  opacity: 1;
  pointer-events: auto;
}
.fm-editor .fm-photo-project__item.is-active .fm-stage__surface.is-crop-dragging .fm-crop-frame { cursor: grabbing; }

@media (pointer: coarse), (hover: none) {
  /* Let the page scroll normally over passive previews. Disable browser
     gestures only while an editor interaction actually owns the surface. */
  .fm-editor .fm-stage__surface { touch-action: pan-y; }
  .fm-editor .fm-stage__surface.is-crop-interactive,
  .fm-editor .fm-stage__surface.is-blurring,
  .fm-editor .fm-stage__surface.is-annotating,
  .fm-editor .fm-stage__surface.is-erasing,
  .fm-editor .fm-stage__surface.is-object-editing { touch-action: none; }

  /* Keep the visual handle compact while giving fingers a ~44 px target. */
  .fm-editor .fm-crop-handle {
    width: 20px;
    height: 20px;
  }
  .fm-editor .fm-crop-handle::before {
    content: '';
    position: absolute;
    inset: -12px;
  }

  /* Workspace camera zoom/pan is intentionally desktop-only. The reference
     crop on touch devices is a fixed contain view with a movable crop frame. */
  .fm-editor [data-workspace-action="zoom-in"],
  .fm-editor [data-workspace-action="zoom-out"] { display: none !important; }
}

/* ZIP117 — dedicated light mobile editor shell */
.fm-mobile-ui { display: none; }

@media (max-width: 720px) {
  .fm-editor {
    --fm-mobile-accent: #ffd21a;
    --fm-mobile-line: #e8e9eb;
    --fm-ref-green: var(--fm-mobile-accent);
    --fm-ref-green-dark: #151515;
    --fm-ref-green-strong: #f4c900;
    position: relative;
    width: 100%;
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
    background: #fff;
    color: #141414;
    color-scheme: light;
  }
  .fm-page, .fm-standalone { min-height: 100svh; background: #fff; }
  .fm-editor > .fm-editor__header,
  .fm-reference-project-tools,
  .fm-toolbar { display: none !important; }
  .fm-mobile-ui { display: contents; }

  .fm-mobile-topbar {
    position: fixed;
    z-index: 120;
    top: 0; left: 0; right: 0;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    height: calc(58px + env(safe-area-inset-top));
    align-items: end;
    padding: env(safe-area-inset-top) 12px 8px;
    border-bottom: 1px solid var(--fm-mobile-line);
    background: rgb(255 255 255 / 97%);
    backdrop-filter: blur(18px) saturate(1.1);
  }
  .fm-mobile-topbar > strong { align-self: center; min-width: 0; padding-top: 7px; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 760; letter-spacing: -.02em; }
  .fm-mobile-topbar button { border: 0; font: inherit; cursor: pointer; }
  .fm-mobile-topbar__back { display: grid; width: 42px; height: 42px; place-items: center; align-self: center; padding: 0; border-radius: 50%; background: transparent; color: #151515; }
  .fm-mobile-topbar__back svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  
  .fm-mobile-topbar__actions {
    display: flex;
    min-width: 0;
    align-self: center;
    align-items: center;
    justify-self: end;
    gap: 8px;
  }
  .fm-mobile-dock-pill {
    position: relative;
    display: inline-grid;
    flex: 0 0 38px;
    width: 38px;
    min-width: 38px;
    max-width: 38px;
    height: 38px;
    place-items: center;
    padding: 4px;
    overflow: visible;
    border: 1px solid rgb(0 0 0 / 8%);
    border-radius: 999px;
    background: rgb(255 255 255 / 94%);
    box-shadow: 0 7px 20px rgb(22 27 33 / 12%);
    color: #111;
    backdrop-filter: blur(18px) saturate(1.08);
    transform-origin: top right;
    transform: translateY(0) scale(1);
    opacity: 1;
    transition: transform 320ms cubic-bezier(.2,.9,.2,1.05), opacity 240ms ease;
  }
  .fm-mobile-dock-pill[hidden] { display: none !important; }
  .fm-mobile-dock-pill__thumb {
    display: grid;
    width: 28px;
    height: 28px;
    overflow: hidden;
    place-items: center;
    border-radius: 999px;
    background: #f0f2f4;
    color: #111;
    font-size: 13px;
    font-weight: 800;
  }
  .fm-mobile-dock-pill__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .fm-mobile-dock-pill__label {
    position: absolute;
    right: -4px;
    bottom: -4px;
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #17191c;
    color: #fff;
    line-height: 1;
    box-shadow: 0 1px 5px rgb(0 0 0 / 18%);
  }
  .fm-mobile-dock-pill__label strong {
    align-self: auto;
    padding: 0;
    color: inherit;
    text-align: center;
    font-size: 9px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: 0;
  }
  .fm-mobile-dock-pill__label small { display: none; }

  .fm-mobile-topbar__done { flex: 0 0 76px; width: 76px; min-width: 76px; height: 34px; align-self: center; border-radius: 999px !important; background: var(--fm-mobile-accent); color: #111; font-size: 14px; font-weight: 760; }

  .fm-mobile-notice {
    position: fixed;
    z-index: 140;
    top: calc(66px + env(safe-area-inset-top));
    left: 50%;
    width: min(calc(100% - 28px), 520px);
    padding: 11px 14px;
    transform: translateX(-50%);
    border: 1px solid #dedfe2;
    border-radius: 12px;
    background: rgb(255 255 255 / 96%);
    box-shadow: 0 10px 28px rgb(22 27 33 / 16%);
    color: #24272b;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(16px);
  }
  .fm-mobile-notice[data-level="error"] { border-color: #efb9b9; color: #9c2525; }
  .fm-mobile-notice[data-level="warning"] { border-color: #e8c55d; background: rgb(255 249 222 / 98%); color: #6f5200; }
  .fm-mobile-notice[hidden] { display: none !important; }

  .fm-editor .fm-photo-project {
    position: fixed;
    z-index: 5;
    top: calc(58px + env(safe-area-inset-top));
    right: 0; bottom: 198px; left: 0;
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    border: 0;
    background: #fff;
  }
  /* ZIP117-R1: keep the editor stage geometry stable while switching tools.
     Tool trays overlay the lower workspace instead of resizing the crop stage. */
  .fm-editor[data-mobile-mode="adjustments"] .fm-photo-project,
  .fm-editor[data-mobile-mode="order"] .fm-photo-project { bottom: 198px; }
  .fm-editor .fm-photo-project__list,
  .fm-editor .fm-photo-project[data-dock-state="collapsed"] .fm-photo-project__list,
  .fm-editor .fm-photo-project[data-dock-state="expanded"] .fm-photo-project__list {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    padding: 0;
    overflow: hidden;
    opacity: 1;
    transform: none;
    clip-path: none;
  }
  .fm-editor .fm-photo-project__item,
  .fm-editor .fm-photo-project[data-dock-state] .fm-photo-project__item { display: none; }
  .fm-editor .fm-photo-project__item.is-active,
  .fm-editor .fm-photo-project[data-dock-state] .fm-photo-project__item.is-active {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0 !important;
    border-radius: 0;
    background: #fff;
    box-shadow: none !important;
  }
  .fm-editor .fm-photo-project__item.is-active .fm-photo-project__card-head,
  .fm-editor .fm-photo-project__item.is-active > .fm-photo-project__selection-toggle,
  .fm-editor .fm-photo-project__item.is-active .fm-photo-project__fit,
  .fm-editor .fm-photo-project__item.is-active .fm-photo-project__settings,
  .fm-editor .fm-photo-project__item.is-active .fm-photo-project__footer,
  .fm-editor .fm-photo-project__add-item { display: none !important; }
  .fm-photo-project__media { position: absolute; inset: 0; width: 100%; height: 100%; background: #fff; }
  .fm-editor .fm-photo-project__thumb { object-fit: contain; background: #fff; }
  .fm-photo-project__stage-slot,
  .fm-photo-project__stage-slot .fm-stage,
  .fm-photo-project__stage-slot .fm-stage__viewport,
  .fm-photo-project__stage-slot .fm-stage__surface { width: 100% !important; height: 100% !important; background: #fff !important; }
  .fm-photo-project__stage-slot .fm-stage__viewport { display: grid; place-items: center; overflow: hidden; }

  .fm-workspace { position: fixed; inset: calc(58px + env(safe-area-inset-top)) 0 calc(68px + env(safe-area-inset-bottom)); background: #fff; }
  .fm-dropzone__empty { width: 100%; max-width: 420px; padding: 0 26px; transform: none; }
  .fm-dropzone__title { font-size: 22px; }
  .fm-dropzone__text, .fm-reference-drop-hint { font-size: 14px; }
  .fm-dropzone__empty .fm-button--primary { background: var(--fm-mobile-accent); color: #111; box-shadow: none; }

  .fm-mobile-filmstrip-bar {
    position: fixed;
    z-index: 92;
    top: calc(66px + env(safe-area-inset-top));
    left: 10px; right: 10px;
    display: flex;
    height: 62px;
    align-items: center;
    gap: 7px;
    padding: 6px 7px;
    border: 1px solid rgb(0 0 0 / 6%);
    border-radius: 16px;
    background: rgb(255 255 255 / 91%);
    box-shadow: 0 8px 26px rgb(22 27 33 / 10%);
    backdrop-filter: blur(18px) saturate(1.1);
    transform-origin: top right;
    transition: transform 360ms cubic-bezier(.22,1,.36,1), opacity 260ms ease, filter 260ms ease;
    will-change: transform, opacity;
  }
  .fm-mobile-filmstrip-bar.is-collapsed {
    opacity: 0;
    pointer-events: none;
    filter: blur(2px);
    transform: translate3d(132px, -36px, 0) scale(.74);
  }
  .fm-mobile-filmstrip-bar[hidden] { display: none !important; }
  .fm-mobile-filmstrip { display: flex; min-width: 0; flex: 1; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .fm-mobile-filmstrip::-webkit-scrollbar { display: none; }
  .fm-mobile-photo { position: relative; flex: 0 0 48px; height: 48px; }
  .fm-mobile-photo > button:first-child { width: 48px; height: 48px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 9px; background: #f2f3f4; }
  .fm-mobile-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .fm-mobile-photo.is-active > button:first-child { border-color: var(--fm-mobile-accent); }
  .fm-mobile-photo__check { position: absolute; top: -4px; right: -4px; display: grid; width: 20px; height: 20px; place-items: center; padding: 0; border: 2px solid #fff; border-radius: 50%; background: #e7e8ea; color: #111; font-size: 11px; font-weight: 850; box-shadow: 0 1px 4px rgb(0 0 0 / 16%); }
  .fm-mobile-photo.is-selected .fm-mobile-photo__check { background: var(--fm-mobile-accent); }
  .fm-mobile-filmstrip__add, .fm-mobile-filmstrip__selection { height: 42px; border: 0; border-radius: 11px; background: #f3f4f5; color: #191919; font-weight: 700; }
  .fm-mobile-filmstrip__add { flex: 0 0 42px; width: 42px; font-size: 24px; }
  .fm-mobile-filmstrip__selection { display: grid; flex: 0 0 82px; width: 82px; place-items: center; align-content: center; gap: 0; padding: 2px 6px; line-height: 1.05; }
  .fm-mobile-filmstrip__selection[hidden] { display: none !important; }
  .fm-mobile-filmstrip-bar.is-single-photo .fm-mobile-filmstrip__add { flex-basis: 48px; width: 48px; background: var(--fm-mobile-accent); }
  .fm-mobile-filmstrip__selection strong { font-size: 12px; font-variant-numeric: tabular-nums; }
  .fm-mobile-filmstrip__selection small { margin-top: 2px; font-size: 8px; font-weight: 750; }
  .fm-mobile-filmstrip__selection.is-all-selected { background: #fff5bf; box-shadow: inset 0 0 0 1px var(--fm-mobile-accent); }
  .fm-mobile-filmstrip__selection:disabled { opacity: .45; }
  .fm-mobile-filmstrip__collapse {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #f3f4f5;
    color: #41464c;
  }
  .fm-mobile-filmstrip__collapse svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; transition: transform 240ms ease; }
  .fm-mobile-filmstrip-bar.is-collapsed .fm-mobile-filmstrip__collapse svg { transform: rotate(180deg); }

  .fm-mobile-nav {
    position: fixed;
    z-index: 120;
    right: 0; bottom: 0; left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: calc(68px + env(safe-area-inset-bottom));
    padding: 5px 12px env(safe-area-inset-bottom);
    border-top: 1px solid var(--fm-mobile-line);
    background: rgb(255 255 255 / 98%);
    backdrop-filter: blur(20px) saturate(1.1);
  }
  .fm-mobile-nav > button { display: grid; min-width: 0; place-items: center; align-content: center; gap: 3px; padding: 0; border: 0; background: transparent; color: #55595f; font: inherit; }
  .fm-mobile-nav__icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; font-size: 18px; transition: background 120ms ease, color 120ms ease; }
  .fm-mobile-nav small { font-size: 10px; font-weight: 650; }
  .fm-mobile-nav > button.is-active { color: #111; }
  .fm-mobile-nav > button.is-active .fm-mobile-nav__icon { background: var(--fm-mobile-accent); }

  .fm-mobile-tray { position: fixed; z-index: 91; right: 0; bottom: calc(68px + env(safe-area-inset-bottom)); left: 0; background: #fff; }
  .fm-mobile-tray__panel { display: none; border-top: 1px solid var(--fm-mobile-line); background: #fff; }
  .fm-editor[data-mobile-mode="filters"] [data-mobile-panel="filters"],
  .fm-editor[data-mobile-mode="adjustments"] [data-mobile-panel="adjustments"],
  .fm-editor[data-mobile-mode="crop"] [data-mobile-panel="crop"] { display: block; }

  .fm-mobile-filter-panel { height: 130px; padding: 8px 10px 10px; }
  .fm-mobile-filter-title { height: 23px; color: #4f5358; text-align: center; font-size: 12px; font-weight: 650; }
  .fm-mobile-filter-strip { display: flex; gap: 8px; overflow-x: auto; padding: 0 2px 4px; scrollbar-width: none; }
  .fm-mobile-filter-strip::-webkit-scrollbar { display: none; }
  .fm-mobile-filter { flex: 0 0 58px; padding: 0; border: 0; background: transparent; color: #5b5f64; font: inherit; }
  .fm-mobile-filter__thumb { display: block; width: 56px; height: 56px; overflow: hidden; border: 2px solid transparent; border-radius: 9px; background: #eef0f2; }
  .fm-mobile-filter__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .fm-mobile-filter small { display: block; margin-top: 4px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .fm-mobile-filter.is-active { color: #111; font-weight: 750; }
  .fm-mobile-filter.is-active .fm-mobile-filter__thumb { border-color: var(--fm-mobile-accent); box-shadow: 0 0 0 1px rgb(0 0 0 / 8%); }
  .fm-mobile-filter__thumb--bw img { filter: grayscale(1) contrast(1.05); }
  .fm-mobile-filter__thumb--sepia img { filter: sepia(.7) saturate(.85); }
  .fm-mobile-filter__thumb--velvia img { filter: saturate(1.4) contrast(1.08); }
  .fm-mobile-filter__thumb--agfa img { filter: sepia(.15) saturate(.85) contrast(1.08); }
  .fm-mobile-filter__thumb--portra img { filter: sepia(.08) saturate(.9) brightness(1.05); }
  .fm-mobile-filter__thumb--cinematic img { filter: contrast(1.16) saturate(.78) brightness(.94); }
  .fm-mobile-filter__thumb--vintage img { filter: sepia(.3) saturate(.78) contrast(.94); }

  .fm-mobile-adjustment-panel { height: 72px; padding: 6px 8px; }
  .fm-mobile-adjustment-tabs { display: flex; justify-content: space-around; gap: 4px; overflow-x: auto; }
  .fm-mobile-adjustment-tabs button { display: grid; min-width: 68px; place-items: center; gap: 2px; padding: 0; border: 0; background: transparent; color: #555a60; }
  .fm-mobile-adjustment-tabs span { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 50%; background: #f2f3f4; font-size: 19px; }
  .fm-mobile-adjustment-tabs small { font-size: 9px; font-weight: 650; }
  .fm-mobile-adjustment-tabs button.is-active { color: #111; }
  .fm-mobile-adjustment-tabs button.is-active span { background: var(--fm-mobile-accent); }

  .fm-mobile-crop-panel { height: 130px; padding: 6px 10px; }
  .fm-mobile-fit { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; height: 32px; padding: 3px; border-radius: 999px; background: #f1f2f4; }
  .fm-mobile-fit button { border: 0; border-radius: 999px; background: transparent; color: #555a60; font-size: 11px; font-weight: 700; }
  .fm-mobile-fit button.is-active { background: #fff; color: #111; box-shadow: 0 1px 5px rgb(22 27 33 / 12%); }
  .fm-mobile-crop-row { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
  .fm-mobile-format-pills { display: flex; min-width: 0; flex: 1; gap: 5px; overflow-x: auto; scrollbar-width: none; }
  .fm-mobile-format-pills::-webkit-scrollbar { display: none; }
  .fm-mobile-format-pills button { min-width: 58px; height: 32px; padding: 0 7px; border: 1px solid #e3e5e7; border-radius: 9px; background: #f8f9fa; color: #33373c; font-size: 10px; font-weight: 700; }
  .fm-mobile-format-pills button.is-active { border-color: var(--fm-mobile-accent); background: #fffbea; color: #111; box-shadow: 0 0 0 1px var(--fm-mobile-accent); }
  .fm-mobile-crop-tools { display: flex; height: 30px; align-items: center; justify-content: space-between; gap: 8px; margin-top: 5px; }
  .fm-mobile-orientation, .fm-mobile-rotate { display: flex; gap: 5px; }
  .fm-mobile-orientation button { display: flex; height: 30px; align-items: center; gap: 5px; padding: 0 9px; border: 1px solid #e3e5e7; border-radius: 9px; background: #f8f9fa; color: #33373c; font-size: 9px; font-weight: 750; }
  .fm-mobile-orientation button i { display: block; border: 1.5px solid currentColor; border-radius: 2px; }
  .fm-mobile-orientation button[data-mobile-orientation="landscape"] i { width: 15px; height: 10px; }
  .fm-mobile-orientation button[data-mobile-orientation="portrait"] i { width: 10px; height: 15px; }
  .fm-mobile-orientation button.is-active { border-color: var(--fm-mobile-accent); background: #fff5bf; color: #111; box-shadow: 0 0 0 1px var(--fm-mobile-accent); }
  .fm-mobile-rotate button { width: 30px; height: 30px; padding: 0; border: 1px solid #e3e5e7; border-radius: 50%; background: #f8f9fa; color: #222; font-size: 17px; }

  .fm-panel {
    position: fixed;
    z-index: 90;
    top: auto; right: 0; bottom: calc(68px + env(safe-area-inset-bottom)); left: 0;
    display: none;
    width: 100%;
    height: auto;
    max-height: 44svh;
    padding: 0;
    overflow-y: auto;
    border: 0;
    border-top: 1px solid var(--fm-mobile-line);
    background: #fff;
    color: #171717;
    box-shadow: 0 -10px 30px rgb(20 26 34 / 7%);
  }
  .fm-editor[data-mobile-mode="adjustments"] .fm-panel,
  .fm-editor[data-mobile-mode="order"] .fm-panel { display: block; }
  .fm-editor[data-mobile-mode="adjustments"] .fm-panel { bottom: calc(140px + env(safe-area-inset-bottom)); height: 58px; max-height: 58px; overflow: hidden; }

  .fm-panel [data-editor-section][hidden],
  .fm-panel .fm-export-hub[hidden] { display: none !important; }

  .fm-editor[data-mobile-mode="adjustments"] .fm-panel > * { display: none !important; }
  .fm-editor[data-mobile-mode="adjustments"] .fm-panel [data-editor-section="adjustments"] { display: block !important; padding: 10px 18px 8px; border: 0; }
  .fm-editor[data-mobile-mode="adjustments"] [data-editor-section="adjustments"] > .fm-panel__title,
  .fm-editor[data-mobile-mode="adjustments"] .fm-filter-preset,
  .fm-editor[data-mobile-mode="adjustments"] .fm-adjustments-advanced > summary,
  .fm-editor[data-mobile-mode="adjustments"] [data-action="compare-original"],
  .fm-editor[data-mobile-mode="adjustments"] .fm-reset-control { display: none !important; }
  .fm-editor[data-mobile-mode="adjustments"] .fm-adjustments-advanced,
  .fm-editor[data-mobile-mode="adjustments"] .fm-adjustments-advanced__body,
  .fm-editor[data-mobile-mode="adjustments"] .fm-adjustments { display: block !important; margin: 0; padding: 0; }
  /* ZIP117-R2: the mobile controller marks exactly one core adjustment as
     active. This deliberately avoids :has(), so the sub-tabs work on every
     supported mobile browser and embedded WebView. */
  .fm-editor[data-mobile-mode="adjustments"] .fm-adjustment { display: none !important; }
  .fm-editor[data-mobile-mode="adjustments"] .fm-adjustment.is-mobile-adjustment-active { display: block !important; }
  .fm-editor[data-mobile-mode="adjustments"] .fm-adjustment .fm-control__header,
  .fm-editor[data-mobile-mode="adjustments"] [data-editor-section="adjustments"] .fm-help,
  .fm-editor[data-mobile-mode="adjustments"] [data-action="reset-adjustments"] { display: none !important; }
  .fm-editor[data-mobile-mode="adjustments"] .fm-number-control { display: none; }
  .fm-editor[data-mobile-mode="adjustments"] .fm-adjustment__row { display: block; }
  .fm-editor[data-mobile-mode="adjustments"] .fm-range { width: 100%; height: 30px; accent-color: var(--fm-mobile-accent); }

  .fm-editor[data-mobile-mode="order"] .fm-panel > * { display: none !important; }
  .fm-editor[data-mobile-mode="order"] .fm-panel .fm-export-hub,
  .fm-editor[data-mobile-mode="order"] .fm-panel .fm-order { display: block !important; }
  .fm-editor[data-mobile-mode="order"] .fm-panel .fm-order { padding: 14px 14px 20px; border: 0; }
  .fm-editor[data-mobile-mode="order"] .fm-order .fm-panel__title { margin: 0 0 12px; color: #171717; font-size: 16px; text-align: center; text-transform: none; }
  .fm-editor[data-mobile-mode="order"] .fm-order .fm-field,
  .fm-editor[data-mobile-mode="order"] .fm-order-grid .fm-field:has([data-order="quantity"]) {
    display: grid !important;
    grid-template-columns: 82px 1fr;
    align-items: center;
    min-height: 62px;
    margin: 0 0 8px;
    padding: 9px 12px;
    border: 1px solid #eceef0;
    border-radius: 14px;
    background: #fafbfc;
    text-transform: none;
  }
  .fm-editor[data-mobile-mode="order"] .fm-order .fm-field > span { color: #777c82; font-size: 11px; text-transform: none; }
  .fm-editor[data-mobile-mode="order"] .fm-order .fm-field select,
  .fm-editor[data-mobile-mode="order"] .fm-order .fm-field input { width: 100%; min-height: 40px; padding: 0 10px; border: 0; background: transparent; color: #171717; font-size: 15px; font-weight: 650; }
  .fm-editor[data-mobile-mode="order"] .fm-reference-line,
  .fm-editor[data-mobile-mode="order"] .fm-order .fm-field:has([data-order="customerName"]),
  .fm-editor[data-mobile-mode="order"] .fm-order .fm-field:has([data-order="reference"]),
  .fm-editor[data-mobile-mode="order"] .fm-order .fm-field:has([data-order="notes"]),
  .fm-editor[data-mobile-mode="order"] .fm-order .fm-risk-acceptance,
  .fm-editor[data-mobile-mode="order"] .fm-order-summary,
  .fm-editor[data-mobile-mode="order"] [data-order-status],
  .fm-editor[data-mobile-mode="order"] [data-order-errors],
  .fm-editor[data-mobile-mode="order"] [data-order-upload-progress],
  .fm-editor[data-mobile-mode="order"] .fm-order > .fm-help,
  .fm-editor[data-mobile-mode="order"] .fm-honeypot { display: none !important; }

  .fm-editor[data-mobile-mode="crop"] .fm-panel { display: none !important; }
  .fm-editor[data-mobile-mode="crop"][data-print-fit-mode="frame"] .fm-crop-frame { display: none !important; }
  .fm-editor .fm-photo-project__item.is-active:hover .fm-photo-project__thumb { transform: none !important; }
  .fm-editor .fm-photo-project__item.is-active { touch-action: pan-y; }
  .fm-editor .fm-photo-project__item.is-active .fm-stage__surface.is-crop-interactive { touch-action: none; }
}

@media (max-width: 720px) and (max-height: 700px) {
  .fm-mobile-filter-panel, .fm-mobile-crop-panel { height: 116px; }
  .fm-mobile-crop-panel { padding-top: 4px; padding-bottom: 4px; }
  .fm-mobile-fit { height: 28px; }
  .fm-mobile-format-pills button { height: 28px; }
  .fm-mobile-crop-tools { height: 26px; margin-top: 3px; }
  .fm-mobile-orientation button, .fm-mobile-rotate button { height: 26px; }
  .fm-mobile-rotate button { width: 26px; }
  .fm-editor .fm-photo-project,
  .fm-editor[data-mobile-mode="adjustments"] .fm-photo-project,
  .fm-editor[data-mobile-mode="order"] .fm-photo-project { bottom: 184px; }
  .fm-mobile-filter__thumb { width: 48px; height: 48px; }
  .fm-mobile-filter { flex-basis: 50px; }
}


/* ZIP117 mobile order sheet + final shell refinements */
@media (max-width: 720px) {
  .fm-editor[data-mobile-mode="order"] [data-mobile-panel="order"] { display: block; }

  .fm-editor[data-mobile-mode="order"] .fm-panel { display: none !important; }
  .fm-editor[data-mobile-mode="order"] .fm-photo-project {
    bottom: 198px;
  }

  .fm-mobile-order-panel {
    max-height: min(44svh, 360px);
    padding: 10px 12px 16px;
    overflow-y: auto;
    border-top: 1px solid var(--fm-mobile-line);
    background: #fff;
  }
  .fm-mobile-order-heading {
    padding: 0 4px 9px;
    color: #171717;
    text-align: center;
    font-size: 15px;
    font-weight: 760;
  }
  .fm-mobile-order-row {
    position: relative;
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 8px;
    padding: 9px 14px;
    border: 1px solid #eceef0;
    border-radius: 14px;
    background: #fafbfc;
  }
  .fm-mobile-order-row > span {
    display: grid;
    min-width: 0;
    gap: 2px;
  }
  .fm-mobile-order-row small {
    color: #83878c;
    font-size: 10px;
    font-weight: 600;
  }
  .fm-mobile-order-row strong {
    overflow: hidden;
    color: #18191b;
    font-size: 15px;
    font-weight: 680;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .fm-mobile-order-row select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
  }
  .fm-mobile-order-row:not(.fm-mobile-order-row--quantity)::after {
    content: "›";
    flex: 0 0 auto;
    color: #8a8e93;
    font-size: 24px;
    line-height: 1;
  }
  .fm-mobile-order-row--quantity { padding-right: 10px; }
  .fm-mobile-quantity {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 38px 36px 38px;
    align-items: center;
    gap: 2px;
  }
  .fm-mobile-quantity button {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f0f1f3;
    color: #282b2f;
    font-size: 22px;
    line-height: 1;
  }
  .fm-mobile-quantity b {
    color: #171717;
    text-align: center;
    font-size: 17px;
  }
  .fm-mobile-bulk-note {
    padding: 1px 8px 4px;
    color: #777c82;
    text-align: center;
    font-size: 10px;
  }
  .fm-mobile-bulk-note[hidden] { display: none !important; }

  .fm-editor[data-has-image="false"] .fm-mobile-tray,
  .fm-editor[data-has-image="false"] .fm-mobile-filmstrip-bar { display: none !important; }
  .fm-editor[data-has-image="false"] .fm-mobile-nav {
    opacity: .42;
    pointer-events: none;
  }
}

@media (max-width: 390px) {
  .fm-mobile-topbar { grid-template-columns: 48px minmax(0, 1fr) auto; padding-right: 9px; padding-left: 9px; }
  .fm-mobile-filter { flex-basis: 52px; }
  .fm-mobile-filter__thumb { width: 50px; height: 50px; }
  .fm-mobile-format-pills button { min-width: 54px; padding-inline: 5px; }
}

/* Foto-Kmieć: presentation-only adaptation. Editor engine is unchanged. */
.fm-editor{--fm-ref-green:#f7940c;--fm-ref-green-strong:#e57c00;--fm-ref-green-dark:#be5e00;--fm-accent:#f7940c;--fm-accent-hover:#e57c00;--fm-mobile-accent:#f7940c}
@media(max-width:980px){.fm-editor{--fm-mobile-accent:#f7940c;--fm-ref-green:#f7940c;--fm-ref-green-strong:#e57c00;--fm-ref-green-dark:#be5e00}}

/* Foto-Kmieć STEP3: viewport-only styling, never rendered into customer pixels. */
.fm-photo-project__item{box-shadow:0 5px 18px #18334916!important;background:#fff}.fm-photo-project__media{background:#dce3e8!important}.fm-reference-brand{display:none!important}
.fm-live-price{position:fixed;right:318px;bottom:24px;width:min(340px,calc(100vw - 36px));z-index:80;border:1px solid #dce5ef;border-radius:18px;background:#fff;box-shadow:0 12px 34px #1533541c;padding:20px;color:#163451;font:16px/1.5 Roboto,Arial,sans-serif}.fm-live-price strong{display:block;font-size:28px;color:#0065b5}.fm-live-price summary{cursor:pointer;font-weight:600}.fm-live-price small{display:block;color:#637d92;font-size:13px}.fm-live-price ul{list-style:none;padding:0;margin:12px 0 0;max-height:160px;overflow:auto;font-size:14px}.fm-live-price li{display:flex;justify-content:space-between;gap:12px}.fm-live-price[hidden]{display:none}
@media(max-width:1000px){.fm-live-price{right:18px;bottom:18px;width:280px;padding:14px}.fm-live-price strong{font-size:23px}}
@media(max-width:720px){.fm-live-price{position:fixed;top:env(safe-area-inset-top);left:60px;right:100px;bottom:auto;width:auto;margin:0;padding:5px 8px;z-index:125;border:0;border-radius:0;box-shadow:none;text-align:center;background:#fff}.fm-live-price summary>span{font-size:11px!important}.fm-live-price summary strong{font-size:18px;margin:0;line-height:1.2}.fm-live-price summary>small{display:none}.fm-live-price summary::after{right:2px;top:16px}.fm-live-price details[open]{position:absolute;top:4px;left:0;width:min(270px,calc(100vw - 90px));padding:8px 12px;border:1px solid #dce5ef;border-radius:12px;background:#fff;box-shadow:0 8px 24px #1533541c;text-align:left}.fm-live-price ul{max-height:100px}}

.fm-live-price summary{list-style:none}.fm-live-price summary>span{font-size:14px}.fm-live-price summary strong{margin:4px 0}.fm-live-price summary::after{content:"⌃";position:absolute;right:18px;top:16px}.fm-live-price details:not([open]) summary::after{content:"⌄"}@media(min-width:1001px) and (max-width:1399px){.fm-live-price{width:300px;padding:10px 16px;bottom:14px}.fm-live-price summary strong{font-size:22px;line-height:1.15}.fm-live-price summary>small{font-size:12px}.fm-photo-project{padding-bottom:130px}}

/* Physical photo corners stay square at all crop sizes. */
.fm-photo-project__media,.fm-stage__surface,.fm-stage__image,.fm-crop-frame,.fm-photo-project__static-window,.fm-photo-project__static-image{border-radius:0!important}

.fm-editor .fm-panel .fm-order-grid .fm-field:has([data-order="quantity"]){display:flex!important;flex-direction:column}
.fm-reference-bulk-quantity{display:none!important}

.fm-mobile-correction{display:grid;gap:6px;margin:10px 12px;font-size:13px}.fm-mobile-correction select{width:100%;min-height:40px;border:1px solid #e3e5e7;border-radius:8px;background:white;color:#163451}@media(max-width:720px){.fm-mobile-order-panel{max-height:48vh;overflow-y:auto}}

/* Finished print preview persists on every card, independent of selection. */
.fm-editor .fm-photo-project__static-crop{z-index:3;pointer-events:none}
.fm-editor .fm-photo-project__item.is-active .fm-photo-project__static-crop{display:block}
.fm-editor[data-crop-card-hover="true"] .fm-photo-project__item.is-active .fm-photo-project__static-crop{display:none}
@media(max-width:720px){.fm-editor[data-mobile-mode="crop"] .fm-photo-project__item.is-active .fm-photo-project__static-crop{display:none}}
.fm-editor .fm-photo-project__static-aperture{box-shadow:0 8px 22px #16345130}
@media(min-width:721px){.fm-editor .fm-photo-project[data-dock-state] .fm-photo-project__item{flex-basis:400px;width:400px;grid-template-rows:42px 400px 31px 58px 43px;height:574px}}

/* STEP90: explicit per-photo editing; the sidebar only changes all prints. */
.fm-editor [data-editor-internals],
.fm-editor .fm-toolbar,
.fm-editor [data-photo-bulk-controls],
.fm-editor .fm-panel > :not(.fm-export-hub) { display: none !important; }
.fm-editor .fm-panel .fm-export-hub { display: block !important; }
.fm-editor .fm-photo-tools { width: 100%; padding: 0 12px; background: #fff; }
.fm-editor .fm-photo-tools > [hidden] { display: none !important; }
.fm-editor .fm-photo-tools .fm-panel__section { padding: 12px 0; margin: 0; border: 0; }
.fm-editor .fm-photo-tools .fm-panel__title { font-size: 13px; }
.fm-editor .fm-photo-tools .fm-adjustments-advanced { display: block !important; color: #173b60; border-color: #dfe2e5; margin-top: 8px; }
.fm-editor .fm-photo-project__settings { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 0; }
.fm-editor .fm-photo-project__border-checkbox { grid-column: auto; display: flex; align-items: center; min-width: 0; gap: 6px; padding: 7px 6px 8px; border-left: 1px solid #e0e2e4; font-size: 11px; line-height: 1.3; cursor: pointer; }
.fm-editor .fm-photo-project__border-checkbox input { flex: 0 0 17px; width: 17px; height: 17px; margin: 0; accent-color: #ff9100; }
.fm-editor .fm-photo-project__edit-tools { display: flex; border-top: 1px solid #dfe2e5; }
.fm-editor .fm-card-edit-button { flex: 1; border: 0; background: #fff; padding: 8px 4px; color: #173b60; font-size: 12px; cursor: pointer; }
.fm-editor .fm-card-edit-button:hover, .fm-editor .fm-card-edit-button:focus-visible { background: #fff0dc; }
.fm-editor .fm-photo-project__item.is-active .fm-photo-project__static-crop { display: none !important; }
.fm-editor .fm-photo-project__stage-slot { z-index: 4; }

/* STEP111: after the pointer leaves crop editing, the active card must show
   the same committed crop-result layer as every inactive card.  A later
   STEP90 rule hid that layer unconditionally and exposed the live stage's
   full-source presentation instead. */
@media (min-width: 721px) and (hover: hover) and (pointer: fine) {
  .fm-editor:not([data-crop-card-hover="true"]) .fm-photo-project__item.is-active .fm-photo-project__static-crop {
    display: block !important;
    z-index: 5;
  }
}
.fm-editor .fm-crop-frame { z-index: 10 !important; }
.fm-editor .fm-photo-project__item.is-active .fm-stage__surface.is-crop-interactive .fm-crop-frame { opacity: 1 !important; outline-color: #ff9100; }
.fm-editor .fm-photo-project__item { content-visibility: auto; contain-intrinsic-size: auto 574px; }
.fm-editor .fm-photo-project__item.is-active { content-visibility: visible; }
.fm-editor .fm-photo-project__list,
.fm-editor .fm-photo-project__stage-slot,
.fm-editor [data-photo-tools] { overflow-anchor: none; }
.fm-editor .fm-photo-project__pager { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 8px 16px 24px; color: #173b60; font-weight: 600; }
.fm-editor .fm-photo-project__pager[hidden] { display: none; }
.fm-editor .fm-photo-project__pager button { border: 1px solid #cbd9e6; border-radius: 9px; background: #fff; padding: 8px 13px; color: #075da8; font: inherit; cursor: pointer; }
.fm-editor .fm-photo-project__pager button:disabled { opacity: .45; cursor: default; }
.fm-editor .fm-stage__surface.is-crop-interactive .fm-crop-handle { z-index: 12; opacity: 1 !important; pointer-events: auto !important; width: 18px; height: 18px; border: 2px solid #fa8c00; background: #fff; }
.fm-editor .fm-crop-geometry { position: absolute; top: 12px; left: 12px; z-index: 20; max-width: calc(100% - 24px); color: #183b60; }
.fm-editor .fm-crop-geometry summary { display: inline-block; padding: 5px 10px; border-radius: 6px; background: #fff; box-shadow: 0 2px 8px #0003; cursor: pointer; font-size: 20px; list-style: none; }
.fm-editor .fm-crop-geometry summary::-webkit-details-marker { display: none; }
.fm-editor .fm-crop-geometry > .fm-panel__section { width: 240px; max-width: 100%; padding: 12px; margin-top: 5px; max-height: 280px; overflow-y: auto; border-radius: 8px; background: #fff; box-shadow: 0 3px 14px #0003; }
.fm-editor .fm-crop-geometry:not([open]) > .fm-panel__section { display: none !important; }
.fm-editor .fm-crop-geometry .fm-panel__title { display: none; }
.fm-editor .fm-crop-geometry .fm-reference-geometry { display: grid; }
.fm-editor:not([data-active-editor-tool="crop"]) .fm-crop-geometry { display: none; }
.fm-editor .fm-stage__paper, .fm-editor .fm-photo-project__static-paper { background-color: #fff !important; }
@media (min-width: 721px) {
  .fm-editor .fm-photo-project[data-dock-state] .fm-photo-project__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 400px)); gap: 22px; align-items: start; }
  .fm-editor .fm-photo-project[data-dock-state] .fm-photo-project__item { display: flex; flex-direction: column; width: 100%; max-width: 400px; min-width: 0; height: auto; flex-basis: auto; }
  .fm-editor .fm-photo-project__card-head { height: 36px; flex: none; }
  .fm-editor .fm-photo-project__media { width: 100%; aspect-ratio: 1; height: auto; flex: none; }
  .fm-editor .fm-photo-project__settings { min-height: 58px; flex: none; }
  .fm-editor .fm-photo-project__footer { height: 43px; flex: none; }
}
@media (max-width: 720px) {
  .fm-editor .fm-photo-tools { display: none !important; }
  .fm-editor .fm-panel { display: none !important; }
  .fm-editor[data-mobile-mode="adjustments"] .fm-photo-tools { display: block !important; position: fixed; z-index: 96; bottom: calc(140px + env(safe-area-inset-bottom)); left: 0; height: 58px; padding: 8px 18px; overflow: hidden; box-shadow: 0 -5px 18px #16345112; }
  .fm-editor[data-mobile-mode="adjustments"] .fm-photo-tools > [data-editor-section="adjustments"] { display: block !important; padding: 0; }
  .fm-editor .fm-mobile-order-notes { display: grid; gap: 5px; padding: 8px 14px; font-size: 12px; }
  .fm-editor .fm-mobile-order-notes textarea { min-height: 64px; padding: 8px; border: 1px solid #dfe2e5; border-radius: 8px; }
  .fm-editor .fm-mobile-border { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 8px; font-size: 12px; }
  .fm-editor .fm-mobile-crop-tools { display: none; }
  .fm-editor .fm-crop-geometry { top: 78px; }
  .fm-editor .fm-mobile-filmstrip-select, .fm-editor [data-mobile-photo-toggle],
  .fm-editor [data-mobile-action="select-all"], .fm-editor [data-mobile-action="active-only"] { display: none !important; }
}

/* STEP91: crop corners live outside clipped cards, in the browser top layer. */
.fm-crop-handle-layer {
  position: fixed; inset: auto; margin: 0; padding: 0; border: 0;
  max-width: none; max-height: none; overflow: visible; box-sizing: border-box;
  background: transparent; color: #fa8c00; pointer-events: none;
  z-index: 2147483647;
}
.fm-crop-handle-layer[hidden] { display: none !important; }
.fm-crop-handle-layer::backdrop { background: transparent; pointer-events: none; }
.fm-crop-handle-layer .fm-crop-handle {
  position: absolute; display: block; box-sizing: border-box;
  width: 18px; height: 18px; margin: 0; border: 2px solid #fa8c00;
  border-radius: 0; background: #fff; opacity: 1; box-shadow: 0 0 2px #0004;
  pointer-events: auto; touch-action: none; user-select: none;
}
.fm-crop-handle-layer .fm-crop-handle--nw { top: 0; left: 0; translate: -50% -50%; cursor: nwse-resize; }
.fm-crop-handle-layer .fm-crop-handle--n { top: 0; left: 50%; translate: -50% -50%; cursor: ns-resize; }
.fm-crop-handle-layer .fm-crop-handle--ne { top: 0; right: 0; translate: 50% -50%; cursor: nesw-resize; }
.fm-crop-handle-layer .fm-crop-handle--e { top: 50%; right: 0; translate: 50% -50%; cursor: ew-resize; }
.fm-crop-handle-layer .fm-crop-handle--se { bottom: 0; right: 0; translate: 50% 50%; cursor: nwse-resize; }
.fm-crop-handle-layer .fm-crop-handle--s { bottom: 0; left: 50%; translate: -50% 50%; cursor: ns-resize; }
.fm-crop-handle-layer .fm-crop-handle--sw { bottom: 0; left: 0; translate: -50% 50%; cursor: nesw-resize; }
.fm-crop-handle-layer .fm-crop-handle--w { top: 50%; left: 0; translate: -50% -50%; cursor: ew-resize; }
.fm-editor .fm-crop-geometry { display: inline-flex; gap: 2px; padding: 3px; border-radius: 6px; background: #fff; box-shadow: 0 2px 8px #0003; }
.fm-editor .fm-crop-geometry button { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 3px; background: #fff; color: #173b60; font-size: 23px; cursor: pointer; }
.fm-editor .fm-crop-geometry button:hover { background: #fff0dc; }
.fm-editor .fm-crop-geometry button:focus-visible { outline: 2px solid #fa8c00; outline-offset: 1px; }
@media (pointer: coarse), (hover: none) {
  .fm-crop-handle-layer .fm-crop-handle { width: 20px; height: 20px; }
  .fm-crop-handle-layer .fm-crop-handle::before { content: ''; position: absolute; inset: -12px; }
}

/* STEP97: global print controls and price dock. */
.fm-editor [data-crop-geometry][hidden] { display: none !important; }
.fm-editor .fm-global-checkbox { display: flex; align-items: center; gap: 8px; padding: 10px 0; font-size: 13px; line-height: 1.4; cursor: pointer; }
.fm-editor .fm-global-checkbox input { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; accent-color: #ff9100; }
.fm-editor select { text-indent: 0 !important; letter-spacing: normal; padding-left: 8px !important; box-sizing: border-box; }
.fm-editor .fm-photo-project__field-select { font-size: 11px; padding-right: 18px; }
.fm-editor__header { position: relative; }
.fm-editor .fm-reference-print-count { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); margin: 0; padding: 7px 16px; gap: 10px; border-radius: 12px; background: #fff0dc; color: #164576; font-size: 18px; font-weight: 700; }
.fm-editor .fm-reference-print-count b { min-width: 34px; height: 34px; padding: 0 9px; font-size: 21px; background: #ff9100; color: #fff; }
.fm-editor .fm-live-price { position: relative !important; inset: auto !important; transform: none !important; width: 100% !important; max-width: 100%; margin: auto 0 0; padding: 16px 12px; flex-shrink: 0; font-size: 14px; box-shadow: none; border-radius: 12px; text-align: left; }
.fm-editor .fm-live-price details[open] { position: static !important; width: 100% !important; padding: 0; border: 0; box-shadow: none; }
.fm-editor .fm-live-price strong { font-size: 26px; }
.fm-editor .fm-live-price li { font-size: 12px; flex-wrap: wrap; }
.fm-editor .fm-live-price ul { max-height: 140px; }
@media(min-width:721px) {
  .fm-editor .fm-panel { display: flex !important; flex-direction: column; gap: 16px; }
  .fm-editor .fm-panel > .fm-export-hub { flex-shrink: 0; }
  .fm-editor .fm-panel > .fm-live-price { display: block !important; }
  .fm-editor .fm-panel > .fm-live-price[hidden] { display: none !important; }
}
@media(max-width:720px) {
  .fm-editor .fm-mobile-print-count { display: flex; align-items: center; justify-content: center; gap: 7px; flex-wrap: wrap; font-size: 14px; color: #17436b; font-weight: 700; line-height: 1.05; text-align: center; }
  .fm-editor .fm-mobile-print-count b { padding: 4px 9px; border-radius: 10px; background: #ff9100; color: #fff; font-size: 18px; }
  .fm-editor .fm-mobile-print-progress { font-size: 11px; font-weight: 700; color: #5d6b79; white-space: nowrap; }
  .fm-editor .fm-mobile-print-count[data-import-active='true'] .fm-mobile-print-progress { color: #1f4f7a; }
  .fm-editor .fm-live-price { margin: 8px 0 0; }
  .fm-editor > .fm-live-price { display: none !important; }
  .fm-editor .fm-mobile-correction input { width: 18px; min-height: 18px; padding: 0; }
}

@media(min-width:721px) and (max-width:1050px) {
 .fm-editor .fm-reference-project-name strong { display:block;max-width:calc(50vw - 220px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
}

/* Import notices must remain visible after the empty drop zone is hidden. */
[data-photo-editor] > [data-message]:not([hidden]) { position: fixed; left: 20px; bottom: 20px; z-index: 100000; max-width: min(520px, calc(100vw - 40px)); box-shadow: 0 4px 18px #0002; }

@media(max-width:720px) {
  .fm-mobile-photo-settings { padding: 6px 10px; border-top: 1px solid #dde3e8; background:#fff; }
  .fm-mobile-photo-settings > small { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#596572; font-size:10px; }
  .fm-mobile-photo-fields { display:grid; grid-template-columns:1fr 1fr 1.1fr; gap:6px; }
  .fm-mobile-photo-fields > label { min-width:0; color:#596572; font-size:10px; }
  .fm-mobile-photo-fields select { display:block; width:100%; min-width:0; height:34px; padding:3px 5px; font-size:12px; background:#fff; color:#172b46; border:1px solid #ccd5df; border-radius:5px; }
  .fm-mobile-photo-quantity { display:flex; height:34px; border:1px solid #ccd5df; border-radius:5px; overflow:hidden; }
  .fm-mobile-photo-quantity input { min-width:0; width:100%; text-align:center; padding:0; border:0; font-size:14px; }
  .fm-mobile-photo-quantity button { flex:0 0 28px; border:0; background:#f4f6f8; font-size:18px; }
  .fm-mobile-photo-settings .fm-mobile-border { margin:3px 0 0; min-height:23px; font-size:11px; }
  .fm-editor .fm-photo-project,
  .fm-editor[data-mobile-mode="adjustments"] .fm-photo-project,
  .fm-editor[data-mobile-mode="order"] .fm-photo-project { bottom:298px; }
  .fm-editor[data-mobile-mode="order"] .fm-mobile-photo-settings { display:none; }
}

[data-photo-editor] > [data-message] { pointer-events:none; }

/* STEP112: client requested removal of rule-of-thirds crop guides while preserving the crop frame and handles. */
.fm-editor .fm-crop-grid { display: none !important; }


/* 3.0.38: one mobile tool panel; desktop and print geometry remain unchanged. */
.fm-mobile-photo-navigation { display: none; }
@media (max-width: 720px) {
  .fm-editor {
    --fm-mobile-nav-height: 60px;
    --fm-mobile-tool-height: 124px;
    --fm-mobile-adjustment-tabs-height: 64px;
    --fm-mobile-bottom: calc(var(--fm-mobile-nav-height) + var(--fm-mobile-tool-height) + env(safe-area-inset-bottom, 0px));
  }
  .fm-editor[data-mobile-mode="order"] { --fm-mobile-tool-height: min(44svh, 340px); }
  .fm-editor .fm-mobile-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); height: calc(var(--fm-mobile-nav-height) + env(safe-area-inset-bottom, 0px)); min-height: 0; box-sizing: border-box; padding: 3px 4px env(safe-area-inset-bottom, 0px); }
  .fm-editor .fm-mobile-nav__icon { width: 30px; height: 30px; }
  .fm-editor .fm-mobile-nav__icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
  .fm-editor .fm-mobile-nav small { font-size: 10px; white-space: nowrap; }
  .fm-editor .fm-mobile-tray { bottom: calc(var(--fm-mobile-nav-height) + env(safe-area-inset-bottom, 0px)); height: var(--fm-mobile-tool-height); box-sizing: border-box; }
  .fm-editor .fm-mobile-tray > .fm-mobile-tray__panel { display: none; box-sizing: border-box; }
  .fm-editor[data-mobile-mode="settings"] [data-mobile-panel="settings"],
  .fm-editor[data-mobile-mode="filters"] [data-mobile-panel="filters"],
  .fm-editor[data-mobile-mode="crop"] [data-mobile-panel="crop"],
  .fm-editor[data-mobile-mode="adjustments"] [data-mobile-panel="adjustments"],
  .fm-editor[data-mobile-mode="order"] [data-mobile-panel="order"] { display: block; }
  .fm-editor .fm-mobile-photo-settings,
  .fm-editor .fm-mobile-filter-panel,
  .fm-editor .fm-mobile-crop-panel { height: var(--fm-mobile-tool-height); overflow-y: auto; }
  .fm-editor .fm-mobile-order-panel { height: var(--fm-mobile-tool-height); max-height: none; overflow-y: auto; }
  .fm-editor .fm-mobile-adjustment-panel { position: absolute; bottom: 0; left: 0; right: 0; height: var(--fm-mobile-adjustment-tabs-height); }
  .fm-editor[data-mobile-mode="adjustments"] .fm-photo-tools { bottom: calc(var(--fm-mobile-nav-height) + var(--fm-mobile-adjustment-tabs-height) + env(safe-area-inset-bottom, 0px)); height: calc(var(--fm-mobile-tool-height) - var(--fm-mobile-adjustment-tabs-height)); box-sizing: border-box; }
  .fm-editor[data-mobile-mode="adjustments"] .fm-panel { display: none !important; }
  .fm-editor .fm-photo-project,
  .fm-editor[data-mobile-mode="adjustments"] .fm-photo-project,
  .fm-editor[data-mobile-mode="order"] .fm-photo-project { bottom: var(--fm-mobile-bottom); }
  .fm-editor .fm-photo-project__pager { display: none; }
  .fm-editor .fm-mobile-photo-navigation { position: fixed; z-index: 93; top: calc(58px + env(safe-area-inset-top, 0px)); bottom: var(--fm-mobile-bottom); left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
  .fm-editor .fm-mobile-photo-navigation[hidden],
  .fm-editor[data-has-image="false"] .fm-mobile-photo-navigation { display: none !important; }
  .fm-editor .fm-mobile-photo-navigation button { display: grid; place-items: center; width: 44px; height: 48px; padding: 0; margin: 0 3px; border: 0; border-radius: 0; background: transparent; color: #fff; pointer-events: auto; touch-action: manipulation; }
  .fm-editor .fm-mobile-photo-navigation button > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgb(25 30 35 / 42%); box-shadow: 0 1px 5px rgb(0 0 0 / 12%); }
  .fm-editor .fm-mobile-photo-navigation svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .fm-editor .fm-mobile-photo-navigation button:disabled { visibility: hidden; pointer-events: none; }
  .fm-editor.is-interaction-locked .fm-mobile-photo-navigation button { pointer-events: none; opacity: .35; }
  .fm-editor .fm-mobile-photo-navigation button:focus-visible { outline: 2px solid var(--fm-mobile-accent); outline-offset: -2px; }
}

/* Keep mobile navigation clear of the enlarged crop handles. */
@media (max-width: 720px) {
  .fm-editor[data-mobile-mode="crop"] .fm-mobile-photo-navigation button { translate: 0 var(--fm-crop-arrow-offset, 0px); }
}

/* Mobile print previews: square corners only; retain print geometry. */
@media (max-width: 720px) {
  .fm-editor .fm-crop-aperture,
  .fm-editor .fm-stage__paper,
  .fm-editor .fm-stage__photo-window,
  .fm-editor .fm-stage__image,
  .fm-editor .fm-tone-preview,
  .fm-editor .fm-photo-project__thumb,
  .fm-editor .fm-photo-project__static-crop,
  .fm-editor .fm-photo-project__static-aperture,
  .fm-editor .fm-photo-project__static-paper,
  .fm-editor .fm-photo-project__static-window,
  .fm-editor .fm-photo-project__static-image,
  .fm-editor .fm-mobile-photo > button:first-child,
  .fm-editor .fm-mobile-photo img,
  .fm-editor .fm-mobile-filter__thumb,
  .fm-editor .fm-mobile-filter__thumb img { border-radius: 0 !important; }
}

/* Temporary progress next to the print count; independent of card rendering. */
.fm-editor [data-header-import-progress][hidden],
.fm-editor [data-mobile-import-progress][hidden] { display: none !important; }
@media (min-width:721px) {
  .fm-editor[data-import-in-flight] .fm-reference-print-count {
    display: inline-flex; visibility: visible; opacity: 1;
  }
  .fm-editor .fm-header-import-progress {
    display: inline-block; color: #164576; font-size: 15px; font-weight: 700;
    border-left: 1px solid #e6cdaa; padding-left: 12px; margin-left: 2px;
    font-variant-numeric: tabular-nums; white-space: nowrap;
  }
}
@media (min-width:721px) and (max-width:1100px) {
  .fm-editor[data-import-in-flight] .fm-reference-print-count { flex-wrap: wrap; justify-content: center; width: 154px; padding: 4px 8px; gap: 3px 6px; font-size: 14px; }
  .fm-editor[data-import-in-flight] .fm-reference-print-count b { height: 24px; min-width: 24px; font-size: 14px; }
  .fm-editor .fm-header-import-progress { flex: 0 0 100%; text-align: center; font-size: 12px; border: 0; padding: 0; margin: 0; }
}
@media (max-width:720px) {
  .fm-editor .fm-mobile-print-count[data-import-active="true"] { gap: 2px 6px; align-self: center; }
  .fm-editor .fm-mobile-print-count[data-import-active="true"] .fm-mobile-print-progress {
    flex: 0 0 100%; text-align: center; font-size: 11px; font-variant-numeric: tabular-nums; color: #164576;
  }
  .fm-editor .fm-mobile-print-count[data-import-active="true"] b { padding: 3px 7px; font-size: 15px; }
}
@media (max-width:360px) {
  .fm-editor .fm-mobile-print-count[data-import-active="true"] .fm-mobile-print-progress { font-size: 10px; }
}

.fm-upload-mobile-banner{display:none!important}
@media(max-width:720px){.fm-editor .fm-upload-mobile-banner:not([hidden]){display:block!important;position:fixed;left:12px;right:12px;top:calc(env(safe-area-inset-top,0px) + 60px);z-index:10001;padding:12px 14px;background:#fff;color:#153a61;border:1px solid #cbd9e8;border-radius:12px;box-shadow:0 6px 24px #172f5522;font-size:13px;line-height:1.45}.fm-upload-mobile-banner p{margin:5px 0 8px;font-size:12px}.fm-upload-mobile-banner>div{display:flex;gap:12px;justify-content:space-between}.fm-upload-mobile-banner button{font:inherit;background:#edf4fc;color:#153a61;border:0;border-radius:6px;padding:8px 10px}.fm-upload-mobile-banner[hidden]{display:none!important}}


/* 3.0.48: fixed logical stage, tabs above the options and dedicated checkout CTA. */
.fm-mobile-confirm{display:none}
@media(max-width:720px){
 .fm-editor{--fm-mobile-confirm-height:88px;--fm-mobile-base-tool-height:124px;--fm-mobile-tool-height:var(--fm-mobile-base-tool-height);--fm-mobile-bottom:calc(var(--fm-mobile-confirm-height) + var(--fm-mobile-nav-height) + var(--fm-mobile-tool-height) + env(safe-area-inset-bottom,0px));--fm-mobile-stage-bottom:calc(var(--fm-mobile-confirm-height) + var(--fm-mobile-nav-height) + var(--fm-mobile-base-tool-height) + env(safe-area-inset-bottom,0px))}
 .fm-editor[data-mobile-mode="order"]{--fm-mobile-tool-height:min(34svh,260px)}
 .fm-editor .fm-mobile-tray{bottom:calc(var(--fm-mobile-confirm-height) + env(safe-area-inset-bottom,0px))}
 .fm-editor .fm-mobile-nav{bottom:calc(var(--fm-mobile-confirm-height) + var(--fm-mobile-tool-height) + env(safe-area-inset-bottom,0px));height:var(--fm-mobile-nav-height);padding:3px 4px;box-shadow:none;border-bottom:1px solid #e6edf2}
 .fm-editor .fm-photo-project,.fm-editor[data-mobile-mode="order"] .fm-photo-project,.fm-editor[data-mobile-mode="adjustments"] .fm-photo-project{bottom:var(--fm-mobile-stage-bottom);padding:0;min-height:0}
 .fm-editor .fm-photo-project__stage-slot .fm-stage,.fm-editor .fm-photo-project__stage-slot .fm-stage__viewport,.fm-editor .fm-photo-project__stage-slot .fm-stage__surface{min-height:0!important;box-sizing:border-box}
 .fm-editor .fm-mobile-photo-navigation{bottom:var(--fm-mobile-bottom)}
 .fm-editor .fm-mobile-confirm{position:fixed;z-index:94;bottom:0;left:0;right:0;display:grid;grid-template-rows:24px 46px;gap:6px;padding:5px 12px calc(7px + env(safe-area-inset-bottom,0px));height:calc(var(--fm-mobile-confirm-height) + env(safe-area-inset-bottom,0px));box-sizing:border-box;background:#fff;border-top:1px solid #e4eaf0;box-shadow:0 -4px 16px #1634510c}
 .fm-editor .fm-mobile-confirm__price{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#153a61;font-size:12px;min-width:0}
 .fm-editor .fm-mobile-confirm__price strong{font-size:15px;text-align:right;overflow-wrap:anywhere;line-height:1.15}
 .fm-editor .fm-mobile-confirm__button{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-width:0;min-height:44px;background:#ff890b;color:#fff;border:0;border-radius:12px;padding:8px 12px;font:inherit;font-weight:700;font-size:15px;cursor:pointer;touch-action:manipulation;box-sizing:border-box}
 .fm-editor .fm-mobile-confirm__button:disabled{opacity:.55;cursor:not-allowed}
 .fm-editor .fm-mobile-confirm__button:focus-visible{outline:2px solid #153a61;outline-offset:2px}
 .fm-editor[data-has-image="false"] .fm-mobile-confirm{display:none!important}
 .fm-editor[data-has-image="false"] .fm-mobile-nav{bottom:0}
 .fm-editor[data-mobile-mode="settings"] .fm-mobile-photo-settings{padding-inline:12px}
 .fm-editor .fm-mobile-photo-fields{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
 .fm-editor .fm-mobile-photo-fields>*{min-width:0}
 .fm-editor .fm-mobile-photo-fields select,.fm-editor .fm-mobile-photo-quantity{width:100%;min-width:0;box-sizing:border-box}
 .fm-editor .fm-mobile-photo-quantity input{min-width:0;width:100%;flex:1 1 0}
}
@media(max-width:720px) and (max-height:520px){.fm-editor{--fm-mobile-base-tool-height:96px;--fm-mobile-nav-height:44px;--fm-mobile-confirm-height:74px}.fm-editor .fm-mobile-confirm{grid-template-rows:18px 40px;gap:3px}.fm-editor .fm-mobile-confirm__button{min-height:40px}.fm-editor[data-mobile-mode="order"]{--fm-mobile-tool-height:96px}}


/* S123: native first-tap file selection on the mobile empty editor.
   The input occupies the empty dropzone only; existing-image crop tools are untouched. */
@media (max-width:720px) {
 .fm-editor[data-has-image="false"]:not([data-import-in-flight]):not([aria-busy="true"]) .fm-dropzone > input[data-file-input] {
   position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
   max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;
   clip:auto!important;clip-path:none!important;opacity:0!important;overflow:hidden!important;
   z-index:12!important;pointer-events:auto!important;cursor:pointer;touch-action:manipulation;
   font-size:16px!important;
 }
 .fm-editor[data-has-image="false"] .fm-dropzone__empty .fm-button--primary:hover,
 .fm-editor[data-has-image="false"] .fm-dropzone__empty .fm-button--primary:active {transform:none!important;}
 .fm-editor[data-has-image="false"] .fm-dropzone:focus-within .fm-dropzone__empty .fm-button--primary{outline:2px solid #1765ae;outline-offset:3px;}
}

/* 3.0.62: explicit filter tool uses the live, high-resolution layer. */
.fm-editor[data-active-editor-tool="adjustments"] .fm-photo-project__item.is-active .fm-photo-project__static-crop,
.fm-editor[data-active-editor-tool="annotations"] .fm-photo-project__item.is-active .fm-photo-project__static-crop {display:none!important}
.fm-editor .fm-tone-preview,.fm-editor .fm-photo-project__static-image,.fm-editor [data-static-tone-preview]{image-rendering:auto}

/* Desktop confirmation label, without changing the existing mobile CTA. */
@media (min-width: 901px) {
  .fm-editor .fm-reference-cart { width: auto; min-width: max-content; white-space: nowrap; }
  .fm-editor .fm-reference-cart > span { white-space: nowrap; }
  .fm-editor .fm-reference-project-name strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

/* 3.0.65: compact mobile toolbar and reserved synchronization slot. */
@media (max-width:720px) {
  .fm-editor .fm-mobile-topbar { grid-template-columns: 80px minmax(0,1fr) auto; padding-inline: 8px; }
  .fm-editor .fm-mobile-topbar__back { width: 40px; }
  .fm-editor .fm-mobile-topbar__actions { gap: 4px; }
  .fm-editor .fm-mobile-topbar__remove { display:grid;place-items:center;flex:0 0 36px;width:36px;height:40px;border-radius:8px;background:#fff2f2;color:#b91c1c;padding:0;touch-action:manipulation; }
  .fm-editor .fm-mobile-topbar__remove[hidden] {display:none!important;}
  .fm-editor .fm-mobile-topbar__remove:disabled {opacity:.4;}
  .fm-editor .fm-mobile-topbar__remove svg {width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
  .fm-editor .fm-mobile-topbar__remove:focus-visible {outline:2px solid #b91c1c;outline-offset:1px;}
  .fm-editor .fm-mobile-topbar__done {flex-basis:68px;width:68px;min-width:68px;}
  .fm-editor .fm-mobile-print-count {font-size:13px;gap:4px;min-width:0;}
  .fm-editor .fm-mobile-print-count b {font-size:15px;padding:3px 6px;}
  .fm-editor {--fm-mobile-nav-height:48px;--fm-mobile-base-tool-height:108px;}
  .fm-editor .fm-mobile-nav {padding-block:1px;}
  .fm-editor .fm-mobile-nav > button {gap:1px;}
  .fm-editor .fm-mobile-nav__icon {width:26px;height:26px;font-size:16px;}
  .fm-editor .fm-mobile-photo-settings {padding-block:3px;}
  .fm-editor .fm-mobile-photo-settings .fm-mobile-border {margin-top:2px;min-height:22px;}
  .fm-editor .fm-mobile-photo-fields select,.fm-editor .fm-mobile-photo-quantity {height:34px;}
  .fm-editor .fm-mobile-photo-navigation button {translate:0 var(--fm-crop-arrow-offset,0px);}
  .fm-editor .fm-mobile-filter-panel {padding-block:4px;}
}
@media(max-width:720px) and (max-height:520px) {
  .fm-editor {--fm-mobile-nav-height:44px;--fm-mobile-base-tool-height:96px;}
}
@media(max-width:360px) {
  .fm-editor .fm-mobile-topbar__done {flex-basis:58px;width:58px;min-width:58px;font-size:12px;}
  .fm-editor .fm-mobile-topbar__actions {gap:2px;}
  .fm-editor .fm-mobile-print-count {font-size:12px;}
  .fm-editor .fm-mobile-topbar__remove {flex-basis:34px;width:34px;}
}

/* 3.0.68: reclaim the unused crop-only tray space. The larger viewport
   centers the existing logical surface; a mode switch is camera-only. */
@media (max-width:720px) {
  .fm-editor[data-mobile-mode="crop"] {
    --fm-mobile-tool-height:40px;
    --fm-mobile-stage-bottom:var(--fm-mobile-bottom);
    --fm-mobile-crop-reclaimed:calc(var(--fm-mobile-base-tool-height) - var(--fm-mobile-tool-height));
  }
  .fm-editor[data-mobile-mode="crop"] .fm-mobile-crop-panel {height:var(--fm-mobile-tool-height);min-height:0;padding:4px 10px;overflow:hidden;}
  .fm-editor[data-mobile-mode="crop"] .fm-mobile-fit {height:30px;box-sizing:border-box;}
  .fm-editor[data-mobile-mode="crop"] .fm-photo-project__stage-slot .fm-stage__surface {
    height:calc(100% - var(--fm-mobile-crop-reclaimed)) !important;
    min-height:1px!important;
  }
}

/* 3.0.71: mobile handles must be below the filmstrip (92), tool tray
   (91), mobile navigation (90) and upload panel (9999). On desktop the
   existing top-layer crop chrome remains unchanged. */
@media (max-width:720px) {
  .fm-crop-handle-layer { z-index: 89; }
}

/* S137: notice remains visible after import finishes, also on mobile. */
.fm-duplicate-notice{position:fixed;z-index:2147483645;left:50%;bottom:max(18px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(540px,calc(100% - 24px));display:flex;gap:12px;align-items:center;justify-content:space-between;box-sizing:border-box;padding:12px 14px;border:1px solid #e8c55d;border-radius:10px;background:#fff9de;color:#654800;font:600 14px/1.45 system-ui,sans-serif;box-shadow:0 6px 24px #0002;overflow-wrap:anywhere;}
.fm-duplicate-notice span{min-width:0;}.fm-duplicate-notice button{flex:none;display:grid;place-items:center;min-width:36px;height:36px;border:0;border-radius:6px;background:#f6e8ac;color:#654800;font:24px/1 system-ui;cursor:pointer;padding:0;}
@media(max-width:767px){.fm-duplicate-notice{bottom:auto;top:max(68px,calc(env(safe-area-inset-top) + 60px));}}
