:root {
  color-scheme: light;
  --canvas: #f4f6f2;
  --surface: #ffffff;
  --surface-subtle: #e9eee8;
  --surface-raised: #ffffff;
  --ink: #18201c;
  --muted: #526159;
  --faint: #738078;
  --line: #c9d2cb;
  --line-strong: #9daaa1;
  --accent: #246b42;
  --accent-hover: #185531;
  --accent-soft: #dceade;
  --success: #247247;
  --warning: #8a5a12;
  --danger: #a63832;
  --danger-soft: #f8e6e3;
  --focus: 0 0 0 3px rgba(36, 107, 66, .22);
  --overlay-shadow: 0 12px 32px rgba(24, 32, 28, .14);
  --sidebar-width: 232px;
  --font: "IBM Plex Sans", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #101512;
  --surface: #171d19;
  --surface-subtle: #202923;
  --surface-raised: #1b231e;
  --ink: #edf2ed;
  --muted: #a7b2aa;
  --faint: #849087;
  --line: #344038;
  --line-strong: #536158;
  --accent: #65a879;
  --accent-hover: #7ebb8f;
  --accent-soft: #243e2c;
  --success: #75b789;
  --warning: #d9aa5c;
  --danger: #e07d75;
  --danger-soft: #472825;
  --focus: 0 0 0 3px rgba(101, 168, 121, .3);
  --overlay-shadow: 0 18px 42px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.6; }
button, input, select, textarea { font: inherit; }
button, a, select, input, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

:focus-visible { outline: none; box-shadow: var(--focus); }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-140%); padding: 8px 12px; border-radius: 8px; background: var(--ink); color: var(--surface); text-decoration: none; }
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 22px 14px 14px; border-right: 1px solid var(--line); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 11px; min-height: 44px; margin: 0 6px 29px; text-decoration: none; }
.brand > span:last-child { display: grid; line-height: 1.2; }
.brand strong { font-size: 15px; letter-spacing: .055em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.brand-mark { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--accent); color: #fff; font-weight: 700; }
.brand-mark.large { width: 46px; height: 46px; margin-bottom: 22px; border-radius: 12px; font-size: 20px; }
.primary-nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 40px; padding: 8px 11px; border: 0; border-left: 3px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.nav-item > span { width: 16px; color: var(--faint); font-size: 16px; text-align: center; }
.nav-item:hover { background: var(--canvas); color: var(--ink); }
.nav-item.is-active { border-left-color: var(--accent); background: var(--surface-subtle); color: var(--ink); }
.nav-item.is-active > span { color: var(--accent); }
.nav-count { min-width: 19px; margin-left: auto; padding: 1px 5px; border-radius: 99px; background: var(--accent); color: #fff; font: 600 11px/17px var(--font); text-align: center; }
.sidebar-spacer { flex: 1; }
.service-ledger { display: flex; align-items: flex-start; gap: 10px; margin-top: 13px; padding: 13px 10px 4px; border-top: 1px solid var(--line); }
.service-ledger > span:last-child { display: grid; min-width: 0; }
.service-ledger strong { font-size: 12px; font-weight: 600; }
.service-ledger small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.service-dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--warning); }
.service-dot.online { background: var(--success); }
.service-dot.offline { background: var(--danger); }

.workspace { grid-column: 2; min-width: 0; }
.top-actions { position: relative; }
.user-popover { position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; min-width: 156px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 16px 36px rgba(9,11,10,.14); }
.user-popover a, .user-popover button { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); font: 500 12px/1.4 inherit; text-align: left; text-decoration: none; cursor: pointer; }
.user-popover a:hover, .user-popover button:hover { background: var(--surface-subtle); }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; min-height: 68px; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 3vw, 42px); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.breadcrumb span { color: var(--muted); }
.breadcrumb span::after { content: "/"; margin-left: 8px; color: var(--line-strong); }
.breadcrumb b { font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.icon-button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-button:hover { border-color: var(--line); background: var(--surface-subtle); color: var(--ink); }
.mobile-menu { display: none; }
.user-menu { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 4px 7px; border: 0; border-radius: 9px; background: transparent; text-align: left; cursor: pointer; }
.user-menu > span:last-child { display: grid; line-height: 1.2; }
.user-menu strong { max-width: 150px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.user-menu small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.avatar { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: var(--surface-subtle); color: var(--accent); font-size: 12px; font-weight: 700; }

main { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 43px 0 86px; }
.view { animation: view-in 180ms cubic-bezier(.2, 0, 0, 1); }
@keyframes view-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 30px; }
.page-heading h1 { margin: 2px 0 7px; font-size: clamp(28px, 3vw, 38px); font-weight: 600; letter-spacing: -.025em; line-height: 1.08; }
.page-heading > div > p:last-child { max-width: 680px; margin: 0; color: var(--muted); }
.eyebrow, .panel-label { margin: 0; color: var(--accent); font: 700 10px/1.4 var(--mono); letter-spacing: .13em; }
.compact-field { display: grid; flex: 0 0 218px; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 600; }

input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); }
input, select { min-height: 42px; padding: 0 11px; }
textarea { min-height: 118px; padding: 10px 11px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--accent); }
label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
label small { color: var(--faint); font-size: 11px; font-weight: 400; line-height: 1.5; }

