:root {
  --navy: #0B2650;
  --navy-light: #163a72;
  --gold: #C9A227;
  --gold-dark: #a5831c;
  --surface: #ffffff;
  --surface-off: #f6f7fb;
  --text: #1a2233;
  --text-muted: #6b7280;
  --border: #e2e5ec;
  --danger: #b3261e;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface-off);
  color: var(--text);
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
}

.hidden { display: none !important; }

/* Topbar (matches admin) */
.topbar {
  background: var(--navy);
  color: #fff;
  padding: 18px 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: baseline; }
.wordmark {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
}
.wordmark-sub {
  font-weight: 400;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  margin-left: 10px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-link {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
}
.topbar-link:hover { border-color: var(--gold); color: var(--gold); }
.lang-toggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-toggle:hover { border-color: var(--gold); color: var(--gold); }
.session-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
}
.session-logout {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  cursor: pointer;
}
.session-logout:hover { border-color: var(--gold); color: var(--gold); }

.app {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px;
}

.state-msg {
  padding: 60px 0;
  text-align: center;
  color: var(--text-muted);
}
.error-text { color: var(--danger); }
.empty-msg {
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
}

/* View head + search */
.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.view-head h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
}
.view-sub {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 240px;
}
.search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 9px 14px 9px 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
}
.search-box input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,162,39,0.15);
}

/* Breadcrumb / back */
.breadcrumb { margin-bottom: 14px; }
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}
.back-btn svg { width: 18px; height: 18px; }
.back-btn:hover { color: var(--navy); }

/* ---- Projects grid ---- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.project-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  box-shadow: 0 2px 12px rgba(11,38,80,0.04);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(11,38,80,0.12);
  border-color: #c9cfdd;
}
.project-cover {
  position: relative;
  height: 118px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-cover-initial {
  font-size: 2.4rem;
  font-weight: 800;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.02em;
}
.project-cover-initial svg { width: 40px; height: 40px; stroke: rgba(255,255,255,0.85); }
.project-count-chip {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(0,0,0,0.32);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-card-unfiled .project-cover {
  background: repeating-linear-gradient(45deg, #2a3550, #2a3550 10px, #303c59 10px, #303c59 20px);
}
.project-body { padding: 13px 15px 15px; }
.project-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.project-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-menu {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  letter-spacing: 0.05em;
}
.project-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.project-meta .dot { opacity: 0.6; }

/* ---- Asset grid ---- */
.assets-grid { display: flex; flex-direction: column; gap: 14px; }
.grid-sec-head {
  display: flex; align-items: center; gap: 7px; border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text-muted); padding: 0 2px;
}
.grid-sec-head:hover { color: var(--navy); }
.sec-caret { display: inline-block; transition: transform .12s; font-size: 0.7rem; }
.grid-sec.collapsed .sec-caret { transform: rotate(-90deg); }
.grid-sec.collapsed .sec-grid { display: none; }
.grid-sec { display: flex; flex-direction: column; gap: 10px; }
.sec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}
.asset-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 12px rgba(11,38,80,0.04);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.asset-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(11,38,80,0.12);
  border-color: #c9cfdd;
}
.asset-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.asset-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* The glyph shows only when we're on a gradient fallback (no image). */
.thumb-glyph {
  display: none;
  color: rgba(255,255,255,0.9);
}
.asset-thumb.thumb-fallback .thumb-glyph {
  display: inline-flex;
}
.thumb-glyph svg { width: 46px; height: 46px; }
.thumb-video .thumb-glyph svg { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35)); }
/* When a carousel image loads, hide the type glyph overlay behind it. */
.asset-thumb:not(.thumb-fallback) .thumb-glyph { display: none; }

.asset-type {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(11,38,80,0.78);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  backdrop-filter: blur(2px);
}
.asset-type svg { width: 13px; height: 13px; }
.asset-version {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--gold);
  color: #1a1a1a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.asset-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.asset-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.asset-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.asset-comments {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.asset-comments svg { width: 15px; height: 15px; }

