.mobile-dock,
.mobile-prompt,
.mobile-menu {
  display: none;
}
.connection-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--soft);
  font-size: 12px;
  flex-shrink: 0;
}
.connection-banner button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  padding: 8px 12px;
}
.mobile-sheet {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 0;
  width: min(540px, calc(100% - 32px));
  max-height: 85dvh;
}
.mobile-sheet::backdrop {
  background: rgba(20, 20, 24, 0.48);
  backdrop-filter: blur(4px);
}
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
  gap: 16px;
}
.sheet-header h2 {
  font-size: 22px;
  letter-spacing: -0.7px;
}
.sheet-body {
  padding: 12px 24px 24px;
  display: grid;
  gap: 18px;
  overflow: auto;
  overscroll-behavior: contain;
}
.sheet-body p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.sheet-body .submit-button,
.sheet-body > .ghost-button {
  width: 100%;
  min-height: 48px;
  justify-content: center;
}
.mobile-sheet .icon-button {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  font-size: 26px;
}
.mobile-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--paper);
  width: max-content;
  max-width: calc(100% - 32px);
  font-size: 14px;
  box-shadow: 0 5px 30px #0002;
  z-index: 20;
  pointer-events: none;
}
@media (max-width: 950px) {
  :root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --muted: #696963;
  }
  html,
  body {
    height: 100%;
    overscroll-behavior-y: none;
  }
  body {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-top: env(safe-area-inset-top);
    padding-bottom: 0;
  }
  button,
  a,
  summary,
  label.upload-button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  button:active:not(:disabled) {
    transform: scale(0.97);
  }
  button,
  input,
  select,
  textarea {
    font-size: 16px;
  }
  button,
  .icon-button,
  .ghost-button,
  summary {
    min-height: 44px;
  }
  .topbar {
    height: 64px;
    min-height: 64px;
    padding: 0 max(18px, env(safe-area-inset-right)) 0
      max(20px, env(safe-area-inset-left));
    border: 0;
    gap: 8px;
  }
  .wordmark {
    color: var(--ink);
    font-size: 25px;
    letter-spacing: -1.4px;
    min-height: 44px;
  }
  .wordmark span {
    color: var(--orange);
    font-size: 25px;
  }
  .workspace-label,
  .topbar #health-pill,
  .topbar #new-project,
  .topbar form {
    display: none;
  }
  .topbar__meta {
    gap: 6px;
  }
  .mobile-menu {
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    width: 44px;
    background: var(--soft);
  }
  .mobile-menu svg,
  .export-button svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .export-button {
    border: 0;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    padding: 0;
    display: grid;
    place-items: center;
    background: var(--soft);
    color: var(--ink);
  }
  .export-button span {
    display: none;
  }
  .studio {
    display: flex;
    flex: 1;
    min-height: 0;
    width: 100%;
    padding: 0 14px;
    gap: 0;
    overflow: hidden;
  }
  .stage {
    display: flex;
    flex: 1;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    min-height: 0;
    border: 0;
    padding: 0;
    gap: 0;
    background: transparent;
  }
  .canvas-top {
    padding: 0 6px 8px;
    font-size: 10px;
    min-height: 22px;
    gap: 10px;
  }
  #canvas-dimensions {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .stage__frame {
    flex: 1;
    min-height: 0;
    height: auto;
    max-height: none;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 12px;
    overflow: auto;
    overscroll-behavior: contain;
    align-items: safe center;
    justify-content: safe center;
    background: var(--paper);
  }
  .stage__frame:has(.stage__placeholder:not([hidden])) {
    border: 0;
    background: transparent;
  }
  #stage-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    flex-shrink: 0;
  }
  .stage__placeholder {
    padding: 16px 8px;
    width: 100%;
    max-width: 400px;
    border: 0;
    background: transparent;
  }
  .stage__placeholder .empty-art {
    width: 68px;
    height: 68px;
    font-size: 0;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--soft);
    transform: rotate(-7deg);
    margin: 0 auto 24px;
    display: grid;
    place-items: center;
  }
  .empty-art span {
    display: none;
  }
  .empty-art svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: var(--ink);
    stroke-width: 1.5;
  }
  .stage__placeholder h2 {
    font-family: inherit;
    font-size: clamp(26px, 7.7vw, 34px);
    line-height: 1.08;
    letter-spacing: -1.3px;
    margin-bottom: 14px;
  }
  .stage__placeholder p {
    font-size: 15px;
    line-height: 1.6;
    max-width: 260px;
    margin: 0 auto;
    color: var(--muted);
  }
  .empty-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    max-width: 260px;
    margin: 28px auto 0;
    width: 100%;
  }
  .empty-actions button {
    width: 100%;
    min-height: 52px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
  }
  #stage-import {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange);
  }
  #stage-idea {
    border: 0;
    background: transparent;
  }
  #stage-sketch {
    display: none;
  }
  .file-hint {
    display: none;
  }
  .canvas-footer {
    padding: 12px 4px;
    gap: 6px;
    align-items: center;
    min-height: 65px;
  }
  .stage__caption {
    min-width: 0;
    flex: 1;
  }
  .stage__caption-title {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .stage__caption-body {
    font-size: 11px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
  }
  .zoom-controls {
    gap: 0;
  }
  .zoom-controls .icon-button {
    width: 44px;
  }
  .zoom-controls .ghost-button {
    font-size: 12px;
    min-width: 44px;
    padding: 0 4px;
  }
  body:not(.has-image) .canvas-footer {
    display: none;
  }
  .stage__actions {
    margin: 0;
    gap: 6px;
    flex-wrap: wrap;
  }
  .stage__actions:has(button:not([hidden])) {
    padding: 0 4px 8px;
  }
  .stage__actions button {
    flex: 1;
    font-size: 13px;
    padding: 8px;
  }
  .mobile-prompt {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--soft);
    color: var(--muted);
    padding: 12px 16px;
    text-align: left;
  }
  .mobile-prompt svg {
    width: 20px;
    height: 20px;
    stroke: var(--orange);
    fill: none;
    stroke-width: 1.8;
  }
  body:not(.has-image) .mobile-prompt {
    display: none;
  }
  .mobile-dock {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    flex-shrink: 0;
    border-top: 1px solid var(--line);
    background: var(--paper);
    padding: 8px max(12px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
    gap: 4px;
  }
  .mobile-dock button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    min-height: 56px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
  }
  .mobile-dock svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .mobile-dock [data-tool="compose"] {
    color: var(--orange);
    background: color-mix(in srgb, var(--orange) 9%, transparent);
  }
  .mobile-sheet {
    margin: auto 0 0;
    width: 100%;
    max-width: none;
    max-height: calc(var(--visual-height, 100dvh) - 18px);
    border-radius: 28px 28px 0 0;
    border: 0;
    bottom: var(--keyboard-inset, 0px);
    box-shadow: 0 -12px 60px #0002;
    padding-bottom: env(safe-area-inset-bottom);
    overflow: hidden;
  }
  .mobile-sheet[open] {
    display: flex;
    flex-direction: column;
    animation: sheet-in 0.2s ease-out;
  }
  .mobile-sheet::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    min-height: 4px;
    border-radius: 4px;
    background: var(--line);
    margin: 9px auto 0;
  }
  .sheet-header {
    padding: 8px 20px 4px;
    flex-shrink: 0;
  }
  .sheet-body {
    padding: 8px 20px 20px;
    min-height: 0;
  }
  #compose-content {
    padding-top: 0;
  }
  .mobile-sheet .composer {
    display: block;
    border: 0;
    padding: 0;
    width: 100%;
    min-width: 0;
    background: none;
  }
  .mobile-sheet .hero-copy {
    display: none;
  }
  .prompt-form {
    gap: 14px;
  }
  .prompt-field .field__label {
    display: none;
  }
  #prompt-input {
    min-height: 116px;
    max-height: 180px;
    resize: vertical;
    padding: 16px;
    border-radius: 18px;
    line-height: 1.5;
    background: var(--soft);
    border: 1px solid var(--line);
    font-size: 16px;
  }
  .mobile-sheet .toolbar {
    gap: 6px;
    flex-wrap: wrap;
  }
  .mobile-sheet .toolbar button,
  .mobile-sheet .upload-button {
    font-size: 13px;
    min-height: 44px;
    padding: 8px 12px;
    flex: 1;
    white-space: nowrap;
    text-align: center;
  }
  .mobile-sheet .controls-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .mobile-sheet select {
    min-height: 48px;
    background: var(--soft);
    border-color: var(--line);
    border-radius: 12px;
    width: 100%;
  }
  .mobile-sheet .field {
    min-width: 0;
  }
  .mobile-sheet .field__label {
    font-size: 12px;
  }
  .mobile-sheet .settings summary {
    padding: 12px 0;
    font-size: 14px;
  }
  .generate-actions {
    position: sticky;
    bottom: -20px;
    background: var(--paper);
    padding: 12px 0;
    margin: 0;
    z-index: 2;
    order: 20;
  }
  .submit-button {
    min-height: 52px;
    border-radius: 16px;
    font-size: 16px;
  }
  .shortcut {
    display: none;
  }
  #form-hint {
    display: none;
  }
  #status-line:empty {
    display: none;
  }
  .mobile-sheet .history {
    display: flex;
    flex-direction: column;
    border: 0;
    padding: 0;
    min-height: 200px;
    max-height: none;
    background: transparent;
    width: 100%;
  }
  .mobile-sheet .history__header,
  .mobile-sheet .history__footer {
    display: none;
  }
  .mobile-sheet .jobs-list {
    display: flex;
    flex-direction: column;
    max-height: none;
    overflow: visible;
  }
  .mobile-sheet .job-card {
    min-height: 76px;
    padding: 12px;
    border-radius: 16px;
    gap: 12px;
  }
  .mobile-sheet .job-card__media {
    width: 64px;
    height: 72px;
    border-radius: 10px;
  }
  .mobile-sheet .job-card__prompt {
    font-size: 14px;
    line-height: 1.4;
    color: var(--ink);
  }
  .mobile-sheet .job-card__meta {
    font-size: 11px;
    line-height: 1.4;
  }
  .mobile-sheet .job-card__topline,
  .mobile-sheet .job-card__stamp {
    font-size: 10px;
  }
  .annotate-dialog {
    margin: 0;
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: var(--paper);
    color: var(--ink);
  }
  .annotate-dialog__sheet {
    height: 100%;
    max-height: none;
    display: flex;
    flex-direction: column;
    padding: max(12px, env(safe-area-inset-top)) 16px
      max(16px, env(safe-area-inset-bottom));
    gap: 12px;
  }
  .annotate-dialog__header {
    padding: 0;
    gap: 12px;
  }
  .annotate-dialog__header h2 {
    font-size: 22px;
  }
  .annotate-dialog__header p {
    font-size: 12px;
    line-height: 1.4;
  }
  .annotate-dialog__header button {
    min-width: 44px;
    font-size: 26px;
  }
  .annotate-dialog__toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 0;
    gap: 8px;
  }
  .annotate-dialog__toolbar .field:first-child {
    grid-column: span 2;
  }
  .annotate-dialog__toolbar button {
    padding: 8px 4px;
    font-size: 13px;
  }
  #brush-size {
    min-height: 44px;
    width: 100%;
  }
  #brush-color {
    width: 100%;
    height: 44px;
    border-radius: 10px;
  }
  .annotate-dialog__canvas-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: var(--soft);
    border-radius: 16px;
    overflow: hidden;
  }
  #annotate-canvas {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    touch-action: none;
  }
  .annotate-dialog__footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 0;
  }
  .annotate-dialog__footer .toggle-row {
    min-height: 44px;
    font-size: 12px;
    line-height: 1.5;
  }
  .annotate-dialog__footer .submit-button {
    width: 100%;
  }
  input[type="checkbox"] {
    min-width: 22px;
    min-height: 22px;
    accent-color: var(--orange);
  }
  @media (max-height: 600px) {
    .stage__placeholder .empty-art,
    .stage__placeholder p {
      display: none;
    }
    .empty-actions {
      margin-top: 14px;
    }
    .stage__placeholder h2 {
      font-size: 24px;
    }
    .topbar {
      min-height: 52px;
      height: 52px;
    }
    .mobile-dock {
      padding-top: 2px;
      padding-bottom: max(2px, env(safe-area-inset-bottom));
    }
    .mobile-dock button {
      min-height: 48px;
    }
    .annotate-dialog__toolbar {
      grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    }
    .annotate-dialog__toolbar .field:first-child {
      grid-column: auto;
    }
    .annotate-dialog__header p,
    .annotate-dialog__toolbar .field__label {
      display: none;
    }
    .annotate-dialog__footer {
      flex-direction: row;
    }
    .annotate-dialog__footer .submit-button {
      width: 150px;
    }
  }
}
@keyframes sheet-in {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #19191c;
  --ink: #f5f4f0;
  --muted: #aaa9a4;
  --line: #38383c;
  --soft: #252529;
  --orange: #ff744c;
}
[data-theme="dark"] .stage,
[data-theme="dark"] .composer,
[data-theme="dark"] .history,
[data-theme="dark"] input,
[data-theme="dark"] .field input[type="email"],
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .job-card,
[data-theme="dark"] .annotate-dialog {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}
[data-theme="dark"] .stage__frame,
[data-theme="dark"] .annotate-dialog__canvas-wrap {
  background: var(--soft);
}
[data-theme="dark"] .ghost-button,
[data-theme="dark"] .icon-button,
[data-theme="dark"] .upload-button,
[data-theme="dark"] .quick-edits button {
  color: var(--ink);
  background: var(--soft);
  border-color: var(--line);
}
[data-theme="dark"] .submit-button {
  color: #171719;
}
[data-theme="dark"] .field__label,
[data-theme="dark"] .stage__caption-title,
[data-theme="dark"] .job-card__prompt {
  color: var(--ink);
}
[data-theme="dark"] .field__hint,
[data-theme="dark"] .stage__caption-body,
[data-theme="dark"] .history__hint,
[data-theme="dark"] .gallery__empty,
[data-theme="dark"] .optional {
  color: var(--muted);
}
.language-select {
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
}
@media (max-width: 950px) {
  #studio-language {
    display: none;
  }
  .mobile-sheet .toolbar button,
  .mobile-sheet .upload-button {
    font-size: 12px;
  }
  .mobile-dock button {
    font-size: 10px;
  }
  .topbar .wordmark {
    font-size: 24px;
  }
  html[lang="es"] .sheet-header h2 {
    font-size: 20px;
  }
  html[lang="es"] .stage__actions button {
    font-size: 12px;
  }
}
.pdf-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 24px; background: var(--paper); color: var(--ink); overflow: auto; }
.pdf-dialog::backdrop { background: rgb(0 0 0 / .5); }
.pdf-dialog .sheet-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 20px; }
.pdf-dialog h2 { font-size:20px; margin:0; }
.pdf-body { padding:0 20px 20px; }
.pdf-name { font-size:13px; overflow-wrap:anywhere; margin:0 0 8px; }
.pdf-note { font-size:13px; line-height:1.5; color:var(--muted); }
.pdf-preview { display:flex; align-items:center; justify-content:center; flex-direction:column; min-height:140px; padding:12px; border-radius:12px; background:var(--soft); }
.pdf-preview canvas { display:block; max-width:100%; max-height:44dvh; object-fit:contain; width:auto; height:auto; }
.pdf-preview canvas[hidden] { display:none; }
.pdf-preview [role=status] { font-size:14px; line-height:1.5; text-align:center; }
.pdf-preview [role=status]:empty { display:none; }
.pdf-navigation { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:16px 0; }
.pdf-navigation label { display:flex; align-items:center; justify-content:center; gap:6px; font-size:13px; }
.pdf-navigation input { width:60px; min-height:44px; padding:6px; border:1px solid var(--line); border-radius:8px; background:var(--paper); color:var(--ink); font-size:16px; }
.pdf-dialog button { min-width:44px; min-height:44px; }
.pdf-dialog button:disabled { opacity:.45; cursor:default; }
.pdf-dialog .submit-button { width:100%; }
@media(max-width:360px) { .pdf-body { padding:0 12px 16px; } .pdf-dialog h2 { font-size:18px; } .pdf-navigation label { gap:4px; font-size:12px; } }
.reference-panel { flex-shrink:0; min-width:0; padding-top:10px; }
.reference-panel[hidden] { display:none; }
.reference-panel__header { display:flex; align-items:center; justify-content:space-between; font-size:12px; font-weight:600; }
.reference-panel__header button { min-height:44px; }
.reference-list { display:flex; gap:10px; overflow-x:auto; padding:2px 0 4px; max-width:100%; }
.photo-reference { position:relative; width:96px; flex:0 0 96px; }
.photo-reference__preview { width:100%; padding:4px; border:2px solid var(--line); border-radius:12px; background:var(--paper); color:var(--ink); text-align:left; }
.photo-reference__preview[aria-pressed=true] { border-color:var(--orange); }
.photo-reference__preview img { width:84px; height:58px; object-fit:cover; border-radius:7px; display:block; }
.photo-reference__preview span { display:block; padding:5px 2px; font-size:12px; font-weight:600; }
.photo-reference__remove { position:absolute; top:0; right:0; width:44px; height:44px; border:0; border-radius:0 12px 0 12px; background:rgb(0 0 0 / .55); color:white; font-size:20px; }
.reference-panel>p { margin:4px 0 0; font-size:11px; color:var(--muted); line-height:1.4; }
@media(max-width:950px) { .reference-panel { padding-top:4px; } .photo-reference { flex-basis:84px; width:84px; } .photo-reference__preview img { width:72px; height:46px; } }
.split-dialog { width:min(760px, calc(100vw - 24px)); max-height:calc(100dvh - 24px); padding:0; border:1px solid var(--line); border-radius:24px; background:var(--paper); color:var(--ink); overflow:auto; }
.split-dialog::backdrop { background:rgb(0 0 0 / .5); }
.split-dialog .sheet-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 20px; position:sticky; top:0; background:var(--paper); z-index:2; border-bottom:1px solid var(--line); }
.split-dialog h2 { margin:0; font-size:20px; }
.split-body { padding:0 20px 20px; }
.split-note { font-size:13px; line-height:1.5; color:var(--muted); }
.split-tools, .split-downloads { display:flex; flex-wrap:wrap; gap:8px; }
.split-dialog button { min-height:44px; min-width:44px; }
.split-dialog button:disabled { opacity:.45; }
.split-dialog [aria-pressed=true] { background:var(--ink); color:var(--paper); }
.split-grid { margin-top:12px; padding:12px; border:1px solid var(--line); border-radius:12px; }
.split-grid summary { cursor:pointer; min-height:28px; padding:4px 0; font-size:14px; }
.split-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:12px 0; }
.split-fields label { display:flex; flex-direction:column; gap:5px; font-size:12px; min-width:0; }
.split-fields input { min-height:44px; width:100%; min-width:0; padding:8px; border:1px solid var(--line); border-radius:8px; background:var(--paper); color:var(--ink); font-size:16px; box-sizing:border-box; }
.split-preview { position:relative; width:100%; overflow:hidden; border:1px solid var(--line); background:#fff; }
.split-preview img { display:block; width:100%; height:auto; }
.split-preview svg { position:absolute; inset:0; width:100%; height:100%; }
.split-preview svg.is-drawing { touch-action:none; cursor:crosshair; }
.split-preview rect { fill:rgb(0 0 0 / .08); stroke:#464646; stroke-width:2; }
.split-preview .is-selected rect, .split-preview .split-draft { fill:rgb(255 87 43 / .1); stroke:#ff572b; stroke-width:3; }
.split-preview text { fill:white; stroke:#222; stroke-width:3px; paint-order:stroke; font-family:system-ui,sans-serif; font-weight:700; }
.split-list { display:flex; flex-wrap:wrap; gap:6px; margin:12px 0; max-height:160px; overflow:auto; }
.split-status { font-size:13px; line-height:1.5; min-height:20px; }
.split-adjust { border:1px solid var(--line); border-radius:12px; min-width:0; margin:16px 0; }
.split-adjust legend { font-size:12px; padding:0 5px; }
.split-downloads button { flex:1 1 180px; justify-content:center; }
.split-dialog[open] { display:flex; flex-direction:column; overflow:hidden; }
.split-dialog .sheet-header { flex-shrink:0; }
.split-dialog .split-body { overflow:auto; min-height:0; }
.split-dialog .split-downloads { padding:12px 16px; border-top:1px solid var(--line); background:var(--paper); flex-shrink:0; }
.split-dialog .split-downloads button { flex:1 1 120px; font-size:12px; padding:10px; }
.split-email { margin:12px 0; }
.split-email input { min-height:44px; padding:10px; border:1px solid var(--line); border-radius:8px; background:var(--paper); color:var(--ink); font-size:16px; }
.split-tools [data-detect] { color:#fff; background:#202027; }
@media(max-width:400px) { .split-body { padding:0 12px 16px; } .split-dialog .sheet-header { padding:12px; } .split-tools { gap:4px; } .split-tools button { padding:8px; font-size:12px; flex:1 1 auto; } }
