/* ==========================================================
   transfer.injected.wtf — matte black redesign
   ========================================================== */

:root {
  --bg:        #0a0a0a;
  --bg-1:      #101010;
  --bg-2:      #141414;
  --bg-3:      #1a1a1a;
  --line:      rgba(255,255,255,0.06);
  --line-2:    rgba(255,255,255,0.10);
  --line-3:    rgba(255,255,255,0.16);
  --text:      #ededed;
  --text-2:    #b3b3b3;
  --muted:     #767676;
  --muted-2:   #555;
  --accent:    oklch(76% 0.10 280);
  --accent-2:  oklch(76% 0.10 280 / 0.14);
  --accent-3:  oklch(76% 0.10 280 / 0.32);
  --danger:    oklch(70% 0.15 25);
  --warn:      oklch(80% 0.13 75);
  --ok:        oklch(78% 0.12 150);

  --sans: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
  height: 100vh;
  overflow: hidden;
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(255,255,255,0.025), transparent 60%);
}

#root { height: 100vh; overflow: hidden; }
.app { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

/* — Reset/typography — */
h1,h2,h3,h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: var(--accent-3); color: #fff; }

.mono { font-family: var(--mono); font-feature-settings: "ss01","ss02"; letter-spacing: 0; }
.kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* ==========================================================
   App shell
   ========================================================== */
/* legacy .app rule kept overridden above */

.brand-floating {
  position: fixed;
  top: 22px;
  left: 24px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px 8px 10px;
  background: rgba(20,20,20,0.55);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  cursor: pointer;
  font-size: 12.5px;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: all 180ms;
}
.brand-floating:hover { border-color: rgba(255,255,255,0.16); background: rgba(28,28,28,0.7); }
.brand-floating .brand-mark {
  width: 16px; height: 16px;
  border-radius: 5px;
  background: linear-gradient(180deg, #2a2a2a, #161616);
  border: 1px solid rgba(255,255,255,0.12);
  display: inline-block;
}
.brand-floating .brand-name { font-weight: 600; }
.brand-floating .brand-domain { color: var(--muted); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(10,10,10,0.78);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 22px; height: 22px;
  border-radius: 5px;
  background: linear-gradient(135deg, #1f1f1f, #0a0a0a);
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute; inset: 4px;
  border-radius: 2px;
  background: var(--text);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  opacity: 0.92;
}
.brand-name { color: var(--text); font-weight: 600; }
.brand-domain { color: var(--muted); }

.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  font-family: var(--mono);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--muted);
  letter-spacing: -0.005em;
  transition: color 120ms, background 120ms;
  cursor: pointer;
}
.nav a:hover { color: var(--text-2); background: var(--bg-1); }
.nav a.active {
  color: var(--text);
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

.topbar-right { display: flex; align-items: center; gap: 10px; }
.status-dot {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.status-dot::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px oklch(78% 0.12 150 / 0.18);
}
.btn-ghost {
  font-family: var(--mono);
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: var(--bg-1);
  color: var(--text);
  cursor: pointer;
  transition: all 120ms;
  letter-spacing: -0.005em;
}
.btn-ghost:hover { background: var(--bg-2); border-color: var(--line-3); }

/* ==========================================================
   Dock (macOS-style bottom floating)
   ========================================================== */
.dock {
  position: fixed !important;
  left: 0;
  right: 0;
  bottom: 22px;
  z-index: 100;
  pointer-events: none;
  display: flex;
  justify-content: center;
  width: 100%;
}
.dock-inner {
  pointer-events: auto;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(20,20,20,0.55);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 22px;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow:
    0 24px 60px rgba(0,0,0,0.65),
    0 2px 0 rgba(255,255,255,0.04) inset,
    0 -1px 0 rgba(0,0,0,0.4) inset;
}
.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  position: relative;
  transition: transform 220ms cubic-bezier(.2,.7,.3,1.4);
  transform-origin: bottom center;
}
.dock-item:hover { transform: translateY(-6px) scale(1.18); }
.dock-item:hover + .dock-item,
.dock-item:has(+ .dock-item:hover) { transform: translateY(-2px) scale(1.06); }
.dock-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(180deg, #2a2a2a, #161616);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--text);
  box-shadow:
    0 4px 10px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.06);
  transition: all 200ms;
}
.dock-item:hover .dock-icon {
  border-color: rgba(255,255,255,0.18);
  background: linear-gradient(180deg, #333, #1a1a1a);
}
.dock-item.active .dock-icon {
  background: linear-gradient(180deg, #3a3a3a, #1f1f1f);
  border-color: rgba(255,255,255,0.18);
}
.dock-item.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text);
  transform: translateX(-50%);
  box-shadow: 0 0 6px rgba(255,255,255,0.6);
}
.dock-label {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  background: rgba(20,20,20,0.95);
  border: 1px solid var(--line-2);
  border-radius: 5px;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 180ms;
}
.dock-item:hover .dock-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.dock-sep {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.08);
  margin: 0 4px;
  align-self: center;
}
@media (max-width: 480px) {
  .dock-icon { width: 42px; height: 42px; border-radius: 10px; }
  .dock-inner { gap: 4px; padding: 6px 8px; }
}

/* ==========================================================
   Buttons
   ========================================================== */
.btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--text);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 140ms cubic-bezier(.2,.7,.3,1);
  user-select: none;
}
.btn:hover { background: var(--bg-3); border-color: var(--line-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary {
  background: var(--text);
  color: #0a0a0a;
  border-color: var(--text);
  font-weight: 600;
}
.btn-primary:hover:not(:disabled) {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.06);
}
.btn-primary:disabled { background: #2a2a2a; border-color: var(--line-2); color: var(--muted); }
.btn-sm { padding: 7px 11px; font-size: 12px; border-radius: 6px; }
.w-full { width: 100%; }

.icon-btn {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: all 120ms;
}
.icon-btn:hover { background: var(--bg-2); color: var(--text); border-color: var(--line-2); }
.icon-btn.danger:hover { color: var(--danger); border-color: oklch(70% 0.15 25 / 0.4); }

/* ==========================================================
   Page container
   ========================================================== */
.page {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 130px;
  animation: pageIn 280ms cubic-bezier(.2,.7,.3,1);
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.page::-webkit-scrollbar { width: 8px; }
.page::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
.page::-webkit-scrollbar-track { background: transparent; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   UPLOAD PAGE
   ========================================================== */
.upload-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: start;
  margin-top: 16px;
}

/* ==========================================================
   UPLOAD — macOS modal window
   ========================================================== */
.page.upload-page-modal {
  max-width: none; width: 100%; padding: 80px 24px 130px; margin: 0;
  display: flex; align-items: flex-start; justify-content: center;
  min-height: 100vh;
}
.up-window {
  width: 100%; max-width: 980px; height: 620px; max-height: calc(100vh - 220px); min-height: 540px;
  background: rgba(18,18,18,0.78);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 1px 0 rgba(255,255,255,0.05) inset;
  display: flex; flex-direction: column; overflow: hidden;
}
.up-chrome {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 14px;
  height: 44px; padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(34,34,34,0.6), rgba(20,20,20,0.4));
}
.up-chrome-left { display: flex; gap: 8px; align-items: center; }
.up-chrome-title {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12px; color: var(--muted);
}
.up-chrome-title > span:nth-child(2) { color: var(--text); font-weight: 500; }
.up-chrome-right { display: flex; align-items: center; gap: 8px; justify-self: end; }
.up-chrome-btn {
  font-size: 10.5px; padding: 4px 9px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line); border-radius: 6px;
  color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  transition: all 120ms;
}
.up-chrome-btn:hover { color: var(--text); background: rgba(255,255,255,0.08); }
.up-chrome-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px;
  padding: 4px 9px;
  background: rgba(46,160,67,0.10);
  border: 1px solid rgba(46,160,67,0.25);
  border-radius: 6px;
  color: var(--ok);
}
.up-chrome-pill .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}

.up-body-grid {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 1fr 300px;
}

/* ── stage (left) ── */
.up-stage {
  position: relative; min-height: 0;
  background: radial-gradient(ellipse at center, rgba(30,30,40,0.4), rgba(10,10,12,0.7));
  overflow: hidden;
}
.up-grid-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
}
.up-stage-content {
  position: relative; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}

/* dropzone */
.up-drop {
  position: relative;
  height: 100%; width: 100%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: background 200ms;
}
.up-drop::before {
  content: "";
  position: absolute; inset: 16px;
  border: 1px dashed rgba(255,255,255,0.10);
  border-radius: 10px;
  pointer-events: none;
  transition: all 180ms;
}
.up-drop:hover::before { border-color: rgba(255,255,255,0.18); inset: 14px; }
.up-drop.drag::before {
  border-color: var(--accent);
  inset: 12px;
  background: var(--accent-2);
}
.up-drop-inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.up-drop-arrow {
  width: 76px; height: 76px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.10);
  display: grid; place-items: center;
  color: var(--text-2);
  margin-bottom: 18px;
  position: relative;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3), 0 1px 0 rgba(255,255,255,0.05) inset;
  animation: up-bob 2.8s ease-in-out infinite;
}
.up-drop-arrow::after {
  content: ""; position: absolute; inset: -1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.15), transparent 40%);
  pointer-events: none; opacity: 0.3;
}
@keyframes up-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
.up-drop-title {
  font-size: 18px; font-weight: 500; color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.up-drop-sub {
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.02em;
}
.up-drop-meta {
  margin-top: 18px;
  display: flex; gap: 8px; align-items: center;
  font-size: 9.5px;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--muted-2);
}
.up-drop-meta .dot-sep { color: rgba(255,255,255,0.15); }

/* picked state */
.up-pickup {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  animation: up-pickup-in 380ms cubic-bezier(.2,.7,.3,1);
}
@keyframes up-pickup-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.up-pickup-card {
  width: 200px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  position: relative;
}
.up-pickup-ext {
  display: inline-block;
  font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 3px 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  margin-bottom: 12px;
}
.up-pickup-name {
  font-size: 13px; color: var(--text); font-weight: 500;
  word-break: break-all; line-height: 1.3;
  margin-bottom: 6px;
}
.up-pickup-size {
  font-size: 11px; color: var(--muted);
}
.up-pickup-hint {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px;
  padding: 5px 10px;
  background: rgba(46,160,67,0.10);
  border: 1px solid rgba(46,160,67,0.22);
  border-radius: 999px;
  color: var(--ok);
}

/* viz (uploading/encrypting/storing) */
.up-viz {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 32px;
  gap: 12px;
}
.up-viz-source, .up-viz-dest {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  position: relative;
}
.up-viz-blob {
  width: 88px; height: 110px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.10);
  padding: 14px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  position: relative;
  overflow: hidden;
}
.up-viz-blob::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 14px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.up-viz-blob::after {
  content: "";
  position: absolute; top: 4px; left: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.10);
}
.up-viz-blob-bars { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.up-viz-bar {
  height: 4px; border-radius: 1px;
  background: linear-gradient(90deg, var(--text-2), transparent);
  width: 100%;
  transform-origin: left;
  animation: up-bar-shrink 4s ease-in-out infinite;
}
.up-viz-bar:nth-child(2) { width: 80%; }
.up-viz-bar:nth-child(3) { width: 65%; }
.up-viz-bar:nth-child(4) { width: 90%; }
.up-viz-bar:nth-child(5) { width: 55%; }
.up-viz-bar:nth-child(6) { width: 70%; }
@keyframes up-bar-shrink {
  0%   { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(0.1); opacity: 0.3; }
}
.up-viz-uploading .up-viz-bar { animation-play-state: running; }
.up-viz-encrypting .up-viz-bar, .up-viz-storing .up-viz-bar {
  animation-play-state: paused;
  transform: scaleX(0.1);
  opacity: 0.2;
}
.up-viz-label {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--muted-2);
}

