:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --text-primary: #111111;
  --text-secondary: #6b6b6b;
  --accent: #c8711a;
  --accent-hover: #a85c12;
  --border: #e2e1db;
  --dark: #1a1a1a;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);
  --radius: 4px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text-primary); line-height: 1.6; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font); border: none; }

/* ── Header ── */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 64px; padding: 0 3rem;
  display: flex; align-items: center; justify-content: space-between;
  transition: box-shadow var(--ease);
}
header.scrolled { box-shadow: var(--shadow-sm); }

.logo { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary); }

/* Accent dot on the i — gradient clipped to the character shape.
   The cutoff % depends on line-height: taller line boxes push the dot
   lower as a percentage, so each context needs its own value.
   currentColor inherits correctly from both the light header and dark footer. */
.logo-dot-i {
  /* Header / footer: line-height ~1.6 — dot bottom sits at ~38% */
  background: linear-gradient(
    to bottom,
    var(--accent)  0%,
    var(--accent)  38%,
    currentColor   38%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hero title: line-height 0.92 compresses the box so the same 38%
   bleeds into the stem — use a tighter cutoff here */
.hero-title .logo-dot-i {
  background: linear-gradient(
    to bottom,
    var(--accent)  0%,
    var(--accent)  30%,
    currentColor   30%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav { display: flex; gap: 2.5rem; align-items: center; }
nav a {
  font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-secondary);
  transition: color var(--ease); position: relative;
}
nav a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px; background: var(--accent); transform: scaleX(0); transition: transform var(--ease);
}
nav a:hover, nav a.active { color: var(--text-primary); }
nav a:hover::after, nav a.active::after { transform: scaleX(1); }

/* ── Hero ── */
#hero {
  min-height: 100vh; background: var(--dark);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 3rem 5rem; position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 60%, #2a2520 0%, #111111 60%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}
.hero-content { position: relative; z-index: 1; max-width: 900px; }
.hero-label {
  font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); font-weight: 500; margin-bottom: 1.5rem;
}
.hero-title {
  font-size: clamp(3.5rem, 9vw, 8rem); font-weight: 700;
  line-height: 0.92; letter-spacing: -0.03em; color: #ffffff; margin-bottom: 2rem;
}
.hero-sub {
  font-size: 1.0625rem; color: rgba(255,255,255,0.45);
  max-width: 420px; line-height: 1.65;
}
.hero-scroll {
  position: absolute; bottom: 2.5rem; right: 3rem;
  writing-mode: vertical-rl; display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.25);
}
.hero-scroll::before {
  content: ''; width: 1px; height: 48px; background: rgba(255,255,255,0.15);
}

/* ── Section shared ── */
.section-label {
  font-size: 0.6875rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 0.625rem;
}

/* ── Gallery ── */
#gallery { background: var(--surface); padding: 6rem 3rem; }

.gallery-header { margin-bottom: 3rem; }
.gallery-header h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -0.025em; }

/* Featured grid */
.featured-grid {
  display: grid; gap: 1.25rem; margin-bottom: 5rem;
}
.featured-count-1 { grid-template-columns: 1fr; }
.featured-count-2 { grid-template-columns: 1fr 1fr; }
.featured-count-3 { grid-template-columns: 1fr 1fr; }
.featured-count-3 .featured-card:first-child { grid-column: 1 / -1; }

.featured-card {
  aspect-ratio: 16/9; position: relative; overflow: hidden;
  cursor: pointer; background: #222;
}
.featured-count-3 .featured-card:first-child { aspect-ratio: 21/9; }
.featured-count-1 .featured-card { aspect-ratio: 21/9; }

/* Image stack — one image visible at a time, crossfade on change */
.card-imgs { position: absolute; inset: 0; }
.card-imgs img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.4s ease; pointer-events: none; user-select: none;
}
.card-imgs img.active { opacity: 1; }

/* For the project grid cards the .card-imgs sits inside .card-image */
.project-card .card-image { position: relative; }
.project-card .card-imgs { position: absolute; inset: 0; }

/* Dot position indicators */
.card-dots {
  position: absolute; bottom: 1.375rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px; z-index: 10; pointer-events: none;
}
.card-dot {
  width: 8px; height: 5px; border-radius: 3px;
  background: rgba(255,255,255,0.45);
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  transition: background 0.25s ease, width 0.25s ease;
}
.card-dot.active { background: #fff; width: 22px; }

/* Arrow buttons */
.card-arr {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,0,0,0.45); color: #fff; font-size: 1.25rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  border: none; opacity: 0;
  transition: opacity var(--ease), background var(--ease);
}
.card-arr.prev { left: 0.625rem; }
.card-arr.next { right: 0.625rem; }
.card-arr:hover { background: rgba(0,0,0,0.72); }
.featured-card:hover .card-arr,
.project-card:hover .card-arr { opacity: 1; }

