@media screen {
  body.studio-refined.splash-home:not(.project-home-mode) #systemFileButton {opacity:.35;cursor:default;}
  body.studio-refined.splash-home:not(.project-home-mode) #systemFileButton:hover {background:transparent;color:var(--dim);}
  #workspaceImport {width:min(520px,calc(100vw - 32px));max-height:calc(100dvh - 40px);margin:auto;padding:0;border:1px solid var(--line-strong);border-radius:9px;background:var(--panel);color:var(--text);overflow:auto;}
  #workspaceImport::backdrop {background:#0006;}
  #workspaceImport form {display:flex;flex-direction:column;max-height:calc(100dvh - 42px);margin:0;}
  #workspaceImport header,#workspaceImport footer {flex:none;}
  #workspaceImport.is-text {width:min(560px,calc(100vw - 32px));}
  #workspaceImport.has-file {width:min(400px,calc(100vw - 32px));}
  #workspaceImport header {display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border:0;}
  #workspaceImport h2 {margin:0;font:550 16px/24px var(--sans);}
  body.studio-refined #workspaceImport header button {width:28px;height:28px;min-height:0;padding:0;border:0;background:none;color:var(--dim);font:22px/24px var(--sans);}
  .workspaceImportBody {display:grid;gap:8px;min-height:0;padding:0 12px 12px;overflow-y:auto;}
  .workspaceImportSwitch {display:flex;box-sizing:border-box;gap:2px;height:28px;padding:2px;border:1px solid var(--line);border-radius:5px;background:var(--surface-0);}
  body.studio-refined #workspaceImport .workspaceImportSwitch button {flex:1;min-width:0;min-height:0;height:22px;margin:0;padding:2px 8px;border:0;border-radius:3px;background:none;color:var(--dim);font:12px/18px var(--sans);white-space:nowrap;}
  body.studio-refined #workspaceImport .workspaceImportSwitch button:is([aria-selected="true"],[aria-pressed="true"]) {background:var(--surface-3);color:var(--text);box-shadow:0 1px 3px #0002;}
  body.studio-refined #workspaceImportChoose {display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:80px;margin:0;padding:16px;border:1px solid var(--line);border-radius:6px;background:var(--surface-0);color:var(--text);font:13px/20px var(--sans);}
  #workspaceImportChoose svg {flex:none;width:22px;height:22px;fill:none;stroke:var(--icon-mint);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;}
  #workspaceImportChoose span {min-width:0;overflow-wrap:anywhere;}
  #importFilePane {display:grid;gap:8px;min-width:0;}
  #importTextPane {display:grid;grid-template-columns:minmax(0,1fr);gap:8px;min-width:0;}
  body.studio-refined #workspaceImport.has-file #workspaceImportChoose {min-height:28px;height:28px;justify-content:flex-start;padding:4px 8px;gap:6px;font:500 11px/18px var(--sans);}
  #workspaceImport.has-file #workspaceImportChoose svg {width:16px;height:16px;}
  #workspaceImport.has-file #workspaceImportChoose span {overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
  .workspaceImportPreviewDisclosure {min-width:0;}
  .workspaceImportPreviewDisclosure>summary {display:flex;align-items:center;gap:6px;min-height:28px;cursor:pointer;color:var(--dim);font:500 11px/18px var(--sans);list-style:none;}
  .workspaceImportPreviewDisclosure>summary::before {content:'';width:5px;height:5px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);transition:transform .18s ease;}
  .workspaceImportPreviewDisclosure[open]>summary::before {transform:rotate(45deg);}
  .workspaceImportPreviewDisclosure>summary::-webkit-details-marker {display:none;}
  #workspaceImportName {grid-column:1/-1;}
  body.studio-refined #workspaceImport :is(#workspaceImportName,#workspaceImportText) {box-sizing:border-box;width:100%;min-width:0;margin:0;padding:8px 10px;border:1px solid var(--line);border-radius:5px;background:var(--surface-0);color:var(--text);font:13px/20px var(--sans);}
  body.studio-refined #workspaceImport #workspaceImportName {height:28px;min-height:0;padding:4px 8px;font:12px/18px var(--sans);}
  #workspaceImport :is(input,textarea)::placeholder {font-size:11px;}
  body.studio-refined #workspaceImportText {height:240px;max-height:none;min-height:140px;resize:vertical;font-family:var(--mono);}
  .workspaceImportPreview {display:flex;flex-direction:column;gap:8px;min-width:0;height:280px;margin:0;padding:10px;border:1px solid var(--line);border-radius:5px;background:var(--surface-0);overflow:hidden;}
  .workspaceImportPreview h3 {flex:none;margin:0;color:var(--text);font:550 12px/18px var(--sans);}
  .workspaceImportPreviewStats {flex:none;margin:0;color:var(--icon-mint);font:11px/16px var(--sans);}
  .workspaceImportPreviewScript {display:grid;align-content:start;gap:12px;min-height:0;overflow:auto;font:12px/18px var(--mono);color:var(--text);}
  .workspaceImportPreview[aria-busy="true"] .workspaceImportPreviewScript {opacity:.55;}
  .importPreviewPassage {min-width:0;overflow-wrap:anywhere;}
  .importPreviewPassage p {margin:0;font:inherit;white-space:pre-wrap;}
  .importPreviewPassage b {display:block;margin-bottom:3px;color:var(--icon-mint);font:550 11px/16px var(--sans);}
  .importPreviewPassage.scene {font-weight:650;}
  .importPreviewPassage.dialogue {padding-inline:14px;}
  .importPreviewPassage.transition {text-align:right;color:var(--dim);}
  #workspaceImportError {margin:0;color:var(--icon-coral);font:12px/18px var(--sans);}
  #workspaceImport footer {display:flex;justify-content:flex-end;gap:8px;padding:0 12px 12px;border:0;}
  body.studio-refined #workspaceImport footer button {min-height:28px;height:28px;margin:0;padding:4px 10px;border:1px solid var(--line);border-radius:5px;background:var(--surface-2);color:var(--text);font:500 11px/18px var(--sans);}
  body.studio-refined #workspaceImport #workspaceImportApply {border-color:color-mix(in srgb,var(--icon-mint) 40%,var(--line));background:color-mix(in srgb,var(--icon-mint) 10%,var(--panel));color:var(--icon-mint);}
  #workspaceImport [hidden] {display:none!important;}
  body.studio-refined #systemFileMenu .systemMenuPanel button {min-height:28px;height:28px;margin:0;padding:4px 8px;font:500 11px/18px var(--sans);}
  body.studio-refined #systemFileMenu .systemMenuPanel {width:200px;min-width:200px;}
  #systemFilePanel .systemMenuSeparator {margin:4px;}
  #systemFilePanel>button[aria-controls="fileImportSubmenu"] {justify-content:space-between;}
  #systemFilePanel>button[aria-controls="fileImportSubmenu"] svg {width:12px;height:12px;transform:rotate(90deg);color:var(--dim);}
  #systemFilePanel>button[aria-expanded="true"] {background:var(--surface-3);}
  .systemImportSubmenu {position:fixed;z-index:1100;display:grid;gap:0;box-sizing:border-box;width:156px;padding:6px;border:1px solid var(--line);border-radius:7px;background:var(--panel);box-shadow:0 8px 24px #0006;}
  .systemImportSubmenu[hidden] {display:none;}
  body.studio-refined .systemImportSubmenu>button {display:flex;align-items:center;justify-content:flex-start;width:100%;height:28px;min-height:0;margin:0;padding:4px 8px;border:0;border-radius:4px;background:none;color:var(--text);text-align:left;font:500 11px/18px var(--sans);}
  body.studio-refined .systemImportSubmenu>button:is(:hover,:focus-visible) {background:var(--surface-3);outline:0;}
}

