:root {
    color-scheme: dark;
    --bg: #07080a;
    --panel: #101418;
    --panel-2: #171d22;
    --ink: #f4efe7;
    --muted: #b8ada0;
    --line: rgba(244, 239, 231, 0.16);
    --gold: #e6bd63;
    --red: #be4b3f;
    --blue: #65a8b8;
    --green: #77a06a;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: "Didact Gothic", Arial, sans-serif;
    letter-spacing: 0;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background: url("../resources/cover_background.jpeg") center / cover no-repeat;
    opacity: 0.2;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(7, 8, 10, 0.96), rgba(7, 8, 10, 0.86) 52%, rgba(7, 8, 10, 0.7));
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.site-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 8, 10, 0.84);
    backdrop-filter: blur(18px);
}

.topbar-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 180px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border: 1px solid var(--line);
}

.tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.tab-button {
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.tab-button:hover,
.tab-button[aria-selected="true"] {
    color: var(--ink);
    background: rgba(230, 189, 99, 0.16);
}

.hero {
    min-height: clamp(520px, 75vh, 780px);
    display: grid;
    align-items: end;
    padding: 76px 0 44px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 42px;
    align-items: end;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--gold);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: Tinos, Georgia, serif;
    font-weight: 700;
}

h1 {
    max-width: 820px;
    font-size: clamp(4rem, 10vw, 9rem);
    line-height: 0.82;
    text-transform: uppercase;
}

.hero-copy {
    max-width: 680px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: clamp(1.08rem, 2vw, 1.28rem);
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--line);
    background: var(--ink);
    color: #101010;
    font-weight: 700;
}

.button.secondary {
    background: transparent;
    color: var(--ink);
}

.cover-card {
    align-self: stretch;
    display: grid;
    align-content: end;
    min-height: 420px;
    padding: 22px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(16, 20, 24, 0.2), rgba(16, 20, 24, 0.96)), url("../resources/cover.jpeg") center / cover no-repeat;
    box-shadow: var(--shadow);
}

.cover-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.tab-panel {
    display: none;
    padding: 56px 0 86px;
    border-top: 1px solid var(--line);
}

.tab-panel.active {
    display: block;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.section-head h2 {
    font-size: clamp(2.2rem, 5vw, 4.4rem);
    line-height: 0.95;
}

.section-head p {
    max-width: 520px;
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.tool-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.045);
}

.file-input {
    position: relative;
    display: inline-flex;
}

.file-input input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-input span {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    background: var(--gold);
    color: #15100a;
    font-weight: 700;
}

.search {
    min-height: 44px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 0;
    padding: 0 14px;
    color: var(--ink);
    background: rgba(0, 0, 0, 0.24);
}

.library-meta {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.95rem;
}

.track-list {
    margin-top: 22px;
    display: grid;
    gap: 10px;
}

.track-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 34%);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    background: rgba(16, 20, 24, 0.72);
}

.track-title {
    min-width: 0;
}

.track-title strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-title span {
    color: var(--muted);
    font-size: 0.92rem;
}

audio {
    width: 100%;
    height: 36px;
}

.empty-state {
    padding: 28px;
    border: 1px dashed var(--line);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.035);
    line-height: 1.6;
}

.comic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.comic-card {
    display: grid;
    min-height: 360px;
    align-content: end;
    padding: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(23, 29, 34, 0.16), rgba(23, 29, 34, 0.96));
}

.comic-card:nth-child(1) {
    border-top-color: var(--gold);
}

.comic-card:nth-child(2) {
    border-top-color: var(--red);
}

.comic-card:nth-child(3) {
    border-top-color: var(--blue);
}

.comic-card h3 {
    font-size: 1.6rem;
}

.comic-card p {
    min-height: 72px;
    margin: 10px 0 18px;
    color: var(--muted);
    line-height: 1.5;
}

.book-panel {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
}

.book-panel img {
    width: 100%;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.book-panel p,
.about-grid p {
    color: var(--muted);
    line-height: 1.65;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat {
    padding: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.stat strong {
    display: block;
    font-family: Tinos, Georgia, serif;
    font-size: 2rem;
}

.footer {
    border-top: 1px solid var(--line);
    padding: 26px 0;
    color: var(--muted);
}

@media (max-width: 820px) {
    .topbar-inner,
    .section-head,
    .tool-band {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar-inner {
        padding: 12px 0;
    }

    .tabs {
        width: 100%;
        overflow-x: auto;
    }

    .tab-button {
        flex: 1 0 auto;
    }

    .hero-grid,
    .book-panel,
    .about-grid {
        grid-template-columns: 1fr;
    }

    .cover-card {
        min-height: 300px;
    }

    .comic-grid {
        grid-template-columns: 1fr;
    }

    .track-row {
        grid-template-columns: 1fr;
    }

    .section-head {
        display: block;
    }

    .section-head p {
        margin-top: 12px;
    }
}

@media (max-width: 560px) {
    .site-shell,
    .topbar-inner {
        width: min(100% - 22px, 1180px);
    }

    h1 {
        font-size: clamp(3rem, 18vw, 4.5rem);
    }

    .hero {
        padding-top: 42px;
    }

    .stat-row {
        grid-template-columns: 1fr;
    }
}
