
/* Legal electronic edition finder — scoped so it won't change existing book cards. */
.ebook-find-trigger{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:36px;
  margin:0 0 7px;
  padding:9px 8px;
  border:1px solid rgba(221,196,139,.23);
  border-radius:11px;
  color:#eadbc0;
  background:linear-gradient(120deg,rgba(226,205,159,.075),rgba(83,117,77,.025));
  font:800 11px/1.25 var(--font-ui,'Nunito',sans-serif);
  cursor:pointer;
  transition:background .2s,border-color .2s;
}
.ebook-find-trigger:hover{background:rgba(221,196,139,.15);border-color:rgba(221,196,139,.47)}
.ebook-finder-dialog{
  box-sizing:border-box;
  width:min(790px,calc(100vw - 22px));
  max-width:790px;
  height:min(90dvh,930px);
  max-height:min(90dvh,930px);
  overflow:hidden;
  margin:auto;
  padding:0;
  border:1px solid rgba(182,209,164,.29);
  border-radius:25px;
  background:radial-gradient(ellipse at top right,rgba(166,151,100,.12),transparent 48%),linear-gradient(150deg,#12261a,#09170e);
  color:#eef2ea;
  box-shadow:0 38px 110px rgba(0,0,0,.65);
}
.ebook-finder-dialog::backdrop{background:rgba(0,8,4,.78);backdrop-filter:blur(6px)}
.ebook-finder-wrap{box-sizing:border-box;padding:24px;height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable}
.ebook-finder-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.ebook-finder-eyebrow{display:block;font-size:10px;font-weight:800;letter-spacing:.16em;color:#d6c18c}
.ebook-finder-head h2{font:400 clamp(30px,4.4vw,45px)/1.08 'Poiret One',sans-serif;margin:8px 0 9px;color:#edf3e8}
.ebook-finder-head p{margin:0;color:#acbdaa;font-size:12px;line-height:1.6}
.ebook-finder-close{flex:0 0 34px;width:34px;height:34px;border:1px solid rgba(222,238,208,.2);border-radius:50%;background:rgba(255,255,255,.035);color:#eef2e9;font-size:21px;cursor:pointer}
.ebook-finder-form{display:grid;grid-template-columns:1.4fr 1fr 160px;gap:11px;align-items:end;margin:23px 0 14px}
.ebook-finder-form label{min-width:0;display:grid;gap:7px;font:800 11px/1.4 var(--font-ui,'Nunito',sans-serif);color:#d9e3d4}
.ebook-finder-form label small{display:inline;font-size:10px;font-weight:500;color:#adbaaa}
.ebook-finder-form input,.ebook-finder-form select{
  box-sizing:border-box;
  width:100%;
  min-width:0;
  height:42px;
  padding:10px 12px;
  border:1px solid rgba(184,211,175,.24);
  border-radius:12px;
  color:#f1f7ed;
  background:#0a1a11;
  font:600 12px var(--font-ui,'Nunito',sans-serif);
  outline:none
}
.ebook-finder-form input:focus,.ebook-finder-form select:focus{border-color:#a8d49f}
.ebook-finder-form select option{background:#102418}
#ebook-finder-submit{height:42px;padding:9px 16px;border:0;border-radius:12px;background:#b8d6ad;color:#14221a;font:800 12px var(--font-ui,'Nunito',sans-serif);cursor:pointer;grid-column:1/-1}
#ebook-finder-submit:disabled{cursor:wait;opacity:.65}
.ebook-finder-tip,.ebook-finder-status{font-size:11px;line-height:1.5;margin:11px 0;color:#c4d3ba}
.ebook-finder-tip{border:1px solid rgba(205,217,169,.16);background:rgba(208,188,128,.04);padding:9px 12px;border-radius:12px}
.ebook-finder-status{color:#d9c590}
.ebook-finder-results{display:grid;gap:11px;margin-top:14px}
.ebook-result{padding:15px;border:1px solid rgba(198,222,186,.16);border-radius:17px;background:linear-gradient(135deg,rgba(40,67,44,.58),rgba(7,21,12,.59));min-width:0}
.ebook-result-top{display:flex;align-items:start;justify-content:space-between;gap:10px}
.ebook-result-details{display:grid;gap:5px;min-width:0}
.ebook-result-title{font-size:15px;line-height:1.35;overflow-wrap:anywhere}
.ebook-result-author{color:#c5d4bf;font-size:11px;line-height:1.45}
.ebook-tags{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 0}
.ebook-tag{border:1px solid rgba(200,222,183,.2);border-radius:999px;padding:5px 8px;font:700 9px/1.2 var(--font-ui,'Nunito',sans-serif);color:#c9ddbd;background:rgba(162,202,157,.06)}
.ebook-tag.subtle{color:#e3cf9a;border-color:rgba(226,200,138,.16)}
.ebook-tag.muted{color:#bacabc}
.ebook-small-heading{display:block;margin:14px 0 6px;font-size:10px;font-weight:800;color:#a9c39c}
.ebook-file-links,.ebook-result-actions,.ebook-other-links{display:flex;flex-wrap:wrap;gap:8px}
.ebook-file-link,.ebook-action,.ebook-other-link{display:inline-flex;align-items:center;justify-content:center;padding:9px 11px;border-radius:10px;text-decoration:none;font-size:11px;line-height:1.25;font-weight:750}
.ebook-file-link{border:1px solid rgba(184,214,173,.34);background:rgba(177,214,160,.11);color:#d9edd0}
.ebook-file-link.is-recommended{background:#b8d6ad;color:#142819;border-color:#b8d6ad}
.ebook-action,.ebook-other-link{border:1px solid rgba(220,224,203,.15);background:rgba(255,255,255,.028);color:#d7e2d2}
.ebook-file-link:hover,.ebook-action:hover,.ebook-other-link:hover{filter:brightness(1.13);border-color:rgba(191,220,180,.5)}
.ebook-result-actions{margin-top:11px}
.ebook-no-download,.ebook-result-notice,.ebook-manga-note,.ebook-empty{font-size:11px;line-height:1.6;color:#b8cbb4;margin:10px 0 0}
.ebook-result-notice{color:#b9b9a0;font-size:10px}
.ebook-other{padding:14px;border:1px dashed rgba(202,222,188,.2);border-radius:14px;margin:5px 0}
.ebook-other p{font-size:11px;color:#c7d6c0;margin:0 0 9px}
.ebook-finder-footer{padding:16px 0 0;color:#9ea99c;line-height:1.55;font-size:10px}
@media(max-width:700px){
  .ebook-finder-form{grid-template-columns:1fr 1fr}
  .ebook-finder-form label:first-child{grid-column:1/-1}
  .ebook-finder-wrap{padding:17px}
}
@media(max-width:420px){
  .ebook-finder-form{grid-template-columns:1fr}
  .ebook-finder-form label:first-child{grid-column:auto}
  .ebook-finder-head h2{font-size:32px}
}
@media(prefers-reduced-motion:reduce){.ebook-find-trigger{transition:none}}
