:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f0f2f7;
  --line: #e1e5ee;
  --text: #182033;
  --muted: #667089;
  --accent: #2f6fde;
  --accent-soft: #e6eefc;
  --accent-text: #ffffff;
  --danger: #d23c3c;
  --danger-soft: #fdeaea;
  --ok: #1f9d63;
  --warn: #c98a0b;
  --shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 4px 16px rgba(20, 30, 60, .06);
  --shadow-lg: 0 10px 40px rgba(20, 30, 60, .18);
  --radius: 12px;
  --ic-dir: #e9a23b;
  --ic-img: #2fa37a;
  --ic-vid: #b04fd6;
  --ic-aud: #e0618a;
  --ic-doc: #2f6fde;
  --ic-arc: #8a6d3b;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f131b;
    --surface: #171c27;
    --surface-2: #1e2431;
    --line: #2a3142;
    --text: #e6e9f0;
    --muted: #8d96ab;
    --accent: #5b8ff0;
    --accent-soft: #1c2a47;
    --danger: #f06a6a;
    --danger-soft: #3a1f23;
    --ok: #3ccf8e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 14px; }
p { margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; }
[hidden] { display: none !important; }

/* ── иконки ── */
.ic { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ic svg { width: 100%; height: 100%; }
.ic.kind { width: 22px; height: 22px; }
.ic.dir { color: var(--ic-dir); }
.ic.dir svg { fill: color-mix(in srgb, var(--ic-dir) 22%, transparent); }
.ic.image { color: var(--ic-img); }
.ic.video { color: var(--ic-vid); }
.ic.audio { color: var(--ic-aud); }
.ic.text, .ic.pdf { color: var(--ic-doc); }
.ic.archive { color: var(--ic-arc); }
.ic.file { color: var(--muted); }

/* ── кнопки и поля ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--text);
  font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.wide { width: 100%; justify-content: center; height: 40px; }
.btn.small { height: 30px; padding: 0 10px; font-size: 13px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-soft); }

input[type=text], input[type=password], input[type=search], input[type=number], select, textarea {
  width: 100%; height: 38px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--text); font: inherit;
}
textarea { height: auto; padding: 9px 11px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .icon-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; border-color: var(--accent);
}
.field { display: grid; gap: 5px; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.field small { color: var(--muted); font-size: 12px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.row-inline { display: flex; gap: 8px; }
.row-inline > * { flex: 1; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-err { color: var(--danger); min-height: 18px; font-size: 13px; }

.badge {
  display: inline-block; padding: 1px 8px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 600;
}
.badge.gray { background: var(--surface-2); color: var(--muted); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.green { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }

/* ── экран входа ── */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card {
  width: min(380px, 100%); display: grid; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 28px; box-shadow: var(--shadow);
}
.auth-card h1 { margin-top: 6px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; font-size: 16px; color: var(--text); }
.brand img { width: 28px; height: 28px; }
.brand.big img { width: 36px; height: 36px; }
.brand.big { font-size: 18px; }
.note { padding: 10px 12px; border-radius: 9px; background: var(--surface-2); color: var(--muted); font-size: 13px; }
.note.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--text); }

