/* Казкар — «Нічне небо». Спільні стилі для всіх сторінок. */
:root {
  --bg: #0C1120; --bg2: #0F1524; --surface: #141B2E; --surface2: #1B2440;
  --line: #222B45; --line2: #2A3452; --line3: #34405F;
  --text: #EEE7DA; --head: #F4EEE3; --soft: #C9CFDC; --muted: #A3ABBF; --muted2: #8C95AB; --dim: #6F7890;
  --accent: #EBA54C; --accent2: #F6C27A; --accent-soft: #F0BE7A; --on-accent: #1A1205;
  --serif: Literata, Georgia, "Times New Roman", serif;
  --sans: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --stars:
    radial-gradient(1.6px 1.6px at 8% 18%, rgba(238,231,218,.7) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 23% 62%, rgba(238,231,218,.45) 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 41% 9%, rgba(238,231,218,.6) 50%, transparent 52%),
    radial-gradient(1px 1px at 57% 34%, rgba(238,231,218,.4) 50%, transparent 52%),
    radial-gradient(1.8px 1.8px at 74% 12%, rgba(246,194,122,.7) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 88% 46%, rgba(238,231,218,.5) 50%, transparent 52%),
    radial-gradient(1px 1px at 95% 8%, rgba(238,231,218,.55) 50%, transparent 52%),
    radial-gradient(1.3px 1.3px at 33% 84%, rgba(238,231,218,.35) 50%, transparent 52%),
    radial-gradient(1px 1px at 66% 72%, rgba(238,231,218,.35) 50%, transparent 52%);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--sans); }