.up-viz-bridge {
  width: 200px; height: 40px;
  position: relative;
  display: grid; place-items: center;
}
.up-viz-rotor {
  transform-origin: 60px 60px;
  animation: up-rotate 8s linear infinite;
}
.up-viz-rotor-reverse { animation-duration: 5s; animation-direction: reverse; }
@keyframes up-rotate {
  to { transform: rotate(360deg); }
}
.up-viz-glyph {
  transition: transform 400ms cubic-bezier(.2,.7,.3,1);
}
.up-viz-core.active {
  filter: drop-shadow(0 0 16px var(--accent));
}
.up-viz-core.active .up-viz-glyph {
  animation: up-glyph-pulse 0.9s ease-in-out infinite;
}
@keyframes up-glyph-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

.up-viz-cipher {
  display: flex; flex-direction: column; gap: 4px; align-items: center;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.06em;
  min-height: 96px;
  justify-content: center;
}
.up-viz-cipher span {
  animation: up-cipher-flicker 1.4s ease-in-out infinite;
}
.up-viz-cipher span.dim { color: var(--muted-2); animation: none; }
.up-viz-cipher span:nth-child(2) { animation-delay: 0.2s; }
.up-viz-cipher span:nth-child(3) { animation-delay: 0.4s; }
.up-viz-cipher span:nth-child(4) { animation-delay: 0.6s; }
.up-viz-cipher span:nth-child(5) { animation-delay: 0.8s; }
@keyframes up-cipher-flicker {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

.up-viz-chunks {
  position: absolute; inset: 0; pointer-events: none;
  overflow: hidden;
}
.up-viz-chunk {
  position: absolute;
  font-size: 10px;
  color: var(--accent);
  opacity: 0;
  left: 18%;
  animation: up-chunk-fly 3.2s linear infinite;
  text-shadow: 0 0 8px var(--accent);
  letter-spacing: 0.05em;
}
@keyframes up-chunk-fly {
  0%   { left: 18%; opacity: 0; transform: scale(0.6); }
  10%  { opacity: 0.9; }
  45%  { left: 50%; transform: scale(1.1); color: var(--accent); }
  55%  { left: 50%; transform: scale(0.9); color: oklch(82% 0.10 280); }
  90%  { opacity: 0.9; transform: scale(1); }
  100% { left: 82%; opacity: 0; transform: scale(0.6); }
}
.up-viz-encrypting .up-viz-chunk, .up-viz-storing .up-viz-chunk {
  animation-duration: 1.6s;
}

.up-progress-ring-label {
  position: absolute;
  left: 50%; bottom: 28px;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.up-progress-pct {
  font-size: 22px; color: var(--text); font-weight: 500;
  letter-spacing: -0.02em;
  display: inline-flex; align-items: baseline;
}
.up-progress-pct-sm { font-size: 11px; color: var(--muted); margin-left: 1px; }
.up-progress-label {
  display: block;
  margin-top: 4px;
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--muted-2);
}

/* done */
.up-done {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  animation: up-pickup-in 380ms cubic-bezier(.2,.7,.3,1);
}
.up-done-tick {
  margin-bottom: 16px;
  filter: drop-shadow(0 0 12px oklch(78% 0.15 150 / 0.4));
}
.up-done-circle {
  stroke-dasharray: 138;
  stroke-dashoffset: 138;
  animation: up-circle-draw 600ms ease-out forwards;
}
.up-done-check {
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: up-circle-draw 360ms 400ms ease-out forwards;
}
@keyframes up-circle-draw {
  to { stroke-dashoffset: 0; }
}
.up-done-title {
  font-size: 18px; color: var(--text); font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.up-done-url {
  font-size: 11.5px;
  padding: 8px 14px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  word-break: break-all;
  max-width: 360px;
}
.up-done-url .muted { color: var(--muted); }
.up-done-id { color: var(--accent); }

/* ── inspector (right) ── */
.up-inspector {
  border-left: 1px solid var(--line);
  background: rgba(12,12,12,0.4);
  padding: 16px;
  display: flex; flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.up-insp-section {
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 14px;
  flex-shrink: 0;
}
.up-insp-section:last-of-type { border-bottom: 0; margin-bottom: 0; }
.up-insp-name {
  font-size: 12.5px; font-weight: 500; color: var(--text);
  word-break: break-all; line-height: 1.35;
  margin-bottom: 8px;
}
.up-insp-empty {
  font-size: 11px; color: var(--muted-2);
  padding: 6px 0;
}

.up-retention-pinned {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--text);
}
.up-stepper {
  display: flex; align-items: center;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.up-stepper button {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: transparent; border: 0; cursor: pointer;
  color: var(--muted);
  transition: all 120ms;
}
.up-stepper button:hover:not(:disabled) { background: rgba(255,255,255,0.05); color: var(--text); }
.up-stepper button:disabled { opacity: 0.3; cursor: not-allowed; }
.up-stepper-val {
  flex: 1; text-align: center;
  font-size: 14px; color: var(--text); font-weight: 500;
  letter-spacing: -0.01em;
}
.up-stepper-unit {
  color: var(--muted); margin-left: 2px; font-size: 11px;
}
.up-retention-marks {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-size: 9.5px;
  color: var(--muted-2);
}
.up-retention-marks span.active { color: var(--accent); }

.up-phase {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0;
  opacity: 0.45;
  transition: opacity 200ms;
}
.up-phase.active, .up-phase.done { opacity: 1; }
.up-phase-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  flex-shrink: 0;
  color: var(--text);
}
.up-phase.active .up-phase-dot {
  background: var(--accent-2);
  border-color: var(--accent);
  animation: up-pulse 1.2s ease-in-out infinite;
}
.up-phase.done .up-phase-dot {
  background: rgba(46,160,67,0.15);
  border-color: var(--ok);
  color: var(--ok);
}
@keyframes up-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-2); }
  50%      { box-shadow: 0 0 0 6px transparent; }
}
.up-phase-text { display: flex; flex-direction: column; }
.up-phase-label {
  font-size: 11.5px; color: var(--text);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.up-phase-sub {
  font-size: 9.5px; color: var(--muted);
  letter-spacing: 0.04em;
}

.up-insp-actions {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  flex-shrink: 0;
}
.up-btn-spinner {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.15);
  border-top-color: var(--text);
  animation: up-spin 700ms linear infinite;
  display: inline-block;
}
@keyframes up-spin { to { transform: rotate(360deg); } }

