/* =========================================================
   KUEED PIERCING — estilo "flash sheet" de tatuaje tradicional
   Papel crema, tinta negra, rosa roja, hojas teal, oro.
   ========================================================= */
:root {
  --papel: #f3ead8;
  --papel-2: #fbf6ec;
  --papel-3: #e9dcc2;
  --tinta: #151311;
  --tinta-2: #3a3530;
  --tinta-3: #6e665c;
  --rosa: #c4161c;
  --rosa-osc: #8f0f14;
  --rosa-clara: #f6d6d2;
  --hoja: #1f8f80;
  --hoja-osc: #146a5f;
  --hoja-clara: #d3ece6;
  --oro: #e6a51e;
  --oro-clara: #f8e7bf;
  --borde: 2.5px solid var(--tinta);
  --sombra: 5px 5px 0 var(--tinta);
  --sombra-s: 3px 3px 0 var(--tinta);
  --radio: 14px;
  --display: 'Limelight', 'Georgia', serif;
  --texto: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--texto);
  font-size: 16px;
  line-height: 1.55;
  color: var(--tinta);
  background-color: var(--papel);
  background-image:
    radial-gradient(rgba(21,19,17,.07) 1px, transparent 1.2px);
  background-size: 18px 18px;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 400; letter-spacing: .02em; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.muted { color: var(--tinta-3); }
.small { font-size: .875rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- Encabezado ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--tinta); color: var(--papel);
  border-bottom: 4px solid var(--rosa);
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--papel); }
.brand img { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--papel); background: #fff; }
.brand span { font-family: var(--display); font-size: 1.35rem; letter-spacing: .06em; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a, .nav button.link {
  color: var(--papel); text-decoration: none; padding: 8px 12px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; background: none; border: 0; cursor: pointer; font-family: inherit;
}
.nav a:hover, .nav button.link:hover { background: rgba(243,234,216,.12); }
.nav a.activo { color: var(--oro); }
.nav .btn { margin-left: 6px; }
@media (max-width: 720px) {
  .brand span { display: none; }
  .nav a.opc { display: none; }
}

/* ---------- Botones ---------- */
.btn {
  --bg: var(--rosa); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; min-height: 44px;
  font: 700 .98rem/1 var(--texto); letter-spacing: .02em;
  color: var(--fg); background: var(--bg);
  border: var(--borde); border-radius: 999px;
  box-shadow: var(--sombra-s);
  cursor: pointer; text-decoration: none;
  transition: transform .08s ease, box-shadow .08s ease, background .15s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--tinta); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--tinta); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: var(--sombra-s); }
