:root {
  color-scheme: light;
  --bg: #e9eef6;
  --surface: #ffffff;
  --surface-2: #f2f5fa;
  --ink: #172238;
  --muted: #58677d;
  --line: #cad6e6;
  --control-line: #7d8ca1;
  --accent: #3567ee;
  --accent-strong: #214bd4;
  --accent-soft: #e7edff;
  --accent-contrast: #ffffff;
  --success: #1c9a6c;
  --danger: #c63b52;
  --warning: #bc7818;
  --shadow: 0 18px 50px rgba(43, 63, 101, .11);
  --radius: 18px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

html[data-variant="v2"] {
  color-scheme: dark;
  --bg: #090b18;
  --surface: #12162a;
  --surface-2: #181d35;
  --ink: #edf4ff;
  --muted: #8c99b9;
  --line: #283152;
  --control-line: #637092;
  --accent: #8e77ff;
  --accent-strong: #b06bff;
  --accent-soft: #282449;
  --accent-contrast: #0b0d1d;
  --success: #3bd79d;
  --danger: #ff7085;
  --warning: #e0ae58;
  --shadow: 0 24px 80px rgba(0, 0, 0, .34);
  --radius: 24px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-variant="v3"] {
  --bg: #f5efe6;
  --surface: #fffdf9;
  --surface-2: #f9f4eb;
  --ink: #2c2926;
  --muted: #70675f;
  --line: #e6dace;
  --control-line: #9a8979;
  --accent: #b35842;
  --accent-strong: #8b3e2d;
  --accent-soft: #f4e1d9;
  --accent-contrast: #fffdf9;
  --success: #51866d;
  --danger: #b74f49;
  --warning: #a36f33;
  --shadow: 0 18px 50px rgba(94, 68, 45, .12);
  --radius: 12px;
  --font: "Iowan Old Style", "Baskerville", Georgia, serif;
  --ui-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-variant="v4"] {
  color-scheme: dark;
  --bg: #111313;
  --surface: #1b1e1e;
  --surface-2: #232727;
  --ink: #f6f6ef;
  --muted: #9ba39c;
  --line: #343b37;
  --control-line: #6a756e;
  --accent: #c8f36a;
  --accent-strong: #a8d842;
  --accent-soft: #2d3a25;
  --accent-contrast: #192014;
  --success: #8bd67e;
  --danger: #f07877;
  --warning: #dfb363;
  --shadow: 0 25px 70px rgba(0, 0, 0, .31);
  --radius: 22px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-variant="v5"] {
  color-scheme: light;
  --bg: #f1f1ee;
  --surface: #ffffff;
  --surface-2: #f7f7f4;
  --ink: #1c1c1a;
  --muted: #65655f;
  --line: #d5d5ce;
  --control-line: #85857f;
  --accent: #252522;
  --accent-strong: #090908;
  --accent-soft: #e9e9e4;
  --accent-contrast: #ffffff;
  --success: #247253;
  --danger: #bb3948;
  --warning: #986319;
  --shadow: 0 14px 42px rgba(35, 35, 30, .09);
  --radius: 10px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background-color: var(--bg); background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--accent) 10%, transparent) 1px, transparent 1.2px); background-size: 24px 24px; color: var(--ink); font-family: var(--font); }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:where(button, a, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.app-shell { min-height: 100vh; position: relative; overflow: hidden; }
.topbar { height: 82px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 86%, transparent); position: relative; z-index: 10; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 150px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-contrast); font-size: 20px; box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 28%, transparent); }
.brand-name { display: block; font-size: 15px; font-weight: 800; letter-spacing: .04em; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.ghost-button, .secondary-button, .icon-button { border: 1px solid var(--control-line); border-radius: 10px; background: var(--surface); color: var(--ink); transition: .2s ease; }
.ghost-button { padding: 9px 13px; font-size: 12px; }
.ghost-button:hover, .secondary-button:hover, .icon-button:hover { border-color: var(--accent); color: var(--accent-strong); transform: translateY(-1px); }
.logout-button { color: var(--danger); }
.variant-switcher { position: relative; }
.variant-menu { position: absolute; top: calc(100% + 4px); left: 50%; right: auto; width: min(92px, calc(100vw - 24px)); padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow); transform: translateX(-50%); z-index: 30; }
.variant-menu a { display: block; padding: 9px 6px; border-radius: 8px; color: var(--muted); font-family: var(--ui-font, var(--font)); font-size: 12px; text-align: center; white-space: nowrap; }
.variant-menu a:hover { background: var(--accent-soft); color: var(--accent-strong); }

