.compose-workspace {
  --studio-pine: var(--primary, #164e42);
  --studio-mint: var(--primary-soft);
  --studio-rule: var(--border, #dce5df);
  --studio-subtle: #f4f7f5;
  --studio-dark: #163c69;
  --studio-stage-text: #e5f5eb;
}

.compose-heading, .compose-section-head, .compose-preview-top,
.compose-selection-actions, .compose-proof-head {
  display: flex;
  align-items: center;
}

.compose-heading {
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 22px;
}
.compose-heading h1 {
  margin-top: 4px;
  font-size: clamp(1.9rem, 3vw, 2.55rem);
  line-height: 1.13;
  letter-spacing: -.055em;
}
.compose-back {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  min-height: 28px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.compose-back:hover {color: var(--studio-pine);text-decoration: underline}
.compose-back .icon {width: 15px;height: 15px}
.compose-heading .editor-actions {align-self: end}
.compose-workspace .editor-actions .button {min-height: 44px}
.compose-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 34%);
  align-items: start;
  gap: clamp(16px, 2vw, 28px);
}
.compose-form, .compose-fields {display: grid;min-width: 0}
.compose-form {gap: 18px}
.compose-fields {gap: 18px;padding: 20px 24px 24px}
.compose-fields .field, .compose-preview .field {
  min-width: 0;
  margin: 0;
  gap: 7px;
}
.compose-workspace .field > label:first-child {font-size: .85rem;font-weight: 650}
.compose-workspace .field > :is(input, select, textarea) {
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: .9rem;
  border: 1px solid var(--studio-rule);
  transition: border-color .15s, box-shadow .15s;
}
.compose-workspace .field > select {padding-right: 28px}
.compose-workspace :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.compose-workspace .field small {font-size: .76rem}
.compose-fields .fields-row {
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}
.compose-panel, .compose-preview {
  min-width: 0;
  border: 1px solid var(--studio-rule);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 2px 5px #173d3405;
}
.compose-section-head, .compose-preview-top {
  gap: 10px;
  border-bottom: 1px solid var(--studio-rule);
  padding: 17px 24px;
}
.compose-section-head h2, .compose-preview-top h2 {
  margin: 0;
  font-size: 1.16rem;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -.035em;
}
.compose-section-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 10px;
  color: var(--studio-pine);
  background: var(--studio-mint);
}
.compose-section-icon .icon {height: 18px;width: 18px}
.compose-count {
  margin-left: auto;
  text-align: right;
  color: var(--muted);
  font-size: .78rem;
}
.compose-upload {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 90px;
  padding: 16px;
  border: 1px dashed #a1b7ad;
  border-radius: 10px;
  background: var(--studio-subtle);
  color: var(--studio-pine);
  line-height: 1.4;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.compose-upload:hover, .compose-upload:focus-within {
  background: var(--studio-mint);
  border-color: var(--studio-pine);
}
.compose-upload:focus-within {outline: 2px solid var(--focus);outline-offset: 2px}
.compose-upload input {position: absolute;inset: 0;width: 100%;height: 100%;opacity: 0;cursor: pointer}
.compose-upload input:disabled {cursor: progress}
.compose-upload-icon {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  place-items: center;
  border: 1px solid var(--studio-rule);
  border-radius: 11px;
  background: var(--surface);
}
.compose-upload-icon .icon {width: 19px;height: 19px}
.compose-upload strong, .compose-upload small {display: block}
.compose-upload strong {font-size: .88rem;font-weight: 650}
.compose-upload small {margin-top: 3px;color: var(--muted)}
.media-source-title {font-weight:650;font-size:.88rem}
.media-source-choices {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.media-source-choices .compose-upload {text-align:left;justify-content:flex-start;min-height:74px;padding:10px;gap:8px;font:inherit}
.folder-source {border-style:solid;background:var(--surface)}
.media-size-note,#media-upload-progress {color:var(--muted);font-size:.78rem;line-height:1.45}
.media-size-note strong {color:var(--studio-pine)}
#media-upload-progress:empty {display:none}
@media(max-width:550px){.media-source-choices{grid-template-columns:1fr}.media-source-choices .compose-upload{min-height:56px}}
.compose-files {display: grid;gap: 6px;margin: 0;padding: 0;list-style: none}
.compose-file {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) 44px;
  align-items: center;
  gap: 10px;
  padding: 3px 4px 3px 6px;
  border: 1px solid var(--studio-rule);
  border-radius: 8px;
}
.compose-file-thumb {display: block;overflow: hidden;width: 38px;height: 34px;border-radius: 5px;background: var(--studio-subtle)}
.compose-file-thumb > :is(img, video) {width: 100%;height: 100%;object-fit: cover}
.compose-file .icon-button {width: 44px;height: 44px}
.compose-file-name {overflow-wrap: anywhere;font-size: .82rem}
#caption-count {color: var(--muted);text-align: right;font-variant-numeric: tabular-nums}
.compose-selection-actions {flex-wrap: wrap;gap: 8px}
.compose-selection-actions .button, .compose-fields [data-action="suggest"] {min-height: 40px}
.compose-profile-group {min-width: 0;margin: 0;padding: 0;border: 0}
.compose-profile-group legend, .compose-overrides h3 {
  margin-bottom: 9px;
  padding: 0;
  font-size: .88rem;
  font-weight: 650;
}
.compose-profiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%,190px),1fr));
  gap: 7px;
}
.compose-profile {
  display: grid;
  grid-template-columns: 30px minmax(0,1fr) 17px;
  align-items: center;
  gap: 9px;
  min-height: 55px;
  padding: 8px 10px;
  border: 1px solid var(--studio-rule);
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.compose-profile-with-options {min-width:0;}
.compose-profile-with-options:has(.collab-field[open]) {grid-column:1/-1;}
.collab-field {min-width:0;margin:.3rem 0;color:var(--primary);font-size:.9rem;}
.collab-field summary {min-height:44px;align-content:center;padding:0 .5rem;font-weight:600;overflow-wrap:anywhere;}
.collab-body {display:flex;align-items:center;flex-wrap:wrap;gap:.55rem;padding:.8rem;border:1px solid var(--border);border-radius:8px;background:var(--surface);}
.collab-body>label,.collab-body fieldset,.collab-body small,.collab-conflict {flex-basis:100%;min-width:0;}
.collab-body input[type=text] {width:100%;min-height:44px;}
.ab-editor .collab-field .collab-body fieldset label,.collab-body fieldset label {display:inline-flex;padding:.4rem;align-items:center;min-height:44px;gap:.35rem;}
.collab-body input[type=checkbox] {width:1rem;height:1rem;}
.collab-body button {min-height:44px;overflow-wrap:anywhere;white-space:normal;}
.collab-body [role=alert] {color:var(--danger);}
.collab-summary {display:block;padding:.4rem .8rem;overflow-wrap:anywhere;color:var(--primary);}
.compose-profile:hover {border-color: #92ac9d}
.compose-profile:has(input:checked) {border-color: var(--studio-pine);background: var(--studio-mint)}
.compose-profile:has(input:focus-visible) {outline: 2px solid var(--focus);outline-offset: 2px}
.compose-profile .network {width: 29px;height: 29px}
.compose-profile input {width: 16px;height: 16px;margin: 0;accent-color: var(--studio-pine)}
.compose-profile strong, .compose-profile small {display: block;overflow-wrap: anywhere}
.compose-profile strong {font-size: .82rem;line-height: 1.3}
.compose-profile small {margin-top: 2px;font-size: .75rem;line-height: 1.35}
.compose-overrides {padding-top: 16px;border-top: 1px solid var(--studio-rule)}
.compose-overrides h3 {margin: 0}
.compose-overrides > p, .compose-trial p, .compose-trial small, .compose-override-fields > small {
  font-size: .8rem;
  line-height: 1.5;
  color: var(--muted);
}
.compose-overrides > p {margin: 3px 0 10px}
.compose-override {border-bottom: 1px solid var(--studio-rule)}
.compose-override summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  font-size: .83rem;
  list-style: none;
}
.compose-override summary::-webkit-details-marker {display: none}
.compose-override summary > span:not(.network) {min-width: 0;overflow-wrap: anywhere}
.compose-override summary small {display: inline;font-size: .75rem}
.compose-override summary > .icon:last-child {margin-left: auto;width: 16px;height: 16px}
.compose-override[open] summary > .icon:last-child {transform: rotate(90deg)}
.compose-override-fields {display: grid;gap: 12px;padding: 5px 0 16px}
.compose-trial {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: var(--studio-mint);
  border-radius: 10px;
}
.compose-trial .check-inline {align-items: flex-start;min-height: 32px;font-size: .86rem;line-height: 1.5}
.compose-trial .check-inline input {flex-shrink: 0;width: 16px;height: 16px;margin: 3px 0 0;accent-color: var(--studio-pine)}
.compose-end-actions {padding: 2px 0 8px}
.compose-preview {
  position: sticky;
  top: 18px;
  overflow: hidden;
  background: var(--studio-subtle);
}
.compose-preview-top {
  padding: 17px 18px;
  background: var(--surface);
}
.compose-preview-top .compose-section-icon {
  color: var(--studio-stage-text);
  background: var(--studio-pine);
}
.compose-preview-body {padding: 18px}
.compose-preview .field {margin-bottom: 15px}
.compose-preview .field > select {font-size: .84rem}
.compose-preview select:disabled {opacity: 1;color: var(--muted);background: var(--studio-subtle)}
.compose-proof {
  overflow: hidden;
  border: 1px solid var(--studio-rule);
  border-radius: 12px;
  background: var(--surface);
}
.compose-proof-head {gap: 9px;padding: 11px 13px;line-height: 1.35}
.compose-proof-head > div {min-width: 0}
.compose-proof-head strong, .compose-proof-head small {display: block;overflow-wrap: anywhere}
.compose-proof-head strong {font-size: .82rem;font-weight: 650}
.compose-proof-head small {font-size: .72rem}
.compose-proof-avatar {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 33px;
  place-items: center;
  border-radius: 50%;
  background: var(--studio-subtle);
  color: var(--muted);
}
.compose-proof-avatar > .network {width: 33px;height: 33px}
.compose-proof-avatar > .icon {width: 17px;height: 17px}
.compose-format {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 5px;
  color: var(--studio-pine);
  background: var(--studio-mint);
  font-weight: 650;
  font-size: .72rem;
}
.compose-stage {
  position: relative;
  display: grid;
  width: 100%;
  place-items: center;
  isolation: isolate;
  color: var(--studio-stage-text);
  background: var(--studio-dark);
}
.compose-stage.square {aspect-ratio: 1}
.compose-stage.portrait {aspect-ratio: 4 / 4.35}
.compose-stage > :is(img,video) {display: block;position: absolute;inset: 0;width: 100%;height: 100%;object-fit: contain}
.compose-stage.gallery-instagram {aspect-ratio:4 / 5}
.compose-stage.gallery-instagram > img,.compose-stage.gallery-youtube > img {object-fit:cover}
.compose-stage.gallery-youtube[data-gallery-draggable] {cursor:grab;touch-action:none;user-select:none}
.compose-stage.gallery-youtube[data-gallery-draggable]:active {cursor:grabbing}
.gallery-pages,.gallery-edit {border-bottom:1px solid var(--studio-rule)}
.gallery-pages {display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:4px;align-items:center;padding:6px 10px;text-align:center}
.gallery-pages span {min-width:0}
.gallery-pages strong,.gallery-pages small {display:block}
.gallery-pages strong {font-size:.78rem}
.gallery-pages small {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:.73rem}
.gallery-pages button {width:44px;min-height:44px}
.gallery-edit {display:grid;gap:6px;padding:10px 13px 12px;background:var(--studio-subtle)}
.gallery-adjust:not([hidden]) {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 8px}
.gallery-adjust label {grid-column:1/-1;color:var(--ink);font-weight:650;font-size:.8rem}
.gallery-adjust input[type="range"] {min-width:0;width:100%;min-height:44px;padding:0;accent-color:var(--primary);background:transparent;border:0}
.gallery-edit small,.gallery-edit p {color:var(--muted);font-size:.76rem;line-height:1.4;margin:0}
.gallery-edit p:empty {display:none}
.gallery-edit .button {justify-self:start;min-height:44px}
.compose-stage.is-empty {
  background:
    radial-gradient(ellipse at 80% 0%, #50886c50, transparent 60%),
    radial-gradient(circle at 1px 1px, #baf2ce33 1px, transparent 1.1px) 0 0 / 13px 13px,
    var(--studio-dark);
}
.compose-crop {
  position: absolute;
  inset: 9.5% 12%;
  display: grid;
  place-items: center;
  padding: 9px;
  text-align: center;
  background:
    linear-gradient(#b4d5bf,#b4d5bf) left top / 17px 1px,
    linear-gradient(#b4d5bf,#b4d5bf) left top / 1px 17px,
    linear-gradient(#b4d5bf,#b4d5bf) right top / 17px 1px,
    linear-gradient(#b4d5bf,#b4d5bf) right top / 1px 17px,
    linear-gradient(#b4d5bf,#b4d5bf) left bottom / 17px 1px,
    linear-gradient(#b4d5bf,#b4d5bf) left bottom / 1px 17px,
    linear-gradient(#b4d5bf,#b4d5bf) right bottom / 17px 1px,
    linear-gradient(#b4d5bf,#b4d5bf) right bottom / 1px 17px;
  background-repeat: no-repeat;
}
.compose-crop-content {display: grid;justify-items: center;gap: 4px}
.compose-crop-content > span {
  display: grid;
  width: 49px;
  height: 49px;
  place-items: center;
  margin-bottom: 8px;
  border: 1px solid #a4c5b35e;
  border-radius: 14px;
  background: #2c5849;
}
.compose-crop-content .icon {height: 24px;width: 24px}
.compose-crop-content strong {font-size: 1rem;letter-spacing: -.015em}
.compose-crop-content small {font-size: .78rem;color: #d1e8d9}
.compose-proof-caption {margin: 0;padding: 16px;font-size: .85rem;line-height: 1.6;white-space: pre-wrap;overflow-wrap: anywhere;max-height: 13rem;overflow: auto}
.compose-sequence {display: flex;flex-wrap: wrap;gap: 4px;padding: 8px 10px 0}
.compose-sequence button {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--studio-rule);
  border-radius: 7px;
  background: var(--surface);
  font-size: .8rem;
}
.compose-sequence button[aria-pressed="true"] {background: var(--studio-pine);border-color: var(--studio-pine);color: white}
.compose-preview-note {display: flex;align-items: flex-start;gap: 7px;margin: 13px 0 0;color: var(--muted);font-size: .75rem;line-height: 1.5}
.compose-preview-note .icon {margin-top: 1px;width: 15px;height: 15px}
.compose-view-switch {display: none}
@media (min-width: 1600px) {.compose-layout {grid-template-columns: minmax(0, 1fr) minmax(350px, 32%)}}
@media (max-width: 1100px) {
  .compose-layout {grid-template-columns: minmax(0,1fr) minmax(245px,32%);gap: 15px}
  .compose-fields {padding: 16px 17px 19px}
  .compose-section-head, .compose-preview-top {padding: 15px 17px}
  .compose-preview-body {padding: 13px}
}
@media (max-width: 800px) {
  .compose-layout {display: block}
  .compose-preview {position: static;max-width: 460px;margin-inline: auto}
  .compose-heading {align-items: flex-start}
  .compose-heading .editor-actions {align-self: center}
  .compose-view-switch {display: inline-flex;gap: 2px;margin: 0 0 15px;padding: 3px;background: #e8eeea;border-radius: 10px}
  .compose-view-switch button {display: inline-flex;align-items: center;justify-content: center;gap: 7px;min-height: 42px;padding: 6px 17px;border-radius: 7px;background: transparent;color: var(--muted);font-size: .86rem;font-weight: 650}
  .compose-view-switch button[aria-pressed="true"] {background: var(--surface);color: var(--studio-pine);box-shadow: 0 1px 4px #122e201a}
  .compose-view-switch .icon {width: 16px;height: 16px}
  .compose-workspace[data-view="form"] .compose-preview, .compose-workspace[data-view="preview"] .compose-form {display: none}
  .compose-workspace .field > :is(input, select, textarea) {font-size: 1rem}
  .compose-sequence button, .compose-selection-actions .button, .compose-fields [data-action="suggest"] {min-height:44px;min-width:44px}
}
@media (max-width: 580px) {
  .compose-heading {display: grid;gap: 13px;margin-bottom: 14px}
  .compose-heading .editor-actions {justify-content: flex-start}
  .compose-end-actions {justify-content: flex-start}
  .compose-proof-caption {max-height: none}
  .compose-back {min-height: 36px}
}
@media (max-width: 399px) {
  .compose-fields .fields-row {grid-template-columns: minmax(0,1fr);gap: 16px}
  .compose-fields {padding: 16px}
  .compose-section-head, .compose-preview-top {padding: 14px 16px}
  .compose-heading .editor-actions .button, .compose-end-actions .button {padding-inline: 11px;font-size: .8rem}
  .compose-count {max-width: 7.5em}
}
.compose-override-fields .copy-source { color:var(--text-secondary,#40554c); margin:0; font-size:.86rem; }
.short-preview-title { display:block; padding:1rem 1rem 0; overflow-wrap:anywhere; }
.compose-override [aria-invalid="true"] { outline:2px solid #a13028; outline-offset:1px; }
