/* ==========================================================================
   PoofShare - Core Stylesheet Bundle (Compiled Asset)
   Generated automatically by scripts/build_pages.mjs from public/css/*.css
   Zero em dash compliance strictly enforced.
   ========================================================================== */

/* --- public/css/base.css --- */
/* ==========================================================================
   PoofShare - Base & Global Styles
   ========================================================================== */
:root {
  color-scheme: dark;
  --bg: #0b0b0f;
  --surface: #14141a;
  --surface-2: #1c1c24;
  --border: #26262f;
  --border-focus: #7c5cff;
  --text: #e7e7ee;
  --muted: #8a8a99;
  --accent: #7c5cff;
  --accent-hover: #6a4ce0;
  --accent-light: #a78bfa;
  --primary: #7c5cff;
  --text-muted: #8a8a99;
  --surface-inner: #1c1c24;
  --success: #10b981;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --radius: 12px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent-light, #a78bfa);
  outline-offset: 2px;
}

select,
input,
textarea {
  color-scheme: dark;
}

select {
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
}

select option {
  background-color: var(--surface-2);
  color: var(--text);
}

select optgroup {
  background-color: var(--surface);
  color: var(--accent-light);
  font-weight: 700;
}

html,
body {
  max-width: 100vw;
  overflow-x: clip;
}

@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  margin: 0;
  width: 100%;
}

/* Ad slots (collapsed by default) */
.ad-slot {
  display: none;
  width: 100%;
  max-width: 1200px;
  margin: 16px auto;
  text-align: center;
  overflow: hidden;
}

/* Main Layout */
.main-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1 0 auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: #6b4ae6;
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: #5b3bd4;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--accent-light);
  color: var(--accent-light);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--accent-light);
  color: var(--accent-light);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger);
  color: #fff;
}

.btn-block {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.submit-row {
  margin-top: 20px;
}

.error-box {
  margin-top: 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  text-align: center;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface-2);
  border: 1px solid var(--accent);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}


@media (max-width: 640px) {
  /* Layout & Containers */
  .main-content {
    padding: 16px 12px;
    gap: 18px;
  }

  .nav-container {
    padding: 12px 14px;
  }

  .brand-name {
    font-size: 1.15rem;
  }

}


/* --- public/css/navbar.css --- */
/* ==========================================================================
   PoofShare - Navigation Bar
   ========================================================================== */