.login-stage { width: min(820px, 94vw); min-height: calc(100vh - 82px); margin: 0 auto; display: grid; grid-template-columns: 1fr; align-items: center; padding: 8vh 0; position: relative; }
.login-stage::before { content: ""; position: absolute; width: 260px; height: 260px; left: 50%; top: 28%; border-radius: 50%; background: color-mix(in srgb, var(--accent) 8%, transparent); filter: blur(10px); transform: translate(-50%, -50%); pointer-events: none; }
.login-art { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; opacity: .72; }
.login-art::before { content: ""; position: absolute; inset: 9% 3%; background-image: radial-gradient(circle, color-mix(in srgb, var(--accent) 52%, transparent) 1px, transparent 1.5px); background-size: 24px 24px; opacity: .2; }
.login-art::after { content: ""; position: absolute; left: 50%; top: 50%; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 13%, transparent), transparent 68%); transform: translate(-50%, -50%); }
.orbit { position: absolute; left: 50%; top: 50%; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 50%; }
.orbit-one { width: 420px; height: 190px; margin: -95px 0 0 -210px; transform: rotate(-23deg); }
.orbit-two { width: 250px; height: 380px; margin: -190px 0 0 -125px; transform: rotate(37deg); }
.orbit-core { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 136px; height: 136px; margin: -68px 0 0 -68px; border: 1px solid var(--accent); border-radius: 38% 62% 54% 46%; color: var(--accent); font-size: 52px; box-shadow: 0 0 0 14px color-mix(in srgb, var(--accent) 5%, transparent), 0 0 70px color-mix(in srgb, var(--accent) 20%, transparent); }
.pattern-dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 10%, transparent); opacity: .7; }
.pattern-dot-one { left: 16%; top: 25%; }
.pattern-dot-two { right: 16%; bottom: 24%; }
.pattern-line { position: absolute; height: 1px; background: color-mix(in srgb, var(--accent) 42%, transparent); transform-origin: left center; opacity: .62; }
.pattern-line-one { left: 6%; top: 31%; width: 150px; transform: rotate(-25deg); }
.pattern-line-two { right: 5%; bottom: 31%; width: 140px; transform: rotate(28deg); }
.login-panel { width: 100%; max-width: 420px; justify-self: center; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); position: relative; z-index: 1; }
.eyebrow { margin: 0 0 10px; color: var(--accent-strong); font-family: var(--ui-font, var(--font)); font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.login-panel h1 { margin: 0; font-size: clamp(28px, 4vw, 36px); line-height: 1.1; letter-spacing: -.04em; }
.login-description { margin: 9px 0 25px; color: var(--muted); font-family: var(--ui-font, var(--font)); font-size: 13px; line-height: 1.6; }
.field-label { display: block; margin: 14px 0 7px; color: var(--ink); font-family: var(--ui-font, var(--font)); font-size: 12px; font-weight: 600; }
.text-input { width: 100%; padding: 13px 14px; border: 1px solid var(--control-line); border-radius: 10px; outline: none; background: var(--surface-2); color: var(--ink); font-family: var(--ui-font, var(--font)); font-size: 14px; transition: .2s ease; }
.text-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 42px; padding: 10px 15px; border: 1px solid transparent; border-radius: 10px; background: var(--accent); color: var(--accent-contrast); font-family: var(--ui-font, var(--font)); font-size: 12px; font-weight: 800; transition: .2s ease; }
.primary-button:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: 0 9px 20px color-mix(in srgb, var(--accent) 20%, transparent); }
.login-panel .primary-button { width: 100%; margin-top: 22px; min-height: 46px; }
.form-status { min-height: 18px; margin: 10px 0 0; color: var(--danger); font-family: var(--ui-font, var(--font)); font-size: 12px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 14%, transparent); }

