/* Depot — storage console */

:root {
  --font-ui: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Bricolage Grotesque', var(--font-ui);
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --bg: #f4f3ef;
  --bg-dot: #dedad1;
  --panel: #ffffff;
  --panel-2: #faf9f6;
  --sunken: #efede8;
  --line: #e5e2db;
  --line-strong: #d2cec5;
  --text: #17181b;
  --text-2: #3e4148;
  --muted: #7a7e87;
  --accent: #ef4f23;
  --accent-2: #ff7a4d;
  --accent-soft: rgba(239, 79, 35, .1);
  --ok: #15803d;
  --ok-soft: rgba(21, 128, 61, .1);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, .09);
  --warn: #c2700a;
  --folder: #e0a03a;

  --t-image: #8b5cf6;
  --t-video: #0284c7;
  --t-audio: #059669;
  --t-document: #d97706;
  --t-archive: #78716c;
  --t-code: #4f46e5;
  --t-other: #64748b;

  --shadow-sm: 0 1px 2px rgba(24, 20, 14, .05);
  --shadow: 0 1px 2px rgba(24, 20, 14, .04), 0 10px 28px -10px rgba(24, 20, 14, .16);
  --shadow-lg: 0 2px 6px rgba(24, 20, 14, .05), 0 28px 70px -18px rgba(24, 20, 14, .3);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --pad: clamp(16px, 3vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0c0f; --bg-dot: #1b1e24; --panel: #121418; --panel-2: #16191e; --sunken: #0e1013;
    --line: #23272e; --line-strong: #30353e; --text: #eceef1; --text-2: #c4c8cf; --muted: #868c97;
    --accent: #ff6a3d; --accent-2: #ff8b62; --accent-soft: rgba(255, 106, 61, .13);
    --ok: #3fb96a; --ok-soft: rgba(63, 185, 106, .13); --danger: #f2564f; --danger-soft: rgba(242, 86, 79, .13);
    --warn: #e9a23b; --folder: #e9b04f;
    --t-image: #a78bfa; --t-video: #38bdf8; --t-audio: #34d399; --t-document: #fbbf24; --t-archive: #a8a29e; --t-code: #818cf8; --t-other: #94a3b8;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 30px -10px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 30px 80px -16px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0c0f; --bg-dot: #1b1e24; --panel: #121418; --panel-2: #16191e; --sunken: #0e1013;
  --line: #23272e; --line-strong: #30353e; --text: #eceef1; --text-2: #c4c8cf; --muted: #868c97;
  --accent: #ff6a3d; --accent-2: #ff8b62; --accent-soft: rgba(255, 106, 61, .13);
  --ok: #3fb96a; --ok-soft: rgba(63, 185, 106, .13); --danger: #f2564f; --danger-soft: rgba(242, 86, 79, .13);
  --warn: #e9a23b; --folder: #e9b04f;
  --t-image: #a78bfa; --t-video: #38bdf8; --t-audio: #34d399; --t-document: #fbbf24; --t-archive: #a8a29e; --t-code: #818cf8; --t-other: #94a3b8;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 30px -10px rgba(0, 0, 0, .6);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 30px 80px -16px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden;
  font: 14px/1.5 var(--font-ui); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; }
code, .mono { font-family: var(--font-mono); font-size: .9em; }
code { padding: 1px 6px; border-radius: 6px; background: var(--sunken); border: 1px solid var(--line); }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
[hidden] { display: none !important; }

.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.i.sm { width: 15px; height: 15px; }
.i.xs { width: 13px; height: 13px; }
.muted { color: var(--muted); }

