/* Depth Secret (Claude, 1-nov, v3). ChatGPT afina diseño y textos conservando los ids. */
.secret { background: var(--paper); }
.secret .top { position: relative; padding: calc(0.9rem + env(safe-area-inset-top)) 1rem 0.9rem; }
.secret main { width: min(40rem, calc(100% - 2rem)); margin: 0 auto; padding: 1.5rem 0 3rem; }
.secret section:not([hidden]) + section { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid #e6dccf; }
.eyebrow { margin: 0 0 0.6rem; color: var(--gold-line); font: 600 0.78rem/1 var(--sans); letter-spacing: 0.15em; text-transform: uppercase; }
.secret h1 { font-size: clamp(2rem, 7vw, 3rem); line-height: 1.08; }
.secret .help { margin: 0.9rem 0 0; max-width: 46ch; }
.secret .help em { font-style: italic; color: var(--ink); }
.on-desktop { display: none; }
.secret label { display: block; margin-top: 1.4rem; color: var(--ink); font-size: 0.95rem; }
.secret label .count { color: #6f5c4c; font-size: 0.82rem; }
.secret label.row { display: flex; align-items: center; gap: 0.6rem; font-size: 0.92rem; }
.secret textarea, .secret input[type="text"] { width: 100%; margin-top: 0.45rem; padding: 0.8rem 0.9rem; border: 1px solid #a08a72; border-radius: 2px; background: #fff; color: var(--ink); font: 400 1.1rem/1.4 var(--sans); }
.secret textarea { resize: vertical; min-height: 3.6rem; }
.names { display: grid; grid-template-columns: 1fr 1fr 5.5rem; gap: 0.8rem; }
.names label { margin-top: 1.2rem; }
.emojis { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }
.emojis button { font-size: 1.5rem; line-height: 1; padding: 0.35rem 0.5rem; border: 1px solid #e6dccf; border-radius: 2px; background: #fff; cursor: pointer; }
.style { margin-top: 1.4rem; padding: 0.9rem 1rem 1rem; border: 1px solid #e6dccf; }
.style legend { padding: 0 0.4rem; color: var(--ink); font-size: 0.95rem; }
.styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.styles button { display: grid; gap: 0.3rem; padding: 0.7rem 0.6rem 0.8rem; border: 2px solid transparent; border-radius: 2px; background: #fff; text-align: left; cursor: pointer; }
.styles button .swatch { height: 2.2rem; border-radius: 2px; }
.styles button .name { color: var(--ink); font: 600 0.9rem/1.2 var(--sans); }
.styles button .hint { color: #6f5c4c; font-size: 0.75rem; line-height: 1.3; }
.styles button[aria-pressed="true"] { border-color: var(--ink); }
.stage { position: relative; margin-top: 1.4rem; background: var(--wall); }
.stage canvas { display: block; width: 100%; height: auto; }
.rings { position: absolute; left: 50%; bottom: 0.8rem; display: flex; gap: var(--ring-gap, 5rem); transform: translateX(-50%); padding: 0.5rem 0.7rem; background: rgb(247 242 236 / 0.85); box-shadow: 0 1px 8px rgb(61 38 15 / 0.12); transition: opacity 600ms var(--ease-out); }
.rings span { width: 1.15rem; height: 0.65rem; border: 1.5px solid var(--gold-line); border-radius: 50%; }
.rings.gone { opacity: 0; pointer-events: none; }
.plain { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 1rem; margin: 0; padding: 1.5rem; background: rgb(247 242 236 / 0.97); color: var(--ink); font: 400 clamp(1.6rem, 7vw, 3rem)/1.25 var(--serif); text-align: center; overflow-wrap: anywhere; animation: breath 1.6s var(--ease-out) 1; }
.plain .signature { display: block; color: var(--gold-line); font: 500 0.95rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; }
@keyframes breath { 0% { box-shadow: inset 0 0 0 0 rgb(148 103 42 / 0); opacity: 0; } 35% { box-shadow: inset 0 0 90px 0 rgb(148 103 42 / 0.35); opacity: 1; } 100% { box-shadow: inset 0 0 0 0 rgb(148 103 42 / 0); opacity: 1; } }
.bar { position: absolute; left: 50%; bottom: calc(0.6rem + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 0.6rem 1rem; padding: 0.45rem 0.8rem; transform: translateX(-50%); background: rgb(247 242 236 / 0.92); border-radius: 2px; box-shadow: 0 1px 8px rgb(61 38 15 / 0.15); }
.bar .cta { min-height: 2.4rem; padding: 0.6em 1.2em; border: 0; font-size: 0.72rem; cursor: pointer; }
.preview-note { margin: 0; padding: 0.7rem 1rem 0.8rem; font-size: 0.85rem; color: #6f5c4c; text-align: center; }
.rotate { margin: 0.9rem 0 0; padding: 0; color: var(--ink); font-size: 0.95rem; font-style: italic; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.4rem; margin-top: 1.2rem; }
.actions .cta { min-height: 3.2rem; padding-inline: 1.8em; border: 0; cursor: pointer; }
.cta.disabled { opacity: 0.55; pointer-events: none; }
.enlace { background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); font: 400 1rem/1.4 var(--sans); text-decoration: underline; text-underline-offset: 0.2em; }
.result { margin: 1.4rem 0 0; color: var(--ink); font: 400 1.35rem/1.3 var(--serif); }
.chain { margin: 0.3rem 0 0; color: var(--gold-line); font-weight: 600; }
.nota { margin: 0.9rem 0 0; font-size: 0.85rem; color: #6f5c4c; }
.error { margin: 0.8rem 0 0; color: #8a2f1d; }
.foot { padding: 1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom)); text-align: center; font-size: 0.85rem; color: #6f5c4c; background: var(--wall); }

/* ---------- apertura ---------- */
.ceremony { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; align-content: center; gap: 0.8rem; padding: 2rem; background: var(--paper); text-align: center; cursor: pointer; animation: fadein 900ms var(--ease-out) 1; }
.ceremony.leaving { animation: fadeout 700ms var(--ease-out) 1 forwards; }
.ceremony-seal { margin: 0; font-size: 3rem; line-height: 1; animation: rise 1.6s var(--ease-out) 1; }
.ceremony-line { margin: 0; max-width: 16ch; color: var(--ink); font: 400 clamp(2rem, 8vw, 3.4rem)/1.1 var(--serif); animation: rise 1.4s var(--ease-out) 1; }
.ceremony-sub { margin: 0.4rem 0 0; color: #6f5c4c; animation: rise 1.8s var(--ease-out) 1; }
.ceremony-skip { position: absolute; bottom: calc(1.2rem + env(safe-area-inset-bottom)); margin: 0; color: #6f5c4c; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; }
@keyframes rise { from { opacity: 0; transform: translateY(0.6rem); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeout { to { opacity: 0; visibility: hidden; } }

/* ---------- lector a pantalla completa en paisaje (solo dentro de la página) ---------- */
body.full { overflow: hidden; }
body.full #reader-stage { position: fixed; inset: 0; z-index: 30; margin: 0; display: grid; place-items: center; background: var(--wall); }
body.full #reader-stage canvas { width: 100vw; height: 100dvh; object-fit: contain; }
body.full .rings { bottom: 1rem; }

@media (min-width: 761px) {
  .on-phone { display: none; }
  .on-desktop { display: inline; }
}
@media (max-width: 760px) {
  .secret .actions .cta { width: 100%; }
  .rings { --ring-gap: 2.8rem; }
  .names { grid-template-columns: 1fr 1fr; }
  .names label:last-child { grid-column: 1 / -1; }
  .styles { grid-template-columns: 1fr; }
  .styles button { grid-template-columns: 3rem 1fr; grid-template-rows: auto auto; column-gap: 0.7rem; }
  .styles button .swatch { grid-row: 1 / 3; height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .ceremony, .ceremony-seal, .ceremony-line, .ceremony-sub, .plain, .rings { animation: none; transition: none; }
}
