:root {
  --bg: #0a0a0a;
  --panel: #111111;
  --raised: #171717;
  --border: #262626;
  --border-strong: #404040;
  --text: #e5e5e5;
  --muted: #a3a3a3;
  --accent: #facc15;
  --accent-text: #0a0a0a;
  --danger: #ef4444;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; border-radius: 0 !important; }
[hidden] { display: none !important; }
body {
  margin: 0;
  display: flex;
  height: 100vh;
  font: 13px/1.45 ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}
svg { display: block; flex-shrink: 0; }
::selection { background: var(--accent); color: var(--accent-text); }

/* ---- Sidebar ---- */
aside {
  width: 240px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 57px;
  padding: 0 16px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .02em;
  border-bottom: 1px solid var(--border);
}
.mark {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-text);
  font-weight: 800; font-size: 14px;
}
.section-label {
  padding: 16px 16px 8px;
  font: 600 10px var(--mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}
nav a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  border-left: 2px solid transparent;
}
nav a:hover { background: var(--raised); }
nav a.active { background: var(--raised); border-left-color: var(--accent); }
nav a.active svg { color: var(--accent); }
nav a span { min-width: 0; }
nav a small {
  display: block;
  color: var(--muted);
  font: 11px var(--mono);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---- Main ---- */
main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 57px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.crumbs { display: flex; align-items: center; gap: 2px; font: 13px var(--mono); min-width: 0; overflow: hidden; }
.crumbs a { color: var(--muted); text-decoration: none; padding: 4px 6px; white-space: nowrap; }
.crumbs a:hover { color: var(--text); background: var(--raised); }
.crumbs a:last-child { color: var(--text); }
.crumbs .sep { color: var(--border-strong); }
.actions { display: flex; gap: 6px; flex-shrink: 0; }

button {
  font: inherit;
  font-weight: 500;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
button:hover { background: var(--raised); border-color: var(--muted); }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 1px solid var(--accent); outline-offset: 1px; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
button.primary:hover { background: #fde047; border-color: #fde047; }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
button.icon-btn { width: 32px; padding: 0; justify-content: center; }

.status {
  margin: 16px 20px 0;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  background: var(--panel);
  font-family: var(--mono);
}
.status.error { border-left-color: var(--danger); color: #fca5a5; }

/* ---- Table ---- */
.table-wrap { flex: 1; overflow: auto; padding: 16px 20px 20px; }
table { width: 100%; border-collapse: collapse; border: 1px solid var(--border); background: var(--panel); }
th, td { text-align: left; padding: 0 14px; height: 40px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th {
  position: sticky; top: 0;
  background: var(--raised);
  height: 34px;
  font: 600 10px var(--mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--raised); }
tbody tr:hover td.name a { color: var(--accent); }
td.name { width: 100%; max-width: 0; }
td.name a { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; overflow: hidden; }
td.name a span { overflow: hidden; text-overflow: ellipsis; }
td.name svg { color: var(--muted); }
td.name .dir svg { color: var(--accent); }
td.meta { color: var(--muted); font: 12px var(--mono); }
.num { text-align: right; }

td.row-actions { text-align: right; padding-right: 6px; }
.row-actions > div { display: flex; justify-content: flex-end; opacity: 0; }
tr:hover .row-actions > div, .row-actions > div:focus-within { opacity: 1; }
.row-actions a, .row-actions button {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; padding: 0;
  border: none; background: none;
  color: var(--muted);
}
.row-actions a:hover, .row-actions button:hover { color: var(--text); background: var(--border); }
.row-actions button.del:hover { color: var(--danger); }

.empty { text-align: center; padding: 64px 16px; border: 1px dashed var(--border-strong); border-top: none; color: var(--muted); }
.empty div { color: var(--text); font-weight: 600; margin-bottom: 4px; }

.drop-overlay {
  display: none;
  position: absolute;
  inset: 0;
  padding: 16px;
  background: rgba(10, 10, 10, .85);
  pointer-events: none;
  z-index: 5;
}
.drop-overlay div {
  height: 100%;
  display: grid; place-items: center;
  border: 2px dashed var(--accent);
  color: var(--accent);
  font: 600 14px var(--mono);
  text-transform: uppercase;
  letter-spacing: .12em;
}
main.dragging .drop-overlay { display: block; }

/* ---- Upload queue ---- */
.queue {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 380px;
  max-height: 50vh;
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
  z-index: 10;
}
.queue[hidden] { display: none; }
.queue-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px 14px; font-weight: 600; }
.queue-head button { border: none; }
.queue-bar { height: 2px; background: var(--border); }
.queue-bar div { height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.queue ul { list-style: none; margin: 0; padding: 0; overflow: auto; }
.queue li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  font: 12px var(--mono);
}
.queue li .q-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue li .q-state { color: var(--muted); }
.queue li.done .q-state { color: #4ade80; }
.queue li.error .q-state { color: var(--danger); }
.queue li .q-err { grid-column: 1 / -1; color: #fca5a5; white-space: normal; }
.queue li progress { grid-column: 1 / -1; width: 100%; height: 2px; appearance: none; border: none; background: var(--border); }
.queue li progress::-webkit-progress-bar { background: var(--border); }
.queue li progress::-webkit-progress-value { background: var(--accent); }
.queue li progress::-moz-progress-bar { background: var(--accent); }
.queue li:not(.active) progress { display: none; }

/* ---- Dialog ---- */
dialog {
  width: 400px;
  padding: 0;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .7);
}
dialog::backdrop { background: rgba(0, 0, 0, .7); }
#dialog form { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.dialog-title { font-weight: 700; font-size: 14px; }
.dialog-body { color: var(--muted); word-break: break-word; }
.dialog-body:empty { display: none; }
dialog input {
  font: 13px var(--mono);
  height: 36px;
  padding: 0 10px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
}
dialog input:focus { border-color: var(--accent); outline: none; }
dialog input[hidden] { display: none; }
/* OK comes first in the DOM so Enter submits it; row-reverse puts it on the right. */
.dialog-actions { display: flex; flex-direction: row-reverse; gap: 6px; margin-top: 4px; }

/* ---- Selection, drag & drop ---- */
th.check, td.check { width: 36px; padding: 0 0 0 14px; }
input[type=checkbox] {
  appearance: none;
  width: 14px; height: 14px; margin: 0;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  display: grid; place-items: center;
  cursor: pointer;
}
input[type=checkbox]:checked, input[type=checkbox]:indeterminate { background: var(--accent); border-color: var(--accent); }
input[type=checkbox]:checked::after { content: ''; width: 6px; height: 3px; border: solid var(--accent-text); border-width: 0 0 1.5px 1.5px; transform: translateY(-1px) rotate(-45deg); }
input[type=checkbox]:indeterminate::after { content: ''; width: 8px; height: 1.5px; background: var(--accent-text); }
tbody tr.selected { background: rgba(250, 204, 21, .06); }
tbody tr.selected td:first-child { box-shadow: inset 2px 0 var(--accent); }
tbody tr[draggable=true] { cursor: default; }

.drop-target, tbody tr.drop-target { background: rgba(250, 204, 21, .14) !important; outline: 1px solid var(--accent); outline-offset: -1px; }
.drag-ghost {
  position: fixed; top: -100px; left: 0;
  padding: 6px 10px;
  background: var(--accent); color: var(--accent-text);
  font: 600 12px var(--mono);
}

.selbar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 20px;
  background: var(--raised);
  border-bottom: 1px solid var(--border);
}
.selbar[hidden] { display: none; }
.selbar span { font: 600 12px var(--mono); margin-right: 8px; }
.selbar button { height: 28px; }
.selbar .icon-btn { width: 28px; margin-left: auto; border: none; }
button.danger-outline { border-color: rgba(239, 68, 68, .5); color: #fca5a5; }
button.danger-outline:hover { background: rgba(239, 68, 68, .12); border-color: var(--danger); }
button:disabled { opacity: .35; cursor: not-allowed; }

.aside-hint { margin-top: auto; padding: 16px; color: var(--muted); font-size: 11px; line-height: 1.5; border-top: 1px solid var(--border); }
kbd { font: 10px var(--mono); padding: 1px 4px; border: 1px solid var(--border-strong); color: var(--text); }

/* ---- Connect screen ---- */
.connect { margin: 20px; padding: 32px; max-width: 520px; border: 1px solid var(--border); border-left: 3px solid var(--accent); background: var(--panel); }
.connect[hidden] { display: none; }
.connect-title { font-weight: 700; font-size: 16px; }
.connect p { color: var(--muted); margin: 8px 0 20px; }
a.button {
  display: inline-flex; align-items: center;
  height: 34px; padding: 0 16px;
  text-decoration: none; font-weight: 600;
}
a.button.primary { background: var(--accent); color: var(--accent-text); }
a.button.primary:hover { background: #fde047; }

/* ---- Folder picker ---- */
dialog.picker { width: 640px; }
dialog.picker > .dialog-title { padding: 18px 20px 14px; border-bottom: 1px solid var(--border); }
.picker-body { display: flex; height: 340px; }
.picker-body nav { width: 180px; flex-shrink: 0; border-right: 1px solid var(--border); padding: 6px 0; overflow: auto; }
.picker-body nav a { padding: 8px 14px; }
.picker-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.picker-main .crumbs { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.picker-main ul { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; }
.picker-main li { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 34px; border-bottom: 1px solid var(--border); cursor: pointer; }
.picker-main li svg { color: var(--accent); }
.picker-main li:hover { background: var(--raised); }
.picker-main li.muted { color: var(--muted); cursor: default; }
.picker-main li.muted:hover { background: none; }
.picker-main li.muted svg { color: var(--muted); }
.picker-main li.error { color: #fca5a5; cursor: default; }
dialog.picker > .dialog-actions { padding: 14px 20px; border-top: 1px solid var(--border); margin: 0; }
.dialog-actions .left { margin-right: auto; }

/* ---- Form controls ---- */
input:not([type=checkbox]), select {
  font: inherit;
  height: 32px;
  padding: 0 10px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
}
input:not([type=checkbox]):focus, select:focus { border-color: var(--accent); outline: none; }
select { padding-right: 6px; cursor: pointer; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
label small { color: var(--muted); font-size: 11px; }
.form-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.form-row .grow { flex: 1; min-width: 160px; }
.form-error { padding: 8px 12px; border-left: 3px solid var(--danger); background: rgba(239, 68, 68, .08); color: #fca5a5; font: 12px var(--mono); }
.badge { display: inline-flex; align-items: center; height: 32px; padding: 0 10px; border: 1px dashed var(--border-strong); color: var(--muted); font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.icon-btn.ok { color: #4ade80; border-color: #4ade80; }

/* ---- Sign-in ---- */
.auth { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); }
.auth-box { width: 360px; padding: 28px; display: flex; flex-direction: column; gap: 14px; background: var(--panel); border: 1px solid var(--border); border-top: 3px solid var(--accent); }
.auth-box .brand { padding: 0; height: auto; border: none; margin-bottom: 6px; }
.auth-title { font-weight: 700; font-size: 18px; }
.auth-hint { margin: -6px 0 0; color: var(--muted); }
.auth-box button { height: 36px; justify-content: center; margin-top: 4px; }

/* ---- Sidebar user area ---- */
#usernav a svg { color: var(--muted); }
#usernav a.active svg { color: var(--accent); }
.userbox { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 10px 12px 16px; border-top: 1px solid var(--border); }
.userbox > div { min-width: 0; }
.userbox span { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userbox small { display: block; color: var(--muted); font: 11px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userbox button { border: none; flex-shrink: 0; }

/* ---- Pages (shared links, admin) ---- */
.page-title { font-weight: 700; font-size: 15px; }
#page { overflow: auto; }
.page-body { padding: 16px 20px 40px; display: flex; flex-direction: column; gap: 28px; max-width: 1000px; }
.page-section { display: flex; flex-direction: column; gap: 12px; }
.page-section .section-label { padding: 0; }
.page-section td { height: 44px; }
.page-section td a { color: var(--text); text-decoration: none; }
.page-section td a:hover { color: var(--accent); }
.row-actions.always > div { opacity: 1; }
.empty small { display: block; max-width: 460px; margin: 0 auto; }

/* ---- Share & access dialogs ---- */
dialog.wide { width: 600px; padding: 20px; }
dialog.wide > * + * { margin-top: 16px; }
.dialog-section { display: flex; flex-direction: column; gap: 10px; }
.dialog-section .section-label { padding: 0; }
.link-list, .rule-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); }
.link-list li, .rule-list li { padding: 10px 12px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.link-list li:last-child, .rule-list li:last-child { border-bottom: none; }
.link-list li.muted, .rule-list li.muted { color: var(--muted); }
.link-list small { color: var(--muted); font: 11px var(--mono); }
.link-row { display: flex; gap: 6px; }
.link-row input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; }
.link-row .icon-btn.del:hover { color: var(--danger); border-color: var(--danger); }
.link-target { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 600; }
.link-target svg { color: var(--accent); }
.link-target:hover span { text-decoration: underline; }
.page-links { background: var(--panel); }
.rule-list li { flex-direction: row; align-items: center; gap: 10px; }
.rule-list .subject { flex: 1; font-weight: 600; }
.rule-list .lvl { font: 12px var(--mono); }
.rule-list small { color: var(--muted); font: 11px var(--mono); min-width: 140px; text-align: right; }
.rule-list .icon-btn { border: none; }
.rule-list .icon-btn.del:hover { color: var(--danger); }
#access-form select:first-child { flex: 1; }
dialog.wide > .dialog-actions { margin-top: 20px; }

/* ---- Public share page ---- */
.share-page { display: block; min-height: 100vh; }
.share-page header { padding: 0 24px; }
.share-wrap { max-width: 860px; margin: 32px auto; padding: 0 20px; display: flex; flex-direction: column; gap: 16px; }
.share-card { padding: 28px; background: var(--panel); border: 1px solid var(--border); border-top: 3px solid var(--accent); display: flex; flex-direction: column; gap: 14px; }
.share-card .file-title { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 700; word-break: break-all; }
.share-card .file-title svg { color: var(--accent); width: 22px; height: 22px; }
.share-card .meta { color: var(--muted); font: 12px var(--mono); }
.share-card form { display: flex; gap: 8px; }
.share-card form input { flex: 1; }
.share-foot { color: var(--muted); font: 11px var(--mono); text-align: center; }
.share-page .brand { border-bottom: none; padding: 0; }

/* ---- Projects ---- */
.section-label.with-action { display: flex; align-items: center; justify-content: space-between; padding-right: 10px; }
.section-label .icon-btn { width: 22px; height: 22px; border: none; color: var(--muted); }
.section-label .icon-btn:hover { color: var(--accent); }
.nav-empty { padding: 4px 16px 8px; color: var(--muted); font-size: 12px; }
#projects a svg { color: var(--muted); }
#projects a.active svg { color: var(--accent); }
.pick-list li { cursor: pointer; }
.pick-list li:hover { background: var(--raised); }
.pick-list li.muted { cursor: default; }
.pick-list li.muted:hover { background: none; }
#project-form .grow { flex: 1; }

/* ---- Share page uploads ---- */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 28px 16px;
  border: 1px dashed var(--border-strong);
  color: var(--muted); text-align: center;
}
.dropzone.over { border-color: var(--accent); background: rgba(250, 204, 21, .06); color: var(--text); }
.upload-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); }
.upload-list:empty { display: none; }
.upload-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); font: 12px var(--mono); }
.upload-list li:last-child { border-bottom: none; }
.upload-list .q-state { color: var(--muted); }
.upload-list li.done .q-state { color: #4ade80; }
.upload-list li.error .q-state { color: var(--danger); }
.upload-list progress { grid-column: 1 / -1; width: 100%; height: 2px; appearance: none; border: none; background: var(--border); }
.upload-list progress::-webkit-progress-bar { background: var(--border); }
.upload-list progress::-webkit-progress-value { background: var(--accent); }
.upload-list li:not(.active) progress { display: none; }

/* Active project toggle next to each project */
.project-row { display: flex; align-items: stretch; }
.project-row a { flex: 1; min-width: 0; }
.live-btn { width: 32px; padding: 0; justify-content: center; border: none; background: none; color: var(--muted); }
.live-btn:hover:not(:disabled) { color: var(--accent); }
.live-btn:disabled { opacity: .35; cursor: default; }
.project-row.live .live-btn { color: var(--accent); }
.project-row.live .live-btn svg circle { fill: currentColor; }

/* Layout and interaction polish */
body { height: 100dvh; }
aside { overflow-y: auto; }
main, .picker-main { min-height: 0; }
header { min-height: 57px; height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.actions, .selbar { flex-wrap: wrap; }
.actions { max-width: 100%; min-width: 0; }
.crumbs { overflow-x: auto; }
.crumbs a { max-width: 280px; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
nav a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button { flex-shrink: 0; }
button:disabled:hover { background: transparent; border-color: var(--border-strong); }
button.primary:disabled:hover { background: var(--accent); border-color: var(--accent); }
:where(button, a, input, select, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:not([type=checkbox]):focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=checkbox] { flex-shrink: 0; }
#entries td.name { min-width: 160px; }
td.name a span { min-width: 0; }
.queue { width: min(380px, calc(100vw - 24px)); }
.queue li, .upload-list li { grid-template-columns: minmax(0, 1fr) auto; }
.q-state { max-width: 180px; overflow-wrap: anywhere; }
.q-err, .form-error, .status, .dialog-title, .link-target, .subject, #active-hint { overflow-wrap: anywhere; }
dialog { max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; }
.dialog-actions { flex-wrap: wrap; }
.dialog-actions .left { margin-right: 0; margin-left: auto; }
.picker-main li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-list li[role=button]:focus-visible, .picker-main li[role=button]:focus-visible { outline-offset: -2px; background: var(--raised); }
.auth { overflow: auto; padding: 20px; }
.auth-box { width: min(360px, 100%); margin: auto; }
.page-section { min-width: 0; }
.page-section table { display: block; overflow-x: auto; }
.page-section td { max-width: 300px; overflow-wrap: anywhere; white-space: normal; }
.form-row > input, .form-row > select, .form-row > label { min-width: 0; max-width: 100%; }
.rule-list li { flex-wrap: wrap; }
.rule-list .subject { min-width: 100px; }
.link-target span { min-width: 0; }
.share-card { min-width: 0; }
.share-card .file-title { word-break: normal; overflow-wrap: anywhere; }
.share-card .file-title svg { flex-shrink: 0; }
.share-card form input { min-width: 0; }
.upload-list li > span:first-child { overflow-wrap: anywhere; min-width: 0; }
.upload-list progress::-moz-progress-bar { background: var(--accent); }
.live-btn { align-self: center; }
@media (hover: none), (pointer: coarse) {
  .row-actions > div { opacity: 1; }
  button, .row-actions a, .row-actions button { min-height: 36px; }
}
@media (max-width: 760px) {
  body:not(.share-page) { flex-direction: column; }
  aside { width: 100%; max-height: 32dvh; border-right: none; border-bottom: 1px solid var(--border); }
  aside .brand { min-height: 44px; }
  aside .section-label { padding-top: 10px; }
  aside nav a { padding-top: 8px; padding-bottom: 8px; }
  .aside-hint { display: none; }
  .userbox { padding-top: 8px; padding-bottom: 8px; }
  main { flex: 1; }
  header { padding: 12px; gap: 10px; }
  header > .crumbs { width: 100%; }
  .actions { gap: 6px; }
  .table-wrap, .page-body { padding: 12px; }
  .status { margin: 12px 12px 0; }
  .selbar { padding: 8px 12px; }
  .selbar span { width: calc(100% - 40px); }
  .queue { right: 12px; bottom: 12px; }
  .picker-body { height: min(340px, 50dvh); }
  .picker-body nav { width: 120px; }
  dialog.wide { padding: 16px; }
  .share-wrap { margin: 20px auto; padding: 0 12px; }
  .share-card { padding: 16px; }
  .share-card .file-title { font-size: 16px; }
  .row-actions > div { opacity: 1; }
  .connect { margin: 12px; padding: 20px; }
}

/* Storages & settings page */
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.stack-form.narrow { max-width: 520px; }
#storage-dialog .stack-form > label span, .stack-form label > span { color: var(--text); }
label.check-label { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
label.check-label small { flex-basis: 100%; padding-left: 24px; }
.hint { border: 1px solid var(--border); background: var(--raised); padding: 10px 12px; color: var(--muted); font-size: 12px; display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }
code.block { display: block; font: 12px var(--mono); color: var(--text); user-select: all; }
small.block { display: block; font-size: 11px; }
.danger-text { color: var(--danger); }
.ok-text { color: #4ade80; }
