:root,
:root[data-appearance="light"] {
  color-scheme: light;
  --bg: #f4f3f0;
  --surface: #fffefa;
  --surface-2: #f7f6f3;
  --surface-3: #ebe9e4;
  --text: #27231f;
  --text-soft: #5e5a55;
  --muted: #85817b;
  --line: #e3e0da;
  --line-strong: #d3cec5;
  --accent: #2d2a26;
  --accent-strong: #171411;
  --accent-soft: #efede8;
  --danger: #b42318;
  --online: #247846;
  --offline: #b42318;
  --pending: #8a5a00;
  --warn: #8a5a00;
  --shadow: 0 16px 38px rgba(46, 41, 35, 0.08);
}

:root[data-appearance="dark"] {
  color-scheme: dark;
  --bg: #0f0d0c;
  --surface: #151311;
  --surface-2: #1c1917;
  --surface-3: #25211e;
  --text: #eee9e1;
  --text-soft: #c4bdb4;
  --muted: #8d8780;
  --line: #2d2925;
  --line-strong: #403a35;
  --accent: #eee9e1;
  --accent-strong: #ffffff;
  --accent-soft: #24211e;
  --danger: #ff756d;
  --online: #64d68b;
  --offline: #ff756d;
  --pending: #f1b84b;
  --warn: #f1b84b;
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.32);
}

@media (prefers-color-scheme: dark) {
  :root[data-appearance="system"] {
    color-scheme: dark;
    --bg: #0f0d0c;
    --surface: #151311;
    --surface-2: #1c1917;
    --surface-3: #25211e;
    --text: #eee9e1;
    --text-soft: #c4bdb4;
    --muted: #8d8780;
    --line: #2d2925;
    --line-strong: #403a35;
    --accent: #eee9e1;
    --accent-strong: #ffffff;
    --accent-soft: #24211e;
    --danger: #ff756d;
    --online: #64d68b;
    --offline: #ff756d;
    --pending: #f1b84b;
    --warn: #f1b84b;
    --shadow: 0 18px 54px rgba(0, 0, 0, 0.32);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: auto;
  background: var(--bg);
  color: var(--text);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  padding: 0;
  background: var(--surface);
}

.icon-button {
  display: inline-grid;
  min-width: 36px;
  min-height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
}

.icon-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon-button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.session-button {
  border-color: transparent;
  color: var(--text);
}

.library-header p,
.account-card span,
.dialog-copy {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.status-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
}

.status-pill svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.status-pill.online {
  color: var(--online);
}

.status-pill.offline {
  color: var(--offline);
}

.status-pill.pending {
  color: var(--pending);
}

.nav-list,
.quick-list,
.mini-list {
  display: grid;
  gap: 5px;
}

.nav-item,
.quick-folder,
.mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 12px;
  font-weight: 500;
}