.up-insp-recent { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.up-insp-recent-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.up-insp-recent-count {
  font-size: 10px;
  color: var(--muted-2);
  padding: 1px 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.up-recent-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
  overflow-y: auto;
  min-height: 0;
}
.up-recent-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  transition: background 120ms;
}
.up-recent-item:last-child { border-bottom: 0; }
.up-recent-item:hover { background: rgba(255,255,255,0.015); }
.up-recent-info { min-width: 0; flex: 1; }
.up-recent-name {
  font-size: 11.5px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}
.up-recent-meta {
  font-size: 9.5px; color: var(--muted-2);
  letter-spacing: 0.04em;
}
.up-recent-expiring .up-recent-meta { color: oklch(78% 0.12 60); }
.up-recent-copy {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  cursor: pointer;
  transition: all 120ms;
  flex-shrink: 0;
}
.up-recent-copy:hover { color: var(--text); border-color: rgba(255,255,255,0.18); background: rgba(255,255,255,0.04); }

/* statusbar tweak for upload */
.up-statusbar { flex-shrink: 0; }

@media (max-width: 820px) {
  .up-body-grid { grid-template-columns: 1fr; }
  .up-inspector { border-left: 0; border-top: 1px solid var(--line); max-height: 280px; overflow-y: auto; }
  .up-window { height: auto; max-height: none; min-height: 0; }
  .up-stage { min-height: 360px; }
}

/* ==========================================================
   macOS WINDOW CHROME (shared)
   ========================================================== */
.tlight { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.tlight-r { background: #ff5f57; box-shadow: inset 0 0 0 0.5px rgba(0,0,0,0.2); }
.tlight-y { background: #febc2e; }
.tlight-g { background: #28c840; }

/* ==========================================================
   DOCS — modal window
   ========================================================== */
.page.docs-page-modal {
  max-width: none; width: 100%; padding: 80px 32px 130px; margin: 0;
  display: flex; align-items: flex-start; justify-content: center;
  min-height: 100vh;
}
.docs-window {
  width: 100%; max-width: 1100px; height: 700px; max-height: calc(100vh - 230px); min-height: 540px;
  background: rgba(18,18,18,0.78);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 1px 0 rgba(255,255,255,0.05) inset;
  display: flex; flex-direction: column; overflow: hidden;
}
.docs-chrome {
  display: grid; grid-template-columns: 220px 1fr 260px;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(34,34,34,0.6), rgba(20,20,20,0.4));
}
.docs-chrome-left { display: flex; gap: 8px; align-items: center; }
.docs-chrome-title {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12px; color: var(--muted); letter-spacing: -0.005em;
}
.docs-chrome-current { color: var(--text); font-size: 11.5px; }
.docs-chrome-sep { color: var(--muted-2); }
.docs-chrome-right { display: flex; justify-content: flex-end; }
.docs-search {
  display: flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 8px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 220px;
  color: var(--muted);
}
.docs-search input {
  flex: 1; background: transparent; border: 0; outline: 0;
  color: var(--text); font-family: inherit; font-size: 12px;
}
.docs-search input::placeholder { color: var(--muted-2); }
.kbd {
  font-size: 9.5px; padding: 2px 5px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 3px;
  color: var(--muted);
}

.docs-body {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 220px 1fr;
}
.docs-side {
  border-right: 1px solid var(--line);
  padding: 14px 10px;
  overflow-y: auto;
  background: rgba(12,12,12,0.4);
}
.docs-side::-webkit-scrollbar { width: 6px; }
.docs-side::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 3px; }
.docs-side-group { margin-bottom: 14px; }
.docs-side-group-label {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted-2);
  padding: 4px 10px 6px;
}
.docs-side-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--text-2);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: all 120ms;
}
.docs-side-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.docs-side-item.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}
.docs-side-icon {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
}
.docs-side-item.active .docs-side-icon { background: rgba(255,255,255,0.10); color: var(--text); }
.docs-side-empty { padding: 20px 12px; font-size: 11px; color: var(--muted); text-align: center; }

