:root {
  --page-top: #e6f2ff;
  --page-bottom: #f6faff;
  --surface: #ffffff;
  --surface-2: #f1f7ff;
  --border: #dce9fb;
  --text: #0f2340;
  --muted: #5d7393;
  --accent: #1f74f5;
  --accent-2: #33b5ff;
  --accent-soft: #e5f1ff;
  --track: #e3eefc;
  --danger: #e04646;
  --success: #10a37a;
  --warning: #f2a516;
  --shadow: 0 1px 2px rgba(20, 60, 120, .06), 0 12px 32px rgba(31, 116, 245, .10);

  --sky-1: #1553d6;
  --sky-2: #2a8cff;
  --sky-3: #6fd2ff;
  --cloud: #ffffff;
  --bank-1: #ffffff;
  --bank-2: #eef7ff;
  --glass: rgba(255, 255, 255, .84);
  --glass-border: rgba(255, 255, 255, .75);

  --tile-folder: #1f74f5;  --tile-folder-bg: #e1efff;
  --tile-video: #4b57e6;   --tile-video-bg: #eaecff;
  --tile-image: #0a9fd4;   --tile-image-bg: #ddf4fd;
  --tile-audio: #2a86e4;   --tile-audio-bg: #e2f0fd;
  --tile-archive: #3a6ba6; --tile-archive-bg: #e6eef8;
  --tile-doc: #3e62cc;     --tile-doc-bg: #e5ebfc;
  --tile-file: #5d7393;    --tile-file-bg: #edf2f8;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-top: #0a1d3a;
    --page-bottom: #061226;
    --surface: #0d2242;
    --surface-2: #123058;
    --border: #1c3b66;
    --text: #e5efff;
    --muted: #8da5c8;
    --accent: #4aa6ff;
    --accent-2: #5fdcff;
    --accent-soft: #123a6a;
    --track: #17365f;
    --danger: #ff6b6b;
    --success: #3ad29f;
    --warning: #ffc04d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .28);

    --sky-1: #071c45;
    --sky-2: #0f3a80;
    --sky-3: #1b67b5;
    --cloud: #cfe5ff;
    --bank-1: #143a6b;
    --bank-2: #0f2f59;
    --glass: rgba(9, 27, 56, .74);
    --glass-border: rgba(120, 175, 255, .18);

    --tile-folder: #5cb0ff;  --tile-folder-bg: rgba(74, 166, 255, .16);
    --tile-video: #8f98ff;   --tile-video-bg: rgba(122, 132, 255, .16);
    --tile-image: #4fd0ff;   --tile-image-bg: rgba(79, 208, 255, .14);
    --tile-audio: #6ab7ff;   --tile-audio-bg: rgba(106, 183, 255, .14);
    --tile-archive: #8fb3e0; --tile-archive-bg: rgba(143, 179, 224, .14);
    --tile-doc: #8eaaff;     --tile-doc-bg: rgba(142, 170, 255, .14);
    --tile-file: #8da5c8;    --tile-file-bg: rgba(141, 165, 200, .12);

    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Сервер ставит data-stage: dev — облако в разработке, live — вход открыт всем. */
[data-stage="live"] .dev-only, [data-stage="dev"] .live-only { display: none !important; }

html, body { margin: 0; }
body {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--page-top) 0%, var(--page-bottom) 420px) fixed;
  color: var(--text);
  font: 15px/1.45 "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; }

.ic {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.muted { color: var(--muted); }

/* ---------------- облака */

.sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

.cloud {
  position: absolute;
  display: block;
  height: auto;
  aspect-ratio: 2 / 1;
  fill: var(--cloud);
}

.drift {
  left: 0;
  animation: drift 100s linear infinite;
  will-change: transform;
}

@keyframes drift {
  from { transform: translateX(-110%); }
  to { transform: translateX(100vw); }
}

@keyframes bob {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ---------------- кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s, box-shadow .15s, filter .15s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.wide { width: 100%; }

.btn.primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 10px 24px rgba(31, 116, 245, .32);
}
.btn.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }

.btn.white {
  border: 0;
  background: #ffffff;
  color: #1556d4;
  box-shadow: 0 10px 26px rgba(4, 36, 110, .28);
}
.btn.white:hover { background: #f2f8ff; transform: translateY(-1px); }

.btn.on-sky {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .3);
  color: #fff;
  backdrop-filter: blur(6px);
}
.btn.on-sky:hover { background: rgba(255, 255, 255, .26); }
.btn.on-sky.ghost { background: transparent; border-color: transparent; }
.btn.on-sky.ghost:hover { background: rgba(255, 255, 255, .16); }

