/* Erinnerungsbuch zusammenstellen: Dialog mit Umschlagvorschau in den Hausfarben */
.book-dialog { width:min(980px,calc(100% - 32px)); max-height:calc(100vh - 32px); padding:0; overflow:hidden; border:0; border-radius:18px; background:#fffdfe; color:#2b2432; box-shadow:0 30px 90px rgba(32,20,38,.4); }
.book-dialog::backdrop { background:rgba(31,24,33,.72); backdrop-filter:blur(5px); }
.book-dialog-shell { max-height:calc(100vh - 32px); display:grid; grid-template-rows:auto minmax(0,1fr); }
.book-dialog-shell > header { display:flex; align-items:flex-start; justify-content:space-between; gap:22px; padding:24px 28px 18px; border-bottom:1px solid #e6dcec; background:linear-gradient(135deg,#f9f6f8,#fff); }
.book-dialog-shell > header span { color:#643182; font-size:11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
.book-dialog-shell > header h2 { margin:6px 0 0; font-family:Georgia,"Times New Roman",serif; font-size:27px; font-weight:600; color:#2b2432; }
.book-dialog-shell > header p { margin:8px 0 0; color:#6f667a; font-size:13.5px; line-height:1.5; max-width:620px; }
.book-dialog .dialog-icon-close { width:38px; height:38px; flex:0 0 auto; display:grid; place-items:center; border:1px solid #e6dcec; border-radius:50%; background:#fff; color:#4e2555; font-size:22px; line-height:1; cursor:pointer; }
.book-dialog .dialog-icon-close:hover { background:#f1e9f5; }
.book-dialog-body { min-height:0; display:grid; grid-template-columns:300px minmax(0,1fr); gap:0; overflow:auto; }
.book-dialog-body > aside { padding:26px 22px 22px 28px; background:radial-gradient(500px 300px at 20% 0%,#f3e9f6,transparent 60%),#f9f6f8; border-right:1px solid #e6dcec; display:grid; align-content:start; justify-items:center; gap:16px; }
.book-cover-hint { color:#6f667a; font-size:11.5px; line-height:1.5; text-align:center; }

/* Umschlag */
.book-cover { position:relative; width:230px; aspect-ratio:148 / 210; perspective:1200px; animation:book-in .7s cubic-bezier(.2,.8,.2,1) both; }
.book-cover-page { position:absolute; inset:0; display:grid; align-content:start; justify-items:center; gap:4px; padding:16px 14px; border-radius:6px 12px 12px 6px; background:#f9f6f8; box-shadow:inset 0 0 0 1px #e6dcec,inset 0 0 0 5px #f9f6f8,inset 0 0 0 6px #b394cc,14px 18px 40px rgba(60,32,74,.28); transform:rotateY(-14deg); transform-origin:left center; transition:transform .5s ease; }
.book-cover:hover .book-cover-page { transform:rotateY(-4deg); }
.book-cover-spine { position:absolute; left:-6px; top:2px; bottom:2px; width:8px; border-radius:3px 0 0 3px; background:linear-gradient(90deg,#4e2555,#643182); }
.book-cover-logo { width:92px; margin:6px 0 4px; }
.book-cover-kicker { color:#643182; font-size:7.5px; font-weight:700; letter-spacing:.2em; text-transform:uppercase; }
.book-cover-name { font-family:Georgia,serif; font-size:17px; font-weight:400; text-align:center; line-height:1.15; color:#2b2432; }
.book-cover-dates { color:#6f667a; font-size:8.5px; }
.book-cover-rule { width:26px; height:1.5px; margin:4px 0 8px; background:#b394cc; }
.book-cover-portrait { width:112px; height:132px; display:grid; place-items:center; overflow:hidden; border:5px solid #fff; border-radius:6px; background:linear-gradient(160deg,#e9dcef,#b9a0c9); box-shadow:0 10px 22px rgba(60,32,74,.22); transform:rotate(-2deg); }
.book-cover-portrait img { width:100%; height:100%; object-fit:cover; transform-origin:center; }
.book-cover-portrait b { color:#fff; font-family:Georgia,serif; font-size:40px; font-weight:400; }
.book-cover-quote { margin-top:10px; color:#5a4d63; font-family:Georgia,serif; font-size:8.5px; font-style:italic; line-height:1.4; text-align:center; }
.book-cover-label { position:absolute; left:0; right:0; bottom:14px; color:#6f667a; font-size:8px; text-align:center; letter-spacing:.06em; }
@keyframes book-in { from { opacity:0; transform:translateY(16px) scale(.96); } to { opacity:1; transform:none; } }

/* Formular */
.book-form { display:grid; align-content:start; gap:18px; padding:24px 28px 26px; }
.book-form fieldset { margin:0; padding:0; border:0; min-width:0; }
.book-form legend { margin-bottom:10px; padding:0; color:#2b2432; font-family:Georgia,serif; font-size:17px; font-weight:600; }
.book-form legend small { color:#6f667a; font-family:"Segoe UI",Arial,sans-serif; font-size:12px; font-weight:400; }
.book-chapters { display:grid; gap:8px; }
.book-loading { margin:0; color:#6f667a; font-size:13px; }
.book-chapter { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:12px; padding:11px 14px; border:1px solid #e6dcec; border-radius:12px; background:#fff; cursor:pointer; transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease; }
.book-chapter:hover { border-color:#c9b0d6; transform:translateY(-1px); box-shadow:0 8px 20px rgba(60,32,74,.08); }
.book-chapter.empty { opacity:.55; cursor:default; }
.book-chapter input { position:absolute; opacity:0; width:0; height:0; }
.book-chapter-mark { width:22px; height:22px; border:2px solid #c9b0d6; border-radius:7px; background:#fff; position:relative; transition:background .2s ease,border-color .2s ease; }
.book-chapter-mark::after { content:""; position:absolute; left:6px; top:2px; width:5px; height:10px; border:solid #fff; border-width:0 2.5px 2.5px 0; transform:rotate(45deg) scale(0); transition:transform .2s ease; }
.book-chapter input:checked + .book-chapter-mark { background:#643182; border-color:#643182; }
.book-chapter input:checked + .book-chapter-mark::after { transform:rotate(45deg) scale(1); }
.book-chapter input:focus-visible + .book-chapter-mark { outline:2px solid #b394cc; outline-offset:2px; }
.book-chapter-copy strong { display:block; font-size:14px; color:#2b2432; }
.book-chapter-copy small { display:block; margin-top:2px; color:#6f667a; font-size:12px; }
.book-estimate { margin:2px 0 0; color:#6f667a; font-size:12.5px; }
.book-estimate b { color:#4e2555; }
.book-form textarea { width:100%; padding:12px 14px; border:1px solid #d9c6e3; border-radius:12px; background:#fff; color:#2b2432; font:inherit; font-size:14px; line-height:1.5; resize:vertical; }
.book-form textarea:focus { outline:2px solid rgba(100,49,130,.3); outline-offset:-1px; border-color:#643182; }
.book-counter { display:block; margin-top:6px; color:#6f667a; font-size:11.5px; }
.book-privacy { margin:0; padding:10px 14px; border-left:3px solid #b394cc; background:#fbf7fd; color:#4e2555; font-size:12.5px; line-height:1.5; border-radius:0 10px 10px 0; }
.book-dialog .book-form footer { min-height:0; display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-start; gap:10px; margin:0; padding:4px 0 0; background:transparent; color:inherit; font-size:inherit; }
.book-create { display:inline-flex; align-items:center; gap:10px; min-height:46px; padding:0 22px; border:0; border-radius:12px; background:linear-gradient(135deg,#643182,#7b45a0); color:#fff; font:inherit; font-size:14.5px; font-weight:700; cursor:pointer; box-shadow:0 10px 24px rgba(100,49,130,.28); transition:transform .2s ease,box-shadow .2s ease; }
.book-create:hover:not(:disabled) { transform:translateY(-1px); box-shadow:0 14px 28px rgba(100,49,130,.34); }
.book-create:disabled { cursor:wait; opacity:.85; }
.book-create i { width:16px; height:16px; border:2px solid rgba(255,255,255,.4); border-top-color:#fff; border-radius:50%; animation:book-spin .9s linear infinite; }
@keyframes book-spin { to { transform:rotate(360deg); } }
.book-result { display:flex; gap:8px; animation:book-in .4s ease both; }
.book-result a { display:inline-flex; align-items:center; min-height:44px; padding:0 16px; border:1px solid #d9c6e3; border-radius:12px; background:#fff; color:#4e2555; font-size:14px; font-weight:600; text-decoration:none; }
.book-result a:hover { border-color:#643182; background:#fbf9fc; }
.book-result .book-open { background:#f1e9f5; border-color:#d9c6e3; color:#4e2555; }
@media (max-width:820px) {
  .book-dialog { width:calc(100% - 16px); max-height:calc(100vh - 16px); border-radius:14px; }
  .book-dialog-shell { max-height:calc(100vh - 16px); }
  .book-dialog-body { grid-template-columns:1fr; }
  .book-dialog-body > aside { border-right:0; border-bottom:1px solid #e6dcec; padding:18px; }
  .book-cover { width:170px; }
  .book-cover-logo { width:70px; }
  .book-cover-name { font-size:13px; }
  .book-cover-portrait { width:82px; height:98px; }
  .book-form { padding:18px; }
  .book-dialog-shell > header { padding:18px 18px 14px; }
  .book-dialog-shell > header h2 { font-size:22px; }
}
@media (prefers-reduced-motion: reduce) { .book-cover, .book-result, .book-create i { animation:none; } .book-cover-page { transition:none; } }
