:root {
  --scheme: light;
  --text: #243044;
  --canvas: #edf1f6;
  --surface: #ffffff;
  --title: #f4f7fa;
  --sidebar: #fbfcfe;
  --subtle: #fafcfe;
  --muted: #718096;
  --dim: #8a96a7;
  --strong: #334258;
  --line: #e5e9ee;
  --soft-line: #edf0f5;
  --input-border: #dce2ea;
  --hover: #e5eaf1;
  --row-hover: #f2f7fd;
  --selected: #e4f0ff;
  --selected-focus: #a0c8ef;
  --active: #e9f1fc;
  --accent-bg: #eaf3ff;
  --accent-hover: #dcecff;
  --accent: #1966bd;
  --accent-text: #2467aa;
  --icon: #5e7694;
  --menu: #fcfdff;
  --notice: #f9fbfe;
  --progress-track: #e5edf6;
  --error: #bb3c4d;
  --key-bg: #eef1f6;
}
[data-theme="dark"] {
  --scheme: dark;
  --text: #dce5f0; --canvas: #151b24; --surface: #1c2430; --title: #171f2a;
  --sidebar: #19222e; --subtle: #1a2330; --muted: #a1b0c4; --dim: #92a1b7;
  --strong: #e1e9f4; --line: #303d4e; --soft-line: #293545; --input-border: #3b4b60;
  --hover: #2b394c; --row-hover: #25354a; --selected: #244569; --selected-focus: #6197ce;
  --active: #253d58; --accent-bg: #243d5b; --accent-hover: #2d4c70; --accent: #93c6ff;
  --accent-text: #9ecaff; --icon: #adc0d7; --menu: #222d3b; --notice: #243143;
  --progress-track: #34455b; --error: #ff9eac; --key-bg: #283548;
}
:root { font-family: "Segoe UI", "Malgun Gothic", sans-serif; color: var(--text); background: var(--canvas); color-scheme: var(--scheme); font-synthesis: none; font-size: 13px; }
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body { margin: 0; padding: 0; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; border: 1px solid transparent; border-radius: 5px; background: transparent; padding: 8px 12px; }
button:disabled { opacity: .4; cursor: default; }
button:focus-visible, input:focus-visible, a:focus-visible, .file-pane:focus-visible { outline: 2px solid #3286dc; outline-offset: -2px; }
button:hover:not(:disabled) { background: var(--hover); }
[hidden] { display: none !important; }
.explorer { width: 100%; height: 100dvh; min-height: 0; margin: 0; background: var(--surface); display: flex; flex-direction: column; overflow: hidden; }
.titlebar, .commandbar, .navigation, .message-line, .statusbar { flex-shrink: 0; }
.titlebar { display: flex; gap: 12px; align-items: center; min-height: 47px; padding: 0 20px; background: var(--title); font-size: 12px; }
.titlebar strong { font-weight: 600; }
.title-divider { color: #c4ccd7; }
.connection { margin-left: auto; font-size: 11px; color: var(--muted); }
.connection::before { content: ''; display: inline-block; width: 6px; height: 6px; background: #43a67e; border-radius: 50%; margin-right: 7px; }
.folder-icon { display: inline-block; width: 20px; height: 15px; border-radius: 2px; background: #f4c24f; border-bottom: 2px solid #e2ab35; position: relative; flex-shrink: 0; }
.folder-icon::before { content: ''; position: absolute; top: -3px; width: 9px; height: 4px; border-radius: 2px 2px 0 0; background: #eab33d; }
.commandbar { display: flex; align-items: center; gap: 5px; min-height: 64px; padding: 10px 17px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.commandbar button { font-size: 12px; white-space: nowrap; }
.commandbar button > span:first-child { font-size: 18px; vertical-align: -1px; margin-right: 6px; color: var(--icon); }
.commandbar .accent { background: var(--accent-bg); color: var(--accent); }
.commandbar .accent:hover { background: var(--accent-hover); }
.separator { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }
.view-switch { display: flex; margin-left: auto; gap: 3px; }
.view-switch button[aria-pressed="true"] { background: var(--hover); }
.navigation { display: flex; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.nav-symbol { font-size: 22px; color: var(--accent-text); padding-top: 2px; }
.address { border: 1px solid var(--input-border); border-radius: 5px; padding: 9px 13px; display: flex; align-items: center; gap: 18px; flex: 1; font-size: 12px; }
.address strong { font-weight: 600; }
.address > span { color: var(--muted); }
.search-box { display: flex; align-items: center; border: 1px solid var(--input-border); border-radius: 5px; padding: 0 12px; width: 250px; }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; padding: 9px 0; font-size: 12px; background: transparent; }
.search-box:focus-within { border-color: #3384d6; }
.search-box > span:last-child { font-size: 22px; color: var(--muted); }
.workspace { display: flex; flex: 1; min-height: 0; }
.sidebar { width: 204px; flex-shrink: 0; border-right: 1px solid var(--line); padding: 24px 12px; background: var(--sidebar); overflow-y: auto; scrollbar-gutter: stable; }
.sidebar-label { color: var(--dim); font-size: 11px; padding: 0 13px 16px; }
.sidebar-item { display: flex; align-items: center; gap: 13px; width: 100%; background: var(--active); font-size: 12px; position: relative; }
.sidebar-item::before { content: ''; width: 3px; height: 17px; background: #2e80d4; position: absolute; left: 0; border-radius: 2px; }
.sidebar-help { padding: 27px 13px 0; color: var(--dim); font-size: 11px; line-height: 1.9; }
.sidebar-help strong { font-weight: 500; color: var(--muted); }
.sidebar-help p { margin: 13px 0; }
kbd { font-family: inherit; font-size: 10px; background: var(--key-bg); border: 1px solid var(--line); border-radius: 3px; padding: 1px 3px; }
.sidebar-help > span { display: block; border-top: 1px solid var(--hover); padding-top: 15px; margin-top: 20px; }
.file-pane { flex: 1; min-width: 0; overflow: auto; position: relative; scrollbar-gutter: stable; overflow-anchor: none; }
.pane-heading { display: flex; justify-content: space-between; align-items: center; padding: 22px 25px; gap: 12px; }
.pane-heading > div { display: flex; align-items: baseline; gap: 12px; }
h1 { font-size: 19px; font-weight: 600; margin: 0; }
.pane-heading span { font-size: 11px; color: var(--dim); }
.table-wrap { min-width: 650px; }
table { width: 100%; border-collapse: collapse; text-align: left; table-layout: fixed; }
thead { color: var(--muted); font-size: 11px; position: sticky; top: 0; background: var(--surface); z-index: 1; }
th { border-block: 1px solid var(--soft-line); font-weight: 400; height: 37px; }
th .sort { width: 100%; border-radius: 0; text-align: left; padding: 8px 12px; font-size: 11px; }
th:nth-child(2) { width: 36%; }
th:nth-child(3) { width: 25%; }
th:nth-child(4) { width: 15%; }
th:nth-child(5) { width: 12%; }
th:last-child { width: 48px; }
.check-cell { width: 38px; text-align: center; }
input[type="checkbox"] { accent-color: #2377cd; width: 14px; height: 14px; cursor: pointer; }
td { height: 43px; padding: 4px 12px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--soft-line); }
td:first-child { padding: 0; }
td:nth-child(2) { color: var(--strong); }
.file-row { cursor: default; user-select: none; transition: background-color 100ms ease; }
.file-row:hover { background: var(--row-hover); }
.file-row.selected { background: var(--selected); }
.file-row.focused { outline: 1px solid var(--selected-focus); outline-offset: -1px; }
.file-row.copied .file-name { opacity: .55; }
.name-content { display: flex; align-items: center; gap: 12px; min-width: 0; }
.file-name { overflow: hidden; text-overflow: ellipsis; }
.file-icon { display: inline-flex; width: 24px; height: 28px; border: 1px solid #a9bbd0; border-radius: 3px; flex-shrink: 0; background: #f4f8fd; align-items: center; justify-content: center; font-size: 7px; color: #4973a3; font-weight: 700; text-transform: uppercase; position: relative; }
.file-icon::after { content: ''; width: 6px; height: 6px; background: #d6e4f3; position: absolute; right: 0; top: 0; border-bottom-left-radius: 2px; }
.file-icon.image { background: #eef8f3; color: #3a9169; border-color: #a6cbb9; }
.file-icon.document { background: #edf3ff; color: #3269bd; }
.file-icon.archive { background: #fcf5e9; color: #ad843c; border-color: #d8c49f; }
.download-link { color: var(--accent-text); text-decoration: none; border-radius: 4px; padding: 4px 8px; font-size: 17px; }
.download-link:hover { background: #d5e7fb; }
.empty { text-align: center; padding: 55px 20px; color: var(--dim); }
.large-folder { font-size: 48px; display: block; margin-bottom: 18px; }
.empty strong { display: block; color: var(--muted); font-weight: 500; }
.empty p { font-size: 12px; line-height: 1.8; }
.empty button { background: var(--accent-bg); color: var(--accent-text); margin-top: 8px; }
.notice { position: absolute; top: 12px; right: 24px; z-index: 4; max-width: calc(100% - 48px); margin: 0; padding: 8px 12px; border: 1px solid var(--input-border); border-radius: 5px; background: var(--notice); box-shadow: 0 3px 12px #314c6910; font-size: 12px; color: var(--muted); }
.notice:empty { display: none; }
.error, .error .upload-state { color: var(--error) !important; }
.drop-overlay { display: none; position: sticky; bottom: 15px; margin: 15px; padding: 30px; border: 2px dashed #408bdd; border-radius: 8px; background: #edf6fff5; text-align: center; color: #276bb4; pointer-events: none; z-index: 3; }
.drop-overlay > span { font-size: 32px; display: block; margin-bottom: 10px; }
.drop-overlay strong { font-size: 18px; }
.dragover { box-shadow: inset 0 0 0 2px #4395e2; background: #f6faff; }
.dragover .drop-overlay { display: block; }
.transfer-panel { border-top: 1px solid var(--line); background: var(--subtle); flex-shrink: 0; }
.transfer-header { display: flex; align-items: center; gap: 15px; padding: 10px 20px 6px; font-size: 11px; }
.transfer-header strong { font-size: 12px; font-weight: 600; }
#transfer-summary { color: var(--muted); }
#clear-transfers { margin-left: auto; padding: 4px 9px; font-size: 11px; }
.uploads { max-height: 150px; overflow: auto; padding: 0 20px 10px; }
.upload-row { display: grid; grid-template-columns: minmax(120px, 1fr) 160px 110px; gap: 15px; align-items: center; padding: 7px 0; font-size: 11px; }
.upload-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-state { text-align: right; color: var(--muted); }
progress { width: 100%; height: 5px; border: 0; border-radius: 9px; overflow: hidden; accent-color: #2c88d5; background: var(--progress-track); }
progress::-webkit-progress-bar { background: var(--progress-track); }
progress::-webkit-progress-value { background: #2c88d5; border-radius: 9px; }
.done progress { accent-color: #48a584; }
.done progress::-webkit-progress-value { background: #48a584; }
.message-line { display: flex; align-items: center; gap: 16px; padding: 9px 20px; border-top: 1px solid var(--soft-line); background: var(--menu); font-size: 11px; }
.message-line p { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
#clipboard-help { margin-left: auto; color: var(--dim); font-size: 10px; text-align: right; }
.statusbar { display: flex; gap: 22px; padding: 9px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; background: var(--title); }
.status-right { margin-left: auto; }
.context-menu { position: fixed; z-index: 10; min-width: 220px; padding: 5px; border: 1px solid var(--line); background: var(--menu); border-radius: 8px; box-shadow: 0 8px 24px #182e4c26; }
.context-menu button { display: flex; justify-content: space-between; width: 100%; text-align: left; font-size: 12px; gap: 30px; }
.context-menu button span { color: var(--muted); font-size: 11px; }
.context-menu hr { border: 0; border-top: 1px solid var(--hover); margin: 4px; }
.context-menu { min-width: 240px; }
.context-menu button { justify-content: flex-start; gap: 9px; }
.context-menu .menu-icon { width: 19px; color: var(--accent-text); font-size: 16px; flex-shrink: 0; }
.context-menu button > span:last-child:not(.menu-icon) { margin-left: auto; }
.danger, .danger .menu-icon { color: var(--error) !important; }
.sidebar-item:not([aria-current]) { background: transparent; }
.sidebar-item:not([aria-current])::before { display: none; }
.sidebar-folder { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 25px; width: 100%; text-align: left; font-size: 12px; margin-top: 3px; transition: background-color 100ms ease; }
.sidebar-folder > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-folder .folder-icon { width: 17px; height: 13px; }
.sidebar-folder[aria-current] { background: var(--active); color: var(--accent-text); }
.item-folder { width: 25px; height: 19px; margin-block: 4px; }
.icons-mode .item-folder { width: 54px; height: 39px; margin-top: 12px; margin-bottom: 3px; border-radius: 4px; border-bottom-width: 3px; }
.icons-mode .item-folder::before { width: 24px; height: 8px; top: -6px; border-radius: 4px 5px 0 0; }
.address { gap: 9px; padding: 2px 7px; flex-wrap: wrap; }
.address button { font-size: 12px; padding: 7px 8px; overflow-wrap: anywhere; }
.address button[aria-current] { font-weight: 600; }
.nav-up { font-size: 20px; padding: 3px 10px; }
dialog { width: min(440px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 12px; padding: 25px; color: var(--strong); box-shadow: 0 20px 70px #10284440; }
dialog::backdrop { background: #21395350; }
dialog h2 { font-size: 18px; margin: 0 0 15px; }
dialog p { font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
dialog label { display: block; margin: 20px 0 8px; font-size: 12px; }
dialog input { width: 100%; border: 1px solid var(--input-border); border-radius: 5px; padding: 10px; }
dialog ul { max-height: 180px; overflow: auto; font-size: 12px; padding-left: 20px; line-height: 2; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.dialog-actions button { border-color: var(--line); min-width: 75px; }
button.primary { background: #267ace; color: #ffffff; }
button.danger-solid { background: #bf4654; color: #ffffff; }
button.danger-solid:hover:not(:disabled) { background: #a93542; }
button.primary:hover:not(:disabled) { background: #1a66b4; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); }
.icons-mode .table-wrap { min-width: 0; }
.icons-mode table, .icons-mode tbody { display: block; }
.icons-mode thead { display: none; }
.icons-mode tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; padding: 8px 20px; }
.icons-mode .file-row { display: flex; position: relative; border: 1px solid transparent; border-radius: 5px; padding: 17px 7px 12px; min-height: 135px; }
.icons-mode td { display: none; border: 0; height: auto; }
.icons-mode td:nth-child(2) { display: block; width: 100%; padding: 0; white-space: normal; }
.icons-mode td.check-cell { display: block; position: absolute; top: 5px; left: 5px; }
.icons-mode .name-content { flex-direction: column; gap: 12px; }
.icons-mode .file-icon { width: 44px; height: 54px; font-size: 10px; }
.icons-mode .file-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: center; line-height: 1.5; overflow-wrap: anywhere; }
@media (max-width: 900px) { body { padding: 0; } .explorer { height: 100dvh; border: 0; border-radius: 0; } .sidebar { width: 165px; } .commandbar { gap: 2px; padding-inline: 10px; } .commandbar button { padding-inline: 8px; } .view-switch button span { display: none; } .search-box { width: 190px; } #clipboard-help { display: none; } .drop-hint { display: none; } }
@media (max-width: 600px) { .sidebar { display: none; } .titlebar { padding-inline: 15px; gap: 8px; } .titlebar .connection { display: none; } .navigation { padding: 10px; gap: 8px; flex-wrap: wrap; } .address { gap: 10px; } .search-box { width: 100%; } .nav-symbol { display: none; } .commandbar .separator { display: none; } .commandbar { min-height: 55px; } .commandbar button { font-size: 11px; } .commandbar button > span:first-child { font-size: 14px; margin-right: 2px; } .pane-heading { padding: 18px 15px; } .upload-row { grid-template-columns: minmax(70px, 1fr) 70px 85px; gap: 10px; } .status-right { display: none; } }
@media (prefers-reduced-motion: reduce) { .file-row, .sidebar-folder { transition: none; } }

.theme-picker { position: relative; flex-shrink: 0; }
.theme-picker summary { list-style: none; display: grid; place-items: center; width: 33px; height: 33px; border-radius: 6px; color: var(--muted); cursor: pointer; }
.theme-picker summary::-webkit-details-marker { display: none; }
.theme-picker summary:hover, .theme-picker[open] summary { background: var(--hover); color: var(--text); }
.theme-picker summary:focus-visible { outline: 2px solid #3286dc; outline-offset: 1px; }
.theme-menu { position: absolute; top: 39px; right: 0; z-index: 20; width: 224px; margin: 0; padding: 12px 7px 7px; background: var(--menu); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 9px 28px #00000030; }
.theme-menu legend { float: left; width: 100%; padding: 2px 10px 9px; color: var(--muted); font-size: 11px; }
.theme-menu label { clear: both; display: flex; align-items: center; gap: 11px; padding: 9px; border-radius: 6px; cursor: pointer; font-size: 12px; }
.theme-menu label:hover { background: var(--hover); }
.theme-menu label:has(input:checked) { background: var(--active); color: var(--accent-text); }
.theme-menu input { margin-left: auto; accent-color: #3f91e8; }
.theme-swatch { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 7px; border: 1px solid #95a6ba66; font-size: 20px; }
.light-swatch { background: #f5f8fd; color: #a07830; }
.dark-swatch { background: #1b2636; color: #b3d4ff; }
[data-theme="dark"] .file-icon { background: #26374d; border-color: #58708f; color: #b5d4fb; }
[data-theme="dark"] .file-icon::after { background: #415b7a; }
[data-theme="dark"] .file-icon.image { background: #234236; border-color: #557e69; color: #9bdbb9; }
[data-theme="dark"] .file-icon.archive { background: #473a24; border-color: #8a7652; color: #eed095; }
[data-theme="dark"] .download-link:hover { background: #2a496b; }
[data-theme="dark"] .drop-overlay { background: #1d3552f5; color: #bddcff; }
[data-theme="dark"] .dragover { background: #203149; }
[data-theme="dark"] dialog::backdrop { background: #03091299; }
[data-theme="dark"] .context-menu { box-shadow: 0 8px 24px #00000055; }

