:root {
  color-scheme: dark;
  --ink: #100b0d;
  --paper: #e8dfd1;
  --muted: #a99b91;
  --gold: #bd9b66;
  --red: #8e2025;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", sans-serif;
  --grain-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html { min-width: 320px; min-height: 100%; background: var(--ink); }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 50% 55%, rgba(64, 11, 16, .24), transparent 55%),
    linear-gradient(180deg, #100c0e 0%, #140a0c 58%, #1b090b 100%);
  color: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }

.grain {
  position: fixed;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  background-image: var(--grain-image);
}

.ambient-glow {
  position: fixed;
  z-index: 0;
  width: 680px;
  height: 680px;
  top: 9%;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(92, 17, 22, .17), rgba(48, 12, 16, .07) 38%, transparent 70%);
  filter: blur(18px);
  pointer-events: none;
}

.blood-sea {
  position: fixed;
  z-index: 0;
  inset: auto 0 0;
  width: 100%;
  height: 44vh;
  min-height: 260px;
  opacity: .6;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent, #000 24%);
}

.topbar, .footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 88px, 1440px);
  margin-inline: auto;
}

.topbar { height: 82px; }

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: #e7d8c3;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .26em;
}

.brand-mark { color: var(--gold); font-size: 22px; font-weight: 400; }

.edition, .footer {
  color: rgba(216, 199, 177, .48);
  font-size: 9px;
  letter-spacing: .2em;
}