.nav-item:hover,
.nav-item.active,
.quick-folder:hover,
.mini-row:hover {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.library-card .nav-list {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  gap: 2px;
  overflow: auto;
  border-radius: 10px;
  background: var(--surface-2);
  padding: 3px;
}

.library-card .nav-item {
  width: auto;
  min-height: 32px;
  justify-content: center;
  gap: 7px;
  border-radius: 8px;
  padding: 6px 11px;
  white-space: nowrap;
}

.library-card .nav-item.active {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(27, 24, 20, 0.06);
}

.quick-panel {
  min-height: 0;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.quick-list {
  max-height: 220px;
  overflow: auto;
}

.account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.account-card strong {
  display: block;
  font-size: 12px;
}

.workspace {
  min-width: 0;
}

.library-card {
  display: grid;
  width: 100%;
  min-height: 100vh;
  height: 100vh;
  margin: 0;
  grid-template-rows: auto auto auto auto auto auto minmax(0, 1fr);
  border: 0;
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
  padding: 56px clamp(48px, 8vw, 132px) 48px;
}

.library-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.library-header h1 {
  margin: 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 33px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.1;
}

.session-actions,
.view-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.command-row {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
}

.view-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.search-wrap input,
input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  padding: 8px 12px;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 50%,
    calc(100% - 9px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

select option {
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.4;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
}

.top-actions,
.details-actions,
.settings-actions,
.filters,
.selection-bar,
footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.button:hover {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--surface) 80%, var(--surface-2));
}

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

:root[data-appearance="dark"] .button.primary {
  color: #101612;
}

.button.danger {
  border-color: color-mix(in srgb, var(--danger) 48%, var(--line));
  color: var(--danger);
}

.button.small {
  min-height: 31px;
  padding: 5px 9px;
  font-size: 11px;
}

.pathbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 0 0 10px;
  border-bottom: 0;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.path-title {
  min-width: 0;
}

.breadcrumb-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.path-back {
  min-height: 32px;
  gap: 4px;
}

.path-back svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.breadcrumb {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  padding: 4px 5px;
  font-size: 18px;
  font-weight: 500;
}

.breadcrumb:hover {
  background: var(--surface-2);
}

.filters {
  padding: 0 0 14px;
  border-bottom: 0;
}

.chip {
  min-height: 31px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 500;
}

.chip.active,
.chip:hover {
  border-color: var(--accent);
  color: var(--text);
}

.filters select {
  width: auto;
  min-width: 150px;
  min-height: 31px;
  padding: 5px 28px 5px 9px;
  font-size: 12px;
}

.filters .utility-icon {
  width: 31px;
  min-width: 31px;
  height: 31px;
  min-height: 31px;
  border-color: var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.filters .utility-icon svg {
  width: 15px;
  height: 15px;
}

.selection-bar {
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.content-layout {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
}

.file-surface {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.drop-target {
  height: 100%;
  min-height: 0;
  overflow: auto;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 16px;
}

.drop-target.dragging {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
}

.file-grid {
  display: grid;
  gap: 14px;
}

.file-grid.grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.file-grid.list {
  grid-template-columns: 1fr;
  gap: 5px;
}

.file-card {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 10px;
  overflow: hidden;
  text-align: left;
}

.file-card > div {
  min-width: 0;
}

.folder-add-action {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  color: var(--text);
  opacity: 0.86;
}

.folder-add-action svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.folder-add-action:hover {
  background: var(--surface);
  opacity: 1;
}

.file-card:hover,
.file-card.selected {
  border-color: var(--accent);
}

.file-card.drag-source {
  opacity: 0.48;
}

.file-card.drop-folder {
  border-color: #5aa8ff;
  background: color-mix(in srgb, #5aa8ff 12%, var(--surface));
}

.file-card.selected {
  background: color-mix(in srgb, var(--accent-soft) 58%, var(--surface));
}

.file-grid.list .file-card {
  grid-template-columns: 34px minmax(0, 1fr) 120px 130px auto;
  align-items: center;
  min-height: 48px;
}

.file-thumb {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 118px;
  overflow: hidden;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.finder-icon {
  position: relative;
  display: block;
  width: 74px;
  height: 60px;
}

.folder-icon {
  height: 58px;
  border-radius: 7px 9px 9px;
  background: linear-gradient(180deg, #80c2ff 0%, #4da4ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 10px 22px rgba(58, 125, 194, 0.12);
}

.folder-icon::before {
  position: absolute;
  top: -7px;
  left: 8px;
  width: 31px;
  height: 13px;
  border-radius: 7px 7px 0 0;
  background: #9ad0ff;
  content: "";
}

.folder-icon span {
  position: absolute;
  inset: 15px 10px auto;
  height: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
}

.document-icon {
  width: 54px;
  height: 70px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  box-shadow: 0 10px 22px rgba(20, 18, 15, 0.08);
}

.document-icon::after {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 17px;
  height: 17px;
  border-left: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0 7px 0 5px;
  background: var(--surface-3);
  content: "";
}

.document-icon span {
  position: absolute;
  left: 11px;
  right: 13px;
  top: 24px;
  height: 3px;
  border-radius: 99px;
  background: var(--line-strong);
  box-shadow:
    0 10px 0 var(--line),
    0 20px 0 var(--line);
}

.document-icon em {
  position: absolute;
  left: 50%;
  bottom: 7px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.document-image {
  background: linear-gradient(180deg, #fffefa 0%, #e9f5ff 100%);
}

.document-data,
.document-secret,
.document-code {
  background: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, var(--surface-2) 72%, #8fd3b2) 100%);
}

.url-preview-icon {
  display: grid;
  width: min(100%, 156px);
  max-width: 100%;
  min-width: 0;
  min-height: 96px;
  align-content: center;
  justify-items: start;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  padding: 12px;
  box-shadow: 0 10px 22px rgba(20, 18, 15, 0.06);
}

.url-preview-glyph {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
}

.url-preview-glyph svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.url-preview-icon strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.url-preview-icon em {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-grid.list .file-thumb {
  min-height: 30px;
}

.file-grid.list .finder-icon {
  width: 26px;
  height: 24px;
  transform: scale(0.48);
  transform-origin: center;
}

.file-grid.list .url-preview-icon {
  width: 28px;
  min-height: 28px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.file-grid.list .url-preview-icon strong,
.file-grid.list .url-preview-icon em {
  display: none;
}

.file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.file-sub,
.file-extra {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-actions {
  display: flex;
  gap: 3px;
  justify-content: flex-end;
}

.file-action {
  display: inline-grid;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
}

.file-action svg {
  width: 15px;
  height: 15px;
  display: block;
}

.icon-star svg {
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.icon-star.active svg {
  fill: currentColor;
}

.icon-share svg {
  fill: currentColor;
}

.icon-select svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  opacity: 0.34;
}

.icon-select.active svg {
  opacity: 1;
  stroke-width: 2.6;
}

.file-action.active {
  color: var(--text);
}

.file-action:hover {
  background: var(--surface-2);
  color: var(--text);
}

.empty-state {
  display: grid;
  min-height: 280px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
}

.empty-state strong {
  color: var(--text);
}

.preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.preview img,
.preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

.preview pre {
  width: 100%;
  height: 100%;
  max-height: 520px;
  margin: 0;
  overflow: auto;
  padding: 14px;
  color: var(--text-soft);
  white-space: pre-wrap;
}

.spreadsheet-preview {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 320px;
  max-height: 560px;
  background: var(--surface);
  color: var(--text);
}

.spreadsheet-toolbar {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  color: var(--muted);
}

.spreadsheet-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spreadsheet-toolbar select {
  max-width: 240px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  padding: 6px 28px 6px 8px;
  font: inherit;
}

.spreadsheet-grid-wrap {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: var(--surface);
}

.spreadsheet-grid {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  line-height: 1.35;
}

.spreadsheet-grid th,
.spreadsheet-grid td {
  min-width: 92px;
  max-width: 420px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
  overflow-wrap: anywhere;
  text-align: left;
  vertical-align: top;
  white-space: pre-wrap;
}

.spreadsheet-grid thead th,
.spreadsheet-row-number,
.spreadsheet-corner {
  position: sticky;
  z-index: 2;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 500;
  text-align: center;
}

.spreadsheet-grid thead th {
  top: 0;
}

.spreadsheet-grid .spreadsheet-row-number,
.spreadsheet-grid .spreadsheet-corner {
  left: 0;
  min-width: 48px;
  width: 48px;
}

.spreadsheet-grid .spreadsheet-corner {
  z-index: 3;
}

.spreadsheet-empty {
  color: var(--muted);
  text-align: center !important;
}

.url-preview-large {
  display: grid;
  width: min(560px, calc(100% - 24px));
  justify-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

.url-preview-large strong {
  color: var(--text);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
}

.url-preview-large span,
.url-preview-large a {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.url-preview-large a {
  color: var(--text);
  text-decoration: none;
}

.details-body {
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.details-body h2 {
  margin: 0 0 6px;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.details-body p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
}

dl {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px 10px;
  margin: 0 0 16px;
  font-size: 12px;
}

dt {
  color: var(--muted);
  font-weight: 500;
}

dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.dialog {
  width: fit-content;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 42px);
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
  color: var(--text);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.46);
}

.dialog-panel {
  display: grid;
  gap: 14px;
  width: min(760px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}

.dialog-panel.wide {
  width: min(860px, calc(100vw - 48px));
}

.dialog-panel.preview-panel {
  width: min(920px, calc(100vw - 48px));
}

.dialog-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.dialog-panel h2,
.dialog-panel h3 {
  margin: 0;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
}

.inline-check input {
  width: 16px;
  min-height: 16px;
}

.field-grid,
.settings-grid,
.upload-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-grid {
  align-items: start;
  gap: 18px 20px;
}

.settings-grid section {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 12px 0 0;
}

.drop-card {
  min-height: 110px;
  place-content: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  padding: 16px;
  text-align: center;
  text-transform: none;
}

.drop-card strong {
  color: var(--text);
  font-size: 14px;
}

.upload-list {
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.upload-row,
.mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}

.upload-row:last-child,
.mini-row:last-child {
  border-bottom: 0;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.segmented.two {
  grid-template-columns: repeat(2, 1fr);
}

.segmented button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.segmented button.active {
  background: var(--text);
  color: var(--bg);
}

.file-import {
  display: inline-flex;
  min-height: 34px;
  width: fit-content;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 7px 10px;
  text-transform: none;
}

.file-import:hover {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--surface) 80%, var(--surface-2));
}

.library-header h1 {
  font-size: 32px;
  font-weight: 400;
}

.icon-button,
.status-pill,
.nav-item,
.quick-folder,
.mini-row,
.panel-title,
.button,
.eyebrow,
.breadcrumb,
.chip,
.selection-bar,
.file-thumb,
.file-name,
.file-action,
.preview,
.dialog-panel h2,
.dialog-panel h3,
dt,
label,
.segmented button,
.toast {
  font-weight: 500;
}

.inline-check,
.empty-state,
.library-header p,
.dialog-copy {
  font-weight: 400;
}

.empty-state strong,
.drop-card strong {
  font-weight: 500;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  display: none;
  max-width: 460px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  padding: 11px 12px;
  font-size: 12px;
  font-weight: 500;
}

.toast.show {
  display: block;
}
