@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: block;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-semibold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: block;
}

:root {
  color-scheme: light;
  --efs-color-background: #ffffff;
  --efs-color-foreground: #111111;
  --efs-color-text-muted: #6b6b6b;
  --efs-color-border: #e8e8e8;
  --efs-color-surface: #f6f6f6;
  --efs-color-primary: #2563eb;
  --efs-color-primary-tint: #eff6ff;
  --efs-color-success: #16803a;
  --efs-color-warning: #d97706;
  --efs-color-error: #d92d20;
  --efs-border-tableDivider: 1px solid var(--efs-color-border);
  --efs-font-interface: "Inter", system-ui, sans-serif;
  --efs-font-monospace: "SFMono-Regular", Consolas, monospace;
  --efs-type-size-xs: 11px;
  --efs-type-size-sm: 12px;
  --efs-type-size-md: 14px;
  --efs-type-size-lg: 16px;
  --efs-type-size-xl: 20px;
  --efs-type-lineHeight-tight: 1.2;
  --efs-type-lineHeight-normal: 1.4;
  --efs-type-weight-regular: 400;
  --efs-type-weight-medium: 500;
  --efs-type-weight-bold: 600;
  --efs-radius-control: 4px;
  --efs-radius-field: 4px;
  --efs-radius-panel: 6px;
  --efs-radius-dialog: 8px;
  --efs-radius-menu: 6px;
  --efs-radius-thumbnail: 0px;
  --efs-spacing-pageGutter: 20px;
  --efs-spacing-controlPadding: 8px;
  --efs-spacing-iconVisualInset: 8px;
  --efs-spacing-componentGap: 6px;
  --efs-spacing-sectionGap: 20px;
  --efs-metric-toolbarHeight: 48px;
  --efs-metric-headerHeight: var(--efs-metric-toolbarHeight);
  --efs-metric-rowHeight: 36px;
  --efs-metric-controlHeight: 32px;
  --efs-metric-thumbnailSize: 96px;
  --efs-metric-targetMinimum: 44px;
  --efs-motion-duration-fast: 90ms;
  --efs-motion-duration-normal: 150ms;
  --efs-motion-easing: cubic-bezier(.2, 0, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --efs-color-background: #0f0f0f;
    --efs-color-foreground: #f5f5f5;
    --efs-color-text-muted: #a8a8a8;
    --efs-color-border: #303030;
    --efs-color-surface: #181818;
    --efs-color-primary: #8bb0ff;
    --efs-color-primary-tint: #172442;
    --efs-color-success: #66d58a;
    --efs-color-warning: #f5ba5c;
    --efs-color-error: #ff9189;
  }

  :root:not([data-theme]) .brand-mark:not([data-theme-media]),
  :root:not([data-theme]) .entry-mark:not([data-theme-media]) { filter: invert(1); }
}

html[data-appearance="dark"] { color-scheme: dark; }
html[data-appearance="dark"] .brand-mark:not([data-theme-media]),
html[data-appearance="dark"] .entry-mark:not([data-theme-media]) { filter: invert(1); }

* { box-sizing: border-box; }

html {
  min-width: 320px;
  min-height: 100%;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  background: var(--efs-color-background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--efs-color-background);
  color: var(--efs-color-foreground);
  font-family: var(--efs-font-interface);
  font-size: var(--efs-type-size-md);
  font-weight: var(--efs-type-weight-regular);
  line-height: var(--efs-type-lineHeight-normal);
  text-rendering: optimizeLegibility;
}

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

button,
.button,
select,
input:not([type="checkbox"]):not([type="radio"]) {
  min-height: var(--efs-metric-controlHeight);
  border: 1px solid var(--efs-color-border);
  border-radius: var(--efs-radius-control);
}

button,
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: 5px 10px;
  background: var(--efs-color-background);
  color: var(--efs-color-foreground);
  font-weight: var(--efs-type-weight-medium);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--efs-motion-duration-fast) var(--efs-motion-easing), border-color var(--efs-motion-duration-fast) var(--efs-motion-easing), color var(--efs-motion-duration-fast) var(--efs-motion-easing), transform var(--efs-motion-duration-fast) var(--efs-motion-easing);
}

button::after,
.button::after {
  position: absolute;
  inset: 50% auto auto 50%;
  width: max(100%, var(--efs-metric-targetMinimum));
  height: max(100%, var(--efs-metric-targetMinimum));
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
}
table button::after { content: none; }

button:hover,
.button:hover { background: var(--efs-color-surface); }
button:active,
.button:active { transform: translateY(1px); }
button:disabled { color: var(--efs-color-text-muted); cursor: default; opacity: .55; }