/* ── каркас ── */
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: 56px 1fr;
  grid-template-areas: "top top" "nav main";
}
.top {
  grid-area: top; display: flex; align-items: center; gap: 12px;
  padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.top .spacer { flex: 1; }
.who { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.nav {
  grid-area: nav; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px;
  border-right: 1px solid var(--line); background: var(--surface);
}
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px;
  color: var(--muted); font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav .sep { height: 1px; background: var(--line); margin: 8px 6px; }
.nav .label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 4px 12px; }
main { grid-area: main; padding: 22px 24px 120px; min-width: 0; }

.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .titles { flex: 1; min-width: 200px; display: grid; gap: 3px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 18px; }

/* ── файлы ── */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .grow { flex: 1; min-width: 180px; }
.search-box { position: relative; }
.search-box .ic { position: absolute; left: 10px; top: 10px; color: var(--muted); }
.search-box input { padding-left: 34px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: 15px; margin-bottom: 12px; min-height: 30px; }
.crumbs a, .crumbs span.cur { padding: 3px 8px; border-radius: 6px; color: var(--muted); }
.crumbs a:hover { background: var(--surface-2); color: var(--text); }
.crumbs span.cur { color: var(--text); font-weight: 600; }
.crumbs .slash { color: var(--line); }
.selbar {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 10px;
  background: var(--accent-soft); border-radius: 10px; color: var(--accent); font-weight: 500;
}
.selbar .grow { flex: 1; }

.file-list { overflow: hidden; }
.file-head, .file-row {
  display: grid; align-items: center; gap: 12px;
  grid-template-columns: 22px 24px minmax(0, 1fr) 100px 150px 140px;
  padding: 0 12px;
}
.file-head {
  height: 38px; font-size: 12px; color: var(--muted); font-weight: 600;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.file-head button { all: unset; cursor: pointer; }
.file-head button:hover { color: var(--text); }
.file-row { min-height: 48px; border-bottom: 1px solid var(--line); cursor: pointer; }
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: var(--surface-2); }
.file-row.sel { background: var(--accent-soft); }
.file-row input[type=checkbox], .file-head input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.file-row .name { min-width: 0; display: grid; }
.file-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-row .sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .size, .file-row .date { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.file-row .size { text-align: right; }
.file-head .r { text-align: right; }
.file-row .acts { display: flex; justify-content: flex-end; gap: 2px; opacity: .0; transition: opacity .1s; }
.file-row:hover .acts, .file-row:focus-within .acts { opacity: 1; }
@media (hover: none) { .file-row .acts { opacity: 1; } }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); display: grid; gap: 8px; justify-items: center; }
.empty .ic { width: 40px; height: 40px; opacity: .6; }

.drop-overlay {
  position: fixed; inset: 0; z-index: 30; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 3px dashed var(--accent); pointer-events: none;
  font-size: 20px; font-weight: 600; color: var(--accent);
}

