/* VPNOIR Cloud — black & white gaming UI */
:root {
  --bg: #000;
  --bg-1: #0b0b0b;
  --bg-2: #141414;
  --bg-3: #1d1d1d;
  --line: #242424;
  --line-2: #333;
  --fg: #f4f4f4;
  --fg-2: #a8a8a8;
  --fg-3: #6b6b6b;
  --danger: #ff5a5a;
  --ok: #e8e8e8;
  --radius: 10px;
  --mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --sidebar: 240px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.mono { font-family: var(--mono); }
.muted { color: var(--fg-2); }
.small { font-size: 13px; }
.tiny { font-size: 11px; }
.error { color: var(--danger); min-height: 1.2em; margin: 0; }
.spacer { flex: 1; }

/* subtle grid background */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
}

/* ---------- wordmark ---------- */
.wordmark {
  font-weight: 800; letter-spacing: .14em; font-size: 15px; text-transform: uppercase;
  display: inline-flex; gap: .35em; align-items: baseline; white-space: nowrap;
}
.wordmark span { color: var(--fg-3); font-family: var(--mono); font-weight: 400; letter-spacing: 0; }
.wordmark.big { font-size: 22px; }

/* ---------- boot ---------- */
.boot { position: fixed; inset: 0; display: grid; place-content: center; gap: 18px; justify-items: center; }
.loader { width: 120px; height: 2px; background: var(--line); overflow: hidden; position: relative; }
.loader::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--fg); animation: slide 1s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ---------- buttons & fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer;
  font-weight: 600; font-size: 13px; letter-spacing: .02em; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { background: var(--bg-3); border-color: #444; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, .field input:focus-visible, .select:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.btn.primary { background: var(--fg); color: #000; border-color: var(--fg); }
.btn.primary:hover { background: #fff; }
.btn.danger { color: var(--danger); border-color: #4a2222; background: #160b0b; }
.btn.danger:hover { background: #221010; }
.btn.danger.solid { background: var(--danger); color: #000; border-color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--bg-2); }
.btn.icon { width: 36px; padding: 0; }
.btn.small { height: 30px; padding: 0 10px; font-size: 12px; }
.btn.small.icon { width: 30px; }
.btn.block { width: 100%; height: 42px; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--fg-2); font-weight: 600; }
.field input, .field select, .select {
  height: 40px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--bg-1); outline: none;
}
.field input:focus { border-color: var(--fg); }
.select { height: 36px; padding: 0 8px; cursor: pointer; }

/* ---------- login ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(380px, 100%); display: grid; gap: 18px; padding: 32px 28px;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(11,11,11,.92);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.login-card p { margin: -6px 0 0; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100%; }
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; gap: 24px; padding: 22px 14px;
  border-right: 1px solid var(--line); background: rgba(5,5,5,.9);
}
.sidebar > .wordmark { padding: 0 10px; }
.nav { display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 10px; border-radius: 8px;
  color: var(--fg-2); font-weight: 600;
}
.nav a:hover { background: var(--bg-2); color: var(--fg); }
.nav a.active { background: var(--fg); color: #000; }
.quota { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.quota-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-2); font-weight: 600; }
.quota-label .mono { text-transform: none; letter-spacing: 0; color: var(--fg); white-space: nowrap; font-size: 11px; }
.bar { height: 4px; background: var(--bg-3); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--fg); transition: width .4s; }
.bar.warn i { background: var(--danger); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px; padding: 14px 24px;
  background: rgba(0,0,0,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.crumbs { display: flex; align-items: center; gap: 4px; min-width: 0; flex: 1; overflow: hidden; }
.crumbs a, .crumbs span.cur {
  padding: 4px 8px; border-radius: 6px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px;
}
.crumbs a { color: var(--fg-2); }
.crumbs a:hover { background: var(--bg-2); color: var(--fg); }
.crumbs span.cur { font-size: 16px; }
.crumbs svg { width: 14px; height: 14px; color: var(--fg-3); }
.crumbs a.drop-target { background: var(--fg); color: #000; }

.search { position: relative; width: min(300px, 32vw); }
.search svg { position: absolute; left: 10px; top: 9px; color: var(--fg-3); }
.search input {
  width: 100%; height: 36px; padding: 0 12px 0 34px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--bg-1); outline: none;
}
.search input:focus { border-color: var(--fg); }
.actions { display: flex; gap: 8px; align-items: center; }

.banner {
  margin: 16px 24px 0; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--fg-2);
}
.selbar {
  position: sticky; top: 65px; z-index: 15;
  margin: 12px 24px 0; padding: 8px 8px 8px 14px; border-radius: var(--radius);
  background: var(--fg); color: #000; display: flex; align-items: center; gap: 8px;
}
.selbar .btn { background: #000; color: var(--fg); border-color: #000; }
.selbar .btn.danger { color: var(--danger); }
.selbar .btn.ghost { background: transparent; color: #000; }

.content { padding: 20px 24px 120px; flex: 1; }

/* ---------- sections ---------- */
.section-title {
  margin: 4px 0 12px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); font-weight: 700;
  display: flex; align-items: center; gap: 10px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 20px; letter-spacing: .02em; }

/* ---------- grid view ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; margin-bottom: 26px; }
.grid.folders { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-1);
  cursor: pointer; user-select: none; overflow: hidden;
  transition: border-color .12s, background .12s, transform .12s;
}
.card:hover { border-color: #444; background: var(--bg-2); }
.card.selected { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg) inset; }
.card.drop-target { border-color: var(--fg); background: var(--bg-3); transform: scale(1.02); }
.card .thumb {
  aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--bg-2); border-bottom: 1px solid var(--line);
  color: var(--fg-2); overflow: hidden;
}
.card .thumb svg { width: 40px; height: 40px; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .meta { padding: 9px 10px 10px; display: grid; gap: 2px; min-width: 0; }
.card .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .sub { font: 11px var(--mono); color: var(--fg-3); }
.card.folder { display: flex; align-items: center; gap: 10px; padding: 12px; }
.card.folder > svg { width: 22px; height: 22px; color: var(--fg); }
.card.folder .meta { padding: 0; flex: 1; }
.card .more {
  position: absolute; top: 6px; right: 6px; opacity: 0; background: rgba(0,0,0,.75); border-color: var(--line-2);
}
.card.folder .more { position: static; opacity: .6; background: transparent; border-color: transparent; }
.card:hover .more, .card .more:focus-visible { opacity: 1; }
.card .check {
  position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 6px;
  border: 1.5px solid var(--fg-2); background: rgba(0,0,0,.6); display: grid; place-items: center; opacity: 0;
}
.card.folder .check { position: static; flex: none; }
.card .check svg { width: 14px; height: 14px; opacity: 0; }
.card:hover .check, .has-selection .card .check { opacity: 1; }
.card.selected .check { background: var(--fg); border-color: var(--fg); color: #000; opacity: 1; }
.card.selected .check svg { opacity: 1; }
.card.folder .check { display: none; }
.has-selection .card.folder .check, .card.folder:hover .check { display: grid; }
.card.folder:hover > svg, .has-selection .card.folder > svg { display: none; }

/* ---------- list view ---------- */
.list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-1); }
.row {
  display: grid; grid-template-columns: 28px 26px minmax(0, 1fr) 120px 110px 36px; gap: 10px; align-items: center;
  padding: 0 10px; height: 48px; border-bottom: 1px solid var(--line); cursor: pointer; user-select: none;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--bg-2); }