.workspace-view { width: min(1500px, 94vw); min-height: calc(100vh - 82px); margin: 0 auto; display: grid; grid-template-columns: 240px 1fr; gap: 35px; padding: 34px 0 70px; }
.sidebar { display: flex; flex-direction: column; min-height: calc(100vh - 150px); padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.profile-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-bottom: 1px solid var(--line); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); font-family: var(--ui-font, var(--font)); font-size: 12px; font-weight: 800; }
.profile-copy { min-width: 0; flex: 1; font-family: var(--ui-font, var(--font)); }
.profile-copy strong, .profile-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy strong { font-size: 12px; }
.profile-copy small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.live-pill { padding: 3px 5px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-strong); font-family: var(--ui-font, var(--font)); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.nav-list { display: grid; gap: 5px; padding: 22px 0; }
.nav-button { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 9px; width: 100%; padding: 10px 9px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); text-align: left; font-family: var(--ui-font, var(--font)); font-size: 12px; transition: .2s ease; }
.nav-button:hover, .nav-button.active { background: var(--accent-soft); color: var(--accent-strong); }
.nav-button.active { border-color: color-mix(in srgb, var(--accent) 26%, transparent); }
.nav-icon { font-size: 17px; text-align: center; }
.nav-count { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.sidebar-spacer { flex: 1; }
.connection-card { padding: 14px; border-radius: 12px; background: var(--surface-2); font-family: var(--ui-font, var(--font)); }
.connection-heading { display: flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 800; }
.connection-heading.is-pending .status-dot { background: var(--warning); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warning) 14%, transparent); }
.connection-heading.is-error .status-dot { background: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 14%, transparent); }
.connection-card p { margin: 11px 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.connection-card code { color: var(--accent-strong); font-family: var(--mono); font-size: 9px; }

.content-area { min-width: 0; }
.workspace-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 22px; margin-bottom: 25px; }
.workspace-heading h2 { margin: 0; font-size: clamp(25px, 3.2vw, 38px); line-height: 1.08; letter-spacing: -.05em; }
.compact-heading { align-items: flex-start; }
.section-subtitle { max-width: 560px; margin: 13px 0 0; color: var(--muted); font-family: var(--ui-font, var(--font)); font-size: 13px; line-height: 1.7; }
.heading-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.upload-actions { position: relative; }
.upload-choice { position: absolute; top: calc(100% + 8px); right: 0; z-index: 25; display: grid; gap: 5px; min-width: 142px; padding: 7px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); }
.upload-choice button, .upload-choice label { display: block; padding: 9px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); text-align: left; font-family: var(--ui-font, var(--font)); font-size: 12px; cursor: pointer; }
.upload-choice button:hover, .upload-choice button:focus-visible, .upload-choice label:hover, .upload-choice label:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; background: var(--accent-soft); color: var(--accent-strong); }
.secondary-button { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 9px 13px; font-family: var(--ui-font, var(--font)); font-size: 11px; font-weight: 700; }
.secondary-button.danger-button { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); color: var(--danger); }
.breadcrumbs { display: flex; align-items: center; gap: 8px; min-height: 20px; margin-top: 15px; overflow: auto; color: var(--muted); font-family: var(--ui-font, var(--font)); font-size: 11px; white-space: nowrap; }
.breadcrumb-button { padding: 0; border: 0; background: transparent; color: var(--muted); }
.breadcrumb-button:hover { color: var(--accent-strong); }
.breadcrumb-button.current { color: var(--ink); font-weight: 700; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; margin-bottom: 19px; }
.summary-card { min-height: 112px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.summary-card.accent-card { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); }
.summary-label { display: block; color: var(--muted); font-family: var(--ui-font, var(--font)); font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.summary-card strong { display: block; margin-top: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 21px; letter-spacing: -.04em; }
.summary-card small { display: block; margin-top: 7px; color: var(--muted); font-family: var(--ui-font, var(--font)); font-size: 10px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 11px; }
.file-filters { display: flex; align-items: center; flex: 1 1 auto; gap: 8px; min-width: 0; }
.search-box { display: flex; align-items: center; gap: 9px; width: min(420px, 100%); padding: 0 12px; border: 1px solid var(--control-line); border-radius: 10px; background: var(--surface); color: var(--muted); }
.search-box input { width: 100%; padding: 11px 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-family: var(--ui-font, var(--font)); font-size: 12px; }
.search-box button { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 18px; }
.search-highlight { padding: 0 1px; border-radius: 3px; background: color-mix(in srgb, var(--warning) 28%, transparent); color: inherit; }
.compact-select select { height: 38px; max-width: 132px; padding: 0 28px 0 10px; border: 1px solid var(--control-line); border-radius: 10px; background: var(--surface); color: var(--ink); font-family: var(--ui-font, var(--font)); font-size: 12px; }
.result-count { flex: 0 0 auto; color: var(--muted); font-family: var(--ui-font, var(--font)); font-size: 12px; white-space: nowrap; }
.toolbar-actions { display: flex; gap: 7px; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; font-size: 17px; }
.filter-button.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.selection-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; padding: 3px 8px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); border-radius: 10px; background: var(--accent-soft); font-family: var(--ui-font, var(--font)); }
.selection-bar strong { color: var(--accent-strong); font-size: 12px; white-space: nowrap; }
.selection-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.selection-actions button { min-height: 32px; padding: 5px 9px; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); border-radius: 7px; background: var(--surface); color: var(--ink); font-size: 11px; }
.selection-actions button.danger { color: var(--danger); }
#filesView { position: relative; }
#filesView.has-selection .toolbar { display: none; }
#filesView.is-dragging::after { content: "松开即可上传到当前目录"; position: absolute; inset: 0; z-index: 35; display: grid; place-items: center; min-height: 220px; border: 2px dashed var(--accent); border-radius: var(--radius); background: color-mix(in srgb, var(--accent-soft) 92%, transparent); color: var(--accent-strong); font-family: var(--ui-font, var(--font)); font-size: clamp(16px, 3vw, 24px); font-weight: 800; pointer-events: none; }
.file-panel, .shares-panel { min-height: 260px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; box-shadow: 0 9px 35px color-mix(in srgb, var(--ink) 4%, transparent); }
.table-wrap { width: 100%; overflow-x: auto; }
.file-table { width: 100%; border-collapse: collapse; font-family: var(--ui-font, var(--font)); }
.file-table th { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.sort-header { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; padding: 3px 2px; border: 0; border-radius: 5px; background: transparent; color: inherit; font: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: inherit; white-space: nowrap; }
.sort-header:hover { background: var(--accent-soft); color: var(--accent-strong); }
.file-table thead { position: sticky; top: 0; z-index: 2; background: var(--surface); }
.file-table td { padding: 13px 16px; border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent); font-size: 12px; vertical-align: middle; }
.file-table tr:last-child td { border-bottom: 0; }
.file-table tbody tr:hover { background: var(--surface-2); }
.file-row.is-selected { background: color-mix(in srgb, var(--accent-soft) 72%, var(--surface)); }
.select-column { width: 44px; text-align: center !important; }
.select-column input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.select-column input:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 48%, transparent); outline-offset: 2px; }
.check-target { display: grid; place-items: center; width: 32px; height: 32px; margin: -7px auto; border-radius: 8px; cursor: pointer; }
.check-target:focus-within { outline: 3px solid color-mix(in srgb, var(--accent) 48%, transparent); outline-offset: -2px; }
.file-name-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.file-name-copy { display: block; min-width: 0; overflow: hidden; }
.file-symbol { display: grid; place-items: center; width: 31px; height: 31px; flex: 0 0 auto; border-radius: 9px; background: var(--accent-soft); color: var(--accent-strong); font-size: 15px; }
.file-thumbnail { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
html[data-variant="v4"] .file-symbol-image { overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); }
html[data-variant="v4"] .file-symbol-image.has-thumbnail { background: var(--surface-2); color: transparent; }
.file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name-button { display: block; max-width: 100%; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; }
.file-name-button:hover { color: var(--accent-strong); }
.mobile-file-meta { display: none; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.muted-cell { color: var(--muted); font-size: 11px; }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; opacity: .2; transition: .2s ease; }
.file-table tr:hover .row-actions, .row-actions:focus-within { opacity: 1; }
.row-action { padding: 5px 6px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 14px; }
.row-action:hover { background: var(--accent-soft); color: var(--accent-strong); }
.row-action.danger:hover { color: var(--danger); }
.card-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; padding: 12px; }
.file-card { min-height: 152px; padding: 16px; border: 1px solid var(--line); border-radius: calc(var(--radius) - 4px); background: var(--surface-2); position: relative; transition: .2s ease; }
.file-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.file-card .file-symbol { width: 43px; height: 43px; font-size: 20px; }
.file-card .file-name { margin-top: 17px; font-size: 14px; font-weight: 800; }
.file-card-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; color: var(--muted); font-family: var(--ui-font, var(--font)); font-size: 10px; }
.file-card-actions { display: flex; gap: 4px; margin-top: 15px; }
.file-card-actions .row-action { opacity: 1; }
.progress-panel { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 45; width: min(430px, calc(100vw - 36px)); max-height: min(520px, calc(100dvh - 96px)); padding: 13px 15px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--surface) 96%, transparent); box-shadow: 0 18px 60px color-mix(in srgb, var(--ink) 22%, transparent); font-family: var(--ui-font, var(--font)); backdrop-filter: blur(16px); }
.transfer-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.transfer-heading .progress-copy { flex: 1; }
.transfer-heading-actions { display: flex; gap: 5px; }
.transfer-heading-actions > button { min-height: 32px; padding: 5px 8px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); border-radius: 7px; background: transparent; color: var(--accent-strong); font-size: 11px; }
.progress-copy { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 11px; }
.progress-copy strong { color: var(--accent-strong); }
.progress-track { height: 5px; margin-top: 10px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 18%, transparent); overflow: hidden; }
.progress-track span { display: block; width: 0%; height: 100%; border-radius: inherit; background: var(--accent); transition: width .2s ease; }
.transfer-list { display: grid; gap: 7px; max-height: 260px; margin-top: 10px; overflow: auto; }
.progress-panel.is-collapsed { width: min(330px, calc(100vw - 36px)); }
.progress-panel.is-collapsed .transfer-list { display: none; }
.progress-panel.is-collapsed .progress-track { margin-top: 7px; }
.transfer-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px; border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line)); border-radius: 9px; background: var(--surface); }
.transfer-kind { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 900; }
.transfer-copy { display: grid; min-width: 0; gap: 3px; }
.transfer-copy strong, .transfer-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transfer-copy strong { color: var(--ink); font-size: 12px; }
.transfer-copy > span { color: var(--muted); font-size: 10px; }
.transfer-meter { height: 3px; overflow: hidden; border-radius: 9px; background: var(--surface-2); }
.transfer-meter span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.transfer-actions { display: flex; gap: 4px; }
.transfer-actions button { min-height: 30px; padding: 4px 7px; border: 1px solid var(--control-line); border-radius: 7px; background: var(--surface); color: var(--muted); font-size: 10px; }
.transfer-actions button:disabled { opacity: .35; }
.empty-state { min-height: 250px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); font-family: var(--ui-font, var(--font)); font-size: 12px; }
.loader { display: block; width: 22px; height: 22px; border: 2px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-state { padding: 30px; color: var(--danger); font-family: var(--ui-font, var(--font)); font-size: 12px; }
.empty-copy { max-width: 360px; margin: 0; text-align: center; line-height: 1.7; }
.list-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 7px 12px; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--ui-font, var(--font)); font-size: 12px; }
.pagination { display: flex; align-items: center; gap: 8px; }
.pagination button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.pagination button:disabled { cursor: default; opacity: .4; }
.pagination strong { color: var(--ink); font-size: 12px; }