.primary {
  border-color: var(--efs-color-foreground);
  background: var(--efs-color-foreground);
  color: var(--efs-color-background);
}
.primary:hover { background: var(--efs-color-foreground); }
.secondary { background: var(--efs-color-surface); }
.quiet { border-color: transparent; background: transparent; }
.danger { border-color: var(--efs-color-error); background: var(--efs-color-error); color: var(--efs-color-background); }
.danger:hover { background: var(--efs-color-error); }
.icon-button {
  width: var(--efs-metric-controlHeight);
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--efs-color-text-muted);
}
.icon-button:hover { background: transparent; color: var(--efs-color-foreground); }
.icon-button.danger,
.icon-button.danger:hover { background: transparent; color: var(--efs-color-error); }
.app-icon { display: block; width: 16px; height: 16px; fill: none; stroke: currentcolor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tooltip-anchor { anchor-name: --efs-action-tooltip-anchor; }
.action-tooltip {
  position: fixed;
  position-anchor: --efs-action-tooltip-anchor;
  position-area: top center;
  position-try-fallbacks: bottom;
  z-index: 300;
  width: max-content;
  max-width: min(240px, calc(100vw - 12px));
  padding: 3px 6px;
  background: var(--efs-color-foreground);
  color: var(--efs-color-background);
  font-size: var(--efs-type-size-xs);
  font-weight: var(--efs-type-weight-regular);
  line-height: var(--efs-type-lineHeight-tight);
  margin: 6px;
  pointer-events: none;
  text-align: left;
  white-space: normal;
}
.wide { width: 100%; }

:focus-visible {
  outline: 2px solid var(--efs-color-primary);
  outline-offset: 2px;
}

a { color: inherit; }
[hidden] { display: none !important; }

h1,
h2,
p { margin-block-start: 0; }
h1 { margin-block-end: 0; font-size: var(--efs-type-size-xl); font-weight: var(--efs-type-weight-bold); line-height: var(--efs-type-lineHeight-tight); }
h2 { margin-block-end: 12px; font-size: var(--efs-type-size-lg); font-weight: var(--efs-type-weight-bold); }
.muted,
.field-help { color: var(--efs-color-text-muted); }
.eyebrow { margin-block-end: 5px; color: var(--efs-color-text-muted); font-size: var(--efs-type-size-xs); font-weight: var(--efs-type-weight-bold); letter-spacing: .08em; text-transform: uppercase; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  inset: 8px auto auto 8px;
  padding: 7px 10px;
  background: var(--efs-color-foreground);
  color: var(--efs-color-background);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.app-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  min-height: var(--efs-metric-headerHeight);
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding-inline: var(--efs-spacing-pageGutter);
  background: var(--efs-color-background);
}

.brand {
  display: inline-flex;
  min-height: var(--efs-metric-targetMinimum);
  align-items: center;
  gap: 9px;
  color: var(--efs-color-foreground);
  font-size: 15px;
  font-weight: var(--efs-type-weight-bold);
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand-mark { display: block; width: 32px; height: auto; }
.mobile-navigation-toggle,
.mobile-navigation { display: none; }
.account-actions { display: flex; width: auto; align-items: stretch; justify-content: flex-end; gap: 4px; }
.header-transfer-status {
  display: flex;
  min-width: 0;
  min-height: var(--efs-metric-controlHeight);
  align-items: center;
  gap: 5px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-weight: var(--efs-type-weight-regular);
}
.header-transfer-status:hover { background: transparent; }
.header-transfer-status:active { transform: none; }
.header-transfer-summary {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: var(--efs-color-text-muted);
  font-size: var(--efs-type-size-xs);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.header-transfer-summary > span { overflow: hidden; text-align: end; text-overflow: ellipsis; }
#header-transfer-percent { width: 4ch; }
#header-transfer-speed { width: 11ch; }
#header-transfer-eta { width: 10ch; }
#header-transfer-count { width: 10ch; }
.header-transfer-summary > span + span::before { margin-inline-end: 5px; color: var(--efs-color-border-strong); content: "·"; }
.transfer-launcher-icon {
  display: grid;
  width: var(--efs-metric-controlHeight);
  height: var(--efs-metric-controlHeight);
  flex: 0 0 var(--efs-metric-controlHeight);
  place-items: center;
  color: var(--efs-color-text-muted);
}
.header-signout {
  min-height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}
.header-signout:hover { background: transparent; }
.header-report { flex: 0 0 var(--efs-metric-controlHeight); align-self: center; }
.transfer-launcher[aria-expanded="true"] { color: var(--efs-color-foreground); }
#app[data-state="loading"] #account-actions[hidden] { display: flex !important; visibility: hidden; }
.account-actions:not([hidden]) > .header-transfer-status[hidden],
#app[data-state="loading"] .header-transfer-status[hidden] { display: flex !important; visibility: hidden; }

.entry-view {
  display: grid;
  width: min(100% - 32px, 320px);
  min-height: calc(100vh - var(--efs-metric-headerHeight));
  align-content: center;
  justify-items: stretch;
  gap: 14px;
  margin-inline: auto;
  padding-block: 40px;
}
.entry-view h1 { text-align: center; }
.entry-mark { justify-self: center; width: 94px; height: auto; }
.entry-actions,
.entry-form { display: grid; gap: 12px; }
.entry-field { display: grid; gap: 4px; }
.entry-form label { color: var(--efs-color-text-muted); font-size: var(--efs-type-size-xs); }
#registration-view { gap: 12px; }
#registration-form button[type="submit"] { margin-block-start: 2px; }
.text-link { justify-self: center; padding: 8px; color: var(--efs-color-text-muted); font-size: var(--efs-type-size-sm); }

.toast-region {
  position: fixed;
  z-index: 90;
  right: 16px;
  bottom: 16px;
  display: grid;
  width: min(calc(100% - 32px), 360px);
  gap: 8px;
  pointer-events: none;
}
.toast {
  --efs-toast-accent: var(--efs-color-primary);
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--efs-color-border);
  border-inline-start: 3px solid var(--efs-toast-accent);
  border-radius: var(--efs-radius-panel);
  padding: 8px 10px 8px 12px;
  background: var(--efs-color-surface);
  color: var(--efs-color-foreground);
  pointer-events: auto;
  animation: toast-enter var(--efs-motion-duration-normal) var(--efs-motion-easing);
}
.toast.info { --efs-toast-accent: var(--efs-color-primary); }
.toast.success { --efs-toast-accent: var(--efs-color-success); }
.toast.warning { --efs-toast-accent: var(--efs-color-warning); }
.toast.error { --efs-toast-accent: var(--efs-color-error); }
.toast-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.toast .icon-button,
.toast .icon-button:hover { color: inherit; }
.toast button { border-color: transparent; background: transparent; color: inherit; }
@keyframes toast-enter { from { opacity: 0; transform: translateY(6px); } }

.app-frame {
  display: block;
  height: calc(100vh - var(--efs-metric-headerHeight));
  height: calc(100dvh - var(--efs-metric-headerHeight));
  min-height: calc(100vh - var(--efs-metric-headerHeight));
  overflow: hidden;
}

.app-tabs {
  min-width: 0;
  height: 100%;
  align-items: stretch;
  justify-content: flex-start;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.app-tabs::-webkit-scrollbar { display: none; }
.app-tabs .tab { min-height: 100%; padding-inline: 10px; text-decoration: none; }
#app:not([data-state="authenticated"]) .app-tabs { visibility: hidden; pointer-events: none; }

.app-content { min-width: 0; height: 100%; overflow: auto; }
.view,
.public-layout { width: 100%; min-width: 0; padding: 18px var(--efs-spacing-pageGutter) 48px; }
.file-browser-view { height: 100%; min-height: 0; padding-block-end: 0; }
.file-browser-host { width: 100%; height: 100%; min-height: 0; }
#file-browser-surface { display: flex; width: 100%; height: 100%; min-height: 0; flex-direction: column; }
#file-browser-surface > .surface-header,
#file-browser-surface > .drive-control-stack,
#file-browser-surface > .drive-breadcrumb-row { flex: 0 0 auto; }
.loading-content { display: flex; flex-direction: column; }
.loading-content > .surface-header,
.loading-content > .drive-control-stack,
.loading-content > .drive-breadcrumb-row { flex: 0 0 auto; }
#file-browser-surface:not([data-access="owner"]) .owner-only { display: none !important; }
#file-browser-surface[data-access="public"] .selectable-only { display: none !important; }
#file-browser-surface .trash-only { display: none !important; }
#file-browser-surface[data-access="trash"] .trash-only { display: flex !important; }
#file-browser-surface[data-access="trash"] .drive-breadcrumb-row { display: none; }

.loading-shell { min-height: calc(100vh - var(--efs-metric-headerHeight)); }
.loading-shell { position: fixed; z-index: 40; inset: var(--efs-metric-headerHeight) 0 0; width: 100%; height: calc(100dvh - var(--efs-metric-headerHeight)); background: var(--efs-color-background); }
.loading-content { min-height: 0; }
.loading-item-row span,
.loading-media-item {
  display: block;
  border-radius: var(--efs-radius-control);
  background: var(--efs-color-surface);
}
.loading-table { height: 100%; min-height: 0; contain: strict; overflow: hidden; }
.loading-item-row { pointer-events: none; }
.loading-item-row:hover { background: transparent; }
.loading-item-row span { width: min(55%, 180px); height: 8px; }
.loading-file-row td:first-child span { width: 14px; height: 14px; }
.loading-file-row td:nth-child(3) span { width: 52px; margin-inline-start: auto; }
.loading-file-row td:nth-child(4) span { width: 96px; }
.loading-file-row td:nth-child(5) span,
.loading-trash-row td:nth-child(3) span,
.loading-user-row td:nth-child(4) span { width: 112px; }
.loading-file-row td:last-child span { width: 184px; margin-inline-start: auto; }
.loading-trash-row td:last-child span { width: 70px; margin-inline-start: auto; }
.loading-user-row td:last-child span { width: min(100%, 280px); margin-inline-start: auto; }
.loading-media-layer { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(6rem, 100%), 1fr)); }
.loading-media-item { aspect-ratio: 1; border-radius: 0; }

.surface-header {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block-end: 10px;
}
.drive-header { align-items: flex-start; }
.location-heading { display: flex; min-width: 0; align-items: baseline; gap: 12px; }
.heading-actions,
.command-bar,
.panel-heading,
.dialog-actions,
.preview-actions,
.row-actions,
.record-actions { display: flex; align-items: center; gap: 6px; }
.panel-heading { justify-content: space-between; }

.breadcrumbs {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  color: var(--efs-color-text-muted);
  white-space: nowrap;
}
.breadcrumbs button { min-height: 28px; overflow: hidden; border-color: transparent; padding: 3px 5px; background: transparent; color: inherit; text-overflow: ellipsis; }
.breadcrumb-separator { opacity: .55; }
.drive-breadcrumbs { min-height: 30px; padding-block: 1px; }
.drive-breadcrumb-row { display: flex; min-width: 0; min-height: 30px; align-items: center; justify-content: space-between; gap: 12px; }
.drive-breadcrumb-row .breadcrumbs { flex: 1 1 auto; }
.path-aggregate { min-width: 9rem; flex: 0 0 auto; color: var(--efs-color-text-muted); font-size: var(--efs-type-size-xs); font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; }
.path-aggregate.pending { visibility: hidden; }
.loading-path-aggregate { visibility: hidden; }

.drive-controls {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  padding-block: 5px;
}
.drive-control-stack { display: block; }
.search-field {
  display: flex;
  min-width: 12rem;
  flex: 1 1 24rem;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--efs-color-border);
  border-radius: var(--efs-radius-field);
  padding-inline: 8px;
  background: var(--efs-color-background);
  color: var(--efs-color-text-muted);
}
.search-field input { width: 100%; min-height: 30px !important; border: 0 !important; padding: 0; outline: 0; background: transparent; color: var(--efs-color-foreground); }
.compact-field { display: flex; width: 132px; flex: 0 0 132px; align-items: center; gap: 5px; color: var(--efs-color-text-muted); font-size: var(--efs-type-size-xs); }
.compact-field select { width: 0; min-width: 0; flex: 1 1 auto; }
select {
  appearance: none;
  padding: 4px 32px 4px var(--efs-spacing-controlPadding);
  background-color: var(--efs-color-background);
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 16px) 50%;
  background-size: 4px 4px;
  background-repeat: no-repeat;
  color: var(--efs-color-foreground);
}
input:not([type="checkbox"]):not([type="radio"]) { padding: 4px 7px; background: var(--efs-color-background); color: var(--efs-color-foreground); }
input[type="checkbox"],
input[type="radio"] { accent-color: var(--efs-color-primary); }

