.compose-workspace { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.compose-main button, .compose-main input, .compose-main select { font: inherit; }
.compose-main button, .compose-main select, .compose-main input[type="number"] { min-height: 44px; }
.compose-main button { cursor: pointer; }
.compose-main button:disabled { cursor: default; opacity: .45; }
.compose-main :is(button, input, select, a):focus-visible { outline: 3px solid #136f59; outline-offset: 3px; }
.compose-main [hidden] { display: none !important; }
#compose-files { width: 100%; max-width: 100%; color: #3e544b; font-size: 13px; }
#compose-files::file-selector-button { min-height: 44px; padding: 10px; border: 1px solid #8baba0; border-radius: 6px; background: white; color: #152b3c; margin-right: 8px; cursor: pointer; }
.compose-secondary { border: 1px solid #a9beb5; border-radius: 7px; background: #fff; color: #214337; padding: 9px 13px; font-size: 13px !important; }
#compose-add-button { margin-top: 12px; }
.compose-list-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; align-items: baseline; margin-top: 25px; }
.compose-list-heading h3 { font-size: 15px; }
.compose-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 9px; max-height: 480px; overflow: auto; overscroll-behavior: contain; }
.compose-item { border: 1px solid #cddbd5; border-radius: 8px; padding: 7px; min-width: 0; background: #fff; }
.compose-select { border: 2px solid transparent; display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 5px; border-radius: 6px; background: #f7faf8; text-align: left; color: #152b3c; }
.compose-select[aria-pressed="true"] { border-color: #297c5b; background: #edf7f0; }
.compose-select img { flex: none; object-fit: contain; width: 64px; height: 64px; border-radius: 4px; background: #eef2ef; }
.compose-source-description { display: grid; gap: 7px; min-width: 0; }
.compose-source-description strong { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.compose-source-description > span { color: #52695e; font-size: 12px; }
.compose-item-actions { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; margin-top: 6px; }
.compose-item-actions button { padding: 6px 9px; border: 1px solid #cddbd5; background: white; color: #254a3b; border-radius: 5px; font-size: 12px !important; touch-action: manipulation; }
.compose-item-actions button:last-child { color: #943d32; }
.compose-source-alignment { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:8px; font-size:12px; }
.compose-source-alignment select { flex:1; min-width:120px; min-height:44px; padding:8px; border:1px solid #a8beb3; border-radius:6px; background:#fff; color:#152b3c; }
.compose-crop-notice { margin-top:12px; padding:12px; border:1px solid #b98a30; border-radius:7px; background:#fff4dc; color:#4d3713; font-size:13px; line-height:1.7; }
.compose-options { margin: 26px 0 0; padding: 17px 0 0; border: 0; border-top: 1px solid var(--line); min-width: 0; }
.compose-options legend { padding-right: 12px; font-size: 15px; font-weight: 700; }
.compose-options label { display: block; margin: 17px 0 9px; font-size: 13px; line-height: 1.6; }
.compose-options input:not([type="checkbox"]), .compose-options select { width: 100%; max-width: 100%; min-width: 0; padding: 11px 10px; border: 1px solid #a8beb3; border-radius: 7px; background: #fff; color: #152b3c; font-size: 14px; }
.compose-options input[type="color"] { width: 84px; min-height: 44px; padding: 4px; }
.compose-options input:disabled { background: #eef2ef; color: #53665e; }
.compose-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.compose-options label.compose-check { display: flex; align-items: center; gap: 9px; min-height: 44px; margin-top: 7px; }
.compose-check input { width: 18px; height: 18px; flex: none; accent-color: #297c5b; }
.compose-preview { position: sticky; top: 20px; }
.compose-result-frame { min-height: 230px; padding: 10px; grid-template-columns:minmax(0,1fr); }
.compose-result-stage { position:relative; min-width:0; max-width:100%; line-height:0; }
.compose-result-frame .compose-result-stage img { position:absolute; inset:0; width:100%; height:100%; max-width:none; max-height:none; object-fit:fill; }
.compose-canvas-boundary { outline:2px solid #b13c30; }
.compose-guides { position:absolute; inset:0; pointer-events:none; }
.compose-guide-cell,.compose-guide-photo { position:absolute; box-sizing:border-box; }
.compose-guide-cell { border:1px dashed #586877; }
.compose-guide-photo { border:2px solid #197553; }
.compose-guide-photo span { position:absolute; left:0; top:0; padding:3px 4px; color:#fff; background:#145b42; font-size:11px; line-height:1; }
.compose-guide-options { display:flex; flex-wrap:wrap; gap:8px 16px; }
.compose-guide-options label { display:flex; align-items:center; gap:8px; min-height:44px; font-size:13px; }
.compose-guide-options input { width:18px; height:18px; }
#compose-error { padding: 12px; background: #fff1ed; border-radius: 6px; }
@media (max-width: 900px) {
  .compose-workspace { grid-template-columns: 1fr; }
  .compose-preview { position: static; }
  .compose-list { max-height: 370px; }
}
@media (max-width: 430px) {
  .compose-main .resize-heading h1 { font-size: 28px; line-height: 1.3; }
  .compose-main .resize-panel { padding: 20px 14px; }
  .compose-options select { font-size: 12px; }
  .compose-item-actions { grid-template-columns: 1fr 1fr 50px; }
  .compose-item-actions button { padding-inline: 4px; }
  .compose-fields { gap: 9px; }
}
