/* Hangar design system — Moonquake dispatch aesthetic, token-driven.
   Same token vocabulary as moonquake.css so the branding module can retheme
   it later: --bg --surface-1 --surface-2 --ink --ink-dim --line --accent. */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg: #0b0d10;
  --surface-1: #12151a;
  --surface-2: #191d24;
  --surface-3: #20252e;
  --ink: #e8e4dc;
  --ink-dim: #9aa3ad;
  --line: #232932;
  --line-hot: #323941;
  --accent: #d9a441;
  --accent-ink: #10120a;
  --good: #5fb26a;
  --warn: #d9a441;
  --danger: #d4574e;
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--ink); text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; text-wrap: balance; }
button { font: inherit; color: inherit; }
::selection { background: rgba(217, 164, 65, 0.35); }

/* ---------- app shell ---------- */

.app { display: flex; min-height: 100vh; }

.rail {
  width: 216px;
  flex: 0 0 216px;
  border-right: 1px solid var(--line);
  background: var(--surface-1);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.rail-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.14em;
  color: var(--ink);
  padding: 2px 10px 18px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.rail-wordmark .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(217, 164, 65, 0.8);
}
.rail a.nav-item, .rail .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--ink-dim);
  font-size: 13.5px;
  border: 1px solid transparent;
}
.rail .nav-item svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.rail .nav-item:hover { color: var(--ink); background: var(--surface-2); }
.rail .nav-item.is-active {
  color: var(--ink);
  background: var(--surface-2);
  border-color: var(--line-hot);
}
.rail .nav-item.is-active svg { stroke: var(--accent); }
.rail-foot {
  margin-top: auto;
  padding: 10px;
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-1) 72%, transparent);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar h1 { font-size: 16px; letter-spacing: 0.02em; }
.topbar .crumbs { color: var(--ink-dim); font-size: 13px; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.topbar .crumbs a:hover { color: var(--accent); }
.topbar .spacer { flex: 1; }

.content { padding: 26px; max-width: 1440px; width: 100%; margin: 0 auto; }

/* ---------- cards, tables, buttons ---------- */

.card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-title .spacer { flex: 1; }

.grid { display: grid; gap: 16px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

table.hx { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.hx th {
  text-align: left;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-hot);
  white-space: nowrap;
}
table.hx td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.hx tr:hover td { background: rgba(255, 255, 255, 0.018); }
table.hx .mono, .mono { font-family: var(--font-mono); font-size: 12px; }
table.hx td.dim, .dim { color: var(--ink-dim); }
table.mqx-sortable th { cursor: pointer; user-select: none; }
table.mqx-sortable th[data-sort-dir="asc"]::after { content: ' \2191'; color: var(--accent); }
table.mqx-sortable th[data-sort-dir="desc"]::after { content: ' \2193'; color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line-hot);
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { border-color: color-mix(in srgb, var(--danger) 55%, var(--line-hot)); color: var(--danger); }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 14%, transparent); border-color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-dim); }
.btn.ghost:hover { color: var(--ink); border-color: var(--line-hot); }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-hot);
  color: var(--ink-dim);
}
.badge.gold { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, var(--line-hot)); }
.badge.red { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, var(--line-hot)); }
.badge.green { color: var(--good); border-color: color-mix(in srgb, var(--good) 50%, var(--line-hot)); }

/* ---------- forms ---------- */

label.field { display: block; margin-bottom: 12px; }
label.field span {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 6px;
}
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-hot);
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.16);
}
textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-hot);
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.16); }

.file-note {
  color: var(--ink-dim);
  font-size: 12.5px;
  margin-top: 3px;
  max-width: 420px;
  text-wrap: pretty;
}

.form-row { display: flex; gap: 12px; }
.form-row label.field { flex: 1; }

.flash {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-1));
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line-hot));
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 13.5px;
}

/* ---------- auth screens ---------- */

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.auth-card {
  width: min(400px, 92vw);
  background: color-mix(in srgb, var(--surface-1) 88%, transparent);
  border: 1px solid var(--line-hot);
  border-radius: 14px;
  padding: 34px 32px;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(6px);
}
.auth-card h1 {
  font-size: 19px;
  letter-spacing: 0.15em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.auth-card h1 .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px rgba(217,164,65,0.9); }
.auth-card .sub { color: var(--ink-dim); font-size: 13px; margin-bottom: 22px; }
.auth-error {
  border: 1px solid color-mix(in srgb, var(--danger) 50%, var(--line-hot));
  color: var(--danger);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}
#hangar-stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ---------- notifications bell ---------- */