.presentation-choice { display: flex; flex: 0 0 auto; margin: 0; border: 1px solid var(--efs-color-border); border-radius: var(--efs-radius-control); padding: 0; overflow: hidden; }
.presentation-choice input { position: absolute; opacity: 0; pointer-events: none; }
.presentation-choice label { display: grid; width: 32px; height: 30px; place-items: center; color: var(--efs-color-text-muted); cursor: pointer; }
.presentation-choice input:checked + label { background: var(--efs-color-primary-tint); color: var(--efs-color-primary); }
.presentation-choice input:focus-visible + label { outline: 2px solid var(--efs-color-primary); outline-offset: -2px; }

.filter-disclosure,
.drive-controls > button.secondary { width: 64px; flex: 0 0 64px; }
.filter-disclosure { position: relative; }
.filter-disclosure summary { display: flex; width: 100%; min-height: 32px; align-items: center; justify-content: center; gap: 4px; border: 1px solid var(--efs-color-border); border-radius: var(--efs-radius-control); padding: 6px 7px; list-style: none; cursor: pointer; }
.filter-disclosure summary::-webkit-details-marker { display: none; }
.filter-count {
  display: inline-grid;
  min-width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 999px;
  padding-inline: 4px;
  background: var(--efs-color-primary-tint);
  color: var(--efs-color-primary);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}
