/* Perenne — hojas planas, pasteles, cálido y juguetón. */
:root {
  --ink: #1f3d2b;
  --ink-2: #44634e;
  --bg: #e4f3c8;
  --bg-2: #d3ebac;
  --paper: #fff8ea;
  --paper-2: #fbefd2;
  --line: #cfe0b0;
  --line-paper: #ecdcb4;
  --leaf: #7cc243;
  --leaf-d: #3f8a3a;
  --pot: #b24c27;
  --pot-rim: #d4703f;
  --pot-d: #94401f;
  --sky: #8fd9fb;
  --pink: #f7a3b6;
  --sun: #ffc72e;
  --danger: #b4283c;
  --font-display: 'Grandstander', 'Baloo 2', 'Trebuchet MS', 'Segoe UI Rounded', system-ui, sans-serif;
  --font-body: 'Figtree', 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow: 0 10px 24px -12px rgb(31 61 43 / .45), 0 2px 6px rgb(31 61 43 / .08);
  --topbar: 64px;
  --tabbar: 68px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100svh;
  background: var(--bg); color: var(--ink);
  font: 500 1.0625rem/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom));
  /* Palabras largas del español (Cempasúchil, Nomeolvides) se parten antes que desbordar. */
  overflow-wrap: break-word;
}
@media (min-width: 860px) { body { padding-bottom: 0; } }
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.08; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 1.2rem + 4.6vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 1.1rem + 2.4vw, 2.7rem); }
h3 { font-size: 1.3rem; }
p { margin: 0; text-wrap: pretty; }
a { color: #2b6429; text-underline-offset: .2em; text-decoration-thickness: 2px; }
a:hover { color: var(--pot); }
::selection { background: var(--pink); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--leaf); border-radius: 8px; border: 3px solid var(--bg); }
.icon { flex: none; }
.muted { color: var(--ink-2); }
.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.narrow { width: min(640px, 100% - 2rem); margin-inline: auto; }

/* ---------- Barra superior y pestañas ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar);
  background: var(--paper); border-bottom: 3px solid var(--line);
}
.topbar-in { height: 100%; display: flex; align-items: center; gap: 1rem; width: min(1180px, 100% - 1.5rem); margin-inline: auto; min-width: 0; }
/* La marca, el menú y los botones nunca se parten ni se encogen; lo único que cede es el correo. */
.brand { display: inline-flex; align-items: center; gap: .55rem; font: 800 1.55rem/1 var(--font-display); color: var(--ink); text-decoration: none; white-space: nowrap; flex: none; }
.brand:hover { color: var(--ink); }
.nav { display: none; margin-left: auto; gap: .25rem; flex: none; }
.nav a, .tab {
  display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 700;
}
.nav a { white-space: nowrap; }
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.account { margin-left: auto; display: flex; align-items: center; gap: .5rem; min-width: 0; }
.account > * { flex: none; }
.account > .who { flex: 0 1 auto; min-width: 0; max-width: 26ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who { font-weight: 700; display: none; }
.linklike { text-decoration: none; background: none; border: 0; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; padding: .55rem .7rem; border-radius: 999px; display: inline-flex; gap: .4rem; align-items: center; white-space: nowrap; }
.linklike:hover { background: var(--bg); }
@media (min-width: 860px) {
  .nav { display: flex; margin-left: 2rem; }
  .account { margin-left: auto; }
  .who { display: block; }
}
/* Entre tablet y escritorio amplio, "Canjear" y "Salir" quedan solo con su ícono (tienen aria-label). */
@media (min-width: 860px) and (max-width: 1099px) {
  .nav { margin-left: 1rem; }
  .nav a { padding-inline: .7rem; }
  .account .linklike span { display: none; }
  .account .linklike { padding: .55rem; }
}
.tabbar {
  /* Por encima de todo lo de la escena (la portada usa z-index hasta 4000). */
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5000; height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--paper); border-top: 3px solid var(--line);
  display: grid; grid-template-columns: repeat(var(--tabs, 4), 1fr);
}
.tabbar[hidden] { display: none; }
.tab { flex-direction: column; justify-content: center; gap: .15rem; border-radius: 0; font-size: .78rem; padding: .4rem .2rem; }
.tab[aria-current="page"] { color: var(--pot); }
.tab[aria-current="page"] .icon { stroke-width: 2.6; }
@media (min-width: 860px) { .tabbar { display: none; } }