.t-image { --c: var(--t-image); } .t-video { --c: var(--t-video); } .t-audio { --c: var(--t-audio); }
.t-document { --c: var(--t-document); } .t-archive { --c: var(--t-archive); } .t-code { --c: var(--t-code); }
.t-other { --c: var(--t-other); } .t-folder { --c: var(--folder); }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); height: 100vh; }
.main-wrap { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.main {
  --pad-top: 28px;
  flex: 1; overflow-y: auto; padding: var(--pad-top) var(--pad) 140px;
  background-image: radial-gradient(var(--bg-dot) 1px, transparent 1px);
  background-size: 22px 22px;
}
.view { animation: viewIn .35s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }
.topbar-mobile { display: none; }

/* ---------- Sidebar ---------- */
.sidebar {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 12px 12px;
  background: var(--panel-2); border-right: 1px solid var(--line); overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; font: 750 20px/1 var(--font-display); letter-spacing: -.03em; }
.brand.sm { padding: 0; font-size: 17px; }
.logo { width: 30px; height: 30px; flex: none; filter: drop-shadow(0 6px 12px rgba(239, 79, 35, .35)); }
.brand.sm .logo { width: 26px; height: 26px; }

.app-switch {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px 8px 8px; text-align: left; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm);
  transition: border-color .15s;
}
.app-switch:hover { border-color: var(--line-strong); }
.app-switch .i { color: var(--muted); }
.app-switch-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.app-switch-text strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-switch-text small { font: 11.5px var(--font-mono); color: var(--muted); }
.app-switch.connect-cta { justify-content: center; color: var(--accent); font-weight: 600; border-style: dashed; box-shadow: none; }
.app-switch.connect-cta .i { color: inherit; }

.avatar {
  --h: 20; display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px;
  font: 700 12px/1 var(--font-display); color: hsl(var(--h) 65% 32%); background: hsl(var(--h) 85% 89%);
}
:root[data-theme="dark"] .avatar { color: hsl(var(--h) 85% 78%); background: hsl(var(--h) 40% 19%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { color: hsl(var(--h) 85% 78%); background: hsl(var(--h) 40% 19%); } }
.avatar.xs { width: 22px; height: 22px; border-radius: 6px; font-size: 9.5px; }
.avatar.lg { width: 44px; height: 44px; border-radius: 12px; font-size: 15px; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 9px;
  background: none; color: var(--text-2); font-weight: 500; text-align: left; cursor: pointer; transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--sunken); color: var(--text); }