.filter-count[hidden] { display: none; }
.metadata-filters {
  position: absolute;
  z-index: 30;
  inset: calc(100% + 4px) 0 auto auto;
  display: grid;
  width: min(480px, calc(100vw - 24px));
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--efs-color-border);
  border-radius: var(--efs-radius-menu);
  padding: 8px;
  background: var(--efs-color-background);
}
.metadata-filters label { display: grid; gap: 3px; color: var(--efs-color-text-muted); font-size: var(--efs-type-size-xs); }
.metadata-filter-clear { grid-column: 1 / -1; justify-self: end; }

.selection-bar {
  position: fixed;
  z-index: 80;
  inset: auto auto max(12px, env(safe-area-inset-bottom)) 50%;
  display: flex;
  width: max-content;
  max-width: calc(100vw - 24px);
  min-height: 40px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--efs-color-border);
  border-radius: var(--efs-radius-panel);
  padding: 4px 8px;
  overflow-x: auto;
  background: var(--efs-color-background);
  color: var(--efs-color-foreground);
  transform: translateX(-50%);
  animation: selection-enter var(--efs-motion-duration-fast) var(--efs-motion-easing);
}
.selection-bar strong { margin-inline-end: 4px; white-space: nowrap; }
.selection-bar .icon-button { flex: 0 0 var(--efs-metric-controlHeight); }
#app[data-selection-active="true"] .toast-region { bottom: 64px; }
@keyframes selection-enter { from { opacity: 0; } }

.file-workspace { position: relative; width: 100%; min-height: 0; flex: 1; }
.drop-hint {
  position: absolute;
  z-index: 25;
  inset: 8px;
  display: none;
  place-items: center;
  border: 2px solid var(--efs-color-primary);
  background: color-mix(in srgb, var(--efs-color-primary-tint) 92%, transparent);
  color: var(--efs-color-primary);
  font-size: var(--efs-type-size-lg);
  font-weight: var(--efs-type-weight-bold);
  pointer-events: none;
}
.drop-target.dragging .drop-hint { display: grid; }

.state-panel { min-height: 42px; border-bottom: var(--efs-border-tableDivider); padding: 12px 8px; color: var(--efs-color-text-muted); }
.state-panel.error { color: var(--efs-color-error); }
#drive-state {
  position: absolute;
  z-index: 6;
  inset: var(--efs-metric-rowHeight) 0 auto;
  min-height: var(--efs-metric-rowHeight);
  background: var(--efs-color-background);
}
#drop-target[data-presentation="grid"] #drive-state { inset-block-start: 0; }
#drop-target[data-presentation="storage"] #drive-state { inset-block-start: 0; }
#drop-target[data-presentation="storage"] { padding-block-end: var(--efs-spacing-pageGutter); }

.table-scroll { width: 100%; overflow: auto; }
.page-sentinel { display: block; width: 100%; height: 1px; pointer-events: none; }
#list-presentation { width: 100%; height: 100%; min-height: 0; contain: strict; }
table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
th,
td { height: var(--efs-metric-rowHeight); border-bottom: var(--efs-border-tableDivider); padding: 4px 8px; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
th { position: sticky; z-index: 5; top: 0; background: var(--efs-color-background); color: var(--efs-color-text-muted); font-size: var(--efs-type-size-xs); font-weight: var(--efs-type-weight-medium); }
th:first-child,
td:first-child { width: 38px; }
th:nth-child(3),
td:nth-child(3) { width: 110px; text-align: right; font-variant-numeric: tabular-nums; }
th:nth-child(4),
td:nth-child(4) { width: 180px; font-variant-numeric: tabular-nums; }
th:last-child,
td:last-child { width: 150px; }
td:last-child { overflow: visible; }
.table-icon-action-cell { padding-inline-end: 0; }
#file-table { table-layout: auto; }
#file-table th:not(:first-child),
#file-table td:not(:first-child) { width: auto; overflow: visible; text-overflow: clip; }
#file-table th:nth-child(2),
#file-table td:nth-child(2) { width: 100%; }
#file-table .file-name { overflow: visible; text-overflow: clip; }
#file-table th:last-child,
#file-table td:last-child { width: 1%; }
#file-table th:nth-child(3),
#file-table td:nth-child(3) { width: 1%; }
#file-table th:nth-child(4),
#file-table td:nth-child(4) { width: 1%; text-align: left; font-variant-numeric: normal; }
#file-table th:nth-child(5),
#file-table td:nth-child(5) { width: 1%; text-align: left; font-variant-numeric: tabular-nums; }
#file-browser-surface[data-access="trash"] #file-table th:last-child,
#file-browser-surface[data-access="trash"] #file-table td:last-child { width: 1%; }
tbody tr:hover { background: var(--efs-color-surface); }
tbody tr.selected { background: var(--efs-color-primary-tint); }
.list-spacer,
.list-spacer td { height: 0; border: 0; padding: 0; }
.list-spacer svg { display: block; width: 1px; }
.file-name { max-width: 100%; min-height: 30px; justify-content: flex-start; border: 0; padding: 2px 0; overflow: hidden; background: transparent; text-overflow: ellipsis; }
.file-name:hover { background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.trash-file-name { display: flex; align-items: center; gap: .35rem; }
.file-icon { display: inline-grid; width: 22px; height: 22px; flex: 0 0 22px; place-items: center; color: var(--efs-color-text-muted); font-size: var(--efs-type-size-xs); }
.file-icon img { display: block; width: 20px; height: 20px; object-fit: contain; }
.row-actions { justify-content: flex-end; }
.row-actions button { min-height: 28px; padding-block: 3px; }
.file-row-actions { flex-wrap: nowrap; gap: 2px; }

.media-grid { position: relative; height: 100%; min-height: 0; overflow: auto; background: var(--efs-color-surface); contain: strict; }
.media-grid-content { min-height: 100%; }
.media-grid-layer { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(6rem, 100%), 1fr)); gap: 0; }
.media-grid-spacer { display: block; width: 1px; }
.media-tile { position: relative; min-width: 0; aspect-ratio: 1 / 1; overflow: hidden; background: var(--efs-color-background); }
.media-tile.selected { box-shadow: inset 0 0 0 3px var(--efs-color-primary); }
.media-tile > input { position: absolute; z-index: 3; inset: 7px auto auto 7px; width: 18px; height: 18px; margin: 0; opacity: 0; }
.media-tile:hover > input,
.media-tile.selected > input,
.media-tile > input:focus { opacity: 1; }
.media-tile-open { display: block; width: 100%; height: 100%; min-height: 0; border: 0; border-radius: 0; padding: 0; overflow: hidden; background: var(--efs-color-background); }
.media-frame { display: grid; width: 100%; height: 100%; aspect-ratio: 1 / 1; place-items: center; overflow: hidden; background: var(--efs-color-surface); }
.media-frame img { width: 100%; height: 100%; object-fit: contain; }
.media-fallback-icon { display: grid; width: 44%; height: 44%; place-items: center; color: var(--efs-color-text-muted); font-weight: var(--efs-type-weight-bold); }
.media-fallback-icon img { width: 100%; height: 100%; object-fit: contain; }
.media-tile-name,
.media-tile-meta { display: none; }
.trash-media-actions { position: absolute; z-index: 4; inset: auto 4px 4px auto; display: flex; gap: 2px; }

