:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #ededed;
  --muted: #8b8b8b;
  --dim: #666;
  --line: #242424;
  --line-2: #343434;
  --paper: #f1f1ed;
  --paper-fg: #111;
  --danger: #d6aaaa;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); overscroll-behavior-y: none; }
body {
  margin: 0;
  min-height: 100dvh;
  overscroll-behavior-y: none;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.42 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select { font: inherit; }
button, .button {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: #050505;
  color: #d7d7d7;
  cursor: pointer;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
button:hover, .button:hover { border-color: #484848; color: #fff; }
button:disabled, .button[aria-disabled="true"] { cursor: default; opacity: .42; }
button:focus-visible, .button:focus-visible, input:focus-visible, select:focus-visible { outline: 1px solid #aaa; outline-offset: 2px; }
.primary { border-color: var(--paper); background: var(--paper); color: var(--paper-fg); font-weight: 650; }
.view-primary {
  border-color: #62afff;
  background: linear-gradient(#3196ff, #0878e7 54%, #006bd6);
  box-shadow: inset 0 1px 0 #ffffff75, inset 0 -1px 0 #004b9c99, 0 2px 5px #0008;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 -1px 0 #004687;
}
.view-primary:hover { border-color: #8bc5ff; background: linear-gradient(#48a2ff, #1685f2 54%, #0875df); }
.view-primary:active { background: linear-gradient(#0068d5, #0878e7); box-shadow: inset 0 2px 4px #003b7db3; }
.danger-action, .danger-button { color: var(--danger); }
.danger-button { border-color: #664c4c; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Directly follows the supplied 56px dark chrome. */
.storefront-status-bar {
  anchor-name: --transfers-anchor;
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  height: 56px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
}
.storefront-status-brand { display: flex; width: max-content; align-items: center; gap: 10px; }
.subfolders-mark { display: grid; width: 28px; height: 28px; place-items: center; color: #eee; font-size: 27px; font-weight: 650; line-height: 1; }
.storefront-status-end { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.system-status { position: relative; width: 56px; height: 36px; }
.transfers-toggle {
  --transfer-progress: 0%;
  --transfer-ring: var(--paper);
  display: grid;
  width: 56px;
  height: 36px;
  padding: 0 8px;
  place-items: center;
  border-color: var(--line-2);
  background: #050505;
}
.transfer-stack { position: relative; display: grid; width: 28px; height: 22px; place-items: center; }
.transfer-stack::before, .transfer-stack::after {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: -1;
  border: 1px solid #444;
  border-radius: 50%;
  background: #0b0b0b;
  opacity: .45;
  transition: transform 140ms ease, opacity 140ms ease;
}
.transfer-stack::before { transform: translate(-2px, 2px); }
.transfer-stack::after { transform: translate(-1px, 1px); }
.transfer-ring { position: relative; display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: conic-gradient(var(--transfer-ring) var(--transfer-progress), #353535 0); }
.transfer-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; opacity: 0; }
.transfer-ring::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #050505; }
.transfer-ring strong { z-index: 1; color: #d8d8d4; font: 600 9px/1 var(--mono); }
.transfers-toggle:not(.has-transfers) { display: none; }
.transfers-toggle.has-transfers:hover .transfer-stack::before { opacity: .75; transform: translate(-5px, 5px); }
.transfers-toggle.has-transfers:hover .transfer-stack::after { opacity: .9; transform: translate(-2.5px, 2.5px); }
.transfers-toggle.is-active { --transfer-ring: #f0ae4d; }
.transfers-toggle.is-indeterminate .transfer-ring { background: #353535; }
.transfers-toggle.is-indeterminate .transfer-ring::before { opacity: 1; background: conic-gradient(transparent 0 64%, var(--transfer-ring) 64% 82%, transparent 82%); animation: transfer-spin 900ms linear infinite; }
.sync-state {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  width: max-content;
  max-width: min(340px, calc(100vw - 32px));
  padding: 6px 8px;
  overflow: hidden;
  border: 1px solid #303030;
  border-radius: 5px;
  background: #0b0b0bf2;
  color: #b8b8b4;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateY(-3px);
  transition: opacity 100ms linear, transform 100ms linear;
}
.transfers-toggle:hover + .sync-state, .transfers-toggle:focus-visible + .sync-state { opacity: 1; transform: none; }
@keyframes transfer-spin { to { transform: rotate(1turn); } }

main { width: min(1460px, 100%); margin: 0 auto; padding: 36px 20px 56px; }
body.sharing-view main { padding-bottom: 56px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(36px, 6vw, 72px); line-height: .94; letter-spacing: -.055em; font-weight: 650; }
.workspace-shell, .share-page { view-transition-name: workspace-surface; }
.workspace-shell { background: var(--bg); }
.share-page, .public-share { max-width: 960px; margin-inline: auto; }

/* Owner workspace uses the same line-based folder/detail system. */
.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  min-height: 82px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
}
.workspace-identity { min-width: 0; }
.location-switcher {
  anchor-name: --location-switcher-anchor;
  display: grid;
  width: max-content;
  max-width: 100%;
  height: auto;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}
.location-switcher:hover { border: 0; }
.location-switcher strong, .location-switcher span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-switcher strong { max-width: min(60vw, 650px); font-size: clamp(28px, 4vw, 48px); line-height: 1; letter-spacing: -.045em; font-weight: 650; }
.location-switcher span { max-width: min(60vw, 650px); color: var(--muted); font-size: 13px; }
#owner { display: flex; align-items: center; gap: 4px; }
.location-exposure { display: inline-flex; min-width: 0; align-items: center; gap: 4px; color: #bdbdb9 !important; }
.workspace-actions { display: flex; align-items: center; gap: 8px; }
#primary-action { min-width: 108px; }
.overflow-button { width: 36px; min-width: 36px; padding: 0; font-size: 18px; }
#file-input, #directory-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.workspace-body { display: grid; grid-template-columns: 340px minmax(0, 1fr); min-width: 0; }
.workspace { display: grid; grid-template-columns: minmax(360px, 44%) minmax(0, 1fr); min-width: 0; min-height: 520px; }
.discovery { min-width: 0; padding: 22px 22px 48px 0; border-right: 1px solid var(--line); }
.discovery-inner { position: sticky; top: 78px; display: grid; min-width: 0; gap: 14px; }
.discovery h2 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.discover-form { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 8px; min-width: 0; }
.discover-form input { width: 100%; min-width: 0; height: 42px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 7px; outline: 0; background: #050505; color: var(--fg); }
.discover-form input:focus-visible { border-color: #777; }
.discover-provider-menu { position: relative; }
.discover-provider-menu > summary { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; color: var(--fg); cursor: pointer; list-style: none; }
.discover-provider-menu > summary::-webkit-details-marker { display: none; }
.discover-provider-menu[open] > summary { border-color: #777; }
.discover-provider-options { position: absolute; z-index: 18; top: 48px; left: 0; display: grid; width: min(238px, calc(100vw - 36px)); padding: 6px; border: 1px solid var(--line-2); border-radius: 9px; background: #090909fa; box-shadow: 0 18px 54px #000d; }
.discover-provider-option { display: grid; width: 100%; height: 38px; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 0 9px; border: 0; background: transparent; text-align: left; }
.discover-provider-option:hover { border: 0; background: #171717; }
.discover-provider-option[aria-pressed="true"]::after { content: "✓"; color: #34c759; }
.discover-provider-icon { display: grid; width: 22px; height: 22px; place-items: center; color: #ddd; font-size: 13px; }
.discover-status { min-height: 15px; margin: -4px 0 0; color: var(--dim); font-size: 11px; }
.discover-feed { display: grid; min-width: 0; gap: 12px; }
.discover-preview { display: grid; grid-column: 1 / -1; min-width: 0; gap: 8px; padding: 10px 0 12px; border-block: 1px solid var(--line); }
.discover-preview[hidden] { display: none; }
.discover-preview header { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.discover-preview header > div { display: grid; min-width: 0; gap: 2px; }
.discover-preview header strong, .discover-preview header small { overflow-wrap: anywhere; }
.discover-preview header strong { font-size: 13px; font-weight: 590; }
.discover-preview header small, .discover-preview-status { color: var(--dim); font-size: 10px; }
.discover-preview-status { margin: 0; }
.discover-preview-close { width: 24px; min-width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: var(--dim); font-size: 17px; }
.discover-preview-close:hover { border: 0; color: var(--fg); }
.discover-preview .plugin-preview-surface { padding: 0; }
.provider-embed-preview { display: block; width: 100%; height: 166px; border: 0; background: #050505; }
.discover-preview .audio-waveform-control, .discover-preview .audio-waveform { height: 76px; }
.discover-results { display: grid; border-top: 1px solid var(--line); }
.discover-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: center; min-width: 0; padding: 11px 0; border-bottom: 1px solid var(--line); }
.discover-result-copy { display: grid; min-width: 0; gap: 2px; }
.discover-result-copy strong, .discover-result-copy small { overflow-wrap: anywhere; white-space: normal; }
.discover-result-copy strong { font-size: 13px; font-weight: 590; }
.discover-result-copy small { color: var(--dim); font-size: 10px; }
.discover-result > button, .discover-result > .provider-result-link { height: auto; min-height: 0; padding: 5px 0; border: 0; background: transparent; color: #bbb; font-size: 11px; text-decoration: none; }
.discover-result > button:hover, .discover-result > .provider-result-link:hover { border: 0; color: #fff; }
.discover-result > .discover-result-preview { display: grid; width: 100%; min-width: 0; justify-items: stretch; padding: 2px 0; color: var(--fg); text-align: left; }
.discover-result > .discover-result-preview:hover strong, .discover-result.is-previewing .discover-result-preview strong { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.provider-result-add { display: grid; width: 30px; min-width: 30px; height: 30px !important; place-items: center; padding: 0 !important; border: 1px solid var(--line-2) !important; border-radius: 50%; background: transparent !important; color: #bbb; font-size: 17px !important; line-height: 1; }
.provider-result-add:hover { border-color: #777 !important; color: #fff; }
.provider-result-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; min-width: max-content; }
.provider-result-actions > button:not(.provider-result-add) { padding: 5px 0; border: 0; background: transparent; color: #aaa; }
.provider-result-add.search-source-added, .provider-source-add.search-source-added { width: 32px; min-width: 32px; height: 32px !important; padding: 4.8px !important; border: 1px solid transparent !important; border-radius: 3px; background: transparent !important; color: #34c759; box-shadow: none; text-shadow: none; }
.provider-result-add.search-source-added:disabled, .provider-source-add.search-source-added:disabled { opacity: 1; cursor: default; }
.discover-sources { display: grid; grid-column: 1 / -1; padding-left: 10px; border-left: 1px solid var(--line-2); }
.discover-sources[hidden] { display: none; }
.discover-source { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.discover-source:first-child { border-top: 0; }
.discover-source-actions { display: flex; gap: 7px; align-items: center; }
.provider-source-download { min-width: 0; color: inherit; text-decoration: none; }
.provider-source-download:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.provider-source-add { display: grid; width: 30px; min-width: 30px; height: 30px; place-items: center; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; background: transparent; color: #bbb; font-size: 17px; line-height: 1; }
.provider-source-add:hover { border-color: #777; color: #fff; }
.discover-source-actions > span { color: var(--dim); font-size: 10px; }
.file-pane { position: relative; min-width: 0; padding: 18px 20px 30px; border-right: 1px solid var(--line); }
.file-pane-header { display: flex; min-height: 36px; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.file-pane-labels { display: grid; min-width: 0; flex: 1 1 auto; grid-template-columns: minmax(0, 1fr) 88px 62px; gap: 8px; align-items: center; color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.file-pane-labels > strong { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.file-pane-tools { display: flex; align-items: center; gap: 10px; }
.file-pane-tools button { height: auto; padding: 0; border: 0; background: transparent; color: var(--dim); font-size: 12px; }
.file-pane-tools button:hover { color: #fff; }
.view-as { color: var(--dim); font-size: 0; }
.view-as select { height: 28px; padding: 0 20px 0 7px; border: 1px solid var(--line); border-radius: 5px; background: #050505; color: var(--muted); font-size: 11px; }
.selection-actions { position: sticky; top: 56px; z-index: 3; display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 4px; border-block: 1px solid var(--line); background: var(--bg); }
.selection-actions > strong { color: var(--muted); font-size: 12px; font-weight: 500; }
.selection-actions > div { display: flex; gap: 10px; }
.selection-actions button { height: auto; padding: 0; border: 0; background: transparent; color: #bbb; font-size: 12px; }
.selection-actions .danger-action { color: var(--danger); }
.item-filters { display: flex; min-width: 0; gap: 6px; margin: -2px 0 10px; padding: 0 24px 8px 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; scrollbar-width: none; scroll-snap-type: x proximity; }
.item-filters::-webkit-scrollbar { display: none; }
.item-filter { height: 27px; padding: 0 10px; border-color: var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; scroll-snap-align: start; }
.item-filter[aria-pressed="true"] { border-color: #666; color: var(--fg); }
.tree ul { margin: 0; padding: 0 0 0 18px; list-style: none; }
.tree > ul { padding-left: 0; }
.tree li { border-bottom: 1px solid var(--line); }
.tree li li { border-bottom: 0; }
.tree-item {
  display: grid;
  grid-template-columns: 17px 12px minmax(0, 1fr) 88px 62px 16px auto;
  gap: 7px;
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 46px;
  align-items: center;
  padding: 9px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #d7d7d3;
  text-align: left;
}
.tree-item:hover, .tree-item.selected { color: #fff; }
.tree-item.focused .name { text-decoration: underline; text-decoration-color: #666; text-underline-offset: 4px; }
.selection-mark { display: grid; width: 15px; height: 15px; place-items: center; border: 1px solid #555; border-radius: 3px; }
.tree-item.selected .selection-mark { border-color: var(--paper); background: var(--paper); color: var(--paper-fg); }
.tree-item.selected .selection-mark::after { content: "✓"; font-size: 9px; font-weight: 800; }
.tree-item .disclosure { color: #777; transform: rotate(90deg); }
.tree-item[aria-expanded="false"] .disclosure { transform: none; }
.tree-item.leaf .disclosure { opacity: 0; }
.tree-item .glyph { display: none; }
.tree-item .name { overflow: hidden; font-size: 15px; letter-spacing: -.015em; text-overflow: ellipsis; white-space: nowrap; }
.item-fact { min-width: 0; color: var(--dim); font: 10px/1 var(--mono); text-align: right; }
.item-fact:empty { visibility: hidden; }
.item-kind-facts { display: flex; min-width: 0; align-items: center; justify-content: end; gap: 7px; }
.item-fact-type { overflow: hidden; color: var(--dim); text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.item-elevated-tag { display: none; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; overflow: hidden; border-radius: 50%; background: var(--signal-color, #777); color: #0b0b0b; font: 750 9px/1 var(--sans); letter-spacing: -.02em; }
.item-elevated-tag:not(:empty) { display: grid; }
.item-fact-size { opacity: var(--signal-luma, .55); white-space: nowrap; }
.tree-item small { color: var(--dim); font: 11px/1 var(--mono); }
.network-visibility { display: inline-grid; width: 16px; height: 16px; place-items: center; visibility: hidden; color: var(--muted); }
.network-visibility.active { visibility: visible; }
.network-visibility[data-gate="payment"] { opacity: .7; }
.network-visibility[data-gate="grant"] { opacity: .5; }
.network-globe { display: block; width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.tree[data-view="compact"] .tree-item { min-height: 33px; padding-block: 5px; }
.tree[data-view="compact"] .tree-item .name { font-size: 13px; }
.tree[data-view="compact"] .item-elevated-tag { width: 23px; height: 23px; flex-basis: 23px; font-size: 7px; }
.tree[data-view="compact"] ul { padding-left: 13px; }
.tree-more { width: 100%; height: 32px; padding: 0; border: 0; background: transparent; color: var(--dim); text-align: left; font-size: 11px; }
.tree-more:hover { color: #fff; }
.inspector { min-width: 0; padding: 36px 0 56px 40px; }
.item-detail { position: sticky; top: 92px; }
.empty-state, .bulk-selection { min-height: 360px; display: grid; align-content: center; gap: 10px; }
.empty-state { color: var(--muted); }
.empty-state h2, .bulk-selection h2 { margin: 0; color: var(--fg); font-size: clamp(28px, 5vw, 50px); line-height: 1; letter-spacing: -.045em; font-weight: 650; }
.empty-state p, .bulk-selection p { margin: 0; color: var(--muted); }
.bulk-selection > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.item-command-row { display: flex; justify-content: flex-end; margin-bottom: 18px; }
.item-command-cluster { display: inline-flex; height: 34px; align-items: stretch; overflow: hidden; border: 1px solid var(--line-2); border-radius: 7px; background: #050505; }
.item-command-cluster > button { height: 32px; min-width: 0; padding: 0 10px; border: 0; border-radius: 0; background: transparent; }
.item-command-cluster > button:hover { border: 0; background: #171717; }
.item-command-cluster > .overflow-button { width: 38px; padding: 0; border-left: 1px solid var(--line-2); font-size: 17px; }
.item-public-toggle { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.item-public-toggle[aria-checked="true"] { color: #e7e7e3; }
.item-public-toggle-track { position: relative; width: 26px; height: 15px; border-radius: 999px; background: #3a3a3a; transition: background 100ms linear; }
.item-public-toggle-track > span { position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #d8d8d4; transition: transform 100ms ease; }
.item-public-toggle[aria-checked="true"] .item-public-toggle-track { background: #34c759; }
.item-public-toggle[aria-checked="true"] .item-public-toggle-track > span { background: #071208; transform: translateX(11px); }
.item-heading { min-width: 0; }
.item-heading-copy { min-width: 0; }
.item-heading h2 { margin: 0; overflow-wrap: anywhere; font-size: clamp(30px, 5vw, 58px); line-height: .98; letter-spacing: -.05em; font-weight: 650; }
.item-heading p { margin: 9px 0 0; color: var(--muted); }
.item-duplicates { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 3px 8px; margin-top: 8px; color: var(--dim); font-size: 10px; }
.item-duplicates > button { max-width: min(100%, 440px); height: auto; padding: 0; overflow: hidden; border: 0; background: transparent; color: #999; font-size: 10px; text-decoration: underline; text-overflow: ellipsis; text-underline-offset: 3px; white-space: nowrap; }
.owner-image-preview { display: grid; min-height: 120px; margin-top: 26px; padding-top: 18px; place-items: center; border-top: 1px solid var(--line); background: #050505; }
.owner-image-preview img { display: block; width: auto; max-width: 100%; height: auto; max-height: min(48vh, 520px); object-fit: contain; }
.owner-image-preview-status { margin: 0; padding: 32px 16px; color: var(--muted); font-size: 12px; text-align: center; }
.owner-video-preview { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.owner-audio-preview { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.children-preview { margin-top: 26px; border-top: 1px solid var(--line); }
.children-preview-heading { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0 7px; color: var(--dim); font-size: 11px; }
.children-preview-list { display: grid; }
.children-preview-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; height: auto; min-height: 38px; gap: 18px; padding: 7px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--fg); text-align: left; }
.children-preview-row:hover, .children-preview-row:focus-visible { background: #111; outline: 0; }
.children-preview-row.outside-parent-share { opacity: .38; }
.children-preview-row.outside-parent-share:hover, .children-preview-row.outside-parent-share:focus-visible { opacity: .72; }
.children-preview-row:focus-visible { box-shadow: inset 2px 0 0 #bbb; }
.children-preview-name { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.children-preview-meta { display: inline-flex; align-items: center; justify-content: end; gap: 5px; color: var(--dim); font-size: 11px; white-space: nowrap; }
.children-preview-visibility { display: inline-grid; width: 13px; height: 13px; place-items: center; color: var(--muted); }
.children-preview-visibility .network-globe { width: 12px; height: 12px; }
.sharing-state { display: grid; gap: 12px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); }
.sharing-status { display: flex; align-items: center; gap: 10px; }
.sharing-status p { margin: 0; color: var(--muted); font-size: 12px; }
.access-badge { display: inline-flex; width: fit-content; flex: 0 0 auto; align-items: center; gap: 5px; color: #d8d8d4; font-size: 12px; font-weight: 600; letter-spacing: normal; text-transform: none; }
.access-badge[data-gate="private"] { color: var(--muted); }
.access-badge .network-globe { width: 13px; height: 13px; }
.share-copy-button { display: grid; width: min(360px, 100%); height: auto; min-height: 44px; gap: 3px; padding: 8px 13px; text-align: left; }
.share-copy-operation { font-size: 14px; font-weight: 700; }
.share-copy-subtitle { overflow: hidden; font-size: 11px; font-weight: 400; opacity: .76; text-overflow: ellipsis; white-space: nowrap; }
.analytics-grid { display: flex; flex-wrap: wrap; gap: 7px 16px; color: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.analytics-grid > span { display: inline-flex; gap: 4px; }
.analytics-grid strong { color: #aaa; font-weight: 500; }
.analytics-grid small { color: var(--dim); }
.text-action { width: max-content; height: auto; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.drop-active { outline: 1px solid #555; outline-offset: -5px; }
.root-drop-target { margin: 8px 0 0; padding: 12px 14px; border: 1px dashed #5a5a5a; border-radius: 7px; color: var(--muted); font-size: 12px; text-align: center; }
.root-drop-target.active { border-color: #a8a8a3; background: #151515; color: #fff; }
.tree-item.drop-item-active { box-shadow: inset 0 0 0 1px #aaa; background: #151515; }

/* Native popovers and menus stay compact. */
#item-actions-button { anchor-name: --item-actions-anchor; }
.item-actions-menu, .location-menu, .action-popover { position: fixed; margin: 8px 0 0; color: inherit; border: 1px solid #303030; border-radius: 8px; background: #0a0a0af5; box-shadow: 0 18px 54px #000c; position-try-fallbacks: flip-block, flip-inline; }
.item-actions-menu { position-anchor: --item-actions-anchor; inset: anchor(bottom) anchor(right) auto auto; width: min(238px, calc(100vw - 32px)); padding: 6px; }
.location-menu { position-anchor: --location-switcher-anchor; inset: anchor(bottom) auto auto anchor(left); width: min(340px, calc(100vw - 32px)); padding: 6px; }
.item-actions-menu::backdrop, .location-menu::backdrop, .action-popover::backdrop { background: transparent; }
.item-actions-menu > button, .item-actions-menu > .button, .location-list button, .location-actions > button, .location-actions > .button { display: grid; width: 100%; height: 38px; min-height: 0; align-items: center; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; color: #d9d9d5; text-align: left; user-select: none; }
.item-actions-menu > button:hover, .item-actions-menu > .button:hover, .location-list button:hover, .location-actions > button:hover, .location-actions > .button:hover { background: #171717; }
.item-actions-menu > [role="menuitemcheckbox"][aria-checked="true"]::after { content: "✓"; justify-self: end; color: #34c759; }
.item-actions-menu > [role="menuitemcheckbox"] { grid-template-columns: minmax(0, 1fr) auto; }
.item-actions-menu > hr, .location-menu > hr { height: 1px; margin: 5px; border: 0; background: var(--line); }
.location-list, .location-actions { display: grid; }
.location-actions > #undo-workspace, .location-actions > #redo-workspace { grid-template-columns: 1fr auto; }
.location-actions kbd { color: var(--dim); font: 10px/1 var(--mono); }
.location-actions > .danger-action { margin-top: 5px; border-top: 1px solid var(--line); border-radius: 0 0 5px 5px; }
.location-list button { position: relative; height: auto; min-height: 44px; gap: 2px; padding-right: 28px; }
.location-list button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-list button small { overflow: hidden; color: var(--dim); font: 10px/1.2 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.location-list button[aria-current="location"]::after { content: "✓"; position: absolute; right: 9px; color: var(--muted); }
#new-item { anchor-name: --new-item-anchor; }
#new-location { anchor-name: --new-location-anchor; }
#clear-location { anchor-name: --clear-location-anchor; }
#delete-selected { anchor-name: --delete-selection-anchor; }
#delete-item { anchor-name: --delete-item-anchor; }
.action-popover { width: min(330px, calc(100vw - 32px)); height: max-content; min-height: 0; max-height: calc(100dvh - 32px); margin: 0; padding: 14px; align-content: start; }
#new-item-popover { position-anchor: --new-item-anchor; inset: anchor(top) calc(anchor(left) + 8px) auto auto; }
#new-location-popover { position-anchor: --new-location-anchor; inset: anchor(top) calc(anchor(left) + 8px) auto auto; }
#clear-location-popover { position-anchor: --clear-location-anchor; inset: anchor(top) calc(anchor(left) + 8px) auto auto; }
#delete-selection-popover { position-anchor: --delete-selection-anchor; inset: anchor(bottom) auto auto anchor(left); margin-top: 8px; }
#delete-selection-popover.item-context { position-anchor: --delete-item-anchor; inset: anchor(bottom) anchor(right) auto auto; }
#revoke-link-popover { position-anchor: --revoke-link-anchor; inset: anchor(bottom) anchor(right) auto auto; margin-top: 8px; }
.action-popover form, .confirm-popover { display: grid; gap: 12px; }
.confirm-popover:not(:popover-open) { display: none; }
.action-popover label { display: grid; gap: 6px; color: #c1c1bd; font-size: 12px; }
.action-popover input:not([type="checkbox"]) { width: 100%; min-width: 0; height: 36px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 5px; background: #050505; color: var(--fg); }
.confirm-popover strong { font-size: 16px; }
.confirm-popover p { margin: 0; color: var(--muted); font-size: 12px; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 8px; }
.confirmation-preference { display: flex !important; grid-template-columns: auto 1fr; align-items: start; color: var(--dim) !important; font-size: 11px !important; }
.copy-fallback { position: fixed; left: -9999px; top: 0; }

/* Dedicated share and link routes. */
.share-page { min-height: min(690px, calc(100dvh - 148px)); background: var(--bg); }
#share-form { min-height: inherit; display: grid; grid-template-rows: auto 1fr auto; }
.share-page-header { display: grid; gap: 14px; padding: 0 0 22px; border-bottom: 1px solid var(--line); }
.share-page-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.share-back { width: max-content; height: auto; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 13px; }
.share-back:hover { color: #fff; }
.share-page-heading { display: grid; gap: 8px; min-width: 0; }
.share-page-heading h1 { overflow-wrap: anywhere; font-size: clamp(30px, 5vw, 58px); }
.share-page-heading p { max-width: 52ch; margin: 0; color: var(--muted); }
.share-page-body { display: grid; width: min(760px, 100%); gap: 24px; padding: 28px 0; }
.share-section { display: block; min-width: 0; margin: 0; padding: 0; border: 0; }
.share-section > legend, .share-section:not(fieldset) { color: #cfcfcb; font-size: 13px; font-weight: 600; }
.share-section > legend { margin-bottom: 8px; padding: 0; }
.share-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.share-choices.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.share-choice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; min-height: 64px; align-items: start; padding: 12px 10px; border-right: 1px solid var(--line); cursor: pointer; }
.share-choice:last-child { border-right: 0; }
.share-choice:has(input:checked) { background: #0b0b0b; }
.share-choice input { margin-top: 3px; accent-color: var(--paper); }
.share-choice span { display: grid; gap: 3px; }
.share-choice strong { color: var(--fg); font-size: 13px; }
.share-choice small { color: var(--dim); font-size: 11px; line-height: 1.3; }
.conditional-field { display: grid; gap: 7px; margin-top: 12px; }
.conditional-field > label { color: var(--muted); font-size: 12px; }
.money-input, .link-input { display: grid; align-items: center; overflow: hidden; border: 1px solid var(--line-2); border-radius: 6px; background: #050505; }
.money-input { grid-template-columns: auto minmax(0, 1fr) auto; }
.money-input > span { padding: 0 10px; color: var(--dim); font-size: 11px; }
.money-input input, .link-input input { min-width: 0; height: 38px; border: 0; outline: 0; background: transparent; color: var(--fg); }
.link-path { display: grid !important; gap: 8px; }
.link-input { display: flex; min-width: 0; }
.link-input > span { flex: 0 1 auto; min-width: 0; padding-left: 10px; overflow: hidden; color: var(--dim); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; direction: rtl; }
.link-input input { flex: 1 1 12ch; min-width: 9ch; padding-left: 2px; }
.share-page-actions { display: grid; width: min(760px, 100%); grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 0 0; border-top: 1px solid var(--line); }
.share-progress { min-width: 0; margin: 0; color: var(--muted); font-size: 12px; }
.share-page-actions button { min-width: 160px; }
.links-page { display: grid; grid-template-rows: auto 1fr auto; }
.links-page-header { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
.links-page-body { width: 100%; align-content: start; }
.links-list { display: grid; }
.plugins-page-body { width: 100%; }
.plugins-list { display: grid; border-top: 1px solid var(--line); }
.plugin-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.plugin-row > div:first-child { display: grid; gap: 4px; min-width: 0; }
.plugin-row strong { font-size: 15px; font-weight: 600; }
.plugin-row p, .plugin-row small { margin: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.plugin-row small { color: var(--dim); font-size: 11px; }
.plugin-row .plugin-capabilities { color: #a9a9a4; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.plugin-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: 7px; }
.plugin-controls > span { color: var(--dim); font-size: 11px; white-space: nowrap; }
.plugin-controls button { height: 30px; padding-inline: 10px; font-size: 12px; }
.search-page-body { width: 100%; align-content: start; }
.search-form { display: grid; gap: 8px; min-height: 0; }
.search-form > label { color: var(--muted); font-size: 12px; font-weight: 600; }
.search-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.search-field input { min-width: 0; height: 42px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 6px; background: #050505; color: var(--fg); font: inherit; }
.search-field button { min-width: 104px; }
.search-status { min-height: 16px; margin: 0; color: var(--dim); font-size: 11px; }
.search-results { display: grid; gap: 28px; }
.search-result-section { display: grid; }
.search-result-section > h2 { margin: 0; padding: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.search-result-list { display: grid; border-top: 1px solid var(--line); }
.search-result-row, .search-provider-callout { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; min-width: 0; padding: 13px 0; border-bottom: 1px solid var(--line); }
.search-result-copy { display: grid; gap: 3px; min-width: 0; }
.search-result-copy strong { overflow: hidden; font-size: 14px; font-weight: 560; text-overflow: ellipsis; white-space: nowrap; }
.search-result-copy p { margin: 0; overflow: hidden; color: var(--dim); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.global-search-result { width: 100%; color: inherit; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.global-search-result:hover, .global-search-result:focus-visible { background: #fff06; outline: 0; }
.global-search-result .search-result-copy strong, .global-search-result .search-result-copy p { white-space: normal; overflow-wrap: anywhere; }
.search-provider-callout { border-block: 1px solid var(--line); }
.search-provider-result > .search-source-list { grid-column: 1 / -1; }
.search-source-list { display: grid; min-width: 0; padding-left: 18px; border-left: 1px solid var(--line); }
.search-source-list[hidden] { display: none; }
.search-source-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; min-width: 0; padding: 9px 0; border-top: 1px solid var(--line); }
.search-source-row:first-child { border-top: 0; }
.search-source-actions { display: flex; align-items: center; justify-content: end; gap: 7px; }
.search-source-actions > span { color: var(--dim); font-size: 11px; }
.search-more { margin-top: 8px; }
.link-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.link-row-copy { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; align-items: center; min-width: 0; }
.link-row-copy .access-badge { grid-row: 1 / span 2; }
.link-row-copy > strong, .link-row-copy > p { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-row-copy > p { margin: 0; color: var(--dim); font-size: 11px; }
.link-row-actions { display: flex; gap: 7px; }
.link-row-actions > span { color: var(--danger); font-size: 11px; }
.compact-empty { min-height: 280px; }

/* Recipient folder view maps directly to the supplied list. */
.public-share { max-width: 960px; margin: 0 auto; }
.public-heading { display: grid; gap: 10px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.public-heading h1 { min-width: 0; overflow-wrap: anywhere; }
#public-items { display: grid; }
.public-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 18px; align-items: center; min-height: 70px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.public-item.public-root { grid-template-columns: minmax(0, 1fr) auto; }
.public-item strong, .public-item-title { min-width: 0; overflow: hidden; font-size: 18px; font-weight: 500; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.public-item-title { height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; line-height: inherit; text-align: left; }
.public-item-title:hover { border: 0; color: #fff; text-decoration: underline; text-decoration-color: #555; text-underline-offset: 4px; }
.public-item-title[aria-expanded="true"] { color: #fff; }
.public-item small { color: var(--dim); font: 11px/1.2 var(--mono); }
.public-item-actions { display: flex; align-items: center; justify-content: end; gap: 8px; }
.public-download { min-width: 108px; display: grid; place-items: center; }
.public-download.is-downloaded, .public-download.is-downloaded:hover, .public-download.is-downloaded:active { width: 32px; min-width: 32px; height: 32px; padding: 4.8px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: #34c759; box-shadow: none; text-shadow: none; }
.downloaded-icon { display: block; width: 18.4px; height: 18.4px; fill: none; stroke: currentColor; }
.downloaded-icon circle { fill: currentColor; stroke: none; }
.downloaded-icon path { stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.transfer-meter { display: grid; grid-column: 1 / -1; gap: 6px; min-width: 0; }
.transfer-meter progress { width: 100%; height: 4px; border: 0; overflow: hidden; accent-color: var(--paper); background: var(--line); }
.transfer-meter progress::-webkit-progress-bar { background: var(--line); }
.transfer-meter progress::-webkit-progress-value { background: var(--paper); }
.transfer-meter small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plugin-preview-surface { display: grid; grid-column: 1 / -1; gap: 10px; min-width: 0; padding: 8px 0 4px; }
.plugin-preview-surface[hidden] { display: none; }
.browser-image-preview { display: block; width: auto; max-width: 100%; height: auto; max-height: min(68vh, 720px); margin: 0 auto; object-fit: contain; }
.browser-video-home { width: 100%; aspect-ratio: 16 / 9; background: #050505; }
.browser-video-preview { display: block; width: 100%; height: 100%; background: #050505; object-fit: contain; }
.audio-waveform-control { position: relative; min-width: 0; height: 112px; background: #050505; }
.audio-waveform-control:focus-within { outline: 1px solid var(--fg); outline-offset: 2px; }
.audio-waveform { display: block; width: 100%; height: 112px; background: #050505; pointer-events: none; }
.audio-waveform-seek { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; touch-action: pan-y; }
.audio-preview-controls { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 12px; }
.audio-preview-controls button { height: auto; min-height: 0; padding: 5px 0; border: 0; background: transparent; color: var(--fg); font-size: 12px; }
.audio-preview-controls small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audio-preview-controls small:last-child { margin-left: auto; }
.music-analysis-facts { display: block; color: var(--dim); font: 10px/1.4 var(--mono); }
.music-cue-list { display: flex; flex-wrap: wrap; gap: 6px; }
.music-cue { min-height: 0; padding: 4px 7px; border: 1px solid var(--line-2); border-radius: 4px; background: transparent; color: var(--muted); font: 10px/1.2 var(--mono); }
.music-cue:hover { border-color: var(--fg); color: var(--fg); }
.music-lyric-line { margin: 0; color: var(--fg); font-size: 13px; line-height: 1.45; }
.media-continuation-slot { position: fixed; z-index: 60; right: 16px; bottom: 16px; width: min(920px, calc(100vw - 32px)); pointer-events: none; }
.video-pip-card { width: min(320px, 100%); margin-left: auto; overflow: hidden; border: 1px solid #303030; border-radius: 10px; background: #090909; box-shadow: 0 16px 54px #000b; pointer-events: auto; view-transition-name: visual-continuation; }
.video-pip-frame { width: 100%; aspect-ratio: 16 / 9; background: #050505; }
.video-pip-frame .browser-video-preview { width: 100%; height: 100%; }
.video-pip-bar { display: grid; height: 38px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 0 8px 0 10px; }
.video-pip-bar strong { overflow: hidden; font-size: 12px; font-weight: 560; text-overflow: ellipsis; white-space: nowrap; }
.video-pip-close { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #777; font-size: 17px; }
.video-pip-close:hover { border: 0; background: #151515; color: #ddd; }
.audio-pip-card { overflow: hidden; border: 1px solid #303030; border-radius: 10px; background: #090909; box-shadow: 0 16px 54px #000b; pointer-events: auto; view-transition-name: visual-continuation; }
.audio-pip-card .browser-audio-home { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px 6px; }
.audio-pip-card .audio-waveform-control, .audio-pip-card .audio-waveform { height: 62px; }
.audio-pip-card .audio-preview-controls { min-width: 150px; }
.audio-pip-bar { display: grid; height: 34px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 0 8px 0 12px; border-top: 1px solid var(--line); }
.audio-pip-bar strong { overflow: hidden; font-size: 12px; font-weight: 560; text-overflow: ellipsis; white-space: nowrap; }
.public-item[data-depth="1"] { padding-left: 22px; }
.public-item[data-depth="2"] { padding-left: 44px; }
.payment-gate { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.payment-gate p { margin: 0; }

/* Dense transfer data is isolated from the normal file UI. */
.transfer-panel { position: fixed; position-anchor: --transfers-anchor; z-index: 30; inset: calc(anchor(bottom) + 8px) anchor(right) auto auto; width: min(720px, calc(100vw - 32px)); margin: 0; padding: 0; border: 1px solid #303030; border-radius: 9px; background: #0a0a0af5; color: inherit; box-shadow: 0 18px 54px #000c; position-try-fallbacks: flip-block, flip-inline; }
.transfer-panel::backdrop { background: transparent; }
.transfer-panel > header { min-height: 58px; padding: 12px 48px 12px 16px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.transfer-panel h2 { margin: 0; font-size: 20px; }
.close { position: absolute; top: 10px; right: 10px; width: 36px; padding: 0; border: 0; background: transparent; font-size: 20px; }
.transfer-table-wrap { width: 100%; }
.transfer-panel table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.transfer-panel th, .transfer-panel td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.transfer-panel th { background: #0a0a0a; color: var(--dim); font-size: 10px; font-weight: 500; }
.transfer-panel th:first-child { width: 27%; }
.transfer-panel th:nth-child(2) { width: 10%; }
.transfer-panel th:nth-child(3) { width: 14%; }
.transfer-panel th:nth-child(4) { width: 24%; }
.transfer-panel th:nth-child(5) { width: 12%; }
.transfer-panel th:last-child { width: 13%; }
.transfer-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transfer-direction, .transfer-status, .transfer-speed { color: var(--muted); font-size: 11px; }
.transfer-progress { display: grid; gap: 4px; }
.transfer-progress progress { width: 100%; height: 4px; accent-color: var(--paper); }
.transfer-progress small { color: var(--dim); font: 10px/1 var(--mono); }
.transfer-control { min-width: 70px; }
.transfer-empty td { padding: 28px 12px; color: var(--muted); text-align: center; }
.toast { position: fixed; left: 50%; bottom: 20px; z-index: 40; padding: 9px 12px; border-radius: 6px; background: var(--paper); color: var(--paper-fg); box-shadow: 0 12px 40px #0009; transform: translateX(-50%); }

@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 210ms; animation-timing-function: cubic-bezier(.2, .72, .2, 1); }
::view-transition-old(root) { animation: 140ms ease both vt-fade-out; }
::view-transition-new(root) { animation: 180ms ease both vt-fade-in; }
::view-transition-group(workspace-surface) { animation-duration: 210ms; animation-timing-function: cubic-bezier(.2, .72, .2, 1); }
::view-transition-old(workspace-surface) { animation: 140ms ease both vt-fade-out; }
::view-transition-new(workspace-surface) { animation: 180ms ease both vt-fade-in; }
@keyframes vt-fade-out { to { opacity: .72; } }
@keyframes vt-fade-in { from { opacity: .72; } }

@supports not (position-anchor: --item-actions-anchor) {
  .item-actions-menu, .transfer-panel, .action-popover { inset: 64px 16px auto auto; }
  .location-menu { inset: 130px auto auto 20px; }
}

@media (max-width: 1040px) {
  main { width: min(1000px, 100%); }
  .workspace-body { grid-template-columns: 1fr; }
  .discovery { padding: 18px 0 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .discovery-inner { position: static; grid-template-columns: 1fr; gap: 10px; }
  .discovery h2 { padding-top: 0; }
  .discover-form, .discover-status, .discover-feed { grid-column: 1; grid-row: auto; }
}

@media (max-width: 700px) {
  .storefront-status-bar { padding: 0 14px; }
  main { width: 100%; padding: 26px 14px 40px; }
  .toolbar { align-items: start; }
  .location-switcher strong { max-width: calc(100vw - 160px); font-size: 30px; }
  .location-switcher span { max-width: calc(100vw - 160px); }
  #primary-action { min-width: 96px; }
  .workspace { grid-template-columns: 1fr; }
  .discovery-inner { grid-template-columns: 1fr; gap: 10px; }
  .discovery h2 { padding-top: 0; }
  .discover-form, .discover-status, .discover-feed { grid-column: 1; grid-row: auto; }
  .file-pane { padding-right: 0; padding-left: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .inspector { padding: 28px 0 44px; }
  .item-heading h2 { font-size: clamp(28px, 8vw, 40px); }
  .sharing-state { margin-top: 24px; padding-top: 14px; }
  .item-detail { top: 72px; }
  .share-page { min-height: calc(100dvh - 122px); }
  .share-choices, .share-choices.two-up { grid-template-columns: 1fr; }
  .share-choice { min-height: 54px; border-right: 0; border-bottom: 1px solid var(--line); }
  .share-choice:last-child { border-bottom: 0; }
  .share-page-actions { grid-template-columns: 1fr; gap: 8px; justify-content: stretch; }
  .share-page-actions button { width: 100%; }
  .share-page input, .action-popover input:not([type="checkbox"]) { font-size: 16px; }
  .links-page-header { grid-template-columns: 1fr; }
  .plugin-row { grid-template-columns: 1fr; gap: 10px; }
  .plugin-controls { justify-content: flex-start; }
  .search-field { grid-template-columns: 1fr; }
  .search-field button { width: 100%; }
  .search-result-row, .search-provider-callout { grid-template-columns: minmax(0, 1fr) auto; }
  .search-source-row { grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
  .search-source-actions { justify-content: end; }
  .link-row { grid-template-columns: 1fr; gap: 10px; }
  .link-row-actions { justify-content: flex-start; }
  .public-item { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; }
  .public-item small { grid-column: 1; }
  .public-item-actions { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; align-items: end; gap: 2px; }
  .public-download { min-width: 96px; }
  .payment-gate { grid-template-columns: 1fr; }
  .transfer-panel { width: calc(100vw - 28px); }
  .transfer-panel table { min-width: 700px; }
  .media-continuation-slot { right: 10px; bottom: 10px; width: calc(100vw - 20px); }
  .audio-pip-card .browser-audio-home { grid-template-columns: 1fr; gap: 4px; }
  .audio-pip-card .audio-waveform-control, .audio-pip-card .audio-waveform { height: 54px; }
  .audio-pip-card .audio-preview-controls { min-width: 0; }
}

@media (max-width: 430px) {
  main { padding-inline: 0; }
  .toolbar, .discovery, .file-pane-header, .item-filters, .selection-actions, .tree, .inspector { padding-inline: 14px; }
  .toolbar { padding-bottom: 18px; }
  .workspace-actions { gap: 6px; }
  .location-switcher strong { max-width: calc(100vw - 150px); }
  .share-page-header, .share-page-body, .share-page-actions { margin-inline: 14px; }
  .links-page-body { width: auto; margin-inline: 14px; }
  .public-share { padding-inline: 14px; }
  .share-copy-subtitle { white-space: normal; }
  .tree-item { grid-template-columns: 17px 12px minmax(0, 1fr) 72px 16px auto; }
  .tree-item .item-fact-size { display: none; }
  .file-pane-labels { grid-template-columns: minmax(0, 1fr) 72px; }
  .file-pane-labels span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation-duration: .001ms !important; }
  .transfer-stack::before, .transfer-stack::after, .sync-state { transition: none; }
  .transfers-toggle.is-indeterminate .transfer-ring::before { animation: none; }
}