.btn:focus-visible, .icon-btn:focus-visible, .link:focus-visible,
.crumb:focus-visible, .name:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent-2) 70%, transparent);
  outline-offset: 2px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.icon-btn.danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }

.link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.link:hover { text-decoration: underline; }

/* ---------------- вход */

.login {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px 96px;
  overflow: hidden;
  background: linear-gradient(180deg, #1859dc 0%, #3d98ff 42%, #94d5ff 78%, #dcf2ff 100%);
}

.login .d1 { top: 7%;  width: 230px; opacity: .92; animation-duration: 85s;  animation-delay: -10s; }
.login .d2 { top: 17%; width: 140px; opacity: .7;  animation-duration: 115s; animation-delay: -72s; }
.login .d3 { top: 31%; width: 320px; opacity: .5;  animation-duration: 150s; animation-delay: -45s; }
.login .d4 { top: 4%;  width: 120px; opacity: .6;  animation-duration: 100s; animation-delay: -55s; }
.login .d5 { top: 47%; width: 190px; opacity: .45; animation-duration: 125s; animation-delay: -98s; }
.login .d6 { top: 24%; width: 90px;  opacity: .85; animation-duration: 75s;  animation-delay: -28s; }

.cloud-bank { position: absolute; left: 0; right: 0; bottom: 0; height: 34vh; }
.cloud-bank .cloud { animation: bob 7s ease-in-out infinite alternate; }
.cloud-bank .b1 { left: -8%; bottom: -70px;  width: max(46vw, 320px); fill: var(--bank-2); animation-delay: -1s; }
.cloud-bank .b2 { left: 20%; bottom: -110px; width: max(42vw, 300px); fill: var(--bank-1); animation-delay: -4s; }
.cloud-bank .b3 { left: 47%; bottom: -80px;  width: max(46vw, 320px); fill: var(--bank-2); animation-delay: -2s; }
.cloud-bank .b4 { left: 70%; bottom: -60px;  width: max(40vw, 280px); fill: var(--bank-1); animation-delay: -5s; }
.cloud-bank .b5 { left: 5%;  bottom: -170px; width: 95vw; fill: var(--bank-1); animation-delay: -3s; }

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 30px 28px 24px;
  border: 1px solid var(--glass-border);
  border-radius: 26px;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 24px 64px rgba(10, 60, 160, .28);
  text-align: center;
}

