:root {
  font-family: var(--toolbox-font, Inter, ui-sans-serif, system-ui, sans-serif);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--toolbox-background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
select,
input[type='checkbox'],
input[type='file'] {
  accent-color: var(--toolbox-accent);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid var(--toolbox-focus);
  outline-offset: 2px;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.toolbox-shell__main {
  min-width: 0;
}

.av-app {
  width: 100%;
  display: grid;
  gap: 1rem;
  padding-block: 1rem 2.75rem;
  color: var(--toolbox-text);
}

.av-app h2,
.av-app h3,
.av-app p {
  margin-block-start: 0;
}

.av-app h2 {
  margin-block-end: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.av-app h3 {
  margin: 1.1rem 0 0.65rem;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.eyebrow {
  margin: 0 0 0.22rem;
  color: var(--toolbox-muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}

.panel {
  min-width: 0;
  border: 1px solid var(--toolbox-border);
  border-radius: calc(var(--toolbox-radius) + 0.25rem);
  background: var(--toolbox-surface);
  box-shadow: 0 8px 25px rgb(24 34 68 / 5%);
}

.panel__header {
  min-height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.88rem 1rem;
  border-bottom: 1px solid var(--toolbox-border);
}

.panel__header > span:not(.privacy-badge) {
  min-width: 1.75rem;
  min-height: 1.75rem;
  display: inline-grid;
  place-items: center;
  padding-inline: 0.45rem;
  border-radius: 999px;
  background: var(--toolbox-surface-soft);
  color: var(--toolbox-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.button,
.icon-action,
.text-button,
.segmented button,
.inspector__tabs button,
.timeline-clip__main,
.timeline-clip__actions button {
  border: 0;
  cursor: pointer;
}

.button {
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.58rem 0.86rem;
  border: 1px solid transparent;
  border-radius: var(--toolbox-radius);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
}

.button svg {
  width: 1rem;
  height: 1rem;
}

.button--primary {
  border-color: var(--toolbox-accent);
  background: var(--toolbox-accent);
  color: var(--toolbox-accent-contrast);
}

.button--primary:hover:not(:disabled) {
  border-color: var(--toolbox-accent-hover);
  background: var(--toolbox-accent-hover);
}

.button--secondary {
  border-color: var(--toolbox-border);
  background: var(--toolbox-surface);
  color: var(--toolbox-accent);
}

.button--secondary:hover:not(:disabled),
.button--quiet:hover:not(:disabled) {
  border-color: color-mix(
    in srgb,
    var(--toolbox-accent) 35%,
    var(--toolbox-border)
  );
  background: var(--toolbox-accent-soft);
}

.button--quiet {
  min-height: 2.25rem;
  border-color: transparent;
  background: transparent;
  color: var(--toolbox-muted);
}

.button--large {
  min-height: 2.9rem;
  padding-inline: 1.1rem;
  font-size: 0.84rem;
}

.button--danger {
  border-color: color-mix(
    in srgb,
    var(--toolbox-danger) 35%,
    var(--toolbox-border)
  );
  background: color-mix(
    in srgb,
    var(--toolbox-danger) 8%,
    var(--toolbox-surface)
  );
  color: var(--toolbox-danger);
}

.icon-action {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-grid;
  flex: none;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 0.58rem;
  background: transparent;
  color: var(--toolbox-muted);
}

.icon-action svg {
  width: 1rem;
  height: 1rem;
}

.icon-action:hover:not(:disabled) {
  border-color: var(--toolbox-border);
  background: var(--toolbox-surface-soft);
  color: var(--toolbox-danger);
}

.workspace-toolbar {
  min-height: 3.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.48rem;
  border: 1px solid var(--toolbox-border);
  border-radius: calc(var(--toolbox-radius) + 0.12rem);
  background: color-mix(
    in srgb,
    var(--toolbox-surface) 88%,
    var(--toolbox-background)
  );
}

.segmented {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.18rem;
  border: 1px solid var(--toolbox-border);
  border-radius: var(--toolbox-radius);
  background: var(--toolbox-surface-soft);
}

.segmented button {
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.42rem 0.82rem;
  border-radius: calc(var(--toolbox-radius) - 0.16rem);
  background: transparent;
  color: var(--toolbox-muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.segmented button svg {
  width: 0.95rem;
  height: 0.95rem;
}

.segmented button.is-active {
  background: var(--toolbox-surface);
  color: var(--toolbox-accent);
  box-shadow: 0 2px 8px rgb(24 34 68 / 9%);
}

.segmented--compact {
  width: calc(100% - 2rem);
  margin: 1rem 1rem 0;
}

.segmented--compact button {
  flex: 1;
}

.project-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.project-actions > span {
  max-width: 15rem;
  padding-inline: 0.65rem;
  overflow: hidden;
  color: var(--toolbox-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-notice {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.65rem 0.85rem;
  border: 1px solid
    color-mix(in srgb, var(--toolbox-accent) 20%, var(--toolbox-border));
  border-radius: var(--toolbox-radius);
  background: var(--toolbox-accent-soft);
  color: var(--toolbox-accent);
  font-size: 0.76rem;
}

.project-notice svg {
  width: 1rem;
  height: 1rem;
  flex: none;
}

.waveform-progress {
  display: grid;
  grid-template-columns: auto minmax(10rem, auto) minmax(8rem, 1fr) auto;
}

.waveform-progress progress {
  width: 100%;
}

.quick-workspace {
  display: grid;
  grid-template-columns:
    minmax(15rem, 0.78fr)
    minmax(21rem, 1.25fr)
    minmax(18rem, 0.92fr);
  align-items: start;
  gap: 1rem;
}

.quick-workspace__source {
  min-width: 0;
  display: grid;
  gap: 1rem;
}

.drop-zone {
  min-height: 13.3rem;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.8rem;
  padding: 1.3rem;
  border: 1.5px dashed
    color-mix(in srgb, var(--toolbox-accent) 28%, var(--toolbox-border));
  border-radius: calc(var(--toolbox-radius) + 0.25rem);
  background:
    radial-gradient(
      circle at 50% 15%,
      color-mix(in srgb, var(--toolbox-accent-soft) 70%, transparent),
      transparent 56%
    ),
    var(--toolbox-surface);
  text-align: center;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.drop-zone--active {
  border-color: var(--toolbox-accent);
  background-color: var(--toolbox-accent-soft);
  transform: translateY(-2px);
}

.drop-zone__icon {
  width: 3.1rem;
  height: 3.1rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: var(--toolbox-accent-soft);
  color: var(--toolbox-accent);
}

.drop-zone__icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.drop-zone strong,
.drop-zone span {
  display: block;
}

.drop-zone strong {
  font-size: 0.9rem;
}

.drop-zone span {
  max-width: 24rem;
  margin-top: 0.25rem;
  color: var(--toolbox-muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.drop-zone--compact {
  min-height: auto;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: initial;
  justify-items: start;
  gap: 0.6rem 0.75rem;
  margin: 0.75rem;
  padding: 0.75rem;
  text-align: left;
}

.drop-zone--compact .drop-zone__icon {
  width: 2.5rem;
  height: 2.5rem;
  grid-row: 1 / 3;
  border-radius: 0.72rem;
}

.drop-zone--compact .button {
  grid-column: 2;
}

.quick-media .media-list,
.media-panel .media-list {
  max-height: 22rem;
  overflow: auto;
}

.media-list {
  display: grid;
  gap: 0.28rem;
  margin: 0;
  padding: 0.55rem;
  list-style: none;
}

.media-list li {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.media-card {
  min-width: 0;
  min-height: 4.25rem;
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  background: transparent;
  color: var(--toolbox-text);
  text-align: left;
  cursor: pointer;
}

.media-card:hover,
.media-card--selected {
  border-color: var(--toolbox-border);
  background: var(--toolbox-surface-soft);
}

.media-card--selected {
  border-color: color-mix(
    in srgb,
    var(--toolbox-accent) 34%,
    var(--toolbox-border)
  );
  box-shadow: inset 3px 0 0 var(--toolbox-accent);
}

.media-card__type,
.source-summary__icon {
  width: 2.45rem;
  height: 2.45rem;
  display: grid;
  flex: none;
  place-items: center;
  border-radius: 0.65rem;
  background: var(--toolbox-accent-soft);
  color: var(--toolbox-accent);
}

.media-card__type svg,
.source-summary__icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.media-card__content {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.media-card__content strong,
.media-card__content small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-card__content strong {
  font-size: 0.75rem;
}

.media-card__content small {
  color: var(--toolbox-muted);
  font-size: 0.63rem;
}

.phase {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--toolbox-muted);
}

.phase::before {
  width: 0.42rem;
  height: 0.42rem;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  content: '';
}

.phase--ready {
  color: #2c7d63 !important;
}

.phase--probing {
  color: #8b6a20 !important;
}

.phase--error {
  color: var(--toolbox-danger) !important;
}

.media-bin__empty {
  min-height: 9rem;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.55rem;
  padding: 1rem;
  color: var(--toolbox-muted);
  font-size: 0.74rem;
  text-align: center;
}

.media-bin__empty svg {
  width: 1.5rem;
  height: 1.5rem;
  opacity: 0.6;
}

.quick-panel {
  overflow: hidden;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--toolbox-muted);
  font-size: 0.64rem;
  font-weight: 700;
  white-space: nowrap;
}

.privacy-badge > span,
.status-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #2f9b75;
  box-shadow: 0 0 0 3px rgb(47 155 117 / 13%);
}

.source-summary {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 1rem 1rem 0;
  padding: 0.65rem;
  border: 1px solid var(--toolbox-border);
  border-radius: var(--toolbox-radius);
  background: var(--toolbox-surface-soft);
}

.source-summary > div {
  min-width: 0;
  display: grid;
  flex: 1;
  gap: 0.12rem;
}

.source-summary strong,
.source-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-summary strong {
  font-size: 0.75rem;
}

.source-summary span {
  color: var(--toolbox-muted);
  font-size: 0.64rem;
}

.panel-empty {
  min-height: 6rem;
  display: grid;
  place-items: center;
  margin: 1rem;
  padding: 1rem;
  border: 1px dashed var(--toolbox-border);
  border-radius: var(--toolbox-radius);
  color: var(--toolbox-muted);
  font-size: 0.75rem;
  text-align: center;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 1rem;
}

.field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 0.3rem;
}

.field > span,
.stream-picker legend,
.subpanel legend {
  color: var(--toolbox-muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.field input,
.field select,
.chapter-list input,
.subtitle-list select,
.subtitle-list input:not([type='checkbox']) {
  width: 100%;
  min-width: 0;
  min-height: 2.45rem;
  border: 1px solid var(--toolbox-border);
  border-radius: 0.55rem;
  padding: 0.5rem 0.62rem;
  background: var(--toolbox-surface);
  color: var(--toolbox-text);
  font-size: 0.75rem;
}

.field input:hover,
.field select:hover {
  border-color: color-mix(
    in srgb,
    var(--toolbox-accent) 35%,
    var(--toolbox-border)
  );
}

.field small {
  min-height: 1.2em;
  color: var(--toolbox-muted);
  font-size: 0.62rem;
  line-height: 1.4;
}

.field--wide {
  grid-column: 1 / -1;
}

.check-field,
.switch-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--toolbox-text);
  font-size: 0.7rem;
  font-weight: 650;
}

.check-field input,
.switch-field input {
  width: 1rem;
  height: 1rem;
  flex: none;
  margin: 0;
}

.stream-picker,
.subpanel {
  min-width: 0;
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding: 0.7rem;
  border: 1px solid var(--toolbox-border);
  border-radius: 0.65rem;
}

.stream-picker label {
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.42rem;
  border-radius: 0.45rem;
  font-size: 0.67rem;
}

.stream-picker label:hover {
  background: var(--toolbox-surface-soft);
}

.stream-picker label:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.72;
}

.stream-picker label small {
  display: block;
  margin-block-start: 0.12rem;
  color: var(--toolbox-warning, #a96700);
  font-size: 0.58rem;
  line-height: 1.35;
}

.stream-picker p {
  margin: 0;
  color: var(--toolbox-muted);
  font-size: 0.68rem;
}

.stream-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.14rem 0.35rem;
  border-radius: 999px;
  background: var(--toolbox-accent-soft);
  color: var(--toolbox-accent);
  font-size: 0.55rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.65rem 1rem;
  padding: 0.65rem 0.72rem;
  border: 1px solid var(--toolbox-border);
  border-radius: 0.6rem;
  font-size: 0.68rem;
  line-height: 1.45;
}

.notice svg {
  width: 1rem;
  height: 1rem;
  flex: none;
  margin-top: 0.02rem;
}

.notice--warning {
  border-color: #d5bc78;
  background: color-mix(in srgb, #d5bc78 12%, var(--toolbox-surface));
  color: color-mix(in srgb, #9b6d00 76%, var(--toolbox-text));
}

.notice--error {
  border-color: color-mix(
    in srgb,
    var(--toolbox-danger) 35%,
    var(--toolbox-border)
  );
  background: color-mix(
    in srgb,
    var(--toolbox-danger) 7%,
    var(--toolbox-surface)
  );
  color: var(--toolbox-danger);
}

.notice > div {
  display: grid;
  gap: 0.15rem;
}

.notice > div span {
  color: inherit;
}

.quick-panel__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--toolbox-border);
  background: var(--toolbox-surface-soft);
}

.quick-panel__footer > div {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.quick-panel__footer strong {
  overflow: hidden;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-panel__footer span {
  color: var(--toolbox-muted);
  font-size: 0.6rem;
}

.quick-preview,
.preview-panel {
  overflow: hidden;
}

.preview {
  min-width: 0;
}

.preview__stage {
  min-height: 16rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgb(255 255 255 / 2%) 25%, transparent 25%),
    linear-gradient(-45deg, rgb(255 255 255 / 2%) 25%, transparent 25%), #111722;
  background-position:
    0 0,
    8px 8px;
  background-size: 16px 16px;
}

.preview__stage video,
.preview__stage img {
  width: 100%;
  max-height: 25rem;
  display: block;
  object-fit: contain;
}

.preview__caption {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.75rem;
  border-top: 1px solid var(--toolbox-border);
  color: var(--toolbox-muted);
  font-size: 0.62rem;
  line-height: 1.4;
}

.preview__caption > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.preview-proxy-controls {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) repeat(2, minmax(7rem, auto)) auto;
  align-items: end;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  border-top: 1px solid var(--toolbox-border);
  background: var(--toolbox-surface-soft);
}

.preview-proxy-controls--audio {
  grid-template-columns: minmax(12rem, 1fr) minmax(7rem, auto) auto;
}

.preview-proxy-controls > div,
.preview-proxy-controls label {
  min-width: 0;
  display: grid;
  gap: 0.18rem;
}

.preview-proxy-controls strong {
  font-size: 0.67rem;
}

.preview-proxy-controls span {
  color: var(--toolbox-muted);
  font-size: 0.58rem;
  line-height: 1.35;
}

.preview-proxy-controls input,
.preview-proxy-controls select {
  min-height: 2.2rem;
  padding: 0.38rem 0.5rem;
  border: 1px solid var(--toolbox-border);
  border-radius: calc(var(--toolbox-radius) - 0.2rem);
  background: var(--toolbox-surface);
  color: var(--toolbox-text);
  font: inherit;
  font-size: 0.65rem;
}

.text-button {
  padding: 0;
  background: transparent;
  color: var(--toolbox-accent);
  font-size: inherit;
  font-weight: 750;
  text-align: right;
}

.preview-empty {
  min-height: 18.75rem;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1rem;
  padding: 1.5rem;
  color: var(--toolbox-muted);
  font-size: 0.72rem;
  text-align: center;
}

.preview-empty__graphic {
  position: relative;
  width: 7rem;
  height: 4.4rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--toolbox-border);
  border-radius: 0.8rem;
  background: var(--toolbox-surface-soft);
}

.preview-empty__graphic::before,
.preview-empty__graphic::after,
.preview-empty__graphic span {
  position: absolute;
  inset: 0.45rem;
  border: 1px solid var(--toolbox-border);
  border-radius: 0.5rem;
  content: '';
}

.preview-empty__graphic::before {
  transform: rotate(-5deg) translate(-0.45rem, -0.25rem);
}

.preview-empty__graphic::after {
  transform: rotate(4deg) translate(0.45rem, -0.15rem);
}

.preview-empty__graphic svg {
  z-index: 1;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--toolbox-accent);
}

.audio-preview {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  padding: 2rem 1rem;
}

.audio-preview__disc {
  width: 7rem;
  height: 7rem;
  display: grid;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 50%;
  background:
    radial-gradient(circle, #111722 0 13%, #5a6a87 14% 16%, transparent 17%),
    repeating-radial-gradient(circle, #303b4e 0 3px, #1c2432 4px 7px);
  color: #dfe7fa;
  box-shadow: 0 18px 30px rgb(0 0 0 / 28%);
}

.audio-preview__disc svg {
  width: 1.5rem;
  height: 1.5rem;
}

.audio-preview__waveform {
  --audio-waveform-background: #101b22;
  --audio-waveform-wave: #6fd7ca;
  --audio-waveform-center: rgb(255 255 255 / 22%);
  position: relative;
  width: min(100%, 32rem);
  height: 7rem;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: calc(var(--toolbox-radius) - 0.15rem);
  background: var(--audio-waveform-background);
  box-shadow: 0 18px 30px rgb(0 0 0 / 20%);
}

.audio-preview__waveform canvas {
  width: 100%;
  height: 7rem;
  display: block;
}

.audio-preview__playhead {
  position: absolute;
  inset-block: 0;
  width: 2px;
  transform: translateX(-1px);
  background: var(--toolbox-accent);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 24%);
  pointer-events: none;
}

.audio-preview audio {
  width: min(100%, 32rem);
}

.preview-unsupported {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  color: #d7deec;
  font-size: 0.72rem;
}

.preview-unsupported svg {
  width: 2rem;
  height: 2rem;
}

.preview-unsupported small {
  max-width: 30rem;
  color: #aeb9cb;
  line-height: 1.45;
  text-align: center;
}

.job-panel {
  overflow: hidden;
}

.job-panel__queue-count {
  flex: none;
  padding: 0.36rem 0.55rem;
  border: 1px solid var(--toolbox-border);
  border-radius: 999px;
  color: var(--toolbox-accent);
  font-size: 0.64rem;
  font-weight: 800;
}

.job-panel__body {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
}

.job-queue-note {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--toolbox-border);
  border-radius: calc(var(--toolbox-radius) - 0.15rem);
  background: var(--toolbox-surface-soft);
  color: var(--toolbox-muted);
  font-size: 0.63rem;
  line-height: 1.45;
}

.job-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem 1rem;
}

.job-progress > div {
  display: grid;
  gap: 0.12rem;
}

.job-progress strong {
  font-size: 0.76rem;
}

.job-progress span {
  color: var(--toolbox-muted);
  font-size: 0.63rem;
}

.job-progress > span {
  color: var(--toolbox-accent);
  font-size: 0.75rem;
  font-weight: 800;
}

.job-progress progress,
.job-record progress,
.load-stage progress {
  width: 100%;
  height: 0.48rem;
  grid-column: 1 / -1;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--toolbox-surface-soft);
}

.job-history {
  display: grid;
  gap: 0.55rem;
}

.job-history > header,
.job-record__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.job-history h3 {
  margin: 0;
  font-size: 0.72rem;
}

.job-history__list {
  display: grid;
  gap: 0.45rem;
}

.job-record {
  display: grid;
  gap: 0.4rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--toolbox-border);
  border-radius: calc(var(--toolbox-radius) - 0.15rem);
  background: var(--toolbox-surface-soft);
}

.job-record__summary > div {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.job-record__summary strong,
.job-record__summary span,
.job-record details,
.job-record__error {
  font-size: 0.62rem;
}

.job-record__summary span,
.job-record details {
  color: var(--toolbox-muted);
}

.job-record__summary b {
  margin-left: auto;
  color: var(--toolbox-accent);
  font-size: 0.68rem;
}

.job-record progress {
  width: 100%;
  height: 0.35rem;
}

.job-record__error {
  color: var(--toolbox-danger);
}

.job-record details ol {
  display: grid;
  gap: 0.25rem;
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.job-record details li {
  padding-left: 0.1rem;
}

.job-record details li span:last-child {
  float: right;
}

progress::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--toolbox-surface-soft);
}

progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--toolbox-accent);
}

progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--toolbox-accent);
}

.result-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem;
  border: 1px solid color-mix(in srgb, #2f9b75 30%, var(--toolbox-border));
  border-radius: var(--toolbox-radius);
  background: color-mix(in srgb, #2f9b75 6%, var(--toolbox-surface));
}

.result-list {
  display: grid;
  gap: 0.55rem;
}

.result-select-all {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--toolbox-muted);
  font-size: 0.63rem;
  font-weight: 700;
}

.result-card__select {
  flex: none;
}

.result-card.is-selected {
  box-shadow: 0 0 0 2px
    color-mix(in srgb, var(--toolbox-accent) 30%, transparent);
}

.result-card__warning {
  color: var(--toolbox-warning, #a96700);
  font-size: 0.62rem;
  line-height: 1.4;
}

.result-card__range {
  color: var(--toolbox-text);
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.result-card__icon {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: #2f9b75;
  color: white;
}

.result-card__icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

.result-card > div {
  min-width: 0;
  display: grid;
  flex: 1;
  gap: 0.1rem;
}

.result-card strong {
  overflow: hidden;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-card span {
  color: var(--toolbox-muted);
  font-size: 0.63rem;
}

.result-verification {
  margin-top: 0.35rem;
  color: var(--toolbox-muted);
  font-size: 0.6rem;
}

.result-verification summary {
  cursor: pointer;
  font-weight: 750;
}

.result-verification dl {
  display: grid;
  gap: 0.25rem;
  margin: 0.35rem 0 0;
}

.result-verification dl > div {
  display: grid;
  grid-template-columns: minmax(5rem, 0.3fr) minmax(0, 1fr);
  gap: 0.35rem;
}

.result-verification dt {
  font-weight: 750;
}

.result-verification dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.diagnostics,
.inline-details {
  min-width: 0;
  border: 1px solid var(--toolbox-border);
  border-radius: 0.55rem;
  background: var(--toolbox-surface-soft);
}

.diagnostics summary,
.inline-details summary {
  padding: 0.58rem 0.68rem;
  color: var(--toolbox-muted);
  font-size: 0.65rem;
  font-weight: 750;
  cursor: pointer;
}

.diagnostics pre {
  max-height: 18rem;
  margin: 0;
  padding: 0.7rem;
  overflow: auto;
  border-top: 1px solid var(--toolbox-border);
  color: var(--toolbox-text);
  font:
    0.62rem/1.55 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.capability-panel {
  border: 1px solid var(--toolbox-border);
  border-radius: var(--toolbox-radius);
  background: var(--toolbox-surface);
}

.capability-panel > summary {
  min-height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
}

.capability-panel > summary > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 750;
}

.capability-panel summary svg {
  width: 1rem;
  height: 1rem;
  color: var(--toolbox-accent);
}

.engine-pill {
  padding: 0.24rem 0.5rem;
  border-radius: 999px;
  background: var(--toolbox-surface-soft);
  color: var(--toolbox-muted);
  font-size: 0.6rem;
  font-weight: 750;
}

.engine-pill--ready {
  background: color-mix(in srgb, #2f9b75 12%, var(--toolbox-surface));
  color: #2f8064;
}

.engine-pill--running,
.engine-pill--loading {
  background: var(--toolbox-accent-soft);
  color: var(--toolbox-accent);
}

.engine-pill--error {
  color: var(--toolbox-danger);
}

.capability-panel__body {
  display: grid;
  grid-template-columns: minmax(12rem, 0.5fr) minmax(0, 2fr);
  gap: 0.85rem 1rem;
  padding: 0.85rem;
  border-top: 1px solid var(--toolbox-border);
}

.capability-panel__body > label {
  display: grid;
  gap: 0.3rem;
  color: var(--toolbox-muted);
  font-size: 0.65rem;
  font-weight: 750;
}

.capability-panel__body select {
  min-height: 2.4rem;
  border: 1px solid var(--toolbox-border);
  border-radius: 0.55rem;
  padding: 0.45rem 0.6rem;
  background: var(--toolbox-surface);
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0;
}

.capability-grid > div {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
  padding: 0.55rem;
  border-radius: 0.55rem;
  background: var(--toolbox-surface-soft);
}

.capability-grid dt {
  color: var(--toolbox-muted);
  font-size: 0.57rem;
  font-weight: 750;
}

.capability-grid dd {
  margin: 0;
  overflow: hidden;
  font-size: 0.66rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capability-panel__body > .notice,
.load-stage {
  grid-column: 1 / -1;
  margin: 0;
}

.capability-limits,
.capability-build,
.capability-error {
  grid-column: 1 / -1;
}

.capability-limits {
  display: grid;
  gap: 0.55rem;
  padding-top: 0.15rem;
}

.capability-limits__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.capability-limits__heading h3 {
  margin: 0;
  font-size: 0.68rem;
}

.capability-limits__heading span,
.capability-limits > p {
  margin: 0;
  color: var(--toolbox-muted);
  font-size: 0.6rem;
}

.capability-grid--limits {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.capability-build,
.capability-error > details {
  border: 1px solid var(--toolbox-border);
  border-radius: 0.55rem;
  background: var(--toolbox-surface-soft);
}

.capability-build > summary,
.capability-error > details > summary {
  padding: 0.55rem;
  color: var(--toolbox-muted);
  font-size: 0.62rem;
  font-weight: 750;
  cursor: pointer;
}

.capability-build pre,
.capability-error pre {
  max-height: 14rem;
  margin: 0;
  padding: 0.65rem;
  overflow: auto;
  border-top: 1px solid var(--toolbox-border);
  color: var(--toolbox-text);
  font:
    0.6rem/1.5 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.capability-error {
  display: grid;
  justify-items: start;
  gap: 0.6rem;
}

.capability-error > .notice {
  width: 100%;
  margin: 0;
}

.capability-error > .notice span {
  display: grid;
  gap: 0.12rem;
}

.capability-error > dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin: 0;
}

.capability-error > dl > div {
  display: flex;
  gap: 0.35rem;
  font-size: 0.62rem;
}

.capability-error dt {
  color: var(--toolbox-muted);
  font-weight: 750;
}

.capability-error dd {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.storage-panel__body {
  display: grid;
  gap: 0.8rem;
  padding: 0.85rem;
  border-top: 1px solid var(--toolbox-border);
}

.cache-list {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cache-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--toolbox-border);
  border-radius: 0.55rem;
  color: var(--toolbox-muted);
  font-size: 0.65rem;
}

.storage-panel__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.storage-panel__actions > span {
  color: var(--toolbox-muted);
  font-size: 0.65rem;
}

.load-stage {
  display: grid;
  gap: 0.35rem;
  color: var(--toolbox-muted);
  font-size: 0.65rem;
}

.edit-grid {
  min-width: 0;
  display: grid;
  grid-template-columns:
    minmax(13rem, 0.75fr)
    minmax(22rem, 1.7fr)
    minmax(18rem, 1fr);
  align-items: start;
  gap: 1rem;
}

.mobile-edit-drawer-controls,
.mobile-edit-drawer__close {
  display: none;
}

.mobile-edit-drawer__header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.media-panel,
.preview-panel,
.inspector {
  min-width: 0;
  min-height: 34rem;
}

.media-panel {
  overflow: hidden;
}

.preview-panel .preview__stage {
  min-height: 28rem;
}

.inspector {
  overflow: hidden;
}

.inspector__tabs {
  display: flex;
  gap: 0.1rem;
  padding: 0.45rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--toolbox-border);
  scrollbar-width: thin;
}

.inspector__tabs button {
  flex: none;
  padding: 0.42rem 0.5rem;
  border-radius: 0.42rem;
  background: transparent;
  color: var(--toolbox-muted);
  font-size: 0.59rem;
  font-weight: 750;
}

.inspector__tabs button:hover,
.inspector__tabs button.is-active {
  background: var(--toolbox-accent-soft);
  color: var(--toolbox-accent);
}

.inspector__body {
  max-height: 29rem;
  overflow: auto;
}

.inspector-section {
  display: grid;
  gap: 0.65rem;
  padding: 0.8rem;
}

.inspector-section h3 {
  margin: 0.45rem 0 0;
}

.inspector-file {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem;
  border-radius: 0.65rem;
  background: var(--toolbox-surface-soft);
}

.inspector-file > span {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  flex: none;
  place-items: center;
  border-radius: 0.6rem;
  background: var(--toolbox-accent-soft);
  color: var(--toolbox-accent);
}

.inspector-file svg {
  width: 1.05rem;
  height: 1.05rem;
}

.inspector-file > div {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.inspector-file strong,
.inspector-file small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-file strong {
  font-size: 0.7rem;
}

.inspector-file small {
  color: var(--toolbox-muted);
  font-size: 0.6rem;
}

.detail-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.detail-list > div {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--toolbox-border);
  font-size: 0.65rem;
}

.detail-list dt {
  color: var(--toolbox-muted);
}

.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.inspector-streams,
.chapter-list,
.subtitle-list {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.inspector-streams li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem;
  border: 1px solid var(--toolbox-border);
  border-radius: 0.55rem;
}

.inspector-streams li > div {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.inspector-streams strong {
  font-size: 0.64rem;
}

.inspector-streams small {
  color: var(--toolbox-muted);
  font-size: 0.58rem;
  overflow-wrap: anywhere;
}

.inline-details ul {
  margin: 0;
  padding: 0.2rem 1.8rem 0.65rem;
  color: var(--toolbox-muted);
  font-size: 0.62rem;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.section-intro {
  margin: 0;
  color: var(--toolbox-muted);
  font-size: 0.64rem;
  line-height: 1.5;
}

.chapter-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, 4.5rem);
  gap: 0.35rem;
}

.chapter-list__actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 0.2rem;
}

.chapter-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.stream-tag-list {
  display: grid;
  gap: 0.1rem;
  margin: 0.25rem 0 0;
}

.stream-tag-list > div {
  display: grid;
  grid-template-columns: minmax(3rem, 0.4fr) minmax(0, 1fr);
  gap: 0.35rem;
  font-size: 0.56rem;
}

.stream-tag-list dt {
  color: var(--toolbox-muted);
}

.stream-tag-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.source-chapter-list {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding-left: 1.25rem;
}

.source-chapter-list li {
  padding-left: 0.2rem;
  font-size: 0.62rem;
}

.source-chapter-list small {
  display: block;
  color: var(--toolbox-muted);
}

.chapter-list input,
.subtitle-list select,
.subtitle-list input:not([type='checkbox']) {
  min-height: 2.2rem;
  font-size: 0.65rem;
}

.subtitle-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(7rem, auto);
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border: 1px solid var(--toolbox-border);
  border-radius: 0.55rem;
}

.subtitle-list li > div {
  grid-column: 1 / -1;
}

.subtitle-list li > input:not([type='checkbox']),
.subtitle-list li > label:not(.check-field) {
  grid-column: 1 / -1;
}

.subtitle-list li > div {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.subtitle-list strong {
  overflow: hidden;
  font-size: 0.64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subtitle-list small {
  color: var(--toolbox-muted);
  font-size: 0.57rem;
}

.file-button {
  position: relative;
  width: fit-content;
}

.timeline-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--toolbox-border);
  border-radius: calc(var(--toolbox-radius) + 0.2rem);
  background: var(--toolbox-surface);
}

.timeline-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--toolbox-border);
}

.timeline-panel > header > span {
  color: var(--toolbox-muted);
  font-size: 0.65rem;
}

.timeline-track {
  min-height: 8.7rem;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.75rem;
  overflow-x: auto;
  background:
    linear-gradient(
      to bottom,
      transparent 49%,
      color-mix(in srgb, var(--toolbox-border) 65%, transparent) 50%,
      transparent 51%
    ),
    var(--toolbox-surface-soft);
}

.timeline-empty {
  min-height: 7rem;
  display: grid;
  place-items: center;
  padding: 1rem;
  color: var(--toolbox-muted);
  font-size: 0.7rem;
}

.timeline-clip {
  width: 11.5rem;
  min-width: 11.5rem;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--toolbox-border);
  border-radius: 0.65rem;
  background: var(--toolbox-surface);
  box-shadow: 0 3px 12px rgb(24 34 68 / 7%);
}

.timeline-clip.is-selected {
  border-color: var(--toolbox-accent);
  box-shadow: 0 0 0 2px var(--toolbox-accent-soft);
}

.timeline-clip__main {
  min-width: 0;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: transparent;
  color: var(--toolbox-text);
  text-align: left;
}

.timeline-clip__thumb {
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 0.45rem;
  background: #192231;
  color: #dfe6f5;
}

.timeline-clip__thumb svg {
  width: 1rem;
  height: 1rem;
}

.timeline-clip__main > span:last-child {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.timeline-clip__main strong,
.timeline-clip__main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-clip__main strong {
  font-size: 0.63rem;
}

.timeline-clip__main small {
  color: var(--toolbox-muted);
  font-size: 0.56rem;
}

.timeline-clip__controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.45rem;
  border-top: 1px solid var(--toolbox-border);
  background: var(--toolbox-surface-soft);
}

.timeline-clip__controls label {
  display: grid;
  gap: 0.15rem;
  color: var(--toolbox-muted);
  font-size: 0.52rem;
  font-weight: 750;
}

.timeline-clip__controls input {
  width: 100%;
  min-width: 0;
  height: 1.8rem;
  border: 1px solid var(--toolbox-border);
  border-radius: 0.35rem;
  padding: 0.25rem;
  background: var(--toolbox-surface);
  font-size: 0.58rem;
}

.timeline-clip__actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 0.2rem;
}

.timeline-clip__actions button {
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: 0.35rem;
  background: var(--toolbox-surface);
  color: var(--toolbox-muted);
}

.timeline-clip__actions .timeline-clip__reset {
  width: auto;
  padding-inline: 0.45rem;
  font-size: 0.55rem;
  font-weight: 750;
}

.timeline-clip__actions button:hover:not(:disabled) {
  color: var(--toolbox-accent);
}

.timeline-clip__actions svg {
  width: 0.78rem;
  height: 0.78rem;
}

.edit-export {
  display: grid;
  overflow: hidden;
}

.edit-export > header,
.edit-export > footer {
  padding: 1rem;
}

.edit-export > header {
  border-bottom: 1px solid var(--toolbox-border);
}

.edit-export > header h2 {
  margin-block-start: 0.2rem;
}

.edit-export > header p:last-child,
.edit-export > footer p {
  max-width: 48rem;
  margin: 0.35rem 0 0;
  color: var(--toolbox-muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.edit-export__settings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 1rem;
  background: var(--toolbox-surface-soft);
}

.edit-export__settings .field:first-child,
.edit-export__settings .field:nth-child(2) {
  grid-column: span 2;
}

.edit-export__audio-toggle {
  align-self: end;
  min-height: 2.55rem;
}

.edit-export > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--toolbox-border);
}

