/* ───────────────────────────────────────────────────────────────────
   my little content host — interface styles
   Dark, warm-neutral surfaces with an amber accent taken from the app icon.
   ─────────────────────────────────────────────────────────────────── */

:root {
  --bg: #0b0b0d;
  --bg-elev: #111114;
  --surface: #16161a;
  --surface-2: #1d1d22;
  --surface-3: #26262d;
  --surface-4: #303038;
  --border: rgba(255, 255, 255, .07);
  --border-strong: rgba(255, 255, 255, .13);

  --text: #f3f1ec;
  --text-2: #bcb9b1;
  --muted: #8a877f;
  --faint: #5e5c57;

  --accent: #ffb547;
  --accent-strong: #ff9d1f;
  --accent-ink: #1d1404;
  --accent-soft: rgba(255, 181, 71, .12);
  --accent-line: rgba(255, 181, 71, .35);

  --ok: #4fd18b;
  --ok-soft: rgba(79, 209, 139, .12);
  --warn: #f5c04a;
  --warn-soft: rgba(245, 192, 74, .12);
  --danger: #ff6464;
  --danger-soft: rgba(255, 100, 100, .12);
  --info: #86a8ff;
  --info-soft: rgba(134, 168, 255, .12);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  --shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .25);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .55), 0 6px 18px rgba(0, 0, 0, .35);

  --sidebar-w: 268px;
  --topbar-h: 64px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img, video { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

* { scrollbar-width: thin; scrollbar-color: var(--surface-4) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--surface-4); }
::-webkit-scrollbar-track { background: transparent; }