/* ---------- Botones y formularios ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 54px; padding: 1.05rem 1.6rem .5rem; border: 0; border-radius: 14px 14px 22px 22px;
  background: linear-gradient(var(--pot-rim) 0 11px, var(--pot) 11px);
  color: #fff; font: 800 1.1rem/1.1 var(--font-display); text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 18px -10px rgb(31 61 43 / .4);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .2s;
}
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 22px -10px rgb(31 61 43 / .45); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { filter: grayscale(.85) brightness(1.15); cursor: not-allowed; transform: none; box-shadow: none; }
.btn.light { background: var(--paper); color: var(--ink); box-shadow: 0 10px 18px -12px rgb(31 61 43 / .6); padding: .55rem 1.5rem; border: 3px solid var(--ink); border-radius: 999px; }
.btn.light:hover { color: var(--ink); background: #fff; }
.btn.small { min-height: 44px; padding: .8rem 1.1rem .35rem; font-size: 1rem; }
.btn.light.small { padding: .4rem 1rem; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: none; border: 2px solid var(--line); padding: .5rem 1.2rem; border-radius: 999px; }
.btn.ghost:hover { background: var(--paper); color: var(--ink); }

label.field { display: grid; gap: .35rem; font-weight: 700; }
label.field span.hint { font-weight: 500; color: var(--ink-2); font-size: .92rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea, select {
  width: 100%; min-height: 52px; padding: .7rem 1rem; font: 600 1.05rem var(--font-body); color: var(--ink);
  background: #fffdf5; border: 2px solid #b9d49a; border-radius: 14px;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: #6c8470; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
input[aria-invalid="true"] { border-color: var(--danger); }
.form-error { color: var(--danger); font-weight: 700; min-height: 1.5em; }
.form-stack { display: grid; gap: 1rem; }

.seg { display: inline-flex; background: var(--bg); border-radius: 999px; padding: .25rem; gap: .25rem; }
.seg button { border: 0; background: transparent; font: 800 .95rem var(--font-display); padding: .55rem .9rem; border-radius: 999px; cursor: pointer; color: var(--ink); }
.seg button[aria-selected="true"] { background: var(--ink); color: var(--paper); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar) + 1rem + env(safe-area-inset-bottom)); z-index: 5100; transform: translate(-50%, 20px);
  background: var(--ink); color: var(--paper); padding: .8rem 1.2rem; border-radius: 999px; font-weight: 700;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .4s var(--ease); max-width: calc(100% - 2rem); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 860px) { .toast { bottom: 1.5rem; } }

.page { padding-block: 1.5rem 3rem; animation: page-in .5s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.page-head p { max-width: 52ch; margin-top: .5rem; color: var(--ink-2); }

/* ---------- Escena del jardín ---------- */
.scene {
  position: relative; width: 100%; height: 100%; overflow: hidden; container-type: size; border-radius: inherit;
  --horizon: 46cqh; --fh: min(15cqh, 13cqw);
  --sky-a: #7fd1f7; --sky-b: #d2f1ff; --cloud: #fff; --hedge: #4fa63f; --lawn: #86c93f; --lawn-2: #7cbd37;
  --cn1: #3fa142; --cn2: #58b84e; --trunk: #9a6a45; --f1: #e8505b; --f2: #ffd23f;
  background: linear-gradient(var(--sky-a), var(--sky-b) var(--horizon));
}
.scene[data-scene="sunset"] { --sky-a: #ff9d7a; --sky-b: #ffe1b4; --cloud: #ffd0c0; --hedge: #4d8f45; --lawn: #93bb4b; --lawn-2: #89b142; --cn1: #4d9a48; --cn2: #62ad54; }
.scene[data-scene="night"] { --sky-a: #18235a; --sky-b: #4d5cae; --cloud: #5667b3; --hedge: #1f5a4b; --lawn: #2f7f57; --lawn-2: #297450; --cn1: #235a4d; --cn2: #2f6f5c; --trunk: #4a3a4f; --f1: #9cb7ff; --f2: #fff6a8; }
.scene[data-scene="spring"] { --sky-a: #bfe5ff; --sky-b: #fff0f6; --hedge: #5db74a; --lawn: #9ad85f; --lawn-2: #90d055; --cn1: #f6a9c6; --cn2: #fbcadd; --f1: #fff; --f2: #ffd23f; }

.sky { position: absolute; inset: 0 0 auto 0; height: var(--horizon); }
.sun {
  position: absolute; right: 10cqw; top: 6cqh; width: min(20cqw, 30cqh); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #ffe27a 0 44%, rgb(255 226 122 / .4) 45% 66%, rgb(255 226 122 / .18) 67% 100%);
}
.scene[data-scene="sunset"] .sun { top: calc(var(--horizon) - 21cqh); right: 24cqw; background: radial-gradient(circle, #ffb23e 0 44%, rgb(255 178 62 / .45) 45% 66%, rgb(255 178 62 / .2) 67% 100%); }
.moon { display: none; position: absolute; right: 12cqw; top: 8cqh; width: min(11cqw, 16cqh); aspect-ratio: 1; border-radius: 50%; background: #fff6d2; box-shadow: inset -.8cqw .3cqw 0 0 #e8dba5; }
.scene[data-scene="night"] .sun { display: none; }
.scene[data-scene="night"] .moon { display: block; }
.stars, .petals, .fireflies { display: none; position: absolute; inset: 0; pointer-events: none; }
.stars { height: var(--horizon); }
.star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; animation: twinkle-dot 3s ease-in-out infinite; }
.scene[data-scene="night"] .stars, .scene[data-scene="night"] .fireflies { display: block; }
.scene[data-scene="spring"] .petals { display: block; z-index: 3000; overflow: hidden; }
.cloud { position: absolute; fill: var(--cloud); width: 20cqw; opacity: .96; animation: drift 38s ease-in-out infinite alternate; }
.cloud.c1 { top: 12cqh; left: 6%; }
.cloud.c2 { top: 22cqh; left: 54%; width: 24cqw; animation-duration: 52s; animation-delay: -12s; }
.cloud.c3 { top: 5cqh; left: 33%; width: 14cqw; animation-duration: 44s; animation-delay: -20s; }
.hedge { position: absolute; left: 0; width: 100%; top: calc(var(--horizon) - 16cqh); height: 16cqh; fill: var(--hedge); }
.tree { position: absolute; bottom: calc(100cqh - var(--horizon) - 1cqh); height: min(64cqh, 52cqw); width: auto; }
.tree-l { left: -4cqw; } .tree-r { right: -4cqw; }
.tree .trunk { fill: var(--trunk); } .tree .cn1 { fill: var(--cn1); } .tree .cn2 { fill: var(--cn2); } .tree .f1 { fill: var(--f1); } .tree .f2 { fill: var(--f2); }
.fence {
  position: absolute; left: 0; right: 0; height: var(--fh); top: calc(var(--horizon) - var(--fh) + 1.5cqh);
  background: var(--fence-img) repeat-x left bottom / auto 100%;
}
.scene[data-scene="night"] .fence { filter: brightness(.78) saturate(.9); }
.lawn {
  position: absolute; left: 0; right: 0; top: var(--horizon); bottom: 0; z-index: 1;
  background: repeating-linear-gradient(180deg, var(--lawn) 0 7cqh, var(--lawn-2) 7cqh 14cqh);
}
.lawn::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 1.4cqh; background: rgb(0 0 0 / .07); }
.tufts { position: absolute; inset: 0; pointer-events: none; }
.tuft { position: absolute; fill: var(--hedge); opacity: .55; height: auto; }
.dot { position: absolute; width: 1.1cqw; height: 1.1cqw; border-radius: 50%; background: var(--c); min-width: 5px; min-height: 5px; }
.plants { position: absolute; inset: 0; }
.plant {
  --b: 7cqw; --d: 7cqw;
  position: absolute; left: calc(var(--x) * 100%); top: calc(var(--y) * 100%);
  width: calc((var(--b) + var(--d) * var(--y)) * var(--sc));
  transform: translate(-50%, -96%); background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
@container (min-width: 641px) { .plant { --b: 8.5cqw; --d: 8cqw; } }
@container (max-width: 640px) { .plant { --b: 19cqw; --d: 14cqw; } }
.plant .flower { width: 100%; height: auto; display: block; overflow: visible; }
.plant-in { display: block; transform-origin: 50% 96%; animation: sway 5.5s ease-in-out infinite; animation-delay: var(--dl, 0s); }
.plant-in.flip { scale: -1 1; }
.plant.is-new .flower { animation: grow 1.1s cubic-bezier(.16, 1, .3, 1) both; transform-origin: 50% 96%; }
.plant.selected::after { content: ''; position: absolute; left: 8%; right: 8%; bottom: -1%; height: 9%; border: 3px dashed #fff; border-radius: 50%; pointer-events: none; }
.scene.editable .plant { cursor: grab; touch-action: none; }
.plant.dragging { cursor: grabbing !important; filter: drop-shadow(0 10px 8px rgb(0 0 0 / .25)); }
.plant:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.tag {
  /* Centrada sobre la flor, pero se recarga hacia adentro cerca de las orillas (usa --x de la flor) para no cortarse. */
  position: absolute; left: 50%; bottom: 100%; transform: translate(calc(var(--x, .5) * -100%), -2px); background: var(--ink); color: var(--paper);
  padding: .3rem .7rem; border-radius: 999px; font: 700 .8rem/1.2 var(--font-body); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.plant:hover .tag, .plant:focus-visible .tag, .plant.selected .tag { opacity: 1; }
.plant:hover, .plant.selected, .plant.dragging { z-index: 1100 !important; }
.sign {
  position: absolute; left: 3cqw; bottom: 4cqh; z-index: 5; background: #c98f55; color: #fff8ea; padding: .3em .8em; border-radius: 10px;
  font: 800 clamp(.72rem, 2.3cqw, 1.2rem)/1.15 var(--font-display); max-width: 42cqw; text-align: center; box-shadow: inset 0 -.25em 0 #a8713d;
}
.sign::after { content: ''; position: absolute; left: 46%; top: 100%; width: .5em; height: 2.4cqh; background: #8a5a30; }
.critters { position: absolute; inset: 0; z-index: 3000; pointer-events: none; }
.no-critters .critters, .scene[data-scene="night"] .critters { display: none; }
.butterfly { position: absolute; width: 4.2cqw; min-width: 22px; }
.butterfly.b1 { left: 20%; top: 58%; animation: flutter1 16s ease-in-out infinite; }
.butterfly.b2 { left: 68%; top: 46%; animation: flutter2 21s ease-in-out infinite; }
.butterfly.b3 { left: 44%; top: 70%; animation: flutter1 26s ease-in-out infinite reverse; width: 3.2cqw; }
.wings { transform-origin: 15px 12px; animation: flap .3s ease-in-out infinite alternate; }
.petal { position: absolute; top: -4%; width: 1.5cqw; min-width: 8px; aspect-ratio: 1.4; background: #ffc3d6; border-radius: 70% 0 70% 0; animation: fall linear infinite; }
.firefly { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle, #fff6a8 0 28%, rgb(255 246 168 / .35) 30% 55%, transparent 58%); animation: glow 5s ease-in-out infinite; z-index: 3000; }

@keyframes sway { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }
@keyframes grow { 0% { transform: scale(0) translateY(10%); } 100% { transform: scale(1); } }
@keyframes drift { to { transform: translateX(9cqw); } }
@keyframes twinkle-dot { 50% { opacity: .25; } }
@keyframes flap { to { transform: scaleX(.35); } }
@keyframes flutter1 { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(14cqw, -7cqh); } 50% { transform: translate(26cqw, 3cqh); } 75% { transform: translate(9cqw, 8cqh); } }
@keyframes flutter2 { 0%, 100% { transform: translate(0, 0); } 30% { transform: translate(-16cqw, 6cqh); } 60% { transform: translate(-6cqw, -9cqh); } }
@keyframes fall { to { transform: translate(8cqw, 110cqh) rotate(540deg); } }
@keyframes glow { 0%, 100% { opacity: 0; transform: translate(0, 0); } 50% { opacity: 1; transform: translate(2cqw, -3cqh); } }
.twinkle { animation: twinkle 2.6s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.halo-spin { animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Inicio ---------- */
body.is-home .topbar { position: absolute; left: 0; right: 0; background: transparent; border-bottom-color: transparent; }
body.is-home .brand, body.is-home .nav a:not([aria-current]), body.is-home .linklike { color: var(--ink); }
.hero { position: relative; height: min(100svh, 940px); min-height: 640px; }
.hero .scene { position: absolute; inset: 0; border-radius: 0; --horizon: 50cqh; }
@media (min-width: 860px) { .hero .hero-copy h1 { max-width: 20ch; } .hero .scene { --horizon: 56cqh; } }
@container (min-width: 860px) {
  .hero .tree { height: min(calc(var(--horizon) - 96px), 32cqw); }
  .hero .plant { --b: 8cqw; --d: 8cqw; }
}
.hero-copy { position: absolute; z-index: 4000; left: 0; right: 0; top: calc(var(--topbar) + 3svh); text-align: center; padding-inline: 1.25rem; pointer-events: none; }
.hero-copy h1 { color: var(--ink); max-width: 14ch; margin-inline: auto; }
.hero-copy p { margin: 1rem auto 0; max-width: 36ch; font-size: clamp(1.05rem, .9rem + .6vw, 1.3rem); font-weight: 600; color: var(--ink); background: rgb(255 248 234 / .86); padding: .7rem 1.1rem; border-radius: 22px; }
.hero-actions { position: absolute; z-index: 4000; left: 0; right: 0; bottom: calc(2.2rem + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; padding-inline: 1rem; }
.hero-actions .btn { min-height: 62px; font-size: 1.25rem; }
@media (max-width: 859px) { .hero { height: calc(100svh - var(--tabbar)); min-height: 620px; } .hero-actions { bottom: 1.4rem; } .hero-actions .btn { min-height: 56px; font-size: 1.15rem; width: min(100%, 300px); } }
/* Pantallas bajas con barra de pestañas (360×640, 375×667, celular girado): la portada deja de
   tener alto fijo y acomoda texto y botones en columna, para que los botones queden arriba de las
   pestañas en lugar de debajo de ellas. Si no caben, la página se desplaza. */
@media (max-width: 859px) and (max-height: 700px) {
  .hero { height: auto; min-height: calc(100svh - var(--tabbar)); display: flex; flex-direction: column; }
  .hero-copy { position: relative; top: auto; padding-top: calc(var(--topbar) + .5rem); }
  .hero-copy h1 { font-size: clamp(1.9rem, 1rem + 5svh, 2.6rem); }
  .hero-copy p { margin-top: .7rem; font-size: 1rem; }
  .hero-actions { position: relative; bottom: auto; margin-top: auto; padding-top: 2.5rem; padding-bottom: 1.2rem; }
}
/* Celular girado: titular en una línea y botones lado a lado, para que todo quepa sin desplazarse. */
@media (max-width: 859px) and (max-height: 460px) and (orientation: landscape) {
  .hero-copy h1 { max-width: none; font-size: 1.7rem; }
  .hero-copy p { max-width: 62ch; font-size: .95rem; padding: .5rem 1rem; }
  .hero-actions { flex-wrap: nowrap; padding-top: .8rem; padding-bottom: .9rem; }
  .hero-actions .btn { width: auto; min-height: 48px; font-size: 1.05rem; }
}

.story { padding-block: clamp(3rem, 8vw, 6rem); }
.steps { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); margin-top: 2.5rem; }
.step { display: grid; gap: 1.25rem; align-items: center; }
.step .art { display: grid; place-items: center; background: var(--paper); border-radius: 36px 36px 36px 120px; min-height: 260px; padding: 1.5rem; }
.step .art svg { max-height: 240px; width: auto; }
.step h3 { font-size: clamp(1.5rem, 1rem + 1.6vw, 2.1rem); margin-bottom: .6rem; }
.step p { font-size: 1.15rem; color: var(--ink-2); max-width: 46ch; }
@media (min-width: 760px) {
  .step { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .step:nth-child(even) .art { order: 2; border-radius: 36px 36px 120px 36px; }
}
.qr-art { background: #fff; padding: .9rem; border-radius: 18px; width: 190px; height: 190px; }
.qr-art svg { width: 100%; height: 100%; display: block; }

.ladder-band { background: var(--paper); padding-block: clamp(3rem, 7vw, 5rem); border-block: 3px solid var(--line); }
.ladder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem .5rem; margin-top: 2rem; }
@media (min-width: 760px) { .ladder { grid-template-columns: repeat(6, 1fr); } }
.rung { display: grid; justify-items: center; text-align: center; gap: .1rem; position: relative; }
.rung .flower { width: min(120px, 100%); height: auto; }
.rung b { font: 800 1.1rem var(--font-display); }
.rung small { color: var(--ink-2); font-weight: 600; }
.rung.is-current .flower { filter: drop-shadow(0 8px 6px rgb(31 61 43 / .18)); }
.rung.is-locked .flower { opacity: .45; }

.limit-band { padding-block: clamp(3rem, 7vw, 5rem); }
.slots { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.slot { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 3px solid var(--line); }
.slot.on { background: var(--leaf); border-color: var(--leaf-d); }
.slot.on svg { stroke: #fff; }
.limit-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: center; }
@media (min-width: 760px) { .limit-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.final { background: var(--ink); color: var(--paper); text-align: center; padding-block: clamp(3rem, 8vw, 5.5rem); }
.final h2 { max-width: 18ch; margin-inline: auto; }
.final p { color: #cfe3bb; margin-top: .8rem; }
.final .row { display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; margin-top: 1.8rem; }
.final .btn.light { border-color: var(--paper); }
.footer { padding: 1.5rem 1rem 2rem; text-align: center; color: var(--ink-2); font-size: .95rem; background: var(--bg); }

/* ---------- Autenticación y canje ---------- */
.panel { background: var(--paper); border-radius: 28px; padding: clamp(1.25rem, 4vw, 2rem); box-shadow: var(--shadow); }
.auth-wrap { display: grid; gap: 1.25rem; }
.claim { min-height: calc(100svh - var(--topbar) - var(--tabbar)); display: grid; align-content: start; justify-items: center; gap: 1.5rem; text-align: center; padding-block: 2rem 3rem; }
@media (min-width: 860px) { .claim { min-height: calc(100svh - var(--topbar)); } }
/* En el celular, "Abrir mi regalo" debe verse sin desplazarse: menos aire y un ramo a la medida del alto. */
@media (max-width: 859px) { .claim { gap: 1.1rem; padding-block: 1.25rem 2rem; } }
.claim h1 { font-size: clamp(2rem, 1.2rem + 3.4vw, 3.4rem); max-width: 16ch; }
.claim .lead { font-size: 1.2rem; color: var(--ink-2); max-width: 38ch; }
.gift-art { position: relative; width: min(210px, 52vw, 22svh); }
.gift-art .bouquet { width: 100%; height: auto; overflow: visible; animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(1.5deg); } }
.gift-art.opening .bouquet { animation: unwrap 1s var(--ease) forwards; }
@keyframes unwrap { to { transform: translateY(-14px) scale(1.12); opacity: 0; } }
.from-note { background: var(--paper); border-radius: 22px; padding: 1rem 1.3rem; max-width: 36ch; box-shadow: var(--shadow); }
.from-note q { display: block; font: 600 1.1rem/1.4 var(--font-display); quotes: '“' '”'; }
.from-note small { display: block; margin-top: .4rem; font-weight: 700; color: var(--ink-2); }
/* "Estas flores vienen de…": la publicidad de la florería, discreta y en papel. */
.florist-line { max-width: 40ch; margin: 0; padding: .45rem 1rem .5rem; border-radius: 18px; background: var(--paper); border: 2px solid var(--line-paper); color: var(--ink-2); font-weight: 600; font-size: .95rem; line-height: 1.4; }
.florist-line b { color: var(--ink); }
.florist-line a { color: var(--leaf-d); font-weight: 700; }
.reveal { display: grid; gap: .9rem; width: min(560px, 100%); }
.reveal-row {
  display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: .9rem; text-align: left;
  background: var(--paper); padding: .7rem 1.1rem .7rem .8rem; border-radius: 22px; animation: pop .7s var(--ease) both; animation-delay: calc(var(--i) * .35s);
}
.reveal-row .flower { width: 72px; height: 72px; }
.reveal-row b { font: 800 1.25rem var(--font-display); display: block; }
.reveal-row .plus { font: 800 1.8rem var(--font-display); color: var(--leaf-d); }
.reveal-row .news { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .25rem; }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.9); } }
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .65rem; border-radius: 999px; font: 800 .82rem var(--font-body); background: var(--ink); color: var(--paper); white-space: nowrap; }
.badge.new { background: var(--pot); }
.badge.tier { background: var(--paper-2); color: var(--ink); border: 2px solid var(--line-paper); }
.claim-garden { width: min(720px, 100%); aspect-ratio: 4 / 3.3; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.claim .actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.dot-tier { display: inline-block; width: .8em; height: .8em; border-radius: 50%; background: var(--tc, var(--leaf)); }
.t-bronze { --tc: #cf8a4e; } .t-silver { --tc: #b8c4d0; } .t-gold { --tc: #f3c22e; } .t-diamond { --tc: #6fd6f2; }
.t-eternal { --tc: conic-gradient(#ff8fb1, #ffd76e, #9be9b4, #8fd0ff, #ff8fb1); }
.dot-tier.t-eternal { background: conic-gradient(#ff8fb1, #ffd76e, #9be9b4, #8fd0ff, #ff8fb1); }

/* ---------- Jardín ---------- */
.garden-stage { aspect-ratio: 3 / 3.4; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); background: var(--sky); }
@media (min-width: 700px) { .garden-stage { aspect-ratio: 16 / 10; } }
@media (min-width: 1100px) { .garden-stage { aspect-ratio: 16 / 9.2; } }
.garden-layout { display: grid; gap: 1.25rem; }
@media (max-width: 859px) {
  .garden-layout.is-editing .garden-main { position: sticky; top: calc(var(--topbar) + .4rem); z-index: 20; background: var(--bg); padding-bottom: .4rem; }
  .garden-layout.is-editing .garden-stage { aspect-ratio: 4 / 3; }
}
.garden-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: .9rem; }
.save-state { margin-left: auto; font-weight: 700; color: var(--ink-2); display: inline-flex; gap: .35rem; align-items: center; }
.counter { font: 800 1.1rem var(--font-display); background: var(--paper); padding: .35rem .9rem; border-radius: 999px; }
.counter.full { background: var(--sun); }
.limit-note { flex-basis: 100%; color: var(--ink-2); font-weight: 600; }
.full-note { background: var(--sun); color: var(--ink); font-weight: 700; padding: .6rem 1rem; border-radius: 16px; margin-bottom: .8rem; }
.shelf-item.is-full { opacity: .72; }
.tierup { display: grid; justify-items: center; gap: .5rem; background: var(--paper); border-radius: 28px; padding: 1.1rem 1.4rem 1.3rem; width: min(560px, 100%); animation: pop .8s var(--ease) both; }
.tierup .tu-row { display: flex; align-items: center; gap: .8rem; }
.tierup .flower { width: 96px; height: 96px; }
.tierup .tu-from { opacity: .55; }
.tierup .tu-to { animation: grow 1s var(--ease) .5s both; }
.tierup b { font: 800 1.3rem var(--font-display); }
.editor { display: grid; gap: 1.5rem; background: var(--paper); border-radius: 28px; padding: clamp(1rem, 3vw, 1.75rem); box-shadow: var(--shadow); }
.editor h3 { margin-bottom: .6rem; }
.sel-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; min-height: 48px; padding: .4rem; background: var(--bg); border-radius: 18px; }
.sel-bar .hint { padding-inline: .6rem; color: var(--ink-2); font-weight: 600; }
.tool { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .4rem .95rem; border-radius: 999px; border: 0; background: var(--paper); color: var(--ink); font: 700 .98rem var(--font-body); cursor: pointer; }
.tool:hover:not([disabled]) { background: #fff; }
.tool[disabled] { opacity: .45; cursor: not-allowed; }
.tool.danger { color: var(--danger); }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .75rem; }
.shelf-item {
  display: grid; justify-items: center; gap: .1rem; padding: .6rem .4rem .7rem; border: 2px solid var(--line-paper); border-radius: 20px 20px 28px 28px;
  background: var(--paper-2); cursor: pointer; font: inherit; color: var(--ink); text-align: center;
  transition: transform .25s var(--ease), border-color .2s;
}
.shelf-item:hover:not([disabled]) { transform: translateY(-3px); border-color: var(--pot-rim); }
.shelf-item[disabled] { opacity: .5; cursor: not-allowed; }
.shelf-item .flower { width: 62px; height: 62px; }
.shelf-item b { font: 800 .98rem var(--font-display); }
.shelf-item small { color: var(--ink-2); font-weight: 600; }
.opts { display: flex; flex-wrap: wrap; gap: .5rem; }
.opt { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .35rem 1rem .35rem .45rem; border-radius: 999px; border: 3px solid var(--line-paper); background: var(--paper-2); font: 700 .98rem var(--font-body); color: var(--ink); cursor: pointer; }
.opt[aria-pressed="true"] { border-color: var(--ink); background: #fff; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgb(31 61 43 / .15); }
.switch { display: inline-flex; gap: .6rem; align-items: center; font-weight: 700; cursor: pointer; min-height: 44px; }
.switch input { appearance: none; width: 52px; height: 30px; border-radius: 999px; background: #c8d6b4; position: relative; cursor: pointer; transition: background .2s; flex: none; }
.switch input::after { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.switch input:checked { background: var(--leaf-d); }
.switch input:checked::after { transform: translateX(22px); }
@media (min-width: 980px) {
  .editor { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .editor .wide { grid-column: 1 / -1; }
}

/* ---------- Índice (hoja botánica) ---------- */
.sheet {
  position: relative; background: var(--paper); border-radius: 30px; padding: clamp(1.25rem, 4vw, 2.75rem);
  box-shadow: var(--shadow); border: 3px solid var(--line-paper); outline: 2px solid var(--line-paper); outline-offset: -14px;
}
.sheet-head { text-align: center; padding: .6rem .5rem 1.5rem; }
.sheet-head h1 { font-size: clamp(2rem, 1.2rem + 3.6vw, 3.6rem); }
.sheet-head p { margin: .7rem auto 0; max-width: 46ch; color: var(--ink-2); font-size: 1.15rem; }
.sheet-head p b { color: var(--ink); }
.specimens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem .75rem; padding-top: .5rem; }
@media (min-width: 640px) { .specimens { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 980px) { .specimens { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.specimen { display: grid; justify-items: center; text-decoration: none; color: var(--ink); gap: .55rem; padding: .3rem; border-radius: 22px; }
.specimen:hover { color: var(--ink); }
.specimen .plate { width: min(150px, 80%); transition: transform .5s var(--ease); }
.specimen:hover .plate, .specimen:focus-visible .plate { transform: translateY(-6px) rotate(-2deg); }
.specimen .flower { width: 100%; height: auto; display: block; }
.label {
  position: relative; background: #fffdf2; border: 2px solid var(--line-paper); border-radius: 10px; padding: .45rem .8rem .55rem; text-align: center; width: min(190px, 100%);
  transform: rotate(-1.2deg);
}
.specimen:nth-child(even) .label { transform: rotate(1deg); }
.label::before { content: ''; position: absolute; top: -9px; left: 50%; width: 46px; height: 16px; background: rgb(255 199 46 / .5); transform: translateX(-50%) rotate(-3deg); border-radius: 3px; }
.label b { display: block; font: 800 1.1rem var(--font-display); }
.label .count { font: 800 .95rem var(--font-body); }
.label .tiername { font-size: .85rem; color: var(--ink-2); font-weight: 700; display: inline-flex; align-items: center; gap: .35rem; }
.meter { height: 8px; background: #efe3c3; border-radius: 99px; overflow: hidden; margin-top: .4rem; }
.meter i { display: block; height: 100%; background: var(--leaf); border-radius: 99px; }
.specimen.is-locked .label b, .specimen.is-locked .label .count { color: #5f7466; }
.sheet-foot { margin-top: 2rem; text-align: center; color: var(--ink-2); font-size: .98rem; }
.how { margin-top: 2.25rem; padding-top: 1.75rem; border-top: 3px dotted var(--line-paper); }
.how h2 { font-size: clamp(1.4rem, 1rem + 1.2vw, 2rem); text-align: center; }
.how .ladder { margin-top: 1.25rem; }

/* detalle de flor */
.detail { display: grid; gap: 2rem; }
@media (min-width: 820px) { .detail { grid-template-columns: 340px 1fr; align-items: start; } }
.detail-art { display: grid; place-items: center; background: var(--paper); border-radius: 30px; padding: 1.5rem 1rem; box-shadow: var(--shadow); }
.detail-art .flower { width: min(250px, 70%); height: auto; }
.facts { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin: 1rem 0 1.4rem; }
.facts div { display: grid; }
.facts b { font: 800 1.7rem/1 var(--font-display); }
.facts span { color: var(--ink-2); font-weight: 600; }
.back { display: inline-flex; gap: .4rem; align-items: center; font-weight: 700; margin-bottom: 1rem; }

/* ---------- Registro ---------- */
.timeline { display: grid; gap: 0; }
.entry { display: grid; grid-template-columns: auto 1fr; gap: 1rem 1.25rem; padding-block: 1.4rem; border-top: 3px dotted var(--line); }
.entry:first-child { border-top: 0; }
.entry .when { font: 800 1rem var(--font-display); color: var(--ink-2); grid-column: 1 / -1; }
.entry q { display: block; font: 600 1.15rem/1.45 var(--font-display); quotes: '“' '”'; margin-bottom: .6rem; }
.entry .by { font-weight: 700; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .8rem .15rem .25rem; background: var(--paper); border-radius: 999px; font-weight: 800; }
.chip .flower { width: 34px; height: 34px; }
.empty { text-align: center; display: grid; justify-items: center; gap: 1rem; padding: 2.5rem 1rem; }
.empty .flower { width: 120px; height: auto; }
.empty p { max-width: 36ch; color: var(--ink-2); font-size: 1.1rem; }

/* ---------- Regalar ---------- */
.gift-grid { display: grid; gap: 1.75rem; }
@media (min-width: 980px) { .gift-grid { grid-template-columns: 1.4fr 1fr; align-items: start; } .summary { position: sticky; top: calc(var(--topbar) + 1rem); } }
.picks { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; }
@media (min-width: 640px) { .picks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.25rem; } }
.pick { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .5rem .8rem .5rem .5rem; background: var(--paper); border-radius: 20px; border: 3px solid transparent; transition: border-color .2s, background .2s; }
/* Celulares angostos: flor y cantidad más compactas para que "Cempasúchil" quepa sin desbordar (botones de 44 px intactos). */
@media (max-width: 420px) {
  .pick { grid-template-columns: 48px minmax(0, 1fr) auto; gap: .5rem; padding: .4rem .5rem .4rem .4rem; }
  .pick .flower { width: 48px !important; height: 48px !important; }
  .pick b { font-size: .98rem; }
  .stepper input { width: 2.5rem; }
}
.pick.has { border-color: var(--leaf-d); background: #fff; }
.pick .flower { width: 60px; height: 60px; }
.pick b { font: 800 1.05rem var(--font-display); display: block; }
.pick small { color: var(--ink-2); font-weight: 600; }
.stepper { display: inline-flex; align-items: center; background: var(--bg); border-radius: 999px; }
.stepper button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.stepper button:hover:not([disabled]) { background: var(--leaf); color: #fff; }
.stepper button[disabled] { opacity: .35; cursor: not-allowed; }
.stepper input { width: 3.1rem; min-height: 44px; padding: 0; text-align: center; border: 0; background: transparent; font: 800 1.1rem var(--font-display); -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-inner-spin-button { display: none; }
.summary { display: grid; gap: 1rem; }
.summary .bouquet-box { display: grid; place-items: center; background: var(--paper-2); border-radius: 22px; padding: 1rem; min-height: 200px; }
.summary .bouquet { height: 190px; width: auto; overflow: visible; }
.total-line { font: 800 1.2rem var(--font-display); }

/* ---- Activación desde la florería ---- */
.activate form { display: grid; gap: 1.25rem; }
.extras summary { cursor: pointer; font: 800 1.1rem var(--font-display); list-style-position: inside; }
.extras summary .hint { font: 600 .95rem var(--font-body); color: var(--ink-2); }
/* Total y botón siempre a la mano: fijos abajo, encima de la barra de pestañas en el celular. */
.activate-bar {
  position: sticky; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + .6rem); z-index: 40;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem;
  background: var(--paper); border: 3px solid var(--line-paper); border-radius: 22px; padding: .6rem .6rem .6rem 1.1rem; box-shadow: var(--shadow);
}
@media (min-width: 860px) { .activate-bar { bottom: 1rem; } }
.activate-total { font: 800 1.1rem var(--font-display); }
.activate-bar .btn { min-height: 52px; }
@media (max-width: 420px) {
  .activate-bar { padding: .5rem .5rem .5rem .9rem; gap: .4rem .6rem; flex-wrap: nowrap; }
  .activate-bar:has(.form-error:not(:empty)) { flex-wrap: wrap; }
  .activate-total { font-size: .95rem; line-height: 1.2; }
  .activate-bar .btn { padding-inline: 1rem; font-size: 1.05rem; white-space: nowrap; flex: none; }
}
.activate-bar .form-error { flex-basis: 100%; margin: 0; }
.activate-bar .form-error:empty { display: none; }
.done-mark { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; background: var(--leaf); color: #fff; box-shadow: var(--shadow); animation: pop .5s var(--ease) both; }
.done-mark .icon { stroke-width: 3; }
.code-big { margin: 0; font: 800 1.5rem var(--font-display); letter-spacing: .12em; }
.code-inline { font-family: var(--font-display); font-weight: 800; letter-spacing: .08em; white-space: nowrap; }

/* ---- Panel de florería ---- */
.florist { display: grid; gap: 1.25rem; }
.how-steps { margin: .8rem 0 0; padding-left: 1.4rem; display: grid; gap: .6rem; }
.how-steps li::marker { font: 800 1.1rem var(--font-display); color: var(--leaf-d); }
.ticket { display: grid; gap: 1rem; justify-items: center; text-align: center; }
.ticket .qr { background: #fff; padding: 1rem; border-radius: 22px; width: min(270px, 80%); box-shadow: var(--shadow); }
.ticket .qr svg { width: 100%; height: auto; display: block; }
.ticket .code { font: 800 1.5rem var(--font-display); letter-spacing: .12em; }
.ticket .url { font-size: .9rem; color: var(--ink-2); word-break: break-all; max-width: 32ch; }
.ticket .bouquet { height: 150px; width: auto; overflow: visible; }
.row-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.sent-list { display: grid; margin-top: 1rem; }
.sent { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding-block: .8rem; border-top: 3px dotted var(--line); }
.sent:first-child { border-top: 0; }
.status { font-weight: 800; padding: .15rem .8rem; border-radius: 999px; background: var(--paper); }
.status.ok { background: var(--leaf); color: var(--ink); }
.notice { background: var(--paper-2); border-radius: 18px; padding: .8rem 1.1rem; font-weight: 600; }

/* ---- Guardar el jardín de una cuenta anónima ---- */
.merge-note { margin: 1rem 0 0; border: 2px solid var(--line-paper); }
.save-card { width: 100%; text-align: left; display: grid; gap: .8rem; border: 3px solid var(--leaf-d); }
.save-card h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); }
.save-card > p { color: var(--ink-2); font-weight: 600; }
.save-card > .btn { justify-self: start; }
.save-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-bottom: 1.25rem; padding: .8rem 1rem; background: var(--paper); border: 3px solid var(--sun); border-radius: 22px; }
.save-banner p { margin: 0; flex: 1 1 22rem; color: var(--ink-2); font-weight: 600; }
.save-banner b { color: var(--ink); }
.florist-escape { margin-top: .2rem; }
.scanner { width: min(420px, 100%); aspect-ratio: 1; border-radius: 28px; background: #10281a; overflow: hidden; position: relative; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Hoja imprimible de tarjetas (carta, 2 × 4) ----------
   Medidas en milímetros: imprime al 100 % ("Tamaño real"), sin "Ajustar a la página".
   Al imprimir solo se ve #print-card (index.html), que /admin llena con las hojas. */
.print-card { display: none; }
@media print {
  @page { size: letter; margin: 0; }
  body { background: #fff !important; padding: 0 !important; }
  body > *:not(.print-card) { display: none !important; }
  .print-card { display: block !important; }
}
.sheet-page {
  box-sizing: border-box; width: 215.9mm; height: 279.4mm; padding: 9mm 8mm;
  display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(4, 1fr);
  background: #fff; color: #000; break-after: page; overflow: hidden;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.sheet-page:last-child { break-after: auto; }
/* Línea punteada gris: guía para cortar. */
.pcard { box-sizing: border-box; display: grid; grid-template-columns: 38mm 1fr; gap: 4mm; align-items: center; padding: 4mm 5mm; border: .3mm dashed #b5b5b5; min-width: 0; }
.pcard-qr { display: grid; justify-items: center; gap: 1.6mm; }
.pcard-qr svg { width: 36mm; height: 36mm; display: block; }
.pcard-code { font: 800 11pt var(--font-display); letter-spacing: .12em; white-space: nowrap; color: #000; }
.pcard-text { display: grid; gap: 1.8mm; align-content: center; min-width: 0; }
.pcard-brand { display: inline-flex; align-items: center; gap: 1.6mm; }
.pcard-brand b { font: 800 15pt var(--font-display); color: #1f3d2b; white-space: nowrap; }
.pcard-slogan { font: 700 8.5pt var(--font-display); color: #44634e; }
.pcard-text p { margin: 0; font: 600 8.5pt/1.35 var(--font-body); color: #1f3d2b; }

/* ---- /admin ---- */
.admin { display: grid; gap: 1.25rem; }
.admin .form-row { display: grid; gap: 1rem; }
@media (min-width: 640px) { .admin .form-row { grid-template-columns: 2fr 1fr; } }
.admin select { width: 100%; min-height: 52px; }
.batch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding-block: 1rem; border-top: 3px dotted var(--line); }
.batch:first-child { border-top: 0; }
.batch b { font: 800 1.15rem var(--font-display); }
.batch .muted { display: block; font-size: .95rem; }
/* Vista previa en pantalla: la hoja real (en mm) escalada al ancho disponible. */
.sheet-preview { position: relative; width: 100%; max-width: 215.9mm; overflow: hidden; border-radius: 14px; box-shadow: var(--shadow); background: #fff; }
.sheet-preview .sheet-page { position: absolute; top: 0; left: 0; transform-origin: top left; transform: scale(var(--k, .4)); }
.print-warning { border: 3px solid var(--sun); display: grid; gap: .7rem; }
.print-warning code { font-weight: 700; background: var(--bg); padding: .05rem .4rem; border-radius: 6px; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .toast { transition: none; }
}

/* Nombre largo de la marca en pantallas angostas */
@media (max-width: 520px) {
  .brand { font-size: 1.25rem; gap: .4rem; }
  .account .linklike span:not(.who) { display: none; }
  .account .linklike { padding: .55rem; }
}

/* Eslogan junto a la marca: app.js lo oculta (.is-hidden) si no sobra espacio de verdad. */
.slogan { display: none; font: 600 .95rem var(--font-display); color: var(--ink-2); padding-left: .9rem; margin-left: .2rem; border-left: 2px solid var(--line); white-space: nowrap; flex: none; }
@media (min-width: 1100px) { .slogan { display: inline; } }
.slogan.is-hidden { display: none; }

.hero-slogan { display: block; font: 800 1.2em var(--font-display); margin-bottom: .2rem; }
