* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Georgia','Times New Roman',serif; background:#f5f1e8; color:#3e2723; line-height:1.7; }
a { text-decoration:none; color:inherit; transition:all .3s; }

header { background:linear-gradient(135deg,#5d4037,#8d6e63); color:#fff8e1; padding:45px 20px; text-align:center; }
header h1 { font-size:2.4em; letter-spacing:2px; text-transform:uppercase; margin-bottom:8px; }
header .subtitle { font-style:italic; opacity:.9; }
body.theme-dark header { background:linear-gradient(135deg,#3e2723,#5d4037); }
body.theme-blue header { background:linear-gradient(135deg,#01579b,#0288d1); }

nav { background:#6d4c41; position:sticky; top:0; z-index:100; box-shadow:0 2px 4px rgba(0,0,0,.15); }
nav ul { list-style:none; display:flex; justify-content:center; flex-wrap:wrap; gap:10px 25px; padding:12px 10px; }
nav a { color:#fff8e1; font-weight:600; padding:6px 14px; border-radius:4px; display:inline-flex; align-items:center; gap:8px; }
nav a:hover { background:#8d6e63; }

.container { max-width:1100px; margin:0 auto; padding:40px 20px; }
section { margin-bottom:60px; }
h2 { color:#5d4037; font-size:1.8em; margin-bottom:25px; padding-bottom:10px; border-bottom:3px solid #a1887f; }
h3 { color:#6d4c41; margin:20px 0 12px; }

.books-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:25px; }
.book-card { background:#fff; border:1px solid #d7ccc8; border-radius:8px; overflow:hidden; box-shadow:0 4px 8px rgba(0,0,0,.08); transition:transform .3s; display:flex; flex-direction:column; }
.book-card:hover { transform:translateY(-5px); box-shadow:0 10px 20px rgba(0,0,0,.12); }
.book-cover { width:100%; height:340px; object-fit:cover; background:#efebe9; }
.cover-placeholder { width:100%; height:340px; background:#efebe9; display:flex; align-items:center; justify-content:center; color:#8d6e63; font-style:italic; text-align:center; padding:0 15px; }
.book-info { padding:20px; display:flex; flex-direction:column; flex-grow:1; }
.book-info h3 { margin:0 0 10px; color:#5d4037; }
.book-info p { margin-bottom:15px; flex-grow:1; }

.btn { display:inline-flex; align-items:center; gap:8px; padding:10px 20px; border-radius:5px; font-weight:600; font-size:.95em; border:none; cursor:pointer; align-self:flex-start; margin:5px 5px 5px 0; }
.btn-primary { background:#5d4037; color:#fff8e1; }
.btn-primary:hover { background:#4e342e; }
.btn-secondary { background:#8d6e63; color:#fff; }
.btn-secondary:hover { background:#6d4c41; }
.btn-accent { background:#a1887f; color:#fff; }
.btn-outline { background:transparent; border:2px solid #5d4037; color:#5d4037; }
.btn-outline:hover { background:#5d4037; color:#fff8e1; }
.btn-disabled { background:#d7ccc8; color:#8d6e63; cursor:not-allowed; }
.link-disabled { opacity:.5; pointer-events:none; }

details.read-options { margin:20px 0; }
details.read-options summary { background:#5d4037; color:#fff8e1; padding:12px 20px; border-radius:5px; cursor:pointer; font-weight:600; list-style:none; display:flex; justify-content:space-between; align-items:center; gap:10px; }
details.read-options summary::-webkit-details-marker { display:none; }
details.read-options summary::after { content:'▼'; font-size:.8em; }
details.read-options[open] summary::after { content:'▲'; }
details.read-options a { display:block; padding:12px 20px; background:#efebe9; color:#3e2723; border-bottom:1px solid #d7ccc8; }
details.read-options a:hover { background:#d7ccc8; padding-left:26px; }
details.read-options a:last-child { border-bottom:none; }

.book-detail { background:#fff; padding:35px; border-radius:8px; box-shadow:0 4px 12px rgba(0,0,0,.08); border-left:5px solid #8d6e63; margin-bottom:40px; }
.synopsis { background:#efebe9; padding:22px; border-radius:5px; margin:20px 0; border-left:4px solid #a1887f; }
.series-info { background:#fff3e0; padding:18px 22px; border-radius:5px; margin:20px 0; border-left:4px solid #ff9800; }
.back-link { display:inline-block; margin-bottom:18px; color:#5d4037; font-weight:bold; }
.back-link:hover { text-decoration:underline; }

.map-container { margin:20px 0; border-radius:8px; overflow:hidden; border:3px solid #d7ccc8; box-shadow:0 4px 8px rgba(0,0,0,.12); background:#efebe9; }
.map-container img { width:100%; display:block; }
.map-placeholder { padding:50px 20px; text-align:center; color:#8d6e63; font-style:italic; }

.roadmap { background:#fff; padding:30px; border-radius:8px; box-shadow:0 4px 12px rgba(0,0,0,.08); border-left:5px solid #5d4037; }
.roadmap-item { display:flex; gap:20px; padding-bottom:18px; margin-bottom:18px; border-bottom:1px dashed #d7ccc8; }
.roadmap-item:last-child { border:none; margin-bottom:0; padding-bottom:0; }
.roadmap-date { min-width:110px; font-weight:bold; color:#5d4037; }
.roadmap-status { display:inline-block; padding:2px 10px; border-radius:4px; font-size:.78em; font-weight:bold; margin-left:8px; }
.status-done { background:#c8e6c9; color:#2e7d32; }
.status-process { background:#fff3e0; color:#e65100; }
.status-plan { background:#e3f2fd; color:#1565c0; }

.about-section { background:#fff; padding:35px; border-radius:8px; text-align:center; box-shadow:0 4px 12px rgba(0,0,0,.08); }
.author-photo { width:170px; height:170px; border-radius:50%; object-fit:cover; border:4px solid #d7ccc8; margin-bottom:20px; }
.about-section p { max-width:720px; margin:0 auto 15px; }
.social-links { margin-top:25px; display:flex; justify-content:center; flex-wrap:wrap; gap:12px; }
.social-links a { display:inline-flex; align-items:center; gap:8px; padding:10px 20px; background:#5d4037; color:#fff8e1; border-radius:5px; font-weight:600; }
.social-links a:hover { background:#4e342e; transform:translateY(-2px); }

.placeholder { background:#fff; padding:60px 40px; border-radius:8px; box-shadow:0 4px 12px rgba(0,0,0,.08); text-align:center; }
.placeholder i { font-size:4em; color:#8d6e63; margin-bottom:20px; }
body.theme-blue .placeholder i { color:#0288d1; }

footer { background:#5d4037; color:#fff8e1; text-align:center; padding:25px 20px; margin-top:50px; }

@media (max-width:768px){
  header h1 { font-size:1.7em; }
  .roadmap-item { flex-direction:column; gap:5px; }
  .book-detail { padding:22px; }
}

/* ===== ТЕМА АРФОМОРА: песчаный, красный, чёрный ===== */
body.theme-arfomor { background:#e9dcc3; color:#1c1c1c; }
body.theme-arfomor header { background:linear-gradient(135deg,#141414 0%,#3a0f0f 100%); color:#e9dcc3; }
body.theme-arfomor nav { background:#141414; }
body.theme-arfomor nav a { color:#e9dcc3; }
body.theme-arfomor nav a:hover { background:#8e1b1b; }
body.theme-arfomor h2 { color:#8e1b1b; border-bottom-color:#141414; }
body.theme-arfomor h3 { color:#7a1616; }
body.theme-arfomor .book-detail { background:#f4ecd9; border-left-color:#8e1b1b; }
body.theme-arfomor .synopsis { background:#e9dcc3; border-left-color:#8e1b1b; }
body.theme-arfomor .btn-primary { background:#8e1b1b; color:#f4ecd9; }
body.theme-arfomor .btn-primary:hover { background:#6d1414; }
body.theme-arfomor .btn-secondary { background:#141414; color:#e9dcc3; }
body.theme-arfomor .btn-secondary:hover { background:#000000; }
body.theme-arfomor .btn-accent { background:#cbb287; color:#141414; }
body.theme-arfomor .btn-outline { border-color:#8e1b1b; color:#8e1b1b; }
body.theme-arfomor .btn-outline:hover { background:#8e1b1b; color:#f4ecd9; }
body.theme-arfomor .btn-disabled { background:#d8c9a5; color:#8a7a55; }
body.theme-arfomor details.read-options summary { background:#8e1b1b; color:#f4ecd9; }
body.theme-arfomor details.read-options a { background:#f4ecd9; color:#1c1c1c; border-bottom-color:#cbb287; }
body.theme-arfomor details.read-options a:hover { background:#e9dcc3; }
body.theme-arfomor .back-link { color:#8e1b1b; }
body.theme-arfomor .map-container { border-color:#cbb287; background:#e9dcc3; }
body.theme-arfomor .map-placeholder { color:#8a7a55; }
body.theme-arfomor footer { background:#141414; color:#e9dcc3; }

/* Навигация по дилогии */
.series-nav { display:flex; flex-wrap:wrap; gap:10px; margin:15px 0 25px; align-items:center; }
.series-nav .current { background:#cbb287; color:#141414; padding:10px 20px; border-radius:5px; font-weight:600; display:inline-flex; align-items:center; gap:8px; }

/* ===== ВИЗУАЛЬНЫЕ ЗОНЫ ===== */
.zone { padding:45px 0 50px; }
.zone-library { background:#ede6d6; border-bottom:3px solid #d7ccc8; }
.zone-header { display:flex; align-items:center; gap:15px; }
.zone-header i { font-size:1.8em; color:#8d6e63; }
.zone-header h2 { border:none; margin:0; padding:0; }
.zone-desc { color:#6d4c41; font-style:italic; margin:8px 0 25px; }
.zone .container { padding-top:0; padding-bottom:0; }
.zone-info section { margin-bottom:40px; }

/* ===== ФИЛЬТРЫ И ПОИСК ===== */
.filter-panel { background:#fff; padding:20px; border-radius:8px; box-shadow:0 4px 10px rgba(0,0,0,.08); margin-bottom:30px; }
.filter-row { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:15px; }
.filter-btn { padding:8px 18px; border-radius:20px; border:2px solid #8d6e63; background:transparent; color:#5d4037; font-weight:600; cursor:pointer; font-family:inherit; font-size:.92em; transition:all .25s; }
.filter-btn:hover { background:#e9dcc3; }
.filter-btn.active { background:#5d4037; color:#fff8e1; border-color:#5d4037; }
.search-box { width:100%; padding:12px 18px; border:2px solid #d7ccc8; border-radius:6px; font-family:inherit; font-size:1em; background:#faf7f0; color:#3e2723; }
.search-box:focus { outline:none; border-color:#8d6e63; }

/* ===== СПИСКИ РАССКАЗОВ И СТИХОВ ===== */
.work-list { list-style:none; margin:0 0 30px; }
.work-item { display:flex; justify-content:space-between; align-items:center; gap:15px; background:#fff; padding:15px 20px; border-radius:6px; margin-bottom:10px; border-left:4px solid #8d6e63; flex-wrap:wrap; box-shadow:0 2px 6px rgba(0,0,0,.06); }
.work-year { color:#8d6e63; font-size:.9em; margin-left:8px; font-weight:normal; }
.work-note { color:#6d4c41; font-size:.95em; }

/* ===== ОБЛОЖКА РЯДОМ С КОНТЕНТОМ ===== */
.book-cover-side { float:right; width:230px; margin:0 0 15px 25px; }
.book-cover-side img { width:100%; border-radius:6px; box-shadow:0 6px 16px rgba(0,0,0,.25); border:1px solid #d7ccc8; display:block; }
.book-cover-side .cover-placeholder { height:330px; }
@media (max-width:768px){ .book-cover-side { float:none; margin:0 auto 20px; } }

/* ===== ПЛАШКА О BOOSTY ===== */
.boosty-note { background:#fff3e0; border-left:4px solid #ff9800; padding:18px 22px; border-radius:5px; margin:25px 0; display:flex; gap:15px; align-items:flex-start; flex-wrap:wrap; }
.boosty-note i { font-size:1.6em; color:#e65100; margin-top:3px; }

/* ===== ГАЛЕРЕЯ ===== */
.gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:12px; margin:15px 0 25px; }
.gallery a { display:block; border-radius:6px; overflow:hidden; border:2px solid #d7ccc8; box-shadow:0 2px 6px rgba(0,0,0,.1); }
.gallery img { width:100%; height:140px; object-fit:cover; display:block; transition:transform .3s; }
.gallery a:hover img { transform:scale(1.06); }

/* ===== ВАТТХЕЛЬД: благородный зелёный с золотом ===== */
body.theme-vattheld { background:#f0f3ea; color:#22301f; }
body.theme-vattheld header { background:linear-gradient(135deg,#14291d 0%,#2f5d46 100%); color:#f2f6ec; }
body.theme-vattheld nav { background:#1f4433; }
body.theme-vattheld nav a { color:#f2f6ec; }
body.theme-vattheld nav a:hover { background:#2f5d46; }
body.theme-vattheld h2 { color:#2f5d46; border-bottom-color:#b08d3e; }
body.theme-vattheld h3 { color:#3c6b52; }
body.theme-vattheld .book-detail { background:#f8faf4; border-left-color:#b08d3e; }
body.theme-vattheld .synopsis { background:#e7ede0; border-left-color:#2f5d46; }
body.theme-vattheld .btn-primary { background:#2f5d46; color:#f2f6ec; }
body.theme-vattheld .btn-primary:hover { background:#234634; }
body.theme-vattheld .btn-secondary { background:#b08d3e; color:#fff; }
body.theme-vattheld .btn-secondary:hover { background:#96762e; }
body.theme-vattheld .btn-outline { border-color:#2f5d46; color:#2f5d46; }
body.theme-vattheld .btn-outline:hover { background:#2f5d46; color:#f2f6ec; }
body.theme-vattheld .btn-disabled { background:#cfd8c8; color:#6b7a66; }
body.theme-vattheld details.read-options summary { background:#2f5d46; color:#f2f6ec; }
body.theme-vattheld details.read-options a { background:#f8faf4; border-bottom-color:#c9d6c2; }
body.theme-vattheld details.read-options a:hover { background:#e7ede0; }
body.theme-vattheld .back-link { color:#2f5d46; }
body.theme-vattheld .series-nav .current { background:#b08d3e; color:#fff; }
body.theme-vattheld .boosty-note { background:#e7ede0; border-left-color:#b08d3e; }
body.theme-vattheld .boosty-note i { color:#96762e; }
body.theme-vattheld footer { background:#14291d; color:#f2f6ec; }

/* ===== РЫБЫ: синий и белый ===== */
body.theme-ryby { background:#f4f9fd; color:#17364f; }
body.theme-ryby header { background:linear-gradient(135deg,#0b4f8a 0%,#2e86c1 100%); color:#ffffff; }
body.theme-ryby nav { background:#0b4f8a; }
body.theme-ryby nav a { color:#fff; }
body.theme-ryby nav a:hover { background:#2e86c1; }
body.theme-ryby h2 { color:#0b4f8a; border-bottom-color:#9cc9ea; }
body.theme-ryby h3 { color:#1f6fb2; }
body.theme-ryby .placeholder i { color:#2e86c1; }
body.theme-ryby .btn-primary { background:#0b4f8a; color:#fff; }
body.theme-ryby .btn-primary:hover { background:#083a66; }
body.theme-ryby .boosty-note { background:#e8f2fa; border-left-color:#2e86c1; }
body.theme-ryby .boosty-note i { color:#0b4f8a; }
body.theme-ryby .cover-placeholder { background:#e8f2fa; color:#5a89ad; }
body.theme-ryby footer { background:#0b4f8a; color:#fff; }

/* ===== НАКЛОННОСТИ: ледяной голубой и золото ===== */
body.theme-krov { background:#eef5f8; color:#20303c; }
body.theme-krov header { background:linear-gradient(135deg,#1b3a4b 0%,#3d6e8f 100%); color:#fdf6d8; }
body.theme-krov nav { background:#274f66; }
body.theme-krov nav a { color:#fdf6d8; }
body.theme-krov nav a:hover { background:#3d6e8f; }
body.theme-krov h2 { color:#274f66; border-bottom-color:#e6b422; }
body.theme-krov h3 { color:#3d6e8f; }
body.theme-krov .placeholder i { color:#3d6e8f; }
body.theme-krov .btn-primary { background:#e6b422; color:#20303c; }
body.theme-krov .btn-primary:hover { background:#c99a12; }
body.theme-krov .boosty-note { background:#fdf6d8; border-left-color:#e6b422; }
body.theme-krov .boosty-note i { color:#c99a12; }
body.theme-krov .cover-placeholder { background:#dfeaf0; color:#5a7d92; }
body.theme-krov footer { background:#1b3a4b; color:#fdf6d8; }

/* ===== СХЕМА СТРУКТУРЫ САГИ ===== */
.structure { margin:20px 0 25px; background:#fff; border:1px solid #c9d6c2; border-radius:8px; padding:20px 20px 12px; }
.structure-title { font-weight:bold; margin-bottom:15px; color:#2f5d46; }
.structure-level { display:flex; gap:12px; align-items:flex-start; padding:8px 12px; border-left:3px solid #b08d3e; margin-bottom:8px; background:#faf8f2; border-radius:0 6px 6px 0; }
.structure-level.l2 { margin-left:24px; }
.structure-level.l3 { margin-left:48px; }
.structure-level.l4 { margin-left:72px; }
.structure-level.l5 { margin-left:96px; }
.structure-level i { color:#2f5d46; margin-top:3px; }
.structure-level strong { display:block; }
.structure-level span { font-size:.92em; color:#5c6b58; }
@media (max-width:600px){
  .structure-level.l2 { margin-left:12px; }
  .structure-level.l3 { margin-left:24px; }
  .structure-level.l4 { margin-left:36px; }
  .structure-level.l5 { margin-left:48px; }
}

/* ===== МИНИАТЮРЫ В СПИСКЕ РАССКАЗОВ ===== */
.work-thumb { width:70px; height:100px; object-fit:cover; border-radius:4px; border:1px solid #d7ccc8; flex:0 0 70px; box-shadow:0 2px 5px rgba(0,0,0,.15); }
.work-thumb-missing { width:70px; height:100px; flex:0 0 70px; border-radius:4px; background:#efebe9; color:#8d6e63; display:flex; align-items:center; justify-content:center; font-size:1.4em; border:1px dashed #c9bda8; }

/* ===== КОМПАКТНАЯ СХЕМА СТРУКТУРЫ ===== */
.structure-compact { margin:25px 0; background:#fff; border:1px solid #c9d6c2; border-radius:8px; padding:15px 18px; }
.structure-chain { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.structure-chain > i { color:#b08d3e; }
.chip { background:#e7ede0; border-left:3px solid #2f5d46; border-radius:4px; padding:6px 10px; font-weight:bold; color:#22301f; font-size:.92em; }
.chip small { display:block; font-weight:normal; color:#5c6b58; font-size:.85em; }

/* ===== ПЛАШКА ПУСТОЙ ГАЛЕРЕИ ===== */
.gallery-empty { font-style:italic; opacity:.75; background:rgba(0,0,0,.05); border:1px dashed rgba(0,0,0,.25); border-radius:6px; padding:14px 18px; margin:10px 0 20px; }

/* ===== Иконки в заголовках и плашках не раздувать ===== */
.placeholder h3 i, .placeholder h2 i, .placeholder .gallery-empty i { font-size:1em; display:inline; margin-bottom:0; margin-right:6px; }

/* ===== КОМПАКТНАЯ ДОРОЖНАЯ КАРТА ===== */
.roadmap { padding:20px 25px; }
.roadmap-item { gap:15px; padding-bottom:8px; margin-bottom:8px; }
.roadmap-date { min-width:95px; font-size:.92em; }
.roadmap-note { color:#6d4c41; font-size:.9em; }

/* ===== ФОТО АВТОРА КРУПНЕЕ ===== */
.author-photo { width:260px; height:260px; }
@media (max-width:600px){ .author-photo { width:200px; height:200px; } }