.docs-main {
  min-width: 0;
  padding: 32px 40px;
  overflow-y: auto;
}
.docs-main::-webkit-scrollbar { width: 8px; }
.docs-main::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
.docs-main h1 {
  font-size: 30px; font-weight: 500; letter-spacing: -0.03em; margin-bottom: 12px;
}
.docs-main .lede {
  font-size: 14.5px; color: var(--text-2); line-height: 1.6; margin-bottom: 28px; max-width: 620px;
}
.docs-main h2 {
  font-size: 16px; font-weight: 500; letter-spacing: -0.015em;
  margin: 28px 0 10px; padding-top: 18px; border-top: 1px solid var(--line);
}
.docs-main h2:first-of-type { border-top: 0; padding-top: 0; }
.docs-main p { color: var(--text-2); line-height: 1.65; margin-bottom: 10px; font-size: 13.5px; }
.docs-main code.inl {
  font-family: var(--mono); font-size: 11.5px;
  padding: 1.5px 6px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 4px; color: var(--text);
}

.code-wrap {
  background: rgba(0,0,0,0.4); border: 1px solid var(--line);
  border-radius: 8px; margin: 12px 0; overflow: hidden;
}
.code-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 12px; background: rgba(0,0,0,0.3); border-bottom: 1px solid var(--line);
}
.code-lang { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); }
.code-copy {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 4px;
  padding: 3px 8px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px; transition: all 120ms;
}
.code-copy:hover { color: var(--text); border-color: var(--line-2); }
.code-copy.ok { color: var(--ok); border-color: oklch(78% 0.12 150 / 0.4); }
.code-block {
  font-family: var(--mono); font-size: 12px; line-height: 1.65;
  padding: 14px 16px; white-space: pre; overflow-x: auto; color: var(--text);
}

.docs-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 12.5px; }
.docs-table th, .docs-table td {
  text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line);
}
.docs-table th {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); font-weight: 500;
  background: rgba(255,255,255,0.02);
}
.docs-table td:first-child { font-family: var(--mono); font-size: 11.5px; color: var(--text); }
.docs-table td { color: var(--text-2); }

.callout {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--line); border-left: 2px solid var(--accent);
  border-radius: 6px; margin: 14px 0; font-size: 13px; color: var(--text-2); line-height: 1.6;
}
.callout strong { color: var(--text); font-weight: 600; }
.callout.warn { border-left-color: var(--warn); }

/* ==========================================================
   DASHBOARD — Finder window
   ========================================================== */
.page.dash-page-modal {
  max-width: none; width: 100%; padding: 80px 24px 130px; margin: 0;
  display: flex; align-items: flex-start; justify-content: center;
  min-height: 100vh;
}
.finder-window {
  width: 100%; max-width: 1240px; height: 720px; max-height: calc(100vh - 220px); min-height: 560px;
  background: rgba(18,18,18,0.78);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 1px 0 rgba(255,255,255,0.05) inset;
  display: flex; flex-direction: column; overflow: hidden;
}
.finder-chrome {
  display: grid; grid-template-columns: auto auto 1fr auto;
  align-items: center; gap: 14px;
  height: 44px; padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(34,34,34,0.6), rgba(20,20,20,0.4));
}
.finder-chrome-left { display: flex; gap: 8px; align-items: center; }
.finder-chrome-nav { display: flex; gap: 4px; }
.finder-nav-btn {
  width: 22px; height: 22px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted); cursor: pointer;
  display: grid; place-items: center;
  transition: all 120ms;
}
.finder-nav-btn:hover { color: var(--text); background: rgba(255,255,255,0.08); }
.finder-chrome-title {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12px; color: var(--text); font-weight: 500;
}
.finder-chrome-right { display: flex; align-items: center; gap: 8px; }
.finder-view-toggle {
  display: flex;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px;
}
.finder-view-toggle button {
  padding: 4px 8px;
  background: transparent;
  border: 0; border-radius: 4px;
  color: var(--muted); cursor: pointer;
  display: grid; place-items: center;
  transition: all 120ms;
}
.finder-view-toggle button.active {
  background: rgba(255,255,255,0.10); color: var(--text);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset;
}

.finder-body {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 220px 1fr 280px;
}

/* SIDEBAR */
.finder-sidebar {
  border-right: 1px solid var(--line);
  padding: 14px 10px;
  background: rgba(12,12,12,0.4);
  display: flex; flex-direction: column;
  overflow-y: auto;
  min-height: 0;
}
.finder-sidebar::-webkit-scrollbar { width: 6px; }
.finder-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 3px; }
.finder-sb-section { margin-bottom: 14px; }
.finder-sb-label {
  font-family: var(--mono); font-size: 9.5px;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--muted-2); padding: 4px 10px 6px;
}
.finder-user {
  display: flex; gap: 10px; align-items: center;
  padding: 8px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.finder-avatar {
  width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
  background: linear-gradient(135deg, #2a2a2a, #0e0e0e);
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 13px; color: var(--text); font-weight: 500;
}
.finder-uname { font-size: 12.5px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.finder-tier { font-size: 9.5px; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.06em; }

.finder-sb-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 6px 10px;
  font-size: 12.5px; color: var(--text-2);
  background: transparent; border: 0; border-radius: 6px;
  cursor: pointer; text-align: left; transition: all 120ms;
}
.finder-sb-item span:nth-child(2) { flex: 1; }
.finder-sb-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.finder-sb-item.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.finder-sb-count {
  font-size: 10px; color: var(--muted-2);
  padding: 1px 6px; background: rgba(255,255,255,0.05);
  border-radius: 999px;
}
.finder-sb-item.active .finder-sb-count { color: var(--text); background: rgba(255,255,255,0.10); }

.finder-sb-storage {
  margin-top: auto;
  padding: 12px 10px 8px;
  border-top: 1px dashed var(--line);
}
.finder-storage-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.finder-storage-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); }
.finder-storage-val { font-size: 10.5px; color: var(--text); }
.finder-storage-track {
  height: 4px; background: rgba(255,255,255,0.05);
  border-radius: 2px; overflow: hidden;
}
.finder-storage-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), oklch(76% 0.10 280));
  border-radius: 2px;
}
.finder-storage-foot { font-size: 9.5px; color: var(--muted); margin-top: 6px; }

