:root {
  color-scheme: light;
  --bg: #e9f1ff;
  --bg-deep: #d9e8ff;
  --ink: #16213a;
  --muted: #68748c;
  --faint: #8d98ad;
  --line: rgba(91, 112, 151, 0.17);
  --glass: rgba(247, 250, 255, 0.68);
  --glass-strong: rgba(251, 253, 255, 0.86);
  --glass-soft: rgba(255, 255, 255, 0.42);
  --sidebar: rgba(231, 240, 255, 0.58);
  --field: rgba(255, 255, 255, 0.58);
  --hover: rgba(255, 255, 255, 0.68);
  --active: rgba(255, 255, 255, 0.88);
  --shadow: 0 28px 80px rgba(51, 77, 123, 0.22), 0 2px 8px rgba(52, 73, 111, 0.08);
  --shadow-soft: 0 12px 36px rgba(46, 72, 118, 0.14);
  --blue: #1677ff;
  --blue-deep: #075ed4;
  --blue-soft: rgba(22, 119, 255, 0.13);
  --danger: #e4485c;
  --green: #28b974;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 15px;
  --radius-sm: 11px;
  --blur: blur(30px) saturate(155%);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    color-scheme: dark;
    --bg: #0d1220;
    --bg-deep: #151c31;
    --ink: #f2f5ff;
    --muted: #aab4c9;
    --faint: #79859d;
    --line: rgba(188, 207, 244, 0.12);
    --glass: rgba(24, 31, 48, 0.66);
    --glass-strong: rgba(27, 35, 54, 0.88);
    --glass-soft: rgba(255, 255, 255, 0.065);
    --sidebar: rgba(20, 27, 44, 0.64);
    --field: rgba(255, 255, 255, 0.075);
    --hover: rgba(255, 255, 255, 0.08);
    --active: rgba(255, 255, 255, 0.13);
    --shadow: 0 32px 90px rgba(0, 0, 0, 0.48), 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-soft: 0 12px 36px rgba(0, 0, 0, 0.28);
    --blue: #5fa4ff;
    --blue-deep: #2e83f1;
    --blue-soft: rgba(69, 145, 255, 0.18);
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1220;
  --bg-deep: #151c31;
  --ink: #f2f5ff;
  --muted: #aab4c9;
  --faint: #79859d;
  --line: rgba(188, 207, 244, 0.12);
  --glass: rgba(24, 31, 48, 0.66);
  --glass-strong: rgba(27, 35, 54, 0.88);
  --glass-soft: rgba(255, 255, 255, 0.065);
  --sidebar: rgba(20, 27, 44, 0.64);
  --field: rgba(255, 255, 255, 0.075);
  --hover: rgba(255, 255, 255, 0.08);
  --active: rgba(255, 255, 255, 0.13);
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.48), 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-soft: 0 12px 36px rgba(0, 0, 0, 0.28);
  --blue: #5fa4ff;
  --blue-deep: #2e83f1;
  --blue-soft: rgba(69, 145, 255, 0.18);
}