.featured-card-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.2) 45%, transparent 70%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 2rem 2.25rem;
}
.featured-card .f-name {
  font-size: 1.375rem; font-weight: 600; color: #fff; letter-spacing: -0.015em; line-height: 1.2;
}
.featured-card .f-meta {
  font-size: 0.8125rem; color: rgba(255,255,255,0.55); margin-top: 0.35rem;
}
.featured-card .f-desc {
  font-size: 0.875rem; color: rgba(255,255,255,0.75); margin-top: 0.85rem;
  line-height: 1.55; max-width: 520px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  max-height: 0; opacity: 0; transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}
.featured-card:hover .f-desc { max-height: 3.5rem; opacity: 1; margin-top: 0.85rem; }
.featured-card .f-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8125rem; font-weight: 500; color: var(--accent);
  margin-top: 1rem; letter-spacing: 0.04em;
  opacity: 0; transform: translateY(4px); transition: opacity 0.25s ease, transform 0.25s ease;
}
.featured-card:hover .f-cta { opacity: 1; transform: translateY(0); }
.featured-card .f-cta::after { content: '→'; }

/* No featured message */
.no-featured {
  padding: 3rem; text-align: center;
  color: var(--text-secondary); font-size: 0.9375rem;
  background: var(--bg); border: 1px dashed var(--border); border-radius: var(--radius);
  margin-bottom: 5rem;
}

/* All Projects */
.all-projects-row {
  display: flex; align-items: baseline; gap: 0.875rem; margin-bottom: 2rem;
}
.all-projects-row h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.015em; }
.project-count { font-size: 0.875rem; color: var(--text-secondary); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 2.25rem;
}
.project-card {
  cursor: pointer; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: box-shadow var(--ease), transform var(--ease);
}
.project-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.project-card .card-image { aspect-ratio: 4/3; overflow: hidden; background: #ddd; }

.project-card .card-body { padding: 1.125rem 1.25rem 1.375rem; }
.project-card .c-name { font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; }
.project-card .c-meta { font-size: 0.8125rem; color: var(--text-secondary); margin-top: 0.2rem; }
.featured-pill {
  display: inline-block; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; background: var(--accent); color: white;
  padding: 0.2em 0.65em; border-radius: 2px; margin-top: 0.75rem;
}

/* ── Lightbox Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.92); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--surface); border-radius: 8px;
  width: min(980px, 92vw); max-height: 90vh; overflow-y: auto;
  position: relative;
  transform: scale(0.96) translateY(16px); transition: transform 0.2s ease;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 10;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.12); color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.375rem; line-height: 1; transition: background var(--ease);
}
.modal-close:hover { background: rgba(0,0,0,0.22); }

.modal-img-wrap { position: relative; aspect-ratio: 16/9; background: #111; overflow: hidden; }
.modal-img-wrap img { object-fit: cover; }

.modal-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0,0,0,0.45); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; line-height: 1; transition: background var(--ease);
}
.modal-arrow:hover { background: rgba(0,0,0,0.75); }
.modal-arrow.prev { left: 1rem; }
.modal-arrow.next { right: 1rem; }
.modal-arrow:disabled { opacity: 0.2; pointer-events: none; }

.modal-dots {
  position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
}
.modal-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.35); transition: background var(--ease), transform var(--ease);
  padding: 0;
}
.modal-dot.active { background: white; transform: scale(1.25); }

.modal-body { padding: 2rem 2.5rem 2.5rem; }
.modal-title { font-size: 1.625rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.modal-meta {
  display: flex; gap: 1.5rem; font-size: 0.875rem; color: var(--text-secondary);
  margin-bottom: 1.25rem;
}
.modal-meta span { display: flex; align-items: center; gap: 0.35rem; }
.modal-desc { color: var(--text-secondary); line-height: 1.7; font-size: 0.9375rem; }

/* ── Contact ── */
#contact { background: var(--bg); padding: 6rem 3rem; }
.contact-wrap { display: grid; grid-template-columns: 1fr 2fr; gap: 5rem; align-items: start; }
.contact-aside h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1rem; margin-top: 0.5rem; }
.contact-aside p { color: var(--text-secondary); line-height: 1.7; font-size: 0.9375rem; }

.contact-form { display: flex; flex-direction: column; gap: 1.125rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.125rem; }
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-group label {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-secondary);
}
.form-group input, .form-group textarea {
  padding: 0.8125rem 1rem; border: 1px solid var(--border);
  border-radius: var(--radius); font-family: var(--font);
  font-size: 0.9375rem; background: var(--surface); color: var(--text-primary);
  transition: border-color var(--ease); outline: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 130px; }

