/* ============================================================
   Verse Studio › Verse Vault sheets (studio-vault.js, 2026-10-04): "Save to Verse Vault" and "Open from Verse Vault".
   Rides on .modal-overlay / .modal from studio.css. The editors' rules: the accent is for the one primary button and
   the focus ring; a selected row is the grey selected-chip fill; radii 10 / 6 / 999; no entrance motion beyond the
   modal's own. It sits above an editor's export sheet (200) and the Create lightbox (250).
   ============================================================ */
.sv-overlay { z-index: 260; }
/* The site's home pill floats above every page (z-index 99990); while a Vault sheet is up it would sit on the name field. */
body:has(.sv-overlay) .verse-home-pill { visibility: hidden !important; }
.sv-sheet { max-width: 620px; display: flex; flex-direction: column; overflow: hidden; border-radius: 10px; max-height: min(720px, 92vh); }
.sv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 10px; }
.sv-head .modal-title { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.sv-title-ic { display: inline-flex; color: var(--text-soft); }
.sv-body { display: flex; flex-direction: column; gap: 10px; padding: 0 20px 18px; min-height: 0; flex: 1 1 auto; }
.sv-search { position: relative; }
.sv-search .input { width: 100%; height: 36px; padding-left: 34px; font-size: 13.5px; }
.sv-search-ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); display: inline-flex; color: var(--text-muted); pointer-events: none; }
.sv-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; min-height: 32px; }
.sv-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; min-width: 0; font-size: 13px; }
.sv-crumb { padding: 4px 6px; border-radius: 6px; color: var(--text-muted); font-weight: 500; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-crumb:hover { color: var(--text); background: var(--gray-mid); }
.sv-crumb.is-here { color: var(--text); font-weight: 600; }
/* A folder the save will make: dashed underline, not clickable (it does not exist yet). */
.sv-crumb.is-pending { color: var(--text-muted); text-decoration: underline dashed; text-underline-offset: 3px; text-decoration-color: var(--text-dim); }
.sv-crumb.is-pending:hover { background: none; color: var(--text-muted); }
.sv-crumb.is-pending.is-here { color: var(--text); }
.sv-pane:focus { outline: none; }
.sv-crumb-sep { display: inline-flex; color: var(--text-dim); }
.sv-mkdir { gap: 6px; }
.sv-newfolder { display: flex; align-items: center; gap: 6px; flex: 1 1 100%; }
.sv-newfolder .input { flex: 1 1 auto; height: 32px; font-size: 13.5px; }
.sv-pane { flex: 1 1 auto; min-height: 160px; max-height: 46vh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  border: 1px solid var(--gray-mid); border-radius: 10px; background: var(--black); }
.sv-list { list-style: none; margin: 0; padding: 4px; display: flex; flex-direction: column; gap: 2px; }
.sv-row { display: grid; grid-template-columns: auto 36px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; width: 100%; min-height: 44px;
  padding: 4px 10px; border-radius: 6px; text-align: left; color: var(--text-soft); font-size: 13.5px; line-height: 1.4; }
.sv-row:not(.is-static):hover { background: var(--gray-dark); color: var(--text); }
.sv-row.is-on { background: var(--gray-light); color: var(--white); }
.sv-row.is-static { cursor: default; color: var(--text-muted); }
.sv-row:focus-visible, .sv-crumb:focus-visible, .sv-sheet .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sv-ic { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--gray-dark); color: var(--text-muted); overflow: hidden; grid-column: 2; }
.sv-row.is-folder .sv-ic { color: var(--text-soft); }
.sv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sv-check { grid-column: 1; width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--gray-light); display: inline-flex; align-items: center; justify-content: center; color: var(--white); }
.sv-row.is-on .sv-check { background: var(--text); border-color: var(--text); color: var(--black); }
.sv-name { grid-column: 3; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.sv-meta { grid-column: 4; font-size: 12px; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sv-row.is-on .sv-meta { color: var(--text-soft); }
.sv-go { grid-column: 5; display: inline-flex; color: var(--text-dim); }
.sv-empty, .sv-hidden { margin: 0; padding: 18px 14px; font-size: 13.5px; line-height: 1.5; }
.sv-hidden { padding: 6px 14px 12px; font-size: 12.5px; }
.sv-state { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 14px; font-size: 13.5px; line-height: 1.5; }
.sv-state.text-muted { flex-direction: row; align-items: center; }
.sv-error p { margin: 0; color: var(--text-soft); max-width: 60ch; }
.sv-foot { display: flex; flex-direction: column; gap: 10px; }
.sv-name-row { display: flex; flex-direction: column; gap: 6px; }
.sv-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.sv-name-field { display: flex; align-items: center; gap: 6px; }
.sv-name-field .input { flex: 1 1 auto; height: 36px; font-size: 14px; }
.sv-ext { font-size: 14px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.sv-note { margin: 0; font-size: 12.5px; line-height: 1.5; min-height: 1.5em; display: flex; align-items: center; gap: 6px; }
.sv-error-line { margin: 0; font-size: 13px; line-height: 1.5; color: var(--red-soft); }
.sv-progress { height: 6px; border-radius: 999px; background: var(--gray-light); overflow: hidden; }
.sv-progress-bar { height: 100%; width: 0; background: var(--text); transition: width .2s linear; }
.sv-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.sv-sheet .btn-primary { color: var(--accent-ink); }
.sv-sheet .btn { gap: 6px; }
/* The Vault button tools put next to their own actions: an icon and a word, never a new colour. */
.sv-btn { gap: 6px; }
@media (max-width: 640px) {
  .sv-sheet { max-height: 100dvh; height: 100dvh; max-width: none; border-radius: 0; }
  .sv-overlay { padding: 0; }
  .sv-pane { max-height: none; }
  .sv-row { grid-template-columns: auto 36px minmax(0, 1fr) auto; }
  .sv-go { display: none; }
}
@media (max-width: 400px) { .sv-meta { display: none; } .sv-row { grid-template-columns: auto 36px minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .sv-progress-bar { transition: none; } .sv-overlay, .sv-sheet { animation: none; } }