.bell { position: relative; }
.bell-count {
  position: absolute;
  top: -5px; right: -6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.bell-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 340px;
  max-height: 420px;
  overflow: auto;
  background: var(--surface-2);
  border: 1px solid var(--line-hot);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  padding: 8px;
  display: none;
  z-index: 60;
}
.bell-menu.open { display: block; }
.bell-item { padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.bell-item:hover { background: var(--surface-3); }
.bell-item .when { color: var(--ink-dim); font-family: var(--font-mono); font-size: 11px; }

/* ---------- dropzone + upload feedback ---------- */

.dropzone {
  position: relative;
  border: 1.5px dashed var(--line-hot);
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(217, 164, 65, 0.07), transparent 60%),
    var(--surface-1);
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-dim);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  cursor: pointer;
  overflow: hidden;
}
.dropzone strong { color: var(--ink); font-family: var(--font-display); font-size: 14px; letter-spacing: 0.04em; }
.dropzone .hint { font-size: 12.5px; }
.dropzone.drag {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(217, 164, 65, 0.14), inset 0 0 60px rgba(217, 164, 65, 0.06);
  background: color-mix(in srgb, var(--accent) 5%, var(--surface-1));
}
.dropzone.drag strong { color: var(--accent); }

/* Orbit stage (portal hero) */
.orbit-stage {
  position: relative;
  height: 380px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(217, 164, 65, 0.06), transparent 55%),
    var(--surface-1);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.orbit-stage.drag {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(217, 164, 65, 0.16), inset 0 0 120px rgba(217, 164, 65, 0.07);
}
.orbit-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.orbit-hud {
  position: absolute;
  left: 18px;
  bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  text-transform: uppercase;
  pointer-events: none;
}
.orbit-hud .hot { color: var(--accent); }
.orbit-title {
  position: absolute;
  left: 18px;
  top: 16px;
  pointer-events: none;
}
.orbit-title h2 { font-size: 15px; letter-spacing: 0.18em; text-transform: uppercase; }
.orbit-title .sub { color: var(--ink-dim); font-size: 12px; margin-top: 2px; }
.orbit-cta {
  position: absolute;
  right: 16px;
  top: 14px;
  z-index: 5;
}

/* Transfer manifest: one animated bar per drop batch */
.transfers { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.transfer {
  background: var(--surface-1);
  border: 1px solid var(--line-hot);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  animation: transfer-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes transfer-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.transfer .t-name { font-family: var(--font-display); font-size: 13px; letter-spacing: 0.03em; }
.transfer .t-meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); text-align: right; white-space: nowrap; }
.transfer .t-meta .pct { color: var(--good); font-weight: 600; }
.transfer .t-bar {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
  position: relative;
}
.transfer .t-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--good) 55%, #234a2b), var(--good));
  position: relative;
  transition: width 0.25s ease;
}
.transfer .t-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-100%);
  animation: t-sheen 1.2s linear infinite;
}
@keyframes t-sheen { to { transform: translateX(100%); } }
.transfer.done .t-fill { background: var(--accent); }
.transfer.done .t-fill::after { animation: none; }
.transfer.done .t-meta .pct { color: var(--accent); }
.transfer.error .t-fill { background: var(--danger); }
.transfer .t-files { grid-column: 1 / -1; color: var(--ink-dim); font-size: 12px; }
.transfer .t-craft {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 8px rgba(95, 178, 106, 0.8);
  margin-right: 8px;
  vertical-align: 1px;
}
.transfer.done .t-craft { background: var(--accent); box-shadow: 0 0 8px rgba(217, 164, 65, 0.8); }

/* File dock animation: rows settle in when an upload completes */
tr.docked > td { animation: dock-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.15); }
@keyframes dock-in {
  from { background: rgba(217, 164, 65, 0.18); }
  to { background: transparent; }
}

/* ---------- browser (folders + files) ---------- */

.browser-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.browser-toolbar .spacer { flex: 1; }

.folder-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line-hot);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13.5px;
  transition: border-color 0.15s, transform 0.12s;
}
.folder-chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.folder-chip svg { width: 15px; height: 15px; stroke: var(--accent); fill: none; stroke-width: 1.7; }
.folder-chip .count { color: var(--ink-dim); font-family: var(--font-mono); font-size: 11px; }
.folder-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }

.rowmenu { position: relative; display: inline-block; }
.rowmenu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 190px;
  background: var(--surface-2);
  border: 1px solid var(--line-hot);
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  padding: 6px;
  display: none;
  z-index: 50;
}
.rowmenu.open .rowmenu-list { display: block; }
.rowmenu-list button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
}
.rowmenu-list button:hover { background: var(--surface-3); }
.rowmenu-list button.danger { color: var(--danger); }
.rowmenu-list .sep { height: 1px; background: var(--line); margin: 5px 4px; }

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 8, 0.72);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: min(520px, 92vw);
  max-height: 84vh;
  overflow: auto;
  background: var(--surface-1);
  border: 1px solid var(--line-hot);
  border-radius: 14px;
  padding: 24px;
  animation: transfer-in 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
.modal h3 { font-size: 15px; letter-spacing: 0.05em; margin-bottom: 14px; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.modal.destruct { border-color: color-mix(in srgb, var(--danger) 55%, var(--line-hot)); }
.modal.destruct h3 { color: var(--danger); }
.destruct-warning {
  border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--line-hot));
  background: color-mix(in srgb, var(--danger) 8%, transparent);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}

