.ws-studio {
  container-type: inline-size;
  --ws-canvas: var(--canvas, #f6f4ef);
  --ws-rule: var(--line, #d9d7cf);
  --ws-edge: clamp(16px, 2.1vw, 34px);
  min-width: 0;
  color: var(--ink);
}
.ws-toolbar, .ws-preview-tools, .ws-tabs, .ws-devices, .ws-share-url, .ws-actions, .ws-release, .ws-share-status {
  display: flex;
  align-items: center;
}
.ws-toolbar {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 8px 0 18px;
}
.ws-toolbar h2 { font-size: clamp(20px, 2vw, 26px); font-weight: 590; letter-spacing: -.055em; }
.ws-head-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.ws-tab.ws-compact-tab { display: none; }
.ws-versions { max-width: 100%; padding: 3px 17px 3px 3px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px; }
.ws-tabs { border-bottom: 1px solid var(--ws-rule); gap: 14px; }
.ws-tab, .ws-mini, .ws-size {
  color: var(--muted);
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}
.ws-tab { display: inline-flex; gap: 7px; align-items: center; padding: 9px 2px 10px; font-size: 13px; position: relative; }
.ws-tab svg { width: 15px; height: 15px; }
.ws-tab[aria-pressed=true] { color: var(--ink); font-weight: 650; }
.ws-tab[aria-pressed=true]::after { content: ''; position: absolute; height: 2px; background: var(--blue); inset: auto 0 -1px; }
.ws-workbench,.ws-mail-layout { border: 1px solid var(--ws-rule); background: var(--paper,#fff); border-radius: 8px; display: grid; align-items: start; }
.ws-workbench { grid-template-columns: minmax(238px, 30%) minmax(0, 1fr); }
.ws-editor,.ws-compose,.ws-sharing,.ws-history { min-width: 0; padding: var(--ws-edge); }
.ws-editor { display: grid; gap: 14px; }
.ws-subhead { font-size: 17px; font-weight: 615; letter-spacing: -.035em; line-height: 1.28; }
.ws-editor > .ws-subhead { margin-bottom: 4px; }
.ws-field { min-width: 0; display: grid; gap: 5px; }
.ws-field label { font-size: 12px; font-weight: 570; color: var(--ink); }
.ws-field input,.ws-field select,.ws-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 39px;
  padding: 9px 11px;
  color: var(--ink);
  background: var(--paper,#fff);
  border: 1px solid var(--ws-rule);
  border-radius: 5px;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
}
.ws-field textarea { display: block; resize: vertical; }
.ws-photo { display: grid; justify-items: start; gap: 6px; }
.ws-photo > label { font-size: 12px; font-weight: 570; }
.ws-photo-controls { display: flex; gap: 8px; align-items: center; max-width: 100%; }
.ws-photo-controls img { display: block; border-radius: 4px; object-fit: cover; }
.ws-file { display: inline-flex; position: relative; max-width: 100%; overflow: hidden; border-radius: 4px; }
.ws-file:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.ws-file input { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; opacity: 0; }
.ws-file span { display: inline-flex; gap: 7px; align-items: center; min-height: 36px; padding: 6px 10px; border: 1px solid var(--ws-rule); border-radius: 4px; font-size: 12px; font-weight: 550; }
.ws-file svg { width: 15px; height: 15px; }
.ws-field input:hover,.ws-field textarea:hover,.ws-field select:hover { border-color: var(--muted); }
.ws-field :disabled { opacity: .75; }
.ws-field small,.ws-field-hint,.ws-preview-tools small,.ws-history small,.ws-history time,.ws-note {
  color: var(--muted); font-size: 12px; line-height: 1.5; font-weight: 400; overflow-wrap: anywhere;
}
.ws-field-hint { margin-top: -10px; }
.ws-build { border-top: 1px solid var(--ws-rule); display: grid; gap: 7px; padding-top: 15px; margin-top: 2px; }
.ws-button { min-height: 39px; background: var(--paper,#fff); color: var(--ink); border: 1px solid var(--ws-rule); border-radius: 5px; padding: 8px 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-size: 13px; font-weight: 570; }
.ws-button:hover:enabled,.ws-size:hover,.ws-mini:hover,.ws-tab:hover { color: var(--blue); }
.ws-button.ws-primary { color: #fff; background: var(--blue,#1f5d4c); border-color: var(--blue,#1f5d4c); }
.ws-button.ws-primary:hover:enabled { background: var(--blue-hover,#164537); color: #fff; }
.ws-studio button:disabled { opacity: .5; cursor: default; }
.ws-button svg,.ws-mini svg { width: 15px; height: 15px; }
.ws-preview { min-width: 0; border-left: 1px solid var(--ws-rule); align-self: stretch; display: flex; flex-direction: column; overflow: hidden; border-radius: 0 8px 8px 0; }
.ws-preview-tools { padding: 13px clamp(12px,1.5vw,23px); gap: 14px; border-bottom: 1px solid var(--ws-rule); min-height: 65px; }
.ws-preview-tools > div:first-child { margin-right: auto; }
.ws-preview-tools small { display: block; margin-top: 1px; }
.ws-preview-tools .ws-subhead { font-size: 15px; }
.ws-devices { border: 1px solid var(--ws-rule); padding: 2px; border-radius: 5px; gap: 1px; }
.ws-size { font-size: 11px; padding: 4px 8px; min-height: 25px; border-radius: 3px; }
.ws-size[aria-pressed=true] { color: var(--ink); font-weight: 600; background: var(--ws-canvas); }
.ws-link,.ws-mini { display: inline-flex; align-items: center; gap: 5px; color: var(--blue); font-size: 12px; font-weight: 550; text-decoration: none; }
.ws-link:hover,.ws-mini:hover { text-decoration: underline; text-underline-offset: 3px; }
.ws-mini { min-height: 34px; padding: 5px 0; }
.ws-preview-stage { min-height: 510px; height: clamp(570px, 76vh, 820px); display: flex; justify-content: center; align-items: stretch; background: var(--ws-canvas); flex: 1 0 auto; }
.ws-preview-stage iframe { display: block; border: 0; width: 100%; min-width: 0; background: #fff; }
.ws-preview-stage[data-width=phone] { padding: 12px; }
.ws-preview-stage[data-width=phone] iframe { max-width: 390px; border: 1px solid var(--ws-rule); border-radius: 8px; }
.ws-preview-stage > .ws-note { padding: 24px; }
.ws-feedback:empty { display: none; }
.ws-feedback { margin-bottom: 12px; }
.ws-error, .ws-button.ws-danger { color: #9a2829; }
.ws-error { font-size: 13px; font-weight: 535; }
.ws-mail-layout { grid-template-columns: minmax(245px, 36%) minmax(0, 1fr); }
.ws-mail-side { min-width: 0; }
.ws-sharing,.ws-history,.ws-compose { display: grid; align-content: start; justify-items: start; gap: 13px; }
.ws-history { border-top: 1px solid var(--ws-rule); }
.ws-followup { padding: var(--ws-edge); border-top: 1px solid var(--ws-rule); }
.ws-followup time { display: block; margin-top: 6px; font-size: 13px; }
.ws-followup summary { display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 13px; font-weight: 570; }
.ws-followup summary svg { width: 16px; }
.ws-followup summary svg:last-child { margin-left: auto; width: 13px; }
.ws-followup[open] summary svg:last-child { transform: rotate(180deg); }
.ws-followup form { display: grid; gap: 10px; margin-top: 13px; }
.ws-compose { border-left: 1px solid var(--ws-rule); align-self: stretch; }
.ws-compose .ws-field,.ws-history-list,.ws-mail-facts,.ws-letter { width: 100%; }
.ws-share-status { gap: 6px; font-size: 13px; }
.ws-share-status svg { width: 15px; color: var(--blue); }
.ws-release,.ws-actions,.ws-share-url { flex-wrap: wrap; gap: 8px 14px; }
.ws-release { align-items: flex-end; }
.ws-share-url + .ws-release { padding-top: 8px; }
.ws-revoke { color: var(--muted); }
.ws-confirm { display: grid; gap: 10px; font-size: 13px; }
.ws-consent { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; cursor: pointer; }
.ws-consent input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--blue); flex: 0 0 auto; }
.ws-mail-facts { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 6px 14px; font-size: 13px; margin: 0; }
.ws-mail-facts dt { color: var(--muted); }
.ws-mail-facts dd { margin: 0; overflow-wrap: anywhere; }
.ws-letter { white-space: pre-wrap; overflow-wrap: anywhere; border-block: 1px solid var(--ws-rule); padding: 18px 0; line-height: 1.6; }
.ws-history-list { margin: 0; padding: 0; list-style: none; min-width: 0; }
.ws-history-list li+li { border-top: 1px solid var(--ws-rule); }
.ws-history-list summary { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; padding: 8px 0; cursor: pointer; }
.ws-history-list summary::-webkit-details-marker { display: none; }
.ws-history-list summary > div { flex: 1 1 140px; min-width: 0; }
.ws-history-list summary strong,.ws-history-list summary small { display: block; overflow-wrap: anywhere; }
.ws-history-list summary strong,.ws-history-body strong { font-size: 13px; font-weight: 590; }
.ws-history-list summary svg { width: 12px; }
.ws-history-list details[open] summary svg { transform: rotate(180deg); }
.ws-history-body { font-size: 13px; display: grid; gap: 7px; padding: 6px 0 14px; }
.ws-history-body p { white-space: pre-wrap; overflow-wrap: anywhere; }
@media(max-width: 1050px) {
  .ws-workbench { grid-template-columns: minmax(215px,34%) minmax(0,1fr); }
  .ws-editor,.ws-sharing,.ws-compose,.ws-history { padding: 16px; }
  .ws-preview-tools { gap: 8px; }
}
@media(max-width: 700px) {
  .ws-workbench,.ws-mail-layout { grid-template-columns: minmax(0,1fr); }
  .ws-preview,.ws-compose { border-left: 0; border-top: 1px solid var(--ws-rule); }
  .ws-preview { border-radius: 0 0 8px 8px; }
  .ws-preview-stage { height: min(650px, 78vh); min-height: 430px; }
  .ws-mail-side { display: contents; }
  .ws-history { grid-row: 3; }
  .ws-toolbar { padding-bottom: 12px; }
  .ws-field input,.ws-field textarea,.ws-field select { font-size: 16px; min-height: 44px; }
  .ws-tab,.ws-size,.ws-mini,.ws-link,.ws-button { min-height: 42px; }
  .ws-size { min-height: 34px; }
  .ws-consent { align-items: center; min-height: 44px; }
}
@media(max-width: 390px) {
  .ws-toolbar { align-items: flex-start; }
  .ws-tabs { gap: 12px; }
  .ws-preview-tools { flex-wrap: wrap; }
}
@container (max-width: 665px) {
  .ws-toolbar { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 7px; padding-top: 0; }
  .ws-toolbar h2 { font-size: 20px; }
  .ws-head-tools { display: contents; }
  .ws-head-tools .ws-button { grid-column: 2; grid-row: 1; }
  .ws-tab.ws-desktop-tab { display: none; }
  .ws-tab.ws-compact-tab { display: inline-flex; }
  .ws-tabs { gap: 12px; grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .ws-tab { min-height: 40px; font-size: 12px; }
  .ws-tab svg { display: none; }
  .ws-workbench,.ws-mail-layout { grid-template-columns: minmax(0,1fr); }
  .ws-studio[data-compact=edit] .ws-preview,.ws-studio[data-compact=preview] .ws-editor { display: none; }
  .ws-preview { border: 0; border-radius: 8px; }
  .ws-preview-stage { height: min(660px,75vh); min-height: 380px; }
  .ws-mail-side { display: contents; }
  .ws-compose { grid-column: 1; grid-row: 2; }
  .ws-followup,.ws-history { grid-row: auto; grid-column: 1; }
  .ws-compose { border-left: 0; border-top: 1px solid var(--ws-rule); }
}
@container (max-width: 445px) {
  .ws-devices { display: none; }
}
