:root {
  --red: #D7131F;
  --red-deep: #B80F1A;
  --ink: #000;
  --mute: #6a6a6a;
  --line: #ececec;
  --soft: #f2f2f2;
  --wa: #25d366;
  --radius: 10px;
  --f: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font: 400 15px/1.45 var(--f); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.red { color: var(--red); }
.muted { color: var(--mute); }
.small { font-size: 13px; }
.brand { font-weight: 800; letter-spacing: -.02em; text-decoration: none; font-size: 15px; }
.title { font-size: clamp(26px, 6vw, 34px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 8px 0 14px; }
.sub { font-size: 17px; font-weight: 700; margin: 26px 0 4px; }
.eyebrow { font-size: 13px; font-weight: 700; color: var(--red); margin: 0 0 8px; }
.flash { background: var(--soft); border-radius: var(--radius); padding: 10px 14px; font-size: 14px; }
.error { color: var(--red-deep); background: #fdecec; border-radius: var(--radius); padding: 10px 14px; font-size: 14px; }

/* Sellos */
.stamps { display: flex; gap: 8px; max-width: 360px; }
.stamp { flex: 1; aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: clamp(20px, 6vw, 26px); }
.stamp.on { background: var(--red); color: #fff; animation: pop .5s var(--ease) both; }
.stamp.off { border: 1.5px dashed #c9c9c9; }
.stamp.gift { background: var(--ink); color: #fff; }
.stamp.on:nth-child(2) { animation-delay: .06s; }
.stamp.on:nth-child(3) { animation-delay: .12s; }
.stamp.on:nth-child(4) { animation-delay: .18s; }
.stamp.on:nth-child(5) { animation-delay: .24s; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Listas tipo Spotify */
.list { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 8px 0; text-decoration: none; }
.row > div { flex: 1; min-width: 0; }
.row b { display: block; font-weight: 500; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row small { display: block; color: var(--mute); font-size: 13px; }
.thumb { width: 44px; height: 44px; flex: none; border-radius: 4px; background: var(--soft); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.thumb.round { border-radius: 50%; font-weight: 700; font-size: 15px; }
.red-ic { color: var(--red); }
.ti.red { color: var(--red); font-size: 20px; }
.ti.muted { color: #b3b3b3; font-size: 20px; }

/* Botones */
.play { width: 52px; height: 52px; border-radius: 50%; background: var(--red); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; text-decoration: none; flex: none; transition: transform .2s var(--ease), background .2s; border: 0; cursor: pointer; }
.play:hover { transform: scale(1.06); background: var(--red-deep); }
.ghost { background: none; border: 0; padding: 6px; font-size: 26px; color: var(--mute); cursor: pointer; text-decoration: none; display: inline-flex; }
.ghost:hover { color: var(--ink); }
.ghost.done { color: var(--red); }
.pill { border: 1px solid #c9c9c9; background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.pill[aria-current="true"], .pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-primary, .btn-danger, .btn-ghost { border: 0; border-radius: 999px; padding: 13px 22px; font-weight: 700; font-size: 15px; cursor: pointer; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #222; }
.btn-danger { background: var(--red); color: #fff; }
.btn-ghost { background: none; color: var(--mute); padding-left: 0; display: inline-flex; gap: 6px; align-items: center; }
.grow { flex: 1; }

/* Formularios */
.form { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; }
.form input:not([type="checkbox"]):not([type="radio"]), .form select, .form textarea { border: 1px solid #d6d6d6; border-radius: var(--radius); padding: 12px; font-size: 16px; background: #fff; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--ink); outline: none; }
.form .check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 14px; }
.form .check input { width: 20px; height: 20px; accent-color: var(--red); margin: 0; flex: none; }
.bday { border: 0; padding: 0; margin: 0; display: flex; gap: 10px; }
.bday legend { font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.inline-form { margin-top: 18px; }
.danger { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 14px; }
.danger summary { color: var(--mute); cursor: pointer; font-size: 14px; }

/* Landing */
.land, .narrow { max-width: 520px; margin: 0 auto; padding: 18px 20px 40px; }
.land-top { padding: 4px 0 26px; }
.land-hero h1 { font-size: clamp(34px, 10vw, 48px); font-weight: 800; letter-spacing: -.04em; line-height: 1.02; margin: 0 0 12px; }
.lead { color: var(--mute); font-size: 17px; margin: 0 0 22px; }
.google-box { margin: 28px 0 8px; min-height: 44px; }
.google-box .error { margin-top: 12px; }
.how h2 { font-size: 17px; margin: 36px 0 6px; }
.land-foot { margin-top: 36px; font-size: 13px; color: var(--mute); }

/* App del cliente */
.shell { min-height: 100dvh; }
.main { max-width: 560px; margin: 0 auto; padding: 14px 20px calc(150px + env(safe-area-inset-bottom)); }
.app-top { display: flex; justify-content: space-between; align-items: center; padding: 4px 0 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; text-decoration: none; }
.card-head { padding-top: 8px; }
.actions { display: flex; align-items: center; gap: 10px; margin: 18px 0 6px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.install .pill { flex: none; }

.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); display: flex; justify-content: space-around; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--mute); text-decoration: none; min-width: 64px; }
.nav a .ti { font-size: 24px; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.nav-brand { display: none; }

.appt { position: fixed; left: 10px; right: 10px; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 9; background: var(--ink); color: #fff; border-radius: 8px; padding: 8px 12px; display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 14px; font-weight: 500; }
.appt small { display: block; color: #b3b3b3; font-size: 12px; font-weight: 400; }
.appt-ic { width: 34px; height: 34px; border-radius: 4px; background: var(--red); display: flex; align-items: center; justify-content: center; font-size: 18px; }

.code-row { display: flex; align-items: center; gap: 10px; padding: 14px 0 16px; border-bottom: 1px solid var(--line); margin-top: 8px; }
.code-row > div { flex: 1; }
.code { display: block; font-size: 24px; font-weight: 800; letter-spacing: .04em; }
.total-row { display: flex; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--line); margin-top: 10px; font-size: 15px; }

.qr-view { text-align: center; }
.qr { width: min(280px, 80vw); margin: 18px auto 8px; }
.qr svg { width: 100%; height: auto; display: block; }
.code-big { font-size: 22px; font-weight: 800; letter-spacing: .06em; margin: 0; }

/* Ordenador: menú lateral como Spotify */
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); }
  .nav { position: sticky; top: 0; height: 100dvh; flex-direction: column; justify-content: flex-start; gap: 4px; padding: 24px 14px; border-top: 0; border-right: 1px solid var(--line); background: #fff; backdrop-filter: none; }
  .nav-brand { display: block; font-weight: 800; font-size: 18px; letter-spacing: -.02em; padding: 0 12px 18px; }
  .nav a { flex-direction: row; gap: 14px; font-size: 15px; padding: 10px 12px; border-radius: 6px; min-width: 0; }
  .nav a:hover { background: var(--soft); color: var(--ink); }
  .main { padding: 28px 40px 120px; max-width: 760px; margin: 0; }
  .app-top .brand { visibility: hidden; }
  .appt { left: 260px; right: 20px; bottom: 20px; max-width: 420px; }
}

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

/* Panel de Lucy */
.panel-main { max-width: 980px; margin: 0 auto; padding: 22px 20px 60px; }
.narrow-panel { max-width: 640px; }
.panel-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.panel-head .title { margin: 2px 0; }
.cover { width: 92px; height: 92px; flex: none; background: var(--ink); color: #fff; display: flex; align-items: flex-end; padding: 10px; font-size: 30px; font-weight: 800; line-height: .9; }
.panel-logout { align-self: flex-start; }
.search { display: flex; align-items: center; gap: 8px; background: var(--soft); border-radius: 999px; padding: 0 14px; margin-bottom: 12px; color: var(--mute); }
.search input { flex: 1; border: 0; background: none; padding: 11px 0; font-size: 15px; color: var(--ink); outline: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: none; }
.tracks { list-style: none; margin: 0; padding: 0; }
.track { display: grid; grid-template-columns: 28px minmax(0, 1fr) 96px 64px 76px; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 6px; }
.track:hover { background: var(--soft); }
.track-main { text-decoration: none; min-width: 0; }
.track-main b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-main small { color: var(--mute); font-size: 13px; }
.dots { display: flex; gap: 4px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #e3e3e3; }
.dots i.on { background: var(--red); }
.date { font-size: 13px; }
.contact { display: flex; justify-content: flex-end; }
.contact .ghost { font-size: 22px; }
.ghost.wa { color: #128c4a; }
.no-consent { color: #b3b3b3; font-size: 20px; padding: 6px; }
.back { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: var(--mute); font-size: 14px; margin-bottom: 10px; }
.client-head .title { margin-bottom: 4px; }
.client-head .stamps { margin-top: 16px; }
.block { border-top: 1px solid var(--line); margin-top: 24px; }
.block .sub { margin-top: 18px; }
.designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; }
.design { position: relative; cursor: pointer; }
.design input { position: absolute; opacity: 0; inset: 0; }
.design span:first-of-type { aspect-ratio: 1; border-radius: 50%; border: 1.5px solid #d6d6d6; display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--mute); transition: all .15s; }
.design input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.design input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.btn-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.btn-wa { background: var(--wa); color: #fff; border-radius: 999px; padding: 12px 20px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.row-form { flex-direction: row; align-items: center; gap: 10px; }
.row-form input { flex: 1; }
.btn-danger .ti, .btn-primary .ti { margin-right: 4px; }

@media (max-width: 640px) {
  .track { grid-template-columns: minmax(0, 1fr) auto 56px; }
  .track .num, .track .date { display: none; }
  .dots i { width: 9px; height: 9px; }
}
