.studio-page { width: min(1040px, calc(100% - 36px)); min-height: calc(100vh - 73px); padding-block: clamp(22px, 6vw, 56px); }
.studio-exit { padding: 0; border: 0; background: none; font-weight: inherit; color: inherit; }
.studio-entry { max-width: 600px; margin-inline: auto; }
.studio-entry h1, .studio-heading h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -.055em; line-height: 1.08; }
.studio-entry .button { margin-top: 20px; }
.studio-account { margin-bottom: 8px; color: var(--green); font-weight: 700; }
.studio-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 300px); align-items: start; gap: 18px; }
.studio-fields { display: grid; gap: 18px; min-width: 0; }
.studio-fields h2 { margin-bottom: 18px; }
.studio-fields label, .studio-fields legend { display: block; font-weight: 700; }
.studio-fields .supplier-section > label { margin-top: 18px; }
.studio-fields input:not([type="checkbox"]), .studio-fields textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #b6c1b9;
  border-radius: 9px;
  background: #fbfcfa;
  color: var(--ink);
  font: inherit;
}
.studio-fields textarea { line-height: 1.5; resize: vertical; }
.studio-fields small { display: block; margin-top: 5px; color: var(--muted); font-size: .875rem; }
.studio-category-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.studio-category-field legend { padding: 0; }
.studio-categories { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.studio-categories label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: .9rem;
  cursor: pointer;
}
.studio-categories input { width: 16px; height: 16px; margin: 0; accent-color: var(--green); }
.studio-categories label:has(input:checked) { background: var(--pale-green); color: var(--green); }
.studio-publish { position: sticky; top: 16px; }
.studio-publish .studio-status { display: inline-block; padding: 4px 10px; border-radius: 7px; background: var(--pale-green); color: var(--green); font-size: .9rem; font-weight: 700; }
.studio-publish .studio-status-note { color: var(--muted); }
.studio-publish-actions { display: grid; gap: 8px; margin-top: 17px; }
.studio-publish-actions :disabled { cursor: default; opacity: .58; }
.studio-publish #studio-message { color: var(--green); }
.studio-publish #studio-error, #demo-error { color: #a02d23; }
.studio-publish #studio-message:empty, .studio-publish #studio-error:empty, #demo-error:empty { display: none; }

@media (max-width: 720px) {
  .studio-grid { grid-template-columns: 1fr; }
  .studio-publish { position: static; }
}
@media (max-width: 420px) {
  .header-inner { flex-wrap: wrap; padding-block: 12px; }
}

.studio-section-nav { display: flex; flex-wrap: wrap; gap: 9px 16px; margin-bottom: 20px; }
.studio-section-nav a { color: var(--green); font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }
.studio-fields h2 { scroll-margin-top: 16px; }
.studio-section-note { color: var(--muted); }
.studio-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.studio-image, .studio-entry-fields {
  min-width: 0;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8f9f5;
}
.studio-image { overflow-wrap: anywhere; }
.studio-image-preview { border-radius: 8px; margin-bottom: 8px; }
.studio-logo-preview { aspect-ratio: 11 / 4; }
.studio-image label + label, .studio-entry-fields label + label { margin-top: 12px; }
.studio-fields .studio-image input[type="file"] { padding: 0; border: 0; background: transparent; }
.studio-image-status { font-size: .9rem; line-height: 1.4; margin-top: 8px; color: var(--muted); }
.studio-image-status:empty { display: none; }
.studio-entries { display: grid; gap: 14px; }
.studio-entry-fields legend { padding-inline: 5px; }
.studio-entry-fields [data-image] { margin-top: 12px; }
.studio-add { margin-top: 14px; }
.studio-add:disabled { opacity: .58; cursor: default; }
.studio-remove { display: inline-block; padding: 5px 0; border: 0; background: transparent; color: #902c23; text-decoration: underline; text-underline-offset: 3px; font-weight: 650; margin-top: 9px; }

@media (max-width: 540px) {
  .studio-images { grid-template-columns: 1fr; }
}

.studio-section-order {
  display: grid;
  gap: 9px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}
.studio-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-weight: 700;
}
.studio-section-controls, .studio-section-picker > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.studio-section-controls .button { min-height: 36px; padding: 5px 10px; font-size: .875rem; }
.studio-section-controls .button:disabled { cursor: default; opacity: .5; }
.studio-section-picker {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.studio-section-picker select {
  max-width: 100%;
  margin-top: 6px;
  padding: 8px 12px;
  border: 1px solid #b6c1b9;
  border-radius: 9px;
  background: #fbfcfa;
  color: var(--ink);
  font: inherit;
}

.image-framing-controls {
  min-width: 0;
  margin: 14px 0 0;
  padding: 10px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.image-framing-controls legend { padding-right: 8px; }
.image-framing-controls select {
  display: block;
  max-width: 100%;
  margin-top: 5px;
  padding: 7px;
  border: 1px solid #b6c1b9;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
}
.image-crop-controls { display: grid; gap: 10px; margin-top: 10px; }
.image-crop-controls label { font-size: .9rem; }
.image-crop-controls [data-zoom-value] { color: var(--muted); font-variant-numeric: tabular-nums; }
.studio-fields .image-framing-controls input[type="range"] {
  height: 26px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--green);
}
.image-framing-controls .button {
  min-height: 36px;
  padding: 5px 10px;
  justify-self: start;
  font-size: .875rem;
}
.image-framing-controls button[data-reset-framing] { margin-top: 8px; }

#sign-in {
  gap: .65rem;
}

#sign-in button {
  justify-self: start;
}

#owner-error:empty {
  display: none;
}

#owner-error {
  color: #8a3029;
}

#post-fields label[for="post-body"],
#post-image,
#owner-post-form .profile-actions,
.studio-post-list {
  margin-top: 1rem;
}

.studio-post-list {
  display: grid;
  gap: .65rem;
  padding: 0;
  list-style: none;
}

.studio-post-list button {
  justify-content: flex-start;
  text-align: left;
  width: 100%;
  overflow-wrap: anywhere;
}

.studio-account-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 14px;
}

.studio-entry .text-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--green);
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
}

.studio-legacy-code {
  margin-top: 20px;
}

#account-message:empty {
  display: none;
}

.studio-workspace-nav {
  margin-bottom: 18px;
}

.studio-workspace-nav [aria-pressed="true"] {
  font-weight: 700;
  background: var(--pale-green);
  border-color: var(--green);
}

.studio-delete-post {
  color: #9f2828;
}

#studio-profile-links label {
  display: block;
  margin-top: 14px;
}