.nav-item.active { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.nav-item.active > .i { color: var(--accent); }
.nav-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-section { margin-top: 18px; }
.nav-label {
  display: flex; align-items: center; justify-content: space-between; padding: 0 4px 0 10px; margin-bottom: 4px;
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.bucket-link > .i { color: var(--muted); }
.nav-empty { margin: 2px 10px; color: var(--muted); font-size: 13px; }
.sidebar-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }

/* ---------- Controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; flex: none;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text);
  font-weight: 550; white-space: nowrap; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .08s, background .15s, border-color .15s, filter .15s;
}
.btn:hover { background: var(--panel-2); border-color: var(--line-strong); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary {
  color: #fff; border-color: transparent;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 18px -8px var(--accent);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--sunken); }
.btn.danger-solid { background: var(--danger); border-color: transparent; color: #fff; }
.btn.danger-solid:hover { filter: brightness(1.08); background: var(--danger); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.icon-btn {
  display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: none; color: var(--text-2); cursor: pointer; transition: background .12s, color .12s;
}
.icon-btn:hover { background: var(--sunken); color: var(--text); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn.bordered { border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow-sm); }

input[type="text"], input[type="password"], input[type="search"], input:not([type]), select {
  height: 38px; min-width: 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); color: var(--text); font: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder { color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field > span { font-size: 13px; font-weight: 600; }
.field-hint { color: var(--muted); font-size: 12.5px; }
.check-label { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13.5px; cursor: pointer; }

.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px;
  font-size: 12px; font-weight: 550; white-space: nowrap; color: var(--text-2); background: var(--sunken); border: 1px solid var(--line);
}
.pill.pub, .pill.on { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.pill.off { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.kbd { padding: 0 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; font: 500 11px var(--font-mono); color: var(--muted); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 26px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 12px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
h1 { margin: 0; font: 750 clamp(26px, 3.2vw, 36px)/1.08 var(--font-display); letter-spacing: -.035em; }
.sub { margin: 8px 0 0; color: var(--muted); }
.section-title { display: flex; align-items: center; gap: 8px; margin: 34px 0 14px; font: 650 16px var(--font-display); letter-spacing: -.01em; }
.section-title .count { color: var(--muted); font-weight: 500; }

/* ---------- Overview ---------- */
.stat-row { display: grid; grid-template-columns: 1.7fr repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat { display: flex; flex-direction: column; padding: 18px 20px; position: relative; overflow: hidden; }
.stat-foot { margin-top: auto; padding-top: 14px; font-size: 12.5px; color: var(--muted); }
.stat-foot b { color: var(--text-2); font-weight: 600; }
.stat-value.name { font-size: 24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-label { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 550; color: var(--muted); }
.stat-label .i { width: 15px; height: 15px; }
.stat-value { margin-top: 10px; font: 750 30px/1 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-value small { margin-left: 4px; font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.stat.hero { background: radial-gradient(130% 160% at 100% 0%, var(--accent-soft), transparent 55%), var(--panel); }
.stat.hero .stat-value { font-size: 40px; }
.stat.hero .typebar { margin-top: 18px; }
.typebar { display: flex; gap: 2px; height: 8px; border-radius: 99px; overflow: hidden; background: var(--sunken); }
.typebar span { min-width: 4px; background: var(--c); }
.typebar.thin { height: 5px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.legend b { color: var(--text-2); font-weight: 600; }

.bucket-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.bucket-card { display: flex; flex-direction: column; padding: 18px; transition: transform .25s var(--ease), box-shadow .25s, border-color .2s; }
.bucket-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.bc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.bc-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--accent); background: var(--accent-soft); }
.bucket-card h3 { margin: 0; font: 650 17px var(--font-display); letter-spacing: -.015em; overflow-wrap: anywhere; }
.bucket-card .phys { margin: 2px 0 16px; font: 11.5px var(--font-mono); color: var(--muted); }
.bc-foot { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13px; color: var(--muted); }
.bc-foot strong { color: var(--text); font-weight: 650; }
.new-card {
  align-items: center; justify-content: center; gap: 10px; min-height: 196px; cursor: pointer; font-weight: 600; color: var(--muted);
  background: transparent; border: 1.5px dashed var(--line-strong); box-shadow: none;
}
.new-card .bc-icon { color: inherit; background: var(--sunken); transition: transform .25s var(--ease); }
.new-card:hover { color: var(--accent); border-color: var(--accent); transform: none; box-shadow: none; }
.new-card:hover .bc-icon { transform: rotate(90deg); background: var(--accent-soft); }

/* ---------- Bucket browser ---------- */
.browser-head {
  /* Chrome offsets sticky elements by the scroller padding, so cancel it out. */
  position: sticky; top: calc(-1 * var(--pad-top)); z-index: 6;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin: calc(-1 * var(--pad-top)) calc(-1 * var(--pad)) 18px; padding: 18px var(--pad) 14px;
  background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; min-width: 0; font: 650 20px/1.2 var(--font-display); letter-spacing: -.02em; }
.crumbs a { display: inline-flex; align-items: center; gap: 8px; padding: 3px 7px; border-radius: 8px; color: var(--muted); transition: background .12s, color .12s; }
.crumbs a:hover { background: var(--sunken); color: var(--text); }
.crumbs a:last-child { color: var(--text); }
.crumbs .sep { color: var(--line-strong); font-weight: 400; }
.crumbs .bucket-crumb .i { width: 20px; height: 20px; color: var(--accent); }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search { position: relative; display: flex; align-items: center; }
.search > .i { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search input { width: 230px; padding-left: 34px; padding-right: 34px; }
.search .kbd { position: absolute; right: 10px; pointer-events: none; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: var(--shadow-sm); }
.seg button { display: grid; place-items: center; width: 30px; height: 28px; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; }
.seg button.active { background: var(--sunken); color: var(--text); }
.seg .i { width: 16px; height: 16px; }

.banner { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; padding: 14px 16px; margin-bottom: 22px; }
.b-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 11px; color: var(--text-2); background: var(--sunken); }
.banner.public .b-icon { color: var(--ok); background: var(--ok-soft); }
.banner-text { flex: 1 1 260px; min-width: 0; }
.banner-text strong { display: block; font-weight: 650; }
.banner-text span { font-size: 13px; color: var(--muted); }
.url-chip {
  display: inline-flex; align-items: center; gap: 4px; max-width: min(100%, 380px); padding: 3px 3px 3px 10px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--sunken); font: 12px var(--font-mono); color: var(--text-2);
}
.url-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner-stats { display: flex; align-items: center; gap: 20px; font-size: 12px; color: var(--muted); }
.banner-stats strong { display: block; font: 700 17px/1.2 var(--font-display); color: var(--text); font-variant-numeric: tabular-nums; }
.banner-stats .typebar { width: 120px; }

.folder-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 20px; }
.folder-tile {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px; font-weight: 600;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.folder-tile .i { width: 20px; height: 20px; color: var(--folder); fill: color-mix(in srgb, var(--folder) 22%, transparent); }
.folder-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; }
.tile {
  position: relative; overflow: hidden; cursor: pointer; outline: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .2s;
  animation: tileIn .4s var(--ease) both; animation-delay: calc(var(--n, 0) * 18ms);
}
@keyframes tileIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.tile:hover, .tile:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.tile.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.thumb {
  position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; color: var(--c);
  background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%), color-mix(in srgb, var(--c) 7%, var(--panel-2));
}
.thumb .thumb-icon { width: 40px; height: 40px; stroke-width: 1.35; transition: opacity .3s, transform .3s var(--ease); }
.tile:hover .thumb .thumb-icon { transform: scale(1.08); }
.thumb-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s, transform .5s var(--ease); }
.thumb.loaded .thumb-media { opacity: 1; }
.thumb.loaded .thumb-icon { opacity: 0; }
.tile:hover .thumb-media { transform: scale(1.05); }
.thumb.loaded.t-image { background: repeating-conic-gradient(var(--sunken) 0 25%, var(--panel) 0 50%) 0 0 / 16px 16px; }
.ext {
  position: absolute; left: 8px; bottom: 8px; z-index: 1; padding: 2px 6px; border-radius: 6px;
  font: 650 10px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2);
  background: color-mix(in srgb, var(--panel) 82%, transparent); backdrop-filter: blur(8px);
}
.play {
  position: absolute; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  color: #fff; background: rgba(10, 10, 12, .55); backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s, transform .25s var(--ease);
}
.play .i { width: 16px; height: 16px; margin-left: 2px; fill: #fff; stroke: none; }
.thumb.loaded .play { opacity: 1; }
.tile:hover .play { transform: scale(1.1); }
.tile-meta { padding: 10px 12px 12px; }
.tile-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-sub { margin-top: 2px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tile-check {
  position: absolute; top: 8px; left: 8px; z-index: 2; display: grid; place-items: center; width: 24px; height: 24px; padding: 0;
  border: 1.5px solid rgba(255, 255, 255, .95); border-radius: 7px; background: rgba(10, 10, 12, .28); color: transparent;
  backdrop-filter: blur(6px); cursor: pointer; opacity: 0; transition: opacity .15s, background .15s;
}
.tile-check .i { width: 14px; height: 14px; stroke-width: 3; }
.tile:hover .tile-check, .selecting .tile-check, .selected .tile-check { opacity: 1; }
.selected .tile-check { color: #fff; background: var(--accent); border-color: var(--accent); }

.list-wrap { overflow: hidden; }
.list-head, .row-item {
  display: grid; align-items: center; gap: 12px; padding: 0 14px;
  grid-template-columns: 22px 34px minmax(0, 1fr) 96px 86px 104px 106px;
}
.list-head { height: 38px; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--panel-2); }
.row-item { min-height: 54px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .1s; outline: none; }
.row-item:last-child { border-bottom: 0; }
.row-item:hover, .row-item:focus-visible { background: var(--panel-2); }
.row-item.selected { background: var(--accent-soft); }
.row-item .tile-check { position: static; width: 20px; height: 20px; border-radius: 6px; border-color: var(--line-strong); background: transparent; backdrop-filter: none; }
.row-item:hover .tile-check { opacity: 1; }
.row-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.row-icon .i { width: 17px; height: 17px; }
.row-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-type, .row-size, .row-date { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row-type { text-transform: capitalize; }
.row-type .mono { text-transform: uppercase; font-size: 11.5px; }
.row-actions { display: flex; justify-content: flex-end; gap: 2px; opacity: 0; transition: opacity .15s; }
.row-item:hover .row-actions, .row-item:focus-within .row-actions { opacity: 1; }
.row-item.folder .row-icon .i { fill: color-mix(in srgb, var(--folder) 25%, transparent); }

.sentinel { height: 1px; }
.load-more { display: flex; justify-content: center; padding: 22px; color: var(--muted); font-size: 13px; gap: 8px; align-items: center; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--accent); animation: spin .7s linear infinite; }
.spinner.sm { width: 14px; height: 14px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.skel { border-radius: 14px; background: linear-gradient(90deg, var(--sunken) 0, var(--panel-2) 50%, var(--sunken) 100%) 0 0 / 200% 100%; animation: shimmer 1.3s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-tile { aspect-ratio: 4 / 3.9; }
.skel-card { height: 196px; }

/* ---------- Empty states ---------- */
.empty { display: flex; flex-direction: column; align-items: center; padding: 64px 20px; text-align: center; color: var(--muted); }
.empty h3 { margin: 26px 0 6px; font: 700 20px var(--font-display); letter-spacing: -.02em; color: var(--text); }
.empty p { max-width: 400px; margin: 0 0 20px; }
.empty-art { position: relative; width: 130px; height: 100px; }
.empty-art span {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--c);
  transition: transform .5s var(--ease);
}
.empty-art span .i { width: 30px; height: 30px; stroke-width: 1.5; }
.empty-art span:nth-child(1) { transform: rotate(-12deg) translate(-26px, 6px); }
.empty-art span:nth-child(2) { transform: rotate(10deg) translate(26px, 4px); }
.empty-art span:nth-child(3) { color: var(--accent); }
.empty:hover .empty-art span:nth-child(1) { transform: rotate(-18deg) translate(-38px, 0); }
.empty:hover .empty-art span:nth-child(2) { transform: rotate(16deg) translate(38px, -2px); }
.empty-hints { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; font-size: 12.5px; }
.empty-hints span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); }

/* ---------- Drawer ---------- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 30; width: min(430px, 100vw); overflow-y: auto;
  display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg);
  transform: translateX(105%); transition: transform .35s var(--ease); visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; }
.drawer-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--panel); }
.drawer-title { flex: 1; min-width: 0; }
.drawer-title h3 { margin: 0; font: 650 16px/1.3 var(--font-display); overflow-wrap: anywhere; }
.drawer-title p { margin: 2px 0 0; font: 12px var(--font-mono); color: var(--muted); overflow-wrap: anywhere; }
.preview {
  display: grid; place-items: center; min-height: 230px; margin: 0 16px; overflow: hidden; color: var(--c);
  border: 1px solid var(--line); border-radius: 14px;
  background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--c) 14%, transparent), transparent 70%), var(--sunken);
}
.preview img { display: block; width: 100%; max-height: 56vh; object-fit: contain; background: repeating-conic-gradient(var(--sunken) 0 25%, var(--panel) 0 50%) 0 0 / 16px 16px; }
.preview video { display: block; width: 100%; max-height: 56vh; background: #000; }
.preview audio { width: calc(100% - 32px); }
.preview iframe { width: 100%; height: 56vh; border: 0; background: #fff; }
.preview pre { align-self: stretch; width: 100%; max-height: 56vh; margin: 0; padding: 14px 16px; overflow: auto; font: 12px/1.6 var(--font-mono); color: var(--text-2); white-space: pre-wrap; word-break: break-word; background: var(--panel-2); }
.preview .big-icon { width: 60px; height: 60px; stroke-width: 1.2; }
.preview-none { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px; color: var(--muted); font-size: 13px; }
.drawer-actions { display: flex; gap: 8px; padding: 14px 16px 6px; }
.drawer-actions .btn.primary { flex: 1; }
.props { margin: 8px 16px 0; }
.props > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.props dt { color: var(--muted); }
.props dd { margin: 0; overflow-wrap: anywhere; }
.copyable { cursor: copy; border-radius: 4px; transition: color .12s; }
.copyable:hover { color: var(--accent); }
.panel-box { margin: 16px 16px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.panel-box:last-child { margin-bottom: 20px; }
.panel-box h4 { display: flex; align-items: center; gap: 7px; margin: 0 0 4px; font-size: 13.5px; }
.panel-box h4 .i { width: 15px; height: 15px; color: var(--accent); }
.panel-box p { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); }
.share-row { display: flex; gap: 8px; }
.share-row select { flex: 1; }
.link-out { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 4px 4px 4px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.link-out code { flex: 1; min-width: 0; padding: 0; border: 0; background: none; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta-list { display: flex; flex-direction: column; gap: 6px; }
.meta-list div { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.meta-list b { font: 500 12px var(--font-mono); color: var(--muted); }
.scrim { position: fixed; inset: 0; z-index: 25; background: rgba(8, 8, 12, .32); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .25s; }
.scrim.show { opacity: 1; pointer-events: auto; }

/* ---------- Selection bar ---------- */
.selbar {
  position: fixed; left: calc(50% + 132px); bottom: 26px; z-index: 20; display: flex; align-items: center; gap: 8px;
  padding: 7px 7px 7px 10px; border-radius: 14px; color: var(--bg); background: var(--text); box-shadow: var(--shadow-lg);
  transform: translate(-50%, calc(100% + 40px)); visibility: hidden; transition: transform .35s var(--ease), visibility 0s .35s;
}
.selbar.show { transform: translate(-50%, 0); visibility: visible; transition: transform .35s var(--ease); }
.selbar .btn.ghost { color: var(--bg); border-color: transparent; }
.selbar .btn.ghost:hover { background: rgba(128, 128, 128, .22); }
.sel-count { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 8px; color: #fff; background: var(--accent); font-weight: 700; font-size: 12.5px; }
.selbar .label { margin: 0 6px 0 2px; font-weight: 550; }

/* ---------- Upload tray ---------- */
.tray {
  position: fixed; right: 20px; bottom: 20px; z-index: 22; width: min(380px, calc(100vw - 32px)); overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
  animation: trayIn .35s var(--ease);
}
@keyframes trayIn { from { opacity: 0; transform: translateY(16px); } }
.tray-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 14px; }
.tray-head .row-icon { --c: var(--accent); }
.tray-title { flex: 1; min-width: 0; font-weight: 650; font-size: 13.5px; }
.tray-title small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.tray-bar { height: 3px; background: var(--sunken); }
.tray-bar > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .25s; }
.tray-list { max-height: 300px; overflow-y: auto; padding: 6px; }
.tray.collapsed .tray-list { display: none; }
.tray.collapsed .tray-toggle .i { transform: rotate(180deg); }
.up { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; }
.up:hover { background: var(--panel-2); }
.up .row-icon { width: 32px; height: 32px; }
.up-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-sub { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.up.error .up-sub { color: var(--danger); }
.up.done .up-sub { color: var(--ok); }
.up-prog { height: 3px; margin-top: 5px; overflow: hidden; border-radius: 2px; background: var(--sunken); }
.up-prog > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.up.done .up-prog > div { background: var(--ok); }
.up.error .up-prog > div { background: var(--danger); }

/* ---------- Dropzone ---------- */
.dropzone {
  position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; pointer-events: none; opacity: 0;
  background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(8px); transition: opacity .2s;
}
.dropzone.show { opacity: 1; }
.dz-inner {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 52px 72px; text-align: center;
  border: 2px dashed var(--accent); border-radius: 28px; background: var(--panel); box-shadow: var(--shadow-lg);
  transform: scale(.94); transition: transform .3s var(--ease);
}
.dropzone.show .dz-inner { transform: none; }
.dz-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; color: var(--accent); background: var(--accent-soft); animation: bob 1.4s ease-in-out infinite; }
.dz-icon .i { width: 34px; height: 34px; }
@keyframes bob { 50% { transform: translateY(-7px); } }
.dz-inner h3 { margin: 8px 0 0; font: 750 24px var(--font-display); letter-spacing: -.02em; }
.dz-inner p { margin: 0; font: 13px var(--font-mono); color: var(--muted); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; top: 18px; left: 50%; z-index: 70; display: flex; flex-direction: column; align-items: center; gap: 8px; transform: translateX(-50%); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; max-width: min(480px, 90vw); padding: 10px 16px 10px 12px; border-radius: 12px;
  color: var(--bg); background: var(--text); box-shadow: var(--shadow-lg); font-size: 13.5px; font-weight: 550;
  opacity: 0; transform: translateY(-12px) scale(.97); transition: opacity .25s, transform .3s var(--ease);
}
.toast.in { opacity: 1; transform: none; }
.toast .i { color: var(--ok); }
.toast.error .i { color: var(--danger); }