.edit-export > footer > div {
  min-width: min(100%, 16rem);
  display: grid;
  gap: 0.35rem;
}

.edit-export > footer small {
  color: var(--toolbox-danger);
  font-size: 0.62rem;
  line-height: 1.35;
}

.modal {
  width: min(44rem, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  overflow: visible;
  border: 1px solid var(--toolbox-border);
  border-radius: 1rem;
  background: var(--toolbox-surface);
  color: var(--toolbox-text);
  box-shadow: 0 30px 90px rgb(0 0 0 / 35%);
}

.modal::backdrop {
  background: rgb(10 14 25 / 58%);
  backdrop-filter: blur(6px);
}

.modal__panel {
  max-height: calc(100vh - 2rem);
  display: grid;
  overflow: auto;
  border-radius: inherit;
}

.modal__panel > header,
.modal__panel > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
}

.modal__panel > header {
  border-bottom: 1px solid var(--toolbox-border);
}

.modal__panel > footer {
  border-top: 1px solid var(--toolbox-border);
}

.modal__panel > footer a {
  color: var(--toolbox-accent);
  font-size: 0.72rem;
  font-weight: 750;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 1.15rem;
}

.help-grid section {
  position: relative;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--toolbox-border);
  border-radius: 0.75rem;
  background: var(--toolbox-surface-soft);
}