/* ---------- toasts ---------- */

.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast {
  background: var(--surface-2);
  border: 1px solid var(--line-hot);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  min-width: 240px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  animation: transfer-in 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.toast.error { border-left-color: var(--danger); }
.toast.good { border-left-color: var(--good); }

/* ---------- pager (mqv3 pattern) ---------- */

.ci-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 2px 0;
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 11.5px;
}
.ci-pager-buttons { display: flex; gap: 4px; }
.ci-pager-btn {
  background: var(--surface-2);
  border: 1px solid var(--line-hot);
  color: var(--ink-dim);
  border-radius: 6px;
  min-width: 26px;
  height: 26px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  cursor: pointer;
}
.ci-pager-btn:hover:not(:disabled) { color: var(--ink); border-color: var(--accent); }
.ci-pager-btn.is-active { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.ci-pager-btn:disabled { opacity: 0.4; cursor: default; }

/* ---------- client portal chrome ---------- */

.portal { max-width: 1080px; margin: 0 auto; padding: 26px 22px 80px; }
.portal-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.portal-head h1 { font-size: 20px; letter-spacing: 0.06em; }
.portal-head .via { color: var(--ink-dim); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.portal-head .spacer { flex: 1; }

/* ---------- misc ---------- */

.empty {
  color: var(--ink-dim);
  text-align: center;
  padding: 34px 10px;
  font-size: 13.5px;
}
.stat-row { display: flex; gap: 26px; flex-wrap: wrap; }
.stat { min-width: 120px; }
.stat .v { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--ink); }
.stat .k {
  font-family: var(--font-display);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.hidden { display: none !important; }

@media (max-width: 860px) {
  .rail { display: none; }
  .content { padding: 16px; }
  .orbit-stage { height: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* List / grid view toggle for the file browser (shared portal + embed) */
.view-toggle { display: inline-flex; gap: 4px; margin-right: 8px; }
.view-toggle .btn.active { background: var(--accent); color: #12100b; border-color: var(--accent); }
#browser.view-grid table.files-table { display: none; }
#browser.view-list #file-grid { display: none; }
.file-grid {
  display: grid; gap: 14px; margin-top: 10px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.fg-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-1); display: flex; flex-direction: column; }
.fg-thumb { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; overflow: hidden; background: rgba(255,255,255,0.02); }
.fg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fg-file span { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; color: var(--ink-dim); }
.fg-name { padding: 9px 11px 0; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fg-meta { padding: 2px 11px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); }
.fg-actions { padding: 9px 11px 11px; margin-top: auto; display: flex; gap: 6px; }
/* ---------------- image lightbox ---------------- */
.fg-thumb img { cursor: zoom-in; }
.hlb {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(20, 14, 28, 0.93);
}
.hlb.hidden { display: none; }
.hlb-stage {
  margin: 0; max-width: 86vw; max-height: 88vh;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hlb-stage img {
  max-width: 86vw; max-height: 80vh; object-fit: contain;
  border-radius: 6px; background: #0d0a12; box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}
.hlb-stage figcaption {
  color: #e7ddcb; font-size: 13px; text-align: center;
  max-width: 80vw; word-break: break-word;
}
.hlb-close {
  position: absolute; top: 14px; right: 20px;
  background: none; border: 0; color: #e7ddcb; font-size: 34px; line-height: 1;
  cursor: pointer; padding: 4px 10px;
}
.hlb-nav {
  background: rgba(255, 255, 255, 0.08); border: 0; color: #fff;
  font-size: 40px; line-height: 1; cursor: pointer; padding: 8px 16px;
  border-radius: 8px; flex: none;
}
.hlb-nav:hover { background: rgba(255, 255, 255, 0.18); }
.hlb-count {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: #b9ab97; font-size: 12px; letter-spacing: 0.08em;
}

.fg-card .file-note{margin:4px 0 0;font-size:12px;line-height:1.4;color:#8a7f70;text-align:left}
.hlb-note{color:#d8cbb6;font-size:12.5px;line-height:1.45;text-align:center;max-width:70vw;margin-top:2px}
/* grid-view + lightbox notes */
.fg-card .file-note { margin: 4px 0 0; font-size: 12px; line-height: 1.4; color: var(--ink-dim, #8a7f70); text-align: left; }
.hlb-note { color: #d8cbb6; font-size: 12.5px; line-height: 1.45; text-align: center; max-width: 70vw; margin-top: 2px; }

/* rename modal */
.rename-row { display: flex; align-items: stretch; gap: 0; }
.rename-row input { flex: 1; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.rename-ext { display: inline-flex; align-items: center; padding: 0 12px; background: var(--surface-2, #241c2e); border: 1px solid var(--border, #3a3145); border-left: 0; border-radius: 0 6px 6px 0; color: var(--ink-dim, #9a8fa8); font-family: var(--font-mono, monospace); font-size: 13px; white-space: nowrap; }
