:root {
    color-scheme: dark;
    --bg: #111116;
    --panel: #181820;
    --card: #1b1b24;
    --text: #f2f2f5;
    --muted: #a9a9b8;
    --accent: #ff8fb3;
    --border: #2b2b38;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #242432 0, var(--bg) 42%);
    color: var(--text);
}

a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.page {
    width: min(920px, 100%);
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.back {
    display: inline-flex;
    margin-bottom: 20px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.card,
.title-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: color-mix(in srgb, var(--card) 92%, transparent);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.28);
}

.cover {
    display: grid;
    place-items: center;
    min-height: 220px;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 143, 179, 0.28), rgba(140, 180, 255, 0.16)),
        #242432;
    color: rgba(255, 255, 255, 0.84);
    font-size: 48px;
    font-weight: 800;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 999px;
    background: var(--accent);
    color: #210812;
    text-decoration: none;
    font-weight: 800;
}

.description,
.subtitle,
.status {
    color: var(--muted);
    line-height: 1.55;
}

@media (min-width: 720px) {
    .button {
        width: auto;
    }
}

/* Главная страница */

header {
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(32px, 8vw, 56px);
    line-height: 1;
}

.subtitle {
    margin: 12px 0 0;
    font-size: 16px;
}

.card {
    display: grid;
    gap: 18px;
}

.title {
    margin: 0;
    font-size: 24px;
}

.description {
    margin: 8px 0 0;
}

.status {
    margin-top: 18px;
    font-size: 14px;
}

@media (min-width: 720px) {
    .card {
        grid-template-columns: 260px 1fr;
        align-items: center;
    }
}

/* Страница тайтла */

.title-card .cover {
    margin-bottom: 18px;
}

h2 {
    margin: 28px 0 12px;
    font-size: 22px;
}

.chapters {
    display: grid;
    gap: 10px;
}

.chapter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--card);
    color: var(--text);
    text-decoration: none;
}

.chapter span {
    color: var(--muted);
    font-size: 14px;
}

@media (min-width: 720px) {
    .title-card {
        display: grid;
        grid-template-columns: 260px 1fr;
        gap: 20px;
        align-items: center;
    }

    .title-card .cover {
        margin-bottom: 0;
    }
}

/* Страница чтения */

body.reader-page {
    background: #101014;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 12px 16px;
    background: color-mix(in srgb, var(--panel) 92%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-inner {
    width: min(900px, 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.chapter-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: 14px;
}

.reader {
    width: min(900px, 100%);
    margin: 0 auto;
    padding: 0 0 48px;
}

.reader img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

.footer {
    padding: 24px 16px 40px;
    text-align: center;
    color: var(--muted);
}