.shares-list { display: grid; gap: 0; }
.share-row { display: grid; grid-template-columns: minmax(160px, 1fr) 1fr auto; align-items: center; gap: 20px; padding: 17px 18px; border-bottom: 1px solid var(--line); font-family: var(--ui-font, var(--font)); }
.share-row:last-child { border-bottom: 0; }
.share-name { font-size: 13px; font-weight: 800; }
.share-path { margin-top: 5px; overflow: hidden; color: var(--muted); font-family: var(--mono); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.share-scope { display: inline-flex; margin-top: 8px; padding: 3px 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-strong); font-size: 9px; font-weight: 800; }
.share-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.share-badges span { display: inline-flex; padding: 3px 6px; border-radius: 5px; background: var(--surface-2); color: var(--muted); font-size: 10px; }
.share-badges .share-scope { margin: 0; background: var(--accent-soft); color: var(--accent-strong); }
.share-link { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--muted); font-family: var(--mono); font-size: 10px; }
.share-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-copy { flex: 0 0 auto; padding: 3px 5px; border: 0; border-radius: 4px; background: var(--accent-soft); color: var(--accent-strong); font-family: var(--ui-font, var(--font)); font-size: 10px; }
.share-actions { display: flex; gap: 4px; }
.shares-footer { display: flex; justify-content: center; padding: 12px; border-top: 1px solid var(--line); }
.trash-list { display: grid; }
.trash-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 13px 16px; border-bottom: 1px solid var(--line); font-family: var(--ui-font, var(--font)); }
.trash-row:last-child { border-bottom: 0; }
.trash-copy { display: grid; min-width: 0; gap: 3px; }
.trash-copy strong, .trash-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-copy strong { font-size: 14px; }
.trash-copy span { color: var(--muted); font-size: 12px; }
.trash-actions { display: flex; gap: 7px; }