.help-grid h3 {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.78rem;
}

.help-grid p {
  margin: 0;
  color: var(--toolbox-muted);
  font-size: 0.66rem;
  line-height: 1.55;
}

.about-licenses {
  display: grid;
  gap: 0.85rem;
  margin: 0 1.15rem 1.15rem;
  padding: 1rem;
  border: 1px solid var(--toolbox-border);
  border-radius: 0.8rem;
  background: var(--toolbox-surface-soft);
}

.about-licenses > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.about-licenses > header h3 {
  margin: 0.1rem 0 0;
  font-size: 0.88rem;
}

.about-licenses > header > span {
  flex: none;
  padding: 0.3rem 0.48rem;
  border: 1px solid var(--toolbox-border);
  border-radius: 999px;
  color: var(--toolbox-muted);
  font-size: 0.58rem;
  font-weight: 750;
}

.about-version-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0;
}

.about-version-grid > div {
  min-width: 0;
  display: grid;
  gap: 0.14rem;
  padding: 0.58rem;
  border: 1px solid var(--toolbox-border);
  border-radius: 0.55rem;
  background: var(--toolbox-surface);
}

.about-version-grid dt {
  color: var(--toolbox-muted);
  font-size: 0.54rem;
}

.about-version-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.65rem;
  font-weight: 750;
}