/* ── очередь загрузки ── */
.uploads {
  position: fixed; right: 16px; bottom: 16px; z-index: 20; width: min(380px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.uploads-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; font-weight: 600; border-bottom: 1px solid var(--line); }
.uploads-head .grow { flex: 1; }
.uploads-list { max-height: 260px; overflow: auto; }
.up-item { padding: 8px 14px; display: grid; gap: 5px; border-bottom: 1px solid var(--line); }
.up-item:last-child { border-bottom: 0; }
.up-line { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.up-line .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-line .s { color: var(--muted); font-size: 12px; white-space: nowrap; }
.up-line .s.err { color: var(--danger); }
.up-line .s.ok { color: var(--ok); }
.bar { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.bar.big { height: 8px; }
.bar.warn > i { background: var(--warn); }
.bar.danger > i { background: var(--danger); }

/* ── таблицы ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.acts { text-align: right; white-space: nowrap; }
td { white-space: nowrap; }
td.mono:last-child { white-space: normal; word-break: break-all; }
td .sub { display: block; font-size: 12px; color: var(--muted); }

/* ── состояние ── */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { padding: 16px; display: grid; gap: 6px; }
.stat .k { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stat .v { font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 12.5px; color: var(--muted); }
.addr { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.addr:last-child { border-bottom: 0; }
.addr .mono { flex: 1; word-break: break-all; }
.section { margin-top: 16px; }
.section > h2 { margin-bottom: 10px; }
.steps { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); }
.steps b { color: var(--text); font-weight: 600; }

/* ── модальные окна ── */
.modal-back {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 14, 24, .45); backdrop-filter: blur(2px);
  animation: fade .12s ease-out;
}
.modal {
  width: min(460px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  animation: pop .14s ease-out;
}
.modal.wide { width: min(1000px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { padding: 18px 20px; overflow: auto; display: grid; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; flex-wrap: wrap; }
.preview { display: grid; place-items: center; min-height: 200px; }
.pv-img { max-width: 100%; max-height: 72vh; border-radius: 8px; }
.pv-media { max-width: 100%; max-height: 72vh; border-radius: 8px; background: #000; }
.pv-frame { width: 100%; height: 72vh; border: 0; border-radius: 8px; background: #fff; }
.pv-text {
  width: 100%; max-height: 72vh; overflow: auto; margin: 0; padding: 14px;
  background: var(--surface-2); border-radius: 8px; white-space: pre-wrap; word-break: break-word;
  font: 12.5px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace;
}
.secret {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 9px;
  background: var(--accent-soft); font-family: ui-monospace, Consolas, monospace; font-size: 15px;
}
.secret code { flex: 1; word-break: break-all; }

#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; display: grid; gap: 8px; justify-items: center; }
.toast {
  padding: 10px 16px; border-radius: 10px; background: var(--text); color: var(--bg);
  box-shadow: var(--shadow-lg); font-weight: 500; animation: pop .15s ease-out; transition: opacity .3s;
}
.toast.err { background: var(--danger); color: #fff; }
.toast.out { opacity: 0; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }

/* ── просмотр документов ── */
.ic.doc { color: #2b6cd8; }
.ic.sheet { color: #1f9d63; }
.ic.slides { color: #e0703a; }
.modal.viewer { width: min(1180px, 100%); height: calc(100vh - 32px); }
.modal.viewer .modal-body { padding: 0; display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; gap: 0; }
.modal.viewer .modal-body > .form-err { display: none; }
.pdf-viewer, .sheet-viewer, .zip-viewer { display: flex; flex-direction: column; flex: 1; min-height: 0; width: 100%; }
.pdf-bar {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px; min-height: 44px;
  border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap;
}
.pdf-bar .grow { flex: 1; }
.zoom-text { min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.pdf-pages {
  flex: 1; min-height: 0; overflow: auto; background: var(--surface-2);
  display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px;
}
.pdf-page { flex: none; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.pdf-page canvas { display: block; }
.sheet-grid { flex: 1; min-height: 0; overflow: auto; background: #fff; }
table.sheet { border-collapse: collapse; width: auto; font: 13px/1.35 Calibri, "Segoe UI", Arial, sans-serif; color: #111; background: #fff; }
table.sheet td, table.sheet th { border: 1px solid #d9dde3; padding: 3px 7px; white-space: pre-wrap; vertical-align: bottom; max-width: 480px; }
table.sheet td { min-width: 64px; }
table.sheet td[data-t="n"], table.sheet td[data-t="d"] { text-align: right; }
table.sheet thead th {
  position: sticky; top: 0; z-index: 2; background: #f1f3f6; color: #555; font-weight: 600; text-align: center; font-size: 12px;
}
table.sheet tbody th {
  position: sticky; left: 0; z-index: 1; background: #f1f3f6; color: #666; font-weight: 500; text-align: center; font-size: 12px; min-width: 40px;
}
table.sheet thead th.corner { left: 0; z-index: 3; }
.sheet-tabs { display: flex; gap: 2px; overflow-x: auto; padding: 0 8px; border-top: 1px solid var(--line); background: var(--surface-2); flex: none; }
.sheet-tabs button {
  all: unset; padding: 8px 14px; cursor: pointer; white-space: nowrap; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent;
}
.sheet-tabs button:hover { color: var(--text); }
.sheet-tabs button.active { color: #1f9d63; border-bottom-color: #1f9d63; background: var(--surface); font-weight: 600; }
.sheet-note { padding: 6px 12px; font-size: 12.5px; flex: none; }
.sheet-note:empty { display: none; }
.zip-viewer .table-wrap { flex: 1; min-height: 0; overflow: auto; }
.pv-wait, .pv-error { flex: 1; align-content: center; }
.center-btn { display: flex; justify-content: center; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.share-doc { height: calc(100vh - 220px); min-height: 420px; display: flex; overflow: hidden; }

.update-banner {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--accent); box-shadow: var(--shadow-lg); font-weight: 500;
}
.update-banner .ic { color: var(--accent); }

/* ── плитка (галерея) ── */
.file-list.as-grid { background: transparent; border: 0; box-shadow: none; overflow: visible; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile {
  position: relative; display: grid; gap: 4px; padding: 8px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.tile:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.tile.sel { border-color: var(--accent); background: var(--accent-soft); }
.tile .thumb { aspect-ratio: 4 / 3; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.tile .thumb img { width: 100%; height: 100%; object-fit: cover; }
.tile .thumb .ic { width: 44px; height: 44px; }
.tile input[type=checkbox] { position: absolute; top: 14px; left: 14px; width: 18px; height: 18px; accent-color: var(--accent); margin: 0; opacity: 0; }
.tile:hover input[type=checkbox], .tile.sel input[type=checkbox] { opacity: 1; }
@media (hover: none) { .tile input[type=checkbox] { opacity: 1; } }
.tile-name { font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.tile-sub { font-size: 12px; color: var(--muted); padding: 0 2px; }

/* ── прочее ── */
.row-head { display: flex; align-items: center; gap: 10px; }
.row-head h2 { flex: 1; }
.row-head > .ic { color: var(--accent); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.cell-name { display: flex; align-items: center; gap: 10px; }
.cell-name .sub { white-space: normal; }
.codes { font-size: 15px; letter-spacing: .05em; columns: 2; }
.tunnel.live { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.tunnel { margin-bottom: 16px; }
.toolbar .grow { flex: 1; }
.field.inline { display: flex; align-items: center; gap: 8px; }
.field.inline select { width: auto; }
.section-gap { margin-bottom: 14px; }
.break { word-break: break-word; }
.note .ic { vertical-align: -4px; color: var(--ok); }
.picker { display: grid; gap: 2px; max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.picker-item {
  all: unset; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer;
}
.picker-item:hover, .picker-item:focus-visible { background: var(--surface-2); }

/* ── страница общей ссылки ── */
.share-wrap { min-height: 100vh; display: grid; grid-template-rows: 56px 1fr; }
.share-wrap > .share-top, .share-wrap > .share-main { grid-area: auto; }
.share-main { width: min(960px, 100%); margin: 0 auto; padding: 24px 16px 120px; }
.share-card { max-width: 560px; margin: 24px auto; text-align: center; justify-items: center; }
.share-card .preview { width: 100%; }
.share-icon { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.share-icon .ic { width: 36px; height: 36px; }
.share-row { grid-template-columns: 0 24px minmax(0, 1fr) 100px 150px 60px; }
.dropzone {
  all: unset; box-sizing: border-box; width: 100%; padding: 32px 16px; display: grid; gap: 6px; justify-items: center; cursor: pointer;
  border: 2px dashed var(--line); border-radius: 14px; color: var(--accent);
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .ic { width: 32px; height: 32px; }
.dropzone b { font-size: 16px; }

/* ── телефон ── */
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 52px auto 1fr; grid-template-areas: "top" "nav" "main"; }
  .nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 6px 10px; }
  .nav a { white-space: nowrap; padding: 7px 10px; }
  .nav .sep, .nav .label { display: none; }
  .who .uname { display: none; }
  main { padding: 16px 16px 120px; }
  .file-head { display: none; }
  .file-row { grid-template-columns: 22px 24px minmax(0, 1fr) auto; padding: 6px 10px; }
  .file-row .size, .file-row .date { display: none; }
  .file-row .name .sub.m { display: block; }
  .toolbar .btn .lbl { display: none; }
  .toolbar .btn { padding: 0 11px; }
  .form-grid.two { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
  .share-row { grid-template-columns: 0 24px minmax(0, 1fr) auto; }
  .page-head .btn { width: 100%; justify-content: center; }
  .modal-back:has(.modal.viewer) { padding: 0; }
  .modal.viewer { height: 100vh; height: 100dvh; max-height: none; border-radius: 0; border: 0; }
  .pdf-pages { padding: 8px; gap: 8px; }
  .share-doc { height: calc(100dvh - 260px); }
}
@media (min-width: 761px) { .file-row .name .sub.m { display: none; } }
