:root {
  --cream-1: #f7ede2;
  --cream-2: #e8d5b7;
  --paper: #fdfdf7;
  --paper-shadow: rgba(60, 42, 20, 0.18);
  --ink: #2f2a24;
  --ink-soft: #6b5f52;
  --gold: #b08968;
  --gold-dark: #8b6c4a;
  --accent: #7a3b3b;
  --danger: #b53f3f;
  --radius: 6px;
  --safe-top: env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, var(--cream-1) 0%, var(--cream-2) 100%);
  min-height: 100dvh;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

.bg-noise {
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.2  0 0 0 0 0.15  0 0 0 0 0.1  0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  z-index: 0;
}

#app { position: relative; z-index: 1; min-height: 100dvh; }

.view {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--safe-top) + 32px) 24px calc(var(--safe-bottom) + 24px);
  min-height: 100dvh;
}
.view.is-active { display: flex; }

.wed-header { text-align: center; margin-bottom: 28px; }
.wed-eyebrow {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--gold-dark);
  margin: 0 0 4px;
  letter-spacing: 0.5px;
}
.wed-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(38px, 9vw, 56px);
  color: var(--ink);
  margin: 0;
  line-height: 1;
  letter-spacing: -0.5px;
}
.wed-title .amp {
  font-style: italic;
  color: var(--gold);
  margin: 0 4px;
}
.wed-date {
  font-family: 'Fraunces', serif;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 12px 0 0;
}

.polaroid {
  background: var(--paper);
  padding: 14px 14px 22px;
  border-radius: 3px;
  box-shadow:
    0 1px 2px rgba(60,42,20,0.10),
    0 12px 28px -6px var(--paper-shadow),
    0 24px 40px -12px rgba(60,42,20,0.14);
  transform: rotate(-1.5deg);
  transition: transform 0.4s ease;
  margin-bottom: 28px;
  max-width: 260px;
  width: 82vw;
}
.polaroid-onboarding { transform: rotate(-1.5deg); }
.polaroid-home { transform: rotate(1.2deg); max-width: 300px; }

.polaroid-photo {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #e8d5b7 0%, #d6bfa0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  overflow: hidden;
}
.polaroid-photo.empty {
  background: linear-gradient(135deg, #f0e4d3 0%, #e0cdb4 100%);
  flex-direction: column;
  padding: 20px;
  text-align: center;
}
.polaroid-icon {
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}
.polaroid-caption {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  text-align: center;
  color: var(--ink);
  margin: 12px 0 0;
}
.soon-title {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  color: var(--ink);
  margin: 0 0 8px;
}
.soon-text {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
}

.wed-form {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wed-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
  letter-spacing: 0.3px;
}
.wed-label span { padding-left: 4px; }
.wed-label input {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 17px;
  color: var(--ink);
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid rgba(176,137,104,0.35);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  -webkit-appearance: none;
}
.wed-label input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176,137,104,0.18);
}
.wed-hint {
  font-size: 12px;
  color: var(--ink-soft);
  margin: 4px 4px 0;
  line-height: 1.5;
  text-align: center;
}
.wed-error {
  background: rgba(181,63,63,0.10);
  color: var(--danger);
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  margin: 4px 0 0;
  border: 1px solid rgba(181,63,63,0.25);
}

.wed-btn {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
  border: none;
  padding: 16px 24px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 18px -4px rgba(139,108,74,0.5);
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  margin-top: 8px;
  letter-spacing: 0.3px;
  -webkit-appearance: none;
}
.wed-btn:active { transform: scale(0.98); }
.wed-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.wed-btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  box-shadow: none;
  border: 1px solid rgba(176,137,104,0.4);
  margin-top: 24px;
  font-weight: 500;
}