/* Status badges — identical palette to admin.css / project.css */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-in-review { background: #eaf0fc; color: var(--navy); }
.badge-changes-requested { background: #fdecea; color: var(--danger); }
.badge-approved { background: #e8f6ec; color: #1e7e34; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.88rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 999;
}

@media (max-width: 700px) {
  .topbar { padding: 14px 16px; }
  .app { padding: 16px; }
  .view-head h1 { font-size: 1.35rem; }
  .search-box { min-width: 0; flex: 1; }
  .projects-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .sec-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .project-cover { height: 92px; }
}

/* ---- Project-folder hub (C1/C2/C6/C8) ---- */
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dam-btn {
  font-family: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--navy);
  border-radius: 8px; padding: 8px 14px; white-space: nowrap;
}
.dam-btn:hover { border-color: var(--gold); }
.dam-btn-gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.dam-btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.share-wrap { position: relative; }
.share-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 320px; max-width: 84vw;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(11,38,80,.16); padding: 12px; display: flex; flex-direction: column; gap: 10px;
}
.share-menu[hidden] { display: none; }
.share-menu h4 { margin: 0; font-size: 0.9rem; color: var(--navy); }
.share-row { display: flex; gap: 6px; }
.share-row input { flex: 1; min-width: 0; font-family: inherit; font-size: 0.78rem; padding: 7px 9px; border: 1px solid var(--border); border-radius: 7px; color: var(--text); background: var(--surface-off); }
.share-note { font-size: 0.75rem; color: var(--text-muted); margin: 0; }

/* P3: whole-page drop overlay — visual only, never intercepts the pointer */
.dam-drop-ic { width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-size: 1.1rem; font-weight: 700; }
.page-drop-overlay {
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
  background: rgba(11,38,80,0.28);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 3px var(--gold);
}
.page-drop-overlay.hidden { display: none; }
.page-drop-card {
  display: flex; align-items: center; gap: 14px; padding: 18px 26px;
  background: var(--surface); border: 2px dashed var(--gold); border-radius: 14px;
  font-weight: 700; color: var(--navy); font-size: 1rem;
  box-shadow: 0 20px 60px rgba(11,38,80,.3);
}