html[data-accent="violet"] { --blue: #7864ee; --blue-deep: #5b45d2; --blue-soft: rgba(120,100,238,.16); }
html[data-accent="teal"] { --blue: #159f9a; --blue-deep: #087c78; --blue-soft: rgba(21,159,154,.16); }
html[data-accent="rose"] { --blue: #dc5f8d; --blue-deep: #bb3e70; --blue-soft: rgba(220,95,141,.16); }
html[data-accent="orange"] { --blue: #e78332; --blue-deep: #c86519; --blue-soft: rgba(231,131,50,.17); }

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background: linear-gradient(145deg, var(--bg), var(--bg-deep));
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .82; animation: drift 18s ease-in-out infinite alternate; }
.orb-one { width: 55vw; height: 55vw; left: -12vw; top: -24vw; background: radial-gradient(circle at 65% 65%, rgba(255,255,255,.72), rgba(111,170,255,.34) 42%, transparent 70%); }
.orb-two { width: 46vw; height: 46vw; right: -10vw; top: 7vh; background: radial-gradient(circle at 40% 50%, rgba(149,117,255,.32), rgba(93,168,255,.26) 46%, transparent 72%); animation-delay: -7s; }
.orb-three { width: 58vw; height: 42vw; left: 26vw; bottom: -26vw; background: radial-gradient(circle at 50% 25%, rgba(116,224,230,.32), rgba(75,140,255,.22) 45%, transparent 72%); animation-delay: -12s; }
.noise { position: absolute; inset: 0; opacity: .12; color: rgba(65, 85, 125, .4); background-image: radial-gradient(circle, currentColor .55px, transparent .7px); background-size: 5px 5px; mix-blend-mode: soft-light; }

@keyframes drift { from { transform: translate3d(-2%, -1%, 0) scale(1); } to { transform: translate3d(4%, 3%, 0) scale(1.08); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes pulse { 50% { opacity: .45; } }

.glass {
  border: 1px solid rgba(255, 255, 255, 0.48);
  background: var(--glass);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

.login-screen { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.login-card { width: min(430px, 100%); padding: 46px 44px 36px; border-radius: 36px; text-align: center; animation: rise .6s cubic-bezier(.2,.8,.2,1); }
.brand-mark { width: 76px; height: 76px; margin: 0 auto 26px; padding: 1px; border-radius: 24px; background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,255,255,.25)); box-shadow: 0 14px 32px rgba(47,105,206,.23), inset 0 1px 1px rgba(255,255,255,.7); }
.brand-mark span { display: grid; width: 100%; height: 100%; place-items: center; border-radius: 23px; color: #fff; background: linear-gradient(145deg, #70b4ff, #347af2 55%, #755de8); font-size: 38px; font-weight: 680; letter-spacing: -.08em; text-indent: -.08em; text-shadow: 0 2px 12px rgba(0,0,0,.15); }
.eyebrow { margin: 0 0 7px; color: var(--blue); font-size: 11px; font-weight: 760; letter-spacing: .13em; text-transform: uppercase; }
.login-card h1 { margin: 0; font-size: clamp(29px, 5vw, 37px); line-height: 1.08; letter-spacing: -.045em; }
.login-copy { margin: 13px auto 30px; max-width: 300px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.login-form { display: grid; gap: 14px; text-align: left; }
.login-form label, .action-sheet label { display: grid; gap: 7px; }
.login-form label span, .action-sheet label span { padding-left: 4px; color: var(--muted); font-size: 12px; font-weight: 620; }
input, select { border: 1px solid var(--line); outline: 0; color: var(--ink); background: var(--field); box-shadow: inset 0 1px 1px rgba(255,255,255,.28); transition: border-color .18s, box-shadow .18s, background .18s; }
input:focus, select:focus { border-color: color-mix(in srgb, var(--blue) 64%, transparent); background: var(--glass-strong); box-shadow: 0 0 0 4px var(--blue-soft); }
.login-form input, .action-sheet input { width: 100%; height: 49px; padding: 0 15px; border-radius: 14px; }
.primary-button, .quiet-button, .icon-button, .nav-item, .dock-app, .context-menu button, .menu-about, .menu-text-button, .menu-logout, .window-control, .minimized-window { border: 0; cursor: pointer; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 18px; border-radius: 14px; color: #fff; background: linear-gradient(180deg, #318cff, #116ce7); box-shadow: 0 9px 20px rgba(17,108,231,.25), inset 0 1px 0 rgba(255,255,255,.28); font-weight: 680; transition: transform .15s, filter .15s; }
.primary-button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.primary-button:active { transform: translateY(1px) scale(.99); }
.primary-button.small { min-height: 38px; padding: 0 14px; border-radius: 12px; font-size: 13px; }
.form-error { min-height: 17px; margin: -3px 4px 0; color: var(--danger); font-size: 12px; }
.login-security { margin-top: 24px; color: var(--faint); font-size: 11px; }
.login-security span { color: var(--green); margin-right: 5px; }

.desktop { position: fixed; z-index: 1; inset: 0; overflow: hidden; }
.desktop-wallpaper { position: absolute; z-index: 0; inset: 0; overflow: hidden; background: linear-gradient(155deg, #d7ebff 0%, #b9d7ff 35%, #c8c1ff 68%, #9fc8d8 100%); }
.desktop-wallpaper[data-wallpaper="dusk"] { background: linear-gradient(155deg,#2b214b 0%,#665487 34%,#dc7f8b 68%,#f6b679 100%); }
.desktop-wallpaper[data-wallpaper="ocean"] { background: linear-gradient(155deg,#a6e2ef 0%,#58b9d5 38%,#367cae 70%,#153f6a 100%); }
.desktop-wallpaper[data-wallpaper="mist"] { background: linear-gradient(155deg,#eef1f4 0%,#cbd7dd 40%,#9db4ba 72%,#718a91 100%); }
.desktop-wallpaper > img { position: absolute; z-index: 5; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.desktop-wallpaper::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 18%, rgba(255,255,255,.9), transparent 28%), radial-gradient(circle at 78% 32%, rgba(113,91,221,.25), transparent 32%), linear-gradient(to bottom, transparent 58%, rgba(23,79,116,.18)); }
.desktop-wallpaper::after { content: ""; position: absolute; left: -8%; right: -8%; bottom: -19%; height: 52%; border-radius: 50% 55% 0 0; background: linear-gradient(170deg, rgba(106,173,190,.72), rgba(45,102,139,.8)); box-shadow: 0 -30px 90px rgba(255,255,255,.24); transform: rotate(-2deg); }
.desktop-wallpaper i { position: absolute; z-index: 1; bottom: -14%; width: 55%; height: 42%; border-radius: 50% 50% 0 0; background: linear-gradient(155deg, rgba(117,177,194,.7), rgba(49,104,137,.8)); filter: blur(.2px); }
.desktop-wallpaper i:nth-child(1) { left: -12%; transform: rotate(9deg); }
.desktop-wallpaper i:nth-child(2) { right: -13%; bottom: -18%; background: linear-gradient(155deg, rgba(129,111,188,.64), rgba(57,77,137,.82)); transform: rotate(-8deg); }
.desktop-wallpaper i:nth-child(3) { left: 28%; bottom: -25%; width: 50%; background: linear-gradient(155deg, rgba(96,168,178,.7), rgba(34,85,116,.88)); }
html[data-theme="dark"] .desktop-wallpaper[data-wallpaper="aurora"] { background: linear-gradient(155deg, #111c33 0%, #172d50 38%, #31294f 70%, #17364a 100%); }
@media (prefers-color-scheme: dark) { html[data-theme="system"] .desktop-wallpaper[data-wallpaper="aurora"] { background: linear-gradient(155deg, #111c33 0%, #172d50 38%, #31294f 70%, #17364a 100%); } }
.windows-layer { position: absolute; z-index: 3; inset: 0; overflow: hidden; pointer-events: none; }
.menu-bar { position: fixed; z-index: 1000; top: 7px; left: 10px; right: 10px; height: 34px; padding: 0 9px 0 7px; border-radius: 13px; display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow-soft); font-size: 12px; }
.menu-brand, .menu-status { display: flex; align-items: center; gap: 15px; }
.menu-brand strong { font-weight: 720; }
.mini-mark { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 8px; color: #fff; background: linear-gradient(145deg, #6db1ff, #4078ed 60%, #7b60df); font-weight: 760; }
.menu-item { color: var(--muted); }
.menu-status { gap: 10px; color: var(--muted); }
.menu-about { height: 29px; padding: 0 7px 0 2px; border-radius: 9px; display: flex; align-items: center; gap: 7px; background: transparent; }
.menu-about:hover, .menu-text-button:hover, .menu-logout:hover { background: var(--hover); }
.menu-text-button, .menu-logout { min-height: 27px; padding: 0 8px; border-radius: 8px; color: var(--muted); background: transparent; font-size: 11px; }
.disk-status { white-space: nowrap; }
.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 18%, transparent); }
.clock { min-width: 96px; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.about-popover { position: fixed; z-index: 1100; top: 48px; left: 13px; width: min(360px, calc(100% - 26px)); padding: 22px; border-radius: 22px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 15px; box-shadow: 0 24px 70px rgba(24,44,77,.3); }
.about-popover .brand-mark.small { width: 54px; height: 54px; margin: 0; border-radius: 17px; }
.about-popover .brand-mark.small span { border-radius: 16px; font-size: 26px; }
.about-popover h2 { margin: 0; font-size: 20px; }
.about-popover p:not(.eyebrow) { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.about-popover > small { grid-column: 1 / -1; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); line-height: 1.5; }
.shortcut-help { grid-column: 1 / -1; padding-top: 13px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; color: var(--muted); font-size: 10px; }
.shortcut-help > strong { grid-column: 1 / -1; color: var(--ink); font-size: 11px; }
.shortcut-help span { display: flex; align-items: center; gap: 6px; }
.shortcut-help kbd { min-width: 62px; padding: 3px 5px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--glass-soft); box-shadow: inset 0 -1px 0 var(--line); font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; }

.desktop-icons { position: absolute; z-index: 2; inset: 50px 18px 92px; pointer-events: none; }
.desktop-icon { position: absolute; width: 92px; padding: 8px 5px; border: 1px solid transparent; border-radius: 15px; display: grid; justify-items: center; gap: 5px; color: white; background: transparent; text-shadow: 0 1px 5px rgba(9,25,48,.65); pointer-events: auto; user-select: none; touch-action: none; }
.desktop-icon:hover, .desktop-icon.selected { border-color: rgba(255,255,255,.34); background: rgba(255,255,255,.17); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.desktop-icon .file-icon { width: 58px; height: 58px; margin: 0; border-radius: 17px; font-size: 23px; }
.desktop-icon .file-icon.folder { border-radius: 12px 16px 16px; }
.desktop-icon .file-icon.folder::before { width: 24px; height: 7px; }
.desktop-icon span { width: 100%; overflow: hidden; font-size: 11px; font-weight: 600; line-height: 1.25; text-align: center; text-overflow: ellipsis; white-space: nowrap; }

.os-window { position: absolute; top: 0; left: 0; min-width: 560px; min-height: 420px; overflow: visible; pointer-events: auto; border-radius: 24px; box-shadow: 0 30px 90px rgba(23,43,75,.3), 0 4px 18px rgba(23,43,75,.14); will-change: transform; transition: box-shadow .16s, opacity .16s; }
.os-window.focused { box-shadow: 0 36px 110px rgba(17,37,70,.38), 0 5px 20px rgba(23,43,75,.17); }
.os-window.maximized { border-radius: 18px; }
.window-titlebar { height: 42px; padding: 0 12px; border-bottom: 1px solid var(--line); border-radius: 23px 23px 0 0; display: grid; grid-template-columns: 92px 1fr 92px; align-items: center; background: color-mix(in srgb,var(--glass-strong) 72%,transparent); cursor: default; user-select: none; touch-action: none; }
.window-controls { display: flex; align-items: center; gap: 8px; height: auto; padding: 0; }
.window-control { width: 13px; height: 13px; padding: 0; overflow: hidden; border-radius: 50%; color: transparent; background: #ffbd44; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); font-size: 9px; line-height: 13px; }
.window-control.close { background: #ff605c; }
.window-control.maximize { background: #00ca4e; }
.window-controls:hover .window-control { color: rgba(35,35,35,.72); }
.window-identity { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 7px; }
.window-identity strong { overflow: hidden; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.window-app-icon { width: 23px !important; height: 23px !important; margin: 0 !important; border-radius: 7px !important; box-shadow: 0 3px 8px rgba(39,60,98,.14) !important; }
.window-app-icon svg { width: 17px; height: 17px; }
.window-titlebar-spacer { width: 92px; }
.window-body { height: calc(100% - 42px); min-height: 0; overflow: hidden; border-radius: 0 0 23px 23px; }
.file-app { width: 100%; height: 100%; min-height: 0; overflow: hidden; display: grid; grid-template-columns: 218px minmax(0, 1fr); }
.resize-handle { position: absolute; z-index: 5; display: block; touch-action: none; }
.resize-n, .resize-s { left: 12px; right: 12px; height: 8px; cursor: ns-resize; }
.resize-n { top: -4px; } .resize-s { bottom: -4px; }
.resize-e, .resize-w { top: 12px; bottom: 12px; width: 8px; cursor: ew-resize; }
.resize-e { right: -4px; } .resize-w { left: -4px; }
.resize-ne, .resize-nw, .resize-se, .resize-sw { width: 14px; height: 14px; }
.resize-ne { top: -5px; right: -5px; cursor: nesw-resize; } .resize-nw { top: -5px; left: -5px; cursor: nwse-resize; }
.resize-se { right: -5px; bottom: -5px; cursor: nwse-resize; } .resize-sw { left: -5px; bottom: -5px; cursor: nesw-resize; }
.sidebar { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 20px 13px 15px; border-right: 1px solid var(--line); background: var(--sidebar); }
.nav-label { margin: 16px 11px 7px; color: var(--faint); font-size: 10px; font-weight: 730; letter-spacing: .1em; text-transform: uppercase; }
.nav-item { width: 100%; min-height: 39px; padding: 0 11px; border-radius: 11px; display: flex; align-items: center; gap: 11px; color: var(--muted); background: transparent; text-align: left; font-weight: 560; transition: .15s; }
.nav-item:hover { color: var(--ink); background: var(--hover); }
.nav-item.active { color: var(--ink); background: var(--active); box-shadow: 0 5px 18px rgba(55,87,138,.09), inset 0 1px 0 rgba(255,255,255,.38); }
.nav-icon { display: grid; width: 22px; height: 22px; place-items: center; color: var(--blue); font-size: 18px; font-weight: 700; }
.storage-card { margin: auto 7px 10px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--glass-soft); }
.storage-copy { display: flex; justify-content: space-between; margin-bottom: 9px; color: var(--muted); font-size: 11px; }
.storage-copy strong { color: var(--ink); font-weight: 650; }
.storage-track, .transfer-track { height: 6px; overflow: hidden; border-radius: 8px; background: color-mix(in srgb, var(--ink) 9%, transparent); }
.storage-track i, .transfer-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#5cb3ff,#5c75f4); transition: width .35s ease; }
.storage-card small { display: block; margin-top: 7px; color: var(--faint); font-size: 10px; }
.sidebar-footer { padding: 0 7px; }
.quiet-button { min-height: 34px; padding: 0 12px; border-radius: 10px; color: var(--muted); background: var(--glass-soft); font-size: 12px; transition: .15s; }
.quiet-button:hover { color: var(--ink); background: var(--hover); }

.workspace { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: color-mix(in srgb, var(--glass) 70%, transparent); }
.toolbar { min-height: 70px; padding: 0 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 15px; }
.history-buttons { display: flex; gap: 6px; }
.icon-button { display: inline-grid; width: 37px; height: 37px; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: var(--glass-soft); box-shadow: inset 0 1px 0 rgba(255,255,255,.22); font-size: 20px; line-height: 1; transition: .15s; }
.icon-button:hover:not(:disabled) { color: var(--ink); background: var(--hover); transform: translateY(-1px); }
.icon-button:disabled { cursor: default; opacity: .35; }
.icon-button.compact { width: 29px; height: 29px; border-radius: 9px; font-size: 15px; }
.icon-button.labelled { width: auto; padding: 0 11px; grid-auto-flow: column; gap: 6px; font-size: 12px; white-space: nowrap; }
.breadcrumbs { min-width: 0; flex: 1; display: flex; align-items: center; overflow: hidden; }
.breadcrumbs button { max-width: 150px; overflow: hidden; border: 0; color: var(--muted); background: transparent; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.breadcrumbs button:last-child { color: var(--ink); font-weight: 650; }
.breadcrumbs i { margin: 0 6px; color: var(--faint); font-style: normal; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.search-wrap { position: relative; }
.search-wrap span { position: absolute; top: 50%; left: 11px; z-index: 1; color: var(--faint); font-size: 17px; transform: translateY(-53%); }
.search-wrap input { width: 180px; height: 37px; padding: 0 12px 0 34px; border-radius: 12px; }

.content-head { padding: 26px 27px 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.content-head h2 { margin: 0; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.045em; }
.item-count { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.view-controls { display: flex; align-items: center; gap: 7px; }
.sort-control { display: flex; align-items: center; gap: 7px; color: var(--faint); font-size: 11px; }
.sort-control select { height: 32px; padding: 0 27px 0 10px; border-radius: 9px; color: var(--muted); font-size: 11px; }
.segmented { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--glass-soft); }
.segmented button { width: 31px; height: 26px; border: 0; border-radius: 8px; color: var(--faint); background: transparent; cursor: pointer; }
.segmented button.active { color: var(--ink); background: var(--active); box-shadow: 0 2px 6px rgba(42,67,105,.12); }

.file-view { min-height: 0; flex: 1; overflow: auto; padding: 8px 24px 36px; scrollbar-width: thin; scrollbar-color: color-mix(in srgb,var(--ink) 18%, transparent) transparent; }
.grid-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); align-content: start; gap: 14px; }
.file-card { position: relative; min-width: 0; border: 1px solid transparent; background: transparent; cursor: default; user-select: none; transition: transform .15s, background .15s, border-color .15s, box-shadow .15s; }
.grid-view .file-card { min-height: 139px; padding: 15px 10px 11px; border-radius: 17px; text-align: center; }
.grid-view .file-card:hover { border-color: var(--line); background: var(--glass-soft); transform: translateY(-2px); }
.file-card.selected { border-color: color-mix(in srgb, var(--blue) 38%, transparent); background: var(--blue-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 10%, transparent); }
.file-icon { position: relative; display: grid; width: 72px; height: 72px; margin: 0 auto 8px; place-items: center; border-radius: 21px; color: #fff; background: linear-gradient(145deg,#8b9db7,#63738d); box-shadow: 0 12px 22px rgba(55,77,111,.17), inset 0 1px 1px rgba(255,255,255,.4); font-size: 29px; font-weight: 700; }
.file-icon svg { width: 42px; height: 42px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.file-icon svg text { fill: currentColor; stroke: none; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 6px; font-weight: 800; }
.file-icon .file-thumbnail { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; opacity: 0; transition: opacity .18s ease; }
.file-icon.has-thumbnail { overflow: hidden; background: linear-gradient(145deg,#dce7f4,#aebdd1); }
.file-icon.has-thumbnail .file-thumbnail { opacity: 1; }
.file-icon.folder { border-radius: 15px 20px 20px 20px; background: linear-gradient(145deg,#79c9ff,#428be9); }
.file-icon.folder::before { content: ""; position: absolute; width: 30px; height: 9px; top: -5px; left: 5px; border-radius: 7px 8px 0 0; background: #6bb9f4; }
.file-icon.image { background: linear-gradient(145deg,#8bdfcf,#3e9ec4 60%,#6a75dc); }
.file-icon.video { background: linear-gradient(145deg,#ae8cff,#6e58d9); }
.file-icon.audio { background: linear-gradient(145deg,#ff94b7,#e0557f); }
.file-icon.pdf { background: linear-gradient(145deg,#ff8f85,#e54c55); }
.file-icon.text { background: linear-gradient(145deg,#84b8ff,#5674da); }
.file-icon.code { background: linear-gradient(145deg,#7189ad,#3d5072); }
.file-icon.document { background: linear-gradient(145deg,#74aaff,#416ed4); }
.file-icon.spreadsheet { background: linear-gradient(145deg,#58c995,#278d63); }
.file-icon.presentation { background: linear-gradient(145deg,#ffad6d,#e8683f); }
.file-icon.archive { background: linear-gradient(145deg,#f4c76b,#d89436); }
.file-name { display: block; overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 610; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { display: block; margin-top: 3px; color: var(--faint); font-size: 10px; }
.card-menu { position: absolute; top: 7px; right: 6px; display: grid; width: 25px; height: 25px; place-items: center; border: 0; border-radius: 8px; opacity: 0; color: var(--muted); background: var(--active); cursor: pointer; transition: opacity .15s; }
.file-card:hover .card-menu, .file-card.selected .card-menu { opacity: 1; }

.list-view { display: block; padding-top: 0; }
.list-head, .list-view .file-card { display: grid; grid-template-columns: minmax(220px, 1.5fr) minmax(120px,.7fr) minmax(105px,.55fr) minmax(80px,.45fr) 30px; align-items: center; gap: 12px; }
.list-head { position: sticky; z-index: 2; top: 0; height: 34px; padding: 0 12px; border-bottom: 1px solid var(--line); color: var(--faint); background: color-mix(in srgb,var(--glass-strong) 90%,transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); font-size: 10px; font-weight: 690; text-transform: uppercase; }
.list-view .file-card { min-height: 55px; padding: 6px 12px; border-bottom-color: var(--line); border-radius: 11px; }
.list-view .file-card:hover { background: var(--glass-soft); }
.list-name { min-width: 0; display: flex; align-items: center; gap: 11px; }
.list-view .file-icon { width: 35px; height: 35px; flex: 0 0 auto; margin: 0; border-radius: 10px; font-size: 15px; box-shadow: 0 5px 12px rgba(55,77,111,.12); }
.list-view .file-icon svg { width: 21px; height: 21px; }
.list-view .file-icon.folder { border-radius: 7px 10px 10px; }
.list-view .file-icon.folder::before { width: 15px; height: 5px; top: -3px; left: 3px; }
.list-value { color: var(--muted); font-size: 11px; }
.list-view .card-menu { position: static; opacity: .55; }
.empty-state { flex: 1; padding: 70px 24px; text-align: center; }
.empty-symbol { display: grid; width: 76px; height: 76px; margin: 0 auto 16px; place-items: center; border: 1px solid var(--line); border-radius: 24px; color: var(--blue); background: var(--glass-soft); box-shadow: var(--shadow-soft); font-size: 34px; }
.empty-state h3 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.empty-state p { margin: 7px 0 18px; color: var(--muted); }

.drop-zone { position: absolute; z-index: 12; inset: 72px 18px 18px; display: none; place-items: center; border: 2px dashed color-mix(in srgb,var(--blue) 52%,transparent); border-radius: 25px; background: color-mix(in srgb,var(--glass-strong) 88%,transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.drop-zone.visible { display: grid; }
.drop-zone div { display: grid; gap: 8px; text-align: center; }
.drop-zone span { color: var(--blue); font-size: 54px; line-height: 1; }
.drop-zone strong { font-size: 22px; }
.drop-zone small { color: var(--muted); }

.dock { position: fixed; z-index: 1000; left: 50%; bottom: 10px; min-width: 75px; max-width: calc(100% - 16px); height: 67px; padding: 7px 10px; border-radius: 22px; display: flex; align-items: center; gap: 8px; box-shadow: 0 18px 45px rgba(36,57,96,.28); transform: translateX(-50%); }
.dock-app { position: relative; width: 53px; height: 54px; padding: 0; border-radius: 15px; background: transparent; transition: transform .18s; }
.dock-app:hover { transform: translateY(-7px) scale(1.08); }
.dock-icon { display: grid; width: 45px; height: 45px; margin: 0 auto; place-items: center; border-radius: 14px; color: white; box-shadow: 0 7px 16px rgba(39,60,98,.18), inset 0 1px 1px rgba(255,255,255,.4); font-size: 24px; }
.dock-icon svg { width: 32px; height: 32px; fill: rgba(255,255,255,.17); stroke: white; stroke-width: 2.2; stroke-linejoin: round; }
.files-icon { background: linear-gradient(145deg,#7ac6ff,#347ce7); }
.editor-icon { background: linear-gradient(145deg,#a38cff,#6355d9); }
.viewer-icon { background: linear-gradient(145deg,#72d9c1,#3f8ec9 58%,#7461df); }
.player-icon { background: linear-gradient(145deg,#ff8ba9,#dd536d 58%,#8f59d5); }
.browser-icon { background: linear-gradient(145deg,#45d5cd,#257bd9 58%,#5146bd); }
.settings-icon { background: linear-gradient(145deg,#b5c0d2,#6d7e99); }
.photos-icon { background: linear-gradient(145deg,#85e2c5,#5586ec 55%,#b05fd8); }
.activity-icon { background: linear-gradient(145deg,#856eff,#5546c9); }
.trash-icon { background: linear-gradient(145deg,#aeb8c8,#738199); }
.dock-app small { position: absolute; left: 50%; bottom: -24px; padding: 4px 7px; border-radius: 7px; opacity: 0; color: var(--ink); background: var(--glass-strong); box-shadow: var(--shadow-soft); font-size: 9px; transform: translateX(-50%); transition: opacity .15s; }
.dock-app:hover small { opacity: 1; }
.running-dot { position: absolute; left: 50%; bottom: -4px; display: none; width: 4px; height: 4px; border-radius: 50%; background: var(--ink); transform: translateX(-50%); }
.dock-app.running .running-dot { display: block; }
.dock-divider { width: 1px; height: 39px; margin: 0 1px; background: var(--line); }
.minimized-slots { max-width: min(40vw, 360px); overflow-x: auto; display: flex; align-items: center; gap: 7px; scrollbar-width: none; }
.minimized-slots:empty + * { display: none; }
.minimized-window { position: relative; width: 49px; height: 50px; padding: 3px; border-radius: 14px; background: var(--glass-soft); }
.minimized-window:hover { background: var(--hover); transform: translateY(-3px); }
.minimized-window .dock-icon { width: 39px; height: 39px; border-radius: 12px; }
.minimized-window .dock-icon svg { width: 27px; height: 27px; }
.minimized-window > .minimized-window-label { position: absolute; left: 50%; bottom: -24px; max-width: 130px; padding: 4px 7px; overflow: hidden; border-radius: 7px; opacity: 0; color: var(--ink); background: var(--glass-strong); box-shadow: var(--shadow-soft); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; transform: translateX(-50%); }
.minimized-window:hover > .minimized-window-label { opacity: 1; }

.app-toolbar { min-height: 54px; padding: 0 15px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: color-mix(in srgb,var(--glass-strong) 62%,transparent); }
.app-toolbar-actions { display: flex; align-items: center; gap: 8px; }
.editor-status, .viewer-status, .player-status { min-width: 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.editor-app, .viewer-app, .player-app { width: 100%; height: 100%; min-height: 0; display: flex; flex-direction: column; background: color-mix(in srgb,var(--glass) 76%,transparent); }
.editor-workspace { min-height: 0; flex: 1; position: relative; }
.editor-textarea { display: block; width: 100%; height: 100%; padding: 25px 29px 50px; border: 0; border-radius: 0; outline: 0; resize: none; color: var(--ink); background: color-mix(in srgb,var(--glass-strong) 76%,transparent); font: 13px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; tab-size: 2; }
.editor-textarea:focus { box-shadow: inset 0 0 0 2px color-mix(in srgb,var(--blue) 30%,transparent); }
.editor-textarea:read-only { color: var(--muted); }
.editor-preview { width: 100%; height: 100%; overflow: auto; background: color-mix(in srgb,var(--bg-deep) 34%,transparent); }
.editor-preview .markdown-preview { margin: 0 auto; }
.viewer-navigation { display: flex; gap: 6px; }
.viewer-toolbar .viewer-status { flex: 1; text-align: center; }
.viewer-stage { min-height: 0; flex: 1; display: grid; place-items: center; overflow: auto; padding: 18px; background: radial-gradient(circle at 50% 40%, color-mix(in srgb,var(--glass-strong) 58%,transparent), color-mix(in srgb,var(--bg-deep) 60%,transparent)); }
.viewer-stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 18px 50px rgba(17,34,65,.23); }
.viewer-app.actual-size .viewer-stage { display: block; text-align: center; }
.viewer-app.actual-size .viewer-stage img { max-width: none; max-height: none; margin: 0 auto; }
.player-stage { min-height: 0; flex: 1; display: grid; place-items: center; gap: 22px; padding: 24px; overflow: auto; background: radial-gradient(circle at 50% 30%, color-mix(in srgb,var(--blue) 15%,transparent), color-mix(in srgb,var(--bg-deep) 72%,transparent)); }
.player-stage video { display: block; width: 100%; height: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; background: #05070b; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.player-stage audio { width: min(460px, 92%); }
.audio-player .player-stage { grid-template-rows: minmax(180px,1fr) auto; }
.audio-artwork { display: grid; width: min(280px, 62vw); aspect-ratio: 1; place-items: center; border-radius: 28%; color: white; background: linear-gradient(145deg,#8b76ec,#546fd7 46%,#df668e); box-shadow: 0 28px 70px rgba(50,54,126,.34), inset 0 1px 1px rgba(255,255,255,.32); }
.audio-artwork svg { width: 62%; height: 62%; fill: rgba(255,255,255,.12); stroke: white; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.settings-app { width: 100%; height: 100%; min-height: 0; display: flex; flex-direction: column; background: color-mix(in srgb,var(--glass) 80%,transparent); }
.browser-app { width: 100%; height: 100%; min-height: 0; display: flex; flex-direction: column; background: color-mix(in srgb,var(--glass) 80%,transparent); }
.browser-toolbar > div { min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.browser-toolbar > div span, .browser-idle-note { color: var(--muted); font-size: 10px; }
.browser-workspace { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(300px, .72fr) minmax(420px, 1.28fr); }
.browser-script-panel { min-height: 0; padding: 22px; border-right: 1px solid var(--line); overflow: auto; display: flex; flex-direction: column; gap: 15px; background: color-mix(in srgb,var(--sidebar) 72%,transparent); }
.browser-script-panel label { min-height: 0; display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 650; }
.browser-script-panel input, .browser-script-panel textarea { width: 100%; padding: 11px 12px; border-radius: 11px; color: var(--ink); background: var(--field); }
.browser-script-panel input { height: 42px; }
.browser-steps-label { flex: 1; }
.browser-script-panel textarea { min-height: 210px; flex: 1; resize: vertical; font: 11px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; tab-size: 2; }
.browser-script-panel details { padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: var(--glass-soft); font-size: 10px; line-height: 1.55; }
.browser-script-panel summary { color: var(--ink); cursor: pointer; font-weight: 650; }
.browser-script-panel details code { display: block; margin-top: 8px; color: var(--blue); white-space: normal; }
.browser-script-panel details p { margin: 6px 0 0; }
.browser-script-panel .form-error { min-height: 16px; margin: 0; }
.browser-actions { display: flex; justify-content: flex-end; gap: 8px; }
.browser-result-panel { min-width: 0; min-height: 0; padding: 18px; display: grid; grid-template-rows: auto minmax(210px,1fr) minmax(90px,.38fr); gap: 12px; }
.browser-result-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.browser-result-head > div { min-width: 0; display: grid; gap: 5px; }
.browser-result-head strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.browser-result-head a { flex: none; color: var(--blue); font-size: 10px; }
.browser-state { width: fit-content; padding: 3px 7px; border-radius: 7px; color: var(--muted); background: var(--glass-soft); font-size: 9px; font-weight: 720; text-transform: uppercase; letter-spacing: .04em; }
.browser-state.running, .browser-state.queued { color: var(--blue); background: var(--blue-soft); }
.browser-state.completed { color: var(--green); background: color-mix(in srgb,var(--green) 13%,transparent); }
.browser-state.failed, .browser-state.cancelled { color: var(--danger); background: color-mix(in srgb,var(--danger) 12%,transparent); }
.browser-preview { min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: 15px; display: grid; place-items: center; background: #eef2f7; box-shadow: inset 0 1px 3px rgba(25,38,64,.08); }
.browser-preview > div { padding: 25px; display: grid; justify-items: center; gap: 7px; color: #68748c; text-align: center; }
.browser-preview > div span { font-size: 38px; color: var(--blue); }
.browser-preview > div strong { color: #24314c; }
.browser-preview > div small { max-width: 310px; line-height: 1.5; }
.browser-preview img { display: block; width: 100%; height: auto; align-self: start; }
.browser-result-panel pre { min-width: 0; min-height: 0; margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 13px; overflow: auto; color: var(--ink); background: color-mix(in srgb,var(--glass-strong) 75%,transparent); font: 10px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.settings-sync-note { color: var(--muted); font-size: 10px; }
.settings-scroll { min-height: 0; flex: 1; overflow: auto; padding: 25px; }
.settings-section { margin: 0 auto 25px; max-width: 680px; padding: 21px; border: 1px solid var(--line); border-radius: 20px; background: var(--glass-soft); }
.settings-section h2 { margin: 0; font-size: 18px; }
.settings-section > p { margin: 5px 0 17px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.settings-section h3 { margin: 22px 0 10px; color: var(--muted); font-size: 11px; }
.settings-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.setting-choice { min-height: 49px; border: 1px solid var(--line); border-radius: 13px; color: var(--muted); background: var(--glass-soft); cursor: pointer; }
.setting-choice:hover, .setting-choice.active { color: var(--ink); background: var(--active); }
.setting-choice.active { border-color: color-mix(in srgb,var(--blue) 45%,transparent); box-shadow: 0 0 0 3px var(--blue-soft); }
.accent-options { display: flex; gap: 11px; }
.accent-choice { width: 36px; height: 36px; border: 3px solid transparent; border-radius: 50%; background: var(--accent-choice); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), 0 4px 10px rgba(30,45,75,.13); cursor: pointer; }
.accent-choice.active { border-color: var(--glass-strong); box-shadow: 0 0 0 3px var(--accent-choice); }
.accent-blue { --accent-choice:#1677ff; } .accent-violet { --accent-choice:#7864ee; } .accent-teal { --accent-choice:#159f9a; } .accent-rose { --accent-choice:#dc5f8d; } .accent-orange { --accent-choice:#e78332; }
.wallpaper-options { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.wallpaper-choice { min-height: 92px; padding: 0; border: 3px solid transparent; border-radius: 14px; display: flex; align-items: flex-end; overflow: hidden; color: white; background: var(--wallpaper-preview); box-shadow: var(--shadow-soft); cursor: pointer; }
.wallpaper-choice.active { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.wallpaper-choice span { width: 100%; padding: 7px; background: linear-gradient(transparent,rgba(0,0,0,.48)); font-size: 10px; text-align: left; }
.wallpaper-aurora { --wallpaper-preview:linear-gradient(145deg,#d7ebff,#b9d7ff 36%,#c8c1ff 68%,#5d9bae); } .wallpaper-dusk { --wallpaper-preview:linear-gradient(145deg,#2b214b,#665487 38%,#dc7f8b 70%,#f6b679); } .wallpaper-ocean { --wallpaper-preview:linear-gradient(145deg,#a6e2ef,#58b9d5 40%,#367cae 72%,#153f6a); } .wallpaper-mist { --wallpaper-preview:linear-gradient(145deg,#eef1f4,#cbd7dd 40%,#9db4ba 72%,#718a91); }
.settings-photo-grid { min-height: 70px; display: grid; grid-template-columns: repeat(auto-fill,minmax(105px,1fr)); gap: 9px; color: var(--muted); font-size: 11px; }
.settings-photo { min-width: 0; padding: 4px; border: 2px solid transparent; border-radius: 12px; overflow: hidden; color: var(--muted); background: var(--glass-soft); cursor: pointer; }
.settings-photo.active { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.settings-photo img { width: 100%; aspect-ratio: 16/10; display: block; border-radius: 8px; object-fit: cover; background: var(--bg-deep); }
.settings-photo span { display: block; padding: 5px 3px 2px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.settings-empty { grid-column: 1/-1; }

.sheet-backdrop { position: fixed; z-index: 2000; inset: 0; padding: 24px; display: grid; place-items: center; background: rgba(16,25,43,.2); -webkit-backdrop-filter: blur(13px); backdrop-filter: blur(13px); animation: rise .2s ease; }
.preview-sheet { width: min(900px, 100%); height: min(700px, calc(100vh - 48px)); overflow: hidden; border-radius: 28px; display: flex; flex-direction: column; }
.preview-sheet header { min-height: 76px; padding: 16px 20px 13px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.preview-sheet h2 { max-width: 550px; overflow: hidden; margin: 0; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
.preview-actions { display: flex; gap: 8px; }
.preview-content { min-height: 0; flex: 1; display: grid; place-items: center; overflow: auto; background: color-mix(in srgb,var(--bg-deep) 38%,transparent); }
.preview-content img, .preview-content video { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.preview-content iframe { width: 100%; height: 100%; border: 0; background: white; }
.preview-content audio { width: min(520px, 80%); }
.preview-content pre { width: 100%; height: 100%; margin: 0; padding: 28px; overflow: auto; color: var(--ink); font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.preview-editor { width: 100%; height: 100%; padding: 28px; border: 0; border-radius: 0; outline: 0; resize: none; color: var(--ink); background: color-mix(in srgb,var(--glass-strong) 72%,transparent); font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; tab-size: 2; }
.preview-editor:focus { box-shadow: inset 0 0 0 2px color-mix(in srgb,var(--blue) 42%,transparent); }
.markdown-preview { width: min(780px, 100%); min-height: 100%; padding: 38px 44px 60px; color: var(--ink); background: color-mix(in srgb,var(--glass-strong) 78%,transparent); line-height: 1.7; }
.markdown-preview h1, .markdown-preview h2, .markdown-preview h3, .markdown-preview h4, .markdown-preview h5, .markdown-preview h6 { margin: 1.25em 0 .45em; line-height: 1.25; letter-spacing: -.025em; }
.markdown-preview h1:first-child, .markdown-preview h2:first-child, .markdown-preview h3:first-child { margin-top: 0; }
.markdown-preview h1 { padding-bottom: .3em; border-bottom: 1px solid var(--line); font-size: 30px; }
.markdown-preview h2 { padding-bottom: .25em; border-bottom: 1px solid var(--line); font-size: 24px; }
.markdown-preview h3 { font-size: 19px; }
.markdown-preview p { margin: 0 0 1em; }
.markdown-preview ul, .markdown-preview ol { margin: 0 0 1em; padding-left: 1.6em; }
.markdown-preview li { margin: .2em 0; }
.markdown-preview blockquote { margin: 0 0 1em; padding: .2em 1em; border-left: 3px solid var(--blue); color: var(--muted); background: var(--blue-soft); }
.markdown-preview blockquote > :last-child { margin-bottom: 0; }
.markdown-preview code { padding: .15em .38em; border-radius: 6px; color: var(--ink); background: color-mix(in srgb,var(--ink) 9%,transparent); font: .9em/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.markdown-preview pre { width: 100%; height: auto; margin: 0 0 1.2em; padding: 17px 19px; border: 1px solid var(--line); border-radius: 13px; overflow: auto; background: color-mix(in srgb,var(--ink) 7%,transparent); white-space: pre; }
.markdown-preview pre code { padding: 0; background: transparent; }
.markdown-preview a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.preview-fallback { text-align: center; }
.preview-fallback .file-icon { margin-bottom: 17px; }
.preview-sheet footer { min-height: 47px; padding: 0 22px; border-top: 1px solid var(--line); display: flex; align-items: center; color: var(--muted); font-size: 11px; }
.action-sheet { width: min(410px, 100%); padding: 31px; border-radius: 26px; text-align: center; }
.action-symbol { display: grid; width: 56px; height: 56px; margin: 0 auto 14px; place-items: center; border-radius: 18px; color: var(--blue); background: var(--blue-soft); font-size: 28px; }
.action-sheet h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
.action-sheet > p:not(.form-error) { margin: 8px 0 21px; color: var(--muted); line-height: 1.5; }
.action-sheet label { text-align: left; }
.share-sheet { width: min(460px, 100%); }
.share-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left; }
.share-options label, .share-result label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 620; }
.share-options label span, .share-result label span { display: flex; justify-content: space-between; }
.share-options label small { color: var(--faint); font-size: 10px; font-weight: 500; }
.share-options input, .share-options select, .share-result input { width: 100%; height: 40px; padding: 0 12px; border-radius: 11px; color: var(--ink); }
.share-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 9px; text-align: left; }
.share-result .quiet-button { height: 40px; }
.modal-actions { margin-top: 18px; display: flex; justify-content: flex-end; gap: 8px; }
.modal-actions .primary-button, .modal-actions .quiet-button { min-width: 88px; }

.context-menu { position: fixed; z-index: 2100; width: 190px; padding: 7px; border-radius: 15px; box-shadow: 0 18px 48px rgba(21,37,65,.25); }
.context-menu button { width: 100%; height: 34px; padding: 0 9px; border-radius: 9px; display: flex; align-items: center; gap: 9px; background: transparent; text-align: left; font-size: 12px; }
.context-menu button:hover { background: var(--blue); color: white; }
.context-menu button span { width: 18px; text-align: center; }
.context-menu button.danger { color: var(--danger); }
.context-menu button.danger:hover { color: white; background: var(--danger); }
.context-menu i { display: block; height: 1px; margin: 5px 4px; background: var(--line); }
.desktop-context-menu { width: 205px; }
.shared-view { display: grid; align-content: start; gap: 10px; }
.share-card { min-width: 0; padding: 14px 15px; border: 1px solid var(--line); border-radius: 17px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; background: var(--glass-soft); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.share-card .file-icon { width: 45px; height: 45px; margin: 0; border-radius: 13px; font-size: 17px; box-shadow: 0 7px 15px rgba(55,77,111,.12); }
.share-card-copy { min-width: 0; display: grid; gap: 3px; }
.share-card-copy strong, .share-card-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-card-copy strong { font-size: 13px; }
.share-card-copy span, .share-card-copy small { color: var(--muted); font-size: 10px; }
.share-card-actions { display: flex; gap: 7px; }
.danger-text { color: var(--danger); }
.transfer-panel { position: absolute; z-index: 30; right: 18px; bottom: 18px; width: 270px; padding: 16px; border-radius: 18px; box-shadow: var(--shadow-soft); }
.transfer-panel header { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.transfer-panel header p { margin-bottom: 2px; }
.transfer-panel header span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 9px; color: var(--blue); background: var(--blue-soft); font-size: 11px; font-weight: 700; }
.transfer-track i { background: linear-gradient(90deg,#46a4ff,#705cf2); }
.transfer-panel > small { display: block; margin-top: 8px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.toast-stack { position: fixed; z-index: 2200; top: 52px; right: 18px; display: grid; gap: 8px; }
.toast { min-width: 240px; max-width: 340px; padding: 12px 15px; border: 1px solid rgba(255,255,255,.35); border-radius: 14px; color: var(--ink); background: var(--glass-strong); box-shadow: var(--shadow-soft); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); animation: rise .2s ease; }
.toast strong { display: block; margin-bottom: 2px; font-size: 12px; }
.toast span { color: var(--muted); font-size: 11px; }
.toast.error strong { color: var(--danger); }

@media (max-width: 960px) {
  .file-app { grid-template-columns: 188px minmax(0,1fr); }
  .sidebar { padding-inline: 9px; }
  .toolbar { padding-inline: 15px; }
  .toolbar .breadcrumbs { display: none; }
  .search-wrap input { width: 140px; }
  .icon-button.labelled span:last-child { display: none; }
  .grid-view { grid-template-columns: repeat(auto-fill, minmax(115px,1fr)); }
  .list-head, .list-view .file-card { grid-template-columns: minmax(180px,1.5fr) minmax(100px,.7fr) minmax(70px,.45fr) 30px; }
  .list-head span:nth-child(3), .list-value.kind-value { display: none; }
}

@media (max-width: 700px) {
  .menu-bar { top: 4px; left: 4px; right: 4px; }
  .menu-item, .menu-text-button, .disk-status, .clock { display: none; }
  .os-window { min-width: 320px; min-height: 420px; border-width: 0; border-radius: 0; }
  .os-window.maximized, .window-titlebar, .window-body { border-radius: 0; }
  .resize-handle { display: none; }
  .window-titlebar { grid-template-columns: 72px 1fr 72px; }
  .window-control.maximize { display: none; }
  .file-app { grid-template-columns: 1fr; grid-template-rows: 49px minmax(0,1fr); }
  .sidebar { padding: 5px 8px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .sidebar nav { display: flex; align-items: center; gap: 4px; }
  .nav-label, .storage-card, .sidebar-footer { display: none; }
  .nav-item { width: 39px; min-width: 39px; min-height: 39px; padding: 0; justify-content: center; }
  .nav-item .nav-icon { width: 25px; }
  .nav-item span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .toolbar { min-height: 65px; padding: 10px 12px; flex-wrap: wrap; }
  .toolbar-actions { min-width: 0; flex: 1; justify-content: flex-end; }
  .search-wrap { flex: 1; }
  .search-wrap input { width: 100%; }
  .content-head { padding: 20px 17px 12px; align-items: flex-start; }
  .view-controls .sort-control { display: none; }
  .file-view { padding-inline: 13px; }
  .grid-view { grid-template-columns: repeat(auto-fill, minmax(98px,1fr)); gap: 8px; }
  .grid-view .file-card { min-height: 126px; padding-inline: 5px; }
  .file-icon { width: 64px; height: 64px; }
  .list-head, .list-view .file-card { grid-template-columns: minmax(150px,1fr) 80px 30px; }
  .list-head span:nth-child(2), .list-value.date-value { display: none; }
  .dock { bottom: 5px; height: 62px; }
  .login-card { padding: 38px 26px 30px; border-radius: 29px; }
  .transfer-panel { right: 10px; bottom: 10px; width: calc(100% - 20px); }
  .share-options { grid-template-columns: 1fr; }
  .share-result { grid-template-columns: 1fr; }
  .share-card { grid-template-columns: auto minmax(0,1fr); }
  .share-card-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .markdown-preview { padding: 27px 22px 45px; }
  .app-toolbar { min-height: 50px; padding-inline: 9px; }
  .editor-textarea { padding: 19px 17px 42px; }
  .viewer-toolbar .viewer-status { display: none; }
  .viewer-stage { padding: 8px; }
  .player-stage { padding: 12px; }
  .desktop-icons { inset-inline: 6px; }
  .desktop-icon { width: 78px; }
  .settings-scroll { padding: 12px; }
  .browser-idle-note { display: none; }
  .browser-workspace { grid-template-columns: 1fr; overflow: auto; }
  .browser-script-panel { min-height: 430px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .browser-result-panel { min-height: 580px; grid-template-rows: auto 340px 170px; }
  .settings-section { padding: 16px; }
  .wallpaper-options { grid-template-columns: repeat(2,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; }
}