.public-share-body { min-height: 100dvh; }
.public-share-shell { min-height: 100dvh; }
.public-share-header { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 0 clamp(16px, 5vw, 72px); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); }
.public-share-label { padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-family: var(--ui-font, var(--font)); font-size: 11px; font-weight: 700; }
.public-share-main { width: min(1100px, calc(100% - 28px)); margin: 0 auto; padding: clamp(24px, 6vw, 72px) 0; }
.public-share-card { padding: clamp(18px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.public-share-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.public-share-heading h1 { margin: 6px 0 0; font-size: clamp(24px, 4vw, 38px); letter-spacing: -.045em; }
.public-share-heading p:last-child { margin: 9px 0 0; color: var(--muted); font-family: var(--ui-font, var(--font)); font-size: 13px; line-height: 1.65; }
.share-password-panel, .public-upload-panel { max-width: 620px; margin-top: 28px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.share-password-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 7px; }
.public-share-toolbar { display: flex; align-items: center; gap: 10px; margin: 24px 0 10px; }
.public-share-toolbar .breadcrumbs { margin: 0; }
.public-share-table th:nth-child(2), .public-share-table td:nth-child(2) { width: 110px; }
.public-share-table th:nth-child(3), .public-share-table td:nth-child(3) { width: 170px; }
.public-share-table th:nth-child(4), .public-share-table td:nth-child(4) { width: 170px; }
.public-share-actions { display: flex; justify-content: flex-end; gap: 6px; }
.public-share-actions .secondary-button { min-height: 34px; padding: 6px 9px; }
.public-single-file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-top: 28px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.public-single-file > div { display: grid; gap: 5px; }
.public-single-file > div span { color: var(--muted); font-family: var(--ui-font, var(--font)); font-size: 12px; }
.public-share-error { margin-top: 28px; padding: 18px; border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--danger) 8%, var(--surface)); color: var(--danger); font-family: var(--ui-font, var(--font)); font-size: 14px; line-height: 1.6; }
.public-download-status { margin-top: 14px; padding: 10px 12px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-strong); font-family: var(--ui-font, var(--font)); font-size: 12px; }
.public-upload-panel { display: grid; gap: 10px; }
.public-drop-zone { display: grid; min-height: 140px; place-content: center; gap: 7px; padding: 20px; border: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--line)); border-radius: 12px; background: var(--surface); text-align: center; cursor: pointer; }
.public-drop-zone span { color: var(--muted); font-family: var(--ui-font, var(--font)); font-size: 12px; }
.public-upload-results { display: grid; gap: 6px; }
.public-upload-results > div { padding: 8px 10px; border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 12px; }
.public-upload-results > div[data-status="success"] { color: var(--success); }
.public-upload-results > div[data-status="error"] { color: var(--danger); }