.wed-footer {
  margin-top: auto;
  padding-top: 32px;
  text-align: center;
  color: var(--ink-soft);
  font-family: 'Caveat', cursive;
  font-size: 16px;
}
.wed-footer p { margin: 0; }
.wed-credit {
  font-family: 'Inter', sans-serif !important;
  font-size: 10px !important;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 6px !important;
  opacity: 0.55;
}
.wed-credit span {
  font-weight: 600;
  color: var(--gold-dark);
}
/* El credit "by zubi" actúa como huevo de pascua en ambas vistas */
.admin-egg-trigger {
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 999px;
  transition: opacity 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
  display: inline-block;
}
.admin-egg-trigger:hover, .admin-egg-trigger:active {
  opacity: 0.9 !important;
  background: rgba(176,137,104,0.12);
}

@media (min-width: 500px) {
  .polaroid { max-width: 300px; }
}

/* Huevo de pascua */
.tap-egg {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Admin card */
.admin-card {
  background: var(--paper);
  border: 1px dashed rgba(176,137,104,0.5);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 12px 0 20px;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 4px 14px -6px rgba(60,42,20,0.15);
}
.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.admin-badge {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #fff;
  background: var(--gold-dark);
  padding: 4px 10px;
  border-radius: 999px;
}
.link-btn {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  text-decoration: underline;
  font-family: inherit;
}
.link-btn:hover { color: var(--accent); }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.stat-num {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1;
}
.stat-lbl {
  font-size: 10px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}
.admin-hint {
  font-size: 11px;
  color: var(--ink-soft);
  margin: 12px 0 0;
  text-align: center;
  font-style: italic;
}

.admin-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(176,137,104,0.2);
}
.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.admin-section h3 {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
}
.admin-search {
  width: 100%;
  padding: 10px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(176,137,104,0.3);
  border-radius: 8px;
  outline: none;
  margin-bottom: 10px;
  -webkit-appearance: none;
}
.admin-search:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(176,137,104,0.15);
}
.admin-guests {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid rgba(176,137,104,0.15);
  border-radius: 8px;
}
.admin-guest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(176,137,104,0.15);
  gap: 10px;
}
.admin-guest:last-child { border-bottom: none; }
.ag-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ag-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ag-meta {
  font-size: 11px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ag-delete {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(181,63,63,0.10);
  color: var(--danger);
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.ag-delete:hover, .ag-delete:active { background: rgba(181,63,63,0.22); }
.admin-empty {
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  font-style: italic;
  padding: 16px;
  margin: 0;
}

/* Confirm modal */
.confirm-body {
  font-size: 14px;
  color: var(--ink);
  text-align: center;
  line-height: 1.5;
  margin: 0 0 20px;
}
.confirm-actions {
  display: flex;
  gap: 10px;
}
.confirm-actions .wed-btn { flex: 1; margin-top: 0; }
.wed-btn-danger {
  background: linear-gradient(180deg, #c94848 0%, #a53535 100%) !important;
  box-shadow: 0 6px 18px -4px rgba(165,53,53,0.5) !important;
}
.wed-btn-danger-ghost {
  color: var(--danger) !important;
  border-color: rgba(181,63,63,0.35) !important;
}

/* Count badge */
.count-badge {
  display: inline-block;
  min-width: 22px;
  padding: 2px 8px;
  background: var(--gold);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 6px;
  font-family: 'Inter', sans-serif;
}

/* Cards de invitado clicables */
.admin-guest {
  cursor: pointer;
  transition: background 0.15s;
}
.admin-guest:hover { background: rgba(176,137,104,0.06); }
.admin-guest .ag-name .role-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 4px;
  border-radius: 6px;
  background: rgba(176,137,104,0.15);
  font-size: 11px;
  vertical-align: middle;
}

/* Modal ancho para detalle invitado */
.modal-card-wide {
  max-width: 420px;
}
.guest-modal-head {
  text-align: center;
  margin-bottom: 16px;
}
.gm-slug {
  font-size: 12px;
  color: var(--ink-soft);
  margin: 4px 0 0;
  font-family: 'Inter', monospace;
}
.gm-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px 8px;
  background: rgba(176,137,104,0.08);
  border-radius: 8px;
}
.gm-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.gm-num {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  color: var(--ink);
  line-height: 1;
}
.gm-lbl {
  font-size: 10px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.gm-meta {
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 16px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.02);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gm-meta-lbl {
  font-weight: 500;
  color: var(--ink);
}
.gm-section-title {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 8px;
}
.gm-roles-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.role-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(176,137,104,0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.role-row:hover { background: rgba(176,137,104,0.12); }
.role-info { flex: 1; min-width: 0; }
.role-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.role-icon { font-size: 14px; }
.role-desc {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 2px;
  line-height: 1.4;
}

/* Toggle switch iOS-style */
.switch {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  width: 42px;
  height: 24px;
  background: rgba(0,0,0,0.15);
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.switch::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.2s;
}
.switch:checked {
  background: var(--gold);
}
.switch:checked::before {
  transform: translateX(18px);
}

.gm-actions {
  display: flex;
  gap: 10px;
}
.gm-actions .wed-btn { flex: 1; margin-top: 0; }

.me-chip {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
  font-family: 'Inter', sans-serif;
}
.ag-delete:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: rgba(0,0,0,0.05);
  color: var(--ink-soft);
}
.admin-full-btn {
  width: 100%;
  margin-top: 12px !important;
  font-size: 13px;
  padding: 10px 16px !important;
}
.wed-success {
  background: rgba(112, 156, 96, 0.15);
  color: #4a7a3a;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  margin: 4px 0 0;
  border: 1px solid rgba(112, 156, 96, 0.35);
}
.wed-notice {
  background: rgba(220, 155, 40, 0.12);
  color: #7a5210;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 12.5px;
  margin: -4px 0 6px;
  border: 1px solid rgba(220, 155, 40, 0.45);
  line-height: 1.5;
}
.wed-notice em { font-style: italic; font-weight: 600; }
.pin-input {
  letter-spacing: 12px !important;
  text-align: center;
  font-size: 22px !important;
  font-weight: 600;
  font-family: 'Inter', monospace !important;
}
.forgot-link {
  margin: 8px auto 0;
  display: block;
  text-align: center;
}
.not-me-link {
  margin: -4px auto 4px;
  display: block;
  text-align: center;
  color: var(--accent) !important;
  font-weight: 500;
}
.modal-hint {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 16px;
  text-align: center;
  line-height: 1.5;
}
.pin-request-badge {
  display: inline-block;
  background: rgba(220, 100, 40, 0.15);
  color: #b8541a;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 4px;
  border: 1px solid rgba(220, 100, 40, 0.35);
}
.admin-guest.has-pin-request {
  background: rgba(220, 100, 40, 0.06);
  border-left: 3px solid rgba(220, 100, 40, 0.5);
}
.gm-pin-request {
  background: rgba(220, 100, 40, 0.10);
  border: 1px solid rgba(220, 100, 40, 0.35);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.gm-pin-request p {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
}
.gm-pin-request .wed-btn {
  margin-top: 0;
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
}
.gm-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.gm-tool-btn {
  margin-top: 0 !important;
  padding: 10px 14px !important;
  font-size: 13px !important;
  text-align: left !important;
  border-radius: 8px !important;
}
.gm-link-info {
  font-size: 12px;
  color: var(--ink-soft);
  font-style: italic;
  margin: -6px 0 12px;
  padding: 0 4px;
  text-align: center;
}
.link-badge {
  display: inline-block;
  background: rgba(80, 130, 200, 0.15);
  color: #2c5a8a;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 4px;
  border: 1px solid rgba(80, 130, 200, 0.35);
  letter-spacing: 0.3px;
}

/* Upload zone */
.upload-zone {
  width: 100%;
  max-width: 340px;
  margin: 12px 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.upload-btn {
  width: 100%;
  font-size: 17px;
  padding: 18px 24px;
}
.upload-progress {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
  text-align: center;
  padding: 8px 14px;
  background: rgba(176,137,104,0.10);
  border-radius: 8px;
  width: 100%;
}
.upload-progress.is-error {
  background: rgba(181,63,63,0.15);
  color: var(--danger);
}

/* Shortcut admin→invitado */
.become-guest-card {
  width: 100%;
  max-width: 340px;
  background: var(--paper);
  border: 1px dashed rgba(176,137,104,0.4);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 12px 0 20px;
}
.bg-title {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  color: var(--ink);
  margin: 0 0 4px;
  text-align: center;
}
.bg-sub {
  font-size: 12px;
  color: var(--ink-soft);
  margin: 0 0 12px;
  text-align: center;
}
.become-guest-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.become-guest-form .wed-label { font-size: 11px; }
.become-guest-form .wed-label input { padding: 10px 12px; font-size: 15px; }
.become-guest-form .wed-btn { font-size: 14px; padding: 12px 18px; }

/* Galería */
.gallery-wrap {
  width: 100%;
  max-width: 720px;
  margin-top: 8px;
}
.gallery-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
  padding: 0 4px;
}
.gallery-title {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.g-cell {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  background: rgba(176,137,104,0.08);
}
.g-cell img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.g-cell:active img { transform: scale(0.96); }
.g-cell.g-hidden img {
  filter: grayscale(0.6) brightness(0.7);
}
.g-cell.g-hidden::before {
  content: '👁 Oculta';
  position: absolute;
  top: 6px; left: 6px; right: 6px;
  z-index: 2;
  background: rgba(220, 100, 40, 0.92);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.g-author {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.55) 100%);
  color: #fff;
  font-size: 11px;
  padding: 12px 6px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gallery-empty {
  text-align: center;
  color: var(--ink-soft);
  font-style: italic;
  padding: 40px 20px;
  margin: 0;
  border: 1px dashed rgba(176,137,104,0.3);
  border-radius: 10px;
  font-size: 14px;
}

@media (min-width: 500px) {
  .gallery { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 800px) {
  .gallery { grid-template-columns: repeat(5, 1fr); }
}

/* Viewer fullscreen */
.viewer {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 6, 0.94);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 16px;
  padding-top: calc(var(--safe-top) + 60px);
  padding-bottom: calc(var(--safe-bottom) + 60px);
}
.viewer[hidden] { display: none; }
.viewer-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.viewer-close {
  position: absolute;
  top: calc(var(--safe-top) + 12px);
  right: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
}
.viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.viewer-prev { left: 12px; }
.viewer-next { right: 12px; }
.viewer-meta {
  position: absolute;
  bottom: calc(var(--safe-bottom) + 16px);
  left: 16px; right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  font-size: 14px;
  z-index: 2;
}
.viewer-actions { display: flex; gap: 8px; }
.viewer-action {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}
.viewer-action-danger {
  background: rgba(220, 60, 60, 0.5);
}
.viewer-action-active {
  background: rgba(220, 100, 40, 0.9) !important;
  font-weight: 600;
}
.viewer-hidden-banner {
  position: absolute;
  top: calc(var(--safe-top) + 60px);
  left: 16px; right: 16px;
  background: rgba(220, 100, 40, 0.95);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.viewer-img-hidden {
  opacity: 0.8;
  filter: grayscale(0.25);
}


/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 22, 12, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  padding-top: calc(var(--safe-top) + 24px);
  padding-bottom: calc(var(--safe-bottom) + 24px);
  animation: modalFadeIn 0.2s ease-out;
}
.modal-backdrop[hidden] { display: none; }
@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 340px;
  padding: 28px 24px 24px;
  transform: rotate(0) !important;
  animation: modalPopIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalPopIn {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--ink-soft);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.modal-close:hover { background: rgba(60,42,20,0.08); }
.modal-title {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 18px;
  text-align: center;
}

