:root{font-family:Inter,Arial,sans-serif;color:#20334a;background:#f5f7fa}*{box-sizing:border-box}body{margin:0}main{max-width:1260px;margin:0 auto;padding:36px 24px 80px}.back{margin-bottom:22px}a{color:#1765ef}.hero,.layout>aside,.preview{background:#fff;border:1px solid #dfe7f0;border-radius:22px;padding:24px;box-shadow:0 8px 30px #23426708}.eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.12em;font-weight:800;color:#df4768}.hero h1{font-size:clamp(32px,4vw,48px);color:#183652;margin:10px 0}.hero p{max-width:750px;color:#60758f;line-height:1.5}.layout{display:grid;grid-template-columns:290px minmax(0,1fr);gap:20px;margin-top:20px}.layout h2{margin-top:0}.layout label{display:block;font-size:13px;font-weight:700;margin:16px 0 6px}.layout select{width:100%;padding:10px;border:1px solid #cbd9e8;border-radius:10px;background:#fff;font:inherit}.layout fieldset{border:0;padding:0;margin:20px 0}.layout legend{font-weight:700}.layout fieldset label{font-weight:500;margin:10px 0;display:flex;gap:9px;align-items:center}.primary{border:0;border-radius:10px;background:#226cf0;color:#fff;font:inherit;font-weight:700;padding:11px 16px;cursor:pointer}.primary:disabled{background:#cbd8e9;cursor:not-allowed}#status{font-size:13px;color:#a33b50;line-height:1.4}.preview-head{display:flex;justify-content:space-between;align-items:center;gap:15px;border-bottom:1px solid #e5eaf0;padding-bottom:14px}.preview-head p{color:#617791;font-size:14px}.book-cover{text-align:center;padding:55px 20px;border-bottom:1px solid #e5eaf0}.book-cover h2{font-family:Georgia,serif;font-size:40px}.book-cover p{color:#647b95}.chapter{padding:25px 0;border-bottom:1px solid #e5eaf0}.chapter h3{font-family:Georgia,serif;font-size:27px;color:#193653}.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.person{border:1px solid #dfe7f0;border-radius:14px;padding:14px;break-inside:avoid}.person h4{margin:0 0 6px;font-size:17px}.person p{margin:5px 0;line-height:1.45}.person img,.memory img{width:110px;height:130px;object-fit:cover;float:right;margin:0 0 8px 10px;border-radius:8px}.muted{color:#70849b;font-size:13px}.entry{padding:10px 0;border-bottom:1px solid #e9eef4;break-inside:avoid}.entry h4{margin:0 0 5px}.entry p{margin:4px 0;line-height:1.45}.book-section{margin-top:28px}.book-section h3{font-family:Georgia,serif;font-size:25px}.empty{padding:70px 20px;text-align:center;color:#70849b}.relations{padding:12px;background:#f4f8ff;border-radius:12px;margin:10px 0;line-height:1.5}.source-list li{margin:8px 0;overflow-wrap:anywhere}@media(max-width:850px){main{padding:18px 12px}.layout{grid-template-columns:1fr}.preview-head{align-items:flex-start;flex-direction:column}.cards{grid-template-columns:1fr}}@page{size:A4;margin:17mm 15mm}@media print{:root,body{background:#fff;color:#111}main{padding:0;max-width:none}.back,.hero,#controls,.preview-head,.global-sidebar{display:none!important}.layout,.preview{display:block;border:0;padding:0;margin:0;box-shadow:none}.book-cover{height:220mm;display:flex;flex-direction:column;align-items:center;justify-content:center;page-break-after:always}.chapter{break-before:page;border:0;padding-top:0}.chapter.first-chapter{break-before:auto}.person{border:1px solid #aaa}.book-section{break-before:auto}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}a{color:#111;text-decoration:none}.entry{break-inside:avoid}}


