: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);
}

* { 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 { 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: relative; z-index: 1; min-height: 100vh; padding: 48px 34px 104px; }
.menu-bar { position: fixed; z-index: 20; top: 10px; left: 50%; width: min(960px, calc(100% - 36px)); height: 35px; padding: 0 10px 0 8px; border-radius: 14px; 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); }
.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: 58px; color: var(--ink); font-variant-numeric: tabular-nums; }
.avatar { width: 25px; height: 25px; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; color: #fff; background: linear-gradient(145deg,#ffbb72,#e86a79); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); font-size: 11px; font-weight: 720; cursor: pointer; }

.file-window { width: min(1440px, 100%); height: calc(100vh - 154px); min-height: 550px; margin: 0 auto; overflow: hidden; border-radius: var(--radius-xl); display: grid; grid-template-columns: 232px minmax(0, 1fr); animation: rise .55s cubic-bezier(.2,.8,.2,1); }
.sidebar { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 20px 13px 15px; border-right: 1px solid var(--line); background: var(--sidebar); }
.window-controls { display: flex; gap: 8px; height: 32px; padding: 2px 8px 0; }
.window-controls i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.window-controls i:nth-child(1) { background: #ff605c; }
.window-controls i:nth-child(2) { background: #ffbd44; }
.window-controls i:nth-child(3) { background: #00ca4e; }
.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.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.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.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: 18; left: 50%; bottom: 14px; height: 69px; padding: 7px 10px; border-radius: 22px; display: flex; align-items: center; gap: 8px; box-shadow: 0 18px 45px rgba(36,57,96,.23); 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; }
.files-icon { background: linear-gradient(145deg,#7ac6ff,#347ce7); }
.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; }
.dock-app.active::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 4px; height: 4px; border-radius: 50%; background: var(--ink); transform: translateX(-50%); }
.dock-divider { width: 1px; height: 39px; margin: 0 1px; background: var(--line); }

.sheet-backdrop { position: fixed; z-index: 50; 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-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; }
.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: 60; 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); }
.transfer-panel { position: fixed; z-index: 30; right: 27px; bottom: 100px; 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: 80; top: 58px; right: 24px; 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) {
  .desktop { padding-inline: 16px; }
  .file-window { 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) {
  body { overflow: auto; }
  .desktop { padding: 48px 8px 92px; }
  .menu-bar { width: calc(100% - 16px); }
  .menu-item, #sync-status, .clock { display: none; }
  .file-window { height: calc(100vh - 136px); min-height: 520px; grid-template-columns: 1fr; border-radius: 24px; }
  .sidebar { position: absolute; z-index: 20; inset: 0 auto 0 0; width: 230px; border-radius: 24px 0 0 24px; box-shadow: var(--shadow); transform: translateX(-105%); transition: transform .24s ease; }
  .sidebar.open { transform: translateX(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: 8px; }
  .login-card { padding: 38px 26px 30px; border-radius: 29px; }
  .transfer-panel { right: 12px; bottom: 88px; width: calc(100% - 24px); }
}

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