/* MAIN */
.finder-main {
  min-width: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.finder-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,0.15);
}
.finder-breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 11.5px; }
.finder-bc-root { color: var(--text); text-transform: uppercase; letter-spacing: 0.06em; }
.finder-bc-sep { color: var(--muted-2); }
.finder-bc-count { color: var(--muted); }

/* list view */
.finder-list { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.finder-list-head {
  display: grid; grid-template-columns: 1fr 90px 100px 130px;
  gap: 16px; padding: 8px 16px;
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line);
}
.finder-list-body { flex: 1; min-height: 0; overflow-y: auto; }
.finder-list-body::-webkit-scrollbar { width: 8px; }
.finder-list-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
.finder-row {
  display: grid; grid-template-columns: 1fr 90px 100px 130px;
  gap: 16px; padding: 8px 16px;
  font-size: 12.5px; color: var(--text-2);
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.025);
  transition: background 100ms;
}
.finder-row:hover { background: rgba(255,255,255,0.025); }
.finder-row.selected {
  background: linear-gradient(180deg, rgba(120,120,255,0.12), rgba(80,80,200,0.06));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(120,140,255,0.18);
}
.finder-row-name {
  display: flex; align-items: center; gap: 9px;
  color: var(--text); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.finder-row-icon {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line); border-radius: 5px;
  color: var(--muted-2); flex-shrink: 0;
}
.finder-row.selected .finder-row-icon { color: var(--text); background: rgba(255,255,255,0.08); }
.finder-row-meta { color: var(--muted); font-size: 11px; align-self: center; }

/* grid view */
.finder-grid {
  flex: 1; overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px; padding: 16px;
}
.finder-grid::-webkit-scrollbar { width: 8px; }
.finder-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
.finder-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px; cursor: pointer;
  text-align: left;
  transition: all 140ms;
}
.finder-card:hover { background: rgba(255,255,255,0.05); border-color: var(--line-2); }
.finder-card.selected {
  background: linear-gradient(180deg, rgba(120,120,255,0.14), rgba(80,80,200,0.06));
  border-color: rgba(120,140,255,0.3);
}
.finder-card-thumb {
  aspect-ratio: 200/140; width: 100%;
  background: var(--bg-2);
  border-radius: 5px; overflow: hidden; margin-bottom: 8px;
}
.finder-thumb-svg, .finder-thumb-fallback { width: 100%; height: 100%; }
.finder-thumb-fallback {
  display: grid; place-items: center;
  font-size: 13px; color: var(--muted); letter-spacing: 0.06em;
}
.finder-card-name {
  font-size: 11.5px; color: var(--text); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.finder-card-meta { font-size: 9.5px; color: var(--muted); margin-top: 3px; }

.finder-empty {
  padding: 60px 20px; text-align: center; color: var(--muted);
}
.finder-empty .big { font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.finder-empty .small { font-size: 10.5px; }

/* INSPECTOR */
.finder-inspector {
  border-left: 1px solid var(--line);
  padding: 14px;
  background: rgba(12,12,12,0.4);
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 0;
}
.finder-inspector-thumb {
  aspect-ratio: 200/130; width: 100%;
  background: var(--bg-2);
  border-radius: 8px; overflow: hidden; margin-bottom: 10px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.finder-inspector-name { font-size: 12.5px; font-weight: 500; color: var(--text); word-break: break-all; line-height: 1.35; }
.finder-inspector-id { font-size: 10px; color: var(--muted); margin-top: 2px; }
.finder-inspector-section {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed var(--line);
  flex-shrink: 0;
}
.finder-inspector-label {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--muted-2); margin-bottom: 6px;
}
.finder-inspector-row {
  display: flex; justify-content: space-between;
  padding: 3px 0; font-size: 11px;
}
.finder-inspector-row span:first-child { color: var(--muted); }
.finder-inspector-row span:last-child { color: var(--text); font-size: 11px; }
.finder-inspector-url {
  font-size: 10.5px; color: var(--text-2); word-break: break-all;
  padding: 8px 10px; background: rgba(0,0,0,0.3);
  border: 1px solid var(--line); border-radius: 5px;
}
.finder-inspector-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; flex-shrink: 0; }
.finder-inspector-actions .btn { font-size: 10px; padding: 4px 8px; gap: 4px; }
.finder-inspector-actions .btn.danger { color: var(--err); border-color: rgba(239,68,68,0.25); }
.finder-inspector-actions .btn.danger:hover { background: rgba(239,68,68,0.08); }

.finder-apikey {
  padding: 8px 10px; background: rgba(0,0,0,0.3);
  border: 1px solid var(--line); border-radius: 5px;
  font-size: 10px; color: var(--text); word-break: break-all;
  line-height: 1.4;
}
.finder-apikey-actions { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.finder-apikey-btn {
  font-family: var(--mono); font-size: 10px;
  padding: 4px 8px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--line); border-radius: 4px;
  color: var(--text-2); cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  transition: all 120ms;
}
.finder-apikey-btn:hover { color: var(--text); background: rgba(255,255,255,0.07); border-color: var(--line-2); }

.finder-statusbar {
  display: flex; align-items: center; gap: 10px;
  height: 26px; padding: 0 14px;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,0.25);
  font-size: 10px; color: var(--text-2);
}
.finder-status-dot { color: var(--muted-2); }

@media (max-width: 1100px) {
  .finder-body { grid-template-columns: 200px 1fr; }
  .finder-inspector { display: none; }
}
@media (max-width: 900px) {
  .upload-shell { grid-template-columns: 1fr; gap: 32px; }
  .docs-body { grid-template-columns: 1fr; }
  .docs-side { display: none; }
  .finder-body { grid-template-columns: 1fr; }
  .finder-sidebar { display: none; }
}