.dam-upload-queue { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.dam-up-item { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 10px 12px; }
.dam-up-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.dam-up-name { font-weight: 600; color: var(--navy); font-size: 0.82rem; word-break: break-all; }
.dam-up-status { font-size: 0.75rem; color: var(--text-muted); flex: none; }
.dam-up-item.done .dam-up-status { color: #1f7a44; }
.dam-up-item.error .dam-up-status { color: #b3261e; }
.dam-up-bar { height: 5px; border-radius: 3px; background: var(--surface-off); overflow: hidden; }
.dam-up-fill { height: 100%; width: 0%; background: var(--gold); transition: width .2s; }
.dam-up-item.done .dam-up-fill { background: #1f7a44; }
.dam-up-item.error .dam-up-fill { background: #b3261e; }

/* sub-folders — frame.io-style TILES living in the assets grid */
.folder-tile { cursor: pointer; }
.folder-thumb {
  background: linear-gradient(160deg, #10254c, #0b1a38) !important;
  display: flex; align-items: center; justify-content: center;
}
.folder-glyph { width: 34%; color: #d8c27a; opacity: .92; }
.folder-glyph svg { width: 100%; height: 100%; }
.folder-tile:hover .folder-glyph { color: var(--gold); }
.folder-tile .folder-count { font-size: 0.78rem; color: var(--text-muted); }
.folder-tile.drop-target { outline: 2px solid var(--gold); outline-offset: 2px; }
.folder-crumb { margin-bottom: 12px; font-size: 0.85rem; color: var(--text-muted); }
.folder-crumb a { color: var(--navy); text-decoration: none; font-weight: 600; cursor: pointer; }
.folder-crumb a:hover { color: var(--gold-dark); }

/* asset card as a drop target (drag-to-stack) */
.asset-card.drop-target { outline: 2px solid var(--gold); outline-offset: 2px; }
.asset-card[draggable="true"] { cursor: grab; }

/* Notion Content Master link chip (C7) */
.asset-foot-right { display: inline-flex; align-items: center; gap: 8px; }
.asset-notion { cursor: pointer; color: var(--border); font-size: 0.82rem; line-height: 1; padding: 2px 3px; border-radius: 4px; transition: color .15s, background .15s; }
.asset-notion:hover { color: var(--text-muted); background: var(--surface-off); }
.asset-notion.linked { color: var(--gold); }
.asset-notion.linked:hover { color: var(--gold-dark); }

/* ---- P2: side panel layout ---- */
.dam-layout { display: flex; align-items: flex-start; min-height: calc(100vh - 61px); }
.dam-layout .app { flex: 1; min-width: 0; width: 100%; }
.dam-side {
  position: sticky; top: 0; flex: none; width: 232px; height: calc(100vh - 61px);
  overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border);
  padding: 14px 10px;
}
.dam-side.hidden { display: none; }
.dam-side-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--text-muted); padding: 2px 8px 10px;
}
.side-collapse, .side-expand {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
  border-radius: 6px; cursor: pointer; font-size: 0.8rem; line-height: 1; padding: 3px 7px;
}
.side-collapse:hover, .side-expand:hover { border-color: var(--gold); color: var(--navy); }
.side-expand { position: fixed; left: 10px; top: 74px; z-index: 40; }
.side-expand.hidden { display: none; }
.dam-side-list { display: flex; flex-direction: column; gap: 2px; }
.side-item {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  border: none; background: transparent; cursor: pointer; font-family: inherit;
  font-size: 0.86rem; font-weight: 600; color: var(--text); border-radius: 8px; padding: 8px 10px;
}
.side-item:hover { background: var(--surface-off); }
.side-item.active { background: var(--navy); color: #fff; }
.side-item .si-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-item .si-n { font-size: 0.72rem; color: var(--text-muted); }
.side-item.active .si-n { color: rgba(255,255,255,0.65); }
.side-folder {
  display: flex; align-items: center; gap: 7px; width: calc(100% - 14px); margin-left: 14px;
  text-align: left; border: none; background: transparent; cursor: pointer; font-family: inherit;
  font-size: 0.8rem; font-weight: 500; color: var(--text-muted); border-radius: 7px; padding: 6px 9px;
}
.side-folder:hover { background: var(--surface-off); color: var(--navy); }
.side-folder.active { color: var(--gold-dark); font-weight: 700; }
.side-folder .sf-ic { width: 15px; height: 15px; flex: none; }
.side-folder .sf-ic svg { width: 100%; height: 100%; }
.side-folder .sf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-folder .sf-n { font-size: 0.7rem; }
@media (max-width: 900px) { .dam-side, .side-expand { display: none !important; } }

/* ---- shared pop menu (kebabs) ---- */
.pop-menu {
  position: absolute; z-index: 300; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 16px 40px rgba(11,38,80,.18); padding: 5px; display: flex; flex-direction: column;
}
.pop-item {
  border: none; background: transparent; cursor: pointer; font-family: inherit;
  font-size: 0.84rem; font-weight: 500; color: var(--text); text-align: left;
  border-radius: 7px; padding: 8px 11px; white-space: nowrap;
}
.pop-item:hover { background: var(--surface-off); color: var(--navy); }
.pop-item.danger { color: #b3261e; }
.pop-item.danger:hover { background: #fdecea; }
.pop-item:disabled { opacity: 0.5; cursor: default; }

/* ---- kebab triggers ---- */
.asset-kebab {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 7px; background: rgba(11,38,80,0.55); color: #fff;
  font-size: 1rem; line-height: 1; cursor: pointer; opacity: 0;
  transition: opacity .12s, background .12s;
}
.asset-card:hover .asset-kebab, .asset-kebab:focus-visible { opacity: 1; }
.asset-kebab:hover { background: rgba(11,38,80,0.85); }
@media (hover: none) { .asset-kebab { opacity: 1; } }
.project-menu { cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.project-menu:hover { background: var(--surface-off); color: var(--navy); }

/* ---- P1: view menu + grid appearance ---- */
.view-wrap { position: relative; }
.view-menu { width: 230px; gap: 4px; }
.view-menu h4 { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin: 4px 0 2px; }
.vm-row { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--text); cursor: pointer; padding: 3px 2px; }
.vm-row input { accent-color: var(--gold-dark); margin: 0; }
.vm-sep { height: 1px; background: var(--border); margin: 6px 0; }
.assets-grid.grid-compact .sec-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.assets-grid.grid-compact .asset-title { font-size: 0.82rem; }
.assets-grid.hide-status .badge { display: none; }
.assets-grid.hide-comments .asset-comments { display: none; }
.assets-grid.hide-version .asset-version { display: none; }
.assets-grid.hide-type .asset-type { display: none; }

/* ---- P1b: list layout (frame.io Appearance → Layout: List) ---- */
.assets-grid.layout-list .sec-grid { display: flex; flex-direction: column; gap: 8px; }
.assets-grid.layout-list .asset-card { flex-direction: row; align-items: center; }
.assets-grid.layout-list .asset-card:hover { transform: none; }
.assets-grid.layout-list .asset-thumb { width: 106px; min-width: 106px; aspect-ratio: 16 / 10; }
.assets-grid.layout-list .asset-thumb .thumb-glyph svg { width: 26px; height: 26px; }
.assets-grid.layout-list .asset-type { display: none; }
.assets-grid.layout-list .asset-body { flex: 1; min-width: 0; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 14px; }
.assets-grid.layout-list .asset-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assets-grid.layout-list .asset-foot { margin-top: 0; display: flex; align-items: center; gap: 14px; flex: none; }
.assets-grid.layout-list .folder-thumb { aspect-ratio: 16 / 10; }
.assets-grid.layout-list .folder-glyph { width: 30px; }
.asset-date { display: none; font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.assets-grid.layout-list .asset-date { display: inline; }
.assets-grid.layout-list .asset-kebab { opacity: 1; background: transparent; color: var(--text-muted); }
.assets-grid.layout-list .asset-kebab:hover { background: var(--surface-off); color: var(--navy); }

/* ---- P17: multi-select checkboxes + selection bar ---- */
.asset-check {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid rgba(255,255,255,.85); background: rgba(11,38,80,.35);
  cursor: pointer; opacity: 0; transition: opacity .12s, background .12s;
}
.asset-card:hover .asset-check, .asset-check.on, .asset-check:focus-visible { opacity: 1; }
.asset-check.on { background: var(--gold); border-color: var(--gold); }
.asset-check.on::after {
  content: '✓'; position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--navy); font-size: 13px; font-weight: 800; line-height: 1;
}
@media (hover: none) { .asset-check { opacity: 1; } }
/* phones: hover doesn't exist — keep touch affordances always visible */
@media (max-width: 700px) {
  .asset-check, .asset-kebab { opacity: 1; }
  .sel-bar { left: 10px; right: 10px; transform: none; justify-content: center; flex-wrap: wrap; }
}
.assets-grid.layout-list .asset-check { width: 17px; height: 17px; }
.sel-bar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 90;
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  background: var(--navy); border-radius: 999px; box-shadow: 0 14px 40px rgba(11,38,80,.35);
}
.sel-bar .sel-count { color: #fff; font-size: 0.85rem; font-weight: 700; margin-right: 4px; }
.sel-bar .dam-btn { border-color: rgba(255,255,255,.3); background: transparent; color: #fff; }
.sel-bar .dam-btn:hover { border-color: var(--gold); color: var(--gold); }
.sel-bar .sel-danger { color: #ff8a80; }
.sel-bar .sel-danger:hover { border-color: #ff8a80; color: #ff8a80; }

/* ---- APP-FEEL MOBILE (frame.io iOS-style home + action sheets) ---- */
.proj-carousel, .pc-label { display: none; }
@media (max-width: 700px) {
  /* Recent Projects carousel */
  .proj-carousel {
    display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 14px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .proj-carousel::-webkit-scrollbar { display: none; }
  .pc-card {
    position: relative; flex: none; width: 226px; height: 136px; border: none;
    border-radius: 14px; overflow: hidden; cursor: pointer; scroll-snap-align: start;
    box-shadow: 0 6px 18px rgba(11,38,80,.14); padding: 0;
  }
  .pc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .pc-name {
    position: absolute; left: 12px; right: 12px; bottom: 10px; text-align: left;
    color: #fff; font-weight: 700; font-size: 0.95rem; font-family: inherit;
    text-shadow: 0 1px 6px rgba(0,0,0,.55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .pc-label {
    display: block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.07em;
    text-transform: uppercase; color: var(--text-muted); margin: 4px 2px 10px;
  }
  /* project LIST rows (frame.io app home list) */
  .projects-grid { display: flex; flex-direction: column; gap: 0; }
  .project-card {
    flex-direction: row; align-items: center; gap: 12px; border-radius: 0;
    border: none; border-bottom: 1px solid var(--border); box-shadow: none; background: transparent;
    padding: 10px 2px;
  }
  .project-card:hover { transform: none; box-shadow: none; }
  .project-cover { width: 52px; height: 52px; min-width: 52px; border-radius: 12px; overflow: hidden; }
  .project-cover-initial { font-size: 1.2rem; }
  .project-cover-initial svg { width: 22px; height: 22px; }
  .project-count-chip { display: none; }
  .project-body { flex: 1; min-width: 0; padding: 0; }
  .project-meta { margin-top: 2px; }
  .project-menu { font-size: 1.3rem; padding: 6px 10px; }
}

/* bottom ACTION SHEET (mobile kebabs) */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 380; background: rgba(11,38,80,0);
  transition: background .22s;
}
.sheet-backdrop.open { background: rgba(11,38,80,.45); }
.pop-menu.action-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 400;
  min-width: 0; border-radius: 18px 18px 0 0; padding: 10px 14px calc(14px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .26s cubic-bezier(.32,.72,0,1);
  box-shadow: 0 -12px 40px rgba(11,38,80,.3);
}
.pop-menu.action-sheet::before {
  content: ''; display: block; width: 42px; height: 4px; border-radius: 999px;
  background: var(--border); margin: 2px auto 10px;
}
.pop-menu.action-sheet.open { transform: translateY(0); }
.pop-menu.action-sheet .pop-item {
  font-size: 0.98rem; padding: 14px 12px; border-bottom: 1px solid var(--surface-off);
}
.pop-menu.action-sheet .pop-item:last-child { border-bottom: none; }

/* ---- A1: project cover image ---- */
.project-cover { position: relative; }
.project-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project-cover-initial, .project-count-chip { position: relative; z-index: 1; }
