/* ============================================================
   AI Video Generator — form styles
   Design tokens reused from liveshowcreator.com
   ============================================================ */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(20, 20, 30, 0.6);
  --bg-card-hover: rgba(30, 30, 45, 0.8);
  --bg-input: rgba(255, 255, 255, 0.04);
  --bg-input-focus: rgba(255, 255, 255, 0.07);

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
  --text-faint: rgba(255, 255, 255, 0.3);

  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-magenta: #a855f7;
  --accent-cyan: #06b6d4;
  --accent-green: #22c55e;
  --accent-red: #ef4444;
  --accent-glow: rgba(99, 102, 241, 0.5);

  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  --gradient-cyan: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);

  --border-color: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --border-glow: rgba(99, 102, 241, 0.35);
  --border-error: rgba(239, 68, 68, 0.55);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-elev: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-focus: 0 0 0 3px rgba(99, 102, 241, 0.35);

  --transition-fast: 0.18s ease;
  --transition-medium: 0.32s ease;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   Background glow ambience
   ============================================================ */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}
.bg-glow-cyan {
  top: -10%; left: 10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.35) 0%, rgba(59, 130, 246, 0.15) 50%, transparent 70%);
  animation: drift-1 28s ease-in-out infinite;
}
.bg-glow-purple {
  top: 25%; right: -5%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.32) 0%, rgba(139, 92, 246, 0.15) 40%, transparent 70%);
  animation: drift-2 32s ease-in-out infinite;
}
.bg-glow-emerald {
  bottom: -10%; left: 25%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.25) 0%, rgba(16, 185, 129, 0.12) 50%, transparent 70%);
  animation: drift-3 30s ease-in-out infinite;
}
@keyframes drift-1 {
  0%, 100% { transform: translate(0,0) scale(1); opacity: 0.6; }
  50%      { transform: translate(80px, 80px) scale(1.1); opacity: 0.4; }
}
@keyframes drift-2 {
  0%, 100% { transform: translate(0,0) scale(1); opacity: 0.55; }
  50%      { transform: translate(-60px, 40px) scale(1.15); opacity: 0.4; }
}
@keyframes drift-3 {
  0%, 100% { transform: translate(0,0) scale(1); opacity: 0.5; }
  50%      { transform: translate(40px, -40px) scale(0.95); opacity: 0.6; }
}

/* ============================================================
   Layout
   ============================================================ */
.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px 120px;
  position: relative;
  z-index: 1;
}

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.03em;
}
.nav-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--gradient-primary);
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.4);
}
.nav-logo-text { font-size: 1rem; }
.nav-lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 0.85rem;
}
.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
  padding: 2px 4px;
  transition: color var(--transition-fast);
}
.lang-btn:hover { color: var(--text-secondary); }
.lang-btn.active { color: var(--accent-primary); font-weight: 600; }
.lang-divider { color: var(--text-faint); }

/* ============================================================
   Page header
   ============================================================ */
.page-header {
  padding: 64px 0 48px;
  text-align: center;
}
.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--border-glow);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--accent-primary);
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.3); }
}
.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 16px;
}
.title-line { display: block; }
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.page-description {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================================
   Form cards
   ============================================================ */
.form { display: flex; flex-direction: column; gap: 24px; }

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-medium), background var(--transition-medium);
}
.form-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-medium);
}
.form-card:focus-within { border-color: var(--border-glow); }
.form-card:focus-within::before { opacity: 1; }

.form-card-info {
  background: rgba(99, 102, 241, 0.06);
  border-color: var(--border-glow);
}
.form-card-info::before { opacity: 0.7; }
.form-card-info p { color: var(--text-secondary); }

.form-card-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
}
.form-card-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  opacity: 0.6;
}
.form-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

/* Conditional reveal */
.form-card-conditional {
  display: none;
}
.form-card-conditional.visible {
  display: block;
  animation: card-reveal 0.4s ease;
}
@keyframes card-reveal {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Form grids and fields
   ============================================================ */
.form-grid { display: grid; gap: 20px; margin-bottom: 20px; }
.form-grid-1 { grid-template-columns: 1fr; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid:last-child { margin-bottom: 0; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }

.field > label,
.field > legend {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}
.optional { color: var(--text-faint); font-weight: 400; font-size: 0.85em; }

.field-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Inputs */
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }

.field input:hover,
.field textarea:hover {
  border-color: var(--border-strong);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  background: var(--bg-input-focus);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-focus);
}
.field input.invalid,
.field textarea.invalid {
  border-color: var(--border-error);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); }