.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.guide-card { min-height: 190px; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.guide-number { display: block; color: var(--accent-strong); font-family: var(--mono); font-size: 12px; }
.guide-card h3 { margin: 33px 0 10px; font-size: 18px; letter-spacing: -.03em; }
.guide-card p { margin: 0; color: var(--muted); font-family: var(--ui-font, var(--font)); font-size: 12px; line-height: 1.7; }
.guide-note { display: flex; gap: 10px; margin-top: 13px; padding: 16px; border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--muted); font-family: var(--ui-font, var(--font)); font-size: 11px; line-height: 1.6; }
.guide-note strong { color: var(--accent-strong); white-space: nowrap; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; max-width: min(480px, 85vw); padding: 11px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-family: var(--ui-font, var(--font)); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); color: var(--danger); }
.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; }
.app-dialog { width: min(500px, calc(100vw - 28px)); max-height: min(720px, calc(100vh - 28px)); padding: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 100px rgba(0, 0, 0, .28); }
.app-dialog::backdrop { background: rgba(12, 19, 33, .48); backdrop-filter: blur(3px); }
.preview-dialog { width: min(1100px, calc(100vw - 28px)); height: min(820px, calc(100vh - 28px)); max-width: none; max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 100px rgba(0, 0, 0, .3); }
.preview-dialog::backdrop { background: rgba(12, 19, 33, .58); backdrop-filter: blur(4px); }
.preview-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; height: 100%; padding: 18px; }
.preview-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 14px; }
.preview-title-copy { min-width: 0; }
.preview-title-copy h2 { margin: 7px 0 0; overflow: hidden; font-family: var(--ui-font, var(--font)); font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
.preview-title-copy p { margin: 6px 0 0; overflow: hidden; color: var(--muted); font-family: var(--ui-font, var(--font)); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.preview-content { display: grid; min-width: 0; min-height: 0; place-items: center; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.preview-message { display: grid; max-width: 520px; justify-items: center; gap: 12px; padding: 28px; text-align: center; font-family: var(--ui-font, var(--font)); }
.preview-message strong { font-size: 16px; }
.preview-message p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.media-preview { display: block; max-width: 100%; max-height: 100%; border: 0; }
.media-preview-image, .media-preview-video { object-fit: contain; }
.media-preview-pdf { width: 100%; height: 100%; background: #fff; }
.media-preview-audio { width: min(640px, calc(100% - 32px)); }
.text-preview { width: 100%; min-height: 100%; margin: 0; padding: 20px; overflow: auto; color: var(--ink); font-family: var(--mono); font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-details { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-family: var(--ui-font, var(--font)); }
.preview-details summary { display: flex; min-height: 40px; align-items: center; padding: 8px 12px; color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; user-select: none; }
.preview-details summary::marker { color: var(--accent-strong); }
.file-details-list { display: grid; grid-template-columns: minmax(96px, 120px) minmax(0, 1fr); margin: 0; padding: 0 12px 12px; }
.file-details-list dt, .file-details-list dd { min-width: 0; margin: 0; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.45; }
.file-details-list dt { color: var(--muted); font-weight: 700; }
.file-details-list dd { color: var(--ink); overflow-wrap: anywhere; }
.preview-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 14px; }
.dialog-form { padding: 20px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dialog-heading h2 { margin: 0; font-family: var(--ui-font, var(--font)); font-size: 20px; letter-spacing: -.025em; }
.dialog-close { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 22px; }
.dialog-close:hover, .dialog-close:focus-visible { background: var(--surface-2); color: var(--ink); }
.dialog-description { margin: 12px 0 0; color: var(--muted); font-family: var(--ui-font, var(--font)); font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.dialog-fields { display: grid; gap: 14px; margin-top: 18px; }
.dialog-field { display: grid; gap: 7px; color: var(--ink); font-family: var(--ui-font, var(--font)); font-size: 13px; font-weight: 700; }
.dialog-field textarea { min-height: 96px; resize: vertical; }
.dialog-error { min-height: 20px; margin: 10px 0 0; color: var(--danger); font-family: var(--ui-font, var(--font)); font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dialog-button { min-height: 42px; padding: 9px 14px; border: 1px solid var(--control-line); border-radius: 10px; background: var(--surface); color: var(--ink); font-family: var(--ui-font, var(--font)); font-size: 13px; font-weight: 700; }
.dialog-button.primary { border-color: var(--accent); background: var(--accent); color: var(--accent-contrast); }
.dialog-button.danger { border-color: color-mix(in srgb, var(--danger) 42%, var(--line)); background: color-mix(in srgb, var(--danger) 9%, var(--surface)); color: var(--danger); }
.dialog-button:focus-visible, .dialog-close:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 48%, transparent); outline-offset: 2px; }
.inline-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; border-bottom: 1px solid color-mix(in srgb, var(--danger) 28%, var(--line)); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); color: var(--danger); font-family: var(--ui-font, var(--font)); font-size: 12px; }
.inline-error button { min-height: 36px; padding: 6px 12px; border: 1px solid currentColor; border-radius: 8px; background: transparent; color: inherit; }
.file-panel.is-loading .table-wrap { opacity: .62; }
.file-symbol-pdf { background: color-mix(in srgb, #e34b4b 13%, var(--surface)); color: #c52e3f; }
.file-symbol-image { background: color-mix(in srgb, #9b62df 14%, var(--surface)); color: #7c41bc; }
.file-symbol-video, .file-symbol-audio { background: color-mix(in srgb, #e36b37 14%, var(--surface)); color: #b94b24; }
.file-symbol-sheet { background: color-mix(in srgb, #2aa56f 14%, var(--surface)); color: #167c52; }
.file-symbol-document, .file-symbol-slides { background: color-mix(in srgb, #3577dc 14%, var(--surface)); color: #245cba; }
.file-symbol-archive { background: color-mix(in srgb, #b27b2f 15%, var(--surface)); color: #8c5e1e; }
.file-symbol-code, .file-symbol-script, .file-symbol-web { background: color-mix(in srgb, #168b9b 14%, var(--surface)); color: #126d79; }

/* Variants only change visual treatment; the product layout remains shared. */
html[data-variant="v2"] .topbar { background: rgba(9, 11, 24, .72); backdrop-filter: blur(16px); }
html[data-variant="v2"] .login-stage::after { content: ""; position: absolute; right: -80px; bottom: 12%; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(151, 109, 255, .14), transparent 70%); pointer-events: none; }
html[data-variant="v2"] .login-panel { background: linear-gradient(145deg, rgba(21, 26, 51, .95), rgba(13, 15, 31, .95)); }
html[data-variant="v3"] .topbar, html[data-variant="v3"] .workspace-view, html[data-variant="v3"] .login-stage { font-family: var(--ui-font, Inter, sans-serif); }
html[data-variant="v3"] .login-panel h1, html[data-variant="v3"] .workspace-heading h2 { font-family: var(--font); font-weight: 500; letter-spacing: -.06em; }
html[data-variant="v3"] .sidebar, html[data-variant="v3"] .summary-card, html[data-variant="v3"] .file-panel, html[data-variant="v3"] .shares-panel { box-shadow: none; }
html[data-variant="v4"] .summary-card.accent-card { background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
html[data-variant="v5"] .sidebar, html[data-variant="v5"] .file-panel, html[data-variant="v5"] .shares-panel { box-shadow: none; }

@media (max-width: 980px) {
  .login-stage { padding-top: 5vh; }
  .workspace-view { grid-template-columns: 1fr; gap: 18px; }
  .sidebar { min-height: auto; }
  .nav-list { grid-template-columns: repeat(3, 1fr); padding: 13px 0; }
  .sidebar-spacer, .connection-card { display: none; }
  .nav-button { grid-template-columns: 20px 1fr; }
  .nav-count { display: none; }
}

@media (max-width: 680px) {
  .topbar { height: 70px; padding: 0 5vw; }
  .brand { min-width: 0; }
  .brand-kicker { display: none; }
  .workspace-view { width: 90vw; min-height: calc(100vh - 70px); padding-top: 18px; }
  .login-stage { width: 90vw; min-height: calc(100vh - 70px); }
  .login-art { opacity: .55; }
  .orbit-one { width: 300px; height: 140px; margin: -70px 0 0 -150px; }
  .orbit-two { width: 180px; height: 260px; margin: -130px 0 0 -90px; }
  .orbit-core { width: 100px; height: 100px; margin: -50px 0 0 -50px; font-size: 38px; }
  .pattern-line-one { left: 1%; width: 90px; }
  .pattern-line-two { right: 1%; width: 90px; }
  .login-panel { padding: 25px; }
  .workspace-heading { display: block; }
  .heading-actions { justify-content: flex-start; margin-top: 18px; }
  .summary-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .summary-card { min-height: 98px; padding: 13px; }
  .summary-card strong { margin-top: 12px; font-size: 17px; }
  .file-table .size-cell, .file-table .modified-cell { display: none; }
  .file-table th, .file-table td { padding: 11px 10px; }
  .row-actions { opacity: 1; }
  .card-list { grid-template-columns: 1fr; }
  .share-row { grid-template-columns: 1fr; gap: 11px; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-note { display: block; }
  .guide-note strong { display: block; margin-bottom: 4px; }
}

/* Compact directory view: one dense, responsive table for every visual style. */
.app-shell { overflow: visible; }
.topbar { height: 56px; padding: 0 clamp(16px, 4vw, 56px); }
.workspace-view { width: min(1500px, 94vw); min-height: calc(100vh - 56px); grid-template-columns: 200px minmax(0, 1fr); gap: 22px; padding: 2px 0 40px; }
.sidebar { min-height: auto; max-height: calc(100vh - 96px); padding: 12px; }
.nav-list { padding: 14px 0; }
.workspace-heading { align-items: center; gap: 12px; margin-bottom: 7px; }
.heading-primary { min-width: 0; flex: 1 1 auto; }
.heading-topline { display: flex; align-items: center; gap: 10px; min-width: 0; }
.workspace-heading h2 { margin-top: 7px; font-size: clamp(20px, 2.3vw, 28px); }
#filesView .workspace-heading h2 { display: none; }
.breadcrumbs { min-width: 0; margin-top: 0; overflow-x: auto; }
.back-button { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; min-height: 28px; padding: 5px 8px; border: 1px solid var(--control-line); border-radius: 7px; background: var(--surface); color: var(--muted); font-family: var(--ui-font, var(--font)); font-size: 10px; white-space: nowrap; }
.back-button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-strong); }
.back-button:disabled { cursor: default; opacity: .48; }
.heading-actions { flex: 0 0 auto; gap: 6px; }
.heading-actions .primary-button, .heading-actions .secondary-button { min-height: 34px; padding: 7px 10px; }
.summary-grid { display: none; }
.summary-card { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: center; min-height: 0; height: 58px; padding: 9px 11px; border-radius: 10px; }
.summary-label { font-size: 9px; }
.summary-card strong { margin-top: 2px; font-size: 16px; }
.summary-card small { grid-column: 2; margin-top: 1px; font-size: 9px; }
.toolbar { gap: 10px; margin-bottom: 6px; }
.search-box { width: min(360px, 100%); }
.search-box input { padding: 9px 0; }
.icon-button { width: 32px; height: 32px; }
.file-panel, .shares-panel { min-height: 160px; }
.table-wrap { width: 100%; overflow-x: hidden; }
.file-table { width: 100%; table-layout: fixed; }
.file-table th, .file-table td { overflow: hidden; }
.file-table th { padding: 9px 11px; font-size: 9px; }
.file-table td { height: 48px; padding: 8px 11px; font-size: 14px; }
.file-table .file-type-cell { width: 78px; }
.file-table .size-cell { width: 82px; }
.file-table .modified-cell { width: 150px; }
.file-table .actions-column { width: 64px; }
html[data-column-type="false"] .file-table .file-type-cell,
html[data-column-size="false"] .file-table .size-cell,
html[data-column-modified="false"] .file-table .modified-cell { display: none; }
html[data-density="comfortable"] .file-table th { padding-top: 12px; padding-bottom: 12px; }
html[data-density="comfortable"] .file-table td { height: 58px; padding-top: 11px; padding-bottom: 11px; }
html[data-density="comfortable"] .file-symbol { width: 34px; height: 34px; flex-basis: 34px; }
.file-row { cursor: pointer; }
.file-row:hover, .file-row:focus-visible { background: var(--surface-2); }
.file-row:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 52%, transparent); outline-offset: -3px; }
.file-name-cell { gap: 8px; min-width: 0; }
.file-symbol { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 7px; font-size: 12px; }
.file-name-button { min-width: 0; max-width: 100%; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.file-type-cell, .size-cell, .modified-cell { min-width: 0; }
.file-type { display: inline-flex; max-width: 100%; padding: 3px 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-strong); font-family: var(--ui-font, var(--font)); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.muted-cell, .modified-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { align-items: center; opacity: 1; gap: 2px; }
.row-action { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; font-size: 13px; }
.card-list { display: none !important; }
html[data-variant="v4"] .file-table { display: table !important; }
html[data-variant="v4"] .file-panel { border: 1px solid var(--line); background: var(--surface); box-shadow: 0 9px 35px color-mix(in srgb, var(--ink) 4%, transparent); overflow: hidden; }
.empty-state { min-height: 160px; }
.share-row { gap: 12px; padding: 11px 13px; }
.context-menu { position: fixed; z-index: 60; min-width: 148px; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: var(--shadow); }
.context-menu button { display: block; width: 100%; padding: 8px 9px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); font-family: var(--ui-font, var(--font)); font-size: 11px; text-align: left; white-space: nowrap; }
.context-menu button:hover, .context-menu button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-soft); color: var(--accent-strong); }
.context-menu .context-danger { color: var(--danger); }

@media (max-width: 980px) {
  .workspace-view,
  html[data-variant="v4"] .workspace-view,
  html[data-variant="v5"] .workspace-view { width: min(100% - 28px, 920px); grid-template-columns: minmax(0, 1fr); gap: 8px; }
  #filesView .workspace-heading { margin-bottom: 5px; }
  .sidebar { min-height: 0; max-height: none; padding: 6px; }
  .profile-chip, .connection-card, .sidebar-spacer { display: none; }
  .nav-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; padding: 0; }
  .nav-button { min-height: 44px; grid-template-columns: 20px minmax(0, 1fr) auto; padding: 8px; }
}

@media (max-width: 680px) {
  html[data-variant="v4"] .workspace-view,
  html[data-variant="v5"] .workspace-view { width: calc(100% - 20px); grid-template-columns: minmax(0, 1fr); gap: 10px; padding-top: 10px; }
  .topbar { height: 58px; padding: 0 10px; }
  .brand { gap: 8px; min-width: 0; }
  .brand-mark { width: 30px; height: 30px; font-size: 17px; }
  .brand-name { font-size: 13px; }
  .top-actions { gap: 5px; }
  .top-actions .ghost-button { min-height: 44px; padding: 7px 10px; font-size: 12px; }
  .workspace-view { width: calc(100% - 20px); min-height: calc(100vh - 58px); padding: 10px 0 24px; gap: 10px; }
  .sidebar { position: fixed; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); left: 10px; z-index: 40; min-height: 0; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
  .profile-chip { display: none; }
  .nav-list { gap: 4px; padding: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nav-button { min-height: 44px; grid-template-columns: 18px 1fr; padding: 8px; font-size: 13px; }
  .content-area { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .workspace-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px; }
  .heading-primary { min-width: 0; }
  .heading-topline { gap: 6px; }
  .workspace-heading h2 { display: none; }
  .heading-actions { width: auto; justify-content: flex-end; margin-top: 0; gap: 6px; }
  .heading-actions .primary-button, .heading-actions .secondary-button { min-height: 44px; padding: 8px 11px; font-size: 12px; }
  .back-button { min-height: 40px; padding: 7px 9px; font-size: 12px; }
  .summary-grid { display: none; }
  .file-table .file-type-cell,
  .file-table .size-cell,
  .file-table .modified-cell { display: none; }
  .file-table .actions-column { width: 64px; }
  .file-table .select-column { width: 64px; }
  .file-table th, .file-table td { padding: 8px 10px; }
  .file-table th { font-size: 12px; }
  .file-table td { height: 58px; font-size: 14px; }
  .file-symbol { width: 36px; height: 36px; flex-basis: 36px; font-size: 11px; }
  .file-name-cell { gap: 9px; }
  .mobile-file-meta { display: block; }
  .row-action { width: 44px; height: 44px; font-size: 14px; }
  .check-target { width: 44px; height: 44px; margin: -13px auto; }
  .row-actions { gap: 0; }
  .toolbar { gap: 6px; }
  .file-filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; }
  .search-box { width: 100%; }
  .search-box input { min-height: 44px; font-size: 14px; }
  .compact-select { display: none; }
  .result-count { grid-column: 1 / -1; font-size: 12px; }
  .toolbar-actions { flex: 0 0 auto; }
  .icon-button { width: 44px; height: 44px; }
  .dialog-actions { display: grid; grid-template-columns: 1fr; }
  .dialog-button { width: 100%; min-height: 46px; }
  .preview-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; border: 0; border-radius: 0; }
  .preview-shell { padding: max(12px, env(safe-area-inset-top)) 10px max(12px, env(safe-area-inset-bottom)); }
  .preview-title-copy h2 { font-size: 16px; }
  .file-details-list { grid-template-columns: 88px minmax(0, 1fr); }
  .preview-actions .secondary-button, .preview-actions .primary-button { min-height: 44px; flex: 1; }
  .trash-row { grid-template-columns: auto minmax(0, 1fr); padding: 12px; }
  .trash-actions { grid-column: 1 / -1; }
  .trash-actions .secondary-button { min-height: 44px; flex: 1; justify-content: center; }
  .transfer-row { grid-template-columns: auto minmax(0, 1fr); }
  .transfer-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .transfer-actions button { min-height: 40px; }
  .progress-panel { right: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); width: calc(100vw - 20px); max-height: min(58dvh, 520px); padding: 10px; }
  .progress-panel.is-collapsed { width: calc(100vw - 20px); }
  .transfer-heading-actions > button { min-height: 40px; }
  .list-footer { flex-wrap: wrap; }
  .pagination button { width: 44px; height: 44px; }
  .selection-bar { position: fixed; right: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); left: 10px; z-index: 39; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; margin: 0; padding: 7px 8px; box-shadow: var(--shadow); backdrop-filter: blur(16px); }
  .selection-actions { display: flex; min-width: 0; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
  .selection-actions button { min-width: 58px; min-height: 44px; flex: 0 0 auto; padding: 7px 8px; }
  .public-share-main { width: calc(100% - 20px); padding: 18px 0; }
  .public-share-card { padding: 16px 12px; }
  .public-share-heading { display: grid; }
  .public-share-heading > button { width: 100%; min-height: 44px; }
  .share-password-row { grid-template-columns: 1fr; }
  .share-password-row button { min-height: 44px; }
  .public-share-toolbar { align-items: flex-start; }
  .public-share-table th:nth-child(2), .public-share-table td:nth-child(2),
  .public-share-table th:nth-child(3), .public-share-table td:nth-child(3) { display: none; }
  .public-share-table th:nth-child(4), .public-share-table td:nth-child(4) { width: 112px; }
  .public-share-actions .secondary-button { min-height: 44px; padding: 7px 8px; }
  .public-single-file { grid-template-columns: auto minmax(0, 1fr); }
  .public-single-file > button { grid-column: 1 / -1; width: 100%; min-height: 44px; }
  .context-menu button { min-height: 44px; font-size: 13px; }
}

/* Product text remains compact without dropping below practical reading sizes. */
.profile-copy strong, .connection-heading, .breadcrumbs, .back-button, .transfer-copy > span, .share-path, .share-link, .context-menu button { font-size: 12px; }
.profile-copy small, .connection-card p, .nav-count, .live-pill { font-size: 12px; }
.nav-button, .search-box input, .compact-select select, .result-count, .primary-button, .secondary-button { font-size: 13px; }
.file-table th { font-size: 12px; letter-spacing: .02em; text-transform: none; }
.muted-cell, .modified-cell, .mobile-file-meta { font-size: 12px; }

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

@media (prefers-contrast: more) {
  :root { --line: var(--control-line); }
  .file-table td, .file-table th, .share-row, .trash-row { border-color: var(--control-line); }
}

@media (forced-colors: active) {
  :where(button, a, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid Highlight !important; }
  .file-symbol, .file-type, .nav-button.active, .status-dot { border: 1px solid currentColor; }
}
