/* FIMCON 2026 Speaker Cards — app chrome */
:root {
  --blue: #1d4d8e;
  --blue-dk: #0e3464;
  --blue-lt: #4d7ab8;
  --green: #6db33e;
  --green-dk: #4f8e29;
  --orange: #e88f2f;
  --cream: #fbf9f3;
  --paper: #ffffff;
  --ink: #14213d;
  --muted: #6b7280;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
body {
  background: #eef1f5;
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  min-height: 100vh;
}

/* App chrome */
.app-header {
  position: sticky; top: 0; z-index: 50;
  background: white;
  border-bottom: 1px solid #e2e6ec;
  padding: 14px 28px;
  display: flex; align-items: center; gap: 18px;
}
.app-header h1 {
  margin: 0; font-size: 15px; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--blue);
}
.app-header .count { color: var(--muted); font-size: 13px; font-weight: 500; }
.app-header .spacer { flex: 1; }
.app-header input.search {
  padding: 9px 14px; border: 1px solid #d1d5db; border-radius: 999px;
  font: inherit; font-size: 13px; min-width: 280px;
  background: #f8fafc;
}
.app-header input.search:focus { outline: none; border-color: var(--blue); background: white; }
.btn {
  padding: 9px 16px; border-radius: 999px; border: none;
  background: var(--blue); color: white; font: inherit;
  font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: var(--blue-dk); }
.btn.secondary { background: white; color: var(--ink); border: 1px solid #d1d5db; }
.btn.secondary:hover { background: #f8fafc; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  padding: 28px;
  max-width: 1600px;
  margin: 0 auto;
}
.thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: white;
  box-shadow: 0 1px 3px rgba(15,52,100,0.08);
  border: 1px solid #e2e6ec;
  transition: transform 0.15s, box-shadow 0.15s;
}
.thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15,52,100,0.12);
}
.thumb .card-frame {
  position: absolute; top: 0; left: 0;
  width: 1080px; height: 1080px;
  transform-origin: 0 0;
  /* scale set inline */
}
.thumb-meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 30px 12px 10px;
  background: linear-gradient(to top, rgba(14,52,100,0.85), transparent);
  color: white;
  font-size: 12px; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
  opacity: 0; transition: opacity 0.15s;
  pointer-events: none;
}
.thumb:hover .thumb-meta { opacity: 1; }
.thumb-meta .download-mini {
  background: white; color: var(--blue);
  border-radius: 999px; padding: 4px 10px; font-size: 11px;
  pointer-events: auto;
}

/* Modal */
.modal {
  position: fixed; inset: 0; background: rgba(14,52,100,0.78);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 24px;
  backdrop-filter: blur(4px);
}
.modal.open { display: flex; }
.modal-shell {
  background: #f8fafc; border-radius: 14px;
  max-width: min(95vw, 1180px); max-height: 95vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.modal-bar {
  display: flex; gap: 12px; align-items: center;
  padding: 14px 18px;
  background: white;
  border-bottom: 1px solid #e2e6ec;
}
.modal-bar .title {
  font-weight: 700; font-size: 14px; color: var(--blue);
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.modal-stage {
  padding: 24px; overflow: auto;
  display: flex; align-items: flex-start; justify-content: center;
}
.modal-stage .card-wrap {
  width: 1080px; flex-shrink: 0;
  transform-origin: top center;
}

/* Bulk export overlay */
.bulk-overlay {
  position: fixed; inset: 0; background: rgba(14,52,100,0.85);
  display: none; align-items: center; justify-content: center;
  z-index: 200; color: white; flex-direction: column; gap: 14px;
  font-weight: 600;
}
.bulk-overlay.open { display: flex; }
.bulk-overlay .progress-track {
  width: 320px; height: 6px; background: rgba(255,255,255,0.2); border-radius: 999px; overflow: hidden;
}
.bulk-overlay .progress-fill { height: 100%; background: var(--green); width: 0%; transition: width 0.2s; }