/* ── Primitives ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text);
  font-weight: 550; font-size: 13.5px; letter-spacing: .005em; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .1s, opacity .15s;
  user-select: none;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger-soft); border-color: rgba(255, 100, 100, .25); color: var(--danger); }
.btn-danger:hover { background: rgba(255, 100, 100, .2); }
.btn-ok { background: var(--ok-soft); border-color: rgba(79, 209, 139, .25); color: var(--ok); }
.btn-ok:hover { background: rgba(79, 209, 139, .2); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: var(--text-2);
  position: relative; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.is-active { color: var(--accent); background: var(--accent-soft); }
.icon-btn.bordered { border-color: var(--border-strong); background: var(--surface); }

.input, .select, textarea.input {
  width: 100%; height: 40px; padding: 0 12px;
  background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: 10px;
  color: var(--text); transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input::placeholder, textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, textarea.input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a877f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.select option { background: var(--surface); }
.field { display: grid; gap: 6px; }
.field + .field { margin-top: 14px; }
.label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.help { font-size: 12px; color: var(--muted); line-height: 1.45; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-weight: 650; letter-spacing: .02em; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.pill svg { width: 12px; height: 12px; }
.pill-accent { background: var(--accent-soft); color: var(--accent); }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-info { background: var(--info-soft); color: var(--info); }
.admin-tag { display: inline-flex; align-items: center; height: 17px; padding: 0 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); font-size: 9.5px; font-weight: 800; letter-spacing: .08em; vertical-align: 1px; }

.count-badge {
  position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 750; line-height: 1;
  box-shadow: 0 0 0 2px var(--bg-elev);
}
.inline-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--danger); color: #fff; font-size: 11px; font-weight: 750; margin-left: auto; }

.avatar {
  --size: 34px;
  position: relative; width: var(--size); height: var(--size); flex: 0 0 var(--size);
  border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, #3a2a12, #5a3d10); color: var(--accent);
  font-size: calc(var(--size) * .36); font-weight: 750; letter-spacing: .02em;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { --size: 28px; }
.avatar-lg { --size: 84px; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--surface-4); border-top-color: var(--accent); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.meter { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .5s var(--ease); }
.meter.warn > span { background: var(--warn); }
.meter.crit > span { background: var(--danger); }

.notice { padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45; border: 1px solid; }
.notice-bad { background: var(--danger-soft); border-color: rgba(255, 100, 100, .25); color: #ffb3b3; }
.notice-ok { background: var(--ok-soft); border-color: rgba(79, 209, 139, .25); color: #a9efc8; }
.notice-info { background: var(--surface-2); border-color: var(--border-strong); color: var(--text-2); }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 32px;
  background: linear-gradient(140deg, #ffcf7a, #ff9d1f); color: var(--accent-ink);
  box-shadow: 0 6px 18px rgba(255, 157, 31, .25), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-name { font-size: 15px; line-height: 1.1; }
.brand-name small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 2px; }

/* ── Auth ─────────────────────────────────────────────────────────── */
.auth {
  height: 100dvh; overflow-y: auto;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr);
}
.auth-art {
  position: relative; overflow: hidden; padding: 44px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(255, 181, 71, .16), transparent 60%),
    radial-gradient(700px 600px at 90% 90%, rgba(255, 120, 40, .10), transparent 60%),
    var(--bg-elev);
  border-right: 1px solid var(--border);
}
.auth-art h1 { font-size: clamp(34px, 4.2vw, 58px); line-height: 1.02; letter-spacing: -.035em; margin: 0 0 16px; font-weight: 750; max-width: 12ch; }
.auth-art h1 em { font-style: normal; color: var(--accent); }
.auth-art p { margin: 0; color: var(--text-2); font-size: 16px; max-width: 42ch; }
.auth-collage { position: absolute; right: -40px; top: 50%; transform: translateY(-50%) rotate(-8deg); display: grid; grid-template-columns: repeat(3, 130px); gap: 14px; opacity: .9; pointer-events: none; }
.auth-tile { height: 160px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--border-strong); display: grid; place-items: center; color: var(--faint); box-shadow: var(--shadow); }
.auth-tile svg { width: 34px; height: 34px; }
.auth-tile:nth-child(2) { transform: translateY(40px); background: linear-gradient(160deg, #2a2116, #1d1d22); color: var(--accent); }
.auth-tile:nth-child(4) { transform: translateY(-30px); }
.auth-tile:nth-child(5) { background: linear-gradient(160deg, #1d1d22, #2b1d12); color: #ff9d1f; transform: translateY(10px); }
.auth-art-copy { position: relative; z-index: 1; max-width: 560px; }
.auth-foot { position: relative; z-index: 1; color: var(--faint); font-size: 12.5px; }

.auth-panel { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .brand { margin-bottom: 34px; }
.auth-card h2 { font-size: 26px; letter-spacing: -.02em; margin: 0 0 6px; }
.auth-card .lede { margin: 0 0 24px; color: var(--muted); }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 22px; }
.seg button { height: 36px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); font-weight: 600; }
.seg button.is-active { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.auth-form { display: grid; gap: 14px; }
.auth-form .btn-lg { margin-top: 6px; }
.lock-card { margin-top: 16px; padding: 16px; border-radius: 14px; background: var(--danger-soft); border: 1px solid rgba(255, 100, 100, .3); }
.lock-card strong { display: block; color: var(--danger); font-size: 11px; letter-spacing: .12em; margin-bottom: 4px; }
.lock-card h3 { margin: 0 0 6px; font-size: 16px; }
.lock-card p { margin: 0; color: #ffc9c9; white-space: pre-wrap; }

/* ── App shell ───────────────────────────────────────────────────── */
.app { height: 100dvh; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }

.sidebar {
  background: var(--bg-elev); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; min-height: 0; z-index: 40;
}
.sidebar-head { padding: 16px 16px 10px; display: flex; align-items: center; gap: 8px; }
.sidebar-head .brand { flex: 1; min-width: 0; }
.sidebar-close { display: none; }
.nav { padding: 6px 10px; display: grid; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px;
  border-radius: 10px; border: 0; background: transparent; color: var(--text-2);
  font-weight: 550; text-align: left; width: 100%; position: relative;
}
.nav-item svg { width: 19px; height: 19px; color: var(--muted); }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.is-active { background: var(--surface-2); color: var(--text); }
.nav-item.is-active svg { color: var(--accent); }

.side-section { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 6px 22px; }
.side-section span { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.side-section .icon-btn { width: 30px; height: 30px; }
.side-section .icon-btn svg { width: 17px; height: 17px; }

.tree { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 10px 12px; }
.tree-row {
  display: flex; align-items: center; gap: 6px; height: 34px; padding-right: 6px;
  border-radius: 8px; color: var(--text-2); cursor: pointer; user-select: none; position: relative;
}
.tree-row:hover { background: var(--surface); color: var(--text); }
.tree-row.is-active { background: var(--accent-soft); color: var(--text); }
.tree-row.is-active .tree-icon { color: var(--accent); }
.tree-row.drop-target { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.tree-twisty { width: 22px; height: 22px; display: grid; place-items: center; border: 0; background: transparent; color: var(--faint); border-radius: 6px; padding: 0; }
.tree-twisty svg { width: 14px; height: 14px; transition: transform .15s; }
.tree-twisty.is-open svg { transform: rotate(90deg); }
.tree-twisty:hover { color: var(--text); background: var(--surface-3); }
.tree-twisty.is-empty { visibility: hidden; }
.tree-icon { width: 17px; height: 17px; color: var(--muted); }
.tree-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.tree-tag { font-size: 10px; color: var(--faint); font-weight: 650; }
.tree-group { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 14px 12px 6px; }

.sidebar-foot { border-top: 1px solid var(--border); padding: 12px; display: grid; gap: 10px; }
.storage-card { display: block; width: 100%; text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.storage-card:hover { border-color: var(--border-strong); }
.storage-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 12.5px; }
.storage-top strong { font-weight: 650; }
.storage-top span { color: var(--muted); }
.storage-sub { margin-top: 7px; font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; }
.account-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; border-radius: 12px; border: 0; background: transparent; text-align: left; }
.account-btn:hover { background: var(--surface); }
.account-meta { flex: 1; min-width: 0; }
.account-name { font-weight: 650; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-btn > svg { width: 18px; height: 18px; color: var(--muted); }

.drawer-backdrop { display: none; }

.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; }
.topbar {
  flex: 0 0 auto; min-height: var(--topbar-h);
  display: flex; align-items: center; gap: 10px; padding: 12px 22px;
  border-bottom: 1px solid var(--border); background: rgba(11, 11, 13, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  position: relative; z-index: 20;
}
.topbar-menu { display: none; }
.crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; overflow: hidden; }
.crumb { border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 15px; padding: 5px 8px; border-radius: 8px; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.crumb:hover { background: var(--surface); color: var(--text); }
.crumb.is-current { color: var(--text); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.crumb-sep { color: var(--faint); flex: 0 0 auto; }
.crumb-sep svg { width: 14px; height: 14px; display: block; }
.crumb-ellipsis { color: var(--faint); padding: 0 4px; }
.mobile-title { display: none; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.search { position: relative; width: 260px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search .input { padding-left: 34px; height: 38px; background: var(--surface); }
.search .input::-webkit-search-cancel-button { filter: invert(.6); }

.toolbar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 22px; border-bottom: 1px solid var(--border);
}
.toolbar .meta { color: var(--muted); font-size: 12.5px; margin-right: auto; display: flex; align-items: center; gap: 8px; }
.toolbar .select { width: auto; height: 34px; font-size: 13px; background-color: var(--surface); }
.view-toggle { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.view-toggle button { width: 30px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--muted); }
.view-toggle button svg { width: 16px; height: 16px; }
.view-toggle button.is-active { background: var(--surface-3); color: var(--text); }
.loop-pref { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 12.5px; cursor: pointer; user-select: none; }
.loop-pref input { display: none; }
.switch { width: 28px; height: 16px; border-radius: 999px; background: var(--surface-4); position: relative; transition: background .2s; flex: 0 0 auto; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #ddd; transition: transform .2s var(--ease); }
input:checked + .switch { background: var(--accent); }
input:checked + .switch::after { transform: translateX(12px); background: var(--accent-ink); }

.scroller { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.content { padding: 20px 22px 40px; }
.readonly-banner { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; padding: 10px 14px; border-radius: 12px; background: var(--info-soft); color: #c4d3ff; font-size: 13px; border: 1px solid rgba(134, 168, 255, .25); }
.readonly-banner svg { width: 18px; height: 18px; }

.section-label { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin: 4px 2px 10px; }
.section-label + .grid { margin-bottom: 26px; }

/* ── File grid ───────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); gap: 16px; }
.folder-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }

.folder-card {
  display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 10px 12px 14px;
  border-radius: 14px; border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; position: relative; transition: border-color .15s, background .15s, transform .15s;
  user-select: none;
}
.folder-card:hover { border-color: var(--border-strong); background: var(--surface-2); }
.folder-card.is-selected { border-color: var(--accent-line); background: var(--accent-soft); }
.folder-card.drop-target { border-color: var(--accent); background: var(--accent-soft); }
.folder-glyph { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: 0 0 38px; }
.folder-glyph svg { width: 20px; height: 20px; }
.folder-glyph.shared { background: var(--info-soft); color: var(--info); }
.folder-text { flex: 1; min-width: 0; }
.folder-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.card {
  min-width: 0; position: relative; border-radius: 14px; cursor: pointer;
  user-select: none; -webkit-user-select: none;
  animation: rise .35s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.thumb {
  position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .15s, box-shadow .2s, transform .2s var(--ease);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease), opacity .3s; }
.thumb img.is-loading { opacity: 0; }
.card:hover .thumb { border-color: var(--border-strong); box-shadow: var(--shadow); }
.card:hover .thumb img { transform: scale(1.03); }
.card.is-selected .thumb { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.thumb-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); }
.thumb-placeholder svg { width: 38px; height: 38px; }
.thumb-placeholder.pdf { background: linear-gradient(160deg, #2a1a1a, #1a1416); color: #ff8a7a; }
.thumb-placeholder.text { background: linear-gradient(160deg, #1a1f2a, #15171d); color: var(--info); }
.thumb-placeholder.video { background: linear-gradient(160deg, #22201b, #16161a); color: var(--accent); }
.thumb-placeholder.image { background: linear-gradient(160deg, #1c2420, #16161a); color: var(--ok); }
.thumb-placeholder .ext { position: absolute; bottom: 12px; font: 700 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.thumb-shade { position: absolute; inset: auto 0 0 0; height: 50%; background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent); pointer-events: none; opacity: .9; }
.thumb-badges { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 5px; flex-wrap: wrap; right: 8px; pointer-events: none; }
.thumb-badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 7px; background: rgba(10, 10, 12, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #eee; font-size: 11px; font-weight: 650; }
.thumb-badge svg { width: 12px; height: 12px; }
.thumb-badge.accent { color: var(--accent); }
.play-chip { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; display: grid; place-items: center; background: rgba(10, 10, 12, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; opacity: 0; transform: scale(.9); transition: opacity .2s, transform .2s var(--ease); pointer-events: none; }
.play-chip svg { width: 18px; height: 18px; margin-left: 2px; }
.card:hover .play-chip { opacity: 1; transform: none; }

.card-check, .folder-check {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(10, 10, 12, .6); border: 1.5px solid rgba(255, 255, 255, .55); color: transparent;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .15s, background .15s; padding: 0;
}
.folder-check { position: static; flex: 0 0 26px; background: var(--surface-3); border-color: var(--border-strong); display: none; }
.card-check svg, .folder-check svg { width: 15px; height: 15px; }
.card:hover .card-check { opacity: 1; }
.selecting .card-check { opacity: 1; }
.selecting .folder-check { display: grid; }
.is-selected .card-check, .is-selected .folder-check { opacity: 1; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.card-menu {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 30px; height: 30px; border-radius: 9px; border: 0; display: grid; place-items: center;
  background: rgba(10, 10, 12, .6); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .15s, background .15s;
}
.card-menu svg { width: 18px; height: 18px; }
.card-menu:hover { background: rgba(10, 10, 12, .85); }
.card:hover .card-menu, .card-menu:focus-visible { opacity: 1; }
.folder-card .card-menu { position: static; opacity: .65; background: transparent; color: var(--text-2); backdrop-filter: none; }
.folder-card:hover .card-menu { opacity: 1; }
.folder-card .card-menu:hover { background: var(--surface-3); }
.selecting .card-menu { display: none; }

.card-body { padding: 9px 3px 0; }
.card-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { margin-top: 2px; font-size: 12px; color: var(--muted); display: flex; gap: 6px; white-space: nowrap; overflow: hidden; }
.card-sub span + span::before { content: "·"; margin-right: 6px; color: var(--faint); }
.card-owner { margin-top: 3px; font-size: 11.5px; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* list view */
.view-list .grid.media-grid { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.view-list .media-grid .card { display: grid; grid-template-columns: 30px 56px minmax(0, 1fr) 110px 90px 110px 36px; align-items: center; gap: 14px; padding: 8px 12px; border-radius: 0; border-bottom: 1px solid var(--border); animation: none; }
.view-list .media-grid .card:last-child { border-bottom: 0; }
.view-list .media-grid .card:hover { background: var(--surface); }
.view-list .media-grid .card.is-selected { background: var(--accent-soft); }
.view-list .media-grid .thumb { aspect-ratio: 1; width: 56px; height: 42px; border-radius: 8px; grid-column: 2; }
.view-list .media-grid .card:hover .thumb { box-shadow: none; }
.view-list .media-grid .card:hover .thumb img { transform: none; }
.view-list .media-grid .thumb-badges, .view-list .media-grid .thumb-shade, .view-list .media-grid .play-chip { display: none; }
.view-list .media-grid .thumb-placeholder svg { width: 20px; height: 20px; }
.view-list .media-grid .thumb-placeholder .ext { display: none; }
.view-list .media-grid .card-check { position: static; opacity: 1; grid-column: 1; grid-row: 1; background: transparent; border-color: var(--border-strong); width: 22px; height: 22px; border-radius: 6px; }
.view-list .media-grid .card-body { padding: 0; grid-column: 3; display: flex; flex-direction: column; min-width: 0; }
.view-list .media-grid .card-sub { display: none; }
.view-list .media-grid .list-col { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.view-list .media-grid .card-menu { position: static; opacity: 1; background: transparent; color: var(--text-2); backdrop-filter: none; grid-column: 7; }
.view-list .media-grid .card-menu:hover { background: var(--surface-3); }
.list-col { display: none; }
.list-head { display: none; }
.view-list .list-head { display: grid; grid-template-columns: 30px 56px minmax(0, 1fr) 110px 90px 110px 36px; gap: 14px; padding: 0 12px 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.view-list .list-head span:nth-child(1) { grid-column: 3; }

.load-more { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 0 6px; color: var(--muted); font-size: 12.5px; }
.empty {
  display: grid; justify-items: center; text-align: center; gap: 8px;
  padding: 70px 20px; color: var(--muted);
}
.empty-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--accent); margin-bottom: 8px; }
.empty-icon svg { width: 28px; height: 28px; }
.empty h3 { margin: 0; color: var(--text); font-size: 17px; }
.empty p { margin: 0 0 10px; max-width: 36ch; }

.skeleton { border-radius: 14px; background: linear-gradient(100deg, var(--surface) 40%, var(--surface-2) 50%, var(--surface) 60%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.skeleton-card .thumb { border: 0; }

/* ── Selection bar ───────────────────────────────────────────────── */
.selection-bar {
  position: absolute; left: 50%; bottom: 22px; transform: translate(-50%, 140%);
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px;
  border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg); z-index: 30; transition: transform .3s var(--ease);
  max-width: calc(100% - 24px);
}
.selection-bar.is-open { transform: translate(-50%, 0); }
.selection-bar .count { font-weight: 650; margin-right: 6px; white-space: nowrap; }
.selection-bar .divider { width: 1px; height: 22px; background: var(--border-strong); margin: 0 2px; }

/* ── Drop overlay ────────────────────────────────────────────────── */
.drop-overlay {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  background: rgba(11, 11, 13, .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.drop-overlay.is-open { opacity: 1; }
.drop-box { width: min(560px, calc(100% - 40px)); padding: 54px 30px; border-radius: 26px; text-align: center; border: 2px dashed var(--accent-line); background: var(--accent-soft); }
.drop-box svg { width: 44px; height: 44px; color: var(--accent); margin: 0 auto 14px; }
.drop-box h3 { margin: 0 0 6px; font-size: 20px; }
.drop-box p { margin: 0; color: var(--text-2); }

/* ── Upload tray ─────────────────────────────────────────────────── */
.upload-tray {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 360px; max-width: calc(100vw - 24px);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px;
  box-shadow: var(--shadow-lg); overflow: hidden; animation: rise .3s var(--ease);
}
.upload-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 16px; border-bottom: 1px solid var(--border); }
.upload-head strong { flex: 1; font-size: 13.5px; }
.upload-head .icon-btn { width: 30px; height: 30px; }
.upload-head .icon-btn svg { width: 17px; height: 17px; }
.upload-overall { height: 3px; background: var(--surface-3); }
.upload-overall > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.upload-list { max-height: 260px; overflow-y: auto; padding: 6px; }
.upload-tray.is-collapsed .upload-list { display: none; }
.upload-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.upload-item:hover { background: var(--surface-2); }
.upload-item .ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.upload-item .ico svg { width: 15px; height: 15px; }
.upload-name { font-size: 13px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-status { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-item.is-error .upload-status { color: var(--danger); white-space: normal; }
.upload-item.is-done .ico { background: var(--ok-soft); color: var(--ok); }
.upload-item.is-error .ico { background: var(--danger-soft); color: var(--danger); }
.upload-item .meter { height: 4px; margin-top: 5px; }
.upload-item .pct { font: 600 11.5px var(--mono); color: var(--text-2); }

/* ── Toasts ──────────────────────────────────────────────────────── */
.toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(420px, calc(100vw - 24px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 12px 14px;
  border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg);
  animation: toastIn .3s var(--ease);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
.toast.is-leaving { animation: toastOut .2s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px); } }
.toast-icon { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; flex: 0 0 22px; background: var(--surface-4); color: var(--text); margin-top: 1px; }
.toast-icon svg { width: 13px; height: 13px; }
.toast.ok .toast-icon { background: var(--ok-soft); color: var(--ok); }
.toast.bad .toast-icon { background: var(--danger-soft); color: var(--danger); }
.toast.msg .toast-icon { background: var(--accent-soft); color: var(--accent); }
.toast-body { flex: 1; min-width: 0; font-size: 13.5px; }
.toast-body strong { display: block; font-weight: 650; }
.toast-body span { display: block; color: var(--text-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.toast-main { border: 0; background: transparent; padding: 0; text-align: left; flex: 1; min-width: 0; display: flex; gap: 10px; }
.toast .icon-btn { width: 26px; height: 26px; margin: -2px -2px 0 0; }
.toast .icon-btn svg { width: 14px; height: 14px; }

/* ── Layers: dialogs, sheets, menus ─────────────────────────────── */
.layer {
  position: fixed; inset: 0; z-index: 130;
  display: grid; place-items: center; padding: 24px;
  background: rgba(5, 5, 7, .62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: fadeIn .18s ease;
}
.layer.is-leaving { animation: fadeOut .16s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
.dialog {
  width: min(520px, 100%); max-height: min(780px, calc(100dvh - 48px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); animation: pop .24s var(--ease);
}
.layer.is-leaving .dialog { animation: popOut .16s ease forwards; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes popOut { to { opacity: 0; transform: translateY(6px) scale(.98); } }
.dialog-wide { width: min(980px, 100%); }
.dialog-mid { width: min(680px, 100%); }
.dialog-tall { height: min(780px, calc(100dvh - 48px)); }
.dialog-grip { display: none; }
.dialog-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 14px 24px; }
.dialog-head h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.dialog-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.dialog-head > div { flex: 1; min-width: 0; }
.dialog-head .icon-btn { margin: -4px -4px 0 0; }
.dialog-body { padding: 4px 24px 20px; overflow-y: auto; flex: 1; min-height: 0; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--bg-elev); flex-wrap: wrap; }
.dialog-foot .spacer { margin-right: auto; }
.confirm-text { color: var(--text-2); margin: 0; white-space: pre-wrap; }

.menu {
  position: fixed; z-index: 110; min-width: 220px; max-width: 300px; padding: 6px;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 14px;
  box-shadow: var(--shadow-lg); animation: pop .16s var(--ease);
}
.menu-layer { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; display: block; padding: 0; }
.menu-title { padding: 8px 10px 8px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu-item { display: flex; align-items: center; gap: 11px; width: 100%; height: 38px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font-size: 13.5px; text-align: left; }
.menu-item svg { width: 17px; height: 17px; color: var(--muted); }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-3); outline: none; }
.menu-item.danger { color: var(--danger); }
.menu-item.danger svg { color: var(--danger); }
.menu-item .menu-hint { margin-left: auto; font-size: 11.5px; color: var(--faint); }
.menu-sep { height: 1px; background: var(--border); margin: 5px 4px; }

/* folder picker */
.picker { display: grid; gap: 2px; max-height: 50dvh; overflow-y: auto; margin: 0 -8px; padding: 0 8px; }
.picker-row { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 10px; border: 0; background: transparent; text-align: left; width: 100%; color: var(--text-2); }
.picker-row svg { width: 17px; height: 17px; color: var(--muted); }
.picker-row:hover { background: var(--surface-2); color: var(--text); }
.picker-row.is-active { background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent-line); }
.picker-row.is-active svg { color: var(--accent); }
.picker-row:disabled { opacity: .35; pointer-events: none; }
.picker-row .tree-name { font-size: 14px; }

/* share dialog */
.share-everyone { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--bg-elev); cursor: pointer; margin-bottom: 14px; }
.share-everyone input { display: none; }
.share-everyone .switch { margin-top: 2px; }
.share-everyone strong { display: block; }
.share-everyone small { color: var(--muted); font-size: 12.5px; }
.people { display: grid; gap: 2px; }
.person { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.person:hover { background: var(--surface-2); }
.person input { display: none; }
.person-text { flex: 1; min-width: 0; }
.person-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tick { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; color: transparent; flex: 0 0 22px; transition: background .15s, border-color .15s; }
.tick svg { width: 14px; height: 14px; }
input:checked + .tick { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* profile */
.profile-hero { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.profile-hero .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.subhead { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 24px 0 10px; padding-top: 18px; border-top: 1px solid var(--border); }

/* storage */
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 14px; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--border); min-width: 0; }
.stat-label { font-size: 11.5px; font-weight: 650; color: var(--muted); }
.stat-value { font-size: 22px; font-weight: 750; letter-spacing: -.02em; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-sub { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.tier-list { display: grid; gap: 8px; margin-top: 16px; }
.tier-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-elev); }
.tier-row.is-current { border-color: var(--accent-line); background: var(--accent-soft); }
.tier-row strong { flex: 1; }
.tier-row span { font: 600 13px var(--mono); color: var(--text-2); }

/* ── Viewer ──────────────────────────────────────────────────────── */
.viewer { position: fixed; inset: 0; z-index: 120; background: #050506; display: flex; flex-direction: column; animation: fadeIn .2s ease; }
.viewer.is-leaving { animation: fadeOut .16s ease forwards; }
.viewer-bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; padding-top: calc(12px + var(--safe-t)); background: linear-gradient(to bottom, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0)); position: relative; z-index: 2; }
.viewer-title { flex: 1; min-width: 0; }
.viewer-title strong { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-title span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-actions { display: flex; gap: 4px; align-items: center; }
.viewer .icon-btn { color: #ddd; }
.viewer .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.viewer-stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; padding: 0 70px 20px; touch-action: pan-y pinch-zoom; }
/* Media is absolutely centred and capped to the stage on both axes, so tall
   images and portrait videos shrink to fit instead of spilling off screen,
   and small files are never stretched beyond their real size. */
.viewer-stage > img, .viewer-stage > video {
  position: absolute; top: 0; bottom: 20px; left: 70px; right: 70px; margin: auto;
  width: auto; height: auto; max-width: calc(100% - 140px); max-height: calc(100% - 20px);
  object-fit: contain; border-radius: 6px; background: #000;
}
.viewer-stage > iframe { width: min(1100px, 100%); height: 100%; border: 0; border-radius: 10px; background: #fff; }
.viewer-stage .editor { width: min(1100px, 100%); height: 100%; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; border: 1px solid var(--border-strong); background: var(--bg-elev); }
.editor textarea { flex: 1; border: 0; resize: none; padding: 18px 20px; background: transparent; color: var(--text); font: 13px/1.65 var(--mono); tab-size: 2; outline: none; }
.editor-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.editor-bar span { margin-right: auto; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .12); background: rgba(20, 20, 24, .7); color: #fff; display: grid; place-items: center; z-index: 2; transition: background .15s; }
.viewer-nav:hover { background: rgba(40, 40, 46, .9); }
.viewer-nav svg { width: 22px; height: 22px; }
.viewer-nav.prev { left: 14px; }
.viewer-nav.next { right: 14px; }
.viewer-foot { display: flex; justify-content: center; gap: 14px; padding: 0 14px calc(12px + var(--safe-b)); font: 600 12px var(--mono); color: var(--faint); }
.viewer-foot kbd { font: inherit; padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); color: var(--muted); }
.viewer-loading { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.viewer-error { color: var(--muted); text-align: center; }

/* ── Chat ────────────────────────────────────────────────────────── */
.chat { display: grid; grid-template-columns: 280px minmax(0, 1fr); flex: 1; min-height: 0; border-top: 1px solid var(--border); }
.chat-side { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; background: var(--bg-elev); }
.chat-side .search { width: auto; margin: 12px; }
.chat-people { flex: 1; overflow-y: auto; padding: 0 8px 10px; }
.chat-person { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 12px; border: 0; background: transparent; text-align: left; }
.chat-person:hover { background: var(--surface); }
.chat-person.is-active { background: var(--surface-2); }
.chat-person .person-text { flex: 1; min-width: 0; }
.chat-person .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: 0 0 9px; }
.chat-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.chat-back { display: none; }
.chat-messages { flex: 1; overflow-y: auto; padding: 18px 18px 10px; display: flex; flex-direction: column; gap: 4px; }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.bubble { padding: 9px 13px; border-radius: 16px 16px 16px 5px; background: var(--surface-2); border: 1px solid var(--border); font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.msg.mine .bubble { background: var(--accent); color: var(--accent-ink); border-color: transparent; border-radius: 16px 16px 5px 16px; }
.msg-time { font-size: 11px; color: var(--faint); margin: 3px 4px 8px; }
.chat-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--border); padding-bottom: calc(10px + var(--safe-b)); }
.chat-compose textarea { flex: 1; min-height: 42px; max-height: 140px; height: 42px; resize: none; padding: 10px 14px; border-radius: 14px; }
.chat-compose .btn { height: 42px; width: 42px; padding: 0; border-radius: 14px; }
.chat-note { display: flex; align-items: center; gap: 6px; padding: 0 16px 10px; font-size: 11.5px; color: var(--faint); }
.chat-note::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.chat-empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px; }

/* ── Admin ───────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; padding: 0 20px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; height: 42px; padding: 0 12px; border: 0; background: transparent; color: var(--muted); font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); }
.tab.is-active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.tab .inline-badge { margin-left: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg-elev); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .select { height: 32px; width: auto; font-size: 12.5px; }
.cell-user { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.cell-user strong { display: block; font-weight: 600; }
.cell-user small { display: block; color: var(--muted); font-size: 12px; }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; }
.mini-meter { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.mini-meter .meter { flex: 1; }
.mini-meter span { font: 600 11.5px var(--mono); color: var(--muted); white-space: nowrap; }
.request-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-elev); flex-wrap: wrap; }
.request-card + .request-card { margin-top: 8px; }
.request-card .person-text { min-width: 180px; }
.request-card .actions { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.request-card .select { width: auto; height: 34px; }
.admin-note { color: var(--muted); font-size: 12.5px; margin: 0 0 12px; }

/* ── Tracker ─────────────────────────────────────────────────────── */
.tracker { padding: 24px 22px 60px; max-width: 1180px; margin: 0 auto; }
.tracker-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: end; margin-bottom: 22px; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.eyebrow svg { width: 14px; height: 14px; }
.tracker-hero h1 { margin: 0 0 6px; font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.03em; line-height: 1.05; }
.tracker-hero p { margin: 0; color: var(--muted); max-width: 60ch; }
.tracker-summary { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.summary-card { padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); min-width: 0; }
.summary-card.feature { background: radial-gradient(400px 200px at 0% 0%, rgba(255, 181, 71, .18), transparent 70%), var(--surface); border-color: var(--accent-line); }
.summary-label { font-size: 12px; font-weight: 650; color: var(--muted); }
.summary-value { font-size: 30px; font-weight: 780; letter-spacing: -.03em; margin-top: 6px; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summary-card.feature .summary-value { font-size: 40px; color: var(--accent); }
.summary-sub { font-size: 12px; color: var(--faint); margin-top: 6px; }
.volume-strip { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 18px; }
.volume-strip .lead { display: flex; flex-direction: column; justify-content: center; padding: 0 10px 0 4px; min-width: 150px; }
.volume-strip .lead strong { font-size: 14px; }
.volume-strip .lead span { font-size: 12px; color: var(--muted); }
.vol { padding: 12px 14px; border-radius: 12px; background: var(--bg-elev); border: 1px solid var(--border); }
.vol-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); font-weight: 650; }
.vol-top strong { font-size: 20px; color: var(--text); }
.vol .meter { margin-top: 8px; height: 5px; }
.tracker-grid { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.panel { border-radius: 20px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.panel-head h3 { margin: 0; font-size: 15px; flex: 1; }
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.panel-head > div { flex: 1; min-width: 0; }
.panel-body { padding: 18px; }
.timer { text-align: center; padding: 26px 10px 22px; border-radius: 18px; background: var(--bg-elev); border: 1px solid var(--border); margin-bottom: 14px; position: relative; overflow: hidden; }
.timer.is-live { border-color: var(--accent-line); background: radial-gradient(300px 160px at 50% 0%, rgba(255, 181, 71, .16), transparent 70%), var(--bg-elev); }
.timer-status { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.timer-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.timer.is-live .timer-status { color: var(--accent); }
.timer.is-live .timer-status i { background: var(--accent); box-shadow: 0 0 0 0 rgba(255, 181, 71, .6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255, 181, 71, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 181, 71, 0); } }
.timer-clock { font: 700 46px/1 var(--mono); letter-spacing: -.02em; margin: 14px 0 10px; font-variant-numeric: tabular-nums; }
.timer-hint { font-size: 12.5px; color: var(--muted); max-width: 32ch; margin: 0 auto; }
.privacy-note { display: flex; gap: 10px; margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--bg-elev); font-size: 12px; color: var(--muted); line-height: 1.5; }
.privacy-note svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 1px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .field + .field { margin-top: 0; }
.form-grid .full { grid-column: 1 / -1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-toggle { position: relative; }
.chip-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.chip-toggle span { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg-elev); color: var(--text-2); font-size: 13px; cursor: pointer; transition: all .15s; user-select: none; }
.chip-toggle input:checked + span { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.chip-toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-actions { display: flex; gap: 8px; margin-top: 16px; }
.form-actions .btn-primary { flex: 1; }
.log { display: grid; }
.log-entry { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); align-items: start; }
.log-entry:last-child { border-bottom: 0; }
.log-date { text-align: center; padding: 8px 0; border-radius: 12px; background: var(--bg-elev); border: 1px solid var(--border); }
.log-date b { display: block; font-size: 19px; line-height: 1; }
.log-date small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.log-main { min-width: 0; }
.log-title { font-weight: 650; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.log-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.log-notes { margin-top: 8px; color: var(--text-2); font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.log-actions { display: flex; gap: 2px; }
.log-actions .icon-btn { width: 32px; height: 32px; }
.log-actions .icon-btn svg { width: 17px; height: 17px; }

/* ── Mobile tab bar ──────────────────────────────────────────────── */
.tabbar { display: none; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .tracker-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tracker-grid { grid-template-columns: 1fr; }
  .search { width: 200px; }
}

@media (max-width: 900px) {
  :root { --topbar-h: 56px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-panel { padding: calc(28px + var(--safe-t)) 20px 28px; align-items: start; }
  .auth-card { margin-top: 6vh; }

  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; width: min(320px, 86vw);
    transform: translateX(-102%); transition: transform .28s var(--ease);
    padding-top: var(--safe-t); padding-bottom: var(--safe-b);
    box-shadow: var(--shadow-lg); z-index: 80;
  }
  .sidebar.is-open { transform: none; }
  .sidebar-close { display: inline-grid; }
  .drawer-backdrop { display: block; position: fixed; inset: 0; z-index: 79; background: rgba(0, 0, 0, .55); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
  .nav-item { height: 46px; }
  .tree-row { height: 42px; }

  .topbar { padding: 8px 10px; padding-top: calc(8px + var(--safe-t)); gap: 4px; }
  .topbar-menu { display: inline-grid; }
  .crumbs { display: none; }
  .mobile-title { display: block; flex: 1; min-width: 0; padding: 0 4px; }
  .mobile-title strong { display: block; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-title button { border: 0; background: transparent; padding: 0; color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 2px; max-width: 100%; }
  .mobile-title button svg { width: 13px; height: 13px; }
  .mobile-title button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-actions .search { display: none; }
  .topbar.is-searching .mobile-title, .topbar.is-searching .topbar-menu, .topbar.is-searching .hide-on-search { display: none; }
  .topbar.is-searching .search { display: block; flex: 1; width: auto; }
  .topbar-actions { flex: 0 0 auto; }
  .topbar.is-searching .topbar-actions { flex: 1; }
  .icon-btn { width: 42px; height: 42px; }
  .desktop-only { display: none !important; }

  .toolbar { padding: 8px 12px; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .toolbar::-webkit-scrollbar { display: none; }
  .toolbar .meta { font-size: 12px; white-space: nowrap; }
  .loop-pref .loop-label-long { display: none; }

  .content { padding: 14px 12px calc(var(--tabbar-h) + 90px + var(--safe-b)); }
  .tracker { padding: 18px 12px calc(var(--tabbar-h) + 40px + var(--safe-b)); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .folder-grid { grid-template-columns: 1fr; gap: 6px; }
  .folder-card { padding: 10px 6px 10px 12px; border-radius: 12px; }
  .card-menu { opacity: 1; width: 34px; height: 34px; }
  .card-check { width: 28px; height: 28px; }
  .card:hover .card-check { opacity: 0; }
  .selecting .card-check, .is-selected .card-check { opacity: 1 !important; }
  .card:hover .thumb { box-shadow: none; }
  .card:hover .thumb img { transform: none; }
  .play-chip { opacity: 1; transform: none; width: 38px; height: 38px; margin: -19px 0 0 -19px; }
  .card-body { padding-top: 7px; }
  .card-name { font-size: 13px; }

  .view-list .media-grid .card { grid-template-columns: 52px minmax(0, 1fr) 36px; gap: 12px; padding: 8px 6px 8px 10px; }
  .view-list .media-grid .thumb { width: 52px; height: 52px; grid-column: 1; grid-row: 1; }
  .view-list .media-grid .card-check { position: absolute; left: 4px; top: 4px; width: 24px; height: 24px; background: var(--accent); }
  .view-list .media-grid .card:not(.is-selected) .card-check { display: none; }
  .view-list .media-grid .card-body { grid-column: 2; }
  .view-list .media-grid .card-sub { display: flex; }
  .view-list .media-grid .list-col { display: none; }
  .view-list .media-grid .card-menu { grid-column: 3; }
  .view-list .list-head { display: none; }

  .selection-bar { bottom: calc(var(--tabbar-h) + 12px + var(--safe-b)); left: 12px; right: 12px; transform: translateY(200%); max-width: none; padding: 8px 8px 8px 14px; }
  .selection-bar.is-open { transform: none; }
  .selection-bar .btn-label { display: none; }
  .selection-bar .btn { padding: 0 11px; }
  .selection-bar .spacer { margin-left: auto; }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
    background: rgba(17, 17, 20, .92); border-top: 1px solid var(--border);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  }
  .tab-btn { position: relative; height: 100%; border: 0; background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 650; }
  .tab-btn svg { width: 22px; height: 22px; }
  .tab-btn.is-active { color: var(--accent); }
  .tab-btn .count-badge { top: 6px; right: calc(50% - 22px); }
  .tab-upload { display: grid; place-items: center; }
  .tab-upload span { width: 50px; height: 50px; border-radius: 17px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 22px rgba(255, 157, 31, .35); }
  .tab-upload span svg { width: 24px; height: 24px; }
  .tab-upload:disabled span { background: var(--surface-3); color: var(--faint); box-shadow: none; }

  .upload-tray { left: 10px; right: 10px; width: auto; bottom: calc(var(--tabbar-h) + 10px + var(--safe-b)); }
  .toasts { top: calc(10px + var(--safe-t)); }

  /* dialogs become bottom sheets */
  .layer { padding: 0; place-items: end stretch; }
  .dialog, .dialog-wide, .dialog-mid {
    width: 100%; max-height: calc(100dvh - 24px - var(--safe-t));
    border-radius: 22px 22px 0 0; border-left: 0; border-right: 0; border-bottom: 0;
    animation: sheetIn .3s var(--ease);
    padding-bottom: var(--safe-b);
  }
  .dialog-tall { height: calc(100dvh - 24px - var(--safe-t)); }
  .layer.is-leaving .dialog { animation: sheetOut .2s ease forwards; }
  @keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }
  @keyframes sheetOut { to { transform: translateY(100%); } }
  .dialog-grip { display: block; width: 40px; height: 5px; border-radius: 5px; background: var(--surface-4); margin: 8px auto 0; flex: 0 0 auto; }
  .dialog-head { padding: 14px 16px 10px 20px; }
  .dialog-body { padding: 4px 20px 18px; }
  .dialog-foot { padding: 12px 16px; background: var(--surface); }
  .dialog-foot .btn { flex: 1; height: 44px; }
  .dialog-foot .spacer { display: none; }
  .input, .select { height: 44px; font-size: 16px; }
  textarea.input { font-size: 16px; }
  .chat-compose textarea { font-size: 16px; }

  .menu-layer { background: rgba(5, 5, 7, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
  .menu { left: 8px !important; right: 8px !important; top: auto !important; bottom: calc(8px + var(--safe-b)) !important; max-width: none; border-radius: 20px; padding: 8px; animation: sheetIn .26s var(--ease); max-height: 80dvh; overflow-y: auto; }
  .menu-item { height: 48px; font-size: 15px; padding: 0 14px; border-radius: 12px; }
  .menu-item svg { width: 20px; height: 20px; }
  .menu-title { padding: 6px 14px 12px; font-size: 13px; }

  .viewer-stage { padding: 0 0 10px; }
  .viewer-stage > img, .viewer-stage > video { left: 0; right: 0; bottom: 10px; max-width: 100%; max-height: calc(100% - 10px); border-radius: 0; }
  .viewer-stage > iframe, .viewer-stage .editor { border-radius: 0; }
  .viewer-nav { display: none; }
  .viewer-foot .kbd-hints { display: none; }
  .viewer-actions .desktop-only { display: none; }

  .chat { grid-template-columns: 1fr; }
  .chat-side { border-right: 0; }
  .chat.has-thread .chat-side { display: none; }
  .chat:not(.has-thread) .chat-main { display: none; }
  .chat-back { display: inline-grid; }
  .msg { max-width: 86%; }

  .stat-grid, .stat-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-value { font-size: 19px; }
  .tabs { padding: 0 12px; }
  .table-wrap.responsive { border: 0; overflow: visible; }
  .table.responsive thead { display: none; }
  .table.responsive, .table.responsive tbody, .table.responsive tr, .table.responsive td { display: block; width: 100%; }
  .table.responsive tr { border: 1px solid var(--border); border-radius: 14px; padding: 6px 0; margin-bottom: 10px; background: var(--bg-elev); }
  .table.responsive td { border: 0; padding: 6px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .table.responsive td[data-label]::before { content: attr(data-label); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
  .table.responsive td.cell-primary { padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
  .table.responsive .cell-actions { justify-content: flex-start; flex-wrap: wrap; }
  .request-card .actions { margin-left: 0; width: 100%; }
  .request-card .actions .select { flex: 1; }

  .tracker-hero { grid-template-columns: 1fr; }
  .tracker-summary { gap: 8px; }
  .summary-card { padding: 14px; border-radius: 16px; }
  .summary-value { font-size: 24px; }
  .summary-card.feature { grid-column: 1 / -1; }
  .summary-card.feature .summary-value { font-size: 34px; }
  .volume-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px; }
  .volume-strip .lead { grid-column: 1 / -1; padding: 4px; }
  .vol { padding: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .log-entry { grid-template-columns: 48px minmax(0, 1fr); padding: 14px; }
  .log-actions { grid-column: 2; }
  .timer-clock { font-size: 40px; }
}

@media (max-width: 380px) {
  .grid { gap: 8px; }
  .card-sub span:nth-child(2) { display: none; }
}

@media (hover: none) {
  .card-menu { opacity: 1; }
  .card:hover .thumb img { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ── Additions ───────────────────────────────────────────────────── */
.mobile-only-search { display: none; }
.selection-bar .mobile-icon { display: none; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: auto; box-shadow: 0 0 0 0 rgba(255, 181, 71, .6); animation: pulse 1.6s infinite; }
.tab-btn .live-dot { position: absolute; top: 10px; right: calc(50% - 16px); margin: 0; }
.viewer-error { display: grid; justify-items: center; gap: 10px; }
.viewer-error > svg { width: 40px; height: 40px; }
.view-list .media-grid .card > * { grid-row: 1; }
.view-list .media-grid .list-type { grid-column: 4; }
.view-list .media-grid .list-size { grid-column: 5; }
.view-list .media-grid .list-date { grid-column: 6; }
.card[draggable="true"] { -webkit-user-drag: element; }
.card.skeleton-card { animation: none; cursor: default; }
@media (max-width: 900px) {
  .mobile-only-search { display: inline-grid; }
  .selection-bar .mobile-icon { display: block; width: 18px; height: 18px; }
  .view-list .media-grid .card > .list-col { display: none; }
  .view-list .media-grid .thumb { grid-column: 1; }
}
.loop-icon { display: none; width: 16px; height: 16px; }
@media (max-width: 900px) {
  .toolbar .meta { display: none; }
  .loop-icon { display: block; }
  .toolbar .select { flex: 1; min-width: 0; height: 36px; font-size: 14px; }
  .toolbar { justify-content: flex-end; }
  #selectBtn { height: 36px; }
}
.account-name, .account-sub { display: block; }
.folder-check { color: transparent; }
.selecting .folder-card:not(.is-selected) .folder-check { border: 1.5px solid var(--border-strong); background: transparent; }

/* Public links */
.link-custom { display: grid; grid-template-columns: 110px 1fr; gap: 8px; margin-top: 10px; }
.link-result { display: flex; gap: 8px; margin-top: 16px; }
.link-result .input { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--accent); }
.link-result .btn svg { width: 16px; height: 16px; }
.link-list-head { margin: 22px 0 8px; }
.link-list { display: grid; gap: 6px; }
.link-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 8px 8px 10px; border-radius: 12px; background: var(--bg-elev); border: 1px solid var(--border); }
.link-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.link-ico svg { width: 16px; height: 16px; }
.link-text { min-width: 0; }
.link-url { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-meta { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-meta svg { width: 12px; height: 12px; flex: none; }
.icon-btn.danger:hover { color: var(--danger, #ff6b6b); }
@media (max-width: 600px) { .link-until { display: none; } }