/* ==========================================================
   Auth pages (login / register) — matte modal
   ========================================================== */
.auth-page {
  width: 100%;
  min-height: 100vh;
  padding: 80px 24px 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-window {
  width: 100%;
  max-width: 420px;
  background: rgba(18,18,18,0.78);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 1px 0 rgba(255,255,255,0.05) inset;
  overflow: hidden;
}
.auth-chrome {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 14px;
  height: 44px; padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(34,34,34,0.6), rgba(20,20,20,0.4));
}
.auth-chrome-left { display: flex; gap: 8px; }
.auth-chrome-title {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12px; color: var(--muted);
}
.auth-chrome-title .mono { color: var(--text); font-weight: 500; }
.auth-body { padding: 28px 26px 24px; }
.auth-title {
  font-size: 22px; font-weight: 500; letter-spacing: -0.025em;
  color: var(--text); margin-bottom: 6px;
}
.auth-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 22px; }
.auth-field { margin-bottom: 14px; }
.auth-field label {
  display: block; font-family: var(--mono);
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--muted-2); margin-bottom: 6px;
}
.auth-field input {
  width: 100%;
  padding: 10px 12px;
  font-size: 13.5px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: all 140ms;
}
.auth-field input:focus {
  border-color: var(--accent-3);
  background: rgba(0,0,0,0.5);
  box-shadow: 0 0 0 3px var(--accent-2);
}
.auth-field input::placeholder { color: var(--muted-2); }
.auth-error {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 10px 12px;
  background: oklch(70% 0.15 25 / 0.10);
  border: 1px solid oklch(70% 0.15 25 / 0.28);
  border-left: 2px solid var(--danger);
  border-radius: 6px;
  color: oklch(80% 0.13 25);
  font-size: 12.5px;
  margin-bottom: 14px;
}
.auth-switch {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.auth-switch a {
  color: var(--text);
  border-bottom: 1px dashed var(--line-3);
  cursor: pointer;
}
.auth-switch a:hover { color: var(--accent); border-bottom-color: var(--accent-3); }

/* ==========================================================
   Download page — matte window
   ========================================================== */
.dl-page {
  width: 100%;
  min-height: 100vh;
  padding: 80px 24px 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dl-window {
  width: 100%;
  max-width: 720px;
  background: rgba(18,18,18,0.78);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 1px 0 rgba(255,255,255,0.05) inset;
  overflow: hidden;
}
.dl-chrome {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 14px;
  height: 44px; padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(34,34,34,0.6), rgba(20,20,20,0.4));
}
.dl-chrome-left { display: flex; gap: 8px; }
.dl-chrome-title {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12px; color: var(--muted);
}
.dl-chrome-title .mono { color: var(--text); font-weight: 500; }
.dl-body {
  padding: 36px 28px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.dl-body > .card-state {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.dl-preview {
  background: rgba(0,0,0,0.30);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  width: 100%;
  max-width: 520px;
}
.dl-preview img,
.dl-preview video {
  max-width: 100%;
  max-height: 360px;
  border-radius: 6px;
}
.dl-icon {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.10);
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  position: relative;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3), 0 1px 0 rgba(255,255,255,0.05) inset;
}
.dl-icon::after {
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.15), transparent 40%);
  pointer-events: none;
  opacity: 0.3;
}
.dl-icon-ext {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text);
  text-transform: uppercase;
  font-weight: 500;
}
.dl-name {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 6px;
  word-break: break-all;
  max-width: 580px;
}
.dl-sub {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted-2);
  margin-bottom: 22px;
}
.dl-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
  width: 100%;
  max-width: 520px;
}
.dl-meta-cell {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  text-align: center;
}
.dl-meta-label {
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted-2);
  margin-bottom: 5px;
}
.dl-meta-value {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text);
  word-break: break-all;
}
.dl-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}
.dl-actions .btn { min-width: 140px; }
.dl-curl-wrap {
  width: 100%;
  max-width: 580px;
  margin-top: 18px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.30);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
  text-align: left;
  line-height: 1.55;
}
@media (max-width: 540px) {
  .dl-meta-grid { grid-template-columns: 1fr; }
}

/* ==========================================================
   Embed settings page — windowed, 2-pane (form + preview)
   ========================================================== */
.page.embed-page-modal {
  max-width: none; width: 100%;
  padding: 80px 24px 130px; margin: 0;
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
}
.embed-window {
  width: 100%; max-width: 1280px;
  background: rgba(18,18,18,0.78);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 1px 0 rgba(255,255,255,0.05) inset;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.embed-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  min-height: 0;
}
.embed-pane {
  padding: 22px 24px;
  overflow-y: auto;
  min-height: 0;
}
.embed-pane::-webkit-scrollbar { width: 6px; }
.embed-pane::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 3px; }
.embed-pane-form {
  border-right: 1px solid var(--line);
}
.embed-pane-preview {
  background: rgba(8,8,8,0.4);
}

.embed-section-head { margin-bottom: 18px; }
.embed-section-title {
  font-size: 18px; font-weight: 500;
  letter-spacing: -0.02em; color: var(--text);
  margin-bottom: 4px;
}
.embed-section-sub {
  font-size: 12px; color: var(--muted);
  line-height: 1.5; max-width: 540px;
}
.embed-section-divider {
  margin: 18px 0 10px;
  display: flex; align-items: center;
}