@media screen {
  body.studio-refined #workspaceImport {position:fixed;inset:auto;box-sizing:border-box;width:336px;max-width:calc(100vw - 24px);margin:0;padding:0;transform:none;border:1px solid var(--line-strong);border-radius:8px;background:var(--surface-1);box-shadow:0 12px 32px #0005;z-index:1200;}
  #workspaceImport::backdrop {background:transparent;}
  #workspaceImport .workspaceImportAccessibleTitle {position:absolute;width:1px;height:1px;min-height:0;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
  #workspaceImport form {max-height:inherit;}
  #workspaceImport .workspaceImportBody {padding:12px;gap:8px;}
  body.studio-refined #workspaceImport .workspaceImportSwitch button {font:500 11px/18px var(--sans);}
  body.studio-refined #workspaceImportChoose {justify-content:flex-start;min-height:28px;height:28px;padding:0 8px;gap:8px;border-radius:5px;font:500 11px/18px var(--sans);}
  #workspaceImportChoose svg {width:16px;height:16px;}
  #workspaceImportChoose span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .workspaceImportHint {display:block;margin:8px 0 0;color:var(--dim);font:400 11px/17px var(--sans);}
  body.studio-refined #workspaceImportText {height:144px;min-height:96px;max-height:240px;}
  #workspaceImport .workspaceImportPreview {height:180px;}
  body.studio-refined #workspaceImport footer {padding:0 12px 12px;}
  body.studio-refined #emptyPick.import-is-open {border-color:var(--icon-mint);box-shadow:0 0 0 1px color-mix(in srgb,var(--icon-mint) 12%,transparent);}
}
