.title-script { display: block; width: fit-content; margin: -16px 0 22px auto; font-size: clamp(44px, 12vw, 60px); }
.title {
  font-size: clamp(44px, 13vw, 68px);
  font-weight: 300;
  margin-top: 20px;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1.5px solid var(--ink);
  padding: 6px 2px 12px;
}
.search svg { width: 20px; height: 20px; color: var(--ink-soft); flex: none; }
.search input {
  flex: 1;
  border: 0;
  background: none;
  outline: none;
  font-family: var(--serif);
  font-size: 26px;
  min-width: 0;
}
.search input::placeholder { color: var(--ink-faint); }

.results { list-style: none; margin-top: 8px; }
.results li {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  animation: fadeIn .35s ease backwards;
}
.results li:hover h3 { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.results img, .results .ph {
  width: 48px;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 3px;
  background: rgba(42,20,22,.12);
}
.results h3 { font-family: var(--display); font-weight: 400; font-size: 17px; line-height: 1.15; }
.results p { color: var(--ink-soft); font-size: 13px; }
.results .yr { font-family: var(--sans); font-size: 11px; color: var(--ink-faint); }
.results .msg { display: block; color: var(--ink-soft); cursor: default; border: 0; padding: 20px 0; }

.manual-link {
  margin: 22px 0 10px;
  color: var(--ink-soft);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.manual { display: grid; gap: 10px; padding-bottom: 40px; }
.manual[hidden] { display: none; }

/* bottom sheet */
.sheet-bg {
  position: fixed;
  inset: 0;
  background: rgba(42,20,22,.45);
  backdrop-filter: blur(3px);
  z-index: 20;
  animation: fadeIn .2s;
}
.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 560px;
  transform: translate(-50%, 105%);
  background: var(--bg);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -20px 50px -10px rgba(42,20,22,.35);
  padding: 24px 20px max(24px, env(safe-area-inset-bottom));
  z-index: 30;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
  display: grid;
  gap: 14px;
}
.sheet.open { transform: translate(-50%, 0); }
.sheet::before { content: ""; width: 40px; height: 4px; border-radius: 4px; background: var(--line); justify-self: center; margin: -10px 0 4px; }

.picked { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center; }
.picked img, .picked .ph { width: 64px; aspect-ratio: 2/3; object-fit: cover; border-radius: 4px; box-shadow: var(--shadow); background: rgba(42,20,22,.12); }
.picked h3 { font-family: var(--display); text-transform: uppercase; font-weight: 400; font-size: 22px; line-height: 1.05; }
.picked p { color: var(--ink-soft); font-size: 13px; }

.status { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet .pill { width: 100%; margin-top: 6px; }

/* portada propia en el libro añadido a mano */
.cover-add { display: flex; align-items: center; gap: 16px; padding: 12px; border-radius: 18px; border: 1.5px dashed var(--line); cursor: pointer; transition: border-color .15s; }
.cover-add:hover { border-color: var(--ink); }
.cover-prev { flex: none; width: 54px; aspect-ratio: 2 / 3; border-radius: 4px; background: rgba(42, 20, 22, .1) center / cover no-repeat; display: grid; place-items: center; color: var(--ink-soft); font-size: 22px; }
.cover-prev:not(.has)::before { content: "+"; }
.cover-prev.has { box-shadow: 0 8px 16px -6px rgba(42, 20, 22, .5); }
.cover-add-txt { display: grid; gap: 2px; }
.cover-add-txt b { font-weight: 500; font-size: 15px; }
.cover-add-txt small { color: var(--ink-soft); font-size: 13px; font-weight: 300; line-height: 1.35; }
.sheet:not(.open) { box-shadow: none; } /* cerrada, su sombra asomaba por abajo */

/* botón de escanear código de barras */
.scan-link {
  display: flex; align-items: center; justify-content: center; gap: 12px; height: 54px; margin: 6px 0 18px;
  border-radius: 999px; background: var(--ink); color: var(--bg); text-decoration: none;
  font-weight: 500; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
}
.scan-link svg { width: 22px; height: 22px; }
.scan-link:active { transform: scale(.98); }
.isbn-note { font-size: 13px; letter-spacing: .1em; color: var(--ink-soft); }