.btn.sec { --bg: var(--papel-2); --fg: var(--tinta); }
.btn.hoja { --bg: var(--hoja); }
.btn.oro { --bg: var(--oro); --fg: var(--tinta); }
.btn.negro { --bg: var(--tinta); --fg: var(--papel); }
.btn.peligro { --bg: #fff; --fg: var(--rosa-osc); }
.btn.sm { padding: 7px 13px; min-height: 34px; font-size: .85rem; box-shadow: 2px 2px 0 var(--tinta); border-width: 2px; }
.btn.block { width: 100%; }
.topbar .btn { border-color: var(--papel); box-shadow: 3px 3px 0 var(--rosa-osc); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--rosa); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Tarjetas ---------- */
.card {
  background: var(--papel-2); border: var(--borde); border-radius: var(--radio);
  box-shadow: var(--sombra); padding: 22px;
}
.card.plano { box-shadow: none; }
.card h3 { margin-bottom: .35em; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* ---------- Héroe ---------- */
.hero { padding: 56px 0 40px; position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: .25em; }
.hero h1 em { font-style: normal; color: var(--rosa); }
.hero .lead { font-size: 1.15rem; color: var(--tinta-2); max-width: 34ch; margin-bottom: 1.6em; }
.hero .acciones { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-logo { position: relative; justify-self: center; width: min(380px, 80vw); aspect-ratio: 1; }
.hero-logo img {
  width: 100%; height: 100%; border-radius: 50%;
  border: 4px solid var(--tinta); box-shadow: 10px 10px 0 var(--tinta);
  background: #fff; animation: flotar 6s ease-in-out infinite;
}
.hero-logo::before {
  content: ''; position: absolute; inset: -22px; border-radius: 50%;
  border: 2px dashed var(--tinta-3); animation: girar 60s linear infinite;
}
@keyframes flotar { 50% { transform: translateY(-8px) rotate(-1.5deg); } }
@keyframes girar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero-logo img, .hero-logo::before { animation: none; } }
@media (max-width: 820px) {
  .hero { padding-top: 32px; }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero .acciones { justify-content: center; }
  .hero-logo { order: -1; width: min(260px, 70vw); }
}
.sellos { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
@media (max-width: 820px) { .sellos { justify-content: center; } }
.sello {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 2px solid var(--tinta); border-radius: 999px;
  background: var(--papel-2); font-size: .85rem; font-weight: 600;
}
.sello b { color: var(--rosa); }

/* ---------- Secciones ---------- */
section.bloque { padding: 48px 0; }
.titulo-sec { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.titulo-sec h2 { margin: 0; }
.titulo-sec::after { content: ''; flex: 1; height: 0; border-top: 3px dotted var(--tinta); }
.banda { background: var(--tinta); color: var(--papel); border-top: 4px solid var(--rosa); border-bottom: 4px solid var(--rosa); }
.banda .card { color: var(--tinta); }
.banda .titulo-sec::after { border-color: var(--papel); }

.zona-tit { font-family: var(--display); font-size: 1.15rem; margin: 26px 0 12px; display: flex; align-items: center; gap: 10px; }
.zona-tit::before { content: '✦'; color: var(--rosa); }
.serv {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--papel-2); border: 2px solid var(--tinta); border-radius: 12px; padding: 16px;
  box-shadow: var(--sombra-s); transition: transform .12s;
}
.serv:hover { transform: translateY(-2px); }
.serv .fila { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.serv .nom { font-weight: 800; font-size: 1.05rem; }
.serv .precio { font-family: var(--display); color: var(--rosa); font-size: 1.15rem; white-space: nowrap; }
.serv .meta { font-size: .82rem; color: var(--tinta-3); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.serv p { font-size: .9rem; margin: 0; color: var(--tinta-2); }

/* ---------- Formularios ---------- */
label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.campo { margin-bottom: 16px; }
.campo .ayuda { font-size: .8rem; color: var(--tinta-3); margin-top: 4px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--tinta);
  padding: 11px 14px; min-height: 46px;
  background: #fff; border: 2px solid var(--tinta); border-radius: 10px;
  outline: none; transition: box-shadow .12s;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px var(--oro-clara), 3px 3px 0 var(--tinta); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--rosa); padding: 0; flex: none; }
input[type=file] { padding: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: .92rem; cursor: pointer; }
.check input { margin-top: 2px; }
.fila-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 14px; }
.error-msg { color: var(--rosa-osc); background: var(--rosa-clara); border: 2px solid var(--rosa-osc); padding: 10px 14px; border-radius: 10px; font-size: .9rem; font-weight: 600; margin-bottom: 14px; }
.ok-msg { color: var(--hoja-osc); background: var(--hoja-clara); border: 2px solid var(--hoja-osc); padding: 10px 14px; border-radius: 10px; font-size: .9rem; font-weight: 600; margin-bottom: 14px; }

/* ---------- Pestañas ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 3px solid var(--tinta); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs button {
  font: 700 .95rem var(--texto); padding: 10px 16px; border: 2.5px solid var(--tinta); border-bottom: 0;
  border-radius: 12px 12px 0 0; background: var(--papel-3); color: var(--tinta-2); cursor: pointer; white-space: nowrap; margin-bottom: -3px;
}
.tabs button[aria-selected=true] { background: var(--papel-2); color: var(--tinta); border-bottom: 3px solid var(--papel-2); }

/* ---------- Reserva ---------- */
.pasos { display: flex; gap: 8px; margin-bottom: 26px; counter-reset: paso; }
.pasos li {
  list-style: none; flex: 1; display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: .9rem; color: var(--tinta-3);
}
.pasos li::before {
  counter-increment: paso; content: counter(paso);
  width: 32px; height: 32px; flex: none; display: grid; place-items: center;
  border: 2.5px solid currentColor; border-radius: 50%; font-family: var(--display); background: var(--papel-2);
}
.pasos li.activo { color: var(--tinta); }
.pasos li.activo::before { background: var(--rosa); color: #fff; border-color: var(--tinta); }
.pasos li.hecho { color: var(--hoja-osc); }
.pasos li.hecho::before { content: '✓'; background: var(--hoja-clara); }
.pasos { padding: 0; margin-top: 0; }
@media (max-width: 600px) { .pasos li span { display: none; } .pasos li { flex: none; } .pasos { gap: 14px; } }

.opciones-serv { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.opcion {
  text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--papel-2); border: 2.5px solid var(--tinta); border-radius: 12px; padding: 14px 16px;
  box-shadow: var(--sombra-s); transition: transform .08s, background .15s;
}
.opcion:hover { transform: translate(-1px, -1px); }
.opcion[aria-pressed=true] { background: var(--rosa); color: #fff; }
.opcion[aria-pressed=true] .precio, .opcion[aria-pressed=true] .meta { color: #fff; }

.dias { display: flex; gap: 10px; overflow-x: auto; padding: 4px 4px 14px; scroll-snap-type: x mandatory; }
.dia {
  flex: none; width: 74px; scroll-snap-align: start; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px;
  background: var(--papel-2); border: 2.5px solid var(--tinta); border-radius: 12px; font: inherit; color: inherit;
  box-shadow: var(--sombra-s);
}
.dia .dsem { font-size: .75rem; text-transform: uppercase; font-weight: 700; color: var(--tinta-3); }
.dia .dnum { font-family: var(--display); font-size: 1.6rem; line-height: 1; }
.dia .dmes { font-size: .75rem; font-weight: 600; }
.dia:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }
.dia[aria-pressed=true] { background: var(--tinta); color: var(--papel); }
.dia[aria-pressed=true] .dsem { color: var(--oro); }

.horas { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; }
.hora {
  font: 700 1rem var(--texto); padding: 10px 0; cursor: pointer; color: var(--tinta);
  background: #fff; border: 2px solid var(--tinta); border-radius: 10px; box-shadow: 2px 2px 0 var(--tinta);
}
.hora[aria-pressed=true] { background: var(--hoja); color: #fff; }
.vacio { text-align: center; padding: 26px; border: 2.5px dashed var(--tinta-3); border-radius: 12px; color: var(--tinta-3); }

.resumen { display: grid; gap: 4px; padding: 16px 18px; background: var(--oro-clara); border: 2.5px solid var(--tinta); border-radius: 12px; margin-bottom: 18px; }
.resumen .r { display: flex; justify-content: space-between; gap: 10px; }
.resumen .r b { text-align: right; }

.consent { max-height: 180px; overflow-y: auto; background: #fff; border: 2px solid var(--tinta); border-radius: 10px; padding: 12px 14px; font-size: .85rem; margin-bottom: 12px; }
.consent ul { margin: .4em 0; padding-left: 1.2em; }

/* ---------- Estados ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; border: 2px solid currentColor; white-space: nowrap; }
.chip.pendiente { color: #8a5a00; background: var(--oro-clara); }
.chip.confirmada { color: var(--hoja-osc); background: var(--hoja-clara); }
.chip.completada { color: var(--tinta); background: var(--papel-3); }
.chip.cancelada { color: var(--rosa-osc); background: var(--rosa-clara); }
.chip.no_asistio { color: #fff; background: var(--tinta-2); border-color: var(--tinta-2); }
.chip.cic-excelente, .chip.cic-cicatrizado { color: var(--hoja-osc); background: var(--hoja-clara); }
.chip.cic-normal { color: var(--tinta); background: var(--papel-3); }
.chip.cic-irritado { color: #8a5a00; background: var(--oro-clara); }
.chip.cic-infectado, .chip.cic-rechazo { color: var(--rosa-osc); background: var(--rosa-clara); }

/* ---------- Cita / historial (cliente) ---------- */
.cita { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 16px; background: var(--papel-2); border: 2.5px solid var(--tinta); border-radius: 12px; box-shadow: var(--sombra-s); margin-bottom: 12px; }
.cal-mini { width: 64px; text-align: center; border: 2.5px solid var(--tinta); border-radius: 10px; overflow: hidden; background: #fff; }
.cal-mini .m { background: var(--rosa); color: #fff; font-size: .72rem; font-weight: 800; text-transform: uppercase; padding: 2px 0; border-bottom: 2px solid var(--tinta); }
.cal-mini .d { font-family: var(--display); font-size: 1.6rem; line-height: 1.3; }
.cita .t { font-weight: 800; }
@media (max-width: 560px) { .cita { grid-template-columns: auto 1fr; } .cita > :last-child { grid-column: 1 / -1; } }

.perf { border: 2.5px solid var(--tinta); border-radius: var(--radio); background: var(--papel-2); box-shadow: var(--sombra-s); overflow: hidden; margin-bottom: 16px; }
.perf header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; background: var(--tinta); color: var(--papel); }
.perf header h3 { margin: 0; color: var(--papel); }
.perf .cuerpo { padding: 16px 18px; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: .92rem; margin: 0; }
.dl dt { color: var(--tinta-3); font-weight: 600; }
.dl dd { margin: 0; font-weight: 600; }
.barra { height: 12px; border: 2px solid var(--tinta); border-radius: 999px; background: #fff; overflow: hidden; margin: 6px 0 2px; }
.barra i { display: block; height: 100%; background: repeating-linear-gradient(-45deg, var(--hoja), var(--hoja) 6px, var(--hoja-osc) 6px, var(--hoja-osc) 12px); }
.linea-tiempo { list-style: none; padding: 0; margin: 10px 0 0; border-left: 3px dotted var(--tinta); }
.linea-tiempo li { position: relative; padding: 0 0 12px 18px; font-size: .9rem; }
.linea-tiempo li::before { content: ''; position: absolute; left: -8px; top: 4px; width: 13px; height: 13px; border-radius: 50%; background: var(--rosa); border: 2px solid var(--tinta); }
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 10px; }
.fotos a, .fotos .ft { position: relative; display: block; aspect-ratio: 1; border: 2px solid var(--tinta); border-radius: 10px; overflow: hidden; background: #fff; }
.fotos img { width: 100%; height: 100%; object-fit: cover; }
.fotos .tag { position: absolute; left: 4px; bottom: 4px; background: var(--tinta); color: var(--papel); font-size: .68rem; padding: 1px 6px; border-radius: 6px; }
.fotos .del { position: absolute; right: 4px; top: 4px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--tinta); background: #fff; cursor: pointer; font-weight: 800; line-height: 1; }

/* ---------- Modal ---------- */
.modal-fondo { position: fixed; inset: 0; z-index: 90; background: rgba(21,19,17,.6); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 14px; overflow-y: auto; animation: aparecer .15s; }
.modal { width: 100%; max-width: 520px; background: var(--papel-2); border: 3px solid var(--tinta); border-radius: 18px; box-shadow: 8px 8px 0 var(--tinta); position: relative; animation: subir .2s ease; }
.modal.ancho { max-width: 860px; }
.modal > header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 3px solid var(--tinta); background: var(--papel-3); border-radius: 15px 15px 0 0; }
.modal > header h2 { font-size: 1.4rem; margin: 0; }
.modal > header .cerrar { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; border: 2.5px solid var(--tinta); background: #fff; font-size: 1.3rem; cursor: pointer; line-height: 1; flex: none; }
.modal .cuerpo { padding: 20px; }
@keyframes aparecer { from { opacity: 0; } }
@keyframes subir { from { transform: translateY(18px); opacity: 0; } }
body.con-modal { overflow: hidden; }

/* ---------- Toast ---------- */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--tinta); color: var(--papel); border: 2.5px solid var(--papel); border-radius: 12px; padding: 12px 16px; font-weight: 600; box-shadow: 4px 4px 0 var(--rosa); animation: subir .2s; }
.toast.error { box-shadow: 4px 4px 0 var(--oro); }

/* ---------- Pie ---------- */
footer.pie { margin-top: 40px; background: var(--tinta); color: var(--papel); padding: 36px 0 28px; border-top: 4px solid var(--rosa); }
footer.pie .wrap { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; justify-content: space-between; }
footer.pie img { width: 70px; border-radius: 50%; border: 2px solid var(--papel); background: #fff; }
footer.pie a { color: var(--oro); }
.spinner { width: 34px; height: 34px; margin: 30px auto; border: 4px solid var(--papel-3); border-top-color: var(--rosa); border-radius: 50%; animation: girar .8s linear infinite; }

/* ---------- Auth ---------- */
.auth-caja { max-width: 440px; margin: 40px auto; }
.auth-caja .logo-auth { width: 110px; height: 110px; border-radius: 50%; margin: -78px auto 10px; border: 3px solid var(--tinta); box-shadow: var(--sombra-s); background: #fff; }
.auth-caja .card { padding-top: 28px; margin-top: 70px; }