.input-row {
  display: flex; gap: 8px;
}
.input-row input { flex: 1; }

/* ============================================================
   Choice grids (checkboxes and radios)
   ============================================================ */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  font-size: 0.92rem;
  min-height: 44px;
}
.choice:hover { background: var(--bg-input-focus); border-color: var(--border-strong); }
.choice input[type="checkbox"],
.choice input[type="radio"] {
  appearance: none;
  width: 18px; height: 18px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  margin: 0;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.choice input[type="checkbox"] { border-radius: 4px; }
.choice input[type="radio"] { border-radius: 50%; }
.choice input:checked {
  background: var(--gradient-primary);
  border-color: transparent;
}
.choice input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px; left: 5px;
  width: 5px; height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.choice input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: white;
  transform: translate(-50%, -50%);
}
.choice:has(input:checked) {
  border-color: var(--border-glow);
  background: rgba(99, 102, 241, 0.1);
}
.choice-block { display: flex; align-items: flex-start; padding: 16px; gap: 12px; }
.choice-block a { color: var(--accent-cyan); text-decoration: underline; }

/* Radio stack (auth level) */
.radio-stack {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 10px;
}
.radio-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.radio-row:hover { background: var(--bg-input-focus); border-color: var(--border-strong); }
.radio-row input[type="radio"] {
  appearance: none;
  width: 20px; height: 20px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  margin-top: 2px;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
}
.radio-row input:checked {
  background: var(--gradient-primary);
  border-color: transparent;
}
.radio-row input:checked::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: white;
  transform: translate(-50%, -50%);
}
.radio-row:has(input:checked) {
  border-color: var(--border-glow);
  background: rgba(99, 102, 241, 0.1);
}
.radio-row div { display: flex; flex-direction: column; gap: 2px; }
.radio-row strong { font-weight: 600; color: var(--text-primary); }
.radio-row span { color: var(--text-muted); font-size: 0.88rem; }

/* ============================================================
   Info box and upload
   ============================================================ */
.info-box {
  padding: 14px 18px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 20px;
}

.drop-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  background: rgba(255, 255, 255, 0.02);
}
.drop-zone:hover,
.drop-zone:focus-visible,
.drop-zone.dragover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.08);
  outline: none;
}
.drop-zone-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  color: var(--accent-cyan);
}
.drop-zone-icon svg { width: 100%; height: 100%; }
.drop-zone p { color: var(--text-secondary); margin-bottom: 4px; }
.link-like { color: var(--accent-cyan); text-decoration: underline; }

.file-list {
  list-style: none;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.file-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}
.file-row .file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .file-size { color: var(--text-muted); font-size: 0.8rem; flex-shrink: 0; }
.file-row .file-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0 4px;
  transition: color var(--transition-fast);
}
.file-row .file-remove:hover { color: var(--accent-red); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 28px;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast), background var(--transition-fast);
  text-decoration: none;
  color: var(--text-primary);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
  background: var(--gradient-primary);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}
.btn-primary:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.55);
}
.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
}
.btn-sm { padding: 10px 16px; font-size: 0.9rem; }
.btn-large { padding: 18px 36px; font-size: 1.05rem; }

.btn-arrow {
  display: inline-block;
  transition: transform var(--transition-fast);
}
.btn-primary:not(:disabled):hover .btn-arrow { transform: translateX(4px); }

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ============================================================
   Form error and overlay
   ============================================================ */
.form-error {
  margin-top: 16px;
  padding: 14px 18px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-md);
  color: #fecaca;
  font-size: 0.92rem;
}

/* HTML hidden attribute must beat explicit display values below. */
[hidden] { display: none !important; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
}
.spinner {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-primary);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-nav { display: flex; gap: 24px; }
.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.footer-nav a:hover { color: var(--text-primary); }

