@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600&family=Lora:wght@400;500&display=swap');

/* =============================================================
   MAIN.CSS — full responsive rewrite
   ============================================================= */

:root {
    --bg:          #f7f3ed;
    --bg-soft:     #fbfaf7;
    --card:        rgba(255,255,255,.78);
    --text:        #1d1d1f;
    --muted:       #6e6e73;
    --line:        rgba(29,29,31,.08);
    --accent:      #b59b6b;
    --shadow:      0 24px 70px rgba(40,32,22,.10);
    --shadow-h:    0 34px 90px rgba(40,32,22,.16);
    --radius:      30px;
    --fs-sans:     'Golos Text', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --fs-serif:    'Lora', Georgia, 'Times New Roman', serif;
}

*,*::before,*::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    font-family: var(--fs-sans);
    font-weight: 400;
    letter-spacing: -.01em;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(181,155,107,.16), transparent 34%),
        linear-gradient(180deg, #fbfaf7 0%, var(--bg) 100%);
}

body.gallery-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

h1,h2,h3,h4,.page-title {
    font-family: var(--fs-sans);
    font-weight: 500;
    letter-spacing: -.05em;
}
p { line-height: 1.65; }

.section { padding: 90px 7vw; }

.eyebrow {
    margin-bottom: 18px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.btn {
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    font-weight: 500;
    transition: transform .25s, box-shadow .25s, background .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary   { background: #1d1d1f; color: #fff; box-shadow: 0 14px 36px rgba(29,29,31,.20); }
.btn-secondary { background: rgba(255,255,255,.72); border: 1px solid var(--line); color: var(--text); }

.fade-up { animation: fadeUp .75s ease both; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ── HEADER ── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 22px 7vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: rgba(247,243,237,.76);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.logo {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -.02em;
    white-space: nowrap;
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
    color: var(--muted);
    font-size: 15px;
}
.nav a { position: relative; padding: 8px 0; transition: color .25s; }
.nav a:hover,.nav a.active { color: var(--text); }
.nav a::after {
    content: "";
    position: absolute;
    left: 50%; bottom: 0;
    width: 0; height: 2px;
    border-radius: 999px;
    background: var(--accent);
    transform: translateX(-50%);
    transition: width .25s;
}
.nav a:hover::after,.nav a.active::after { width: 100%; }

.menu-toggle {
    display: none;
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.78);
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 12px 30px rgba(40,32,22,.08);
}

.mobile-menu { display: none; }

/* ── HOME ── */

.home-about-section { padding-top: 20px; }
.home-about-card {
    max-width: 980px;
    margin: 0 auto;
    padding: clamp(34px,6vw,70px);
    border-radius: 42px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(255,255,255,.82);
    box-shadow: 0 34px 100px rgba(40,32,22,.10), inset 0 1px 0 rgba(255,255,255,.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.home-about-card h2 {
    margin: 0;
    font-size: clamp(42px,6vw,82px);
    line-height: .95;
    letter-spacing: -.06em;
}
.home-about-text {
    margin-top: 38px;
    max-width: 820px;
    color: #343438;
    font-size: clamp(19px,2vw,24px);
    line-height: 1.75;
}
.home-about-text p { margin: 0 0 26px; }
.home-about-text p:last-child { margin-bottom: 0; }

/* ── GRIDS / TILES ── */

.books-grid,
.albums-grid {
    display: grid;
    gap: 42px 28px;
}
.books-grid  { grid-template-columns: repeat(3, minmax(0, 320px)); justify-content: center; }
.albums-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.catalog-section,
.books-grid-section,
.albums-grid-section { padding-top: 20px; }

.book-tile,
.album-tile { min-width: 0; }

.book-tile-cover,
.album-tile-cover {
    position: relative;
    overflow: hidden;
    background: #f3eee7;
    box-shadow: 0 20px 54px rgba(40,32,22,.10), 0 6px 18px rgba(40,32,22,.06);
    transition: transform .35s, box-shadow .35s;
}
.book-tile-cover  { aspect-ratio: 3/4; border-radius: 22px; }
.album-tile-cover { aspect-ratio: 1/1; border-radius: 24px; }

.book-tile-cover img,
.album-tile-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-tile-cover img { object-fit: contain; }

.book-tile:hover  .book-tile-cover,
.album-tile:hover .album-tile-cover {
    transform: translateY(-6px);
    box-shadow: 0 30px 80px rgba(40,32,22,.16), 0 10px 26px rgba(40,32,22,.08);
}
.book-tile-info,
.album-tile-info { padding-top: 14px; }
.book-tile-info h2,
.album-tile-info h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.15;
    letter-spacing: -.035em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.book-tile-info p,
.album-tile-info p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }

/* ── BOOK DETAIL ── */

.book-compact-page {
    max-width: 1320px;
    margin: 0 auto;
    padding: 42px 7vw 140px;
    display: grid;
    grid-template-columns: 340px minmax(0,1fr);
    gap: 72px;
    align-items: start;
}
.book-compact-sidebar {
    position: sticky;
    top: 112px;
    width: 340px;
    display: grid;
    gap: 22px;
}
.book-compact-cover { width: 340px; }
.book-compact-cover img {
    width: 340px;
    height: auto;
    max-height: 470px;
    object-fit: contain;
    box-shadow: 0 28px 80px rgba(40,32,22,.14), 0 8px 22px rgba(40,32,22,.08);
}
.book-compact-info {
    width: 340px;
    padding: 24px 26px;
    border-radius: 28px;
    background: rgba(255,255,255,.84);
    border: 1px solid rgba(255,255,255,.9);
    box-shadow: 0 22px 64px rgba(40,32,22,.10), inset 0 1px 0 rgba(255,255,255,.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.book-compact-info h1 { margin: 0; font-size: 36px; line-height: 1; }
.book-compact-meta {
    margin-top: 18px;
    display: grid;
    grid-template-columns: 64px minmax(0,1fr);
    gap: 10px;
    align-items: center;
}
.book-compact-meta span {
    min-height: 42px;
    padding: 0 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.78);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}
.book-pdf-meta-button {
    width: 100%;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1d1d1f;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 12px 28px rgba(29,29,31,.20);
}
.book-compact-content { min-width: 0; }
.book-compact-head { margin-bottom: 24px; }
.book-compact-list {
    display: block;
    columns: 3;
    column-gap: 34px;
    max-width: 980px;
}
.book-compact-row {
    break-inside: avoid;
    display: grid;
    grid-template-columns: 34px minmax(0,1fr);
    gap: 10px;
    align-items: baseline;
    margin: 0 0 10px;
    color: inherit;
}
.book-compact-number { color: var(--accent); font-size: 13px; font-weight: 500; letter-spacing: .04em; }
.book-compact-title  { font-size: 16px; font-weight: 400; line-height: 1.28; letter-spacing: -.02em; }
.book-compact-row:hover .book-compact-title { color: var(--accent); }

/* ── POEM ── */

.poem-page,
.poem-detail,
.poem-detail-page {
    max-width: 980px;
    margin: 0 auto;
    padding: 56px 32px 120px;
    overflow-x: hidden;
}
.breadcrumbs {
    max-width: 760px;
    margin: 0 auto 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}
.poem-reader {
    width: min(760px, calc(100vw - 64px));
    max-width: 760px;
    margin: 0 auto;
    padding: 42px 58px 52px;
    border-radius: 30px;
    background: rgba(255,255,255,.64);
    border: 1px solid rgba(255,255,255,.78);
    box-shadow: 0 24px 80px rgba(40,32,22,.08), inset 0 1px 0 rgba(255,255,255,.9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.poem-heading,
.poem-page h1 { margin: 10px 0 30px; font-size: clamp(34px,4vw,46px); line-height: 1.08; }
.poem-text {
    font-family: var(--fs-serif);
    font-size: 20px;
    line-height: 1.65;
    letter-spacing: 0;
}
.poem-text p { margin: 0 0 22px; }
.poem-navigation {
    max-width: 760px;
    margin: 28px auto 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 14px;
    align-items: center;
}

/* ── ALBUM DETAIL ── */

.album-detail-page {
    max-width: 1380px;
    margin: 0 auto;
    padding: 56px 72px 160px;
    display: grid;
    grid-template-columns: 420px minmax(0,1fr);
    gap: 56px;
    align-items: start;
}
.album-detail-sidebar {
    position: sticky;
    top: 112px;
    width: 420px;
}
.album-gallery { width: 420px; max-width: 420px; }

.album-main-cover {
    width: 420px;
    height: 420px;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 32px;
    overflow: hidden;
    background: #f3eee7;
    box-shadow: 0 28px 80px rgba(40,32,22,.14), 0 8px 22px rgba(40,32,22,.08);
    cursor: pointer;
}
.album-main-cover img {
    width: 100%; height: 100%;
    object-fit: contain;
    object-position: center;
    background: #f3eee7;
    transition: transform .55s cubic-bezier(.2,.8,.2,1), filter .55s cubic-bezier(.2,.8,.2,1);
}
.album-main-cover:hover img { transform: scale(1.045); filter: saturate(1.04) contrast(1.03); }

.album-thumb-carousel {
    position: relative;
    width: 420px;
    max-width: 420px;
    height: 86px;
    margin-top: 18px;
    padding: 0 48px;
    overflow: hidden;
}
.album-thumb-carousel .swiper-wrapper { align-items: center; }
.album-thumb-carousel .swiper-slide,
.album-thumb { width: 74px !important; height: 74px !important; flex-shrink: 0; }
.album-thumb {
    display: block;
    padding: 0; border: 0;
    border-radius: 16px;
    overflow: hidden;
    background: transparent;
    opacity: .74;
    transition: opacity .25s, transform .25s, box-shadow .25s;
}
.album-thumb:hover { opacity: 1; transform: translateY(-3px); box-shadow: 0 18px 42px rgba(40,32,22,.14); }
.album-thumb img { width: 100%; height: 100%; object-fit: cover; }

.album-thumb-prev,
.album-thumb-next {
    position: absolute;
    top: 50%; z-index: 50;
    width: 36px; height: 36px;
    border: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transform: translateY(-50%);
    background: rgba(255,255,255,.78);
    color: rgba(29,29,31,.78);
    box-shadow: 0 10px 26px rgba(40,32,22,.10), inset 0 1px 0 rgba(255,255,255,.9);
    backdrop-filter: blur(14px);
    font-size: 0;
}
.album-thumb-prev { left: 4px; }
.album-thumb-next { right: 4px; }
.album-thumb-prev::before,.album-thumb-next::before {
    content: "";
    width: 10px; height: 10px;
    display: block;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}
.album-thumb-prev::before { transform: rotate(-135deg); margin-left: 4px; }
.album-thumb-next::before { transform: rotate(45deg);   margin-right: 4px; }

.album-detail-info {
    width: 420px;
    margin-top: 16px;
    padding: 24px 26px;
    border-radius: 28px;
    background: rgba(255,255,255,.76);
    border: 1px solid rgba(255,255,255,.84);
    box-shadow: 0 22px 64px rgba(40,32,22,.08), inset 0 1px 0 rgba(255,255,255,.86);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.album-detail-info h1 { margin: 0; font-size: 38px; line-height: 1; }
.album-detail-meta { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.album-detail-meta span {
    min-height: 38px; padding: 0 13px;
    border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.78);
    border: 1px solid var(--line);
    color: var(--muted); font-size: 14px;
}
.album-detail-info p { margin: 16px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.album-detail-content { min-width: 0; padding-top: 20px; }

/* ── TRACKS ── */

.album-track-list { display: grid; gap: 14px; max-width: 760px; margin-top: 24px; }
.album-track-row {
    width: 100%;
    min-height: 76px;
    padding: 16px 22px;
    border-radius: 26px;
    display: grid;
    grid-template-columns: 58px 54px minmax(0,1fr) auto;
    gap: 18px;
    align-items: center;
    text-align: left;
    color: inherit;
    background: rgba(255,255,255,.68);
    border: 1px solid rgba(255,255,255,.78);
    box-shadow: 0 18px 46px rgba(40,32,22,.06);
    transition: transform .3s, box-shadow .3s, background .3s;
}
.album-track-row:hover,
.album-track-row.active {
    transform: translateY(-3px);
    background: rgba(255,255,255,.94);
    box-shadow: 0 26px 70px rgba(40,32,22,.11);
}
.album-track-number { color: var(--accent); font-size: 18px; font-weight: 500; letter-spacing: .08em; }
.album-track-play {
    width: 54px; height: 54px;
    border: 0; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #1d1d1f; color: #fff;
    font-size: 0;
    box-shadow: 0 12px 28px rgba(29,29,31,.18);
}
.album-track-row.active .album-track-play,
.js-play-track.is-playing { background: var(--accent); }
.album-track-play svg { width: 22px; height: 22px; fill: currentColor; pointer-events: none; }
.album-track-title { min-width: 0; font-size: 22px; font-weight: 400; line-height: 1.15; letter-spacing: -.035em; }
.album-track-duration { color: var(--muted); font-size: 14px; }

/* ── LIGHTBOX ── */

.album-lightbox {
    position: fixed; inset: 0; z-index: 99999;
    display: none;
    background: rgba(8,8,9,.94);
    backdrop-filter: blur(12px);
}
.album-lightbox.is-open { display: block; }
.album-lightbox-close {
    position: fixed; top: 32px; right: 34px; z-index: 100002;
    width: 66px; height: 66px;
    border: 1px solid rgba(255,255,255,.12); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.10);
    color: #fff; font-size: 0;
    box-shadow: 0 24px 60px rgba(0,0,0,.32);
    backdrop-filter: blur(18px);
}
.album-lightbox-close::before,.album-lightbox-close::after {
    content: "";
    position: absolute;
    width: 24px; height: 4px;
    border-radius: 999px;
    background: rgba(255,255,255,.95);
}
.album-lightbox-close::before { transform: rotate(45deg); }
.album-lightbox-close::after  { transform: rotate(-45deg); }
.album-lightbox-counter {
    position: fixed; top: 42px; left: 50%; z-index: 100002;
    transform: translateX(-50%);
    color: rgba(255,255,255,.62); font-size: 20px; font-weight: 500;
}
.album-lightbox-swiper { width: 100%; height: 100%; }
.album-lightbox-swiper .swiper-slide {
    display: flex; align-items: center; justify-content: center;
    padding: 76px 120px 72px;
}
.album-lightbox-swiper img {
    max-width: min(72vw,1120px); max-height: 82vh;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 40px 120px rgba(0,0,0,.42);
}
.album-lightbox-prev,
.album-lightbox-next {
    position: fixed; top: 50%; z-index: 100002;
    width: 72px; height: 72px;
    border: 1px solid rgba(255,255,255,.12); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transform: translateY(-50%);
    background: rgba(255,255,255,.10);
    color: rgba(255,255,255,.94); font-size: 0;
    box-shadow: 0 24px 60px rgba(0,0,0,.32);
    backdrop-filter: blur(18px);
}
.album-lightbox-prev { left: clamp(22px,4vw,64px); }
.album-lightbox-next { right: clamp(22px,4vw,64px); }
.album-lightbox-prev::before,.album-lightbox-next::before {
    content: "";
    width: 15px; height: 15px; display: block;
    border-top: 4px solid currentColor;
    border-right: 4px solid currentColor;
}
.album-lightbox-prev::before { transform: rotate(-135deg); margin-left: 5px; }
.album-lightbox-next::before { transform: rotate(45deg);   margin-right: 5px; }
.album-lightbox .swiper-pagination {
    position: fixed !important;
    left: 50% !important; right: auto !important; bottom: 34px !important;
    width: auto !important;
    transform: translateX(-50%) !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    gap: 9px !important; z-index: 100010 !important;
}
.album-lightbox .swiper-pagination-bullet { width: 8px !important; height: 8px !important; margin: 0 !important; opacity: 1 !important; background: rgba(255,255,255,.42) !important; }
.album-lightbox .swiper-pagination-bullet-active { background: #fff !important; }

/* ── GLOBAL PLAYER ── */

.global-player {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 9999;

    width: min(760px, calc(100vw - 40px));
    min-height: 86px;
    padding: 12px 16px;
    border-radius: 28px;

    display: grid;
    grid-template-columns: 64px minmax(0,1fr) auto;
    gap: 14px;
    align-items: center;

    background: rgba(255,255,255,.92);
    border: 1px solid rgba(255,255,255,.92);
    box-shadow: 0 24px 70px rgba(40,32,22,.18);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);

    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(24px) scale(.98);
    transition: opacity .25s, transform .25s;
}
.global-player.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
}

.global-player-cover {
    width: 64px; height: 64px;
    min-width: 64px; min-height: 64px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
}
.global-player-cover img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.global-player-content { min-width: 0; }

.global-player-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.global-player-text { min-width: 0; }

.global-player-title {
    display: block;
    font-size: 18px; font-weight: 600;
    color: #1d1d1f;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    line-height: 1.15;
}
.global-player-album {
    display: block;
    margin-top: 4px;
    font-size: 13px; color: #6e6e73;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.global-player-close {
    width: 30px; height: 30px; min-width: 30px;
    border: 0; border-radius: 50%; padding: 0;
    background: rgba(29,29,31,.06); color: #1d1d1f;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0;
    flex-shrink: 0;
}

.global-player-progress-wrap {
    display: grid;
    grid-template-columns: 38px minmax(0,1fr) 38px;
    gap: 8px;
    align-items: center;
}
.global-player-time {
    font-size: 12px; color: #6e6e73;
    font-variant-numeric: tabular-nums;
    text-align: center;
}
.global-player-progress {
    width: 100%; height: 22px; margin: 0; padding: 0;
    appearance: none; -webkit-appearance: none;
    background: transparent; outline: none;
    cursor: pointer; touch-action: pan-x;
}
.global-player-progress::-webkit-slider-runnable-track {
    height: 5px; border-radius: 999px;
    background: linear-gradient(90deg,
        #1d1d1f 0%,
        #1d1d1f var(--progress,0%),
        rgba(29,29,31,.14) var(--progress,0%),
        rgba(29,29,31,.14) 100%
    );
}
.global-player-progress::-webkit-slider-thumb {
    appearance: none; -webkit-appearance: none;
    width: 16px; height: 16px; margin-top: -5.5px;
    border-radius: 50%;
    background: #1d1d1f;
    border: 3px solid #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,.24);
}
.global-player-progress::-moz-range-track { height: 5px; border-radius: 999px; background: rgba(29,29,31,.14); }
.global-player-progress::-moz-range-progress { height: 5px; border-radius: 999px; background: #1d1d1f; }
.global-player-progress::-moz-range-thumb {
    width: 16px; height: 16px;
    border-radius: 50%; background: #1d1d1f;
    border: 3px solid #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,.24);
}

/* controls */
.global-player-actions {
    display: flex; align-items: center; justify-content: center;
    gap: 8px;
}
.global-player-side-button {
    width: 42px; height: 42px;
    min-width: 42px; min-height: 42px;
    border: 0; border-radius: 50%; padding: 0;
    background: rgba(29,29,31,.06); color: #1d1d1f;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0;
}
.global-player-main-button {
    width: 54px; height: 54px;
    min-width: 54px; min-height: 54px;
    border: 0; border-radius: 50%; padding: 0;
    background: #1d1d1f; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0;
}
.global-player button svg,
.js-play-track svg {
    display: block; fill: currentColor;
    width: 21px; height: 21px;
    pointer-events: none;
}
.global-player-main-button svg { width: 27px; height: 27px; }
.global-player-close svg { width: 20px; height: 20px; }
.global-player-close svg path { stroke: currentColor; fill: none; }

/* ── VOLUME — Desktop hover ── */
.global-volume {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* The popup pill */
.global-volume-popup {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    width: 44px;
    height: 130px;
    padding: 14px 0;

    border-radius: 999px;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(255,255,255,.92);
    box-shadow: 0 16px 44px rgba(29,29,31,.14);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(8px) scale(.96);
    transform-origin: bottom center;
    transition: opacity .16s, visibility .16s, transform .16s;
    z-index: 10000;
}

/* Desktop: show on hover */
@media (hover: hover) and (pointer: fine) {
    .global-volume:hover .global-volume-popup {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* Touch: show when .is-open-mobile toggled by JS */
.global-volume-popup.is-open-mobile {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateX(-50%) translateY(0) scale(1) !important;
}

/* Vertical slider inside popup */
.global-volume-range {
    position: absolute;
    top: 50%; left: 50%;
    width: 100px; height: 20px;
    margin: 0; padding: 0;
    transform: translate(-50%,-50%) rotate(-90deg);
    background: transparent;
    appearance: none; -webkit-appearance: none;
    cursor: pointer; display: block;
}
.global-volume-range::-webkit-slider-runnable-track {
    height: 4px; border-radius: 999px;
    background: linear-gradient(90deg,
        #1d1d1f 0%,
        #1d1d1f var(--volume-progress,100%),
        rgba(29,29,31,.16) var(--volume-progress,100%),
        rgba(29,29,31,.16) 100%
    );
}
.global-volume-range::-webkit-slider-thumb {
    appearance: none; -webkit-appearance: none;
    width: 14px; height: 14px; margin-top: -5px;
    border-radius: 50%; background: #1d1d1f;
    border: 2.5px solid #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,.24);
}
.global-volume-range::-moz-range-track { height: 4px; border-radius: 999px; background: rgba(29,29,31,.16); }
.global-volume-range::-moz-range-progress { height: 4px; border-radius: 999px; background: #1d1d1f; }
.global-volume-range::-moz-range-thumb {
    width: 14px; height: 14px;
    border-radius: 50%; background: #1d1d1f;
    border: 2.5px solid #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,.24);
}

/* ── FOOTER ── */

.site-footer {
    padding: 42px 7vw;
    color: var(--muted);
    border-top: 1px solid var(--line);
    text-align: center;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */

/* ── 1200 → 901 ── */
@media (max-width: 1200px) and (min-width: 901px) {
    .site-header { padding: 20px 48px; }
    .section { padding-left: 48px; padding-right: 48px; }

    .album-detail-page {
        grid-template-columns: 360px minmax(0,1fr);
        gap: 48px;
        padding: 42px 48px 150px;
    }
    .album-detail-sidebar,
    .album-gallery,
    .album-main-cover,
    .album-detail-info,
    .album-thumb-carousel { width: 360px; max-width: 360px; }
    .album-main-cover { height: 360px; }
    .album-thumb-carousel { height: 78px; padding: 0 42px; }
    .album-thumb-carousel .swiper-slide,
    .album-thumb { width: 62px !important; height: 62px !important; }

    .book-compact-page {
        grid-template-columns: 300px minmax(0,1fr);
        gap: 48px;
        padding-left: 48px; padding-right: 48px;
    }
    .book-compact-sidebar,
    .book-compact-cover,
    .book-compact-cover img,
    .book-compact-info { width: 300px; }
    .book-compact-list { columns: 2; }
}

/* ── ≤900 ── */
@media (max-width: 900px) {
    .section { padding: 64px 28px; }

    .books-grid,
    .albums-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 34px 20px; }

    /* Book detail */
    .book-compact-page { display: block; padding: 36px 28px 120px; }
    .book-compact-sidebar { position: static; width: min(100%,420px); margin: 0 auto 44px; }
    .book-compact-cover,
    .book-compact-cover img,
    .book-compact-info { width: 100%; }
    .book-compact-cover img { height: auto; }
    .book-compact-info { padding: 24px; }
    .book-compact-info h1 { font-size: 36px; }
    .book-compact-list { columns: 2; column-gap: 28px; }

    /* Album detail */
    .album-detail-page { display: block; padding: 36px 28px 140px; }
    .album-detail-sidebar { position: static; width: min(100%,430px); margin: 0 auto 44px; }
    .album-gallery,
    .album-main-cover,
    .album-detail-info,
    .album-thumb-carousel { width: 100%; max-width: 430px; }
    .album-main-cover { height: auto; aspect-ratio: 1/1; }
    .album-thumb-carousel { height: 78px; padding: 0 42px; }
    .album-thumb-carousel .swiper-slide,
    .album-thumb { width: 64px !important; height: 64px !important; }

    .album-track-row { grid-template-columns: 44px 46px minmax(0,1fr) auto; gap: 12px; min-height: 66px; padding: 14px 16px; }
    .album-track-title { font-size: 18px; }

    /* Poem */
    .poem-page,.poem-detail,.poem-detail-page { padding: 28px 24px 110px; }
    .poem-reader { width: 100%; max-width: 680px; padding: 34px 36px 42px; border-radius: 26px; }
}

/* ── ≤760: show hamburger ── */
@media (max-width: 760px) {
    .site-header { min-height: 74px; padding: 16px 18px; }
    .site-header .nav { display: none; }
    .logo { max-width: 230px; font-size: 22px; line-height: 1.1; letter-spacing: -.04em; }
    .menu-toggle {
        display: inline-flex;
        align-items: center; justify-content: center;
        min-width: 96px; min-height: 46px;
        padding: 0 20px; font-size: 18px;
    }
    .mobile-menu {
        position: fixed;
        top: 78px; left: 14px; right: 14px;
        z-index: 1100;
        display: grid;
        gap: 8px;
        padding: 14px;
        border-radius: 24px;
        background: rgba(255,255,255,.94);
        border: 1px solid rgba(255,255,255,.86);
        box-shadow: 0 24px 80px rgba(40,32,22,.18);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        opacity: 0;
        transform: translateY(-12px);
        pointer-events: none;
        transition: opacity .25s, transform .25s;
    }
    .mobile-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
    .mobile-menu a {
        padding: 15px 16px;
        border-radius: 18px;
        color: var(--text); font-weight: 500;
        background: rgba(247,243,237,.58);
    }
    .mobile-menu a.active { background: rgba(181,155,107,.14); }
}

/* ── ≤700 / touch: mobile layout ── */
@media (max-width: 700px) {
    body { padding-bottom: 140px; }

    .section { padding-left: 18px; padding-right: 18px; }

    .home-about-section { padding: 34px 18px 120px; }
    .home-about-card { width: 100%; padding: 30px 24px; border-radius: 30px; }
    .home-about-card h2 { font-size: 40px; }
    .home-about-text { font-size: 19px; line-height: 1.6; }

    .books-grid,
    .albums-grid { grid-template-columns: 1fr; gap: 34px; }
    .book-tile { max-width: 340px; margin: 0 auto; }

    .book-compact-page { padding: 28px 18px 120px; }
    .book-compact-info { border-radius: 24px; padding: 22px; }
    .book-compact-info h1 { font-size: 34px; }
    .book-compact-meta { grid-template-columns: 1fr; }
    .book-compact-list { columns: 1; }
    .book-compact-row { min-height: 52px; padding: 10px 0; }
    .book-compact-title { font-size: 17px; }

    .poem-page,.poem-detail,.poem-detail-page { padding: 22px 16px 120px; }
    .poem-reader { padding: 28px 22px 34px; border-radius: 24px; }
    .poem-heading,.poem-page h1 { font-size: clamp(32px,10vw,42px); }
    .poem-text { font-size: 18px; line-height: 1.62; }
    .poem-navigation { display: flex; flex-direction: column; align-items: stretch; }

    .album-detail-page { padding: 28px 18px 150px; }
    .album-detail-sidebar { width: 100%; margin-bottom: 34px; }
    .album-main-cover { border-radius: 24px; }
    .album-detail-info { border-radius: 24px; padding: 22px; }
    .album-detail-info h1 { font-size: 34px; }

    .album-track-row {
        grid-template-columns: 42px 54px minmax(0,1fr);
        gap: 12px;
        min-height: 78px;
        padding: 14px 16px;
        border-radius: 22px;
    }
    .album-track-duration { display: none; }
    .album-track-number { font-size: 20px; }
    .album-track-title { font-size: 22px; }
    .album-track-play { width: 54px; height: 54px; }

    /* Lightbox */
    .album-lightbox-close { top: 18px; right: 16px; width: 52px; height: 52px; }
    .album-lightbox-counter { top: 30px; font-size: 16px; }
    .album-lightbox-swiper .swiper-slide { padding: 76px 18px 72px; }
    .album-lightbox-swiper img { max-width: 94vw; max-height: 76vh; border-radius: 12px; }
    .album-lightbox-prev,.album-lightbox-next { width: 52px; height: 52px; }
    .album-lightbox-prev { left: 12px; }
    .album-lightbox-next { right: 12px; }

    /* Player: full-width pill at bottom */
    .global-player {
        left: 12px;
        right: 12px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        width: auto;
        min-height: 0;
        padding: 12px;
        border-radius: 22px;

        grid-template-columns: 56px minmax(0,1fr) 34px;
        grid-template-areas:
            "cover content close"
            "progress progress progress"
            "actions actions actions";
        gap: 8px 10px;

        transform: translateY(calc(100% + 60px));
    }
    .global-player.visible { transform: translateY(0); }

    .global-player-cover {
        grid-area: cover;
        width: 56px; height: 56px;
        min-width: 56px; min-height: 56px;
        border-radius: 14px;
    }
    .global-player-content { grid-area: content; align-self: center; min-width: 0; }
    .global-player-top { display: block; margin: 0; }
    /* Close btn lives in its own grid cell; hide the one inside .global-player-top */
    .global-player-top .global-player-close { display: none; }
    .global-player-title { font-size: 17px; }
    .global-player-album { font-size: 13px; }
    .global-player-close {
        grid-area: close;
        width: 34px; height: 34px;
        min-width: 34px; min-height: 34px;
        align-self: center;
        justify-self: end;
    }
    .global-player-progress-wrap { grid-area: progress; }
    .global-player-actions { grid-area: actions; gap: 16px; }

    .global-player-side-button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
    .global-player-main-button { width: 56px; height: 56px; min-width: 56px; min-height: 56px; }

    /* On touch devices volume button still shows but popup opens on tap */
    /* (handled by JS + .is-open-mobile class) */
}

/* ── ≤430 ── */
@media (max-width: 430px) {
    .site-header { padding: 14px; }
    .logo { font-size: 18px; }
    .menu-toggle { min-width: 88px; min-height: 42px; padding: 0 16px; font-size: 16px; }

    .album-detail-info h1,
    .book-compact-info h1 { font-size: 30px; }

    .album-track-row { grid-template-columns: 36px 50px minmax(0,1fr); gap: 10px; }
    .album-track-title { font-size: 20px; }

    .global-player { left: 10px; right: 10px; border-radius: 20px; }
}

/* =============================================================
   2K / 4K / WIDE SCREENS  (≥ 1600px)
   ============================================================= */

@media (min-width: 1600px) {
    /* Limit section padding so content doesn't swim on huge screens */
    .section {
        padding-left: max(7vw, calc((100vw - 1500px) / 2));
        padding-right: max(7vw, calc((100vw - 1500px) / 2));
    }

    .site-header {
        padding-left: max(7vw, calc((100vw - 1500px) / 2));
        padding-right: max(7vw, calc((100vw - 1500px) / 2));
    }

    .site-footer {
        padding-left: max(7vw, calc((100vw - 1500px) / 2));
        padding-right: max(7vw, calc((100vw - 1500px) / 2));
    }

    /* Home about card */
    .home-about-card {
        max-width: 1100px;
        padding: 80px 90px;
    }
    .home-about-card h2  { font-size: 90px; }
    .home-about-text     { font-size: 26px; }

    /* Books / albums grid — cap tile width so they don't blow up */
    .books-grid  { grid-template-columns: repeat(3, minmax(0, 380px)); gap: 52px 34px; }
    .albums-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 52px 28px; }

    /* Book detail */
    .book-compact-page {
        max-width: 1540px;
        grid-template-columns: 380px minmax(0, 1fr);
        gap: 90px;
        padding: 60px max(7vw, calc((100vw - 1540px) / 2)) 160px;
    }
    .book-compact-sidebar,
    .book-compact-cover,
    .book-compact-cover img,
    .book-compact-info { width: 380px; }
    .book-compact-cover img { max-height: 530px; }
    .book-compact-info h1 { font-size: 42px; }
    .book-compact-list { columns: 4; column-gap: 40px; }
    .book-compact-title { font-size: 17px; }

    /* Album detail */
    .album-detail-page {
        max-width: 1600px;
        grid-template-columns: 500px minmax(0, 1fr);
        gap: 72px;
        padding: 64px max(7vw, calc((100vw - 1600px) / 2)) 180px;
    }
    .album-detail-sidebar,
    .album-gallery,
    .album-main-cover,
    .album-detail-info,
    .album-thumb-carousel { width: 500px; max-width: 500px; }
    .album-main-cover { height: 500px; }
    .album-thumb-carousel { height: 100px; padding: 0 56px; }
    .album-thumb-carousel .swiper-slide,
    .album-thumb { width: 86px !important; height: 86px !important; }
    .album-detail-info h1 { font-size: 46px; }
    .album-track-list { max-width: 900px; }
    .album-track-row { min-height: 84px; padding: 18px 26px; border-radius: 30px; gap: 20px; }
    .album-track-title  { font-size: 24px; }
    .album-track-number { font-size: 20px; }

    /* Poem */
    .poem-page,.poem-detail,.poem-detail-page { max-width: 1100px; padding: 72px 48px 140px; }
    .poem-reader { max-width: 860px; padding: 56px 72px 68px; }
    .poem-heading,.poem-page h1 { font-size: 52px; }
    .poem-text { font-size: 22px; }
    .poem-navigation { max-width: 860px; }

    /* Player — a little wider on big displays */
    .global-player { width: min(900px, calc(100vw - 40px)); }
}

@media (min-width: 2200px) {
    .home-about-card   { max-width: 1300px; }
    .home-about-card h2 { font-size: 110px; }
    .home-about-text   { font-size: 28px; max-width: 1000px; }

    .books-grid  { grid-template-columns: repeat(4, minmax(0, 400px)); gap: 60px 40px; }
    .albums-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 60px 32px; }

    .book-compact-page {
        max-width: 1800px;
        grid-template-columns: 420px minmax(0, 1fr);
        gap: 100px;
    }
    .book-compact-sidebar,
    .book-compact-cover,
    .book-compact-cover img,
    .book-compact-info { width: 420px; }
    .book-compact-list { columns: 5; }

    .album-detail-page {
        max-width: 1920px;
        grid-template-columns: 560px minmax(0, 1fr);
    }
    .album-detail-sidebar,
    .album-gallery,
    .album-main-cover,
    .album-detail-info,
    .album-thumb-carousel { width: 560px; max-width: 560px; }
    .album-main-cover { height: 560px; }

    .poem-reader { max-width: 980px; padding: 64px 84px 80px; }
    .poem-text { font-size: 24px; }

    .global-player { width: min(1060px, calc(100vw - 40px)); }
}