.row.selected { background: var(--bg-3); }
.row.drop-target { background: var(--fg); color: #000; }
.row.head { height: 36px; cursor: default; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-3); font-weight: 700; background: var(--bg); }
.row.head:hover { background: var(--bg); }
.row .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .cell { font: 12px var(--mono); color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row > svg { color: var(--fg-2); }
.row.folder > svg { color: var(--fg); }
.row .check {
  width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--fg-3); display: grid; place-items: center;
}
.row .check svg { width: 12px; height: 12px; opacity: 0; }
.row.selected .check { background: var(--fg); border-color: var(--fg); color: #000; }
.row.selected .check svg { opacity: 1; }
.row .actions-cell { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------- empty ---------- */
.empty {
  border: 1px dashed var(--line-2); border-radius: 14px; padding: 56px 20px; text-align: center; color: var(--fg-2);
  display: grid; justify-items: center; gap: 10px;
}
.empty svg { width: 42px; height: 42px; color: var(--fg-3); }
.empty h3 { margin: 4px 0 0; color: var(--fg); font-size: 16px; }
.empty p { margin: 0; max-width: 420px; }
.skeleton { height: 48px; border-radius: 8px; background: linear-gradient(90deg, var(--bg-1), var(--bg-2), var(--bg-1)); background-size: 200% 100%; animation: shimmer 1.2s infinite; margin-bottom: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- panels (settings, shares) ---------- */
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-1); padding: 18px; margin-bottom: 16px; display: grid; gap: 14px; max-width: 760px; }
.panel h2 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }
.panel p { margin: 0; color: var(--fg-2); }
.panel .row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 13px; }
.kv dt { color: var(--fg-3); text-transform: uppercase; font-size: 11px; letter-spacing: .1em; padding-top: 2px; }
.kv dd { margin: 0; font-family: var(--mono); word-break: break-all; }
.status-dot { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--fg-3); }
.status-dot.on::before { background: var(--fg); box-shadow: 0 0 10px rgba(255,255,255,.7); }
.code { font-family: var(--mono); font-size: 12px; background: #000; border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; word-break: break-all; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.form-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }

.share-row { grid-template-columns: 26px minmax(0, 1fr) 110px 110px 76px 76px; }

/* ---------- menu ---------- */
.menu {
  position: fixed; z-index: 60; min-width: 200px; padding: 6px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: 0 18px 50px rgba(0,0,0,.7);
}
.menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 7px;
  background: transparent; cursor: pointer; text-align: left; font-weight: 500;
}
.menu button:hover, .menu button:focus-visible { background: var(--bg-3); outline: none; }
.menu button.danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.75); display: grid; place-items: center; padding: 18px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.dialog {
  width: min(440px, 100%); max-height: calc(100dvh - 36px); overflow: auto; border-radius: 14px; background: var(--bg-1);
  border: 1px solid var(--line-2); padding: 20px; display: grid; gap: 16px; box-shadow: 0 30px 90px rgba(0,0,0,.8);
}
.dialog h3 { margin: 0; font-size: 14px; text-transform: uppercase; letter-spacing: .12em; }
.dialog p { margin: 0; color: var(--fg-2); }
.dialog .foot { display: flex; justify-content: flex-end; gap: 8px; }
.dialog.wide { width: min(560px, 100%); }
.picker { border: 1px solid var(--line); border-radius: 8px; max-height: 300px; overflow: auto; }
.picker .prow { display: flex; align-items: center; gap: 10px; padding: 0 12px; height: 40px; cursor: pointer; border-bottom: 1px solid var(--line); }
.picker .prow:last-child { border-bottom: 0; }
.picker .prow:hover { background: var(--bg-2); }
.picker .prow.disabled { opacity: .4; pointer-events: none; }
.picker .phead { display: flex; align-items: center; gap: 6px; padding: 8px 10px; font-weight: 700; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; }