.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 0 16px; border: 1px solid transparent; border-radius: 9px; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.button.primary { background: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-hover); }
.button.secondary { border-color: var(--line); background: var(--surface); color: var(--ink); }
.button.secondary:hover, .button.ghost:hover { border-color: var(--line-strong); background: var(--surface-subtle); }
.button.ghost { background: transparent; color: var(--muted); }
.button.danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); background: transparent; color: var(--danger); }
.button:disabled { cursor: not-allowed; opacity: .55; }

.operational-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 37px; border-block: 1px solid var(--line); }
.operational-strip > div { display: grid; gap: 2px; padding: 15px 18px; border-right: 1px solid var(--line); }
.operational-strip > div:first-child { padding-left: 0; }
.operational-strip > div:last-child { border-right: 0; }
.operational-strip span { color: var(--muted); font-size: 11px; }
.operational-strip strong { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.section-heading h2 { margin: 0; font-size: 17px; font-weight: 600; }
.section-heading p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.loading-row, .empty-state { padding: 35px 0; border-block: 1px solid var(--line); color: var(--muted); text-align: center; }
.catalog-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.search-field { width: min(420px, 100%); }
.kind-filters { display: flex; gap: 7px; }
.project-list, .run-list { border-top: 1px solid var(--line); }
.app-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.app-list > .loading-row, .app-list > .empty-state { grid-column: 1 / -1; }
.app-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 17px; align-items: start; min-height: 178px; padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.app-row:hover { border-color: var(--line-strong); box-shadow: 0 8px 24px color-mix(in srgb, var(--ink) 7%, transparent); }
.app-row > .button { grid-column: 1 / -1; justify-self: start; }
.app-icon { display: grid; width: 45px; height: 45px; place-items: center; border-radius: 10px; background: var(--surface-subtle); color: var(--accent); font: 700 17px/1 var(--mono); }
.app-copy h3 { margin: 0; font-size: 15px; font-weight: 600; }
.app-copy p { max-width: 700px; margin: 4px 0 7px; color: var(--muted); font-size: 13px; }
.app-meta { display: flex; gap: 9px; color: var(--faint); font: 500 10px/1.4 var(--mono); }

.inline-editor { margin-bottom: 24px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-subtle); }
.inline-editor > div:first-child { display: grid; grid-template-columns: 1fr 1.5fr; gap: 14px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.project-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; min-height: 82px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.project-row h3 { margin: 0; font-size: 15px; font-weight: 600; }
.project-row p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.project-actions { display: flex; align-items: center; gap: 7px; }
.text-button { border: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 600; cursor: pointer; }
.text-button:hover { text-decoration: underline; }
.text-button.danger { color: var(--danger); }

.run-filters { display: flex; gap: 7px; margin-bottom: 17px; }
.filter-chip, .status-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 600; }
button.filter-chip { cursor: pointer; }
.filter-chip:hover, .filter-chip.is-active { border-color: var(--line-strong); background: var(--surface-subtle); color: var(--ink); }
.status-chip.running, .status-chip.queued { background: var(--accent-soft); color: var(--accent); }
.status-chip.succeeded { background: var(--accent-soft); color: var(--success); }
.status-chip.failed, .status-chip.cancelled { background: var(--danger-soft); color: var(--danger); }
.run-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; padding: 18px 4px; border-bottom: 1px solid var(--line); }
.run-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.run-title h3 { margin: 0; font-size: 14px; font-weight: 600; }
.run-detail { margin: 7px 0 0; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.run-detail code { font-family: var(--mono); }
.progress-track { width: min(520px, 100%); height: 4px; margin-top: 13px; overflow: hidden; border-radius: 99px; background: var(--surface-subtle); }
.progress-track span { display: block; height: 100%; background: var(--accent); }
.run-error { margin: 9px 0 0; color: var(--danger); font-size: 12px; }
.run-actions { display: flex; align-items: center; gap: 7px; }
.run-actions .button { min-height: 34px; padding-inline: 11px; font-size: 11px; }

.library-toolbar { display: flex; align-items: end; gap: 18px; margin-bottom: 20px; padding: 14px 0; border-block: 1px solid var(--line); }
.library-toolbar > label { width: min(240px, 100%); }
.library-toolbar > .work-search { width: min(320px, 100%); }
.library-status { margin-left: auto; color: var(--muted); font-size: 12px; }
.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.media-grid > .loading-row, .media-grid > .empty-state { grid-column: 1 / -1; }
.load-more-row { display: flex; justify-content: center; padding: 20px 0 8px; }
.media-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.media-preview { position: relative; display: grid; width: 100%; aspect-ratio: 16 / 10; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--surface-subtle); }
.media-preview-button { padding: 0; border: 0; color: inherit; cursor: pointer; }
.media-preview-button:disabled { cursor: progress; }
.media-preview-button:disabled::after { display: none; }
.media-preview-button::after { position: absolute; inset: 50% auto auto 50%; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.6); border-radius: 50%; background: rgba(0,0,0,.52); color: #fff; content: "▶"; font-size: 15px; line-height: 42px; text-align: center; transform: translate(-50%, -50%); }
.media-preview-button.image::after { content: "⤢"; }
.media-preview img, .media-preview video { width: 100%; height: 100%; object-fit: cover; }
.media-preview video { background: #090b0a; }
.media-preview audio { width: calc(100% - 24px); }
.media-symbol { color: var(--faint); font: 700 11px/1 var(--mono); letter-spacing: .1em; }
.media-symbol.error { color: var(--danger); }
.media-loading { padding: 16px; color: var(--muted); font-size: 11px; text-align: center; }
.media-loading.error { color: var(--danger); }
.media-copy { padding: 14px; }
.media-copy h3 { margin: 0; overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.media-copy p { min-height: 34px; margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.media-actions { display: flex; gap: 11px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.media-actions .text-button { padding: 0; }
.delete-confirmation { padding: 15px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.delete-confirmation span, .delete-confirmation p { display: block; margin: 0; color: var(--muted); font-size: 12px; }
.delete-confirmation strong { display: block; margin: 5px 0 8px; overflow-wrap: anywhere; }
.work-preview-dialog { width: min(1080px, calc(100vw - 32px)); max-width: none; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); }
.work-preview-dialog::backdrop { background: rgba(9,11,10,.72); backdrop-filter: blur(5px); }
.work-preview-shell > header { display: flex; justify-content: space-between; align-items: flex-start; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.work-preview-shell h2 { margin: 3px 0 0; font-size: 16px; }
.work-preview-stage { display: grid; min-height: 260px; max-height: calc(100vh - 140px); place-items: center; background: #090b0a; }
.work-preview-stage video, .work-preview-stage img { display: block; max-width: 100%; max-height: calc(100vh - 140px); }
.work-preview-stage audio { width: min(720px, calc(100% - 32px)); }

.notice-panel, .endpoint-panel, .key-panel { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.notice-panel { max-width: 760px; padding: 27px; }
.notice-panel h2 { margin: 0 0 8px; font-size: 18px; }
.notice-panel p, .notice-panel li { color: var(--muted); }
.notice-panel ul { margin: 17px 0 0; padding-left: 20px; }
.notice-panel > .button { margin-top: 20px; }
.api-layout { display: grid; gap: 26px; }
.endpoint-panel { padding: 23px; }
.endpoint-panel > p:last-child { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.endpoint-panel code { font-family: var(--mono); }
.copy-field { display: grid; grid-template-columns: 1fr auto; margin-top: 9px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--canvas); }
.copy-field code { padding: 11px 12px; overflow: auto; color: var(--ink); white-space: nowrap; }
.copy-field button { border: 0; border-left: 1px solid var(--line); background: var(--surface); color: var(--accent); font-size: 12px; font-weight: 600; cursor: pointer; }
.key-panel { padding: 23px; }
.key-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 15px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.key-row h3 { margin: 0; font-size: 13px; }
.key-row p { margin: 3px 0 0; color: var(--muted); font: 400 11px/1.5 var(--mono); }

.auth-screen { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 22px; background: var(--canvas); }
.auth-panel { width: min(430px, 100%); }
.auth-panel h1 { margin: 4px 0 9px; font-size: 30px; font-weight: 600; letter-spacing: -.025em; }
.auth-panel > p:not(.eyebrow) { color: var(--muted); }
.guest-view { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 32px; }
.guest-card { width: min(560px, 100%); padding: clamp(26px, 5vw, 48px); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 24px 60px rgba(9,11,10,.08); }
.guest-card h1 { margin: 12px 0; font-size: clamp(30px, 5vw, 48px); line-height: 1.08; letter-spacing: -.035em; }
.guest-card > p:not(.eyebrow) { max-width: 48ch; color: var(--muted); line-height: 1.7; }
.guest-card .button { min-height: 44px; margin-top: 24px; }
.guest-card .guest-note { margin-top: 16px; font-size: 12px; }
.auth-progress { height: 3px; margin-top: 25px; overflow: hidden; border-radius: 99px; background: var(--surface-subtle); }
.auth-progress span { display: block; width: 35%; height: 100%; background: var(--accent); animation: auth-progress 1.2s ease-in-out infinite alternate; }
@keyframes auth-progress { to { transform: translateX(185%); } }
#api-key-login { display: grid; gap: 14px; margin-top: 25px; }

dialog { width: min(680px, calc(100% - 30px)); max-height: calc(100vh - 32px); margin: auto; padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-raised); color: var(--ink); box-shadow: var(--overlay-shadow); }
dialog::backdrop { background: rgba(16, 21, 18, .38); backdrop-filter: blur(2px); }
.dialog-shell { display: grid; gap: 21px; margin: 0; padding: 24px; }
.dialog-shell > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.dialog-shell h2 { margin: 2px 0 5px; font-size: 22px; font-weight: 600; }
.dialog-shell header p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.dialog-shell > footer { display: flex; justify-content: flex-end; gap: 8px; padding-top: 17px; border-top: 1px solid var(--line); }
.runner-project { padding: 14px; border-radius: 9px; background: var(--surface-subtle); }
.dynamic-fields { display: grid; gap: 16px; }
.dynamic-fields details { border-top: 1px solid var(--line); padding-top: 12px; }
.dynamic-fields summary { color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.field-file { padding: 12px; border: 1px dashed var(--line-strong); border-radius: 9px; background: var(--canvas); }
.field-file input { padding: 8px; border: 0; background: transparent; }
.checkbox-field { display: flex; align-items: center; gap: 9px; }
.checkbox-field input { width: 18px; min-height: 18px; }
fieldset { display: grid; gap: 9px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 9px; }
legend { padding: 0 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.scope-option { display: grid; grid-template-columns: 18px 1fr; gap: 9px; align-items: start; }
.scope-option input { width: 18px; min-height: 18px; }
.scope-option span { display: grid; color: var(--ink); font-size: 12px; }
.scope-option small { color: var(--muted); font-size: 10px; font-weight: 400; }
.secret-value { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.secret-value code { padding: 12px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; background: var(--canvas); font: 12px/1.5 var(--mono); white-space: nowrap; user-select: all; }
.form-message { min-height: 20px; margin: 0; color: var(--muted); font-size: 12px; }
.form-message.error { color: var(--danger); }
.form-message.success { color: var(--success); }
#workflow-preflight-details { display: grid; gap: 4px; margin-top: 8px; color: var(--muted); font-size: 12px; }
#workflow-preflight-details h3 { margin: 5px 0 0; color: var(--ink); font-size: 12px; }
#workflow-preflight-details ul { margin: 0; padding-left: 20px; }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; }
.toast { max-width: 340px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-raised); color: var(--ink); box-shadow: var(--overlay-shadow); font-size: 12px; }

@media (max-width: 900px) {
  .app-shell { display: block; }
  .workspace { min-width: 0; }
  .sidebar { transform: translateX(-102%); transition: transform 220ms cubic-bezier(.2, 0, 0, 1); box-shadow: var(--overlay-shadow); }
  .sidebar.is-open { transform: translateX(0); }
  .mobile-menu { display: grid; }
  .breadcrumb { margin-right: auto; margin-left: 10px; }
  main { width: min(100% - 34px, 760px); padding-top: 30px; }
  .operational-strip { grid-template-columns: repeat(2, 1fr); }
  .operational-strip > div:nth-child(2) { border-right: 0; }
  .operational-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .operational-strip > div:first-child, .operational-strip > div:nth-child(3) { padding-left: 0; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .topbar { min-height: 60px; padding: 0 14px; }
  .user-menu > span:last-child { display: none; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 16px; margin-bottom: 23px; }
  .page-heading h1 { font-size: 28px; }
  .compact-field { width: 100%; flex-basis: auto; }
  .section-heading { align-items: flex-start; }
  .catalog-tools, .library-toolbar { align-items: stretch; flex-direction: column; }
  .kind-filters { overflow-x: auto; }
  .library-status { margin-left: 0; }
  .app-list, .media-grid { grid-template-columns: 1fr; }
  .app-row { grid-template-columns: 40px minmax(0, 1fr); }
  .app-icon { width: 39px; height: 39px; }
  .app-row > .button { grid-column: 2; width: max-content; }
  .inline-editor > div:first-child { grid-template-columns: 1fr; }
  .project-row, .run-row { grid-template-columns: 1fr; gap: 11px; }
  .project-actions, .run-actions { justify-content: flex-start; }
  .run-filters { overflow-x: auto; }
  .secret-value { grid-template-columns: 1fr; }
  .dialog-shell { padding: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