.btn-primary {
  padding: 0.8125rem 2.25rem; background: var(--accent); color: white;
  border-radius: var(--radius); font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.01em;
  align-self: flex-start; transition: background var(--ease), transform var(--ease);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.form-success {
  display: none; padding: 0.875rem 1.125rem;
  background: #f0faf2; border: 1px solid #b7dfc0;
  border-radius: var(--radius); color: #1a5c2e; font-size: 0.9rem;
}

/* ── Footer ── */
footer {
  background: var(--dark); color: rgba(255,255,255,0.4);
  padding: 2rem 3rem;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.8125rem;
}
.footer-logo { font-size: 1rem; font-weight: 700; color: white; }
/* .footer-logo uses .logo-dot-i — accent dot handled by shared rule above */
.footer-admin { opacity: 0.3; font-size: 0.75rem; transition: opacity var(--ease); }
.footer-admin:hover { opacity: 0.65; }

/* ── Responsive ── */
@media (max-width: 900px) {
  header, #hero, #gallery, #contact { padding-left: 1.75rem; padding-right: 1.75rem; }
  .contact-wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  .form-row { grid-template-columns: 1fr; }
  footer { padding-left: 1.75rem; padding-right: 1.75rem; }
}
@media (max-width: 600px) {
  header { padding: 0 1.25rem; }
  #hero { padding: 0 1.25rem 3.5rem; }
  #gallery, #contact { padding: 4rem 1.25rem; }
  footer { flex-direction: column; gap: 0.75rem; text-align: center; padding: 1.75rem 1.25rem; }
  .featured-count-2, .featured-count-3 { grid-template-columns: 1fr; }
  .featured-count-3 .featured-card:first-child { grid-column: auto; }
  nav { gap: 1.5rem; }
}

/* ════════════════════════════
   ADMIN STYLES
════════════════════════════ */
body.admin-body { background: #efeeea; }

/* Login */
.login-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--dark);
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: var(--surface); border-radius: 10px;
  padding: 2.75rem; width: min(420px, 92vw);
}
.login-card .logo { font-size: 1.25rem; margin-bottom: 0.375rem; }
.login-tagline { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 2rem; }
.login-error {
  display: none; background: #fdecea; border: 1px solid #f5c2c2;
  color: #b91c1c; padding: 0.75rem 1rem; border-radius: var(--radius);
  font-size: 0.875rem; margin-bottom: 1.25rem;
}
.login-card .form-group { margin-bottom: 1.25rem; }
.login-card .form-group label {
  display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-secondary); margin-bottom: 0.375rem;
}
.login-card input {
  width: 100%; padding: 0.8125rem 1rem; border: 1px solid var(--border);
  border-radius: var(--radius); font-family: var(--font); font-size: 0.9375rem;
  outline: none; transition: border-color var(--ease);
}
.login-card input:focus { border-color: var(--accent); }
.login-card .btn-primary { width: 100%; text-align: center; }
.demo-hint {
  margin-top: 1.25rem; padding: 0.75rem 1rem;
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: var(--radius); font-size: 0.8125rem; color: #92400e; text-align: center;
}

/* Admin chrome */
.admin-header {
  background: var(--surface); border-bottom: 1px solid var(--border);
  height: 64px; padding: 0 2.5rem;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}
.admin-header .logo { font-size: 1rem; }
.admin-header-right { display: flex; align-items: center; gap: 0.75rem; }