.embed-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.embed-field {
  display: flex; flex-direction: column;
  margin-bottom: 12px;
}
.embed-label {
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted-2);
  margin-bottom: 6px;
}
.embed-field input,
.embed-field textarea {
  width: 100%;
  padding: 9px 11px;
  font-size: 13px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: all 140ms;
  resize: vertical;
}
.embed-field textarea {
  font-family: inherit;
  line-height: 1.5;
  min-height: 70px;
}
.embed-field input:focus,
.embed-field textarea:focus {
  border-color: var(--accent-3);
  background: rgba(0,0,0,0.5);
  box-shadow: 0 0 0 3px var(--accent-2);
}
.embed-field input::placeholder,
.embed-field textarea::placeholder { color: var(--muted-2); }

/* accent inputs */
.embed-accent-row {
  display: flex; gap: 8px; align-items: stretch;
}
.embed-accent-row input[type="color"] {
  width: 42px; height: 38px; padding: 0;
  border: 1px solid var(--line); border-radius: 7px;
  background: transparent; cursor: pointer;
  flex-shrink: 0;
}
.embed-accent-row input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 5px; }
.embed-accent-row input[type="color"]::-moz-color-swatch { border: 0; border-radius: 5px; }
.embed-accent-row input[type="text"] { flex: 1; text-transform: uppercase; }

.embed-swatches {
  display: flex; gap: 8px;
  align-items: center;
  height: 38px;
}
.embed-swatch {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--swatch);
  border: 1px solid rgba(255,255,255,0.10);
  cursor: pointer;
  transition: all 140ms;
  position: relative;
  padding: 0;
}
.embed-swatch:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.25); }
.embed-swatch.active {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--swatch);
}

/* selectable option buttons (the chip-style toggles) */
.embed-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 6px;
}
.embed-option {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 12.5px;
  background: rgba(0,0,0,0.30);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-2);
  cursor: pointer;
  text-align: left;
  transition: all 140ms;
}
.embed-option:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--line-2);
  color: var(--text);
}
.embed-option-dot {
  width: 12px; height: 12px;
  border-radius: 4px;
  border: 1.5px solid var(--line-3);
  background: rgba(0,0,0,0.4);
  flex-shrink: 0;
  transition: all 140ms;
  position: relative;
}
.embed-option.active {
  color: var(--text);
  background: linear-gradient(180deg, rgba(167,139,250,0.10), rgba(167,139,250,0.04));
  border-color: var(--accent-3);
  box-shadow: 0 0 0 1px var(--accent-3) inset;
}
.embed-option.active .embed-option-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-2);
}
.embed-option.active .embed-option-dot::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 3px; height: 6px;
  border: solid #0a0a0a;
  border-width: 0 1.5px 1.5px 0;
}

/* placeholder tokens */
.embed-tokens {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-bottom: 6px;
}
.embed-token {
  font-size: 11px;
  padding: 4px 9px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 140ms;
}
.embed-token:hover {
  color: var(--accent);
  border-color: var(--accent-3);
  background: var(--accent-2);
}
.embed-tokens-hint {
  font-size: 10.5px;
  color: var(--muted-2);
  margin-bottom: 0;
}

.embed-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}

/* ── 1:1 Discord preview ── */
.embed-preview-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.embed-preview-sample-label {
  font-size: 9.5px; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--muted-2);
  padding: 3px 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.dc-surface {
  background: #313338;
  border: 1px solid #1e1f22;
  border-radius: 10px;
  padding: 16px;
  font-family: 'gg sans', 'Inter', system-ui, -apple-system, sans-serif;
  color: #dbdee1;
}
.dc-message { display: flex; gap: 12px; align-items: flex-start; }
.dc-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5865F2, #4752c4);
  display: grid; place-items: center;
  font-weight: 600; font-size: 16px; color: #fff;
  flex-shrink: 0;
}
.dc-msg-body { min-width: 0; flex: 1; }
.dc-msg-meta {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 4px;
}
.dc-username {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}
.dc-timestamp {
  font-size: 11px;
  color: #949ba4;
}
.dc-msg-text {
  color: #00a8fc;
  text-decoration: underline;
  font-size: 14px;
  word-break: break-all;
  margin-bottom: 6px;
  cursor: default;
}
.dc-embed {
  background: #2b2d31;
  border-radius: 4px;
  display: flex;
  max-width: 432px;
  overflow: hidden;
  margin-top: 4px;
  transition: opacity 160ms;
}
.dc-embed.disabled { opacity: 0.35; filter: grayscale(0.6); }
.dc-embed-stripe {
  width: 4px;
  flex-shrink: 0;
  background: #5B8DEF;
}
.dc-embed-content {
  padding: 8px 16px 16px 12px;
  min-width: 0;
  flex: 1;
}
.dc-embed-site {
  font-size: 12px;
  color: #dbdee1;
  margin-top: 8px;
  margin-bottom: 0;
}
.dc-embed-title {
  font-size: 16px;
  font-weight: 600;
  margin-top: 8px;
  line-height: 1.375;
  word-break: break-word;
}
.dc-embed-desc {
  font-size: 14px;
  color: #dbdee1;
  margin-top: 8px;
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap;
}
.dc-embed-image {
  margin-top: 16px;
  width: 100%;
  aspect-ratio: 1200 / 630;
  border-radius: 4px;
  background: #1e1f22;
  background-size: cover;
  background-position: center;
}
.dc-followup {
  margin-top: 10px;
  font-size: 14px;
  color: #dbdee1;
}

.embed-preview-foot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 10.5px;
  color: var(--muted-2);
  line-height: 1.6;
}
.embed-preview-foot p { margin: 0; }

@media (max-width: 1100px) {
  .embed-body { grid-template-columns: 1fr; }
  .embed-pane-form { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .embed-fields-grid { grid-template-columns: 1fr; }
  .embed-options { grid-template-columns: 1fr; }
}