/* ---------- Menus ---------- */
.menu {
  position: fixed; z-index: 55; min-width: 230px; padding: 6px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-lg); animation: pop .16s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.menu-label { padding: 6px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--text-2); font-weight: 500; text-align: left; cursor: pointer;
}
.menu-item:hover { background: var(--sunken); color: var(--text); }
.menu-item.danger { color: var(--danger); }
.menu-item.danger:hover { background: var(--danger-soft); }
.menu-item .check { margin-left: auto; color: var(--accent); }
.menu-item .mi-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-sep { height: 1px; margin: 6px 0; background: var(--line); }

/* ---------- Modals ---------- */
dialog.modal { width: 100%; max-width: min(480px, calc(100vw - 32px)); padding: 0; border: 0; background: transparent; color: var(--text); overflow: visible; }
dialog.modal.wide { max-width: min(560px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(8, 8, 12, .5); backdrop-filter: blur(4px); }
dialog.modal[open] { animation: modalIn .3s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.modal-card { padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.modal-head h2 { margin: 0; font: 750 21px/1.2 var(--font-display); letter-spacing: -.025em; }
.modal-head p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.modal-head .icon-btn { margin: -6px -6px 0 0; }
.modal-text { margin: 0 0 18px; color: var(--text-2); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.form-error { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; color: var(--danger); background: var(--danger-soft); font-size: 13px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 14px; border: 1.5px solid var(--line); border-radius: 13px; cursor: pointer; transition: border-color .15s, background .15s; }
.choice-card .i { margin-bottom: 6px; color: var(--muted); }
.choice-card strong { font-weight: 650; }
.choice-card small { font-size: 12px; line-height: 1.4; color: var(--muted); }
.choice input:checked + .choice-card { border-color: var(--accent); background: var(--accent-soft); }
.choice input:checked + .choice-card .i { color: var(--accent); }
.choice input:focus-visible + .choice-card { outline: 2px solid var(--accent); outline-offset: 2px; }
.key-reveal { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 6px 6px 6px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--sunken); }
.key-reveal code { flex: 1; min-width: 0; padding: 0; border: 0; background: none; font-size: 13px; overflow-wrap: anywhere; }
.callout { display: flex; gap: 10px; margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; font-size: 13px; color: var(--text-2); }
.callout.warn { background: color-mix(in srgb, var(--warn) 12%, transparent); }
.callout.warn > .i { color: var(--warn); }

/* ---------- Connect ---------- */
.connect { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; min-height: calc(100vh - 170px); justify-content: center; text-align: center; }
.connect::before {
  content: ''; position: absolute; z-index: -1; top: -60px; left: 50%; width: min(760px, 100%); height: 460px; transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 18%, transparent), transparent);
}
.constellation { position: relative; width: 320px; max-width: 100%; height: 170px; margin-bottom: 26px; }
.core {
  position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 78px; height: 78px; margin: -39px 0 0 -39px;
  border-radius: 24px; color: #fff; background: linear-gradient(140deg, var(--accent-2), var(--accent));
  box-shadow: 0 20px 44px -14px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.core .i { width: 36px; height: 36px; }
.core::after { content: ''; position: absolute; inset: -14px; border-radius: 32px; border: 1.5px dashed color-mix(in srgb, var(--accent) 40%, transparent); animation: spin 30s linear infinite; }
.chip {
  position: absolute; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 11px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); font: 600 11.5px var(--font-mono); color: var(--text-2);
  animation: float 6s ease-in-out infinite;
}
.chip .i { width: 14px; height: 14px; color: var(--c); }
.chip:nth-of-type(1) { left: 0; top: 14px; animation-delay: -1s; }
.chip:nth-of-type(2) { right: 4px; top: 0; animation-delay: -3s; }
.chip:nth-of-type(3) { left: 18px; bottom: 6px; animation-delay: -2s; }
.chip:nth-of-type(4) { right: 0; bottom: 20px; animation-delay: -4.5s; }
@keyframes float { 50% { transform: translateY(-9px); } }
.connect h1 { max-width: 760px; font-size: clamp(34px, 5.4vw, 58px); line-height: 1; letter-spacing: -.045em; }
.connect h1 em { font-style: normal; color: transparent; background: linear-gradient(95deg, var(--accent), #ffa25e); -webkit-background-clip: text; background-clip: text; }
.lead { max-width: 520px; margin: 18px auto 28px; font-size: 16px; color: var(--muted); }
.connect-form { display: flex; gap: 8px; width: min(540px, 100%); }
.input-icon { position: relative; flex: 1; display: flex; align-items: center; }
.input-icon > .i { position: absolute; left: 15px; color: var(--muted); pointer-events: none; }
.input-icon input { width: 100%; height: 46px; padding-left: 44px; border-radius: 12px; font-family: var(--font-mono); font-size: 13.5px; box-shadow: var(--shadow-sm); }
.hint { margin-top: 14px; font-size: 13px; color: var(--muted); }
.hint a { color: var(--accent); font-weight: 600; }
.saved { width: min(660px, 100%); margin-top: 40px; text-align: left; }
.saved .nav-label { padding-left: 2px; }
.saved-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.saved-card { display: flex; align-items: center; gap: 11px; padding: 12px; text-align: left; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s; }
.saved-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.saved-card div { min-width: 0; flex: 1; }
.saved-card strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-card small { font: 11.5px var(--font-mono); color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: min(860px, 100%); margin-top: 54px; text-align: left; }
.feature { padding: 18px; }
.f-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.feature h4 { margin: 12px 0 4px; font: 650 15px var(--font-display); }
.feature p { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- Admin ---------- */
.lock-card { max-width: 440px; margin: 8vh auto 0; padding: 34px 30px 30px; text-align: center; }
.lock-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px; color: var(--accent); background: var(--accent-soft); }
.lock-icon .i { width: 30px; height: 30px; }
.lock-card h2 { margin: 0; font: 750 24px var(--font-display); letter-spacing: -.025em; }
.lock-card p { margin: 6px 0 22px; color: var(--muted); }
.lock-card form { display: flex; flex-direction: column; gap: 10px; }
.lock-card .form-error { text-align: left; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.app-card { display: flex; flex-direction: column; gap: 16px; padding: 18px; transition: box-shadow .2s, border-color .2s; }
.app-card:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.app-card.disabled .avatar, .app-card.disabled h3 { opacity: .55; }
.ac-head { display: flex; align-items: center; gap: 12px; }
.ac-head > div { flex: 1; min-width: 0; }
.ac-head h3 { margin: 0 0 2px; font: 650 16.5px var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-head code { font-size: 11.5px; }
.ac-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 12px 0; border-block: 1px solid var(--line); }
.ac-stats dt { font-size: 11.5px; color: var(--muted); }
.ac-stats dd { margin: 2px 0 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.ac-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ac-actions .spacer { flex: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat.hero { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 35; width: 280px; transform: translateX(-102%); transition: transform .32s var(--ease); box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  .topbar-mobile { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
  .main { --pad-top: 16px; }
  .browser-head { padding-top: 12px; }
  .head-actions { width: 100%; }
  .search { flex: 1 1 100%; }
  .search input { width: 100%; }
  .head-actions .seg { margin-right: auto; }
  .btn .hide-sm { display: none; }
  .selbar { left: 50%; }
  .features { grid-template-columns: 1fr; }
  .list-head, .row-item { grid-template-columns: 22px 34px minmax(0, 1fr) 76px; }
  .row-type, .row-date, .row-actions, .list-head > span:last-child { display: none; }
}
@media (max-width: 560px) {
  .stat-row { grid-template-columns: 1fr 1fr; }
  .tile-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .connect-form { flex-direction: column; }
  .choice-grid { grid-template-columns: 1fr; }
  .banner-stats .typebar { display: none; }
  .dz-inner { padding: 40px 28px; margin: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