.btn-ghost {
  padding: 0.5rem 1.125rem; background: transparent;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 500; color: var(--text-primary);
  transition: border-color var(--ease), background var(--ease);
}
.btn-ghost:hover { border-color: #aaa; background: var(--bg); }

.btn-outline-danger {
  padding: 0.5rem 1.125rem; background: transparent;
  border: 1px solid #fca5a5; border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 500; color: #dc2626;
  transition: background var(--ease);
}
.btn-outline-danger:hover { background: #fef2f2; }

.admin-main { max-width: 1200px; margin: 0 auto; padding: 2.5rem 2.5rem; }

.admin-topbar {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem;
}
.admin-topbar h1 { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; }

/* Table */
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }

.project-table { width: 100%; border-collapse: collapse; }
.project-table th {
  text-align: left; padding: 0.875rem 1.375rem;
  font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-secondary); font-weight: 600;
  border-bottom: 1px solid var(--border); background: #faf9f6;
}
.project-table td { padding: 1rem 1.375rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.project-table tr:last-child td { border-bottom: none; }
.project-table tr:hover td { background: #faf9f6; }

.t-thumb { width: 72px; height: 48px; border-radius: 3px; overflow: hidden; background: #ddd; flex-shrink: 0; }
.t-thumb img { width: 100%; height: 100%; object-fit: cover; }
.t-name { font-size: 0.9375rem; font-weight: 500; }
.t-sub { font-size: 0.8125rem; color: var(--text-secondary); margin-top: 0.125rem; }

/* Toggle */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0; cursor: pointer;
  background: #d1d5db; border-radius: 24px; transition: background 0.2s;
}
.toggle-track::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  left: 3px; top: 3px; background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: transform 0.2s;
}
.toggle input:checked + .toggle-track { background: var(--accent); }
.toggle input:checked + .toggle-track::before { transform: translateX(20px); }

/* Icon buttons */
.row-actions { display: flex; gap: 0.5rem; }
.btn-icon {
  width: 32px; height: 32px; border-radius: var(--radius);
  background: transparent; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem; color: var(--text-secondary);
  transition: border-color var(--ease), color var(--ease), background var(--ease);
}
.btn-icon:hover { border-color: var(--text-primary); color: var(--text-primary); }
.btn-icon.del:hover { border-color: #dc2626; color: #dc2626; background: #fef2f2; }

/* Empty state */
.empty-state { padding: 4rem 2rem; text-align: center; color: var(--text-secondary); }
.empty-state p { margin-bottom: 1.5rem; font-size: 0.9375rem; }

/* Admin modal */
.amodal-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.amodal-overlay.open { opacity: 1; pointer-events: all; }

.amodal {
  background: var(--surface); border-radius: 8px;
  width: min(640px, 92vw); max-height: 88vh; overflow-y: auto;
  padding: 2rem 2.5rem; position: relative;
  transform: translateY(12px) scale(0.98); transition: transform 0.2s;
}
.amodal-overlay.open .amodal { transform: translateY(0) scale(1); }

.amodal h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 1.75rem; }

.amodal .form-group { margin-bottom: 1.125rem; }
.amodal .form-group label {
  display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-secondary); margin-bottom: 0.375rem;
}
.amodal input, .amodal textarea {
  width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border);
  border-radius: var(--radius); font-family: var(--font); font-size: 0.9375rem;
  outline: none; transition: border-color var(--ease); color: var(--text-primary);
}
.amodal input:focus, .amodal textarea:focus { border-color: var(--accent); }
.amodal textarea { min-height: 95px; resize: vertical; }
.field-hint { font-size: 0.8125rem; color: var(--text-secondary); margin-top: 0.375rem; }

.inline-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.125rem; }

.featured-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9375rem 1.125rem; border: 1px solid var(--border);
  border-radius: var(--radius); margin-top: 0.5rem;
}
.featured-row-text .label { font-size: 0.9375rem; font-weight: 500; }
.featured-row-text .sub { font-size: 0.8125rem; color: var(--text-secondary); margin-top: 0.125rem; }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 1.75rem 1.5rem; text-align: center; position: relative;
  background: var(--bg); transition: border-color var(--ease), background var(--ease);
  cursor: pointer;
}
.upload-zone.drag-over { border-color: var(--accent); background: #fef7f0; }
.upload-icon { font-size: 1.5rem; display: block; margin-bottom: 0.5rem; opacity: 0.35; }
.upload-zone-content p { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 0.2rem; }
.upload-link {
  background: none; border: none; padding: 0;
  color: var(--accent); font-size: inherit; font-family: var(--font);
  cursor: pointer;
}
.upload-link:hover { text-decoration: underline; }
.upload-loading {
  position: absolute; inset: 0; border-radius: var(--radius);
  background: rgba(255,255,255,0.88);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem; color: var(--text-secondary);
}

/* Image preview grid */
.img-preview-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 0.5rem; margin-top: 0.75rem;
}
.img-preview { position: relative; aspect-ratio: 1; border-radius: 4px; overflow: hidden; background: #ddd; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-remove {
  position: absolute; top: 3px; right: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,0.55); color: white; border: none;
  font-size: 0.8125rem; line-height: 1; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--ease);
}
.img-remove:hover { background: rgba(220,38,38,0.85); }

/* URL fallback row */
.url-add-row { display: flex; gap: 0.5rem; margin-top: 0.625rem; }
.url-add-row input {
  flex: 1; padding: 0.625rem 0.875rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--font); font-size: 0.875rem; outline: none;
  transition: border-color var(--ease);
}
.url-add-row input:focus { border-color: var(--accent); }

.amodal-footer {
  display: flex; justify-content: flex-end; gap: 0.75rem;
  padding-top: 1.5rem; margin-top: 1.5rem; border-top: 1px solid var(--border);
}