.logo {
  position: relative;
  width: 104px;
  height: 58px;
  margin: 0 auto 2px;
  animation: float 6s ease-in-out infinite;
}
.logo-cloud {
  position: absolute;
  inset: 0;
  width: 104px;
  height: 52px;
  fill: url(#logo-grad);
  filter: drop-shadow(0 10px 18px rgba(31, 107, 255, .38));
}
.logo-arrow {
  position: absolute;
  left: 50%;
  top: 19px;
  width: 24px;
  height: 24px;
  transform: translateX(-50%);
  stroke: #fff;
  stroke-width: 2.6;
}

.login-title {
  margin: 0;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -.02em;
  background: linear-gradient(90deg, #1758e0, #23a8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-sub { margin: -6px 0 8px; color: var(--muted); }

.field input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: var(--muted); }
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.login .btn.primary { height: 50px; border-radius: 14px; font-size: 16px; }

.form-error { margin: 0; color: var(--danger); font-size: 14px; }

.dev-note {
  margin: -4px 0 4px;
  padding: 10px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--warning) 14%, transparent);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.45;
}
.login-step { display: flex; flex-direction: column; gap: 12px; }
.code-input { text-align: center; letter-spacing: .4em; font-size: 22px !important; font-weight: 700; }
.code-input::placeholder { letter-spacing: normal; font-size: 16px; font-weight: 400; }
.code-actions { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.code-actions .link:disabled { color: var(--muted); cursor: default; text-decoration: none; }

.user-email {
  max-width: 220px;
  color: rgba(255, 255, 255, .85);
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.no-quota .link { display: inline-block; margin-top: 8px; font-size: 14px; }

.back-link { margin-top: 2px; color: var(--muted); font-size: 13px; text-decoration: none; }
.back-link:hover { color: var(--accent); }

.login-perks {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  color: var(--muted);
}
.login-perks li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  vertical-align: middle;
}

/* ---------------- шапка-небо */

.hero {
  position: relative;
  overflow: hidden;
  padding-bottom: 84px;
  background: linear-gradient(160deg, var(--sky-1) 0%, var(--sky-2) 58%, var(--sky-3) 100%);
  color: #fff;
}

.hero .drift { opacity: .22; }
.hero .h1 { top: 14px;  width: 180px; animation-duration: 120s; animation-delay: -30s; }
.hero .h2 { top: 70px;  width: 260px; opacity: .14; animation-duration: 170s; animation-delay: -110s; }
.hero .h3 { top: 34px;  width: 110px; animation-duration: 95s;  animation-delay: -70s; }
.hero .h4 { top: 120px; width: 150px; opacity: .16; animation-duration: 140s; animation-delay: -10s; }

.hero-edge { position: absolute; left: 0; right: 0; bottom: -2px; height: 60px; }
.hero-edge .cloud { fill: var(--page-top); bottom: 0; }
.hero-edge .e1 { left: -4%; width: 220px; bottom: -40px; }
.hero-edge .e2 { left: 12%; width: 160px; bottom: -36px; }
.hero-edge .e3 { left: 30%; width: 260px; bottom: -70px; }
.hero-edge .e4 { left: 55%; width: 200px; bottom: -48px; }
.hero-edge .e5 { left: 74%; width: 280px; bottom: -66px; }
.hero-edge .e6 { left: 90%; width: 200px; bottom: -40px; }

.topbar,
.hero-body {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.brand-mark { display: inline-grid; }
.brand-mark svg { width: 38px; height: 19px; fill: #fff; filter: drop-shadow(0 3px 8px rgba(0, 30, 90, .3)); }

.disk {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  min-width: 0;
}
.disk-text { font-size: 12px; color: rgba(255, 255, 255, .85); white-space: nowrap; }
.disk .bar { width: 170px; height: 6px; background: rgba(255, 255, 255, .24); }
.disk .bar-fill { background: #fff; }
.disk .bar-fill.warn { background: #ffd166; }

.hero-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 22px;
}
.hero-text { min-width: 0; }
.hero-title {
  margin: 2px 0 0;
  font-size: 36px;
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 16px rgba(0, 30, 100, .2);
}
.hero-sub { margin: 6px 0 0; font-size: 14px; color: rgba(255, 255, 255, .82); min-height: 20px; }
.hero-actions { display: flex; gap: 10px; }

.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; min-width: 0; margin-left: -8px; font-size: 14px; }
.crumb {
  max-width: 220px;
  padding: 3px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: rgba(255, 255, 255, .78);
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crumb:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.crumb.current { color: #fff; cursor: default; }
.crumb.current:hover { background: none; }
.crumb-sep { color: rgba(255, 255, 255, .5); }

/* ---------------- основная часть */

.main {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: -58px auto 0;
  padding: 0 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.card-title { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.card-title .ic { color: var(--accent); }

/* ---------------- незавершённые загрузки */

.notice {
  padding: 14px 18px;
  font-size: 14px;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%);
  border-color: color-mix(in srgb, var(--accent) 25%, var(--border));
}
.notice-title { font-weight: 700; margin-bottom: 2px; }
.notice-row { display: flex; align-items: center; gap: 10px; padding: 6px 0 0; }
.notice-row .grow { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- полоски прогресса */

.bar {
  position: relative;
  display: block;
  height: 8px;
  border-radius: 99px;
  background: var(--track);
  overflow: hidden;
}
.bar-fill {
  position: relative;
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  overflow: hidden;
  transition: width .2s linear;
}
.bar-fill.active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.6s ease-in-out infinite;
}
.bar-fill.done { background: linear-gradient(90deg, var(--success), color-mix(in srgb, var(--success) 60%, var(--accent-2))); }
.bar-fill.error { background: var(--danger); }

@keyframes shimmer {
  to { transform: translateX(100%); }
}

/* ---------------- очередь загрузок */

.up {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.up:last-child { border-bottom: 0; }
.up-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.up-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-btns { display: flex; gap: 2px; margin: -8px -8px -8px 0; }
.up-meta { margin-top: 7px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.up-meta.error { color: var(--danger); }
.up-meta.done { color: var(--success); }

/* ---------------- список файлов */

.row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 100px 150px auto;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 8px 12px 8px 18px;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--surface-2); }
.row:last-child:hover { border-radius: 0 0 20px 20px; }
.row.head {
  min-height: 0;
  padding-top: 12px;
  padding-bottom: 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.row.head:hover { background: none; }

.tile {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--tile-file);
  background: var(--tile-file-bg);
}
.tile .ic { width: 21px; height: 21px; }
.tile.folder { color: var(--tile-folder); background: var(--tile-folder-bg); }
.tile.folder .ic { fill: color-mix(in srgb, var(--tile-folder) 22%, transparent); }
.tile.video { color: var(--tile-video); background: var(--tile-video-bg); }
.tile.image { color: var(--tile-image); background: var(--tile-image-bg); }
.tile.audio { color: var(--tile-audio); background: var(--tile-audio-bg); }
.tile.archive { color: var(--tile-archive); background: var(--tile-archive-bg); }
.tile.doc { color: var(--tile-doc); background: var(--tile-doc-bg); }

.name-cell { min-width: 0; }
.name {
  display: block;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.name:hover { color: var(--accent); }
.name-meta { display: none; font-size: 12.5px; color: var(--muted); }

.size, .date { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.size { text-align: right; }
.row-actions { display: flex; justify-content: flex-end; gap: 2px; min-width: 112px; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 56px 16px 60px;
  text-align: center;
  color: var(--muted);
}
.empty-title { color: var(--text); font-size: 17px; font-weight: 700; }
.empty-art {
  position: relative;
  width: 150px;
  height: 80px;
  margin-bottom: 10px;
  animation: float 6s ease-in-out infinite;
}
.empty-cloud {
  position: absolute;
  inset: 0;
  width: 150px;
  height: 75px;
  fill: url(#logo-grad);
  opacity: .9;
  filter: drop-shadow(0 12px 20px rgba(31, 107, 255, .25));
}
.empty-arrow {
  position: absolute;
  left: 50%;
  top: 26px;
  width: 32px;
  height: 32px;
  transform: translateX(-50%);
  stroke: #fff;
  stroke-width: 2.4;
}
.empty .btn { margin-top: 12px; }

/* ---------------- перетаскивание и уведомления */

.drop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background: color-mix(in srgb, var(--sky-1) 38%, transparent);
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.drop-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 56px;
  border: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 28px;
  background: var(--glass);
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 24px 64px rgba(10, 60, 160, .3);
}
.drop-cloud {
  width: 140px;
  height: 70px;
  fill: url(#logo-grad);
  animation: float 2.4s ease-in-out infinite;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 30;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: #0c2a58;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 16px 40px rgba(6, 30, 80, .35);
  transform: translateX(-50%);
}

/* ---------------- ночное небо */

@media (prefers-color-scheme: dark) {
  .login {
    background:
      radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 52%),
      radial-gradient(1px 1px at 28% 8%, #fff 50%, transparent 52%),
      radial-gradient(1.5px 1.5px at 44% 26%, #cfe5ff 50%, transparent 52%),
      radial-gradient(1px 1px at 63% 12%, #fff 50%, transparent 52%),
      radial-gradient(2px 2px at 78% 22%, #fff 50%, transparent 52%),
      radial-gradient(1px 1px at 88% 6%, #cfe5ff 50%, transparent 52%),
      radial-gradient(1px 1px at 6% 40%, #fff 50%, transparent 52%),
      radial-gradient(1.5px 1.5px at 92% 38%, #fff 50%, transparent 52%),
      radial-gradient(1px 1px at 55% 4%, #fff 50%, transparent 52%),
      linear-gradient(180deg, #040b1d 0%, #0a2250 48%, #14427f 82%, #1a5194 100%);
  }
  .login .drift { opacity: .1; }
  .hero .drift { opacity: .1; }
  .login-title { background-image: linear-gradient(90deg, #79c0ff, #9fe9ff); }
  .btn.primary { color: #04214a; box-shadow: 0 10px 24px rgba(40, 150, 255, .22); }
  .btn.white { background: #e6f2ff; color: #0c3d96; }
  .btn.white:hover { background: #ffffff; }
  .toast { background: #e6f0ff; color: #0c2a58; }
}

/* ---------------- телефон */

@media (max-width: 640px) {
  .topbar { gap: 10px; padding: 12px 16px; }
  .hero-body { padding: 14px 16px 0; gap: 14px; }
  .hero { padding-bottom: 72px; }
  .hero-title { font-size: 28px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }
  .disk .bar { width: 100px; }
  .disk-text { font-size: 11px; }
  .hide-sm, .user-email { display: none; }
  .btn.on-sky.ghost { padding: 0 10px; }
  .main { padding: 0 12px 48px; margin-top: -50px; }
  .row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; padding-left: 14px; padding-right: 8px; }
  .row.head { display: none; }
  .size, .date { display: none; }
  .name-meta { display: block; }
  .row-actions { min-width: 0; }
  .up { padding: 14px; gap: 12px; }
  .drop-inner { padding: 32px 24px; font-size: 16px; }
}

@media (max-width: 380px) {
  .brand-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .drift, .cloud-bank .cloud, .logo, .empty-art, .drop-cloud, .bar-fill.active::after { animation: none; }
  .drift { transform: translateX(30vw); }
  .bar-fill, .btn { transition: none; }
}
