/* Photo editor mobile presentation. Desktop and native processing stay independent. */
.mx-native-label { display: none; }
body.pr-mobile {
  --mx-bg: #101114; --mx-surface: #202228; --mx-raised: #292c33; --mx-line: #3c4049;
  --mx-text: #f4f5f7; --mx-muted: #b8bdc8; --mx-yellow: #ffdc68;
  --mx-head: 116px; --mx-dock: 306px; --mx-vh: 100dvh; --mx-vtop: 0px;
  color: var(--mx-text); background: var(--mx-bg); overflow: hidden;
  -webkit-text-size-adjust: 100%; font-size: 16px;
}
body.pr-mobile [hidden] { display: none !important; }
body.pr-mobile .topbar, body.pr-mobile .toolrail, body.pr-mobile .panel,
body.pr-mobile #photoStrip, body.pr-mobile #selectionPrompt, body.pr-mobile .hint,
body.pr-mobile .panel-foot, body.pr-mobile .zoom-ctl { display: none !important; }
body.pr-mobile .workspace { height: var(--mx-vh); }
body.pr-mobile .stage {
  inset: auto; top: calc(var(--mx-vtop) + var(--mx-head)); left: 0; right: 0;
  height: max(80px, calc(var(--mx-vh) - var(--mx-head) - var(--mx-dock)));
  padding: 10px 12px; background: var(--mx-bg); z-index: 1;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
body.pr-mobile #baseCanvas { max-width: 100%; max-height: max(60px, calc(var(--mx-vh) - var(--mx-head) - var(--mx-dock) - 20px)); }
body.pr-mobile .canvas-wrap { max-width: 100%; border-radius: 9px; box-shadow: none; }
body.pr-mobile .dropzone { padding: 24px 18px; border-color: #4c505b; background: #181a1f; }
body.pr-mobile .dropzone h2 { font-size: 20px; line-height: 1.4; }
body.pr-mobile .dropzone p { font-size: 15px; color: var(--mx-muted); }
body.pr-mobile .drop-note { display: none; }
body.pr-mobile .orig-badge { top: 8px; left: 50%; transform: translateX(-50%); font-size: 14px; }
body.pr-mobile .sel-bar { position: fixed; bottom: calc(var(--mx-dock) + 12px); top: auto; max-width: calc(100% - 24px); flex-wrap: wrap; z-index: 80; }
body.pr-mobile .sel-bar button { min-height: 44px; font-size: 14px; }
body.pr-mobile .upload-status { top: calc(var(--mx-vtop) + var(--mx-head) + 4px); max-width: calc(100% - 24px); font-size: 14px; z-index: 330; }
body.pr-mobile .sess-banner { top: calc(var(--mx-vtop) + var(--mx-head)); z-index: 340; }
body.pr-mobile .toast { top: calc(var(--mx-vtop) + var(--mx-head) + 10px); bottom: auto; z-index: 430; max-width: calc(100% - 32px); font-size: 14px; line-height: 1.5; }
body.pr-mobile .working { position: fixed; inset: 0; z-index: 410; }
body.pr-mobile .mx-header, body.pr-mobile .mx-dock, body.pr-mobile .mx-overlay { box-sizing: border-box; }
.mx-header *, .mx-dock *, .mx-overlay * { box-sizing: border-box; }
.mx-header button, .mx-dock button, .mx-overlay button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 44px; min-height: 44px; padding: 9px 12px; border: 1px solid var(--mx-line);
  border-radius: 12px; background: #1b1d23; color: var(--mx-text); font: inherit;
  font-size: 15px; font-weight: 600; line-height: 1.4; cursor: pointer; touch-action: manipulation;
}
.mx-header button:focus-visible, .mx-dock button:focus-visible, .mx-overlay :focus-visible { outline: 2px solid var(--mx-yellow); outline-offset: 3px; }
.mx-header button:active, .mx-dock button:active, .mx-overlay button:active { background: #30333b; }
.mx-header button:disabled, .mx-dock button:disabled, .mx-overlay button:disabled { opacity: .48; cursor: default; }
.mx-header svg, .mx-dock svg, .mx-overlay [data-mx-icon] svg { width: 22px; height: 22px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[data-mx-icon] { display: inline-flex; flex: none; align-items: center; justify-content: center; }
.mx-muted, .mx-description { color: var(--mx-muted); }
.mx-description { margin: 0 0 22px; font-size: 15px; line-height: 1.65; }
.mx-end { margin-left: auto; }
.mx-header .mx-primary, .mx-dock .mx-primary, .mx-overlay .mx-primary { background: var(--mx-yellow); border-color: var(--mx-yellow); color: #211b08; font-weight: 750; }
.mx-header .mx-primary:active, .mx-dock .mx-primary:active, .mx-overlay .mx-primary:active { background: #f3c84f; }
.mx-header .mx-icon-button, .mx-dock .mx-icon-button, .mx-overlay .mx-icon-button { width: 44px; flex: 0 0 44px; padding: 0; }
.mx-header { position: fixed; top: var(--mx-vtop); left: 0; right: 0; z-index: 80; padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: var(--mx-bg); border-bottom: 1px solid #23262d; }
.mx-topline, .mx-subline { display: flex; align-items: center; gap: 12px; }
.mx-topline { justify-content: space-between; margin-bottom: 8px; }
.mx-brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mx-brand > span { color: var(--mx-yellow); }
.mx-brand h1 { margin: 0; font-size: 20px; font-weight: 750; letter-spacing: -.6px; }
.mx-header #mxSave { min-width: 84px; white-space: nowrap; }
.mx-subline { justify-content: space-between; gap: 8px; }
.mx-header .mx-photo-button { min-width: 0; gap: 6px; padding-left: 10px; padding-right: 8px; }
.mx-photo-button > span { white-space: nowrap; }
.mx-photo-button [data-mx-icon="chevron"] svg { width: 15px; }
.mx-photo-button .mx-muted { font-size: 12px; font-variant-numeric: tabular-nums; }
.mx-subactions { display: flex; gap: 8px; flex: none; }
body.pr-mobile .mx-header .m-mode-badge { height: 44px; min-width: 72px; padding: 7px 9px; font-size: 14px; background: #1b1d23; color: var(--mx-text); }
.mx-header .m-mode-badge [data-mx-icon] svg { width: 14px; }
.mx-dock { position: fixed; top: auto; bottom: max(0px, calc(100% - var(--mx-vh) - var(--mx-vtop))); left: 0; right: 0; z-index: 75; background: var(--mx-bg); padding: 0 12px env(safe-area-inset-bottom); }
.mx-actions { display: grid; grid-template-columns: 44px 44px minmax(62px, 1fr) minmax(112px, 1.35fr); gap: 8px; padding: 4px 0 8px; }
.mx-actions button { font-size: 14px; padding: 8px 6px; gap: 6px; }
.mx-actions #mxCompare[aria-pressed="true"] { color: var(--mx-yellow); border-color: var(--mx-yellow); }
.mx-context { background: var(--mx-surface); border: 1px solid #30333b; border-radius: 16px; padding: 12px; margin-bottom: 8px; }
.mx-section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mx-section-heading h2 { font-size: 18px; margin: 0; letter-spacing: -.4px; }
.mx-section-heading .mx-model-button { min-height: 44px; font-size: 13px; padding: 5px 8px; min-width: 80px; }
.mx-model-button svg { width: 15px; }
.mx-preset-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 8px; }
.mx-dock .mx-preset { min-height: 70px; justify-content: flex-start; text-align: left; padding: 10px; gap: 10px; }
.mx-preset > [data-mx-icon] { color: var(--mx-yellow); }
.mx-preset > [data-mx-icon] svg { width: 28px; height: 28px; }
.mx-preset strong { display: block; font-size: 15px; white-space: nowrap; }
.mx-preset small { display: block; color: var(--mx-yellow); font-size: 12px; margin-top: 3px; }
.mx-dock .mx-wide { width: 100%; text-align: left; justify-content: flex-start; padding: 9px 11px; }
.mx-nav { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 2px; padding: 4px 0 5px; border-top: 1px solid #292c34; }
.mx-nav button { flex-direction: column; gap: 4px; min-height: 58px; padding: 5px 0; min-width: 0; border: 0; border-radius: 10px; font-size: 12px; background: transparent; color: #c3c7d1; }
.mx-nav button.is-on { color: var(--mx-yellow); background: #ffdc680c; }
.mx-categories { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.mx-categories button { flex-direction: column; min-width: 0; min-height: 74px; padding: 8px 4px; gap: 5px; font-size: 13px; }
.mx-categories button small { color: var(--mx-muted); font-size: 11px; }
.mx-edit-heading { display: flex; align-items: center; gap: 8px; }
.mx-edit-heading > div { flex: 1; min-width: 0; }
.mx-edit-heading strong { display: block; font-size: 16px; }
.mx-edit-heading .mx-muted { display: block; font-size: 12px; margin-top: 3px; line-height: 1.45; }
.mx-edit-heading #mxEditSettings { font-size: 14px; min-width: 52px; padding: 8px; }
.mx-brush-row { display: flex; gap: 10px; align-items: center; padding: 7px 0; min-height: 44px; }
.mx-brush-row label, .mx-brush-row output { flex: none; font-size: 13px; color: var(--mx-muted); }
.mx-brush-row output { width: 42px; text-align: right; }
.mx-brush-row input { min-width: 0; flex: 1; height: 36px; accent-color: var(--mx-yellow); }
.mx-edit-tools { display: flex; gap: 7px; margin-top: 6px; }
.mx-edit-tools button { flex: 1; min-width: 0; padding: 8px 6px; font-size: 14px; }
.mx-edit-tools button.is-on { color: var(--mx-yellow); border-color: #af944a; }
.mx-overlay { position: fixed; z-index: 180; left: 0; right: 0; top: var(--mx-vtop); height: var(--mx-vh); display: flex; align-items: flex-end; justify-content: center; }
.mx-backdrop { position: absolute; inset: 0; background: #05060980; }
.mx-sheet { position: relative; width: 100%; max-width: 640px; max-height: calc(var(--mx-vh) - 36px); display: flex; flex-direction: column; background: #202228; border: 1px solid #424650; border-bottom: 0; border-radius: 22px 22px 0 0; padding: 10px 20px max(20px,env(safe-area-inset-bottom)); overflow: hidden; box-shadow: 0 -10px 45px #0005; animation: mx-sheet-in .18s ease-out; }
.mx-handle { width: 44px; height: 4px; border-radius: 3px; background: #747b89; margin: 0 auto 10px; flex: none; }
.mx-sheet-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; margin-bottom: 14px; }
.mx-sheet-heading h2 { font-size: 23px; letter-spacing: -.7px; margin: 0; line-height: 1.35; }
.mx-sheet-heading .mx-icon-button { background: transparent; border-color: transparent; }
.mx-sheet-content { overflow-y: auto; min-height: 0; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; scrollbar-width: thin; }
.mx-sheet-footer { flex: none; padding-top: 16px; }
.mx-sheet-footer > button { width: 100%; min-height: 52px; font-size: 16px; }
.mx-fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.mx-fieldset legend { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.mx-segments { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--mx-line); border-radius: 12px; overflow: hidden; }
.mx-segments button { border: 0; border-radius: 10px; min-height: 48px; background: transparent; }
.mx-segments button.is-on { color: var(--mx-yellow); box-shadow: inset 0 0 0 2px var(--mx-yellow); background: #17191e; }
.mx-model-setting { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.mx-cost-line { display: flex; align-items: center; gap: 16px; padding: 16px 0 0; border-top: 1px solid var(--mx-line); color: var(--mx-muted); }
.mx-cost-line strong { font-size: 24px; color: var(--mx-yellow); }
.mx-wallet { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 0 22px; border-bottom: 1px solid var(--mx-line); margin-bottom: 12px; }
.mx-wallet strong { display: block; margin-top: 4px; font-size: 28px; font-variant-numeric: tabular-nums; }
.mx-wallet .mx-muted { font-size: 14px; }
.mx-menu-list { display: flex; flex-direction: column; gap: 4px; }
.mx-menu-list button { width: 100%; min-height: 52px; justify-content: flex-start; background: transparent; border: 0; font-weight: 500; text-align: left; }
.mx-help-list { margin: 0; padding-left: 20px; color: var(--mx-muted); font-size: 16px; line-height: 1.7; }
.mx-help-list li { margin-bottom: 12px; }
.mx-sheet .mx-history-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.mx-history-tabs button.is-on { color: var(--mx-yellow); border-color: var(--mx-yellow); }
body.pr-mobile .mx-sheet .panel-body { display: block; max-height: none; padding: 0; overflow: visible; animation: none; }
body.pr-mobile .mx-sheet .card { padding: 16px 12px; margin: 0 0 12px; border: 1px solid #3a3e48; border-radius: 14px; background: #191b21; }
body.pr-mobile .mx-sheet .card-head { margin-bottom: 10px; gap: 8px; flex-wrap: wrap; }
body.pr-mobile .mx-sheet .card-head strong { font-size: 16px; }
body.pr-mobile .mx-sheet .card-sub { display: block; color: var(--mx-muted); font-size: 14px; line-height: 1.65; }
body.pr-mobile .mx-sheet .btn, body.pr-mobile .mx-sheet .chip, body.pr-mobile .mx-sheet .lq-mode,
body.pr-mobile .mx-sheet .rs-chip, body.pr-mobile .mx-sheet .fl-btns button, body.pr-mobile .mx-sheet .pa-shapes button { min-height: 44px; font-size: 14px; border-radius: 10px; }
body.pr-mobile .mx-sheet .btn.primary { background: var(--mx-yellow); color: #211b08; }
body.pr-mobile .mx-sheet input:not([type="checkbox"]):not([type="range"]):not([type="color"]),
body.pr-mobile .mx-sheet textarea, body.pr-mobile .mx-sheet select { font-size: 16px; line-height: 1.5; color: var(--mx-text); }
body.pr-mobile .mx-sheet textarea { width: 100%; min-height: 90px; }
body.pr-mobile .mx-sheet input[type="range"] { min-height: 36px; accent-color: var(--mx-yellow); }
body.pr-mobile .mx-sheet input[type="checkbox"] { width: 20px; height: 20px; }
body.pr-mobile .mx-sheet .slider-row { margin: 12px 0; gap: 10px; }
body.pr-mobile .mx-sheet .slider-label, body.pr-mobile .mx-sheet .check-row { font-size: 14px; line-height: 1.6; }
body.pr-mobile .mx-sheet .model-chip { display: flex; width: 100%; max-width: none; padding: 3px; margin: 0; background: #15171c; }
body.pr-mobile .mx-sheet .model-chip .model-opt { flex: 1; min-width: 0; min-height: 44px; padding: 8px 5px; gap: 4px; font-size: 14px; }
body.pr-mobile .mx-sheet .model-opt-cost { font-size: 12px; }
body.pr-mobile .mx-sheet .model-chip svg { width: 15px; height: 15px; }
body.pr-mobile .mx-sheet .model-chip .is-on { color: var(--mx-yellow); border-color: #897539; background: #332e1b; }
body.pr-mobile .mx-sheet .memo { padding: 14px 12px; margin-bottom: 12px; }
body.pr-mobile .mx-sheet .memo-foot { gap: 8px; flex-wrap: wrap; }
body.pr-mobile .mx-sheet .memo-apply { width: 100%; min-height: 48px; }
body.pr-mobile .mx-sheet .memo-foot .model-chip { flex-basis: 100%; }
body.pr-mobile .mx-sheet .layer-panel, body.pr-mobile .mx-sheet .hist-panel { display: block; position: static; padding: 0; border: 0; background: transparent; }
body.pr-mobile .mx-sheet .hist-list, body.pr-mobile .mx-sheet .layer-list { max-height: none; overflow: visible; }
body.pr-mobile .mx-sheet .hist-head { font-size: 16px; }
body.pr-mobile .mx-sheet .hist-item, body.pr-mobile .mx-sheet .ly-row { min-height: 52px; font-size: 14px; }
body.pr-mobile .mx-sheet .ly-act button { min-width: 40px; min-height: 44px; padding: 5px; }
body.pr-mobile .mx-sheet .ly-act button svg { width: 16px; height: 16px; }
body.pr-mobile .mx-sheet .ly-guide-bd { font-size: 14px; line-height: 1.6; }
body.pr-mobile .mx-sheet .tool-help { min-width: 40px; min-height: 40px; }
body.pr-mobile .mx-sheet #filterChips { display: flex; gap: 8px; }
body.pr-mobile .mx-sheet .rs-grid { gap: 8px; }
body.pr-mobile .mx-sheet .rs-chip { justify-content: flex-start; padding: 12px; }
body.pr-mobile .mx-sheet .rs-t { font-size: 15px; }
body.pr-mobile .mx-sheet .rs-d { font-size: 13px; color: var(--mx-muted); }
body.pr-mobile .tk-modal { top: var(--mx-vtop); bottom: auto; height: var(--mx-vh); padding: 0; }
body.pr-mobile .tk-sheet { max-height: calc(var(--mx-vh) - 24px); width: 100%; max-width: 640px; padding: 22px 18px max(22px,env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; overflow-y: auto; }
body.pr-mobile .tk-head { align-items: center; }
body.pr-mobile .tk-head strong { font-size: 20px; }
body.pr-mobile .tk-close { width: 44px; height: 44px; flex: 0 0 44px; }
body.pr-mobile .tk-sheet .btn { min-height: 48px; font-size: 15px; }
body.pr-mobile .tk-sheet .card-sub, body.pr-mobile .tkc-text, body.pr-mobile .tkc-sub { color: var(--mx-muted); font-size: 15px; line-height: 1.6; }
body.pr-mobile .pg-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
body.pr-mobile .pg-name { font-size: 13px; }
body.pr-mobile .pg-foot { position: sticky; bottom: -22px; background: var(--mx-surface); padding-top: 12px; }
body.pr-mobile .pr-mode-name { font-size: 16px; }
body.pr-mobile .pr-mode-card { min-height: 170px; }
@keyframes mx-sheet-in { from { transform: translateY(20px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (max-width: 360px) {
  .mx-header { padding-left: 12px; padding-right: 12px; }
  .mx-header .mx-photo-button { font-size: 14px; }
  .mx-photo-button > .mx-muted { font-size: 11px; }
  .mx-preset > [data-mx-icon] svg { width: 22px; height: 22px; }
  .mx-dock .mx-preset { gap: 7px; padding: 8px; }
  .mx-preset strong { font-size: 14px; }
  .mx-sheet { padding-left: 16px; padding-right: 16px; }
}
@media (max-height: 620px) {
  .mx-context { padding: 8px; margin-bottom: 4px; }
  .mx-section-heading { display: none; }
  .mx-dock .mx-preset { min-height: 48px; padding: 6px 9px; }
  .mx-preset small { display: inline; margin-left: 4px; }
  .mx-preset strong { display: inline; }
  .mx-preset > [data-mx-icon] { display: none; }
  .mx-categories button { min-height: 52px; }
  .mx-categories button small { display: none; }
  .mx-nav button { min-height: 48px; gap: 2px; }
  .mx-nav button svg { width: 18px; height: 18px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .mx-header { display: flex; align-items: center; gap: 16px; padding-top: 6px; padding-bottom: 6px; }
  .mx-topline { margin: 0; flex: 1; }
  .mx-brand h1 { font-size: 17px; }
  .mx-subline { flex: 1; }
  .mx-dock { display: grid; grid-template-columns: minmax(0,1fr) minmax(200px,1fr); gap: 8px; }
  .mx-actions { margin: 0; padding: 4px 0; }
  .mx-context { grid-column: 2; grid-row: 1 / 3; margin: 0 0 6px; max-height: 132px; overflow-y: auto; }
  .mx-nav { grid-column: 1; grid-row: 2; }
  .mx-categories { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .mx-categories button { min-height: 48px; font-size: 12px; }
  .mx-categories button svg { width: 18px; height: 18px; }
}
@media (prefers-reduced-motion: reduce) { body.pr-mobile .mx-sheet { animation: none; } }
/* Compact density requested after the first screen review. */
body.pr-mobile { font-size: 14px; }
.mx-header { padding: calc(5px + env(safe-area-inset-top)) 12px 5px; }
.mx-topline { margin-bottom: 3px; }
.mx-brand { gap: 6px; }
.mx-brand h1 { font-size: 16px; letter-spacing: -.4px; }
.mx-header button { min-height: 34px; font-size: 13px; padding: 6px 10px; border-radius: 9px; }
.mx-header #mxSave { min-width: 70px; min-height: 36px; }
.mx-header svg { width: 18px; height: 18px; }
.mx-header .mx-photo-button { font-size: 13px; gap: 5px; }
.mx-header .mx-photo-button > .mx-muted { font-size: 10px; }
.mx-header .mx-icon-button { width: 34px; min-width: 34px; flex-basis: 34px; }
body.pr-mobile .mx-header .m-mode-badge { height: 34px; min-height: 34px; min-width: 62px; font-size: 12px; padding: 5px 8px; }
.mx-dock { padding-left: 10px; padding-right: 10px; }
.mx-actions { grid-template-columns: 36px 36px minmax(62px,1fr) minmax(100px,1.25fr); gap: 7px; padding: 3px 0 6px; }
.mx-actions button, .mx-actions .mx-icon-button { min-height: 36px; min-width: 36px; font-size: 12px; padding: 5px; border-radius: 9px; }
.mx-actions .mx-icon-button { width: 36px; }
.mx-actions svg { width: 18px; height: 18px; }
.mx-context { padding: 8px; margin-bottom: 5px; border-radius: 12px; }
.mx-section-heading { margin-bottom: 6px; }
.mx-section-heading h2 { font-size: 14px; }
.mx-section-heading .mx-model-button { min-height: 28px; min-width: 66px; padding: 3px 7px; font-size: 11px; border-radius: 8px; }
.mx-preset-grid { gap: 7px; margin-bottom: 6px; }
.mx-dock .mx-preset { min-height: 52px; padding: 7px 9px; gap: 9px; border-radius: 10px; }
.mx-preset > [data-mx-icon] svg { width: 23px; height: 23px; }
.mx-preset strong { font-size: 13px; }
.mx-preset small { font-size: 10px; margin-top: 2px; }
.mx-dock .mx-wide { min-height: 36px; padding: 6px 9px; font-size: 12px; border-radius: 9px; }
.mx-wide svg { width: 18px; height: 18px; }
.mx-nav { padding: 3px 0; }
.mx-nav button { min-height: 46px; gap: 3px; padding: 4px 0; font-size: 10px; border-radius: 8px; }
.mx-nav button svg { width: 19px; height: 19px; }
.mx-categories { gap: 6px; }
.mx-categories button { min-height: 60px; padding: 6px 3px; gap: 3px; font-size: 12px; border-radius: 9px; }
.mx-categories button svg { width: 20px; height: 20px; }
.mx-categories button small { font-size: 10px; }
.mx-edit-heading { gap: 6px; }
.mx-edit-heading strong { font-size: 13px; }
.mx-edit-heading .mx-muted { font-size: 11px; margin-top: 2px; }
.mx-edit-heading .mx-icon-button { width: 32px; min-width: 32px; min-height: 34px; flex-basis: 32px; }
.mx-edit-heading #mxEditSettings { min-width: 44px; min-height: 34px; font-size: 12px; padding: 5px 7px; }
.mx-brush-row { min-height: 36px; padding: 3px 0; gap: 8px; }
.mx-brush-row label, .mx-brush-row output { font-size: 11px; }
.mx-brush-row input { height: 28px; }
.mx-edit-tools { margin-top: 4px; gap: 6px; }
.mx-edit-tools button { min-height: 36px; padding: 6px; font-size: 12px; border-radius: 9px; }
.mx-sheet { padding: 8px 14px max(14px,env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; }
.mx-handle { width: 34px; height: 3px; margin-bottom: 6px; }
.mx-sheet-heading { margin-bottom: 10px; }
.mx-sheet-heading h2 { font-size: 18px; letter-spacing: -.4px; }
.mx-sheet-heading .mx-icon-button { width: 36px; min-width: 36px; min-height: 36px; flex-basis: 36px; }
.mx-description { margin-bottom: 16px; font-size: 13px; line-height: 1.55; }
.mx-fieldset { margin-bottom: 16px; }
.mx-fieldset legend { font-size: 13px; margin-bottom: 8px; }
.mx-segments button { min-height: 38px; font-size: 13px; padding: 6px; }
.mx-model-setting { gap: 8px; margin-bottom: 14px; font-size: 13px; }
.mx-cost-line { padding-top: 12px; font-size: 13px; }
.mx-cost-line strong { font-size: 20px; }
.mx-sheet-footer { padding-top: 12px; }
.mx-sheet-footer > button { min-height: 44px; font-size: 14px; padding: 8px 12px; border-radius: 10px; }
body.pr-mobile .mx-sheet .card { padding: 12px 10px; margin-bottom: 9px; border-radius: 12px; }
body.pr-mobile .mx-sheet .card-head { margin-bottom: 7px; gap: 6px; }
body.pr-mobile .mx-sheet .card-head strong { font-size: 14px; }
body.pr-mobile .mx-sheet .card-sub { font-size: 12px; line-height: 1.55; }
body.pr-mobile .mx-sheet .btn, body.pr-mobile .mx-sheet .chip, body.pr-mobile .mx-sheet .lq-mode,
body.pr-mobile .mx-sheet .rs-chip, body.pr-mobile .mx-sheet .fl-btns button, body.pr-mobile .mx-sheet .pa-shapes button { min-height: 36px; font-size: 12px; border-radius: 9px; }
body.pr-mobile .mx-sheet .lq-mode { gap: 4px; padding: 8px; }
body.pr-mobile .mx-sheet .lq-mode svg { width: 18px; height: 18px; }
body.pr-mobile .mx-sheet .slider-row { margin: 8px 0; gap: 8px; }
body.pr-mobile .mx-sheet .slider-label, body.pr-mobile .mx-sheet .check-row { font-size: 12px; line-height: 1.5; }
body.pr-mobile .mx-sheet input[type="range"] { min-height: 28px; }
body.pr-mobile .mx-sheet input[type="checkbox"] { width: 16px; height: 16px; }
body.pr-mobile .mx-sheet .model-chip .model-opt { min-height: 36px; padding: 6px 4px; font-size: 12px; }
body.pr-mobile .mx-sheet .model-opt-cost { font-size: 11px; }
body.pr-mobile .mx-sheet .memo { padding: 10px; margin-bottom: 9px; }
body.pr-mobile .mx-sheet .memo textarea { min-height: 76px; }
body.pr-mobile .mx-sheet .memo .memo-apply { flex-basis: 100%; min-height: 40px; background: var(--mx-yellow); color: #211b08; font-size: 13px; }
body.pr-mobile .mx-sheet .memo-strength { flex: 1; }
body.pr-mobile .mx-sheet .memo-del { min-height: 32px; padding: 5px 8px; font-size: 11px; }
body.pr-mobile .mx-sheet .ly-guide-bd { font-size: 12px; line-height: 1.55; }
body.pr-mobile .mx-sheet .tool-help { min-width: 30px; min-height: 30px; padding: 4px; }
body.pr-mobile .mx-sheet .rs-chip { padding: 9px; }
body.pr-mobile .mx-sheet .rs-t { font-size: 13px; }
body.pr-mobile .mx-sheet .rs-d { font-size: 11px; }
body.pr-mobile .tk-sheet { padding: 16px 14px max(16px,env(safe-area-inset-bottom)); }
body.pr-mobile .tk-head strong { font-size: 17px; }
body.pr-mobile .tk-close { width: 36px; height: 36px; flex-basis: 36px; }
body.pr-mobile .tk-sheet .btn { min-height: 40px; font-size: 13px; }
body.pr-mobile .tk-sheet .card-sub, body.pr-mobile .tkc-text, body.pr-mobile .tkc-sub { font-size: 13px; line-height: 1.55; }
body.pr-mobile .pr-mode-name { font-size: 14px; }
body.pr-mobile .pr-mode-card { min-height: 140px; }
.mx-wallet { padding-bottom: 14px; margin-bottom: 8px; }
.mx-wallet strong { font-size: 23px; }
.mx-wallet .mx-muted { font-size: 12px; }
.mx-wallet button { min-height: 36px; font-size: 12px; }
.mx-menu-list button { min-height: 42px; font-size: 13px; padding: 7px; }
.mx-menu-list svg { width: 18px; height: 18px; }
.mx-help-list { padding-left: 18px; font-size: 13px; line-height: 1.6; }
.mx-help-list li { margin-bottom: 9px; }
body.pr-mobile .toast-item { font-size: 12px; padding: 10px 14px; border-radius: 10px; }
@media (orientation: landscape) and (max-height: 520px) {
  .mx-context { max-height: 112px; }
  .mx-categories button { min-height: 43px; }
  .mx-nav button { min-height: 42px; }
}

/* Existing controls and descriptions remain reachable without covering the photo. */
.mx-original-details { margin-top: 12px; border-top: 1px solid var(--mx-line); padding-top: 10px; }
body.pr-mobile #kbdModal { display: none !important; }
.mx-original-details summary { padding: 7px 0; font-size: 12px; cursor: pointer; color: var(--mx-muted); }
.mx-original-details > .card-head, .mx-original-details > .card-sub,
.mx-original-details > .body-person-notice { margin-top: 10px; }
.mx-native-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
body.pr-mobile .mx-sheet .mx-native-tools .tool { width: 100%; min-height: 46px; height: auto; gap: 8px; padding: 9px; font-size: 12px; }
.mx-sheet .mx-native-label { display: inline; }
body.pr-mobile .mx-sheet .zoom-ctl { display: flex !important; position: static; transform: none; width: max-content; max-width: 100%; margin: 8px 0; }
body.pr-mobile .mx-sheet .zoom-ctl button { min-width: 44px; min-height: 40px; }
body.pr-mobile .mx-sheet .swatches, body.pr-mobile .mx-sheet .sizes { display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
body.pr-mobile .mx-sheet .swatches > *, body.pr-mobile .mx-sheet .sizes > * { min-width: 36px; min-height: 36px; }
body.pr-mobile .mx-sheet #penColor { display: block; width: 58px; height: 36px; margin: 6px 0 16px; }
body.pr-mobile .mx-sheet .filemeta { display: flex; max-width: 100%; min-width: 0; gap: 8px; margin: 12px 0; }
body.pr-mobile .mx-sheet .filemeta .filename { white-space: normal; overflow-wrap: anywhere; }
body.pr-mobile .mx-sheet .panel-foot { display: flex !important; position: static; border: 0; gap: 10px; padding: 12px 0; }