.storage-map { position: relative; width: 100%; height: 100%; min-height: 0; overflow: hidden; background: var(--efs-color-background); contain: strict; }
.storage-map-canvas { display: block; width: 100%; height: 100%; overflow: hidden; }
.storage-map-tile { cursor: pointer; outline: 0; }
.storage-map-shape { fill: var(--efs-color-surface); stroke: var(--efs-color-border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.storage-map-group-shape { fill: var(--efs-color-background); stroke: var(--efs-color-border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.storage-map-tile.file > .storage-map-shape { fill: var(--efs-color-background); }
.storage-map-tile.aggregate > .storage-map-shape { fill: var(--efs-color-background); stroke-dasharray: 3 3; }
.storage-map-tile:hover > .storage-map-shape,
.storage-map-tile:hover > .storage-map-group-shape { stroke: var(--efs-color-text-muted); }
.storage-map-tile:focus > .storage-map-shape,
.storage-map-tile:focus-visible > .storage-map-shape,
.storage-map-tile:focus > .storage-map-group-shape,
.storage-map-tile:focus-visible > .storage-map-group-shape { stroke: var(--efs-color-primary); stroke-width: 2; }
.storage-map-tile.selected > .storage-map-shape,
.storage-map-tile.selected > .storage-map-group-shape { fill: var(--efs-color-primary-tint); stroke: var(--efs-color-primary); stroke-width: 2; }
.storage-map-labels { pointer-events: none; }
.storage-map-tile.expanded > .storage-map-labels .storage-map-name { font-size: var(--efs-type-size-xs); }
.storage-map-children { isolation: isolate; }
.storage-map-name { fill: var(--efs-color-foreground); font-size: var(--efs-type-size-sm); font-weight: var(--efs-type-weight-semibold); }
.storage-map-size,
.storage-map-count { fill: var(--efs-color-text-muted); font-size: var(--efs-type-size-xs); font-variant-numeric: tabular-nums; }
.storage-map-message { fill: var(--efs-color-text-muted); font-size: var(--efs-type-size-sm); }
.storage-map-select-control { overflow: visible; }
.storage-map-checkbox { width: 18px; height: 18px; margin: 5px; opacity: 0; cursor: pointer; }
.storage-map-tile:hover > .storage-map-select-control .storage-map-checkbox,
.storage-map-tile:focus-within > .storage-map-select-control .storage-map-checkbox,
.storage-map-tile.selected > .storage-map-select-control .storage-map-checkbox { opacity: 1; }
@media (hover: none) { .storage-map-checkbox { opacity: 1; } }
.storage-map-loading-shape { fill: var(--efs-color-surface); stroke: var(--efs-color-border); stroke-width: 1; }

.transfer-scrim {
  position: fixed;
  z-index: 55;
  inset: var(--efs-metric-headerHeight) 0 0;
  background: color-mix(in srgb, var(--efs-color-foreground) 18%, transparent);
}
.transfer-panel {
  position: fixed;
  z-index: 60;
  inset: var(--efs-metric-headerHeight) 0 0 auto;
  display: flex;
  min-height: 0;
  width: clamp(400px, 36vw, 560px);
  max-width: 100vw;
  height: calc(100vh - var(--efs-metric-headerHeight));
  height: calc(100dvh - var(--efs-metric-headerHeight));
  max-height: none;
  flex-direction: column;
  border: 0;
  border-inline-start: 1px solid var(--efs-color-border);
  border-radius: 0;
  padding: 0;
  overflow: hidden;
  background: var(--efs-color-background);
}
.transfer-panel h2 { margin: 0; }
.transfer-heading { min-height: 48px; flex: 0 0 auto; padding: 8px 10px 8px 16px; }
.transfer-sheet-content { display: flex; min-height: 0; flex: 1; flex-direction: column; padding: 8px 16px 12px; overflow: hidden; }
.transfer-overall-progress {
  width: 100%;
  height: 3px;
  flex: 0 0 3px;
  margin-block: 0;
  border: 0;
  padding: 0;
  overflow: hidden;
  appearance: none;
  background: var(--efs-color-border);
  color: var(--efs-color-foreground);
}
.transfer-overall-progress::-webkit-progress-bar { background: var(--efs-color-border); }
.transfer-overall-progress::-webkit-progress-value { background: var(--efs-color-foreground); }
.transfer-overall-progress::-moz-progress-bar { background: var(--efs-color-foreground); }
.transfer-overview { display: flex; min-width: 0; flex: 0 0 auto; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding-block: 7px 5px; font-variant-numeric: tabular-nums; }
.transfer-overview-progress,
.transfer-overview-operation { display: flex; min-width: 0; align-items: baseline; gap: 4px; white-space: nowrap; }
.transfer-overview-progress strong { font-size: var(--efs-type-size-lg); }
.transfer-overview-progress span,
.transfer-overview-operation { color: var(--efs-color-text-muted); font-size: var(--efs-type-size-xs); }
.tabs {
  display: flex;
}
.tab {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  gap: 3px;
  padding: 3px 8px 6px;
  color: var(--efs-color-text-muted);
  font-size: var(--efs-type-size-xs);
  font-weight: var(--efs-type-weight-regular);
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
  user-select: none;
}
.tab:hover { color: var(--efs-color-foreground); }
.tab[aria-selected="true"],
.tab[aria-current="page"] {
  color: var(--efs-color-foreground);
  text-decoration: none;
}
.tab-count { color: var(--efs-color-text-muted); font-variant-numeric: tabular-nums; }
.transfer-tabs { display: flex; flex: 0 0 auto; justify-content: flex-start; gap: 4px; margin-block: 12px 0; }
.transfer-tabs .tab { flex: 0 0 auto; justify-content: flex-start; }
.transfer-tools { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px; margin-block-start: 6px; }
.transfer-search { min-width: 0; }
.transfer-search input { width: 100%; height: 32px; }
.transfer-tools .icon-button { width: 32px; min-width: 32px; min-height: 32px; }
.transfer-list { min-height: 0; flex: 1; overflow-y: auto; overflow-anchor: none; scrollbar-gutter: stable; margin: 8px 0 0; padding: 0 16px 0 0; list-style: none; }
.transfer-item { min-height: 60px; }
.transfer-item.nested { padding-inline-start: 12px; }
.transfer-empty { display: grid; min-height: 60px; place-items: center; color: var(--efs-color-text-muted); font-size: var(--efs-type-size-sm); }
.transfer-row,
.transfer-group-row { display: grid; min-height: 60px; grid-template-columns: minmax(0, 1fr); gap: 1px; padding: 3px 0 3px 2px; }
.transfer-row strong,
.transfer-group-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transfer-row span,
.transfer-group-row span { color: var(--efs-color-text-muted); font-size: var(--efs-type-size-xs); }
.transfer-row progress,
.transfer-group-row progress {
  width: 100%;
  height: 3px;
  grid-column: 1 / -1;
  border: 0;
  overflow: hidden;
  appearance: none;
  background: var(--efs-color-border);
  color: var(--efs-color-foreground);
}
.transfer-row progress::-webkit-progress-bar,
.transfer-group-row progress::-webkit-progress-bar { background: var(--efs-color-border); }
.transfer-row progress::-webkit-progress-value,
.transfer-group-row progress::-webkit-progress-value { background: var(--efs-color-foreground); }
.transfer-row progress::-moz-progress-bar,
.transfer-group-row progress::-moz-progress-bar { background: var(--efs-color-foreground); }
.transfer-row-header { display: flex; min-width: 0; min-height: 28px; align-items: center; gap: 6px; }
.transfer-row-main { min-width: 0; flex: 1; line-height: var(--efs-type-lineHeight-tight); }
.transfer-row-tail { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 2px; }
.transfer-row-tail .icon-button { width: 28px; min-width: 28px; min-height: 28px; }
.transfer-row-metrics { display: flex; min-width: 0; align-items: baseline; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; }
.transfer-row-metrics span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transfer-row-metrics span:first-child { color: var(--efs-color-foreground); }
.transfer-row-error { min-width: 0; color: var(--efs-color-error) !important; overflow-wrap: anywhere; white-space: normal; }
.transfer-row-actions { align-self: center; }
.failed-transfer-item { min-height: 36px; }
.shared-failure-item { min-height: 0; padding-block: 3px 8px; }
.transfer-shared-error { display: block; font-size: var(--efs-type-size-xs); }
.transfer-row.failed { min-height: 36px; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 6px; }
.transfer-failure-details { min-width: 0; }
.transfer-failure-details summary { display: flex; min-width: 0; min-height: 28px; align-items: center; gap: 8px; cursor: pointer; }
.transfer-failure-details summary::marker { content: ""; }
.transfer-failure-details summary::-webkit-details-marker { display: none; }
.transfer-failure-details summary .app-icon { flex: 0 0 16px; color: var(--efs-color-text-muted); }
.transfer-failure-details[open] summary .app-icon { transform: rotate(180deg); }
.transfer-failure-details > span { display: block; }
.transfer-failure-state { flex: 0 0 auto; color: var(--efs-color-error) !important; }
.transfer-failure-code { overflow-wrap: anywhere; }
.transfer-failure-bytes { font-variant-numeric: tabular-nums; }
@media (max-width: 400px) {
  .transfer-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
  .transfer-tabs .tab { min-height: 40px; flex-direction: column; align-items: flex-start; gap: 0; padding-inline: 4px; }
  .transfer-row-metrics { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
  .transfer-row-metrics span { overflow: visible; text-overflow: clip; }
}

.settings-list { display: grid; width: min(100%, 960px); min-width: 0; grid-template-columns: minmax(0, 1fr); justify-items: stretch; gap: 8px; }
.settings-section { min-width: 0; max-width: 100%; padding-block: 16px; }
.settings-section > .panel-heading {
  min-height: var(--efs-metric-controlHeight);
  align-items: center;
}
.settings-section > .panel-heading h2 { margin-block: 0; }
.settings-form { display: block; }
.settings-form-body { display: grid; min-width: 0; gap: 10px; margin-block-start: 8px; justify-items: start; }
.settings-field { display: grid; width: min(100%, 360px); gap: 4px; color: var(--efs-color-text-muted); font-size: var(--efs-type-size-xs); }
.settings-field > input,
.settings-field > select { width: 100%; color: var(--efs-color-foreground); }
.checkbox-label { display: flex; align-items: center; gap: 6px; }
.settings-form-body > .field-help { margin: 0; }
.settings-wide { display: block; width: 100%; min-width: 0; justify-self: stretch; }
.settings-table-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: min(42vh, 360px);
  margin-block-start: 8px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.settings-table-scroll > table { width: max(100%, var(--efs-tableMinimumWidth, 100%)); min-width: 100%; }
#passkey-table { --efs-tableMinimumWidth: 600px; }
#passkey-table th:first-child,
#passkey-table td:first-child { width: auto; }
#passkey-table th:nth-child(2),
#passkey-table td:nth-child(2),
#passkey-table th:nth-child(3),
#passkey-table td:nth-child(3) { width: 190px; text-align: left; font-variant-numeric: tabular-nums; }
#passkey-table th:last-child,
#passkey-table td:last-child { width: 84px; }
#share-table { --efs-tableMinimumWidth: 820px; }
#share-table th:first-child,
#share-table td:first-child { width: auto; }
#share-table th:nth-child(2),
#share-table td:nth-child(2) { width: 82px; text-align: left; }
#share-table th:nth-child(3),
#share-table td:nth-child(3) { width: 82px; text-align: left; }
#share-table th:nth-child(4),
#share-table td:nth-child(4),
#share-table th:nth-child(5),
#share-table td:nth-child(5) { width: 190px; text-align: left; font-variant-numeric: tabular-nums; }
#share-table th:last-child,
#share-table td:last-child { width: 84px; }
#invite-table { --efs-tableMinimumWidth: 650px; }
#invite-table th:first-child,
#invite-table td:first-child { width: 110px; }
#invite-table th:nth-child(2),
#invite-table td:nth-child(2),
#invite-table th:nth-child(3),
#invite-table td:nth-child(3) { width: 190px; text-align: left; font-variant-numeric: tabular-nums; }
#invite-table th:last-child,
#invite-table td:last-child { width: 84px; }
.settings-table-scroll .row-actions { flex-wrap: nowrap; }
.settings-table-scroll .empty-table-row:hover { background: transparent; }
.settings-table-scroll .empty-table-row td { color: var(--efs-color-text-muted); }
.loading-passkey-row td:nth-child(2) span,
.loading-passkey-row td:nth-child(3) span,
.loading-share-row td:nth-child(4) span,
.loading-share-row td:nth-child(5) span { width: 112px; }
.loading-passkey-row td:last-child span,
.loading-share-row td:last-child span { width: 64px; margin-inline-start: auto; }
#admin-view .settings-list { width: min(100%, 1080px); }
.admin-users-section { border-top: 0; padding-block-start: 0; }
#users-table { --efs-tableMinimumWidth: 920px; }
#users-table th:first-child,
#users-table td:first-child { width: auto; }
#users-table th:nth-child(2),
#users-table td:nth-child(2) { width: 90px; text-align: left; }
#users-table th:nth-child(3),
#users-table td:nth-child(3) { width: 120px; text-align: left; }
#users-table th:nth-child(4),
#users-table td:nth-child(4) { width: 205px; text-align: left; }
#users-table th:last-child,
#users-table td:last-child { width: 124px; }
.user-actions { display: grid; grid-template-columns: repeat(3, var(--efs-metric-controlHeight)); justify-content: end; gap: 6px; }
.secret-result { display: flex; align-items: center; gap: 8px; border-block: 1px solid var(--efs-color-warning); padding-block: 8px; }
.secret-result output { min-width: 0; overflow: hidden; font-family: var(--efs-font-monospace); text-overflow: ellipsis; white-space: nowrap; }

dialog {
  width: min(420px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  border: 1px solid var(--efs-color-border);
  border-radius: var(--efs-radius-dialog);
  padding: 18px;
  overflow: auto;
  background: var(--efs-color-background);
  color: var(--efs-color-foreground);
}
dialog::backdrop { background: color-mix(in srgb, var(--efs-color-foreground) 38%, transparent); }
#dialog-form,
#dialog-fields { display: grid; gap: 10px; }
#dialog-description:empty { display: none; }
.dialog-actions { justify-content: flex-end; margin-block-start: 16px; }

.action-sheet {
  inset: 0 0 0 auto;
  width: clamp(360px, 38vw, 520px);
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  border-inline-start: 1px solid var(--efs-color-border);
  border-radius: 0;
  padding: 0;
  overflow: hidden;
}
.action-sheet[open] { animation: action-sheet-enter var(--efs-motion-duration-normal) var(--efs-motion-easing); }
.action-sheet::backdrop { background: color-mix(in srgb, var(--efs-color-foreground) 18%, transparent); }
.action-sheet #dialog-form {
  display: grid;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 0;
  overflow: hidden;
}
.action-sheet .sheet-heading {
  display: grid;
  min-width: 0;
  min-height: 48px;
  grid-template-columns: minmax(0, 1fr) var(--efs-metric-controlHeight);
  align-items: start;
  gap: 8px;
  border-bottom: 1px solid var(--efs-color-border);
  padding: 8px 10px 8px 16px;
}
.action-sheet #dialog-title {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}
.action-sheet .sheet-heading .icon-button { align-self: start; }
.action-sheet #dialog-description {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 12px 16px 0;
  overflow-wrap: anywhere;
  white-space: normal;
}
.action-sheet #dialog-fields { min-width: 0; max-width: 100%; min-height: 0; align-content: start; padding: 16px; overflow-x: hidden; overflow-y: auto; }
.action-sheet #dialog-fields > * { min-width: 0; max-width: 100%; }
.action-sheet #dialog-fields input,
.action-sheet #dialog-fields select { width: 100%; }
.action-sheet #dialog-output { display: block; max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
.action-sheet .dialog-actions {
  min-width: 0;
  justify-content: flex-end;
  margin: 0;
  border-top: 1px solid var(--efs-color-border);
  padding: 12px 16px;
  background: var(--efs-color-background);
}
.action-sheet .dialog-actions button:not(.icon-button) { max-width: 100%; overflow-wrap: anywhere; white-space: normal; }

@keyframes action-sheet-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

.media-viewer { inset: 0; width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
.preview-heading { display: grid; min-height: 48px; grid-template-columns: var(--efs-metric-controlHeight) minmax(0, 1fr) var(--efs-metric-controlHeight) var(--efs-metric-controlHeight); align-items: center; gap: 6px; border-bottom: 1px solid var(--efs-color-border); padding-inline: 8px; }
#preview-previous { grid-column: 1; }
#preview-title { grid-column: 2; }
#preview-next { grid-column: 3; }
#preview-close { grid-column: 4; }
.preview-heading h2 { margin: 0; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.preview-layout {
  display: grid;
  height: calc(100vh - 48px);
  height: calc(100dvh - 48px);
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) clamp(240px, 24vw, 300px);
}
.preview-details {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 10px;
  padding: 12px;
  overflow: auto;
  background: var(--efs-color-background);
}
.preview-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: start;
}
.preview-generation-action {
  display: grid;
  width: var(--efs-metric-controlHeight);
  height: var(--efs-metric-controlHeight);
  flex: 0 0 var(--efs-metric-controlHeight);
}
.preview-generation-action > button { grid-area: 1 / 1; }
.metadata-list { display: grid; gap: 2px; margin: 0; color: var(--efs-color-text-muted); font-size: var(--efs-type-size-xs); }
.metadata-list div { display: grid; min-height: 26px; grid-template-columns: 72px minmax(0, 1fr); align-items: baseline; gap: 8px; padding-block: 3px; }
.metadata-list dt { font-weight: var(--efs-type-weight-bold); }
.metadata-list dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.preview-content { display: grid; min-width: 0; min-height: 0; place-items: center; overflow: auto; background: var(--efs-color-surface); }
.preview-content img,
.preview-content iframe { display: block; max-width: 100%; max-height: 100%; border: 0; object-fit: contain; }
.preview-content iframe { width: 100%; height: 100%; }
.viewer-fallback-icon { display: grid; width: min(160px, 40vw); aspect-ratio: 1; place-items: center; color: var(--efs-color-text-muted); }
.viewer-fallback-icon img { width: 100%; height: 100%; object-fit: contain; }

@media (max-width: 900px) {
  .settings-table-scroll > table { width: 100%; table-layout: auto; }
  #invite-table,
  #share-table,
  #users-table { --efs-tableMinimumWidth: 100%; }
  #share-table th:nth-child(3),
  #share-table td:nth-child(3),
  #share-table th:nth-child(5),
  #share-table td:nth-child(5) { display: none; }
  #users-table th:nth-child(2),
  #users-table td:nth-child(2) { width: 82px; }
  #users-table th:nth-child(3),
  #users-table td:nth-child(3) { width: 112px; }
  #users-table th:nth-child(4),
  #users-table td:nth-child(4) { display: none; }
  #users-table th:last-child,
  #users-table td:last-child { width: 120px; }
  .user-actions { gap: 4px; }
}

@media (max-width: 760px) {
  :root { --efs-spacing-pageGutter: 12px; }
  .action-sheet { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; border: 0; }
  .app-header { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0; }
  .mobile-navigation-toggle { display: inline-flex; grid-column: 1; justify-self: start; margin-inline-start: calc(-1 * var(--efs-spacing-iconVisualInset)); }
  .mobile-navigation-toggle { visibility: hidden; pointer-events: none; }
  #app[data-state="authenticated"] .mobile-navigation-toggle { visibility: visible; pointer-events: auto; }
  .app-header > .brand { grid-column: 2; justify-self: center; }
  .account-actions { min-width: 0; grid-column: 3; justify-self: end; }
  .app-tabs, .header-report, .header-signout { display: none; }
  .mobile-navigation { position: fixed; z-index: 49; inset: var(--efs-metric-headerHeight) 0 0;
    height: calc(100vh - var(--efs-metric-headerHeight));
    height: calc(100dvh - var(--efs-metric-headerHeight));
    align-content: start;
    gap: 24px;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 14px var(--efs-spacing-pageGutter) 24px;
    background: var(--efs-color-background);
  }
  .mobile-navigation:not([hidden]) { display: grid; }
  .mobile-navigation-routes,
  .mobile-navigation-actions { display: grid; gap: 2px; }
  .mobile-navigation-item {
    display: flex;
    width: 100%;
    min-height: var(--efs-metric-targetMinimum);
    align-items: center;
    justify-content: flex-start;
    border: 0;
    border-radius: 0;
    padding: 8px 0;
    background: transparent;
    color: var(--efs-color-text-muted);
    font-size: var(--efs-type-size-md);
    font-weight: var(--efs-type-weight-regular);
    text-decoration: none;
  }
  .mobile-navigation-item:hover,
  .mobile-navigation-item[aria-current="page"] { background: transparent; color: var(--efs-color-foreground); }
  .header-transfer-speed { display: none; }
  .view { padding-block-start: 10px; }
  .drive-header { min-height: 42px; align-items: center; }
  .location-heading { min-width: 0; }
  .location-heading h1 { display: block; }
  .heading-actions { flex: 0 0 auto; }
  .drive-controls { flex-wrap: wrap; }
  .search-field { min-width: 0; flex-basis: calc(100% - 156px); }
  .compact-field[for="file-sort"] span { display: none; }
  .metadata-filters { position: fixed; inset: auto 8px 8px; width: auto; max-height: 60vh; overflow: auto; }
  .row-actions { gap: 2px; }
  .row-actions button { max-width: 58px; overflow: hidden; padding-inline: 4px; text-overflow: ellipsis; }
  .selection-bar { max-width: calc(100vw - 16px); }
  .media-grid,
  #list-presentation,
  .loading-table { height: 100%; }
  .transfer-panel { inset: 0; width: 100%; height: 100vh; height: 100dvh; max-height: none; border-inline-start: 0; }
  .preview-layout { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .preview-details {
    max-height: min(38vh, 220px);
    max-height: min(38dvh, 220px);
    gap: 6px;
    padding: 8px 10px 10px;
  }
  .preview-actions { overflow-x: auto; }
  .metadata-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
  .metadata-list div { min-height: 22px; grid-template-columns: auto minmax(0, 1fr); gap: 6px; padding-block: 1px; }
  .metadata-list div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .header-transfer-eta { display: none; }
  #passkey-table { --efs-tableMinimumWidth: 100%; }
  #invite-table th:nth-child(3),
  #invite-table td:nth-child(3) { display: none; }
  #invite-table th:first-child,
  #invite-table td:first-child { width: 92px; }
  #invite-table th:nth-child(2),
  #invite-table td:nth-child(2) { width: auto; }
  #invite-table th:last-child,
  #invite-table td:last-child { width: 70px; }
  #passkey-table th:nth-child(2),
  #passkey-table td:nth-child(2),
  #share-table th:nth-child(4),
  #share-table td:nth-child(4) { display: none; }
  #passkey-table th:nth-child(3),
  #passkey-table td:nth-child(3) { width: 140px; }
  #passkey-table th:last-child,
  #passkey-table td:last-child,
  #share-table th:last-child,
  #share-table td:last-child { width: 70px; }
  #share-table th:nth-child(2),
  #share-table td:nth-child(2) { width: 72px; }
  #users-table th:nth-child(3),
  #users-table td:nth-child(3) { display: none; }
  #users-table { table-layout: fixed; }
  #users-table th:nth-child(2),
  #users-table td:nth-child(2) { width: 76px; }
  #users-table th:last-child,
  #users-table td:last-child { width: 116px; }
  .user-actions { gap: 2px; }
}

@media (max-width: 390px) {
  :root { --efs-spacing-pageGutter: 8px; }
  .command-bar { gap: 3px; }
  .command-bar button,
  .command-bar .button { padding-inline: 7px; }
  .header-transfer-count { display: none; }
  .drive-controls { gap: 4px; }
  .search-field { flex-basis: calc(100% - 140px); }
  .filter-disclosure summary { padding-inline: 6px; }
  .metadata-filters { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