/* ============================================================
   Mode picker tiles
   ============================================================ */
.mode-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}
.mode-tile {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 6px;
  padding: 18px 20px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font: inherit;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}
.mode-tile:hover { background: var(--bg-input-focus); border-color: var(--border-strong); }
.mode-tile.selected {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.12);
  box-shadow: var(--shadow-focus);
}
.mode-tile-title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.02rem;
}
.mode-tile-sub { color: var(--text-muted); font-size: 0.82rem; }
.mode-tile-tip { color: var(--text-secondary); font-size: 0.82rem; line-height: 1.5; }

/* ============================================================
   URL list
   ============================================================ */
.url-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.url-list:not(:empty) { margin-bottom: 6px; }
.url-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}
.url-row a {
  flex: 1;
  color: var(--accent-cyan);
  text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.url-row a:hover { text-decoration: underline; }
.url-row .file-remove {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 1.1rem; padding: 0 4px;
}
.url-row .file-remove:hover { color: var(--accent-red); }

.url-feedback { min-height: 1em; }
.url-feedback.checking { color: var(--accent-cyan); }
.url-feedback.error { color: var(--accent-red); }
.url-feedback.ok { color: var(--accent-green); }

/* ============================================================
   Character photo rows (Mode 1)
   ============================================================ */
.char-photo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.char-photo-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}
.char-photo-thumb {
  width: 56px; height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
}
.char-photo-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.char-photo-meta input {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-input-focus);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.9rem;
}
.char-photo-meta input:focus { outline: none; border-color: var(--accent-primary); box-shadow: var(--shadow-focus); }
.char-photo-fname { color: var(--text-muted); font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   Character accordion (Mode 3)
   ============================================================ */
.char-accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.char-profile {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.char-profile[open] { border-color: var(--border-strong); }
.char-profile > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.char-profile > summary::-webkit-details-marker { display: none; }
.char-profile > summary::before {
  content: '▸';
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: transform var(--transition-fast);
}
.char-profile[open] > summary::before { transform: rotate(90deg); }

.char-profile-title { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.char-num { color: var(--text-muted); font-size: 0.85rem; }
.char-name-preview {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.98rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.char-name-preview.unnamed { color: var(--text-muted); font-style: italic; font-weight: 400; }

.char-profile-status { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.char-fill-count {
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
}
.char-fill-count.complete { background: rgba(34, 197, 94, 0.15); color: var(--accent-green); }
.char-fill-count.incomplete { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.char-remove {
  background: none; border: none;
  color: var(--text-muted); font-size: 1.2rem;
  cursor: pointer; padding: 0 6px;
}
.char-remove:hover { color: var(--accent-red); }

.char-fields {
  display: flex; flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-top: 1px solid var(--border-color);
}
.char-fields .field { margin-bottom: 0; }
.char-fields select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font: inherit;
}
.char-fields select:focus { outline: none; border-color: var(--accent-primary); box-shadow: var(--shadow-focus); }
.char-fields input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font: inherit;
}
.char-fields input[type="file"] { color: var(--text-secondary); font-size: 0.88rem; }
.char-ref-preview { color: var(--text-muted); font-size: 0.78rem; margin-top: 4px; }

/* ============================================================
   Drop zone inner wrapper (new HTML structure)
   ============================================================ */
.drop-zone-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* ============================================================
   Location preview (under Maps autocomplete input)
   ============================================================ */
.location-preview { color: var(--accent-green); font-size: 0.85rem; min-height: 1em; }

/* Google's pac-container has to render above the modal-ish overlay */
.pac-container { z-index: 2000 !important; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
  .container { padding: 0 16px 80px; }
  .page-header { padding: 40px 0 32px; }
  .form-card { padding: 24px 20px; border-radius: var(--radius-lg); }
  .form-grid-2 { grid-template-columns: 1fr; }
  .form-actions { justify-content: stretch; }
  .form-actions .btn { width: 100%; }
  .footer { flex-direction: column; gap: 12px; text-align: center; }
  .mode-tiles { grid-template-columns: 1fr; }
  .char-photo-row { grid-template-columns: 48px 1fr auto; }
}
