/* Follow You · sistema visual editorial: marfil, tinta y un solo acento vino tinto. */
:root {
  --paper: #faf7f2;
  --surface: #ffffff;
  --ink: #1f1a17;
  --ink-2: #4a423c;
  --muted: #857a70;
  --line: #ebe4da;
  --line-2: #d9cfc2;
  --accent: #8f1d45;
  --accent-soft: #f6e7ec;
  --gold: #9a7128;
  --gold-soft: #f5ecd9;
  --ok: #3f6b4a;
  --ok-soft: #e7efe6;
  --err: #a3322b;
  --err-soft: #f7e4e1;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(31 26 23 / 5%), 0 8px 24px rgb(31 26 23 / 7%);
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.1; font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: lining-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.wordmark {
  font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: 0.01em;
  text-decoration: none; white-space: nowrap;
}

/* ---------- Botones y formularios ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 14px; letter-spacing: 0.02em; text-decoration: none; cursor: pointer;
  white-space: nowrap; transition: background 0.2s, border-color 0.2s, transform 0.1s;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: scale(0.98); }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { background: #000; }
.btn-primary[disabled] { background: var(--line-2); border-color: var(--line-2); cursor: not-allowed; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-light { background: rgb(255 255 255 / 92%); border-color: transparent; color: var(--ink); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn-link { background: none; border: 0; padding: 0; min-height: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; cursor: pointer; }
.btn-wa { background: #1f7a4d; border-color: #1f7a4d; color: #fff; }
.btn-wa:hover { background: #196640; border-color: #196640; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent; cursor: pointer; color: inherit; text-decoration: none;
}

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, select.input {
  width: 100%; min-height: 50px; padding: 10px 16px;
  border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); font-size: 16px;
}
.input:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: transparent; }
textarea.input { resize: vertical; min-height: 84px; }
label.check { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 4px 0 14px; cursor: pointer; }
label.check input { width: 18px; height: 18px; accent-color: var(--ink); }

.alert { padding: 12px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-error { background: var(--err-soft); color: var(--err); }
.alert-warn { background: var(--gold-soft); color: #6b4e17; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--line); color: var(--ink-2); white-space: nowrap;
}
.chip .icon { width: 13px; height: 13px; }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-warn { background: var(--gold-soft); color: #6b4e17; }
.chip-err { background: var(--err-soft); color: var(--err); }
.chip-ai { background: var(--gold-soft); color: #6b4e17; }
.chip-accent { background: var(--accent-soft); color: var(--accent); }

/* ---------- Login ---------- */
.login { min-height: 100svh; display: grid; grid-template-rows: minmax(260px, 46svh) 1fr; }
.login-photo { position: relative; overflow: hidden; background: #2a2320; }
.login-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.login-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(20 16 14 / 35%) 0%, rgb(20 16 14 / 0%) 35%, rgb(250 247 242 / 0%) 70%, var(--paper) 100%); }
.login-photo .wordmark { position: absolute; top: 20px; left: 20px; z-index: 1; color: #fff; font-size: 26px; }
.login-body { padding: 0 20px 32px; margin-top: -40px; position: relative; z-index: 1; }
.login-card { max-width: 400px; margin: 0 auto; }
.login-card .tagline { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--accent); margin-bottom: 4px; }
.login-card h1 { font-size: 38px; margin-bottom: 8px; }
.login-card p.lead { color: var(--muted); margin: 0 0 22px; }
.login-card .btn { width: 100%; margin-top: 4px; }
.auth-foot { text-align: center; font-size: 13px; color: var(--muted); margin-top: 24px; }
@media (min-width: 900px) {
  .login { grid-template-rows: none; grid-template-columns: 1.1fr 1fr; }
  .login-photo::after { background: linear-gradient(90deg, rgb(20 16 14 / 10%), rgb(20 16 14 / 0%) 70%); }
  .login-body { margin: 0; display: grid; place-items: center; padding: 40px; }
}

