/* Shared case layout and administrator design workspace. */
.case-editor-formatting { padding: 14px 20px; border-bottom: 1px solid #dce6f0; background: #f8fbfe; min-width: 0; }
.case-format-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 10px 14px; min-width: 0; }
.case-format-field { display: flex; flex-direction: column; gap: 5px; margin: 0; min-width: 0; color: #607b94; font-size: 10px; font-weight: 600; }
.case-format-field select, .case-format-field input { box-sizing: border-box; min-width: 0; height: 34px; border: 1px solid #d5e1ed; border-radius: 5px; background: #fff; color: #345571; padding: 5px 8px; font: inherit; font-size: 12px; }
.case-format-font select { width: 138px; }
.case-format-size input { width: 62px; }
.case-format-spacing select { width: 68px; }
.case-format-field input[type="color"] { width: 42px; padding: 3px; cursor: pointer; }
.case-format-group { display: flex; align-items: end; gap: 3px; min-width: 0; }
.case-format-colors { gap: 6px; }
.case-format-button { display: inline-flex; justify-content: center; align-items: center; height: 34px; min-width: 32px; padding: 5px; border: 1px solid #d5e1ed; border-radius: 5px; background: #fff; color: #426680; cursor: pointer; font-size: 13px; line-height: 1; }
.case-format-button svg { width: 18px; height: 18px; }
.case-format-button[aria-pressed="true"] { border-color: #8abde6; background: #dfedfb; color: #075d9c; box-shadow: inset 0 0 0 1px #8abde6; }
.case-format-button:hover:not(:disabled) { background: #edf6ff; }
.case-format-button:focus-visible, .case-format-field :focus-visible { outline: 2px solid #0876d3; outline-offset: 2px; }
.case-format-button:disabled, .case-format-field :disabled { opacity: .5; cursor: default; }
.case-format-underline { text-decoration: underline; }
.case-format-strike { text-decoration: line-through; }
.case-format-clear { min-height: 34px; }
.case-format-hint { display: -webkit-box; min-height: 33px; max-height: 33px; margin: 10px 0 0; overflow: hidden; color: #73889c; font-size: 11px; line-height: 16.5px; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.case-format-hint strong { display: inline; font-weight: 600; }
.case-formatted-list { margin: 0; padding-inline-start: 1.5em; white-space: normal; }
.case-formatted-list li { white-space: pre-wrap; }
.case-design-field[data-design-text-color] .form-label,
.case-design-field[data-design-text-color] .case-design-field-value,
.case-design-field[data-design-text-color] .case-design-field-value strong,
.case-design-text[data-design-text-color] h2,
.case-design-text[data-design-text-color] h3,
.case-editor-field-sample[data-design-text-color] > span { color: inherit; }
.case-design-field[data-design-font-family] .form-label,
.case-design-field[data-design-font-family] .case-design-field-value,
.case-design-text[data-design-font-family] h2,
.case-design-text[data-design-font-family] h3,
.case-editor-field-sample[data-design-font-family] > span { font-family: inherit; }
.case-design-field[data-design-bold] .form-label,
.case-design-field[data-design-bold] .case-design-field-value,
.case-design-field[data-design-bold] .case-design-field-value strong,
.case-design-text[data-design-bold] h2,
.case-design-text[data-design-bold] h3,
.case-editor-field-sample[data-design-bold] > span,
.case-editor-field-sample[data-design-bold] > strong { font-weight: inherit; }
.case-design-field[data-design-font-size] .form-label,
.case-design-field[data-design-font-size] .case-design-field-value,
.case-editor-field-sample[data-design-font-size] > span { font-size: inherit; }
.case-editor-section-field { appearance: none; width: 100%; text-align: left; font: inherit; pointer-events: auto; touch-action: manipulation; cursor: pointer; }
.case-editor-section-field[aria-pressed="true"] { outline: 2px solid #0876d3; outline-offset: 1px; border-color: #0876d3; }
.case-editor-section-field:focus-visible { outline: 3px solid #0876d3; outline-offset: 2px; }
.case-editor-section-field[data-design-text-color] > span { color: inherit; }
.case-editor-section-field[data-design-bold] > span { font-weight: inherit; }
.case-editor-section-field[data-design-font-size] > span { font-size: inherit; }
.case-editor-section-field-properties { display: flex; flex-direction: column; gap: 12px; padding: 12px; border: 1px solid #d8e6f3; border-radius: 7px; background: #f5faff; }
[data-design-section-field][data-design-text-color] .case-section-field-value strong { color: inherit; }
[data-design-section-field][data-design-bold] .case-section-field-label,
[data-design-section-field][data-design-bold] .case-section-field-value,
[data-design-section-field][data-design-bold] .case-section-field-value strong { font-weight: inherit; }
[data-design-section-field][data-design-font-family] .case-section-field-value strong { font-family: inherit; }
[data-design-section-field][data-design-font-size] .case-section-field-value strong { font-size: inherit; }
[data-design-section-field="flags"][data-design-font-size] .serial-flag-option { font-size: inherit; }
[data-design-section-field="flags"][data-design-font-family] .serial-flag-option { font-family: inherit; }
[data-design-section-field="flags"][data-design-bold] .serial-flag-option { font-weight: inherit; }
.serial-diagnostic-value { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .case-editor-formatting { padding: 12px; }
  .case-format-controls { gap: 10px; }
  .case-format-font select { width: 125px; }
}
.tier-comments-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tier-comments-tabs .button { min-width: 64px; }
.tier-comments-section .form-textarea { width: 100%; margin-top: 6px; }
.tier-comment-attachments { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.tier-comment-attachments .form-label, .tier-comment-attachments .field-help, .tier-comment-files { flex-basis: 100%; margin: 0; }
.tier-comment-attachments input[type="file"] { max-width: 100%; font: inherit; font-size: 12px; }
.tier-comment-files { list-style: none; padding: 0; font-size: 12px; overflow-wrap: anywhere; }
.tier-comment-files li { margin: 6px 0; }
.tier-comment-submit { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tier-comment-submit .field-help { flex: 1; }
.tier-comment-history { margin-top: 20px; }
.tier-comment { padding: 18px 0; border-top: 1px solid var(--line, #e1e8f0); }
.tier-comment-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 12px; }
.tier-comment-heading time { color: var(--muted, #65768b); font-size: 11px; }
.tier-comment-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.65; }
.tier-comment-downloads { display: flex; flex-direction: column; gap: 8px; list-style: none; padding: 0; }
.tier-comment-downloads li { display: flex; gap: 12px; align-items: baseline; }
.tier-comment-downloads a { display: inline-flex; gap: 7px; align-items: center; overflow-wrap: anywhere; }
.tier-comment-downloads .icon { flex-shrink: 0; width: 15px; height: 15px; }
.tier-comments-section [hidden] { display: none !important; }
.case-design-page-context {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid #dce6f0;
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--shadow, 0 2px 7px rgba(24, 54, 83, .035));
}
.case-design-page-context label { color: #607b94; font-size: 12px; font-weight: 600; }
.case-design-page-context .filter-select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #d6e2ed;
  border-radius: 5px;
  background-color: #f9fbfe;
  color: #365c7d;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.case-design-page-context .button { min-height: 36px; }
.case-design-page-context .icon { width: 16px; height: 16px; }
.case-design-page-context + .case-editor { margin-top: 15px; }
.case-editor {
  min-width: 0;
  margin: 22px 0;
  overflow: clip;
  border: 1px solid #d8e4ef;
  border-radius: 12px;
  background: var(--surface, #fff);
  box-shadow: 0 6px 24px rgba(23, 50, 79, .05);
}
.case-editor [hidden], .case-design-live [hidden] { display: none !important; }
.case-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line, #e1e8f0);
  background: linear-gradient(105deg, #fff, #f5faff);
}
.case-editor-toolbar h1, .case-editor-toolbar h2 {
  margin: 0;
  color: var(--ink, #17324f);
  font-size: 20px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -.5px;
}
.case-editor-toolbar p { margin: 5px 0 0; color: var(--muted, #65768b); font-size: 12px; }
.case-editor-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.case-editor-default-actions { display: flex; flex: 0 1 auto; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; max-width: 100%; padding-left: 10px; border-left: 1px solid #d8e4ef; }
.case-editor-default-actions .button { min-width: 0; min-height: 34px; padding: 6px 9px; font-size: 11px; white-space: normal; }
.case-editor-default-version { flex: 0 0 auto; color: #6c8095; font-size: 10px; font-weight: 600; white-space: nowrap; }
.case-editor-toolbar > :last-child:not(:first-child) { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.case-editor-status { color: #6c8095; font-size: 11px; line-height: 1.5; }
.case-editor-status:not(:empty) { display: inline-flex; align-items: center; gap: 6px; }
.case-editor-status[data-state="unsaved"], .case-editor-status.unsaved { color: #9a671e; }
.case-editor-status[data-state="saved"] { color: #277c62; }
.case-editor-error { padding: 10px 16px; margin: 0; color: #a53e4e; background: #fff2f3; border-bottom: 1px solid #f0d6db; font-size: 12px; }
.case-editor-error:empty { display: none; }
.case-editor-responsive { min-width: 0; padding: 12px 20px; border-bottom: 1px solid #dce6f0; background: #f8fbff; }
.case-editor-responsive-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; min-width: 0; }
.case-editor-responsive-copy { flex: 1 1 280px; min-width: 0; }
.case-editor-responsive-copy > strong { color: #315570; font-size: 12px; }
.case-editor-responsive-copy > p { max-width: 680px; margin: 4px 0 0; color: #6c8196; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.case-editor-responsive-summary > .case-editor-actions { min-width: 0; max-width: 100%; }
.case-editor-responsive .button { min-width: 0; min-height: 36px; padding: 6px 9px; font-size: 11px; white-space: normal; }
.case-editor-responsive-result { display: flex; flex-wrap: wrap; gap: 4px 10px; min-width: 0; margin-top: 8px; padding: 6px 9px; border-left: 3px solid #a8bacb; border-radius: 4px; background: #f0f5fa; color: #536f88; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.case-editor-responsive-result[data-state="checking"] { border-left-color: #6fa9d8; background: #edf6ff; color: #30668f; }
.case-editor-responsive-result[data-state="passed"] { border-left-color: #429b7b; background: #edf8f2; color: #246b51; }
.case-editor-responsive-result[data-state="issues"], .case-editor-responsive-result[data-state="stale"] { border-left-color: #c99b38; background: #fff8e8; color: #87611c; }
.case-editor-responsive-result[data-state="error"] { border-left-color: #c76674; background: #fff1f3; color: #a03e4d; }
.case-editor-responsive-issues { max-height: 180px; min-width: 0; margin: 8px 0 0; padding: 0 4px 0 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; list-style: none; }
.case-editor-responsive-issues > li, .case-editor-responsive-issue { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-width: 0; padding: 8px 10px; border: 1px solid #e0e8f0; border-radius: 5px; background: #fff; }
.case-editor-responsive-issues > li + li { margin-top: 6px; }
.case-editor-responsive-issues > li > div { display: grid; flex: 1 1 200px; min-width: 0; gap: 3px; overflow-wrap: anywhere; }
.case-editor-responsive-issues strong { color: #355972; font-size: 12px; }
.case-editor-responsive-issues span { color: #71859a; font-size: 11px; line-height: 1.4; }
.case-editor-responsive-issues .button { flex: 0 0 auto; max-width: 100%; min-height: 32px; }
.case-editor-assistant { min-width: 0; border-bottom: 1px solid #dce6f0; background: #f7faff; }
.case-editor-assistant > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; min-width: 0; padding: 12px 20px; color: #315570; font-size: 12px; font-weight: 600; cursor: pointer; }
.case-editor-assistant > summary::before { content: '+'; flex: 0 0 16px; color: #6c87a1; font-size: 16px; text-align: center; }
.case-editor-assistant[open] > summary::before { content: '−'; }
.case-editor-assistant > summary::marker { content: ''; }
.case-editor-assistant > summary::-webkit-details-marker { display: none; }
.case-editor-assistant-body { display: grid; gap: 10px; min-width: 0; padding: 0 20px 14px; }
.case-editor-assistant-body p, .case-editor-assistant-settings p { max-width: 780px; margin: 0; color: #6c8196; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.case-editor-assistant-body > label, .case-editor-assistant-settings label { display: grid; gap: 5px; min-width: 0; color: #456680; font-size: 11px; line-height: 1.5; }
.case-editor-assistant textarea, .case-editor-assistant input:not([type="checkbox"]), .case-editor-assistant select { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; border: 1px solid #cfdeec; border-radius: 5px; padding: 8px 10px; background: #fff; color: #315570; font: inherit; font-size: 12px; }
.case-editor-assistant textarea { display: block; min-height: 72px; max-height: 220px; resize: vertical; line-height: 1.6; }
.case-editor-assistant-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; }
.case-editor-assistant .button { flex: 0 1 auto; min-width: 0; min-height: 36px; max-width: 100%; padding: 6px 10px; font-size: 11px; line-height: 1.5; white-space: normal; }
.case-editor-assistant-source, [data-editor-assistant-source] { display: inline-flex; align-items: center; justify-self: start; flex: 0 0 auto; max-width: 100%; border: 1px solid #cdddf0; border-radius: 12px; padding: 2px 8px; color: #486c90; background: #edf4fd; font-size: 10px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.case-editor-assistant-status { min-width: 0; color: #607e98; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.case-editor-assistant-status[data-state="busy"] { color: #2e71a6; }
.case-editor-assistant-status[data-state="ready"], .case-editor-assistant-status[data-state="applied"] { color: #277c62; }
.case-editor-assistant-status[data-state="stale"] { color: #916b24; }
.case-editor-assistant-status[data-state="error"] { color: #a53e4e; }
.case-editor-assistant-review { display: grid; gap: 7px; min-width: 0; max-height: 280px; margin: 0; padding: 10px; overflow: auto; overscroll-behavior: contain; list-style: none; border: 1px solid #d8e4ef; border-radius: 6px; background: #fff; scrollbar-width: thin; }
.case-editor-assistant-review > ul { min-width: 0; margin: 0; padding: 0; list-style: none; }
.case-editor-assistant-change { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; min-width: 0; padding: 6px 0; color: #607a93; font-size: 11px; line-height: 1.6; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.case-editor-assistant-change + .case-editor-assistant-change { border-top: 1px solid #e9eff5; }
.case-editor-assistant-change > strong { flex: 1 1 160px; min-width: 0; color: #355972; }
.case-editor-assistant-change del { color: #8b6b75; }
.case-editor-assistant-change ins { color: #277c62; text-decoration: none; }
.case-editor-assistant-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 10px 16px; min-width: 0; padding: 10px 12px; border: 1px solid #dbe5ef; border-radius: 5px; background: #f1f6fc; }
.case-editor-assistant-settings > summary, .case-editor-assistant-settings > p, .case-editor-assistant-settings > .case-editor-assistant-actions { grid-column: 1 / -1; }
.case-editor-assistant-settings > summary { color: #456680; font-size: 11px; font-weight: 600; cursor: pointer; }
.case-editor-assistant-settings label:has(input[type="checkbox"]) { display: flex; align-items: center; gap: 7px; }
.case-editor-assistant-settings input[type="checkbox"] { flex: 0 0 auto; accent-color: var(--blue, #0876d3); }
.case-editor-align-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; min-width: 0; max-width: 100%; padding: 6px 0; }
.case-editor-align-actions > span, .case-editor-align-actions > small { flex: 1 1 100%; min-width: 0; color: #71869a; font-size: 10px; line-height: 1.5; }
.case-editor-align-actions .button, .case-editor-align-actions [data-editor-align] { min-width: 0; min-height: 34px; max-width: 100%; padding: 5px 8px; font-size: 11px; line-height: 1.4; white-space: normal; }
.case-editor-guide-label { position: absolute; top: 0; left: 0; width: max-content; max-width: none; border-radius: 3px; background: #d9469b; color: #fff; font-size: 10px; font-weight: 600; line-height: 1.4; white-space: nowrap; pointer-events: none; }
@media (max-width: 600px) {
  .case-editor-assistant > summary { padding: 11px 12px; }
  .case-editor-assistant-body { padding: 0 12px 12px; }
  .case-editor-assistant-settings { grid-template-columns: minmax(0, 1fr); padding: 9px; }
  .case-editor-assistant .button, .case-editor-align-actions [data-editor-align] { min-height: 40px; }
  .case-editor-assistant textarea, .case-editor-assistant input:not([type="checkbox"]), .case-editor-assistant select { font-size: 16px; }
}
.case-editor-workspace {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 280px;
  align-items: start;
  min-height: 0;
  background: #f4f7fb;
}
.case-editor-palette, .case-editor-inspector { min-width: 0; padding: 16px 14px; scrollbar-width: thin; background: #fff; }
.case-editor-palette { grid-column: 1; grid-row: 1; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; overscroll-behavior: contain; border-right: 1px solid var(--line, #e1e8f0); }
.case-editor-inspector { grid-column: 3; grid-row: 1; display: flex; flex-direction: column; align-items: stretch; gap: 12px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; overscroll-behavior: contain; border-left: 1px solid var(--line, #e1e8f0); }
.case-editor-inspector > h3 { margin-bottom: 0; }
.case-editor-inspector > .case-editor-properties { display: flex; flex-direction: column; flex: none; width: 100%; }
.case-editor-inspector > .case-editor-properties > * { flex: none; width: 100%; min-width: 0; }
.case-editor-inspector .case-editor-section-field-properties, .case-editor-inspector .case-editor-element-properties { grid-template-columns: minmax(0, 1fr); }
.case-editor-inspector .case-editor-element-properties > label:has(textarea) { grid-column: auto; }
.case-editor-inspector .case-editor-property-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.case-editor-inspector > .case-editor-canvas-settings { flex: none; width: 100%; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line, #e1e8f0); }
.case-editor-inspector .case-editor-canvas-settings > .field-help, .case-editor-inspector .case-editor-canvas-settings > .case-editor-precision { grid-column: 1 / -1; margin: 0; }
.case-editor-inspector > p { margin: 0; font-size: 11px; }
.case-editor-palette > h2, .case-editor-inspector > h2, .case-editor-palette > h3, .case-editor-inspector > h3 {
  margin: 0 0 17px;
  color: var(--ink, #17324f);
  font-size: 13px;
  font-weight: 650;
}
.case-editor-inspector > h3 { margin: 0; }
.case-editor-group + .case-editor-group { margin-top: 22px; }
.case-editor-group-title { margin: 0 0 8px; color: #7c8da0; font-size: 10px; font-weight: 650; letter-spacing: .65px; text-transform: uppercase; }
summary.case-editor-group-title { padding: 3px 0; cursor: pointer; }
.case-editor-group-title::marker { color: #9bb3c7; }
.case-editor-component {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 39px;
  margin: 6px 0;
  padding: 9px 10px;
  border: 1px solid #dde7f0;
  border-radius: 6px;
  background: #fff;
  color: #45647f;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  cursor: grab;
  transition: border-color .15s, background .15s;
}
.case-editor-component:hover { background: #f0f7ff; border-color: #b8d5ee; color: var(--blue-dark, #045daa); }
.case-editor-component:active { cursor: grabbing; }
.case-editor-component .icon, .case-editor-component svg { width: 16px; height: 16px; color: #6b9ac1; }
.case-editor-component > span:first-child { display: flex; align-items: center; justify-content: center; flex: 0 0 21px; width: 21px; height: 21px; border-radius: 4px; background: #edf5fc; color: #6b96ba; font-size: 13px; font-weight: 650; }
.case-editor-component small { display: block; margin-top: 2px; color: #8294a6; font-size: 10px; font-weight: 400; }
.case-editor-component[aria-disabled="true"] { opacity: .5; cursor: default; }
.case-editor-variable-manager > .field-help { margin: 8px 0; font-size: 11px; line-height: 1.5; }
.case-editor-variable-manager > .button { width: 100%; }
.case-editor-variable-form { margin: 12px 0; padding: 12px 10px; border: 1px solid #c9deef; border-radius: 7px; background: #f7fbff; }
.case-editor-variable-form h4 { margin: 0 0 12px; font-size: 12px; color: #355b7a; }
.case-editor-variable-form label { display: flex; flex-direction: column; gap: 5px; margin: 10px 0; font-size: 11px; color: #52708c; }
.case-editor-variable-form .form-input, .case-editor-variable-form .form-textarea, .case-editor-variable-form .filter-select { width: 100%; min-width: 0; box-sizing: border-box; font-size: 12px; }
.case-editor-variable-form .field-help { margin: 5px 0; font-size: 10px; line-height: 1.5; }
.case-editor-variable-item { padding: 12px 0; border-bottom: 1px solid #e6edf4; overflow-wrap: anywhere; }
.case-editor-variable-item strong { color: #355b7a; font-size: 12px; }
.case-editor-variable-item small { display: block; margin-top: 4px; color: #768ba0; font-size: 10px; }
.case-editor-variable-item.is-archived { opacity: .75; }
.case-editor-variable-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.case-editor-variable-actions .button { min-width: 0; min-height: 30px; padding: 5px 8px; font-size: 10px; }
.case-editor-field-sample strong { white-space: pre-wrap; overflow-wrap: anywhere; }
.case-editor-stage { grid-column: 2; grid-row: 1; display: flex; min-width: 0; flex-direction: column; }
.case-editor-stage-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 57px;
  padding: 10px 14px;
  background: #f9fbfe;
  border-bottom: 1px solid var(--line, #e1e8f0);
}
.case-editor-stage-toolbar > button:not(.button) {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #60788f;
  font-size: 11px;
  font-weight: 550;
}
.case-editor-tab-choices { display: flex; flex: 1 1 100%; flex-wrap: wrap; gap: 5px; min-width: 0; }
.case-editor-tab-choices button {
  min-height: 31px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #60788f;
  font-size: 11px;
  font-weight: 550;
  line-height: 1.4;
}
.case-editor-tab-choices button:hover { background: #edf5fe; color: #246b9e; }
.case-editor-tab-choices button[aria-selected="true"] { border-color: #c9e1f6; background: #e5f2ff; color: #156bb0; }
.case-editor-view-options { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; width: 100%; padding-top: 3px; }
.case-editor-section-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; width: 100%; min-width: 0; padding: 8px 0; border-block: 1px solid #e3edf5; }
.case-editor-section-name { flex: 1 1 150px; min-width: 0; overflow: hidden; color: #355b7a; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.case-editor-section-name small { color: #71869a; font-size: 11px; font-weight: 400; }
.case-editor-section-actions { display: flex; flex: 0 1 auto; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.case-editor-fit-feedback { flex: 1 1 100%; min-width: 0; min-height: 16px; color: #277c62; font-size: 11px; line-height: 16px; overflow-wrap: anywhere; }
.case-editor-section-tools .button { flex: 0 1 auto; min-width: 0; min-height: 36px; padding: 5px 7px; font-size: 11px; line-height: 13px; white-space: normal; }
.case-editor-section-actions [data-editor-command="delete"] { border-color: #e4aeb6; color: #a52c42; }
.case-editor-stage-toolbar > button:hover { background: #edf5fe; color: #246b9e; }
.case-editor-stage-toolbar > button[aria-selected="true"], .case-editor-stage-toolbar > button.active {
  border-color: #c9e1f6;
  background: #e5f2ff;
  color: #156bb0;
}
.case-editor-stage-toolbar label { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #6d8195; }
.case-editor-stage-toolbar input[type="checkbox"] { accent-color: var(--blue, #0876d3); }
.case-editor-viewport { flex: 0 0 auto; min-width: 0; min-height: 240px; max-height: none; padding: 20px; overflow: auto; }
.case-editor-canvas-sizer { position: relative; display: block; flex: none; margin: 0 auto; overflow: clip; }
.case-editor-canvas-sizer > .case-editor-canvas { position: absolute; top: 0; left: 0; transform-origin: top left; }
.case-editor-zoom { min-width: 42px; color: #607b94; font-size: 11px; font-variant-numeric: tabular-nums; text-align: center; }
.case-editor-view-options [data-editor-command="fit"][aria-pressed="true"],
.case-editor-view-options [data-editor-command="actual-size"][aria-pressed="true"] { border-color: #8abde6; background: #dfedfb; color: #075d9c; }
.case-editor-canvas {
  position: relative;
  isolation: isolate;
  width: 1200px;
  height: 1000px;
  flex-shrink: 0;
  border: 1px solid #dce5ee;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(33, 59, 87, .08);
}
.case-editor-grid {
  background-color: #fff;
  background-image: radial-gradient(circle, #dfe8f0 .7px, transparent .9px);
  background-size: 10px 10px;
}
.case-editor-canvas.is-drag-over, .case-editor-canvas.drag-over { outline: 2px solid #58a5df; outline-offset: -2px; background-color: #f5faff; }
.case-editor-block {
  position: absolute;
  min-width: 80px;
  min-height: 40px;
  border: 1px solid #dce6ef;
  border-radius: 7px;
  background: #fff;
  color: var(--body, #42566d);
  cursor: grab;
  user-select: none;
  touch-action: none;
  box-shadow: 0 1px 3px rgba(23, 50, 79, .025);
}
.case-editor-block:hover { border-color: #8dbde2; }
.case-editor-block[aria-selected="true"] { border-color: var(--blue, #0876d3); outline: 2px solid rgba(8, 118, 211, .22); outline-offset: 1px; box-shadow: 0 2px 7px rgba(8, 118, 211, .1); }
.case-editor-block[data-block-type="section"][aria-selected="true"] { z-index: 20; }
.case-editor-guide { position: absolute; z-index: 75; box-sizing: border-box; margin: 0; padding: 0; border: 0; background: none; pointer-events: none; user-select: none; }
.case-editor-guide.is-vertical { width: var(--editor-guide-width, 1px); background: repeating-linear-gradient(to bottom, #d9469b 0, #d9469b var(--editor-guide-dash, 5px), transparent var(--editor-guide-dash, 5px), transparent var(--editor-guide-gap, 9px)); }
.case-editor-guide.is-horizontal { height: var(--editor-guide-width, 1px); background: repeating-linear-gradient(to right, #d9469b 0, #d9469b var(--editor-guide-dash, 5px), transparent var(--editor-guide-dash, 5px), transparent var(--editor-guide-gap, 9px)); }
.case-editor-block[data-editor-drop-target="true"] { z-index: 24; border-color: #20976b; outline: 3px solid rgba(32, 151, 107, .7); outline-offset: 2px; box-shadow: 0 0 0 5px rgba(32, 151, 107, .12); }
.case-editor-block.is-moving, .case-editor-block.is-dragging, .case-editor-block:active { cursor: grabbing; }
.case-editor-block-content { position: absolute; z-index: 0; isolation: isolate; inset: 0; overflow: hidden; border-radius: inherit; padding: 16px; pointer-events: none; }
.case-editor-block[data-block-type="section"] > .case-editor-block-content { overflow: auto; }
.case-editor-block[data-block-type="section"] > .case-editor-block-content[data-design-placement-path] { z-index: auto; isolation: auto; overflow: visible; }
.case-editor-block-content > :first-child { margin-top: 0; }
.case-editor-block-content > :last-child { margin-bottom: 0; }
.case-editor-block-content > p, .case-editor-text-sample p { overflow-wrap: anywhere; white-space: pre-wrap; }
.case-editor-context-menu { position: fixed; z-index: 10000; top: 0; left: 0; box-sizing: border-box; width: 242px; padding: 6px; overflow: auto; border: 1px solid #cbdbe9; border-radius: 8px; background: #fff; box-shadow: 0 8px 30px rgba(18,47,73,.2); color: #234761; font: 13px/1.4 system-ui,sans-serif; }
.case-editor-context-menu > button { display: block; box-sizing: border-box; width: 100%; min-height: 34px; margin: 0; padding: 7px 10px; border: 0; border-radius: 4px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.case-editor-context-menu > button:hover:not(:disabled), .case-editor-context-menu > button:focus-visible { outline: 0; background: #eaf4ff; color: #075da5; }
.case-editor-context-menu > button.is-danger:not(:disabled) { color: #ac3442; }
.case-editor-context-menu > button:disabled { color: #899aa8; cursor: default; }
.case-editor-context-help { margin: 5px 8px; padding-top: 7px; border-top: 1px solid #e1e9f0; color: #687e91; font-size: 11px; }
.case-editor-removed { grid-column: 1 / -1; flex: 1 1 100%; box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; margin: 0; border: 1px solid #d8e4ef; border-radius: 7px; background: #f8fbff; }
.case-editor-removed > summary { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 9px 10px; color: #365c7a; cursor: pointer; list-style: none; }
.case-editor-removed > summary::-webkit-details-marker { display: none; }
.case-editor-removed > summary:focus-visible { outline: 2px solid var(--blue, #0876d3); outline-offset: 2px; border-radius: 5px; }
.case-editor-removed-heading { flex: 1 1 auto; min-width: 0; font-size: 12px; font-weight: 650; line-height: 1.4; overflow-wrap: break-word; }
.case-editor-removed-count { flex: 0 0 auto; min-width: 22px; padding: 2px 6px; border-radius: 10px; background: #e7eff7; color: #4d6e89; font-size: 11px; line-height: 1.4; text-align: center; }
.case-editor-removed-chevron { flex: 0 0 auto; color: #68839b; font-size: 20px; line-height: 1; }
.case-editor-removed[open] .case-editor-removed-chevron { transform: rotate(90deg); }
.case-editor-removed-body { min-width: 0; padding: 0 10px 10px; }
.case-editor-removed-help { margin: 0 0 8px; color: #6d8193; font-size: 11px; line-height: 1.5; overflow-wrap: break-word; }
.case-editor-removed-list { display: flex; flex-direction: column; max-height: min(180px, 28vh); min-width: 0; margin: 0; padding: 0 8px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border: 1px solid #e0e8ef; border-radius: 5px; background: #fff; list-style: none; }
.case-editor-removed-list > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px 10px; min-width: 0; padding: 8px 0; border-bottom: 1px solid #e8eef4; }
.case-editor-removed-list > li:last-child { border-bottom: 0; }
.case-editor-removed-copy { flex: 1 1 130px; min-width: min(130px, 100%); max-width: 100%; }
.case-editor-removed-name { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: #315570; font-size: 12px; font-weight: 600; line-height: 1.45; overflow-wrap: break-word; }
.case-editor-removed-meta { display: flex; flex-wrap: wrap; gap: 1px 6px; margin-top: 3px; color: #7b8fa0; font-size: 10px; line-height: 1.4; }
.case-editor-removed-parent { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-editor-removed-restore.button { flex: 0 0 auto; box-sizing: border-box; max-width: 100%; min-height: 29px; padding: 4px 8px; font-size: 11px; line-height: 1.4; white-space: nowrap; }
.case-editor-removed-footer { margin-top: 8px; font-size: 11px; line-height: 1.5; }
.case-editor-removed-footer .text-link { overflow-wrap: break-word; }
@media (max-width: 600px) { .case-editor-removed-restore.button { min-height: 36px; } }
.case-editor-block-name {
  position: absolute;
  z-index: 5;
  top: 5px;
  left: 8px;
  max-width: calc(100% - 24px);
  padding: 1px 6px;
  overflow: hidden;
  border: 1px solid #d6e6f4;
  border-radius: 4px;
  background: #f2f8fe;
  color: #5e84a4;
  font-size: 11px;
  line-height: 1.6;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}
.case-editor-block-name:active { cursor: grabbing; }
.case-editor-block[aria-selected="true"] .case-editor-block-name { background: var(--blue, #0876d3); color: #fff; border-color: var(--blue, #0876d3); }
.case-editor-resize {
  position: absolute;
  z-index: 4;
  right: -5px;
  bottom: -5px;
  width: 11px;
  height: 11px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 3px;
  background: var(--blue, #0876d3);
  box-shadow: 0 0 0 1px var(--blue, #0876d3);
  cursor: nwse-resize;
  touch-action: none;
}
.case-editor-block:not([aria-selected="true"]) .case-editor-resize { display: none; }
.case-editor-selection-box {
  position: absolute;
  z-index: 80;
  box-sizing: border-box;
  border: 1px solid #0876d3;
  pointer-events: none;
  touch-action: none;
  --editor-grip-size: 12px;
  --editor-move-size: 24px;
}
.case-editor-selection-handle, .case-editor-move-handle {
  position: absolute;
  box-sizing: border-box;
  display: block;
  margin: 0;
  padding: 0;
  border: 1px solid #0876d3;
  background: #fff;
  color: #0876d3;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}
.case-editor-selection-handle { width: var(--editor-grip-size); height: var(--editor-grip-size); border-radius: 2px; transform: translate(-50%, -50%); }
.case-editor-selection-handle[data-editor-handle="n"] { left: 50%; top: 0; cursor: ns-resize; }
.case-editor-selection-handle[data-editor-handle="ne"] { left: 100%; top: 0; cursor: nesw-resize; }
.case-editor-selection-handle[data-editor-handle="e"] { left: 100%; top: 50%; cursor: ew-resize; }
.case-editor-selection-handle[data-editor-handle="se"] { left: 100%; top: 100%; cursor: nwse-resize; }
.case-editor-selection-handle[data-editor-handle="s"] { left: 50%; top: 100%; cursor: ns-resize; }
.case-editor-selection-handle[data-editor-handle="sw"] { left: 0; top: 100%; cursor: nesw-resize; }
.case-editor-selection-handle[data-editor-handle="w"] { left: 0; top: 50%; cursor: ew-resize; }
.case-editor-selection-handle[data-editor-handle="nw"] { left: 0; top: 0; cursor: nwse-resize; }
.case-editor-move-handle { width: calc(var(--editor-move-size) * 1.25); height: var(--editor-move-size); left: 50%; top: 0; transform: translate(-50%, -110%); border-radius: 4px; background: #0876d3; color: #fff; font-size: calc(var(--editor-move-size) * .8); line-height: 1; cursor: grab; }
.case-editor-move-handle:active { cursor: grabbing; }
.case-editor-selection-handle:focus-visible, .case-editor-move-handle:focus-visible { outline: 2px solid #153e62; outline-offset: 2px; }
.case-editor-canvas-resize { position: absolute; z-index: 20; display: block; width: 16px; height: 16px; border: 2px solid #fff; border-radius: 4px; background: #738ba1; box-shadow: 0 0 0 1px #738ba1; touch-action: none; }
.case-editor-canvas-resize[data-editor-canvas-resize="e"] { right: 0; top: 50%; cursor: ew-resize; }
.case-editor-canvas-resize[data-editor-canvas-resize="s"] { left: 50%; bottom: 0; cursor: ns-resize; }
.case-editor-canvas-resize[data-editor-canvas-resize="se"] { right: 0; bottom: 0; cursor: nwse-resize; }
.case-editor-precision { margin: 8px 0; }
.case-editor-precision > summary { color: #426680; cursor: pointer; font-size: 12px; font-weight: 600; padding: 8px 0; }
.case-editor-precision > .case-editor-property-grid { margin-top: 8px; }
.case-editor-section-field { touch-action: none; cursor: grab; }
.case-editor-preview[data-device="mobile"] [data-platform-element-sized], .case-editor-preview[data-device="mobile"] [data-design-field-sized] { max-width: 100% !important; }
@media (max-width: 760px) {
  [data-platform-element-sized]:not(.case-editor [data-platform-element-sized]), [data-design-field-sized]:not(.case-editor [data-design-field-sized]) { max-width: 100% !important; }
}
.case-editor-block[data-block-type="tab"] { background: #eef6fd; border-color: #d4e7f7; color: #3479ae; }
.case-editor-block[data-block-type="tab"] .case-editor-block-content { display: flex; align-items: center; justify-content: center; padding: 8px 14px; font-weight: 600; }
.case-editor-block[data-block-type="button"] { border: 0; background: transparent; }
.case-editor-block[data-block-type="button"] .case-editor-block-content { display: flex; align-items: center; justify-content: center; padding: 0; font-weight: 600; }
.case-editor-block[data-block-type="text"] .case-editor-block-content { display: flex; align-items: flex-start; white-space: pre-wrap; overflow-wrap: anywhere; }
.case-editor-block[data-block-type="field"] .case-editor-block-content { display: flex; flex-direction: column; justify-content: center; gap: 5px; background: #f8fbff; }
.case-editor-block[data-block-type="field"] small { color: #7a8fa2; font-size: 11px; }
.case-editor-block[data-block-type="field"] strong { color: #355b7a; font-weight: 550; }
.case-editor-block[data-block-type="section"] .case-editor-block-content { background: linear-gradient(#fff, #f9fbfe); }
.case-editor-block[data-block-type="section"] > .case-editor-block-content > .case-editor-section-sample > h3 { margin: 0 0 10px; color: var(--ink, #17324f); font-size: 15px; }
.case-editor-block[data-block-type="button"] .button { width: 100%; min-height: 100%; white-space: normal; }
.case-editor-text-sample { width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
.case-editor-tab-sample { overflow-wrap: anywhere; text-align: center; }
.case-editor-field-sample { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.case-editor-field-sample > span { color: #7a8fa2; font-size: 11px; font-weight: 500; }
.case-editor-field-sample > strong { overflow-wrap: anywhere; }
.case-editor-section-sample > strong { display: block; margin-bottom: 16px; color: var(--ink, #17324f); font-size: 15px; font-weight: 650; }
.case-editor-section-sample > div:not(.case-editor-note-sample):not(.platform-design-section-sample) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.case-editor-section-row { display: flex; min-width: 0; min-height: 61px; flex-direction: column; justify-content: center; gap: 5px; padding: 10px 12px; border: 1px solid #e4edf6; border-radius: 5px; background: #f5f9fe; }
.case-editor-section-row > span:first-child { color: #7a92a8; font-size: 10px; }
.case-editor-section-row > span:last-child { color: #4d7392; font-size: 12px; }
.case-editor-section-sample > p { margin-top: 16px; color: #7690a8; font-size: 13px; }
.case-editor-note-sample { min-height: 75px; margin-top: 15px; border: 1px solid #dbe7f2; border-radius: 5px; background: #fff; }
.case-editor-empty { padding: 24px 12px; color: #7a8da0; font-size: 12px; line-height: 1.8; text-align: center; }
.case-editor-empty .icon { width: 28px; height: 28px; margin: 0 auto 10px; color: #9db7cd; }
.case-editor-empty p { margin: 8px 0 0; }
.case-editor-properties { display: flex; flex-direction: row; align-items: start; flex-wrap: wrap; gap: 10px 12px; }
.case-editor-properties > label { flex: 1 1 160px; }
.case-editor-properties > label:has(textarea) { flex-basis: 280px; }
.case-editor-properties > h4 { align-self: end; margin-bottom: 10px; }
.case-editor-properties > .case-editor-property-grid { flex: 1 1 300px; }
.case-editor-properties > .case-editor-property-actions { flex: 0 0 auto; width: 100%; }
.case-editor-section-field-properties, .case-editor-element-properties { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); align-items: start; flex: 2 1 420px; min-width: 0; gap: 10px 12px; padding: 10px 12px; border: 1px solid #d8e6f3; border-radius: 7px; background: #f5faff; }
.case-editor-section-field-properties > h4, .case-editor-element-properties > h4,
.case-editor-section-field-properties > .field-help, .case-editor-element-properties > .field-help { grid-column: 1 / -1; }
.case-editor-element-properties > label:has(textarea) { grid-column: span 2; }
.case-editor-element-properties > .case-editor-property-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.case-editor-element-properties input[type="file"] { max-width: 100%; font-size: 11px; }
.case-editor-properties label, .case-editor-canvas-settings label { display: flex; min-width: 0; flex-direction: column; gap: 5px; color: #6a8196; font-size: 11px; font-weight: 600; }
.case-editor-properties input:not([type="checkbox"]), .case-editor-properties select, .case-editor-properties textarea,
.case-editor-canvas-settings input:not([type="checkbox"]),
.case-editor-stage-toolbar select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 35px;
  padding: 7px 9px;
  border: 1px solid #d6e2ed;
  border-radius: 5px;
  background: #fff;
  color: #345571;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}
.case-editor-properties textarea { min-height: 70px; resize: vertical; }
.case-editor-properties input:focus-visible, .case-editor-properties select:focus-visible, .case-editor-properties textarea:focus-visible { border-color: var(--blue, #0876d3); }
.case-editor-properties input[type="checkbox"] { accent-color: var(--blue, #0876d3); }
.case-editor-properties label:has(input[type="checkbox"]) { flex-direction: row; align-items: center; gap: 7px; }
.case-editor-canvas-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 10px 12px; margin: 0; padding: 0 0 0 18px; border-left: 1px solid var(--line, #e1e8f0); }
.case-editor-canvas-settings > h4, .case-editor-canvas-settings > .checkbox-label { grid-column: 1 / -1; }
.case-editor-properties h4, .case-editor-canvas-settings h4 { margin: 2px 0 0; color: #7c8da0; font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .65px; }
.case-editor-canvas-settings .checkbox-label { flex-direction: row; align-items: flex-start; gap: 7px; margin-top: 3px; font-weight: 500; }
.case-editor-canvas-settings input[type="checkbox"] { accent-color: var(--blue, #0876d3); flex-shrink: 0; margin-top: 2px; }
.case-editor-property-actions { display: flex; align-items: flex-start; align-content: flex-start; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; border: 0; }
.case-editor-properties > .case-editor-property-actions > .button { flex: 1 1 110px; align-self: flex-start; min-height: 36px; padding: 4px 6px; line-height: 13px; }
.case-editor-property-actions .button { white-space: normal; }
.case-editor-property-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.case-editor-property-grid > .wide { grid-column: 1 / -1; }
.case-editor-properties .case-editor-actions { padding-top: 12px; border-top: 1px solid #e9eef4; gap: 7px; }
.case-editor-properties .button { flex: 1 1 auto; padding-right: 8px; padding-left: 8px; font-size: 11px; }
.case-editor-properties p { margin: 0; color: #8797a7; font-size: 10px; font-weight: 400; line-height: 1.6; }
.case-editor-stage-toolbar select { width: auto; max-width: 220px; min-height: 30px; padding: 4px 7px; font-size: 11px; }
.case-editor-stage-toolbar [data-editor-phone-width] { width: 84px; max-width: 100%; min-height: 34px; }
.case-editor-preview { min-width: 0; padding: 22px; overflow: visible; background: #edf3f9; }
.case-editor-workspace.is-preview .case-editor-preview { padding: 0; }
.case-editor-preview > .case-design-live { margin-right: auto; margin-left: auto; }
.case-editor-preview[data-device="desktop"] { width: max-content; min-width: 100%; }
.case-editor-preview[data-device="desktop"] > .case-design-live { width: var(--case-design-width, 1200px); }
.case-editor-preview[data-device="mobile"] > .case-design-live { max-width: 390px; }
.case-editor-preview[data-device="mobile"][data-phone-width] .case-design-live,
.case-editor-preview[data-device="mobile"][data-phone-width] .platform-design-live { max-width: none; }

/* Saved layouts use real case modules and retain their forms and actions. */
.case-design-live { position: relative; isolation: isolate; min-width: 0; width: 100%; transform: translateZ(0); }
.case-design-tablist { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.case-design-tab {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid #dce7f1;
  border-radius: 7px;
  background: #f9fbfe;
  color: #6c8199;
  font-weight: 550;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: auto;
}
.case-design-tab:hover { background: #edf6fe; color: #3177ab; }
.case-design-tab[aria-selected="true"], .case-design-tab.active { background: #e2f0fc; border-color: #c9e3f7; color: #226daa; font-weight: 650; }
.case-design-panel { position: absolute; inset: 0; }
.case-design-block { position: absolute; min-width: 0; overflow: auto; overscroll-behavior: contain; }
.case-design-block[data-block-type="section"], .case-design-block[data-design-block-type="section"] { border-radius: var(--radius, 9px); }
.case-design-block > .card { margin: 0; min-height: 100%; }
.case-design-block .ticket-module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; gap: 15px; }
.case-design-field { height: 100%; padding: 14px 16px; border: 1px solid #e0eaf4; border-radius: 7px; background: #f6faff; overflow-wrap: anywhere; }
.case-design-field .form-label, .case-design-field small { display: block; margin: 0 0 6px; color: #728ba2; font-size: 11px; font-weight: 500; }
.case-design-field strong { color: #3f6687; font-weight: 550; }
.case-design-field-content { display: flex; min-height: 100%; flex-direction: column; justify-content: center; }
.case-design-field-value { min-width: 0; color: #3f6687; font-weight: 550; }
.case-design-custom-multiline [data-inline-display] { white-space: pre-wrap; }
.case-design-text { height: 100%; padding: 10px 12px; color: var(--body, #42566d); white-space: pre-wrap; overflow-wrap: anywhere; }
.case-design-text h2, .case-design-text h3 { margin: 0 0 8px; color: var(--ink, #17324f); font-size: inherit; }
.case-design-text p { margin: 0; }
.case-design-button { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 40px; padding: 8px 14px; white-space: normal; overflow-wrap: anywhere; }
.case-design-action { display: flex; align-items: stretch; justify-content: stretch; }
.case-design-action-button { width: 100%; min-height: 40px; height: 100%; font-size: inherit; white-space: normal; overflow-wrap: anywhere; }
.case-design-component-title { margin: 0 0 8px; color: var(--ink, #17324f); font-size: 15px; font-weight: 650; }

@media (max-width: 1180px) {
  .case-editor-workspace { grid-template-columns: 180px minmax(0, 1fr); }
  .case-editor-palette, .case-editor-inspector { padding-right: 12px; padding-left: 12px; }
  .case-editor-palette { grid-row: 1 / span 2; }
  .case-editor-inspector { grid-column: 2; grid-row: 2; position: static; max-height: 480px; border-left: 0; border-top: 1px solid var(--line, #e1e8f0); }
  .case-editor-inspector > .case-editor-properties { flex-direction: row; flex-wrap: wrap; }
  .case-editor-inspector > .case-editor-properties > label { flex: 1 1 180px; width: auto; }
  .case-editor-inspector .case-editor-section-field-properties, .case-editor-inspector .case-editor-element-properties { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
  .case-editor-inspector .case-editor-element-properties > label:has(textarea) { grid-column: 1 / -1; }
  .case-editor-toolbar { padding: 17px 18px; }
}
@media (max-width: 900px) {
  .case-editor-workspace { grid-template-columns: 180px minmax(0, 1fr); }
  .case-editor-stage { min-width: 0; }
  .case-design-live:not(.case-editor-preview[data-device="desktop"] .case-design-live) { display: flex; flex-direction: column; gap: 16px; height: auto !important; }
  .case-design-live:not(.case-editor-preview[data-device="desktop"] .case-design-live) .case-design-tablist { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .case-design-live:not(.case-editor-preview[data-device="desktop"] .case-design-live) .case-design-tab { position: static !important; width: 100% !important; height: auto !important; min-height: 45px; font-size: 12px !important; }
  .case-design-live:not(.case-editor-preview[data-device="desktop"] .case-design-live) .case-design-panel { position: relative; display: flex; flex-direction: column; gap: 16px; }
  .case-design-live:not(.case-editor-preview[data-device="desktop"] .case-design-live) .case-design-block { position: static !important; width: 100% !important; height: auto !important; min-height: 40px; overflow: visible; }
  .case-design-live:not(.case-editor-preview[data-device="desktop"] .case-design-live) .case-design-block > .card { min-height: 0; }
  .case-design-live:not(.case-editor-preview[data-device="desktop"] .case-design-live) .case-design-text,
  .case-design-live:not(.case-editor-preview[data-device="desktop"] .case-design-live) .case-design-field,
  .case-design-live:not(.case-editor-preview[data-device="desktop"] .case-design-live) .case-design-button { height: auto; }
}
/* A mobile preview also reflows when the editor runs on a wide screen. */
.case-editor-preview[data-device="mobile"] .case-design-live,
.case-editor-preview.is-mobile .case-design-live { display: flex; flex-direction: column; gap: 16px; height: auto !important; max-width: 390px; }
.case-editor-preview[data-device="mobile"] .case-design-tablist,
.case-editor-preview.is-mobile .case-design-tablist { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.case-editor-preview[data-device="mobile"] .case-design-tab,
.case-editor-preview.is-mobile .case-design-tab { position: static !important; width: 100% !important; height: auto !important; min-height: 45px; font-size: 12px !important; }
.case-editor-preview[data-device="mobile"] .case-design-panel,
.case-editor-preview.is-mobile .case-design-panel { position: relative; display: flex; flex-direction: column; gap: 16px; }
.case-editor-preview[data-device="mobile"] .case-design-block,
.case-editor-preview.is-mobile .case-design-block { position: static !important; width: 100% !important; height: auto !important; min-height: 40px; overflow: visible; }
.case-editor-preview[data-device="mobile"] .case-design-block > .card,
.case-editor-preview.is-mobile .case-design-block > .card { min-height: 0; }
.case-editor-preview[data-device="mobile"] .case-design-text,
.case-editor-preview[data-device="mobile"] .case-design-field,
.case-editor-preview[data-device="mobile"] .case-design-button,
.case-editor-preview.is-mobile .case-design-text,
.case-editor-preview.is-mobile .case-design-field,
.case-editor-preview.is-mobile .case-design-button { height: auto; }
@media (max-width: 600px) {
  .case-design-page-context { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 12px; }
  .case-design-page-context label { grid-column: 1 / -1; }
  .case-design-page-context .filter-select { min-height: 40px; font-size: 16px; }
  .case-design-page-context .button { min-height: 40px; }
  .case-editor { margin: 16px 0; border-radius: 8px; }
  .case-editor-toolbar { align-items: flex-start; gap: 13px; padding: 16px; }
  .case-editor-toolbar h1, .case-editor-toolbar h2 { font-size: 18px; }
  .case-editor-toolbar > :last-child:not(:first-child) { width: 100%; }
  .case-editor-toolbar .button { flex: 1 1 auto; min-height: 40px; }
  .case-editor-responsive { padding: 12px; }
  .case-editor-responsive-summary > .case-editor-actions { flex: 1 1 100%; }
  .case-editor-responsive-summary .button { flex: 1 1 100px; min-height: 40px; }
  .case-editor-stage-toolbar [data-editor-phone-width] { min-height: 38px; font-size: 16px; }
  .case-editor-default-actions { flex: 1 1 100%; padding: 8px 0; border-left: 0; border-block: 1px solid #e0e9f2; }
  .case-editor-default-version { flex-basis: 100%; }
  .case-editor-workspace { grid-template-columns: minmax(0, 1fr); }
  .case-editor-palette { grid-column: 1; grid-row: 1; position: static; max-height: 180px; padding-top: 12px; padding-bottom: 12px; border-right: 0; border-bottom: 1px solid var(--line, #e1e8f0); }
  .case-editor-stage { grid-column: 1; grid-row: 2; }
  .case-editor-palette > h2, .case-editor-palette > h3 { margin-bottom: 12px; }
  .case-editor-group { display: flex; flex-wrap: wrap; gap: 6px; }
  .case-editor-group + .case-editor-group { margin-top: 13px; }
  .case-editor-group-title { width: 100%; margin-bottom: 2px; }
  .case-editor-component { flex: 1 1 145px; width: auto; margin: 0; min-height: 40px; }
  .case-editor-stage-toolbar { padding: 10px 12px; }
  .case-editor-tab-choices button { min-height: 37px; }
  .case-editor-view-options label { min-height: 32px; }
  .case-editor-section-name { flex-basis: 100%; }
  .case-editor-section-actions { flex: 1 1 100%; }
  .case-editor-section-tools .button { flex: 1 1 90px; min-height: 38px; }
  .case-editor-viewport { padding: 12px; }
  .case-editor-inspector { grid-column: 1; grid-row: 3; max-height: 480px; padding: 14px 12px; }
  .case-editor-inspector > .case-editor-properties { width: 100%; }
  .case-editor-properties > label { flex-basis: calc(50% - 12px); }
  .case-editor-section-field-properties, .case-editor-element-properties { flex-basis: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-editor-element-properties > label:has([data-editor-element-select]) { grid-column: 1 / -1; }
  .case-editor-property-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-editor-properties input:not([type="checkbox"]), .case-editor-properties select, .case-editor-properties textarea, .case-editor-canvas-settings input:not([type="checkbox"]) { font-size: 16px; }
  .case-editor-preview { padding: 14px; }
}
@media (max-width: 400px) {
  .case-design-page-context { grid-template-columns: minmax(0, 1fr); }
  .case-design-page-context .button { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  .case-editor-component { transition: none; }
}

/* Technical levels are real tabs inside the escalation workspace. */
.escalation-workspace { min-width: 0; }
.escalation-workspace [hidden], .escalation-tier-panel[hidden] { display: none !important; }
.escalation-subtabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 5px;
  min-width: 0;
  margin: 0 0 18px;
  padding: 5px;
  border: 1px solid #dce7f1;
  border-radius: 8px;
  background: #f8fbff;
}
.escalation-subtab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #6b8299;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
}
.escalation-subtab:hover { background: #eef6ff; color: #286fa5; }
.escalation-subtab[aria-selected="true"], .escalation-subtab.active {
  border-color: #cce2f5;
  background: #e2f0fc;
  color: #166bac;
  font-weight: 650;
}
.escalation-subtab:focus-visible { position: relative; z-index: 1; box-shadow: var(--focus, 0 0 0 3px rgba(8, 118, 211, .2)); }
.escalation-subtab .icon { width: 16px; height: 16px; }
.escalation-tier-panel { min-width: 0; }
.escalation-tier-panel > :last-child { margin-bottom: 0; }

/* Inline attachments retain a download link and fit their comment column. */
.tier-comment-downloads { min-width: 0; }
.tier-comment-downloads li { min-width: 0; }
.tier-comment-downloads li:has(.tier-attachment-media) { flex-direction: column; align-items: stretch; gap: 8px; }
.tier-comment-downloads li > a { min-width: 0; }
.tier-comment-downloads li > .muted { flex-shrink: 0; font-size: 11px; }
.tier-attachment-media {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 4px 0 8px;
  overflow: hidden;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  background: #fff;
}
.tier-attachment-image, .tier-attachment-video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  background: #f1f5f9;
}
.tier-attachment-media figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-width: 0;
  padding: 9px 12px;
  border-top: 1px solid #e3ebf3;
  color: #657f97;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.tier-attachment-media figcaption > span, .tier-attachment-media figcaption > a { min-width: 0; max-width: 100%; }
.tier-attachment-media figcaption a { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.tier-attachment-media figcaption .icon { width: 15px; height: 15px; }

@media (max-width: 600px) {
  .escalation-subtabs { margin-bottom: 14px; gap: 3px; padding: 4px; }
  .escalation-subtab { min-height: 44px; gap: 4px; padding: 8px 5px; font-size: 11px; }
  .tier-comment-heading { gap: 5px; }
  .tier-comment-heading time { flex-basis: 100%; }
  .tier-comment-attachments input[type="file"] { width: 100%; min-width: 0; }
  .tier-comment-attachments .button, .tier-comment-submit .button { min-height: 40px; }
  .tier-comment-submit .button { width: 100%; }
  .tier-attachment-media figcaption { gap: 6px 10px; padding: 8px 10px; }
}
.case-editor-preview.is-mobile .escalation-subtabs { gap: 3px; padding: 4px; }
.case-editor-preview.is-mobile .escalation-subtab { min-height: 44px; gap: 4px; padding: 8px 5px; font-size: 11px; }
.case-editor-preview.is-mobile .tier-comment-heading time { flex-basis: 100%; }
.case-editor-preview.is-mobile .tier-comment-attachments input[type="file"] { width: 100%; min-width: 0; }
.case-editor-preview.is-mobile .tier-comment-submit .button { width: 100%; }

/* A comment draft preserves the order of text and inserted attachments. */
.tier-comment-composer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-width: 0;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid #d5e2ee;
  border-radius: 7px;
  background: #fff;
}
.tier-comment-composer:focus-within { border-color: var(--blue, #0876d3); box-shadow: var(--focus, 0 0 0 3px rgba(8, 118, 211, .2)); }
.tier-comment-composer.is-dragover { border-color: #4d9dd9; border-style: dashed; background: #eff7ff; }
.tier-comments-section .tier-comment-composer .tier-comment-text {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 90px;
  height: auto;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--body, #42566d);
  font: inherit;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  field-sizing: content;
  resize: vertical;
}
.tier-comment-composer .tier-comment-text::placeholder { color: #8b9daf; }
.tier-comment-composer .tier-comment-text:focus-visible { border-color: transparent; box-shadow: none; }
.tier-comment-composer[aria-busy="true"], .tier-comment-composer[aria-disabled="true"], .tier-comment-composer[disabled] { background: #f8fafc; }
.tier-comment-composer .tier-comment-text:disabled { color: #718598; cursor: progress; }
.tier-comment-draft-media {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #dfe8f1;
  border-radius: 7px;
  background: #fff;
}
.tier-comment-draft-preview {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  background: #f1f5f9;
}
.tier-comment-draft-media figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
  padding: 9px 12px;
  border-top: 1px solid #e3ebf3;
  color: #657f97;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.tier-comment-draft-media figcaption > span { flex: 1 1 140px; min-width: 0; }
.tier-comment-draft-media:not(:has(.tier-comment-draft-preview)) figcaption { border-top: 0; }
.tier-comment-draft-media [data-action="remove-comment-attachment"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 5px;
  min-height: 30px;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid #ecd1d7;
  border-radius: 5px;
  background: #fff;
  color: #ad5363;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: normal;
}
.tier-comment-draft-media [data-action="remove-comment-attachment"]:hover:not(:disabled) { border-color: #dfa6b2; background: #fff3f5; }
.tier-comment-draft-media [data-action="remove-comment-attachment"] .icon { width: 14px; height: 14px; }
.tier-comment > .tier-attachment-media { margin-top: 12px; margin-bottom: 12px; }

@media (max-width: 600px) {
  .tier-comment-composer { gap: 10px; padding: 8px; }
  .tier-comments-section .tier-comment-composer .tier-comment-text { padding: 8px; font-size: 16px; }
  .tier-comment-draft-media figcaption { gap: 8px; padding: 8px 10px; }
  .tier-comment-draft-media [data-action="remove-comment-attachment"] { min-height: 38px; }
}
.case-editor-preview.is-mobile .tier-comment-composer { gap: 10px; padding: 8px; }
.case-editor-preview.is-mobile .tier-comment-draft-media figcaption { gap: 8px; padding: 8px 10px; }
