:root {
  color-scheme: light;
  --ink: #20232c;
  --muted: #777d8a;
  --subtle: #a5aab4;
  --line: #e8e9ed;
  --canvas: #f5f6f8;
  --surface: #fff;
  --purple: #7058e8;
  --purple-dark: #5d46d2;
  --purple-soft: #f1efff;
  --mint: #39aa89;
  --danger: #c94c5a;
  font-family: "DM Sans", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.topbar {
  height: 72px;
  padding: 0 max(32px, calc((100vw - 1440px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, .86);
  border-bottom: 1px solid #eceef1;
}
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 29px; height: 29px; border-radius: 9px; background: var(--purple);
  display: flex; align-items: center; justify-content: center; gap: 2px; transform: rotate(-8deg);
}
.brand-mark span { width: 3px; border-radius: 4px; background: white; transform: rotate(8deg); }
.brand-mark span:nth-child(1) { height: 9px; opacity: .66; }
.brand-mark span:nth-child(2) { height: 15px; }
.brand-mark span:nth-child(3) { height: 11px; opacity: .8; }
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: -.7px; }
.brand-name span { margin-left: 5px; color: #979ba5; font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 19px; }
.connection-indicator { display: flex; align-items: center; gap: 8px; color: #737986; font-size: 12px; }
.indicator-dot, .footer-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px #e4f5f0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #edeaff; color: #6c56d6; font-size: 12px; font-weight: 700; }
.signed-in-user { max-width: 150px; overflow: hidden; color: #5a5f6c; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right form { margin: 0; }
.logout-button { padding: 7px 10px; border: 1px solid #e8e8ed; border-radius: 7px; background: white; color: #777d8a; font-size: 10px; }
.logout-button:hover { border-color: #d8d2f5; color: var(--purple); }

.page-content { width: min(1440px, 100%); margin: 0 auto; padding: 42px 40px 25px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 29px; }
.eyebrow, .section-kicker { margin: 0 0 9px; color: var(--purple); font-size: 10px; font-weight: 700; letter-spacing: 1.7px; }
.page-heading h1 { margin: 0; font-size: clamp(26px, 3vw, 35px); line-height: 1.24; letter-spacing: -1.25px; font-weight: 700; }
.page-subtitle { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.heading-badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 3px; padding: 9px 13px; border: 1px solid #e7e4fb; border-radius: 99px; background: #faf9ff; color: #6b5cae; font-size: 11px; font-weight: 600; }
.sparkle { color: #8b72f3; font-size: 14px; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr); align-items: start; gap: 21px; }
.panel { background: var(--surface); border: 1px solid #e9eaee; border-radius: 15px; box-shadow: 0 5px 22px rgba(27, 31, 45, .035); }
.editor-panel { padding: 27px 29px 23px; }
.result-panel { position: sticky; top: 20px; min-height: 610px; padding: 27px 25px 18px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.panel-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.35px; }
.section-kicker { margin-bottom: 6px; font-size: 9px; letter-spacing: 1.4px; }
.step-tag { padding: 6px 9px; border-radius: 6px; background: #f7f7fa; color: #858a95; font-size: 10px; white-space: nowrap; }
.step-tag span { color: var(--purple); font-weight: 700; margin-right: 4px; }
.form-block { margin-bottom: 23px; }
.field-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.field-heading label, .control-group > label { color: #30343e; font-size: 12px; font-weight: 600; }
.field-required { color: var(--purple); font-size: 10px; font-weight: 600; }
.field-optional, .inline-optional { color: #9a9eaa; font-size: 10px; font-weight: 400; }
.inline-optional { margin-left: 4px; }
textarea, input[type="text"], input[type="number"], select {
  width: 100%; border: 1px solid #e4e6eb; border-radius: 8px; outline: none; background: #fff; color: var(--ink);
  transition: border-color .16s ease, box-shadow .16s ease;
}
textarea { min-height: 127px; padding: 12px 13px; resize: vertical; font-size: 12px; line-height: 1.75; }
textarea::placeholder, input::placeholder { color: #b3b7c0; }
textarea:focus, input:focus, select:focus { border-color: #9d8bf3; box-shadow: 0 0 0 3px rgba(112, 88, 232, .1); }
.field-footnote { display: flex; justify-content: space-between; margin-top: 7px; color: #9a9eaa; font-size: 10px; }
.field-description { margin: 4px 0 0; color: #999eaa; font-size: 10px; font-weight: 400; }
.schema-tag { padding: 4px 7px; border-radius: 5px; background: #f3f0ff; color: #7564c6; font-size: 9px; font-weight: 600; }

.dropzone { min-height: 104px; border: 1px dashed #d9dbe3; border-radius: 9px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: #fcfcfd; cursor: pointer; transition: background .18s ease, border-color .18s ease; }
.dropzone:hover, .dropzone.is-dragging { background: #f8f6ff; border-color: #9a89ef; }
.dropzone.is-disabled { opacity: .55; cursor: not-allowed; }
.dropzone.is-disabled:hover, .dropzone.is-disabled.is-dragging { background: #fcfcfd; border-color: #d9dbe3; }
.topbar-link { color: #6e5bd0; font-size: 11px; font-weight: 600; text-decoration: none; }
.topbar-link:hover { text-decoration: underline; }
.library-pick-button { margin: 0 0 9px; padding: 0; border: 0; background: transparent; color: #6e5bd0; font-size: 10px; font-weight: 600; }
.library-pick-button:hover { text-decoration: underline; }
.library-pick-button:disabled { color: #a7a9b3; cursor: not-allowed; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; background: #f0edff; color: var(--purple); font-size: 19px; font-weight: 400; line-height: 1; }
.dropzone-copy { color: #858a95; font-size: 11px; }
.dropzone-copy strong { color: var(--purple); font-weight: 600; }
.dropzone-hint { color: #a3a7b0; font-size: 9px; }
.upload-block + .upload-block { margin-top: 22px; }
.upload-block .format-note { margin-top: 7px; }
.media-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 9px; margin-top: 10px; }
.media-card { display: grid; grid-template-columns: 54px minmax(0, 1fr) 20px; gap: 8px; align-items: start; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fafafd; }
.media-thumbnail, .media-icon { width: 54px; height: 54px; border-radius: 6px; background: #ece9fb; }
.media-thumbnail { object-fit: cover; }
.media-icon { display: grid; place-items: center; color: var(--purple); font-size: 10px; font-weight: 700; }
.media-card-main { min-width: 0; display: grid; gap: 5px; }
.media-filename { overflow: hidden; color: #454a56; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.media-state { overflow: hidden; color: #858a95; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.media-state-uploaded { color: #2a876b; }
.media-state-failed { color: var(--danger); }
.media-role-label { color: #777d8a; font-size: 9px; }
.media-role-select { width: 100%; height: 29px; margin-top: 3px; padding: 0 25px 0 8px; font-size: 10px; }
.media-remove { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: #e9e9ee; color: #666b76; font-size: 15px; line-height: 1; }
.media-retry { justify-self: start; padding: 2px 0; border: 0; background: transparent; color: var(--purple); font-size: 9px; }
.library-picker { width: min(560px, calc(100vw - 28px)); max-height: min(650px, calc(100vh - 28px)); padding: 20px; border: 1px solid #e4e0f4; border-radius: 13px; box-shadow: 0 20px 55px rgba(31, 29, 57, .2); }
.library-picker::backdrop { background: rgba(25, 24, 39, .48); }
.library-picker-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.library-picker-heading h2 { margin: 0 0 5px; font-size: 18px; }
.library-picker-heading p { margin: 0; color: #858a95; font-size: 11px; }
.library-picker-heading button { border: 0; background: transparent; color: #858a95; font-size: 23px; line-height: 1; }
.library-picker-message, .library-message { min-height: 18px; margin: 14px 0 8px; color: #858a95; font-size: 11px; }
.library-picker-list { display: grid; gap: 8px; max-height: 390px; overflow-y: auto; }
.library-picker-item { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid #e9e9ef; border-radius: 8px; }
.library-picker-item-copy { min-width: 0; flex: 1; display: grid; gap: 4px; }
.library-picker-item-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.library-picker-item-copy span { color: #9296a1; font-size: 9px; }
.library-picker-item button { flex: 0 0 auto; padding: 6px 9px; border: 1px solid #ddd7fa; border-radius: 6px; background: #f8f6ff; color: #6e5bd0; font-size: 10px; }
.library-picker-item button:disabled { color: #999ba4; background: #f5f5f6; cursor: default; }
.library-picker-link { display: inline-block; margin-left: 12px; color: #6e5bd0; font-size: 10px; }
.library-panel { padding: 24px; }
.library-page-heading { align-items: center; }
.library-create-link { display: inline-flex; align-items: center; text-decoration: none; }
.library-panel-heading { align-items: end; }
.library-filter-label { display: flex; align-items: center; gap: 8px; color: #858a95; font-size: 11px; }
.library-filter-label select { width: 105px; }
.library-file-list { display: grid; gap: 10px; }
.library-file { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 14px; border: 1px solid #e9e9ef; border-radius: 9px; background: #fdfdff; }
.library-file-icon { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 9px; background: #f0edff; color: #725dd8; font-size: 10px; font-weight: 700; }
.library-file-details { min-width: 0; flex: 1; display: grid; gap: 6px; }
.library-file-details strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.library-file-details span { overflow-wrap: anywhere; color: #9398a2; font-size: 10px; }
.library-file .secondary-button { flex: 0 0 auto; text-decoration: none; }
.library-more { margin-top: 16px; }

.parameters-block { margin-top: 26px; margin-bottom: 16px; padding-top: 19px; border-top: 1px solid #f0f0f3; }
.parameter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 14px; }
.control-group { min-width: 0; }
.control-group > label { display: block; margin-bottom: 7px; font-size: 11px; }
select, input[type="text"], input[type="number"] { height: 37px; padding: 0 10px; font-size: 11px; }
select { appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2.5 4.5 3.5 3 3.5-3' fill='none' stroke='%23868b96' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.option-row { display: flex; align-items: center; justify-content: space-between; margin: 17px 0; padding: 11px 12px; border: 1px solid #ececf0; border-radius: 8px; }
.toggle-copy { display: flex; flex-direction: column; gap: 3px; }
.toggle-title { color: #353944; font-size: 11px; font-weight: 600; }
.toggle-description { color: #969ba6; font-size: 9px; }
.switch { position: relative; display: inline-flex; width: 35px; height: 20px; cursor: pointer; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-track { width: 35px; height: 20px; border-radius: 99px; background: #d7d9df; transition: background .18s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.16); transition: transform .18s; }
.switch input:checked + .switch-track { background: var(--purple); }
.switch input:checked + .switch-track::after { transform: translateX(15px); }
.switch input:focus-visible + .switch-track { outline: 3px solid rgba(112, 88, 232, .2); }
.compact-grid { align-items: end; }
.advanced-settings { margin-top: 17px; border-top: 1px solid #f0f0f3; }
.advanced-settings summary { display: flex; justify-content: space-between; padding: 13px 1px 5px; color: #5b5f6b; cursor: pointer; list-style: none; font-size: 11px; font-weight: 600; }
.advanced-settings summary::-webkit-details-marker { display: none; }
.advanced-settings summary::after { content: "＋"; order: 1; color: var(--purple); font-size: 14px; font-weight: 400; }
.advanced-settings[open] summary::after { content: "−"; }
.summary-hint { margin-left: auto; margin-right: 9px; color: #a0a4ae; font-size: 9px; font-weight: 400; }
.advanced-grid { padding-top: 11px; }
.full-width { grid-column: 1 / -1; }
.compatibility-note { display: flex; gap: 6px; margin: 15px 0 0; color: #969aa4; font-size: 9px; line-height: 1.6; }
.format-note { margin: 0; color: #969aa4; font-size: 10px; line-height: 1.6; }
.compatibility-note span { color: #8f7ce8; }
.form-error { margin: 12px 0 0; padding: 10px 12px; border: 1px solid #f1d7db; border-radius: 7px; background: #fff8f9; color: var(--danger); font-size: 11px; }
.submit-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-top: 18px; border-top: 1px solid #f0f0f3; }
.submit-note { display: flex; align-items: center; gap: 6px; color: #9a9eaa; font-size: 9px; }
.secure-icon { color: #8b7ad8; font-size: 14px; }
.primary-button { display: inline-flex; align-items: center; gap: 25px; min-width: 147px; justify-content: space-between; padding: 11px 13px 11px 17px; border: 0; border-radius: 8px; background: var(--purple); color: white; font-size: 11px; font-weight: 600; box-shadow: 0 4px 10px rgba(112, 88, 232, .2); transition: background .16s, transform .16s, box-shadow .16s; }
.primary-button:hover { background: var(--purple-dark); transform: translateY(-1px); box-shadow: 0 6px 13px rgba(112, 88, 232, .25); }
.primary-button:disabled { cursor: wait; opacity: .68; transform: none; }
.button-arrow { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; background: rgba(255,255,255,.2); font-size: 13px; }

.history-section { margin-top: 25px; padding-top: 20px; border-top: 1px solid #f0f0f3; }
.history-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.history-heading h2 { margin: 0; font-size: 15px; }
.history-heading .section-kicker { margin-bottom: 5px; }
.history-heading .text-button { font-size: 10px; }
.task-history { display: grid; gap: 7px; }
.history-empty { margin: 0; padding: 16px 12px; border: 1px dashed #e6e6eb; border-radius: 8px; color: #969ba6; text-align: center; font-size: 10px; }
.history-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 10px 11px; border: 1px solid #ededef; border-radius: 8px; background: #fdfdfe; color: inherit; text-align: left; }
.history-item:hover, .history-item[aria-current="true"] { border-color: #dcd6f8; background: #faf9ff; }
.history-item-copy { min-width: 0; }
.history-item-prompt { display: block; overflow: hidden; color: #555b67; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.history-item-date { display: block; margin-top: 4px; color: #a0a4ae; font-size: 8px; }
.history-item-status { padding: 4px 6px; border-radius: 99px; background: #f2f0fc; color: #7567bd; font-size: 8px; white-space: nowrap; }

.result-heading { margin-bottom: 20px; }
.empty-state { min-height: 443px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 5px 16px 16px; text-align: center; }
.empty-illustration { position: relative; width: 177px; height: 147px; margin-bottom: 19px; display: grid; place-items: center; }
.empty-frame { position: relative; z-index: 1; width: 108px; height: 76px; display: grid; place-items: center; border: 1px solid #dcd7f7; border-radius: 13px; background: linear-gradient(140deg, #f8f7ff, #efecff); box-shadow: 0 13px 27px rgba(106, 88, 213, .12); transform: rotate(-5deg); }
.empty-frame::before, .empty-frame::after { content: ""; position: absolute; width: 20px; height: 20px; border: 1px solid #d9d4f4; border-radius: 6px; background: #fbfaff; }
.empty-frame::before { top: -8px; left: 11px; }
.empty-frame::after { right: -8px; bottom: 9px; }
.play-symbol { z-index: 2; display: grid; place-items: center; width: 29px; height: 29px; padding-left: 2px; border: 1px solid #ddd7ff; border-radius: 50%; background: white; color: #846ff0; font-size: 10px; }
.empty-frame i, .empty-frame b { position: absolute; bottom: 11px; z-index: 2; width: 5px; border-radius: 5px; background: #b6a9fc; }
.empty-frame i { left: 33px; height: 9px; }
.empty-frame b { left: 43px; height: 14px; }
.orbit { position: absolute; border: 1px solid #e8e4fc; border-radius: 50%; transform: rotate(-25deg); }
.orbit-one { width: 152px; height: 63px; }
.orbit-two { width: 125px; height: 105px; transform: rotate(30deg); }
.star { position: absolute; color: #9a86f1; }
.star-one { top: 22px; right: 19px; font-size: 18px; }
.star-two { bottom: 20px; left: 20px; color: #c3b8fa; font-size: 16px; }
.empty-state h3, .busy-result h3 { margin: 0; color: #363a45; font-size: 14px; }
.empty-state > p, .busy-result p { max-width: 270px; margin: 8px 0 0; color: #9196a1; font-size: 10px; line-height: 1.7; }
.empty-steps { display: flex; gap: 7px; margin-top: 24px; }
.empty-steps span { display: flex; align-items: center; gap: 5px; padding: 6px 8px; border-radius: 5px; background: #f8f8fa; color: #838893; font-size: 8px; }
.empty-steps b { width: 14px; height: 14px; display: grid; place-items: center; border-radius: 50%; background: #efedfb; color: #7968cb; font-size: 8px; }
.result-content { padding-bottom: 3px; }
.task-status-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #eeecf7; border-radius: 99px; background: #faf9ff; color: #7062b5; font-size: 9px; font-weight: 600; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #907bee; }
.status-pill[data-state="succeeded"] { border-color: #d8eee7; background: #f3fbf8; color: #318b70; }
.status-pill[data-state="succeeded"] .status-dot { background: #43aa8b; }
.status-pill[data-state="failed"], .status-pill[data-state="busy"], .status-pill[data-state="auth_required"] { border-color: #f2dfe1; background: #fff8f9; color: #b85862; }
.status-pill[data-state="failed"] .status-dot, .status-pill[data-state="busy"] .status-dot, .status-pill[data-state="auth_required"] .status-dot { background: #d36d77; }
.status-pill[data-state="checking"] .status-dot { animation: pulse 1.1s infinite; }
.updated-label { color: #a1a5af; font-size: 9px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(144, 123, 238, .18); } }
.checking-banner { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 10px; border-radius: 7px; background: #f8f7ff; color: #7469a7; font-size: 9px; line-height: 1.5; }
.loading-spinner { width: 12px; height: 12px; flex: 0 0 12px; border: 1.5px solid #d8d1ff; border-top-color: #7d68e9; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.video-wrap { overflow: hidden; margin: 0 0 12px; border-radius: 9px; background: #171821; }
.video-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 72px; padding: 14px; color: #b8b8c3; font-size: 10px; }
.video-actions .secondary-button { display: inline-flex; align-items: center; text-decoration: none; }
.video-close-button { padding: 8px 0; border: 0; background: transparent; color: #d2ccff; font-size: 10px; }
.video-wrap video { display: block; width: 100%; max-height: 360px; aspect-ratio: 16 / 9; background: #15161d; }
.video-error { margin: 0; padding: 9px 11px; background: #fff5f6; color: #b85862; font-size: 9px; }
.task-message { margin: 0 0 12px; color: #777d88; font-size: 10px; line-height: 1.6; }
.task-error { margin: 0 0 12px; padding: 9px 10px; border-radius: 6px; background: #fff6f7; color: #ae4f5a; font-size: 9px; line-height: 1.6; overflow-wrap: anywhere; }
.task-detail-card { padding: 13px; border: 1px solid #ededef; border-radius: 8px; background: #fdfdfe; }
.detail-label { color: #a0a4ae; font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.task-id { margin-top: 5px; color: #525764; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; overflow-wrap: anywhere; }
.detail-divider { height: 1px; margin: 11px 0; background: #eeeef1; }
.task-prompt { display: -webkit-box; margin: 6px 0 0; overflow: hidden; color: #565b66; font-size: 10px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.metadata-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 10px; margin-top: 11px; }
.metadata-item { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.metadata-item span:first-child { color: #a0a4ae; font-size: 8px; }
.metadata-item span:last-child { overflow: hidden; color: #555b67; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.result-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.secondary-button { padding: 8px 11px; border: 1px solid #e2def9; border-radius: 6px; background: #f8f6ff; color: #6e5bd0; font-size: 10px; font-weight: 600; }
.secondary-button:hover { background: #f0edff; }
.text-button { padding: 7px 0; border: 0; background: transparent; color: #858a95; font-size: 10px; }
.text-button:hover { color: var(--purple); }
.busy-result { min-height: 430px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.busy-icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 15px; border-radius: 50%; background: #fff5e9; color: #d29642; font-size: 24px; }
.result-footer { display: flex; align-items: center; gap: 7px; margin: 13px 0 0; padding-top: 12px; border-top: 1px solid #f0f0f3; color: #a0a4ae; font-size: 8px; line-height: 1.5; }
.footer-dot { width: 5px; height: 5px; flex: 0 0 5px; box-shadow: none; }
.page-footer { display: flex; justify-content: space-between; margin-top: 18px; color: #a2a6af; font-size: 8px; letter-spacing: .35px; }
.page-footer span:last-child { letter-spacing: 1px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1040px) {
  .page-content { padding-right: 26px; padding-left: 26px; }
  .workspace-grid { grid-template-columns: minmax(0, 1.1fr) minmax(330px, .9fr); gap: 15px; }
  .editor-panel { padding-right: 22px; padding-left: 22px; }
  .result-panel { padding-right: 19px; padding-left: 19px; }
}
@media (max-width: 800px) {
  .topbar { height: 63px; padding: 0 20px; }
  .page-content { padding: 31px 20px 23px; }
  .page-heading { align-items: flex-start; }
  .heading-badge { display: none; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .result-panel { position: static; min-height: 0; }
  .empty-state { min-height: 330px; }
}
@media (max-width: 480px) {
  .topbar { padding: 0 15px; }
  .connection-indicator { font-size: 10px; }
  .topbar-right { gap: 8px; }
  .signed-in-user { display: none; }
  .page-content { padding: 26px 13px 20px; }
  .page-heading { margin-bottom: 21px; }
  .page-heading h1 { font-size: 27px; }
  .page-subtitle { font-size: 11px; }
  .editor-panel, .result-panel { padding: 21px 16px 18px; border-radius: 12px; }
  .panel-heading { margin-bottom: 21px; }
  .parameter-grid { gap: 12px 9px; }
  .submit-row { align-items: flex-start; flex-direction: column; }
  .primary-button { width: 100%; }
  .empty-steps { gap: 4px; }
  .empty-steps span { padding: 6px; font-size: 7px; }
  .page-footer { font-size: 7px; }
}