/* Login simple (estudio, errores) */
.auth { min-height: 100svh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .wordmark { display: block; text-align: center; font-size: 28px; margin-bottom: 28px; }
.auth-card h1 { font-size: 32px; margin-bottom: 6px; }
.auth-card p.lead { color: var(--muted); margin: 0 0 24px; }
.auth-card .btn { width: 100%; margin-top: 6px; }

/* ---------- Portada del alumno ---------- */
.hero {
  position: relative; height: 78svh; min-height: 460px; max-height: 820px; overflow: hidden;
  background: #2a2320 center / cover no-repeat; color: #fff;
}
.hero.compact { height: 46svh; min-height: 320px; }
.hero > img { position: absolute; top: 0; left: 0; width: 107%; height: 107%; /* recorta el código de la esquina */ object-fit: cover; object-position: center 30%; opacity: 0; transition: opacity 0.8s var(--ease); }
.hero > img.loaded { opacity: 1; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(20 16 14 / 45%) 0%, rgb(20 16 14 / 0%) 28%, rgb(20 16 14 / 10%) 50%, rgb(20 16 14 / 78%) 100%);
}
.hero-top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; max-width: 1200px; margin: 0 auto; }
.hero-top .wordmark { color: #fff; }
.hero-actions { display: flex; gap: 8px; }
.hero-actions .icon-btn { border-color: rgb(255 255 255 / 40%); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); background: rgb(0 0 0 / 12%); }
.hero-content { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 22px 30px; max-width: 1200px; margin: 0 auto; }
.hero-content .eyebrow { color: rgb(255 255 255 / 80%); }
.hero-content h1 { font-size: clamp(46px, 13vw, 84px); line-height: 0.95; margin: 10px 0 12px; font-weight: 500; }
.hero-content h1 span { display: block; font-size: 0.42em; font-style: italic; font-weight: 500; opacity: 0.9; margin-top: 6px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; font-size: 14px; color: rgb(255 255 255 / 88%); margin-bottom: 20px; }
.hero-meta .icon { width: 16px; height: 16px; }
.hero-meta span { display: inline-flex; gap: 6px; align-items: center; }
.hero-meta .urgent { color: #ffd2d8; font-weight: 700; }

.preview-bar {
  background: var(--ink); color: var(--paper); font-size: 13px;
  padding: 10px 16px; display: flex; gap: 12px; justify-content: space-between; align-items: center;
}
.preview-bar a { color: #fff; font-weight: 600; }

/* ---------- Pestañas ---------- */
.tabs {
  position: sticky; top: 0; z-index: 5;
  background: rgb(250 247 242 / 94%); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.tabs-inner { display: flex; gap: 22px; overflow-x: auto; padding: 0 18px; max-width: 1200px; margin: 0 auto; scrollbar-width: none; }
.tabs-inner::-webkit-scrollbar { display: none; }
.tab {
  flex: none; border: 0; background: none; padding: 15px 0 13px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; display: inline-flex; gap: 6px; align-items: center;
}
.tab .n { font-weight: 500; font-size: 12px; color: var(--muted); }
.tab .icon { width: 15px; height: 15px; }
.tab[aria-selected="true"] { color: var(--ink); border-color: var(--ink); }
.tab.tab-ai .icon { color: var(--gold); }

/* ---------- Galería (filas justificadas: sin recortar las fotos) ---------- */
.gallery-wrap { max-width: 1200px; margin: 0 auto; padding: 14px 0 130px; }
.gallery-intro { padding: 6px 18px 16px; }
.gallery-intro h2 { font-size: 30px; }
.gallery-intro p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.gallery-intro .btn { margin-top: 14px; }
.count-line { padding: 0 18px 10px; font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }

.jgrid { padding: 0 4px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
@media (min-width: 700px) { .jgrid { padding: 0 18px; } }
.jrow { display: flex; gap: 4px; margin-bottom: 4px; }
@media (min-width: 700px) { .jrow { gap: 8px; margin-bottom: 8px; } }

.tile {
  position: relative; flex: none; overflow: hidden; background: var(--line) center / cover no-repeat;
  border-radius: 2px;
}
.tile img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; opacity: 0; transition: opacity 0.5s var(--ease), transform 0.6s var(--ease); }
.tile img.loaded { opacity: 1; }
@media (hover: hover) { .tile:hover img { transform: scale(1.02); } }
.tile .open { position: absolute; inset: 0; border: 0; background: none; padding: 0; cursor: zoom-in; }
.tile::after { content: ""; position: absolute; inset: 0; pointer-events: none; transition: box-shadow 0.2s; }
.tile.is-selected::after { box-shadow: inset 0 0 0 3px var(--accent); }
.tile.is-extra::after { box-shadow: inset 0 0 0 3px var(--gold); }

.heart {
  position: absolute; right: 6px; bottom: 6px; width: 36px; height: 36px;
  display: grid; place-items: center; border: 0; border-radius: 999px; cursor: pointer; padding: 0;
  background: rgb(255 255 255 / 86%); color: var(--ink); -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s var(--ease), background 0.2s;
}
.heart .icon { width: 18px; height: 18px; stroke-width: 1.8; }
.heart:active { transform: scale(0.88); }
.tile.is-selected .heart { background: var(--accent); color: #fff; }
.tile.is-selected .heart .icon { fill: currentColor; }
.tile.is-extra .heart { background: var(--gold); }
.heart.pop { animation: pop 0.35s var(--ease); }
.heart.pop::before {
  content: ""; position: absolute; inset: -2px; border-radius: 999px; border: 2px solid var(--accent);
  animation: ring 0.5s var(--ease) forwards;
}
@keyframes pop { 40% { transform: scale(1.22); } }
@keyframes ring { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.1); opacity: 0; } }

.badge-ai, .badge-extra, .badge-note { position: absolute; pointer-events: none; }
.badge-ai { left: 6px; top: 6px; width: 24px; height: 24px; border-radius: 999px; background: rgb(255 255 255 / 90%); color: var(--gold); display: grid; place-items: center; }
.badge-ai .icon { width: 14px; height: 14px; }
.badge-extra { display: none; left: 6px; bottom: 8px; background: var(--gold); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; }
.badge-note { display: none; right: 46px; bottom: 11px; width: 26px; height: 26px; border-radius: 999px; background: rgb(255 255 255 / 90%); color: var(--ink); place-items: center; }
.badge-note .icon { width: 14px; height: 14px; }
.tile.is-extra .badge-extra { display: block; }
.tile.has-note .badge-note { display: grid; }
.locked .heart { pointer-events: none; }
.locked .tile:not(.is-selected) .heart { display: none; }
.empty { padding: 48px 18px; text-align: center; color: var(--muted); font-family: var(--serif); font-size: 20px; font-style: italic; }
.sentinel { height: 1px; }

/* ---------- Barra inferior ---------- */
.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: rgb(250 247 242 / 96%); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
}
.bottom-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 16px; }
.progress-text { flex: 1; min-width: 0; }
.progress-text .big { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.progress-text .big b { font-family: var(--serif); font-size: 30px; line-height: 1; color: var(--ink); font-weight: 600; font-variant-numeric: lining-nums; }
.progress-text .big .extra-count { color: var(--gold); font-weight: 700; white-space: nowrap; }
.bar { height: 3px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width 0.4s var(--ease); }
.bar.full i { background: var(--ok); }

.toast {
  position: fixed; left: 50%; bottom: 104px; transform: translate(-50%, 16px);
  background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 999px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: all 0.25s var(--ease); z-index: 70; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Visor ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 40; background: rgb(15 13 12 / 0%); color: #fff;
  display: none; grid-template-rows: auto 1fr auto auto;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: background 0.3s var(--ease);
}
.lightbox.open { display: grid; }
.lightbox.shown { background: rgb(15 13 12 / 100%); }
.lightbox > :not(.lb-stage) { opacity: 0; transition: opacity 0.3s var(--ease); }
.lightbox.shown > :not(.lb-stage) { opacity: 1; }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; gap: 12px; }
.lb-top .pos { font-size: 13px; color: #cfc6bd; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lb-top .pos b { color: #fff; }
.lb-tag { display: inline-flex; align-items: center; gap: 4px; color: #e9cf9a; font-size: 12px; }
.lb-tag .icon { width: 13px; height: 13px; }
.lb-close { width: 42px; height: 42px; border: 0; background: rgb(255 255 255 / 10%); color: #fff; border-radius: 999px; display: grid; place-items: center; cursor: pointer; }
.lb-stage { position: relative; min-height: 0; overflow: hidden; touch-action: pan-y; }
.lb-stage img { position: absolute; pointer-events: none; transform-origin: 0 0; will-change: transform; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 999px;
  border: 0; background: rgb(255 255 255 / 10%); color: #fff; cursor: pointer; display: none; place-items: center; z-index: 2;
}
@media (hover: hover) { .lb-nav { display: grid; } }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-note-preview { color: #e9cf9a; font-size: 13px; text-align: center; padding: 8px 16px 0; font-style: italic; }
.lb-bottom { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; justify-content: center; align-items: center; gap: 10px; }
.lb-heart, .lb-note {
  min-height: 50px; padding: 0 22px; border-radius: 999px; border: 1px solid rgb(255 255 255 / 30%);
  background: transparent; color: #fff; font-weight: 600; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; cursor: pointer; white-space: nowrap;
}
.lb-heart.on { background: var(--accent); border-color: var(--accent); }
.lb-heart.on .icon { fill: currentColor; }
.lb-heart.on.extra { background: var(--gold); border-color: var(--gold); }
.lb-note { padding: 0 16px; }
.lb-note.on { background: #e9cf9a; border-color: #e9cf9a; color: var(--ink); }
.lb-count { font-size: 13px; color: #cfc6bd; white-space: nowrap; }
.lb-notme { display: block; margin: 8px auto 0; background: none; border: 0; color: #cfc6bd; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 380px) { .lb-heart { padding: 0 16px; } }

/* ---------- Hojas (sheets) ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgb(20 16 14 / 45%); z-index: 60; display: flex; align-items: flex-end; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.25s var(--ease); }
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  background: var(--paper); width: 100%; max-width: 480px; border-radius: 24px 24px 0 0;
  padding: 26px 22px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(24px); transition: transform 0.3s var(--ease);
}
.sheet-backdrop.open .sheet { transform: none; }
@media (min-width: 600px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 24px; } }
.sheet h2 { font-size: 30px; margin-bottom: 8px; }
.sheet p { color: var(--ink-2); margin: 0 0 18px; }
.sheet .actions { display: grid; gap: 10px; }
.sheet .btn-link { justify-self: center; margin-top: 4px; }

.note-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.note-chip { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 500; cursor: pointer; }
.note-chip:active, .note-chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.sheet.intro { text-align: center; }
.intro-icon { width: 64px; height: 64px; border-radius: 999px; margin: 2px auto 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.intro-icon .icon { width: 28px; height: 28px; }
.intro-icon.gold { background: var(--gold-soft); color: var(--gold); }
.intro-icon.ok { background: var(--ok-soft); color: var(--ok); }
.intro-step p { min-height: 76px; }
.intro-dots { display: flex; justify-content: center; gap: 6px; margin: 4px 0 18px; }
.intro-dots i { width: 6px; height: 6px; border-radius: 999px; background: var(--line-2); transition: width 0.3s var(--ease); }
.intro-dots i.on { background: var(--ink); width: 22px; }

/* ---------- Revisar / listo ---------- */
.page-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 0; max-width: 820px; margin: 0 auto; }
.page-top a.back { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); text-decoration: none; }
.page { max-width: 820px; margin: 0 auto; padding: 8px 18px 130px; }
.page h1 { font-size: 40px; margin: 18px 0 6px; font-weight: 500; }
.page .lead { color: var(--muted); margin: 0 0 20px; }
.section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); margin: 26px 0 12px; }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 600px) { .review-grid { grid-template-columns: repeat(5, 1fr); } }
.review-item { position: relative; }
.review-item img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; border-radius: 2px; }
.review-item.is-extra img { outline: 3px solid var(--gold); outline-offset: -3px; }
.review-item .code { font-size: 11px; color: var(--muted); margin-top: 5px; letter-spacing: 0.04em; }
.review-item .note { font-size: 12px; color: var(--gold); font-style: italic; margin-top: 2px; }
.review-item .rm {
  position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 999px; border: 0;
  background: rgb(255 255 255 / 90%); color: var(--ink); cursor: pointer; display: grid; place-items: center;
}
.review-item .rm .icon { width: 15px; height: 15px; }
.summary-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; font-size: 14px; }
.summary-box div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.summary-box b { font-weight: 700; }
.summary-box .total { font-weight: 700; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }

.collage { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; height: 58svh; max-height: 560px; }
.collage img { width: 100%; height: 100%; object-fit: cover; }
.collage img:first-child { grid-row: span 2; }
.collage.n1 { grid-template-columns: 1fr; } .collage.n1 img:first-child { grid-row: span 2; }
.collage.n2, .collage.n3 { grid-template-columns: 2fr 1fr; }
.done-copy { text-align: center; padding: 30px 18px 10px; max-width: 560px; margin: 0 auto; }
.done-copy .tagline { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--accent); }
.done-copy h1 { font-size: 44px; font-weight: 500; margin: 6px 0 12px; }
.done-copy p { color: var(--ink-2); margin: 0 0 10px; }
.collage.short { height: 30svh; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
.pay-box { max-width: 420px; margin: 16px auto 14px; padding: 20px 18px 16px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pay-box .pay-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); }
.pay-box .pay-amount { font-family: var(--serif); font-size: 40px; font-weight: 600; font-variant-numeric: lining-nums; margin: 2px 0 14px; }
.pay-box .btn { width: 100%; }
.pay-box .alert { text-align: left; }
.pay-box .pay-note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.codes { font-size: 12px; color: var(--muted); word-break: break-word; }

/* ---------- Panel del estudio ---------- */
.studio { background: #f6f3ee; }
.st-nav { background: var(--ink); color: var(--paper); }
.st-nav-inner { max-width: 1160px; margin: 0 auto; padding: 0 18px; display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.st-nav .wordmark { color: var(--paper); }
.st-nav .sub { color: #a89d92; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }
.st-nav nav { margin-left: auto; display: flex; gap: 18px; font-size: 14px; }
.st-nav nav a { color: #cfc6bd; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.st-nav nav a .icon { width: 16px; height: 16px; }
.st-nav nav a:hover, .st-nav nav a.on { color: #fff; }
.st-main { max-width: 1160px; margin: 0 auto; padding: 22px 18px 64px; }
.st-title { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.st-title h1 { font-size: 36px; font-weight: 500; }
.st-title .sub { color: var(--muted); font-size: 13px; margin-top: 6px; }
.crumb { font-size: 12px; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.02em; }
.crumb a { color: var(--muted); }
.st-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.st-tabs a { padding: 10px 0; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; white-space: nowrap; }
.st-tabs a.on { color: var(--ink); border-color: var(--ink); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h2 { font-size: 24px; margin-bottom: 12px; font-weight: 600; }
.card + .card, .stack > * + * { margin-top: 16px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
@media (min-width: 800px) { .kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.kpi .label { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.kpi .value { font-family: var(--serif); font-size: 40px; font-weight: 600; line-height: 1.1; margin-top: 4px; font-variant-numeric: lining-nums tabular-nums; }
.kpi .value small { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi .bar { margin-top: 10px; }
.kpi .small a { color: var(--ink-2); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cols { display: grid; gap: 16px; }
@media (min-width: 900px) { .cols { grid-template-columns: 2fr 1fr; align-items: start; } }
.cols + .card, .cols + .cols { margin-top: 16px; }

.tabla-buscar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.tabla-buscar .input { flex: 1 1 260px; max-width: 460px; min-height: 42px; padding: 8px 14px; font-size: 15px; }
.tabla-buscar .count { font-size: 13px; color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 0 -20px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 700; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; padding: 8px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 12px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t td:first-child { min-width: 190px; }
table.t td .small { white-space: nowrap; }
table.t td .small.wrap { white-space: normal; max-width: 220px; }
/* Correos largos (carolina.rodriguez@…) se parten para que la tabla no se salga de la tarjeta a 1366 px. */
table.t td .small.email { white-space: normal; overflow-wrap: anywhere; max-width: 200px; }
table.t .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t a.name { font-weight: 600; text-decoration: none; }
table.t a.name:hover { text-decoration: underline; }
.mini-bar { width: 72px; height: 3px; background: var(--line); border-radius: 999px; overflow: hidden; display: inline-block; vertical-align: middle; margin-left: 8px; }
.mini-bar i { display: block; height: 100%; background: var(--accent); }
.row-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 150px; }
.row-actions .btn { justify-content: center; }
.cred-table td { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.st-photo { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; }
.st-photo img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.st-photo .info { padding: 7px 9px; font-size: 12px; display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.st-photo .info b { font-weight: 700; }
.st-photo input[type="checkbox"] { position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; accent-color: var(--ink); }
.st-photo:has(input:checked) { outline: 3px solid var(--ink); outline-offset: -1px; }
.st-photo .tags { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.st-photo .tags .chip { font-size: 11px; padding: 1px 7px; }
.note-text { font-size: 12px; color: #6b4e17; background: var(--gold-soft); border-radius: 8px; padding: 6px 8px; margin: 0 8px 8px; font-style: italic; }

.movebar {
  position: sticky; bottom: 12px; z-index: 5; margin-top: 16px;
  background: var(--ink); color: var(--paper); border-radius: 16px; padding: 10px 14px;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; box-shadow: var(--shadow);
}
.movebar select { min-height: 38px; border-radius: 10px; border: 0; padding: 0 10px; color: var(--ink); }
.movebar .btn { min-height: 38px; }

.drop {
  display: block; border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 24px; text-align: center; color: var(--muted);
  background: var(--paper); cursor: pointer;
}
.drop.over { border-color: var(--ink); color: var(--ink); }
.drop .icon { width: 26px; height: 26px; margin: 0 auto 6px; display: block; }
.upload-status { margin-top: 12px; font-size: 14px; }

.top5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
@media (max-width: 600px) { .top5 { grid-template-columns: repeat(3, 1fr); } }
.top5 figure { margin: 0; }
.top5 img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; border-radius: 4px; }
.top5 figcaption { font-size: 12px; margin-top: 6px; }
.top5 .score { font-weight: 700; }

.mail-layout { display: grid; gap: 16px; }
@media (min-width: 900px) { .mail-layout { grid-template-columns: 320px 1fr; } }
.mail-list a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; }
.mail-list a.on, .mail-list a:hover { background: var(--paper); }
.mail-list .subj { font-weight: 600; font-size: 14px; }
.mail-list .to { font-size: 12px; color: var(--muted); }
.mail-frame { width: 100%; min-height: 520px; border: 0; background: #fff; border-radius: 10px; }

details.inline summary { cursor: pointer; font-weight: 600; font-size: 14px; }
details.inline[open] summary { margin-bottom: 12px; }
.form-grid { display: grid; gap: 0 12px; }
@media (min-width: 600px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.hint { font-size: 13px; color: var(--muted); }
code.inline { background: var(--paper); padding: 1px 6px; border-radius: 6px; font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Carta de paquetes ---------- */
.plans { display: grid; gap: 10px; }
.plan {
  position: relative; display: flex; align-items: center; gap: 14px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 16px 18px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.plan input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.plan:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan-main { flex: 1; display: grid; gap: 2px; }
.plan-main b { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.1; font-variant-numeric: lining-nums; }
.plan-main span { font-size: 13px; color: var(--muted); }
.plan-main .plan-free { color: var(--ok); font-weight: 600; }
.plan-price { font-family: var(--serif); font-size: 22px; font-weight: 600; white-space: nowrap; font-variant-numeric: lining-nums; }
.plan-badge {
  position: absolute; top: -9px; right: 14px; background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px;
}
.upsell { display: flex; gap: 10px; align-items: flex-start; background: var(--gold-soft); color: #5c4214; border-radius: var(--radius); padding: 12px 14px; font-size: 14px; margin: 12px 0 0; }
.upsell .icon { color: var(--gold); margin-top: 1px; }
.upsell a { color: inherit; font-weight: 700; }
.order-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.order-box .row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 14px; }
.order-box .total { font-family: var(--serif); font-size: 26px; font-weight: 600; font-variant-numeric: lining-nums; }
.carta-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.carta-row .input { min-height: 40px; padding: 6px 10px; font-size: 14px; }
#keep-choosing:not([hidden]) + .btn-primary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }

/* ---------- Productos del pedido: paquete + adicionales (retablo, impresas) ---------- */
.line-bar { max-width: 1200px; margin: 0 auto 10px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.line-bar::-webkit-scrollbar { display: none; }
.line-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 13px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  font: 600 13px/1 var(--sans); cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.line-chip .icon { width: 14px; height: 14px; }
.line-chip .lc-n { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.line-chip.done .lc-n { color: var(--ok); font-weight: 700; }
.line-chip[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.line-chip[aria-selected="true"] .lc-n { color: rgb(250 247 242 / 72%); }
.line-chip[aria-selected="true"].done .lc-n { color: #b9dcc1; }
.line-chip.add { border-style: dashed; color: var(--muted); }
.line-chip.nudge { animation: nudge 0.8s var(--ease) 2; }
@keyframes nudge { 35% { transform: translateY(-3px); box-shadow: 0 0 0 4px var(--accent-soft); } }
body.has-lines .gallery-wrap { padding-bottom: 180px; }
body.has-lines .toast { bottom: 150px; }
.progress-text .big .line-name { font-weight: 600; color: var(--ink-2); }

/* Otros productos donde ya está la foto (esquina superior derecha de la miniatura). */
.badge-lines { position: absolute; top: 6px; right: 6px; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; pointer-events: none; }
.badge-lines i { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: 0.03em; background: rgb(255 255 255 / 92%); color: var(--ink); padding: 2px 7px; border-radius: 999px; }

.lb-bottom { flex-wrap: wrap; }
.lb-lines { display: contents; }
.lb-heart.lb-line { min-height: 44px; padding: 0 15px; gap: 6px; }
.lb-heart.lb-line small { font-size: 12px; font-weight: 500; opacity: 0.75; font-variant-numeric: tabular-nums; }

.offers { display: grid; gap: 10px; margin-bottom: 16px; }
.offer {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px 16px;
}
.offer:hover { border-color: var(--ink-2); }
.offer[disabled] { opacity: 0.6; cursor: progress; }
.offer-main { flex: 1; display: grid; gap: 2px; }
.offer-main b { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.1; font-variant-numeric: lining-nums; }
.offer-main span { font-size: 13px; color: var(--muted); }
.offer-price { font-family: var(--serif); font-size: 20px; font-weight: 600; white-space: nowrap; font-variant-numeric: lining-nums; }

.line-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin: 26px 0 12px; }
.line-head .section-label { margin: 0; }
.section-label .chip { text-transform: none; letter-spacing: 0; }

/* Panel: pedido de la familia y editor de productos */
.order-line { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-line:last-child { border-bottom: 0; }
.order-line > div:first-child { flex: 1; min-width: 0; }
.order-line b { font-weight: 700; font-size: 14px; }
.order-line .icon-btn { width: 32px; height: 32px; }
.prod-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 70px 116px 92px 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.prod-row .input { min-height: 40px; padding: 6px 10px; font-size: 14px; }
.prod-row input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); justify-self: center; }
.prod-row .icon-btn { width: 36px; height: 36px; }
.prod-head { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 4px; }
.prod-none { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); margin: 6px 0 14px 4px; cursor: pointer; }
.prod-none input { accent-color: var(--accent); }
@media (max-width: 640px) {
  .prod-row { grid-template-columns: 26px 1fr 1fr 1fr 36px; margin-bottom: 14px; }
  .prod-row > :nth-child(4) { grid-area: 1 / 1; }
  .prod-row .p-name { grid-area: 1 / 2 / 2 / 5; }
  .prod-row [data-remove] { grid-area: 1 / 5; }
  .prod-row [name="pphotos"] { grid-area: 2 / 2; }
  .prod-row [name="pprice"] { grid-area: 2 / 3; }
  .prod-row [name="pcode"] { grid-area: 2 / 4; }
  .prod-head { display: none; }
}

/* ---------- Ingreso con código ---------- */
.login-card form + form { margin-top: 10px; }
.masked-email { font-weight: 700; font-size: 17px; margin: 0 0 18px; }
.email-option { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); cursor: pointer; font-weight: 600; font-size: 15px; color: var(--ink); }
.email-option + .email-option { margin-top: 8px; }
.email-option input { width: 18px; height: 18px; accent-color: var(--accent); }
.email-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.code-input { font-size: 30px; letter-spacing: 0.35em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; padding-left: 0.35em; }
.code-input::placeholder { color: var(--line-2); }
.resend { text-align: center; }
.resend .btn-link { width: auto; }
.demo-code { background: var(--gold-soft); color: #5c4214; border-radius: 12px; padding: 12px 14px; font-size: 13px; margin-bottom: 16px; }
.demo-code span { display: block; font-size: 28px; font-weight: 700; letter-spacing: 0.25em; margin: 6px 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.choose-list { display: grid; gap: 10px; }
.choose-list .icon { color: var(--muted); }
.device-list, .access-log { list-style: none; margin: 0 0 12px; padding: 0; }
.device-list li { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.device-list li:last-child { border-bottom: 0; }
.access-log li { font-size: 13px; padding: 3px 0; color: var(--ink-2); }
.access-log li.warn { color: var(--err); }

/* ---------- Recordatorios automáticos ---------- */
/* Tipo de evento al crearlo (Colegio / Sesión o evento) y datos del cliente de una sesión */
.kind-options { display: grid; gap: 8px; }
.kind-option { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.kind-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.kind-option > input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.kind-option > span { display: grid; gap: 2px; font-size: 14px; }
.client-fields { border: 1px dashed var(--line-2); border-radius: 12px; padding: 10px 14px 0; margin: 0 0 16px; }
.client-fields legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0 6px; }
.rem-option { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 0 0 10px; cursor: pointer; }
.rem-option > input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.rem-option span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rem-option .input { width: 64px; min-height: 36px; padding: 4px 8px; font-size: 14px; }
.rem-option .rem-days { width: 110px; }
.rem-status { border-top: 1px solid var(--line); padding-top: 12px; }
.schedule { list-style: none; margin: 8px 0 0; padding: 0; }
.schedule li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.schedule li:last-child { border-bottom: 0; }
.reminder-bar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 12px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: 14px;
}
.reminder-bar > span:first-of-type { flex: 1; }
.reminder-bar .icon { width: 18px; height: 18px; color: var(--accent); flex: none; }
.reminder-bar.off .icon { color: var(--muted); }
.reminder-bar:hover { border-color: var(--line-2); }

/* ---------- Marca de agua ---------- */
.wm-fields { display: grid; grid-template-columns: 1fr 120px; gap: 0 10px; transition: opacity 0.2s; }
.wm-fields.off { opacity: 0.45; }
.notes-fields { transition: opacity 0.2s; }
.notes-fields.off { opacity: 0.45; }
.wm-preview { width: 100%; border-radius: 10px; background: var(--line); aspect-ratio: 3 / 2; object-fit: cover; margin: 2px 0 10px; }
.wm-progress { background: var(--gold-soft); color: #5c4214; border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.wm-progress .bar { background: rgb(255 255 255 / 60%); }

/* Importar familias: vista previa */
.imp-table td { vertical-align: top; }
.imp-table tr.imp-error td { background: #fdf7f6; }
.imp-table tr.imp-igual td { color: var(--muted); }
.imp-notes { list-style: none; margin: 0; padding: 0; font-size: 13px; min-width: 220px; }
.imp-notes li + li { margin-top: 3px; }
.imp-notes li.err { color: var(--err); font-weight: 600; }
.imp-notes li.warn { color: #6b4e17; }
.imp-columns { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.import-bar {
  position: sticky; bottom: 12px; z-index: 5; margin-top: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; box-shadow: var(--shadow);
}
.import-bar > span { margin-right: auto; font-size: 14px; }
.folder-checks { display: grid; gap: 2px; margin-bottom: 10px; }
.folder-checks label.check { margin: 0; padding: 4px 0; font-weight: 500; }
.folder-checks .muted { font-weight: 400; }

/* Portada del alumno */
.cover-thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.cover-pick button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.cover-pick.on { outline: 3px solid var(--accent); outline-offset: -1px; }

/* Clasificar por tarjetas QR */
.steps { display: grid; gap: 16px; margin-bottom: 16px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding-top: 22px; }
.step h2 { font-size: 22px; }
.step-n { position: absolute; top: 14px; right: 18px; font-family: var(--serif); font-size: 34px; line-height: 1; color: var(--line-2); }
.card.step + .card.step { margin-top: 0; }
.review-group { border-top: 1px solid var(--line); padding: 16px 0; }
.review-group:first-of-type { border-top: 0; padding-top: 4px; }
.review-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.review-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; align-items: center; }
.review-strip img { width: 92px; height: 92px; object-fit: cover; border-radius: 8px; flex: none; }
.review-strip .more { flex: none; font-size: 13px; color: var(--muted); padding: 0 8px; }

/* Reconocimiento facial */
.face-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.face-item .toolbar { margin-top: 6px; }
.face-thumb { position: relative; border-radius: 10px; overflow: hidden; margin-bottom: 6px; }
.face-thumb img { width: 100%; display: block; }
.face-thumb i { position: absolute; border: 2px solid #fff; border-radius: 6px; box-shadow: 0 0 0 2px var(--accent); }
.face-row { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.face-row:last-of-type { border-bottom: 0; }
.face-mini { position: relative; flex: none; }
.face-mini img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; display: block; }
.face-mini button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgb(0 0 0 / 60%); color: #fff; cursor: pointer; line-height: 1; }

/* Subida procesada en este computador (prototipo del MVP) */
.proto-chip { font-family: var(--sans, inherit); font-size: 12px; vertical-align: middle; margin-left: 8px; }
.proto-options { margin-top: 14px; }
.proto-options summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.proto-options .field { margin-top: 12px; }
.proto-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.proto-kpis > div { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.proto-kpis .section-label { margin: 0; }
.proto-kpis b { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
#subida .err { color: var(--err); }
#picker.busy .drop, #picker.busy .toolbar, #picker.busy select { pointer-events: none; opacity: 0.55; }

/* Carpetas de producción */
.lead-note { color: var(--muted); max-width: 820px; margin: 0 0 16px; }
.deliver-step { padding: 12px 0; border-bottom: 1px solid var(--line); }
.deliver-step:first-of-type { padding-top: 0; }
.deliver-step .hint { margin: 4px 0 10px; }
.deliver-step p.small { margin: 10px 0 0; }
.missing-list { margin: 0; padding-left: 18px; font-size: 13px; display: grid; gap: 4px; max-height: 240px; overflow: auto; }
.tree { font-size: 12px; line-height: 1.5; background: var(--bg, #f6f3ee); border-radius: 10px; padding: 10px 12px; max-height: 360px; overflow: auto; white-space: pre; }
#steps.busy button, #steps.busy input { pointer-events: none; opacity: 0.55; }
table.t td.pick { min-width: 0; width: 36px; padding-right: 0; }
table.t td.pick input { width: 18px; height: 18px; }
#faces-local-box .err { color: var(--err); }
#faces-local-box .muted { display: block; margin-top: 4px; }

/* Vista previa de la marca de agua: la marca (SVG) encima de una foto de muestra */
.wm-stage { position: relative; margin: 2px 0 10px; }
.wm-stage .wm-preview { display: block; margin: 0; }
.wm-stage .wm-overlay { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 10px; pointer-events: none; }

/* En el celular, la columna de un .cols no crece más que la pantalla por una tabla ancha (la tabla se desplaza dentro de su tarjeta) */
.cols > * { min-width: 0; }

/* Productos en el celular: el precio ("100.000") cabe sin cortarse */
@media (max-width: 600px) { .prod-row .input { padding-inline: 8px; } }

/* Listado de fotos: la etiqueta de una tarjeta ("Tarjeta · Camila Torres Restrepo") no se sale de la foto */
.st-photo .tags { max-width: calc(100% - 44px); }
.st-photo .tags .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