/* ---------- preview ---------- */
.preview { position: fixed; inset: 0; z-index: 65; background: rgba(0,0,0,.94); display: grid; grid-template-rows: auto 1fr; }
.preview-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); min-width: 0; }
.preview-head .title { flex: 1; min-width: 0; }
.preview-head .title b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-body { position: relative; display: grid; place-items: center; overflow: hidden; padding: 16px; min-height: 0; }
.preview-body img, .preview-body video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.preview-body iframe { width: min(1000px, 100%); height: 100%; border: 0; background: #fff; border-radius: 6px; }
.preview-body pre {
  width: min(1000px, 100%); height: 100%; margin: 0; overflow: auto; padding: 16px; border-radius: 8px;
  background: var(--bg-1); border: 1px solid var(--line); font: 12.5px/1.55 var(--mono); white-space: pre-wrap; word-break: break-word; color: #ddd;
}
.preview-body audio { width: min(520px, 100%); }
.preview-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.6); }
.preview-nav.prev { left: 12px; }
.preview-nav.next { right: 12px; }
.noprev { display: grid; justify-items: center; gap: 14px; text-align: center; color: var(--fg-2); }
.noprev svg { width: 64px; height: 64px; color: var(--fg-3); }

/* ---------- uploads tray ---------- */
.uploads {
  position: fixed; right: 18px; bottom: 18px; z-index: 50; width: min(360px, calc(100vw - 24px));
  background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.7); overflow: hidden;
}
.uploads-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.uploads-list { max-height: 280px; overflow: auto; }
.up { padding: 10px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.up:last-child { border-bottom: 0; }
.up-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.up-top .n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: 13px; }
.up-top .s { font: 11px var(--mono); color: var(--fg-3); white-space: nowrap; }
.up .bar { height: 3px; }
.up.done .bar i { background: var(--fg-2); }
.up.error .s { color: var(--danger); }
.up.error .bar i { background: var(--danger); }