/* Navbar */
.navbar {
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 40;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.badge {
  background: #6e4cf0;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.count-badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-actions .btn {
  height: 34px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 12px;
  font-size: 0.82rem;
  border: 1px solid transparent;
}

.nav-actions .btn-secondary {
  border-color: var(--border);
}

/* Mobile Responsive Navbar */
.btn-text-mobile {
  display: none;
}

@media (max-width: 640px) {
  .nav-container {
    padding: 12px 14px;
  }

  .brand {
    gap: 6px;
  }

  .brand .badge {
    display: none;
  }

  .nav-actions {
    gap: 5px;
  }

  /* Hide decorative SVG icons in secondary buttons to eliminate mobile header crowding */
  .nav-actions .btn-secondary svg {
    display: none !important;
  }

  .nav-actions .btn {
    height: 32px;
    padding: 0 9px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 6px;
    letter-spacing: -0.01em;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 10px 12px;
  }

  .brand-name {
    font-size: 1.15rem;
  }

  .nav-actions {
    gap: 4px;
  }

  .nav-actions .btn {
    height: 30px;
    padding: 0 7px;
    font-size: 0.75rem;
  }

  .btn-text-full {
    display: none;
  }

  .btn-text-mobile {
    display: inline;
  }
}

@media (max-width: 360px) {
  .nav-container {
    padding: 8px 8px;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .nav-actions {
    gap: 3px;
  }

  .nav-actions .btn {
    height: 28px;
    padding: 0 5px;
    font-size: 0.72rem;
  }
}



/* --- public/css/uploader.css --- */
/* ==========================================================================
   PoofShare - Uploader Component
   ========================================================================== */
/* Uploader Aura & Layout */
.uploader-wrap {
  position: relative;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

.uploader-aura {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85%;
  max-width: 760px;
  height: 340px;
  background: radial-gradient(ellipse at center, rgba(124, 92, 255, 0.14), transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(48px);
}

.card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.card-header {
  margin-bottom: 24px;
  text-align: center;
}

.card-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.card-header h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 6px;
}

.subtitle {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.05);
}

.drop-icon-wrap {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border-radius: 14px;
  background: rgba(124, 92, 255, 0.08);
  border: 1px solid rgba(124, 92, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: all 0.25s ease;
}

.dropzone:hover .drop-icon-wrap,
.dropzone.dragover .drop-icon-wrap {
  background: rgba(124, 92, 255, 0.18);
  border-color: rgba(124, 92, 255, 0.55);
  transform: scale(1.06);
  box-shadow: 0 0 20px rgba(124, 92, 255, 0.3);
}

.drop-icon-svg {
  color: var(--accent);
}

.drop-text {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 6px;
}

.drop-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.browse-link {
  color: #9d85ff;
  text-decoration: underline;
  font-weight: 600;
  cursor: pointer;
}

.drop-formats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 6px 0 10px;
}

.format-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.dropzone:hover .format-badge {
  border-color: rgba(124, 92, 255, 0.3);
  color: var(--text);
}

.drop-hint {
  color: var(--muted);
  font-size: 0.85rem;
}

kbd {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.78rem;
  font-family: inherit;
  color: var(--text);
}

/* Selected File Box inside Dropzone */
.file-selected-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  text-align: left;
}

.file-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.file-meta {
  flex: 1;
  overflow: hidden;
}

.file-title {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-sub {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

.btn-remove {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: color 0.2s;
}

.btn-remove:hover {
  color: var(--danger);
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.btn-crop-trigger,
.btn-markup-trigger,
.btn-redact-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-crop-trigger:hover,
.btn-markup-trigger:hover,
.btn-redact-trigger:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--surface);
}

/* Options Grid */
.options-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

@media (max-width: 600px) {
  .options-panel {
    grid-template-columns: 1fr;
  }
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.option-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s;
  text-overflow: ellipsis;
}

.form-control:focus {
  border-color: var(--accent);
}

.form-control.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
}

/* Checkbox */
.checkbox-group {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.checkbox-label input[type="checkbox"]:focus-visible + .custom-checkbox {
  outline: 2px solid var(--accent-light, #a78bfa);
  outline-offset: 2px;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.checkbox-label input[type="checkbox"]:checked + .custom-checkbox {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-label input[type="checkbox"]:checked + .custom-checkbox::after {
  content: "✓";
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.checkbox-text {
  font-size: 0.9rem;
}

.checkbox-sub {
  color: var(--muted);
  font-size: 0.82rem;
  margin-left: 4px;
}

/* Turnstile */
.turnstile-container {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

/* Progress Bar */
.progress-container {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #a78bfa);
  background-size: 100% 100%;
  transition: width 0.2s cubic-bezier(0.2, 0.6, 0.35, 1);
}

.progress-bar.active {
  background: linear-gradient(90deg, var(--accent), #a78bfa, var(--accent));
  background-size: 200% 100%;
  animation: progressPulse 2.2s ease-in-out infinite;
}

@keyframes progressPulse {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.progress-status {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Success Card */
.success-badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.success-preview-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 20px;
}

.success-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.success-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.success-filename {
  font-weight: 600;
  font-size: 1.05rem;
  word-break: break-all;
}

.timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--accent-light);
  font-weight: 600;
}

.opt-badge {
  color: var(--success);
}

.opt-badge.neutral {
  color: var(--muted);
}

.embed-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.embed-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.embed-label {
  width: 80px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.embed-field .form-control {
  flex: 1;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}

.qr-container {
  margin-top: 24px;
  padding: 24px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}

.qr-caption {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 10px;
}


/* Tablet Layout */
@media (max-width: 860px) and (min-width: 641px) {
  .uploader {
    max-width: 100%;
  }
}

/* Mobile Responsive Layout */
@media (max-width: 640px) {
  /* Uploader Card */
  .card {
    padding: 18px 14px;
    border-radius: var(--radius-sm);
  }

  .card-header {
    margin-bottom: 18px;
  }

  .card-header h1 {
    font-size: 1.35rem;
    letter-spacing: -0.01em;
  }

  .card-header h2 {
    font-size: 1.2rem;
  }

  .subtitle {
    font-size: 0.86rem;
  }

  /* Dropzone */
  .dropzone {
    padding: 24px 12px;
    border-radius: var(--radius-sm);
  }

  .drop-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
  }

  .drop-text {
    font-size: 0.95rem;
    margin-bottom: 4px;
  }

  .drop-formats {
    gap: 4px;
    margin: 4px 0 8px;
  }

  .format-badge {
    padding: 1px 6px;
    font-size: 0.67rem;
  }

  .drop-hint {
    font-size: 0.78rem;
    line-height: 1.4;
  }

  /* Selected File Box inside Dropzone */
  .file-selected-box {
    padding: 10px 12px;
    gap: 10px;
  }

  .file-thumb {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
  }

  .file-title {
    font-size: 0.88rem;
  }

  .file-sub {
    font-size: 0.76rem;
  }

  /* Options Panel */
  .options-panel {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 14px;
  }

  .option-label {
    font-size: 0.8rem;
  }

  .form-control {
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  /* Checkbox Group */
  .checkbox-group {
    margin-top: 12px;
    padding: 10px 12px;
  }

  .checkbox-label {
    align-items: flex-start;
    gap: 8px;
  }

  .custom-checkbox {
    margin-top: 2px;
    flex-shrink: 0;
  }

  .checkbox-text {
    font-size: 0.86rem;
    line-height: 1.35;
  }

  .checkbox-sub {
    display: block;
    margin-left: 0;
    margin-top: 2px;
    font-size: 0.78rem;
  }

  .submit-row {
    margin-top: 14px;
  }

  .btn-block {
    padding: 12px;
    font-size: 0.96rem;
  }

  /* Success Screen */
  .success-preview-wrap {
    padding: 12px;
    gap: 12px;
    align-items: center;
  }

  .success-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
  }

  .success-filename {
    font-size: 0.92rem;
  }

  .timer-badge {
    font-size: 0.78rem;
    padding: 4px 8px;
  }

  /* Embed Fields - Full Width Responsive Layout */
  .embed-stack {
    gap: 10px;
    margin-bottom: 18px;
  }

  .embed-field {
    flex-wrap: wrap;
    gap: 6px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
  }

  .embed-label {
    width: 100%;
    font-size: 0.74rem;
    color: var(--accent-light);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
  }

  .embed-field .form-control {
    flex: 1;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .embed-field .btn-copy {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  /* Success Action Buttons - 2x2 Grid */
  .success-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .success-actions .btn {
    width: 100%;
    padding: 10px 8px;
    font-size: 0.84rem;
  }

}

@media (max-width: 380px) {
  .success-actions {
    grid-template-columns: 1fr;
  }

  .trust-pill {
    font-size: 0.72rem;
    padding: 5px 8px;
  }
}

/* ==========================================================================
   Multi-Image Drop & Gallery Exporter Component
   ========================================================================== */

.files-multi-box {
  width: 100%;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.multi-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.multi-count-pill {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-light);
  background: rgba(124, 92, 255, 0.12);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(124, 92, 255, 0.25);
}

.btn-text-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.btn-text-remove:hover {
  color: var(--danger);
}

.multi-file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.multi-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  gap: 10px;
}

.multi-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.multi-item-thumb {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
  background: #000;
  flex-shrink: 0;
}

.multi-item-meta {
  min-width: 0;
  flex: 1;
}

.multi-item-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.multi-item-size {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-remove-item {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s ease;
}

.btn-remove-item:hover {
  color: var(--danger);
}

.multi-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-crop-item,
.btn-markup-item,
.btn-redact-item {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.btn-crop-item:hover,
.btn-markup-item:hover,
.btn-redact-item:hover {
  color: var(--primary);
}

/* Gallery Success View & ImgBB-Style Exporter */
.gallery-preview-wrap {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.gallery-thumb-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
  justify-content: center;
  max-width: 100%;
}

.gallery-thumb-strip img {
  width: 56px;
  min-width: 56px;
  max-width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #000;
  flex-shrink: 0;
  overflow: hidden;
  transition: transform 0.15s ease;
}

.gallery-thumb-strip img:hover {
  transform: scale(1.05);
}

.gallery-meta-info {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.gallery-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  line-height: 1.2;
}

.gallery-badge-count {
  background: rgba(124, 92, 255, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(124, 92, 255, 0.3);
}

.gallery-badge-time {
  background: rgba(124, 92, 255, 0.1);
  color: #c4b5fd;
  border: 1px solid rgba(124, 92, 255, 0.2);
}

.gallery-badge-burn {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.bulk-exporter-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 14px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exporter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.exporter-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.exporter-dropdown {
  flex: 1;
  max-width: 260px;
  background: var(--surface-inner);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  color-scheme: dark;
}

.exporter-dropdown optgroup {
  background-color: #14141a;
  color: #a78bfa;
  font-weight: 700;
}

.exporter-dropdown option {
  background-color: #1c1c24;
  color: #e7e7ee;
  padding: 8px 12px;
}

.exporter-dropdown:focus {
  outline: none;
  border-color: var(--accent);
}

.bulk-textarea {
  width: 100%;
  min-height: 72px;
  max-height: 160px;
  background: var(--surface-inner);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}

.bulk-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(124, 92, 255, 0.2);
}

/* Desktop Only Crop and Markup Lockout */
@media (max-width: 640px) {
  .btn-crop-trigger,
  .btn-crop-item,
  .btn-markup-trigger,
  .btn-markup-item,
  .desktop-only {
    display: none !important;
  }

  .exporter-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .exporter-dropdown {
    max-width: 100%;
    width: 100%;
  }
}


/* --- public/css/sections.css --- */
/* ==========================================================================
   PoofShare - Content & Feature Sections
   ========================================================================== */
/* Trust & Highlights Strip */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 28px auto 10px;
  max-width: 1200px;
  padding: 0;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 0.82rem;
  color: var(--muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.pill-svg {
  flex-shrink: 0;
  display: block;
}

.trust-pill:hover {
  border-color: rgba(124, 92, 255, 0.4);
  transform: translateY(-1px);
}

.trust-pill strong {
  color: var(--text);
  font-weight: 600;
}

/* Section Shared Headers */
.section-header {
  text-align: center;
  margin-bottom: 32px;
}

.section-tag {
  color: var(--accent-light);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 8px;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.5;
}

/* How It Works Steps */
.steps-section {
  width: 100%;
  max-width: 1200px;
  margin: 48px auto 20px;
  padding: 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.step-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
}

.step-num {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 2.2rem;
  font-weight: 900;
  color: #7066a2;
  line-height: 1;
  pointer-events: none;
  font-family: inherit;
  user-select: none;
}

.step-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(124, 92, 255, 0.1);
  border: 1px solid rgba(124, 92, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a78bfa;
  margin-bottom: 14px;
}

.step-icon {
  font-size: 1.6rem;
  margin-bottom: 14px;
}

.step-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.step-desc {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.55;
}

.step-desc kbd {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 0.75rem;
  color: var(--text);
  font-family: inherit;
}

/* Features Showcase */
.features-section {
  width: 100%;
  max-width: 1200px;
  margin: 48px auto 30px;
  padding: 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 92, 255, 0.5);
  box-shadow: 0 10px 28px rgba(124, 92, 255, 0.08);
}

.feature-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: rgba(124, 92, 255, 0.1);
  border: 1px solid rgba(124, 92, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a78bfa;
  font-size: 1.35rem;
  margin-bottom: 16px;
}

/* Feature Accent Palettes */
.feature-accent-amber,
.feature-accent-emerald,
.feature-accent-violet,
.feature-accent-blue,
.feature-accent-indigo,
.feature-accent-cyan {
  background: rgba(124, 92, 255, 0.1);
  border: 1px solid rgba(124, 92, 255, 0.25);
  color: #a78bfa;
}

.modal-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(124, 92, 255, 0.1);
  border: 1px solid rgba(124, 92, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.about-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(124, 92, 255, 0.08);
  border: 1px solid rgba(124, 92, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.drop-overlay-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: rgba(124, 92, 255, 0.15);
  border: 1px solid rgba(124, 92, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin: 0 auto 16px;
}

.pill-svg {
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.9;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.feature-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Privacy Guarantees Section */
.guarantees-section {
  width: 100%;
  max-width: 1200px;
  margin: 56px auto 20px;
  padding: 0;
}

.guarantees-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.guarantee-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.guarantee-card:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 92, 255, 0.4);
  box-shadow: 0 10px 28px rgba(124, 92, 255, 0.08);
}

.guarantee-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(124, 92, 255, 0.1);
  border: 1px solid rgba(124, 92, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a78bfa;
  margin-bottom: 16px;
}

.guarantee-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.guarantee-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* Use Cases Section */
.usecases-section {
  width: 100%;
  max-width: 1200px;
  margin: 56px auto 20px;
  padding: 0;
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.usecase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.usecase-card:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 92, 255, 0.4);
  box-shadow: 0 10px 28px rgba(124, 92, 255, 0.08);
}

.usecase-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(124, 92, 255, 0.1);
  border: 1px solid rgba(124, 92, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a78bfa;
  margin-bottom: 16px;
}

.usecase-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.usecase-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* Latest Guides & Insights (Blog Gateway) */
.guides-section {
  width: 100%;
  max-width: 1200px;
  margin: 56px auto 20px;
  padding: 0;
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.guide-card:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 92, 255, 0.45);
  box-shadow: 0 10px 28px rgba(124, 92, 255, 0.08);
}

.guide-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.guide-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: 4px;
}

.guide-tag-accent {
  background: rgba(124, 92, 255, 0.12);
  color: var(--accent-light);
  border: 1px solid rgba(124, 92, 255, 0.25);
}

.guide-tag-emerald {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.guide-tag-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.guide-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(124, 92, 255, 0.08);
  border: 1px solid rgba(124, 92, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
}

.guide-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.guide-card:hover .guide-title {
  color: #fff;
}

.guide-desc {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 18px;
  flex: 1;
}

.guide-action {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent-light);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease, color 0.2s ease;
}

.guide-card:hover .guide-action {
  gap: 9px;
  color: #c4b5fd;
}

/* Tablet Layout */
@media (max-width: 900px) and (min-width: 641px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .guides-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .guides-grid .guide-card:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 860px) and (min-width: 769px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) and (min-width: 641px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* Mobile Responsive Layout */
@media (max-width: 640px) {
  /* Trust Strip */
  .trust-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 10px;
    width: 100%;
    max-width: 440px;
    margin: 18px auto 6px;
    padding: 0;
  }

  .trust-pill {
    width: 100%;
    padding: 7px 8px;
    font-size: 0.76rem;
    gap: 6px;
    border-radius: 18px;
    justify-content: flex-start;
    text-align: left;
    box-sizing: border-box;
    white-space: nowrap;
  }

  /* Steps Section */
  .steps-section {
    margin: 28px 0 10px;
    padding: 0;
  }

  .section-header {
    margin-bottom: 20px;
  }

  .section-tag {
    font-size: 0.72rem;
  }

  .section-title {
    font-size: 1.4rem;
    letter-spacing: -0.015em;
  }

  .section-subtitle {
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 16px;
  }

  .step-card {
    padding: 18px 16px;
  }

  .step-num {
    font-size: 1.8rem;
    top: 12px;
    right: 14px;
  }

  .step-icon {
    font-size: 1.4rem;
    margin-bottom: 10px;
  }

  .step-title {
    font-size: 0.98rem;
  }

  .step-desc {
    font-size: 0.82rem;
  }

  /* Features Section */
  .features-section {
    margin: 28px 0 10px;
    padding: 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .feature-card {
    padding: 18px 16px;
  }

  .feature-icon-wrap {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
    margin-bottom: 12px;
  }

  .feature-title {
    font-size: 0.98rem;
  }

  .feature-desc {
    font-size: 0.82rem;
  }

  /* Guarantees & Use Cases on Mobile */
  .guarantees-section,
  .usecases-section {
    margin: 28px 0 10px;
    padding: 0;
  }

  .guarantees-grid,
  .usecases-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 16px;
  }

  .guarantee-card,
  .usecase-card {
    padding: 18px 16px;
  }

  .guarantee-icon-wrap,
  .usecase-icon-wrap {
    width: 38px;
    height: 38px;
    margin-bottom: 12px;
  }

  .guarantee-title,
  .usecase-title {
    font-size: 0.98rem;
  }

  .guarantee-desc,
  .usecase-desc {
    font-size: 0.82rem;
  }

  /* Guides on Mobile */
  .guides-section {
    margin: 28px 0 10px;
    padding: 0;
  }

  .guides-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 16px;
  }

  .guide-card {
    padding: 18px 16px;
  }

  .guide-title {
    font-size: 0.98rem;
  }

  .guide-desc {
    font-size: 0.82rem;
  }
}

@media (max-width: 440px) {
  .trust-strip {
    grid-template-columns: 1fr;
    max-width: 300px;
  }

  .trust-pill {
    font-size: 0.78rem;
    padding: 8px 12px;
    justify-content: flex-start;
  }
}

@media (max-width: 360px) {
  .cf-turnstile {
    transform: scale(0.88);
    transform-origin: center;
  }
}



/* --- public/css/faq.css --- */
/* ==========================================================================
   PoofShare - Frequently Asked Questions (FAQ)
   ========================================================================== */
/* Frequently Asked Questions (FAQ) Section */
.faq-section {
  width: 100%;
  max-width: 960px;
  margin: 56px auto 20px;
  padding: 0;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.faq-item:hover {
  border-color: rgba(124, 92, 255, 0.35);
}

.faq-item[open] {
  border-color: rgba(124, 92, 255, 0.5);
  box-shadow: 0 6px 24px rgba(124, 92, 255, 0.08);
  background: rgba(26, 29, 39, 0.85);
}

.faq-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: color 0.2s ease;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-question {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.faq-item:hover .faq-question {
  color: #fff;
}

.faq-item[open] .faq-question {
  color: #fff;
}

.faq-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(124, 92, 255, 0.08);
  border: 1px solid rgba(124, 92, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  margin-left: 16px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.faq-chevron {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-item[open] .faq-icon-wrap {
  background: rgba(124, 92, 255, 0.25);
  border-color: rgba(124, 92, 255, 0.5);
  color: #fff;
}

.faq-content {
  padding: 0 22px 20px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 14px;
}

.faq-content p {
  margin: 0;
}


/* Mobile Responsive Layout */
@media (max-width: 640px) {
  /* FAQ Section on Mobile */
  .faq-section {
    margin: 32px 0 12px;
    padding: 0;
  }

  .faq-accordion {
    gap: 10px;
    margin-top: 18px;
  }

  .faq-summary {
    padding: 14px 16px;
  }

  .faq-question {
    font-size: 0.92rem;
    line-height: 1.4;
  }

  .faq-icon-wrap {
    width: 24px;
    height: 24px;
    margin-left: 12px;
  }

  .faq-content {
    padding: 0 16px 16px;
    font-size: 0.84rem;
    line-height: 1.5;
    padding-top: 12px;
  }

}


/* --- public/css/legal.css --- */
/* ==========================================================================
   PoofShare - Legal & Content Pages
   ========================================================================== */
/* Legal / Content Pages (Privacy Policy & Terms of Service) */
.legal-main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  flex: 1 0 auto;
}

.legal-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 24px;
  transition: color 0.2s ease;
}

.legal-back-link:hover {
  color: var(--accent);
}

.legal-card {
  max-width: 1040px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 44px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.legal-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
  margin-bottom: 32px;
}

.legal-badge {
  display: inline-block;
  background: rgba(124, 92, 255, 0.15);
  color: var(--accent-light);
  border: 1px solid rgba(124, 92, 255, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}

.legal-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 8px;
}

.legal-meta {
  font-size: 0.86rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

.legal-lead {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 28px;
}

.legal-callout {
  background: var(--surface-2);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin-bottom: 32px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
}

.legal-callout.warning {
  border-left-color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
}

.legal-callout strong {
  color: #fff;
}

.legal-section {
  margin-bottom: 32px;
}

.legal-section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.legal-section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 14px 0 8px;
}

.legal-section p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.legal-section ul {
  margin: 10px 0 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-section li {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

.legal-section li strong {
  color: var(--text);
}

.legal-contact-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin-top: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.legal-contact-box .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.legal-contact-info h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.legal-contact-info p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}


/* Tablet Layout */
@media (max-width: 900px) and (min-width: 641px) {
  .legal-main {
    padding: 28px 16px 60px;
  }

  .legal-card {
    padding: 32px 24px;
  }
}

/* Mobile Responsive Layout */
@media (max-width: 640px) {
  /* Legal Pages Mobile */
  .legal-main {
    padding: 20px 12px 36px;
  }

  .legal-card {
    padding: 24px 16px;
    border-radius: var(--radius-sm);
  }

  .legal-title {
    font-size: 1.6rem;
  }

  .legal-section h2 {
    font-size: 1.18rem;
  }

  .legal-contact-box {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 16px;
    gap: 16px;
  }

  .legal-contact-box .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* --- public/css/footer.css --- */
/* ==========================================================================
   PoofShare - Professional Footer Component
   ========================================================================== */

.footer {
  width: 100%;
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 60px;
  padding: 44px 0 32px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-brand {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  display: inline-block;
  transition: color 0.2s ease;
}

.footer-brand:hover {
  color: var(--accent);
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.45;
}

.footer-links {
  display: flex;
  gap: 8px 12px;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.footer-link,
.footer-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
}

.footer-link:hover,
.footer-link-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}


/* Tablet Layout */
@media (max-width: 900px) and (min-width: 641px) {
  .footer-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }
  .footer-brand-wrap {
    align-items: center;
    text-align: center;
  }
  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 16px;
  }
}

/* Mobile Responsive Layout (max-width: 640px) */
@media (max-width: 640px) {
  .footer {
    margin-top: 36px;
    padding: 32px 0 24px;
  }

  .footer-container {
    gap: 20px;
    align-items: center;
    padding: 0 16px;
  }

  .footer-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    width: 100%;
  }

  .footer-brand-wrap,
  .footer-top > div:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-brand {
    font-size: 1.2rem;
  }

  .footer-tagline {
    font-size: 0.82rem;
    max-width: 380px;
    margin: 4px auto 0;
  }

  .footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 12px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .footer-links > :nth-child(odd):last-child {
    grid-column: span 2;
  }

  .footer-link,
  .footer-link-btn {
    width: 100%;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.82rem;
    border-radius: 8px;
    text-align: center;
  }

  .footer-link:hover,
  .footer-link-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding-top: 16px;
    font-size: 0.75rem;
    width: 100%;
  }
}

/* Small Mobile Layout (max-width: 360px) */
@media (max-width: 360px) {
  .footer {
    padding: 24px 0 20px;
  }

  .footer-container {
    padding: 0 12px;
  }

  .footer-links {
    grid-template-columns: 1fr;
    max-width: 260px;
    gap: 6px;
  }

  .footer-links > :nth-child(odd):last-child {
    grid-column: span 1;
  }

  .footer-tagline {
    font-size: 0.8rem;
  }

  .footer-bottom {
    font-size: 0.72rem;
  }
}


/* --- public/css/modals.css --- */
/* ==========================================================================
   PoofShare - Modals, Drawers & Overlays
   ========================================================================== */
/* History Drawer Backdrop */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Recent Uploads Drawer */
.history-drawer {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100%;
  max-width: 440px;
  height: 520px;
  max-height: 100dvh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  border-top-left-radius: var(--radius);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6);
  z-index: 100;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  transform: translateY(105%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.history-drawer.open {
  visibility: visible;
  transform: translateY(0);
}

.drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.drawer-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.history-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-history {
  color: var(--muted);
  text-align: center;
  padding: 40px 10px;
  font-size: 0.9rem;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.history-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}

.history-info {
  flex: 1;
  overflow: hidden;
}

.history-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-time {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Modal Backdrop & Card */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 520px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon {
  font-size: 1.8rem;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.modal-subtitle {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 2px;
}

.modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 65vh;
  overflow-y: auto;
}

.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.about-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.about-feature strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 3px;
}

.about-feature p {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.45;
}

.about-story {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-story p {
  font-size: 0.86rem;
  color: var(--text);
  line-height: 1.6;
}

.about-links-row {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 8px;
}

.about-legal-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideUp {
  from { transform: translateY(14px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Full-Viewport Drag & Drop Overlay */
.viewport-drop-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: rgba(11, 11, 15, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.viewport-drop-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.viewport-drop-box {
  width: 100%;
  max-width: 540px;
  height: 300px;
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  background: rgba(124, 92, 255, 0.08);
  box-shadow: 0 0 50px rgba(124, 92, 255, 0.25), inset 0 0 30px rgba(124, 92, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 20px;
  animation: pulseDropBorder 2s infinite ease-in-out;
}

.viewport-drop-box * {
  pointer-events: none; /* Prevents dragenter/dragleave flicker on child elements */
}

@keyframes pulseDropBorder {
  0%, 100% {
    border-color: rgba(124, 92, 255, 0.6);
    box-shadow: 0 0 30px rgba(124, 92, 255, 0.15), inset 0 0 20px rgba(124, 92, 255, 0.05);
  }
  50% {
    border-color: rgba(124, 92, 255, 1);
    box-shadow: 0 0 60px rgba(124, 92, 255, 0.4), inset 0 0 40px rgba(124, 92, 255, 0.12);
  }
}

.drop-overlay-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  animation: bounceDropIcon 1.5s infinite ease-in-out;
}

@keyframes bounceDropIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.drop-overlay-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.drop-overlay-subtitle {
  font-size: 0.92rem;
  color: var(--muted);
}




/* Mobile Responsive Layout */
@media (max-width: 640px) {
  /* QR Modal on Mobile */
  .qr-container {
    padding: 16px 12px;
    margin-top: 16px;
  }

  #qr-canvas {
    max-width: 100%;
    height: auto;
  }

  /* Drawer on Mobile */
  .history-drawer {
    max-width: 100%;
    border-top-right-radius: var(--radius);
    height: 65vh;
  }

  /* Full-Viewport Drop Overlay Mobile */
  .viewport-drop-box {
    max-width: 92%;
    height: 240px;
    padding: 20px 14px;
  }

  .drop-overlay-icon {
    font-size: 2.6rem;
    margin-bottom: 10px;
  }

  .drop-overlay-title {
    font-size: 1.2rem;
  }

  .drop-overlay-subtitle {
    font-size: 0.8rem;
  }

}

/* ==========================================================================
   Redaction Studio Modal
   ========================================================================== */

.redact-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  width: 100vw;
  width: 100dvw;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  z-index: 10000;
  background: rgba(8, 9, 14, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  overscroll-behavior: none;
}

.redact-modal-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1100px;
  height: 92vh;
  height: 92dvh;
  max-height: 850px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  overscroll-behavior: none;
}

.redact-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.redact-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.redact-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.redact-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.btn-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-tool:hover {
  color: var(--text);
}

.btn-tool.active {
  background: var(--primary);
  color: #ffffff;
}

.redact-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.redact-size-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.size-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.brush-slider {
  width: 90px;
  cursor: pointer;
  accent-color: var(--primary);
}

.size-val {
  font-size: 0.78rem;
  color: var(--text);
  font-weight: 600;
  min-width: 34px;
}

.btn-tool-icon {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.btn-tool-icon:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-tool-icon:not(:disabled):hover {
  border-color: var(--primary);
  color: var(--primary);
}

.redact-viewport {
  flex: 1 1 0;
  min-height: 0;
  position: relative;
  background: #0a0b10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 16px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.redact-canvas {
  touch-action: none;
  cursor: crosshair;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  border-radius: 4px;
}

.redact-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  padding-bottom: max(12px, calc(10px + env(safe-area-inset-bottom, 0px)));
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.redact-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.redact-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 640px) {
  .redact-modal-overlay {
    padding: 0;
  }
  .redact-modal-container {
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-height: 100%;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
  }
  .redact-header {
    padding: 8px 12px;
    padding-top: max(8px, env(safe-area-inset-top, 0px));
    gap: 8px;
  }
  .redact-title {
    font-size: 0.9rem;
  }
  .btn-tool {
    padding: 5px 8px;
    font-size: 0.76rem;
  }
  .redact-viewport {
    padding: 8px;
  }
  .redact-footer {
    padding: 10px 12px;
    padding-bottom: max(12px, calc(10px + env(safe-area-inset-bottom, 0px)));
  }
  .redact-hint {
    display: none;
  }
  .redact-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .redact-actions .btn {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 9px 12px;
    font-size: 0.88rem;
  }
}

/* ==========================================================================
   Quick Crop & Trim Modal (Desktop Only)
   ========================================================================== */

.crop-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  width: 100vw;
  width: 100dvw;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  z-index: 10000;
  background: rgba(8, 9, 14, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  overscroll-behavior: none;
}

.crop-modal-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1100px;
  height: 92vh;
  height: 92dvh;
  max-height: 850px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  overscroll-behavior: none;
}

.crop-header {
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.crop-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.crop-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.crop-dim-badge {
  font-family: monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
}

.crop-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crop-viewport {
  flex: 1 1 0;
  min-height: 0;
  position: relative;
  background: #0a0b10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 20px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.crop-stage {
  position: relative;
  display: inline-block;
  overflow: visible;
  user-select: none;
  touch-action: none;
  line-height: 0;
}

.crop-image {
  display: block;
  max-width: min(100%, 1020px);
  max-height: min(calc(92dvh - 160px), 680px);
  width: auto;
  height: auto;
  user-select: none;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  border-radius: 4px;
}

.crop-box {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65);
  cursor: move;
  touch-action: none;
}

/* Rule of thirds grid lines */
.crop-grid-h {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  border-top: 1px dashed rgba(255, 255, 255, 0.35);
  pointer-events: none;
}
.crop-grid-h1 { top: 33.333%; }
.crop-grid-h2 { top: 66.666%; }

.crop-grid-v {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  border-left: 1px dashed rgba(255, 255, 255, 0.35);
  pointer-events: none;
}
.crop-grid-v1 { left: 33.333%; }
.crop-grid-v2 { left: 66.666%; }

/* Corner and Edge Handles */
.crop-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--primary);
  border: 2px solid #ffffff;
  border-radius: 2px;
  box-sizing: border-box;
  z-index: 2;
}

.handle-nw { top: -5px; left: -5px; cursor: nwse-resize; }
.handle-ne { top: -5px; right: -5px; cursor: nesw-resize; }
.handle-se { bottom: -5px; right: -5px; cursor: nwse-resize; }
.handle-sw { bottom: -5px; left: -5px; cursor: nesw-resize; }

.handle-n { top: -5px; left: calc(50% - 5px); cursor: ns-resize; }
.handle-s { bottom: -5px; left: calc(50% - 5px); cursor: ns-resize; }
.handle-w { top: calc(50% - 5px); left: -5px; cursor: ew-resize; }
.handle-e { top: calc(50% - 5px); right: -5px; cursor: ew-resize; }

.crop-footer {
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  gap: 16px;
}

.crop-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.crop-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Mobile Lockout: strictly hide the desktop crop modal on <= 640px screens */
@media (max-width: 640px) {
  .crop-modal-overlay,
  #crop-modal,
  .markup-modal-overlay,
  #markup-modal {
    display: none !important;
  }
}

/* ==========================================================================
   Arrow, Box & Callout Markup Studio Modal (Desktop Only)
   ========================================================================== */

.markup-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  width: 100vw;
  width: 100dvw;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  z-index: 10000;
  background: rgba(8, 9, 14, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  overscroll-behavior: none;
}

.markup-modal-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1100px;
  height: 92vh;
  height: 92dvh;
  max-height: 850px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  overscroll-behavior: none;
}

.markup-header {
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.markup-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.markup-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.markup-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.btn-markup-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-markup-tool:hover {
  color: var(--text);
}

.btn-markup-tool.active {
  background: var(--primary);
  color: #ffffff;
}

.markup-text-wrap {
  display: flex;
  align-items: center;
}

.markup-input-text {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.82rem;
  padding: 5px 10px;
  width: 170px;
  outline: none;
  transition: border-color 0.18s ease;
}

.markup-input-text:focus {
  border-color: var(--primary);
}

.markup-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.markup-palette {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.btn-color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--swatch-color);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.btn-color-swatch:hover {
  transform: scale(1.15);
}

.btn-color-swatch.active {
  border-color: #ffffff;
  transform: scale(1.18);
  box-shadow: 0 0 0 2px var(--surface-2), 0 0 6px var(--swatch-color);
}

.markup-stroke-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.markup-viewport {
  flex: 1 1 0;
  min-height: 0;
  position: relative;
  background: #0a0b10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 16px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.markup-canvas {
  touch-action: none;
  cursor: crosshair;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  border-radius: 4px;
}

.markup-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.markup-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.markup-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}



