.studio-app #editor-error.editor-alert {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  max-width: none;
  margin: 0 0 24px;
  padding: 15px 16px;
  border: 1px solid #e6b6b2;
  border-left: 4px solid #b94d43;
  border-radius: 9px;
  background: #fcecea;
  color: #8d2923;
  font-size: .8125rem;
  line-height: 1.7;
  scroll-margin-top: 20px;
}
.studio-app .editor-alert > .icon { width: 21px; height: 21px; margin-top: 2px; stroke-width: 1.7; }
.studio-app .editor-alert > div { min-width: 0; overflow-wrap: anywhere; }
.studio-app .editor-alert strong { display: block; font-size: .8125rem; font-weight: 650; margin-bottom: 2px; }
.studio-app .editor-alert p { margin: 0; }
.studio-app .editor-alert:focus-visible { outline: 2px solid #b94d43; outline-offset: 3px; }
.studio-app .editor-panel [data-field][aria-invalid="true"] { border-color: #b94d43; background-color: #fff8f7; }

.studio-app .typography-panel { margin-top: 24px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.studio-app .typography-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 70px; padding: 15px 17px; list-style: none; cursor: pointer; border-radius: 10px; }
.studio-app .typography-panel > summary::-webkit-details-marker { display: none; }
.studio-app .typography-panel > summary:hover { background: var(--surface-soft); }
.studio-app .typography-summary-copy { display: block; min-width: 0; }
.studio-app .typography-summary-copy strong { display: block; font-size: .8125rem; font-weight: 550; line-height: 1.6; }
.studio-app .typography-summary-copy small { display: block; color: var(--muted); font-size: .6875rem; line-height: 1.7; margin-top: 3px; overflow-wrap: anywhere; }
.studio-app .typography-toggle-icon { width: 17px; height: 17px; transform: rotate(90deg); transition: transform .22s var(--ease); }
.studio-app .typography-panel[open] > summary { border-radius: 10px 10px 0 0; }
.studio-app .typography-panel[open] .typography-toggle-icon { transform: rotate(-90deg); }
.studio-app .typography-fields { padding: 18px; border-top: 1px solid var(--border); }
.studio-app .typography-panel:not([open]) > .typography-fields { display: none; }
.studio-app .typography-fields > .font-choice-status { margin-bottom: 0; }
.studio-app .typography-fields .message-font-control { margin-top: 18px; padding-top: 0; border: 0; }
.studio-app .typography-fields .message-font-control .font-setting { margin-top: 16px; }
.studio-app .message-editor .typography-panel { background: var(--surface); }
.inline-message-panel > summary { display: flex; align-items: center; gap: 12px; justify-content: space-between; min-height: 48px; list-style: none; cursor: pointer; }
.inline-message-panel > summary::-webkit-details-marker { display: none; }
.inline-message-panel > summary > span { min-width: 0; }
.inline-message-panel summary strong { display: block; font-size: .8125rem; font-weight: 550; line-height: 1.6; }
.inline-message-panel summary small { display: block; font-size: .6875rem; line-height: 1.7; color: var(--muted); margin-top: 4px; }
.inline-message-panel summary .icon { flex-shrink: 0; width: 16px; height: 16px; transform: rotate(90deg); }
.inline-message-panel[open] summary .icon { transform: rotate(-90deg); }
.studio-app .inline-message-panel[open] > .field { padding-top: 18px; margin-top: 16px; border-top: 1px solid var(--border); }

@media (max-width: 480px) {
  .studio-app #editor-error.editor-alert { padding: 13px 12px; gap: 9px; }
  .studio-app .typography-panel > summary { padding: 14px; }
  .studio-app .typography-fields { padding: 16px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .studio-app .typography-toggle-icon { transition: none; }
}
.studio-app .deadline-strip { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; padding: 20px 24px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); margin-bottom: 30px; }
.studio-app .deadline-strip > .timing-item { display: grid; grid-template-columns: 44px minmax(0,1fr); align-items: center; gap: 14px; margin: 0; min-width: 0; padding: 0 24px 0 0; }
.studio-app .deadline-strip > .timing-item + .timing-item { padding: 0 0 0 24px; border-left: 1px solid var(--border); }
.timing-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #a3824730; border-radius: 10px; background: #ffffff80; color: var(--gold-dark); }
.studio-app .timing-icon .icon { width: 22px; height: 22px; margin: 0; }
.timing-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.timing-label { font-size: .6875rem; color: var(--muted); line-height: 1.5; }
.timing-value { display: block; font-size: .9375rem; font-weight: 550; color: var(--ink); line-height: 1.5; margin: 0; }
.studio-app .deadline-strip .timing-value { margin: 0; font-weight: 550; }
.timing-hint { font-size: .6875rem; color: var(--muted); line-height: 1.6; }
.studio-app .media-types { gap: 12px; }
.studio-app .media-type { position: relative; flex-direction: column; justify-content: center; align-items: center; gap: 15px; min-height: 177px; padding: 22px 16px 18px; border-radius: 12px; text-align: center; background: var(--surface); transition: border-color .25s,background .25s,box-shadow .25s; }
.media-mode-icon { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 16px; background: var(--surface-soft); color: var(--gold-dark); transition: background .25s; }
.studio-app .media-type .media-mode-icon .icon { width: 42px; height: 42px; stroke-width: 1.3; }
.media-mode-copy { display: flex; flex-direction: column; gap: 6px; }
.media-mode-copy strong { font-size: .875rem; font-weight: 600; color: var(--ink); line-height: 1.5; }
.media-mode-copy small { font-size: .6875rem; color: var(--muted); line-height: 1.6; }
.media-mode-check { position: absolute; display: grid; place-items: center; width: 22px; height: 22px; top: 12px; right: 12px; border: 1px solid var(--input-border); border-radius: 50%; color: transparent; background: var(--surface); }
.studio-app .media-mode-check .icon { width: 13px; height: 13px; }
.studio-app .media-type:hover:not(:has(input:disabled)) { border-color: var(--gold-dark); box-shadow: 0 4px 12px #2c221e08; }
.studio-app .media-type:has(input:checked) { background: var(--gold-soft); border-color: var(--gold-dark); box-shadow: inset 0 0 0 1px var(--gold-dark); }
.media-type:has(input:checked) .media-mode-icon { background: #ffffffa8; animation: media-choice-select .4s cubic-bezier(.16,1,.3,1) both; }
.media-type:has(input:checked) .media-mode-check { background: var(--gold-dark); border-color: var(--gold-dark); color: white; }
.studio-app .media-type:has(input:focus-visible) { outline: 2px solid var(--gold-dark); outline-offset: 4px; }
.studio-app .media-type:has(input:disabled) { cursor: not-allowed; opacity: .65; }
.media-dimensions { margin-top: 4px; }
.media-sizing-note { padding: 12px 0 0; }
.media-sizing-note:empty { display: none; }
@keyframes media-choice-select { from { transform: translateY(3px) scale(.92); } to { transform: translateY(0) scale(1); } }
@media (max-width:600px) { .studio-app .deadline-strip { grid-template-columns: 1fr; padding: 16px; } .studio-app .deadline-strip > .timing-item { padding: 0 0 16px; gap: 12px; } .studio-app .deadline-strip > .timing-item + .timing-item { padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--border); } .timing-value { font-size: .875rem; } }
@media (max-width:480px) { .studio-app .media-types { gap: 10px; } .studio-app .media-type { min-height: 177px; padding: 18px 10px 14px; gap: 12px; } .media-mode-icon { width: 56px; height: 56px; border-radius: 13px; } .studio-app .media-type .media-mode-icon .icon { width: 36px; height: 36px; } .media-mode-copy strong { font-size: .8125rem; } }
@media (max-width:360px) { .studio-app .media-types { grid-template-columns: 1fr; } .studio-app .media-type { flex-direction: row; justify-content: flex-start; text-align: left; min-height: 108px; padding: 16px 28px 16px 12px; } .media-mode-icon { flex-shrink: 0; } .media-mode-check { width: 18px; height: 18px; top: 8px; right: 8px; } }
@media (prefers-reduced-motion: reduce) { .studio-app .media-type, .media-mode-icon { transition: none; } .media-type:has(input:checked) .media-mode-icon { animation: none; } }

html:has(#buyer-app) { scroll-padding-bottom: 112px; }
.studio-app #buyer-app .editor-panel {
  --editor-gutter: 27px;
  padding: var(--editor-gutter) var(--editor-gutter) 0;
}
.studio-app #buyer-app .wizard-footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  flex-wrap: nowrap;
  gap: 10px;
  margin: 28px calc(-1 * var(--editor-gutter)) 0;
  padding: 14px var(--editor-gutter) calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  border-radius: 0 0 17px 17px;
  background: var(--surface);
  box-shadow: 0 -8px 20px rgba(44, 34, 30, .035);
}
.studio-app #buyer-app .wizard-footer .button {
  min-height: 48px;
  min-width: 0;
  padding: 11px 16px;
  line-height: 1.5;
}
.studio-app #buyer-app .wizard-footer #step-back { flex: none; padding-left: 0; }
.studio-app #buyer-app .wizard-footer :is(#step-next, #finalize-button) { margin-left: auto; }
.studio-app #buyer-app .wizard-footer #finalize-button { flex: 0 1 auto; }
.studio-app #buyer-app .editor-panel :is(input, select, textarea, summary, .template-option) {
  scroll-margin-block: 24px 16px;
}
@media (min-width: 1500px) {
  .studio-app #buyer-app .editor-panel { --editor-gutter: 31px; }
}
@media (max-width: 850px) {
  .studio-app #buyer-app .editor-panel { --editor-gutter: 22px; }
}
@media (max-width: 600px) {
  .studio-app #buyer-app .editor-panel { --editor-gutter: 18px; padding-top: 22px; }
  .studio-app #buyer-app .wizard-footer { padding-top: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); border-radius: 0 0 14px 14px; }
  .studio-app #buyer-app .wizard-footer .button { font-size: .75rem; padding-inline: 12px; }
  .studio-app #buyer-app .wizard-footer :is(#step-next, #finalize-button) { flex: 1; }
}