.dropzone { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.85); display: grid; place-items: center; pointer-events: none; }
.dropzone > div { border: 2px dashed var(--fg); border-radius: 20px; padding: 60px 80px; text-align: center; display: grid; justify-items: center; gap: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.dropzone svg { width: 44px; height: 44px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: var(--fg); color: #000; padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 13px; box-shadow: 0 12px 40px rgba(0,0,0,.6); animation: pop .18s ease-out; max-width: calc(100vw - 32px); }
.toast.err { background: var(--danger); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

/* ---------- bottom nav (mobile) ---------- */
.bottomnav { display: none; }

/* ---------- share page ---------- */
.share-page { min-height: 100%; display: grid; grid-template-rows: auto 1fr auto; }
.share-top { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.share-main { display: grid; place-items: center; padding: 24px 16px; }
.share-card { width: min(720px, 100%); border: 1px solid var(--line); border-radius: 14px; background: var(--bg-1); overflow: hidden; }
.share-media { background: #000; display: grid; place-items: center; max-height: 70vh; min-height: 160px; border-bottom: 1px solid var(--line); }
.share-media img, .share-media video { max-width: 100%; max-height: 70vh; display: block; }
.share-media audio { width: 90%; margin: 30px 0; }
.share-media > svg { width: 64px; height: 64px; color: var(--fg-3); margin: 40px; }
.share-info { padding: 18px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.share-info .t { flex: 1; min-width: 200px; }
.share-info .t b { display: block; font-size: 16px; word-break: break-word; }
.share-foot { padding: 16px; text-align: center; color: var(--fg-3); font-size: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .row { grid-template-columns: 28px 26px minmax(0, 1fr) 100px 36px; }
  .row .cell.date { display: none; }
  .share-row { grid-template-columns: 26px minmax(0, 1fr) 90px 76px 76px; }
  .share-row .cell.created { display: none; }
}

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { flex-wrap: wrap; padding: 10px 14px; gap: 8px; }
  .crumbs { order: 1; flex: 1 1 100%; }
  .search { order: 2; flex: 1; width: auto; }
  .actions { order: 3; }
  .actions .btn span { display: none; }
  .actions .btn { width: 36px; padding: 0; }
  .select { width: 82px; }
  .selbar { top: 104px; margin: 10px 14px 0; }
  .selbar .btn span { display: none; }
  .banner { margin: 12px 14px 0; }
  .content { padding: 14px 14px calc(110px + var(--safe-b)); }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .grid.folders { grid-template-columns: 1fr 1fr; }
  .card.folder { padding: 10px; gap: 8px; }
  .card .more { opacity: 1; }
  .card .check { opacity: 1; }
  .card.folder .check { display: none; }
  .row { grid-template-columns: 26px minmax(0, 1fr) 36px; height: 56px; }
  .row .check, .row .cell { display: none; }
  .row.head { display: none; }
  .row .name small { display: block; font: 11px var(--mono); color: var(--fg-3); font-weight: 400; }
  .share-row { grid-template-columns: 26px minmax(0, 1fr) 76px; }
  .share-row .cell { display: none; }
  .share-row .actions-cell .btn:first-child { display: none; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .form-grid { grid-template-columns: 1fr; }
  .uploads { right: 12px; left: 12px; width: auto; bottom: calc(72px + var(--safe-b)); }
  .toasts { bottom: calc(80px + var(--safe-b)); }

  .bottomnav {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(0,0,0,.94); border-top: 1px solid var(--line); padding-bottom: var(--safe-b);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
  .bottomnav a { display: grid; justify-items: center; gap: 3px; padding: 9px 0 8px; color: var(--fg-3); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  .bottomnav a.active { color: var(--fg); }
  .bottomnav svg { width: 21px; height: 21px; }
  .preview-nav { display: none; }
}
@media (min-width: 861px) {
  .row .name small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.toast.has-act { pointer-events: auto; display: flex; align-items: center; gap: 12px; }
.toast-act { background: #000; color: var(--fg); border-color: #000; height: 28px; }
.toast-act:hover { background: #222; }
.label-gap { margin-bottom: 6px; }
.lock-title { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 14px; text-transform: uppercase; letter-spacing: .12em; }
.legal { display: grid; justify-items: center; }
.legal .panel { line-height: 1.65; }

/* ---------- public site (home, privacy, terms) ---------- */
.site { min-height: 100%; display: flex; flex-direction: column; }
.site-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(16px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.site-nav { display: flex; align-items: center; gap: 18px; font-weight: 600; color: var(--fg-2); }
.site-nav a:not(.btn):hover { color: var(--fg); }
.site-main { flex: 1; width: min(1000px, 100%); margin: 0 auto; padding: clamp(28px, 6vw, 72px) clamp(16px, 4vw, 32px); display: grid; gap: 22px; }
.site-main a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; }
.site-main .panel { max-width: none; }
.hero { display: grid; gap: 18px; padding-bottom: 12px; }
.eyebrow { margin: 0; font: 12px var(--mono); text-transform: uppercase; letter-spacing: .16em; color: var(--fg-3); }
.hero h1 { margin: 0; font-size: clamp(32px, 6vw, 58px); line-height: 1.05; letter-spacing: -.02em; max-width: 14ch; }
.lead { margin: 0; font-size: clamp(15px, 2vw, 18px); color: var(--fg-2); max-width: 62ch; line-height: 1.6; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.feature { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--bg-1); }
.feature h3 { margin: 0 0 6px; font-size: 14px; }
.feature p { margin: 0; color: var(--fg-2); font-size: 13px; line-height: 1.55; }
.google-use p, .site-main .panel p { line-height: 1.65; }
.doc { width: min(780px, 100%); display: block; line-height: 1.7; color: #ddd; }
.doc h1 { font-size: clamp(28px, 5vw, 40px); margin: 0 0 4px; color: var(--fg); }
.doc h2 { font-size: 16px; margin: 30px 0 8px; color: var(--fg); }
.doc p, .doc li { color: #cfcfcf; }
.doc ul { padding-left: 20px; }
.site-foot { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; padding: 22px; border-top: 1px solid var(--line); color: var(--fg-3); font-size: 12px; }
.site-foot a:hover { color: var(--fg); }
@media (max-width: 560px) {
  .site-nav a:not(.btn) { display: none; }
}