img { max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent2); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input::placeholder { color: #7D869C; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.stars { background-color: var(--bg); background-image: var(--stars); }
.serif { font-family: var(--serif); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* шапка */
.site-head { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between;
             padding-top: 22px; padding-bottom: 22px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo:hover { color: var(--text); }
.logo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
            box-shadow: 0 0 14px 3px rgba(235,165,76,.55); }
.logo-name { font: 700 27px/1 var(--serif); letter-spacing: .01em; }
.nav { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; font-size: 15px; }
.nav a { color: var(--text); text-decoration: none; }
.nav a:hover { color: var(--accent2); }
.nav .yt { color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.head-line { border-bottom: 1px solid #1B2238; }
.head-line .site-head { padding-top: 14px; padding-bottom: 14px; }
.head-line .logo-name { font-size: 23px; }
.head-line .logo-dot { width: 8px; height: 8px; }

/* кнопки, мітки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px;
       padding: 0 22px; border-radius: 12px; font-weight: 600; font-size: 15px; text-decoration: none;
       color: var(--text); border: 1px solid var(--line2); background: transparent; }
.btn:hover { color: var(--text); border-color: var(--line3); background: rgba(255,255,255,.02); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn-primary:hover { background: var(--accent2); border-color: var(--accent2); color: var(--on-accent); }
.btn-big { min-height: 52px; padding: 0 24px; font-size: 16px; }
.btn svg { flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 999px; background: var(--surface2); font-size: 13px; color: var(--soft); }
.chip-ai { background: transparent; border: 1px solid rgba(235,165,76,.45); color: var(--accent-soft); }
.kicker { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.author { font-size: 14px; font-weight: 600; color: var(--accent); }
.cover { display: block; height: auto; align-self: flex-start; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 5px; background: var(--surface2);
         box-shadow: 0 20px 40px -14px rgba(0,0,0,.7); }

/* головна: перший екран */
.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 40px; }
.hero-text { flex: 1 1 460px; min-width: 0; }
.hero h1 { margin: 18px 0 0; font: 600 clamp(36px, 5vw, 60px)/1.07 var(--serif); letter-spacing: -.01em; color: var(--head); }
.hero .lead { margin: 22px 0 0; max-width: 560px; font-size: 18px; line-height: 1.6; color: var(--muted); }
.hero .actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.honest { margin: 22px 0 0; font-size: 14px; color: var(--muted2); }
.honest b { color: var(--text); font-weight: 400; }
.hero-art { flex: 1 1 320px; min-width: 0; display: flex; justify-content: center; padding-bottom: 64px; }
.hero-cover { position: relative; width: 300px; max-width: 100%; }
.hero-cover .cover { width: 100%; border-radius: 6px;
                     box-shadow: 0 40px 80px -20px rgba(0,0,0,.75), 0 0 0 1px rgba(238,231,218,.08); }
.mini { position: absolute; left: -36px; right: -36px; bottom: -64px; padding: 12px 14px; display: flex; gap: 12px;
        align-items: center; background: rgba(20,27,46,.94); border: 1px solid #26304D; border-radius: 14px;
        box-shadow: 0 18px 40px rgba(0,0,0,.45); text-decoration: none; color: var(--text); }
.mini:hover { color: var(--text); border-color: rgba(235,165,76,.5); }
.mini-play { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
             display: flex; align-items: center; justify-content: center; }
.mini-body { min-width: 0; flex: 1; }
.mini-sub { font-size: 12px; color: var(--muted2); }
.mini-title { font: 600 15px/1.3 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-bar { margin-top: 7px; height: 3px; border-radius: 2px; background: #26304D; }
.mini-bar i { display: block; height: 3px; border-radius: 2px; background: var(--accent); width: 0; }
@media (max-width: 520px) { .mini { left: -8px; right: -8px; } }
.wave { display: block; width: 100%; height: 90px; }

/* секції */
.band { background: var(--bg2); }
.section { padding-top: 56px; padding-bottom: 24px; }
.section-head { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; justify-content: space-between;
                margin-bottom: 24px; }
.section h2, .h2 { margin: 0; font: 600 34px/1.15 var(--serif); }
.section-note { font-size: 14px; color: var(--muted2); }

.book-card { display: flex; flex-wrap: wrap; gap: 32px; padding: 28px; background: var(--surface);
             border: 1px solid var(--line); border-radius: 18px; }
.book-card + .book-card { margin-top: 20px; }
.book-card .cover { flex: none; width: 190px; }
.book-card-body { flex: 1 1 380px; min-width: 0; }
.book-card h3 { margin: 6px 0 14px; font: 600 38px/1.1 var(--serif); }
.book-card h3 a { color: inherit; text-decoration: none; }
.book-card h3 a:hover { color: var(--accent2); }
.desc { margin: 18px 0 0; max-width: 640px; font-size: 16px; line-height: 1.65; color: #B3BACB; }
.desc p { margin: 0 0 .8em; }
.desc p:last-child { margin-bottom: 0; }
.row { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }

.upcoming { display: flex; flex-wrap: wrap; gap: 20px; }
.soon { flex: 1 1 320px; min-width: 0; display: flex; gap: 18px; padding: 20px; background: var(--surface);
        border: 1px solid var(--line); border-radius: 16px; }
.soon .cover { flex: none; width: 104px; border-radius: 4px; box-shadow: none; }
.soon-body { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.status { align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--surface2); color: var(--soft);
          font-size: 12px; font-weight: 600; }
.status.hot { background: rgba(235,165,76,.14); color: var(--accent-soft); }
.soon h3, .wish h3 { margin: 0; font: 600 22px/1.2 var(--serif); }
.soon-sub { font-size: 14px; color: var(--muted2); }
.soon .btn { margin-top: auto; align-self: flex-start; min-height: 44px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.wish { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 20px;
        border: 1px dashed var(--line3); border-radius: 16px; margin: 0; }
.wish p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted2); }
label { font-size: 13px; color: var(--soft); }
.input { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg);
         color: var(--text); font: 15px var(--sans); width: 100%; }
.input:focus { border-color: var(--accent); outline: none; }
.btn-soft { min-height: 44px; border-radius: 10px; border: 0; background: var(--surface2); color: var(--text);
            font: 600 14px var(--sans); }
.btn-soft:hover { background: #222D50; }
.form-msg { font-size: 13px; color: var(--muted2); min-height: 1.2em; }
.form-msg.ok { color: #9FD6A6; }
.form-msg.err { color: #F0A08A; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.notify { padding-top: 72px; padding-bottom: 80px; }
.notify-box { display: flex; flex-wrap: wrap; gap: 28px 48px; align-items: center; padding: 36px; border-radius: 20px;
              background: var(--surface); border: 1px solid var(--line2); }
.notify-box > div { flex: 1 1 380px; min-width: 0; }
.notify-box h2 { margin: 0; font: 600 32px/1.2 var(--serif); }
.notify-box p { margin: 12px 0 0; font-size: 16px; line-height: 1.6; color: var(--muted); }
.notify-form { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 10px; margin: 0; }
.notify-form .line { display: flex; flex-wrap: wrap; gap: 10px; }
.notify-form .input { flex: 1 1 200px; min-width: 0; min-height: 50px; padding: 0 16px; border-radius: 12px; font-size: 16px; width: auto; }
.notify-form .btn { min-height: 50px; }
.notify-form .small { font-size: 13px; color: var(--muted2); }

.site-foot { border-top: 1px solid #1E2640; }
.site-foot .wrap { padding-top: 28px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 16px 40px;
                   justify-content: space-between; font-size: 14px; color: var(--muted2); }
.site-foot .brand { display: flex; flex-direction: column; gap: 6px; }
.site-foot .brand b { font: 700 20px var(--serif); color: var(--text); }
.site-foot p { margin: 0; flex: 1 1 360px; max-width: 540px; line-height: 1.6; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: flex-start; }
.site-foot nav a { color: var(--text); text-decoration: none; }

/* сторінка книжки */
.book-page { max-width: 880px; padding-top: 24px; padding-bottom: 48px; }
.banner { padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid rgba(235,165,76,.5); margin-bottom: 28px; }
.banner-icon-yt { display: inline-flex; }
.banner-top { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--accent-soft); font-weight: 600; }
.banner p { margin: 8px 0 14px; font-size: 15px; line-height: 1.5; color: var(--soft); }
.go { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--accent);
      color: var(--on-accent); text-decoration: none; max-width: 520px; }
.go:hover { background: var(--accent2); color: var(--on-accent); }
.go-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--on-accent); color: var(--accent);
           display: flex; align-items: center; justify-content: center; }
.go-text { display: flex; flex-direction: column; min-width: 0; }
.go-text b { font-size: 16px; font-weight: 800; }
.go-text span { font-size: 13px; font-weight: 600; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner .alt { display: inline-block; margin-top: 10px; font-size: 14px; }
.book-top { display: flex; gap: 28px; align-items: flex-start; }
.book-top .cover { flex: none; width: 200px; }
.book-info { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.book-info h1 { margin: 0; font: 600 clamp(27px, 4.4vw, 44px)/1.1 var(--serif); color: var(--head); }
.book-info .stats { font-size: 14px; color: var(--muted); }
@media (max-width: 560px) {
  .book-top { gap: 16px; }
  .book-top .cover { width: 124px; }
  .book-top .chips .chip { padding: 4px 9px; font-size: 12px; }
}
.chapters-head { display: flex; align-items: baseline; justify-content: space-between; margin: 36px 0 10px; }
.chapters-head h2 { margin: 0; font: 600 24px var(--serif); }
.chapters-head span { font-size: 13px; color: var(--muted2); }
.chapters { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.chapters a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 12px; border-radius: 12px;
              text-decoration: none; color: var(--text); border: 1px solid transparent; }
.chapters a:hover { background: var(--surface); color: var(--text); }
.chapters .num { flex: none; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
                 font-size: 13px; color: var(--muted2); font-variant-numeric: tabular-nums; }
.chapters .ttl { flex: 1; min-width: 0; font-size: 15px; }
.chapters .dur { font-size: 13px; color: var(--muted2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chapters .done a { color: var(--muted); }
.chapters .done .dur { color: var(--muted2); }
.chapters .cur a { background: var(--surface); border-color: rgba(235,165,76,.55); color: var(--head); }
.chapters .cur .num { border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.chapters .cur .ttl { font-weight: 700; }
.chapters .cur .dur { color: var(--accent-soft); }

.page-404 { min-height: 100vh; display: flex; flex-direction: column; }
.page-404 main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
                 text-align: center; padding: 40px 24px; gap: 16px; }
.page-404 h1 { margin: 0; font: 600 40px var(--serif); }
.page-404 p { margin: 0; color: var(--muted); }