.edition { display: inline-flex; align-items: center; gap: 10px; }
.edition i, .footer-center i { width: 4px; height: 4px; border-radius: 50%; background: #a53b3d; box-shadow: 0 0 9px #a53b3d; }
.edition b { color: rgba(216, 199, 177, .28); font-weight: 400; }

/* --- Escritorio de dos paneles: rail de consulta + scriptorium ------------ */

.desk {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  width: min(100% - 72px, 1280px);
  min-height: calc(100vh - 148px);
  margin: 0 auto;
}

.rail { position: relative; padding: 30px 46px 80px 0; border-right: 1px solid rgba(194, 157, 112, .13); }
.rail-inner { position: relative; display: flex; flex-direction: column; align-items: flex-start; text-align: left; }

.scriptorium { min-width: 0; padding: 30px 0 80px 46px; }

.script-head { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; color: #a98862; font-size: 8px; font-weight: 600; letter-spacing: .22em; }
.script-seal { color: #bd9b66; font-size: 15px; }
.script-line { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(178, 140, 92, .3), transparent); }
.script-count { color: #8c675a; }

.script-feed { display: grid; gap: 18px; }

.script-empty {
  margin-top: 7vh;
  padding: 44px 28px;
  border: 1px dashed rgba(194, 157, 112, .18);
  border-radius: 4px;
  color: #8b7d72;
  font-family: var(--serif);
  font-size: 18.5px;
  line-height: 1.65;
  text-align: center;
}
.script-empty-sigil { display: block; margin-bottom: 12px; color: #8c6f52; font-size: 24px; animation: sigil-pulse 2.6s ease-in-out infinite; }
.script-empty p { margin: 0; }

.entry {
  position: relative;
  padding: 20px 24px 18px;
  border: 1px solid rgba(194, 157, 112, .18);
  border-radius: 3px;
  background: linear-gradient(135deg, rgba(35, 20, 20, .85), rgba(18, 13, 14, .88));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22), inset 0 1px rgba(255, 255, 255, .02);
  animation: answer-arrive .55s cubic-bezier(.2, .8, .2, 1) both;
  backdrop-filter: blur(10px);
}

.entry-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 13px; padding-bottom: 11px; border-bottom: 1px solid rgba(194, 157, 112, .12); }
.entry-mark { color: #a53b3d; font-size: 11px; }
.entry-question { min-width: 0; color: #d8c5a8; font-family: var(--serif); font-size: 17.5px; font-style: italic; line-height: 1.35; overflow-wrap: anywhere; }

.entry-copy { color: #ddd0c0; font-family: var(--serif); font-size: 22px; line-height: 1.6; }
.entry-copy p { margin: 0 0 .72em; }
.entry-copy p:last-child { margin-bottom: 0; }
.entry-copy ul, .entry-copy ol { margin: .25em 0 .8em; padding-left: 1.35em; }
.entry-copy li { margin: .2em 0; }
.entry-copy li::marker { color: #a88258; }
.entry-copy h3 { margin: .95em 0 .35em; color: #e8d5b4; font-family: var(--serif); font-size: 1.02em; font-weight: 600; letter-spacing: .03em; }
.entry-copy h3:first-child { margin-top: 0; }
.entry-copy strong { color: #f2e6d2; font-weight: 600; }
.entry-copy em { color: #d9bc90; }
.entry-copy code { padding: .1em .38em; border-radius: 2px; background: rgba(0, 0, 0, .28); color: #cbb492; font-family: ui-monospace, "Cascadia Code", monospace; font-size: .72em; }

.entry-caret { display: inline-block; margin-left: 2px; color: #bd9b66; font-size: .78em; animation: caret-blink .9s steps(2, jump-none) infinite; }
@keyframes caret-blink { 50% { opacity: 0; } }

.entry-skip { margin-top: 12px; padding: 7px 13px; border: 1px solid rgba(194, 157, 112, .25); border-radius: 2px; background: rgba(0, 0, 0, .22); color: #b7a48d; cursor: pointer; font-size: 10px; letter-spacing: .1em; transition: color .2s, border-color .2s; }
.entry-skip:hover { border-color: rgba(194, 157, 112, .5); color: #e0cbaa; }

.sources { margin-top: 18px; border-top: 1px solid rgba(194, 157, 112, .14); color: #b3a396; }
.sources summary { display: flex; align-items: center; gap: 8px; padding-top: 13px; cursor: pointer; list-style: none; font-size: 11px; letter-spacing: .07em; }
.sources summary::-webkit-details-marker { display: none; }
.sources summary::after { width: 6px; height: 6px; margin-left: auto; border-right: 1px solid #b49a79; border-bottom: 1px solid #b49a79; content: ""; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.sources[open] summary::after { transform: rotate(225deg) translate(-2px, -1px); }
.source-count { color: #8c675a; }
.source-list { display: grid; gap: 9px; padding-top: 12px; }
.source-excerpt { margin: 0; padding: 10px 12px; border-left: 1px solid rgba(182, 128, 85, .48); background: rgba(0,0,0,.14); color: #a99b8f; font-family: var(--serif); font-size: 16.5px; line-height: 1.5; }
.source-score { display: block; margin-top: 5px; color: #806f61; font-family: var(--sans); font-size: 9px; letter-spacing: .12em; }

.entry.is-pending .entry-copy { color: #9b8d80; font-style: italic; }
.entry.is-error { border-color: rgba(169, 64, 64, .4); }
.entry.is-error .entry-copy { color: #d99a91; font-family: var(--sans); font-size: 13px; font-style: normal; }

.error-message { margin: 18px 0 0; color: #d99a91; font-size: 13px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.footer { min-height: 66px; color: rgba(216, 199, 177, .38); font-size: 8px; }
.footer-center { display: inline-flex; align-items: center; gap: 9px; color: rgba(216, 199, 177, .53); }

/* --- Hero del rail --------------------------------------------------------- */

.book-stage {
  position: relative;
  width: 148px;
  height: 148px;
  margin-bottom: 4px;
  perspective: 800px;
  transform-style: preserve-3d;
  animation: book-arrive 1.25s cubic-bezier(.2,.8,.2,1) both;
}

.book {
  position: absolute;
  top: 18px;
  left: 36px;
  width: 80px;
  height: 108px;
  transform: rotateY(-28deg) rotateX(8deg) rotateZ(-7deg);
  transform-style: preserve-3d;
  animation: book-drift 7s ease-in-out infinite;
  filter: drop-shadow(13px 17px 16px rgba(0,0,0,.46));
}

.book-cover {
  position: absolute;
  inset: 0 5px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #89683d;
  outline: 1px solid rgba(194, 161, 107, .42);
  outline-offset: -6px;
  border-radius: 2px 5px 5px 2px;
  background:
    radial-gradient(ellipse at 53% 45%, rgba(122, 36, 30, .48), transparent 48%),
    linear-gradient(110deg, #261416 0%, #351b1b 44%, #1d1213 100%);
  box-shadow: inset 4px 0 6px rgba(0,0,0,.65), inset -2px 0 4px rgba(227,183,115,.15);
  color: #c8aa77;
  transform: translateZ(9px);
}

.book-cover::before, .book-cover::after {
  position: absolute;
  inset: 11px 9px;
  border: 1px solid rgba(176, 135, 77, .42);
  content: "";
  pointer-events: none;
}

.book-cover::after { inset: 14px 12px; border-color: rgba(176, 135, 77, .21); }
.book-pages { position: absolute; inset: 4px 0 3px auto; width: 9px; background: repeating-linear-gradient(90deg, #b9a98f 0 1px, #5e4b3a 1px 2px); transform: translateZ(1px); }
.book-pages::after { position: absolute; content: ""; inset: 0 0 0 6px; background: linear-gradient(90deg, transparent, #332321); }
.cover-rule { position: absolute; left: 22px; right: 22px; height: 1px; background: rgba(195, 154, 91, .65); }
.cover-rule-top { top: 24px; }
.cover-rule-bottom { bottom: 23px; }
.cover-sigil { margin: 1px 0 3px; color: #d0af77; font-size: 18px; text-shadow: 0 0 12px rgba(196, 117, 63, .4); }
.cover-title { font-family: var(--serif); font-size: 14px; line-height: .92; letter-spacing: .04em; text-transform: uppercase; }
.cover-title small { font-size: 10px; letter-spacing: .1em; }
.cover-edition { margin-top: 7px; color: #a48659; font-size: 5px; letter-spacing: .22em; }
.book-shadow { position: absolute; top: 99px; left: 27px; width: 102px; height: 21px; border-radius: 50%; background: rgba(112, 17, 20, .55); filter: blur(15px); transform: rotate(-7deg); }

.orbit { position: absolute; top: 16px; left: 12px; width: 124px; height: 124px; border: 1px solid rgba(177, 135, 87, .14); border-radius: 50%; transform: rotateX(71deg) rotateZ(-19deg); }
.orbit-two { top: 24px; left: 19px; width: 110px; height: 110px; border-color: rgba(168, 47, 45, .12); transform: rotateX(71deg) rotateZ(39deg); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 9px 0 10px;
  color: #b59669;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .28em;
}
.eyebrow span { width: 21px; height: 1px; background: linear-gradient(90deg, transparent, rgba(181,150,105,.7)); }
.eyebrow span:last-child { transform: rotate(180deg); }

h1 {
  margin: 0;
  color: #f0e6d6;
  font-family: var(--serif);
  font-size: clamp(40px, 4.4vw, 56px);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: .98;
  text-shadow: 0 4px 40px rgba(200, 148, 100, .09);
}

h1 em { color: #bd9b75; font-weight: 400; }
.intro { margin: 15px 0 26px; color: #aa9a90; font-family: var(--serif); font-size: 19px; line-height: 1.45; }

.search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: min(100%, 480px);
  height: 58px;
  padding: 6px;
  border: 1px solid rgba(202, 170, 128, .33);
  border-radius: 3px;
  background: rgba(17, 12, 13, .77);
  box-shadow: 0 14px 50px rgba(0,0,0,.25), inset 0 0 24px rgba(120, 38, 37, .05), 0 0 0 5px rgba(207, 171, 125, .025);
  transition: border-color .25s, box-shadow .25s, transform .25s;
  backdrop-filter: blur(12px);
}
.search-form:focus-within { border-color: rgba(212, 176, 126, .76); box-shadow: 0 14px 50px rgba(0,0,0,.3), 0 0 0 5px rgba(207, 171, 125, .055), 0 0 28px rgba(134, 43, 40, .13); transform: translateY(-1px); }
.search-icon { display: grid; flex: 0 0 46px; place-items: center; color: #967e65; }
.search-icon svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.4; }
.search-form input { width: 100%; min-width: 0; height: 100%; padding: 0 8px 0 1px; border: 0; outline: 0; background: transparent; color: #efe4d5; font-size: 13.5px; letter-spacing: .01em; }
.search-form input::placeholder { color: #776d67; opacity: 1; }
.search-form input::-webkit-search-cancel-button { filter: grayscale(1); opacity: .45; }
.search-button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 15px; border: 1px solid rgba(220, 183, 131, .15); border-radius: 2px; background: linear-gradient(135deg, #79292b, #541b20); color: #f0dfc7; cursor: pointer; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; transition: filter .2s, transform .2s; }
.search-button:hover { filter: brightness(1.22); }
.search-button:active { transform: scale(.98); }
.search-button:disabled { cursor: wait; opacity: .65; }
.search-button svg { width: 16px; height: 16px; stroke: #d5b58e; stroke-width: 1.4; }

/* --- Seek: el tomo pasa hojas (pantalla completa en móvil, anclado al rail en escritorio) --- */

.seek-overlay {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 42%, rgba(38, 12, 15, .92), rgba(8, 5, 6, .97) 68%);
  opacity: 0;
  transition: opacity .5s ease;
  backdrop-filter: blur(7px);
}
.seek-overlay::after { position: absolute; inset: 0; background-image: var(--grain-image); content: ""; opacity: .1; pointer-events: none; }
.seek-overlay.is-open { opacity: 1; }
.seek-overlay.is-closing { opacity: 0; }

body.is-seeking { overflow: hidden; }

.seek-fall { position: absolute; inset: 0; pointer-events: none; }

.falling-page {
  position: absolute;
  top: -9vh;
  width: 44px;
  height: 60px;
  border-radius: 1px 2px 2px 1px;
  background: linear-gradient(158deg, #d8cab0, #b3a186 62%, #8f7d64);
  box-shadow: 0 8px 20px rgba(0,0,0,.45), inset -3px 0 5px rgba(0,0,0,.18);
  animation: fall-page var(--fall-duration, 5s) linear var(--fall-delay, 0s) both;
}
.falling-page::after { position: absolute; inset: 7px 6px; background: repeating-linear-gradient(180deg, rgba(92, 72, 55, .34) 0 1px, transparent 1px 7px); content: ""; opacity: .55; }

@keyframes fall-page {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0deg); }
  7% { opacity: .82; }
  80% { opacity: .55; }
  100% { opacity: 0; transform: translate3d(var(--fall-x, 0), 114vh, 0) rotate(var(--fall-spin, 180deg)); }
}

.seek-stage { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; perspective: 1100px; }

.seek-book {
  position: relative;
  width: min(82vw, 430px);
  aspect-ratio: 1.2;
  transform: rotateX(36deg) rotateZ(-1.4deg);
  transform-style: preserve-3d;
  filter: drop-shadow(0 22px 30px rgba(0,0,0,.5));
}
.seek-overlay.is-open .seek-book { animation: seek-book-open .72s cubic-bezier(.22,.75,.2,1) both; }

@keyframes seek-book-open {
  from { opacity: 0; transform: rotateX(36deg) rotateZ(-1.4deg) rotateY(-94deg) scale(.93); }
  to { opacity: 1; transform: rotateX(36deg) rotateZ(-1.4deg) rotateY(0deg) scale(1); }
}

.seek-shadow {
  position: absolute;
  top: 97%;
  left: 3%;
  width: 94%;
  height: 15%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,.66), rgba(0,0,0,.28) 52%, transparent 72%);
  filter: blur(13px);
  transform: translateZ(-1px);
}

.seek-side {
  position: absolute;
  top: 0;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(105deg, #efe5cf, #d9cbb0 70%, #c3b498);
  box-shadow: inset 0 0 34px rgba(105, 82, 56, .22);
}
.seek-side-left {
  left: 0;
  width: calc(50% + 1px);
  border-radius: 3px 1px 1px 3px;
  background: linear-gradient(255deg, #efe5cf, #dccdb1 70%, #c6b699);
}
.seek-side-right {
  right: 0;
  width: calc(50% + 1px);
  border-radius: 1px 3px 3px 1px;
}

.seek-page-body { position: absolute; inset: 0; }
.seek-rubric { position: absolute; height: 6px; border-radius: 1px; background: rgba(133, 33, 34, .5); }
.seek-scribble { position: absolute; left: 0; display: block; height: 9px; overflow: visible; }
.seek-ink { position: absolute; color: rgba(94, 40, 32, .55); font-family: var(--serif); line-height: 1; }
.seek-doodle { position: absolute; display: block; width: 40px; height: 40px; color: rgba(74, 56, 42, .5); }
.seek-doodle svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.seek-doodle svg .pupil { fill: currentColor; stroke: none; }
.seek-doodle.is-red { color: rgba(142, 32, 37, .48); }
.seek-stain { position: absolute; border-radius: 50%; filter: blur(7px); }
.seek-col { position: absolute; top: 0; height: 100%; }
.seek-folio { position: absolute; bottom: 5%; left: 0; right: 0; color: rgba(88, 68, 52, .45); font-family: var(--serif); font-size: 11px; letter-spacing: .12em; text-align: center; }

.seek-stack {
  position: absolute;
  top: 3px;
  right: 5px;
  bottom: 3px;
  width: calc(16px + var(--stack, 1) * 34%);
  border-right: 1px solid rgba(88, 68, 52, .35);
  background: repeating-linear-gradient(180deg, #e7dcc5 0 2px, #b3a186 2px 3px);
  box-shadow: -3px 0 8px rgba(80, 60, 40, .22);
  transition: width .24s ease;
}

.seek-spine {
  position: absolute;
  z-index: 2;
  top: -2px;
  bottom: -2px;
  left: calc(50% - 7px);
  width: 14px;
  border-radius: 40% / 4%;
  background: linear-gradient(90deg, #241315, #4a2427 46%, #1c1011);
  box-shadow: 0 0 22px rgba(0,0,0,.55);
}

.seek-flip-stack { position: absolute; inset: 0; pointer-events: none; }
.seek-sheets { position: absolute; z-index: 3; inset: 0; transform-style: preserve-3d; }

.seek-sheet {
  position: absolute;
  top: 0;
  right: 0;
  width: calc(50% + 1px);
  height: 100%;
  transform: translate3d(calc(var(--fan, 0) * -2.5px), calc(var(--fan, 0) * 1.5px), calc(var(--fan, 0) * 2px)) rotate(calc(var(--fan, 0) * 0.6deg));
  transform-style: preserve-3d;
}

.seek-sheet-turn {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 4px solid #f3ead6;
  border-radius: 2px 5px 5px 2px;
  background: linear-gradient(255deg, #ece2cb, #d5c7ab 70%, #c4b598);
  box-shadow: inset 0 0 26px rgba(105, 82, 56, .18), 0 14px 30px rgba(0,0,0,.28);
  opacity: 0;
  transform-origin: left center;
}
.seek-sheet-turn.is-turning { animation: seek-sheet-turn var(--turn-duration, 300ms) cubic-bezier(.42,.02,.55,.96) both; }

.seek-sheet-cast {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(38, 22, 16, .6), rgba(38, 22, 16, .06) 55%, rgba(255, 246, 228, .16));
  opacity: 0;
  pointer-events: none;
}
.seek-sheet-turn.is-turning .seek-sheet-cast { animation: seek-sheet-cast var(--turn-duration, 300ms) ease both; }

@keyframes seek-sheet-cast {
  0% { opacity: 0; }
  35% { opacity: .65; }
  70% { opacity: .45; }
  100% { opacity: 0; }
}

@keyframes seek-sheet-turn {
  0% { opacity: 1; transform: translateZ(0) rotateY(0deg); }
  30% { opacity: 1; transform: translateZ(8px) translateY(-1%) rotateY(-62deg); }
  48% { opacity: 1; transform: translateZ(16px) translateY(-1.6%) rotateY(-94deg); }
  70% { opacity: 1; transform: translateZ(10px) translateY(-.5%) rotateY(-130deg); }
  88% { opacity: 1; transform: translateZ(3px) rotateY(-160deg); }
  100% { opacity: 0; transform: translateZ(0) rotateY(-174deg); }
}

.seek-turn-shadow {
  position: absolute;
  z-index: 2;
  top: 6%;
  right: 3%;
  width: 44%;
  height: 86%;
  border-radius: 45%;
  background: radial-gradient(ellipse at 50% 50%, rgba(28, 14, 10, .42), transparent 66%);
  opacity: 0;
  filter: blur(13px);
}
.seek-turn-shadow.is-turning { animation: seek-turn-shadow var(--turn-duration, 300ms) ease both; }

@keyframes seek-turn-shadow {
  0% { opacity: .55; transform: translateX(0) scaleX(1); }
  50% { opacity: .6; transform: translateX(-26%) scaleX(.78); }
  100% { opacity: 0; transform: translateX(-54%) scaleX(.5); }
}

.seek-caption { display: flex; align-items: center; gap: 11px; margin: 30px 0 0; color: #c4b1a0; font-family: var(--serif); font-size: 19px; }
.seek-sigil { color: #bd9b66; font-size: 20px; animation: sigil-pulse 1.4s ease-in-out infinite; }
.seek-progress { margin: 10px 0 0; color: #8c7a68; font-size: 8px; letter-spacing: .26em; font-variant-numeric: tabular-nums; }

@keyframes book-drift { 0%, 100% { transform: rotateY(-28deg) rotateX(8deg) rotateZ(-7deg) translateY(0); } 50% { transform: rotateY(-23deg) rotateX(11deg) rotateZ(-5deg) translateY(-5px); } }
@keyframes book-arrive { from { opacity: 0; transform: translateY(13px) scale(.94); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes answer-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sigil-pulse { 0%,100% { opacity: .45; transform: rotate(0) scale(.9); } 50% { opacity: 1; transform: rotate(45deg) scale(1.08); } }

/* --- Escritorio: seek anclado al rail -------------------------------------- */

@media (min-width: 1000px) {
  body.is-seeking { overflow: hidden; }
  .seek-overlay {
    position: absolute;
    border-radius: 3px;
    background: radial-gradient(ellipse at 50% 45%, rgba(32, 11, 13, .94), rgba(10, 6, 7, .97) 70%);
  }
  .seek-book { width: min(30vw, 320px); }
  .seek-caption { margin-top: 22px; font-size: 16px; }
  .seek-progress { margin-top: 8px; }
}

/* --- Móvil: columna única -------------------------------------------------- */

@media (max-width: 999px) {
  .desk { display: block; width: calc(100% - 36px); min-height: 0; }
  .rail { padding: 16px 0 34px; border-right: 0; border-bottom: 1px solid rgba(194, 157, 112, .13); }
  .scriptorium { padding: 26px 0 70px; }
  .script-empty { margin-top: 26px; }
}

@media (max-width: 640px) {
  .topbar, .footer { width: calc(100% - 36px); }
  .topbar { height: 70px; }
  .edition { font-size: 7px; letter-spacing: .13em; gap: 7px; }
  .book-stage { width: 132px; height: 132px; transform: scale(.92); transform-origin: left top; margin-bottom: 0; }
  .eyebrow { margin-top: 4px; font-size: 8px; letter-spacing: .2em; }
  h1 { font-size: clamp(38px, 11vw, 52px); }
  .intro { margin: 12px 0 20px; font-size: 17px; }
  .search-form { height: 54px; }
  .search-icon { flex-basis: 38px; }
  .search-form input { font-size: 12px; }
  .search-form input::placeholder { font-size: 11px; }
  .search-button { gap: 7px; height: 42px; padding: 0 11px; font-size: 10px; }
  .entry { padding: 17px 16px 15px; }
  .entry-copy { font-size: 19.5px; }
  .seek-book { width: min(88vw, 340px); }
  .seek-caption { margin-top: 23px; font-size: 16px; }
  .footer { min-height: 62px; font-size: 6px; letter-spacing: .1em; }
  .footer-center { gap: 5px; }
  .footer-center i { width: 3px; height: 3px; }
}

@media (max-width: 380px) {
  .edition { letter-spacing: .08em; }
  .edition b { display: none; }
  .brand { font-size: 10px; }
  .search-button { padding: 0 8px; }
  .search-button svg { width: 14px; }
  .footer > span:first-child { display: none; }
}

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