/* Panel de L'Origen — estilo 5 · Cuarzo rosa */
:root {
  --rosa: #C9659A;
  --rosa-claro: #F3B6D1;
  --rosa-fondo: #FCEFF5;
  --ciruela: #3A1C37;
  --ciruela-2: #4B2448;
  --morado: #8A5CD6;
  --bg: #FBF7F9;
  --card: #FFFFFF;
  --text: #2B1729;
  --muted: #7A6577;
  --line: #EEDDE7;
  --ok: #2E8A5E;
  --ok-fondo: #E6F4EC;
  --aviso: #A35A00;
  --aviso-fondo: #FFF2DE;
  --sombra: 0 1px 2px rgba(58, 28, 55, .06), 0 6px 20px rgba(58, 28, 55, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1E1020;
    --card: #2A1729;
    --text: #F7EAF1;
    --muted: #BFA6B8;
    --line: #42283F;
    --rosa-fondo: #3A1C37;
    --ok-fondo: #173326;
    --ok: #7BD3A6;
    --aviso-fondo: #3A2A12;
    --aviso: #F2B866;
    --sombra: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.5 "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: 1.35rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 800; }
h3 { font-size: 1.02rem; font-weight: 800; }
p { margin: 0; }
a { color: var(--rosa); }
.muted { color: var(--muted); font-size: .92rem; }

.top {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; max-width: 760px; margin: 0 auto;
}
.top img { width: 44px; height: 44px; object-fit: contain; }

main { max-width: 760px; margin: 0 auto; padding: 0 16px 48px; display: grid; gap: 18px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px; box-shadow: var(--sombra); display: grid; gap: 12px; min-width: 0;
}

/* Qué toca ahora */
.ahora {
  background: linear-gradient(135deg, var(--ciruela) 0%, var(--ciruela-2) 100%);
  color: #fff; border: 0;
}
.ahora .etiqueta { color: var(--rosa-claro); font-weight: 800; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.ahora h2 { font-size: 1.35rem; }
.ahora p { color: #F3DCE8; }
.ahora .btn { background: var(--rosa-claro); color: var(--ciruela); }
.ahora ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; color: #F3DCE8; }

.pasos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.paso { font-size: .78rem; padding: 3px 10px; border-radius: 99px; background: rgba(255,255,255,.1); color: #E9CFDD; }
.paso.hecho { background: rgba(243,182,209,.25); color: #fff; }
.paso.ya { background: var(--rosa-claro); color: var(--ciruela); font-weight: 800; }

/* botones */
.btn {
  appearance: none; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--rosa); color: #fff; font-family: inherit; font-weight: 800; font-size: 1rem; line-height: 1.1;
  padding: 14px 18px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn.sec { background: var(--rosa-fondo); color: var(--ciruela-2); }
.btn.ok { background: var(--ok); }
.btn.peq { padding: 9px 12px; min-height: 38px; font-size: .9rem; border-radius: 10px; }
.btn.linea { background: transparent; color: var(--text); border: 1px solid var(--line); }
.botones { display: flex; flex-wrap: wrap; gap: 10px; }
.botones .btn { flex: 1 1 auto; }

/* reels */
.reel { display: grid; gap: 12px; }
.reel-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.chip { flex: none; font-size: .78rem; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: var(--rosa-fondo); color: var(--ciruela-2); white-space: nowrap; }
.chip.ok { background: var(--ok-fondo); color: var(--ok); }
.chip.aviso { background: var(--aviso-fondo); color: var(--aviso); }
video { width: 100%; max-height: 70vh; border-radius: 14px; background: #000; display: block; }
.video-caja { max-width: 360px; width: 100%; margin: 0 auto; }

.caratulas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.caratulas figure { margin: 0; display: grid; gap: 4px; }
.caratulas img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; background: var(--rosa-fondo); }

textarea, input[type=text], input[type=datetime-local] {
  width: 100%; font: inherit; color: inherit; background: var(--bg);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px;
}
textarea { min-height: 96px; resize: vertical; }
label { font-weight: 600; display: grid; gap: 6px; }

.plan { white-space: pre-wrap; background: var(--bg); border-radius: 12px; padding: 14px; max-height: 60vh; overflow: auto; font-size: .97rem; }

details { border-top: 1px solid var(--line); padding-top: 10px; }
details summary { cursor: pointer; font-weight: 800; color: var(--rosa); list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "＋ "; }
details[open] summary::before { content: "－ "; }
.guia { display: grid; gap: 8px; margin-top: 10px; }
.guia ol, .guia ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }

.progreso { height: 10px; background: var(--rosa-fondo); border-radius: 99px; overflow: hidden; }
.progreso i { display: block; height: 100%; width: 0; background: var(--rosa); transition: width .3s; }

.admin { border: 1px dashed var(--morado); }
.admin-tag { color: var(--morado); font-weight: 800; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.fila { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.eventos { font-size: .85rem; display: grid; gap: 4px; max-height: 260px; overflow: auto; }

#toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ciruela); color: #fff; padding: 12px 18px; border-radius: 12px; max-width: calc(100% - 32px);
  box-shadow: 0 8px 24px rgba(0,0,0,.25); font-weight: 600; z-index: 10;
}
#toast.error { background: #9B2C3A; }

.vacio { text-align: center; padding: 22px 12px; }
.sep { height: 1px; background: var(--line); }