.about-license-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 0.55rem;
}

.about-license-grid > section {
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid var(--toolbox-border);
  border-radius: 0.6rem;
  background: var(--toolbox-surface);
}

.about-license-grid h4 {
  margin: 0 0 0.35rem;
  font-size: 0.67rem;
}

.about-license-grid p,
.about-license-grid li {
  color: var(--toolbox-muted);
  font-size: 0.59rem;
  line-height: 1.5;
}

.about-license-grid p {
  margin: 0;
}

.about-license-grid p strong {
  color: var(--toolbox-text);
}

.about-license-grid ul {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding-left: 1.1rem;
}

.about-license-grid li a {
  display: inline-block;
  margin-left: 0.35rem;
}

.about-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  margin-top: 0.55rem;
}

.about-license-grid a,
.about-link-list a {
  color: var(--toolbox-accent);
  font-size: 0.58rem;
  font-weight: 750;
}

.step-number {
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  border-radius: 0.55rem;
  background: var(--toolbox-accent);
  color: var(--toolbox-accent-contrast);
  font-size: 0.68rem;
  font-weight: 850;
}

.privacy-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0 1.15rem 1.15rem;
  padding: 0.85rem;
  border: 1px solid color-mix(in srgb, #2f9b75 28%, var(--toolbox-border));
  border-radius: 0.7rem;
  background: color-mix(in srgb, #2f9b75 7%, var(--toolbox-surface));
}

.privacy-callout > svg {
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
  color: #2f9b75;
}

.privacy-callout > div {
  display: grid;
  gap: 0.2rem;
}

.privacy-callout strong {
  font-size: 0.72rem;
}

.privacy-callout p {
  margin: 0;
  color: var(--toolbox-muted);
  font-size: 0.64rem;
  line-height: 1.45;
}

.fatal-error {
  width: min(40rem, calc(100% - 2rem));
  margin: 3rem auto;
  padding: 2rem;
  border: 1px solid var(--toolbox-border);
  border-radius: 1rem;
  background: var(--toolbox-surface);
  color: var(--toolbox-text);
  box-shadow: var(--toolbox-shadow);
}

.fatal-error h1 {
  font-size: 1.5rem;
}

.fatal-error > p:not(.eyebrow) {
  color: var(--toolbox-muted);
}

.fatal-error button {
  min-height: 2.5rem;
  padding: 0.5rem 0.8rem;
  border: 0;
  border-radius: var(--toolbox-radius);
  background: var(--toolbox-accent);
  color: var(--toolbox-accent-contrast);
  font-weight: 750;
}

@media (max-width: 76rem) {
  .quick-workspace {
    grid-template-columns: minmax(14rem, 0.65fr) minmax(21rem, 1fr);
  }

  .quick-preview {
    grid-column: 1 / -1;
  }

  .quick-preview .preview__stage {
    min-height: 24rem;
  }

  .edit-grid {
    grid-template-columns: minmax(13rem, 0.7fr) minmax(22rem, 1.5fr);
  }

  .inspector {
    min-height: auto;
    grid-column: 1 / -1;
  }

  .inspector__body {
    max-height: none;
  }
}

@media (max-width: 48rem) {
  .av-app {
    padding-block-start: 0.65rem;
  }

  .workspace-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .project-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .project-actions > span {
    max-width: none;
    grid-column: 1 / -1;
    padding-block: 0.35rem;
  }

  .quick-workspace,
  .edit-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-edit-drawer-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  .mobile-edit-drawer-controls .button {
    width: 100%;
  }

  .mobile-edit-drawer__close {
    display: grid;
  }

  .edit-grid > .mobile-edit-drawer {
    display: none;
  }

  .edit-grid > .mobile-edit-drawer.is-open {
    position: fixed;
    z-index: 120;
    inset: 0.75rem;
    width: auto;
    min-height: 0;
    max-height: calc(100dvh - 1.5rem);
    display: block;
    overflow: auto;
    overscroll-behavior: contain;
    box-shadow: 0 24px 80px rgb(5 10 24 / 52%);
  }

  .edit-grid > .inspector.is-open {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .edit-grid > .inspector.is-open .inspector__body {
    min-height: 0;
    max-height: none;
  }

  .quick-preview,
  .inspector {
    grid-column: auto;
  }

  .preview-panel {
    min-height: auto;
    grid-row: 1;
  }

  .preview-panel .preview__stage,
  .quick-preview .preview__stage {
    min-height: 14rem;
  }

  .media-panel {
    min-height: auto;
  }

  .quick-panel__footer,
  .edit-export > footer,
  .result-card {
    align-items: stretch;
    flex-direction: column;
  }

  .preview-proxy-controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .preview-proxy-controls > div,
  .preview-proxy-controls > button {
    grid-column: 1 / -1;
  }

  .preview-proxy-controls > button {
    width: 100%;
  }

  .quick-panel__footer .button,
  .edit-export > footer .button,
  .result-card .button {
    width: 100%;
  }

  .result-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .result-card .button {
    grid-column: 1 / -1;
  }

  .capability-panel__body,
  .capability-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .help-grid,
  .about-license-grid {
    grid-template-columns: 1fr;
  }

  .about-version-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid > * {
    grid-column: auto;
  }

  .edit-export__settings {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .edit-export__settings .field:first-child,
  .edit-export__settings .field:nth-child(2) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 30rem) {
  .panel__header {
    padding-inline: 0.75rem;
  }

  .segmented--compact {
    width: calc(100% - 1.5rem);
    margin-inline: 0.75rem;
  }

  .form-grid {
    padding-inline: 0.75rem;
  }

  .mini-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-version-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .edit-export__settings {
    grid-template-columns: minmax(0, 1fr);
  }

  .edit-export__settings > * {
    grid-column: auto !important;
  }

  .chapter-list li,
  .subtitle-list li {
    grid-template-columns: minmax(0, 1fr);
  }
}

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