/* Vidoteka – visual language of Založba Sanje (sanje.si) */
:root {
    --ink: #171717;
    --text: #333333;
    --muted: #5c5450;
    --faint: #8c8480;
    --accent-ink: #8a5f4e;
    --accent-ink-dark: #5e3f33;
    --taupe: #c4a497;
    --blush: #eddbd4;
    --blush-hover: #f4e6e0;
    --blush-50: #fbf7f5;
    --blush-100: #f5efec;
    --blush-line: #f1e7e2;
    --navy: #1f2430;
    --cocoa: #3a3330;
    --line: #ede6e2;
    --input-border: #d9ccc5;
    --band: #f1e7e2;
    --band-strong: #e2d6d0;
    --white: #fff;
    --danger: #c0392b;
    --sans: "Work Sans", "Helvetica Neue", Arial, sans-serif;
    --serif: "EB Garamond", Garamond, Georgia, serif;
    --topbar: 84px;
    --side-nav: 248px;
    --side-nav-mini: 84px;
}

* { box-sizing: border-box; }
html { font-size: 18px; }
body { margin: 0; background: var(--white); color: var(--text); font: 400 16px/1.5 var(--sans); }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: var(--accent-ink-dark); text-decoration: underline; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 500; line-height: 1.15; margin: 0 0 .8rem; }
h1 { font-size: 44px; letter-spacing: -.01em; }
h2 { font-size: 30px; }
:focus-visible { outline: 2px solid #8a5f4e; outline-offset: 2px; }
.container { padding: 0 40px; }
.eyebrow { display: inline-block; font: 600 12px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-ink); }
.tone-navy { --tone: var(--navy); --tone-ink: var(--white); }
.tone-accent { --tone: var(--accent-ink); --tone-ink: var(--white); }
.tone-rose { --tone: var(--taupe); --tone-ink: var(--ink); }
.tone-blush { --tone: var(--blush); --tone-ink: #3a2a24; }
.tone-cocoa { --tone: var(--cocoa); --tone-ink: var(--white); }

/* Header */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.topbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; min-height: var(--topbar); padding: 14px 24px; }
.menu-toggle { width: 44px; height: 44px; margin-right: -20px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink); }
.menu-toggle:hover { background: var(--blush-100); }
.brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand img { width: 54px; height: 54px; display: block; }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-eyebrow { font: 600 10px var(--sans); letter-spacing: .22em; text-transform: uppercase; color: #6b5a52; }
.brand-name { font: 500 30px/1 var(--serif); }
.search { flex: 1 1 360px; max-width: 640px; position: relative; margin: 0 auto; }
.search-icon { position: absolute; left: 18px; top: 14px; color: var(--muted); }
.search input { width: 100%; height: 48px; margin: 0; padding: 0 56px 0 50px; border: 1px solid var(--input-border); border-radius: 999px; background: var(--blush-50); color: var(--ink); font: 400 17px var(--serif); outline: 0; }
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--ink); background: var(--white); }
.search-key { position: absolute; right: 14px; top: 12px; min-width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--input-border); border-radius: 5px; background: var(--white); color: var(--muted); font: 500 12px var(--sans); }
.account-links { display: flex; align-items: center; gap: 20px; }
.store-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); font: 600 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.store-link:hover { color: var(--accent-ink); text-decoration: none; }
.pill-button { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px; background: var(--ink); color: var(--white); font: 600 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; list-style: none; }
.pill-button::-webkit-details-marker { display: none; }
.pill-button:hover { background: #333; color: var(--white); text-decoration: none; }
.account-menu { position: relative; }
.account-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: none; letter-spacing: .02em; font-size: 14px; }
.account-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 220px; padding: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 40px rgba(23, 23, 23, .12); display: flex; flex-direction: column; }
.account-panel a, .account-panel .link-button { display: block; width: 100%; padding: 10px 14px; border-radius: 6px; color: var(--ink); font: 500 15px var(--sans); text-align: left; }
.account-panel a:hover, .account-panel .link-button:hover { background: var(--blush-50); text-decoration: none; color: var(--ink); }
.account-panel form { margin: 0; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); border: 1px solid rgba(0, 0, 0, .12); }

/* Layout: side menu and content */
.app-shell { display: flex; align-items: flex-start; }
.app-main { flex: 1; min-width: 0; }
.main { padding: 40px 0 88px; min-height: 50vh; }
.side-nav { position: sticky; top: var(--topbar); flex: none; width: var(--side-nav); height: calc(100vh - var(--topbar)); overflow-y: auto; overscroll-behavior: contain; background: var(--white); border-right: 1px solid var(--line); scrollbar-width: thin; }
.side-nav svg { fill: none; stroke: currentColor; stroke-width: 1.6; flex: none; }
.side-nav-full { padding: 12px 12px 32px; }
.side-nav-mini { display: none; padding: 12px 6px; flex-direction: column; gap: 4px; }
.side-nav hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.side-nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.side-nav-list a { display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ink); font: 500 14px var(--sans); }
.side-nav-list a svg { color: var(--cocoa); }
.side-nav-list a:hover { background: var(--blush-50); color: var(--ink); text-decoration: none; }
.side-nav-list a.active { background: var(--blush-100); font-weight: 600; }
.side-nav-list a.active > svg:first-child { color: var(--accent-ink); }
.side-nav-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-nav-count { font: 500 12px var(--sans); color: var(--muted); }
.side-nav-list .dot { width: 10px; height: 10px; margin: 0 5px; }
.side-nav-heading { margin: 0; padding: 6px 12px; font: 600 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.side-nav-list + .side-nav-heading { padding-top: 18px; }
.side-nav-heading-link { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 0 12px; border-radius: 10px; color: var(--ink); font: 600 15px var(--sans); }
.side-nav-heading-link:hover, .side-nav-heading-link.active { background: var(--blush-50); color: var(--ink); text-decoration: none; }
.side-nav-invite { margin: 6px 12px 4px; display: flex; flex-direction: column; gap: 12px; }
.side-nav-invite p { margin: 0; font: 400 17px/1.4 var(--serif); color: var(--text); }
.side-nav-login { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border: 1px solid var(--input-border); border-radius: 999px; color: var(--ink); font: 600 12px var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.side-nav-login:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.side-nav-stack { position: relative; flex: none; width: 22px; height: 18px; }
.side-nav-stack::before, .side-nav-stack::after { content: ""; position: absolute; width: 19px; height: 14px; border-radius: 2px; }
.side-nav-stack::before { left: 3px; top: 0; background: var(--taupe); }
.side-nav-stack::after { left: 0; top: 4px; background: var(--navy); border: 1px solid var(--white); }
.side-nav-stack img { position: absolute; z-index: 1; left: 3px; top: 0; width: 19px; height: 14px; object-fit: cover; border-radius: 2px; }
.side-nav-stack img:last-child { z-index: 2; left: 0; top: 4px; border: 1px solid var(--white); }
.side-nav-list a.side-nav-new { color: var(--accent-ink); font-weight: 600; }
.side-nav-list a.side-nav-new svg { color: var(--accent-ink); stroke-width: 1.8; }
.side-nav-sub { list-style: none; margin: 2px 0 8px 28px; padding: 0 0 0 10px; border-left: 1px solid var(--band-strong); display: flex; flex-direction: column; gap: 2px; }
.side-nav-sub a { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 8px; color: var(--cocoa); font: 400 14px var(--sans); }
.side-nav-sub a:hover { background: var(--blush-50); color: var(--ink); text-decoration: none; }
.side-nav-sub a.active { background: var(--blush); color: var(--ink); font-weight: 600; }
.side-nav-mini a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 2px; border-radius: 10px; color: var(--ink); font: 500 10px/1.2 var(--sans); text-align: center; }
.side-nav-mini a svg { color: var(--cocoa); }
.side-nav-mini a:hover { background: var(--blush-50); color: var(--ink); text-decoration: none; }
.side-nav-backdrop { display: none; }
/* Mini menu: on the watch page, when chosen with ☰, and by default between 1024 and 1279 px. */
@media (min-width: 1024px) {
    body.nav-mini:not(.nav-expanded) .side-nav { width: var(--side-nav-mini); }
    body.nav-mini:not(.nav-expanded) .side-nav-full { display: none; }
    body.nav-mini:not(.nav-expanded) .side-nav-mini { display: flex; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
    body:not(.nav-expanded) .side-nav { width: var(--side-nav-mini); }
    body:not(.nav-expanded) .side-nav-full { display: none; }
    body:not(.nav-expanded) .side-nav-mini { display: flex; }
}
@media (max-width: 1023px) {
    .side-nav { position: fixed; z-index: 70; top: 0; bottom: 0; left: 0; width: min(300px, 86vw); height: auto; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(23, 23, 23, .15); }
    body.nav-open .side-nav { transform: none; }
    body.nav-open .side-nav-backdrop { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(23, 23, 23, .35); }
    body.nav-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .side-nav { transition: none; } }
.notices { padding-top: 24px; }

/* Notices */
.notice { padding: 14px 18px; margin-bottom: 22px; font-size: 16px; border-radius: 8px; }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.notice.success { background: var(--blush-50); color: var(--text); border: 1px solid var(--blush-line); }
.notice.error { background: #fbeeee; color: #8c2f2f; border: 1px solid #f1d4d4; }

/* Section titles */
.section-head { margin: 0 0 26px; }
.section-head p { margin: 0; }
.section-title { font: 500 36px/1.15 var(--serif); color: var(--ink); margin: 0 0 18px; }
.section-title.small { font-size: 28px; margin-bottom: 16px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; font-size: 13px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent-ink); }

/* Page heads (lists, categories) */
.page-hero { background: var(--navy); color: var(--white); }
.page-hero .container { padding-top: 40px; padding-bottom: 56px; }
.page-hero .breadcrumbs { color: #c9c4c0; margin-bottom: 28px; }
.page-hero .breadcrumbs a { color: #e3ccc2; }
.page-hero-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; }
.page-hero-text { flex: 1 1 560px; display: flex; flex-direction: column; gap: 14px; }
.page-hero .eyebrow { color: #e3ccc2; letter-spacing: .2em; }
.page-hero h1 { margin: 0; color: var(--white); font: 400 clamp(48px, 7vw, 96px)/.95 var(--serif); letter-spacing: -.015em; }
.page-hero p { margin: 0; max-width: 640px; font: 400 21px/1.5 var(--serif); color: #d9d3cf; }
.page-hero p a { color: #e3ccc2; text-decoration: underline; }
.page-hero .subscribe-form { margin: 0; }
.page-hero .subscribe-form .button, .page-hero a.subscribe-form { min-height: 52px; padding: 0 26px; background: var(--blush); border-color: var(--blush); color: var(--ink); font: 600 14px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.page-hero .subscribe-form .button:hover, .page-hero a.subscribe-form:hover { background: var(--blush-hover); border-color: var(--blush-hover); }
.page-hero .subscribe-form .button.is-on { background: transparent; border-color: #8c90a0; color: var(--white); }
.list-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-bottom: 20px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.list-toolbar:empty { display: none; }
.toolbar-chips { margin: 0; padding: 0; flex-wrap: wrap; overflow: visible; }
.sort-control { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.segmented { display: flex; padding: 4px; background: var(--blush-100); border-radius: 999px; }
.segmented a { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; color: var(--muted); font: 500 13px var(--sans); white-space: nowrap; }
.segmented a:hover { color: var(--ink); text-decoration: none; }
.segmented a.active { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.result-summary { margin: 0; font: italic 400 18px var(--serif); color: var(--muted); }



/* Category chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 22px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; height: 44px; padding: 0 18px; white-space: nowrap; border: 1px solid var(--input-border); border-radius: 999px; background: var(--white); color: var(--cocoa); font: 500 14px var(--sans); }
.chip:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* Video grid & cards */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 40px 24px; }
.video-card { display: flex; flex-direction: column; gap: 14px; min-width: 0; color: inherit; }
.video-card:hover { text-decoration: none; color: inherit; }
.thumb { position: relative; aspect-ratio: 16 / 9; background: var(--band); border-radius: 6px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .2s ease; }
.video-card:hover .thumb img { filter: brightness(1.06); }
.duration { position: absolute; right: 10px; bottom: 10px; background: rgba(17, 17, 17, .82); color: var(--white); font: 500 12px var(--sans); padding: 3px 7px; border-radius: 4px; }
.badge-members { position: absolute; left: 10px; top: 10px; background: var(--blush); color: #3a2a24; font: 600 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; padding: 5px 9px; border-radius: 3px; }
.card-body { display: flex; gap: 16px; align-items: flex-start; }
.card-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card-rank { font: italic 400 56px/.85 var(--serif); color: var(--taupe); }
.card-category { font: 600 11px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.card-title { margin: 0; font: 500 21px/1.25 var(--serif); color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-card:hover .card-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.card-meta { margin: 0; font-size: 13px; color: var(--muted); }
.video-card.compact { flex-direction: row; gap: 14px; padding: 10px 0; }
.video-card.compact .thumb { flex: none; width: 168px; border-radius: 5px; }
.video-card.compact .duration { right: 6px; bottom: 6px; font-size: 11px; padding: 2px 6px; }
.video-card.compact .card-text { gap: 4px; }
.video-card.compact .card-title { font-size: 17px; -webkit-line-clamp: 3; }
.video-card.compact .card-category { font-size: 10px; letter-spacing: .12em; }
.video-card.compact .card-meta { font-size: 12px; }
.video-card.compact .badge-members { font-size: 9px; padding: 3px 6px; left: 5px; top: 5px; }

.empty { padding: 70px 30px; text-align: center; background: var(--blush-50); border-radius: 10px; font: italic 400 20px var(--serif); color: var(--muted); }

/* Pagination (pagination::default) */
.pager { margin-top: 56px; display: flex; justify-content: center; }
.pager .pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; padding: 0; margin: 0; }
.pager .pagination li > * { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 999px; color: var(--cocoa); font: 500 15px var(--sans); }
.pager .pagination li > a:hover { background: var(--blush-100); text-decoration: none; }
.pager .pagination li.active > * { background: var(--blush); color: var(--ink); font-weight: 600; }
.pager .pagination li.disabled > * { color: var(--faint); }


/* Watch page */
.watch-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; }
.player-shell { aspect-ratio: 16 / 9; background: #111318; border-radius: 10px; overflow: hidden; }
.player-shell video { width: 100%; height: 100%; display: block; }
.watch-title { font: 500 44px/1.08 var(--serif); letter-spacing: -.01em; margin: 28px 0 16px; }
.watch-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.watch-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 14px; color: var(--muted); }
.watch-facts > span + span::before { content: "·"; margin-right: 10px; }
.watch-actions { display: flex; gap: 10px; }
.watch-actions .button { display: inline-flex; align-items: center; gap: 8px; }
.card-category { display: block; }
.tag { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; background: var(--blush-100); color: var(--cocoa); border-radius: 999px; font: 500 12px var(--sans); }
.tag:hover { background: var(--blush); color: var(--ink); text-decoration: none; }
.description-box { background: var(--blush-50); border: 1px solid var(--blush-line); border-radius: 10px; padding: 28px 32px; margin-top: 28px; }
.description-content { max-height: 170px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
.description-box.is-open .description-content { max-height: none; -webkit-mask-image: none; mask-image: none; }
.description-toggle { margin-top: 12px; min-height: 44px; padding: 0; background: none; border: 0; color: var(--accent-ink); font: 600 13px var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.description-toggle:hover { color: var(--accent-ink-dark); }
.description { margin: 0; white-space: pre-wrap; color: var(--text); font: 400 19px/1.6 var(--serif); }
.locked { height: 100%; display: grid; place-items: center; padding: 24px; background: linear-gradient(rgba(244, 246, 251, .88), rgba(244, 246, 251, .88)), var(--poster, none) center / cover, var(--band); }
.locked-box { max-width: 440px; text-align: center; background: var(--white); padding: 30px 34px; border-radius: 10px; }
.locked-box h2 { font-size: 28px; margin: 10px 0; }
.locked-box p { margin: 0 0 20px; }

.youtube-frame { width: 100%; height: 100%; border: 0; display: block; }
.description a { word-break: break-all; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 0; font: 500 14px var(--sans); }
.description-box + .tag-list, .watch-meta + .tag-list { margin-top: 16px; }
.series-nav { margin-top: 24px; border: 1px solid var(--line); border-radius: 10px; padding: 18px 22px; }
.series-nav > p { margin: 0 0 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.series-nav > p a { font: 500 20px var(--serif); color: var(--ink); }
.series-nav ol { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; }
.series-nav li a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--text); font: 400 17px var(--serif); }
.series-nav li a:hover { background: var(--blush-50); text-decoration: none; }
.series-nav li a.current { background: var(--blush); color: var(--ink); }
.series-head { display: flex; gap: 28px; align-items: flex-start; margin-bottom: 30px; }
.series-head img { width: 280px; max-width: 40%; aspect-ratio: 16 / 9; object-fit: cover; }
.series-head .description { margin: 0; }
.episode-list { list-style: none; padding: 0; margin: 0; max-width: 820px; }
.episode-list li { display: grid; grid-template-columns: 34px 1fr; align-items: start; gap: 10px; }
.episode-no { font: italic 400 30px/1 var(--serif); color: var(--taupe); padding-top: 10px; text-align: right; }
.episode-list .video-card.compact { grid-template-columns: 220px 1fr; }

.watch-actions { flex-wrap: wrap; }
.button.secondary.is-on { background: var(--blush); border-color: var(--taupe); color: var(--accent-ink-dark); }
.save-list { list-style: none; margin: 0 0 18px; padding: 0; max-height: 260px; overflow-y: auto; }
.save-list li { border-bottom: 1px solid var(--line); }
.save-list .check { margin: 0; padding: 10px 2px; }
.save-list small { margin-left: auto; color: var(--faint); font: 400 13px var(--sans); }
.new-playlist label { margin-bottom: 10px; }
.new-playlist-row { display: flex; gap: 10px; }
.new-playlist-row select { margin: 0; flex: 1; }
.new-playlist.inline { display: grid; grid-template-columns: 2fr 1fr auto; gap: 14px; align-items: end; padding: 16px 20px; margin-bottom: 22px; }
.new-playlist.inline label { margin: 0; }
.form-error { color: var(--danger); margin: 8px 0 0; }
.playlist-panel { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 26px; }
.playlist-panel header { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 12px 14px; background: var(--blush-50); }
.playlist-panel header a { font: 500 19px var(--serif); color: var(--ink); }
.playlist-panel header span { font: 500 13px var(--sans); color: var(--muted); }
.playlist-panel ol { list-style: none; margin: 0; padding: 6px 0; max-height: 360px; overflow-y: auto; }
.playlist-panel li a { display: flex; gap: 10px; align-items: center; padding: 6px 14px; color: var(--text); font: 500 14px/1.3 var(--sans); }
.playlist-panel li a:hover { background: var(--blush-50); text-decoration: none; }
.playlist-panel li.current a { background: var(--blush); color: var(--ink); }
.thumb-mini { flex-shrink: 0; width: 96px; aspect-ratio: 16 / 9; background: var(--band); overflow: hidden; }
.thumb-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.library-section { margin-bottom: 48px; }
.library-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.library-head h2 { margin: 0; font-size: 30px; }
.library-head h2 span { color: var(--faint); margin-left: 6px; }
.empty.small { padding: 26px; font-size: 17px; }
.playlist-thumb .playlist-count { position: absolute; inset: 0 0 0 auto; width: 38%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(23, 23, 23, .78); color: var(--white); font: 700 22px var(--sans); }
.playlist-count small { font: 500 11px var(--sans); letter-spacing: 1.5px; text-transform: uppercase; }
.playlist-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 22px; }
.playlist-head .hint { margin: 0 0 8px; }
.playlist-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.playlist-edit { padding: 14px 20px; margin-bottom: 24px; max-width: 820px; }
.playlist-edit summary { cursor: pointer; font: 600 13px var(--sans); letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink); }
.playlist-edit form:first-of-type { margin-top: 16px; }
.playlist-items li { grid-template-columns: 34px 1fr auto; }
.item-actions { display: flex; gap: 12px; align-items: center; padding-top: 4px; font: 600 18px var(--sans); }
.item-actions form { margin: 0; }
.item-actions .link-button { color: var(--muted); font-size: 18px; }

.watched { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .45); }
.watched::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--watched); background: var(--taupe); }
.home-section { margin-bottom: 64px; container-type: inline-size; }
.home-row.single > :nth-child(n+5) { display: none !important; }
/* Home rows show exactly two full rows of cards at every width. */
.home-row { display: grid; grid-template-columns: 1fr; gap: 40px 24px; }
.home-row > :nth-child(n+5) { display: none; }
/* Columns follow the 260px minimum card width (n × 260 + gaps); a row never ends with an orphan card. */
@container (min-width: 544px) { .home-row { grid-template-columns: repeat(2, 1fr); } }
@container (min-width: 828px) { .home-row { grid-template-columns: repeat(3, 1fr); } .home-row > :nth-child(n+5) { display: flex; } .home-row > :nth-child(n+7) { display: none; } }
@container (min-width: 1112px) { .home-row { grid-template-columns: repeat(4, 1fr); } .home-row > :nth-child(n+7) { display: flex; } .home-row > :nth-child(n+9) { display: none; } }
@container (min-width: 828px) and (max-width: 1111px) { .home-row.single > :nth-child(n+4) { display: none !important; } }
.home-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.home-section-head.plain { border-bottom: 0; padding-bottom: 0; margin-bottom: 28px; }
.home-section-head h2 { margin: 0; font-size: 36px; }
.home-section-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; }
.home-section-title span { font: italic 400 19px var(--serif); color: var(--muted); }
.arrow-link { display: inline-flex; align-items: center; gap: 8px; font: 600 13px var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.arrow-link:hover { text-decoration: none; }
.arrow-link:hover svg { transform: translateX(3px); }
.arrow-link svg { transition: transform .15s ease; }
.badge-featured { display: inline-block; margin-left: 6px; padding: 2px 6px; background: var(--blush); color: var(--ink); font: 600 10px var(--sans); letter-spacing: 1px; text-transform: uppercase; vertical-align: 2px; }
.resume-note { margin: 14px 0 -12px; font: 500 14px var(--sans); color: var(--muted); }

.chapters { margin: 0 0 18px; padding-bottom: 16px; border-bottom: 1px solid var(--input-border); }
.chapters h2 { font: 600 12px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 8px; }
.chapters ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 28px; }
.chapters li { break-inside: avoid; }
.chapters a { display: block; padding: 4px 0; color: var(--text); font: 400 18px var(--serif); }
.chapters a span { display: inline-block; min-width: 58px; font: 600 13px var(--sans); color: var(--accent-ink); }
.description a[data-seek] { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .chapters ol { columns: 1; } }

.store-books { margin-top: 32px; }
.book-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.book { display: grid; grid-template-columns: 88px 1fr; gap: 20px; border: 1px solid var(--line); border-radius: 10px; padding: 20px; background: var(--white); }
.book-cover { display: block; aspect-ratio: 5 / 7; background: var(--blush); border-radius: 3px; overflow: hidden; }
.book-cover img { width: 100%; height: 100%; object-fit: contain; display: block; }
.book-body { display: flex; flex-direction: column; min-width: 0; }
.book h3 { font: 500 21px/1.25 var(--serif); margin: 0 0 6px; }
.book h3 a { color: var(--ink); }
.book p { margin: 0 0 12px; font: 400 16px/1.4 var(--serif); color: var(--muted); }
.book-buy { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; }
.book-buy strong { font: 600 17px var(--sans); color: var(--ink); white-space: nowrap; }
.book-buy .button { white-space: nowrap; padding: 10px 14px; }

.section-head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.section-head-row .section-title { margin-bottom: 14px; }
.subscribe-form { margin: 0 0 14px; }
.subscribe-form .button { display: inline-flex; align-items: center; gap: 7px; }
.notification-settings { padding: 18px 20px; max-width: 760px; }
.frequency-form label { max-width: 360px; }
.subscription-list { list-style: none; margin: 4px 0 0; padding: 0; }
.subscription-list li { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.subscription-list a { font: 500 18px var(--serif); color: var(--ink); }
.subscription-list small { color: var(--faint); font: 400 13px var(--sans); }
.subscription-list form { margin: 0 0 0 auto; }

/* Comments */
.comments { margin-top: 40px; }
.comments .section-title { font-size: 30px; }
.comment-form textarea { margin: 0; min-height: 90px; }
.comment-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.comment-form-actions .hint { font-size: 15px; }
.comment-login { padding: 20px 24px; background: var(--blush-100); border-radius: 10px; margin: 0; font: 400 18px var(--serif); }
.comment-list { list-style: none; padding: 0; margin: 26px 0 0; }
.comment { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.comment-avatar { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--band); color: var(--ink); font: 700 15px var(--sans); text-transform: uppercase; }
.comment-avatar.editors { background: var(--ink); color: var(--white); }
.comment-content { min-width: 0; flex: 1; }
.comment-head { margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.comment-head strong { font: 600 14px var(--sans); color: var(--ink); }
.comment-head time { font-size: 15px; color: var(--faint); }
.badge-editors { background: var(--blush); color: var(--ink); font: 700 10px var(--sans); letter-spacing: 1.5px; text-transform: uppercase; padding: 3px 7px; }
.comment-body { margin: 0; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; font: 400 18px/1.5 var(--serif); }
.comment-content form { margin: 6px 0 0; }
.comment-delete { font: 500 12px var(--sans); letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.comment-delete:hover { color: var(--danger); }
.comment-cell { max-width: 460px; white-space: normal; }

/* Dialogs */
.modal { width: min(560px, calc(100vw - 32px)); border: 0; border-radius: 12px; padding: 26px 28px 28px; background: var(--white); color: var(--muted); box-shadow: 0 20px 60px rgba(23, 23, 23, .18); }
.modal::backdrop { background: rgba(23, 23, 23, .45); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-head h2 { margin: 0; font-size: 28px; }
.modal-close { background: none; border: 0; font-size: 28px; line-height: 1; color: var(--text); padding: 0 4px; }
.modal-close:hover { color: var(--taupe); }
.modal textarea { font: 400 14px/1.45 ui-monospace, Menlo, monospace; margin: 0 0 14px; background: var(--blush-50); }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.share-networks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.share-networks a, .share-networks button { border: 1px solid var(--input-border); border-radius: 999px; background: var(--white); color: var(--text); padding: 9px 16px; font: 500 13px var(--sans); }
.share-networks a:hover, .share-networks button:hover { border-color: var(--text); text-decoration: none; }
.copy-row { display: flex; gap: 8px; margin-bottom: 12px; }
.copy-row input { margin: 0; flex: 1; min-width: 0; background: var(--blush-50); font-size: 15px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* Buttons */
.button, .nav-cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--white); font: 600 13px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 0 24px; text-align: center; }
.button:hover, .nav-cta:hover { background: #333; border-color: #333; color: var(--white); text-decoration: none; }
.button.secondary { background: var(--white); border-color: var(--input-border); color: var(--ink); }
.button.secondary:hover { background: var(--white); border-color: var(--ink); color: var(--ink); }
.button.small { min-height: 44px; padding: 0 18px; font: 500 14px/1 var(--sans); letter-spacing: 0; text-transform: none; }
.button.large { min-height: 52px; padding: 0 28px; font-size: 14px; }
.button.blush { background: var(--blush); border-color: var(--blush); color: var(--ink); }
.button.blush:hover { background: var(--blush-hover); border-color: var(--blush-hover); color: var(--ink); }
.button.ghost { background: transparent; border-color: #6b7080; color: var(--white); }
.button.ghost:hover { background: rgba(255, 255, 255, .08); border-color: var(--white); color: var(--white); }
.button svg { flex: none; }
.full { width: 100%; }

/* Auth */
.auth-card { max-width: 520px; margin: 20px auto; padding: 40px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 0 0 30px var(--blush-50); }
.auth-card h1 { font-size: 36px; margin-top: 10px; }
.auth-card > p { margin: 0 0 26px; }
.field { position: relative; display: block; margin: 0 0 26px; }
.field > span { position: absolute; top: -10px; left: 14px; padding: 0 8px; background: var(--white); font: 600 13px var(--sans); color: var(--text); letter-spacing: .5px; }
.field em { color: var(--danger); font-style: normal; }
.field input { margin: 0; }
.auth-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 18px; }
.auth-actions a { text-decoration: underline; font: 400 15px var(--sans); }
.auth-foot { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--input-border); }
.caps-link { color: var(--ink); text-decoration: underline; font: 500 13px var(--sans); letter-spacing: .1em; text-transform: uppercase; margin-left: 8px; }

/* Forms */
label { display: block; font: 600 14px var(--sans); color: var(--text); letter-spacing: .5px; margin: 0 0 20px; }
label small { display: block; font: 400 15px var(--serif); color: var(--muted); margin: 4px 0; letter-spacing: .3px; }
:where(input:not([type=checkbox]):not([type=radio]), select, textarea) { width: 100%; margin-top: 7px; padding: 12px 14px; background: var(--white); border: 1px solid var(--input-border); border-radius: 6px; color: var(--text); font: 400 17px var(--serif); outline: 0; }
:where(input, select, textarea):focus { border-color: var(--text); }
:where(input[type=file]) { padding: 10px; background: var(--blush-50); }
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 9px; margin: 10px 0; font-weight: 500; }
.check input { accent-color: var(--accent-ink); width: 16px; height: 16px; }
fieldset { border: 1px solid var(--input-border); margin: 0 0 20px; padding: 14px 18px; }
legend { padding: 0 8px; font: 700 12px var(--sans); letter-spacing: 2px; text-transform: uppercase; color: var(--ink); }
.hint { color: var(--muted); font-size: 16px; }

/* Admin */
.admin-nav { display: flex; gap: 4px; margin-bottom: 30px; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--input-border); }
.admin-nav a { padding: 12px 18px; color: var(--text); white-space: nowrap; font: 600 13px var(--sans); letter-spacing: 1.5px; text-transform: uppercase; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-nav a:hover { text-decoration: none; color: var(--ink); }
.admin-nav a.selected { border-bottom-color: var(--taupe); color: var(--ink); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-head h1 { font-size: 22px; letter-spacing: 3px; text-transform: uppercase; margin: 6px 0; }
.page-head p { margin: 4px 0 0; }
.panel { background: var(--white); border: 1px solid var(--line); }
.form-panel { max-width: 680px; padding: 30px; }
.form-panel.wide { max-width: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.form-actions { display: flex; align-items: center; gap: 20px; margin-top: 24px; }
.settings-form fieldset { padding: 18px 24px 22px; margin-bottom: 26px; }
.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li + li { border-top: 1px solid var(--line); }
.feature-list .check { align-items: flex-start; margin: 0; padding: 14px 0; }
.feature-list .check input { margin-top: 3px; flex: none; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font: 700 11px var(--sans); letter-spacing: 2px; text-transform: uppercase; color: var(--ink); background: var(--blush-50); }
td { color: var(--text); font-size: 17px; }
td strong { font: 500 15px var(--sans); color: var(--ink); }
td small { display: block; color: var(--muted); margin-top: 2px; font-size: 14px; }
tr:last-child td { border-bottom: 0; }
.actions { white-space: nowrap; text-align: right; }
.actions a, .actions form { display: inline-block; margin-left: 14px; font: 500 13px var(--sans); letter-spacing: 1px; text-transform: uppercase; }
.danger-link { border: 0; background: none; padding: 0; color: var(--danger); font: inherit; letter-spacing: inherit; text-transform: inherit; }
.status { display: inline-block; font: 600 11px var(--sans); letter-spacing: 1px; text-transform: uppercase; padding: 4px 8px; background: var(--blush-50); color: var(--text); }
.status.published { background: #e6f0e1; color: #3d5f2c; }
.status.failed { background: #fbeeee; color: #8c2f2f; }
.status.processing { background: var(--blush); color: var(--ink); }
.status-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.status-chips .chip span { color: var(--faint); font-weight: 500; margin-left: 4px; }
.status-chips .chip.active span { color: var(--ink); }
.filters { display: grid; grid-template-columns: 2fr repeat(4, minmax(130px, 1fr)) auto; gap: 14px; align-items: end; padding: 18px 20px; margin-bottom: 14px; }
.filters label { margin: 0; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.filters input, .filters select { margin-top: 6px; padding: 9px 10px; font-size: 16px; }
.filter-actions { display: flex; align-items: center; gap: 14px; padding-bottom: 2px; font: 500 13px var(--sans); }
.result-count { margin: 0 0 10px; font-size: 15px; }
.conversion { display: inline-flex; flex-direction: column; gap: 6px; min-width: 150px; }
.status .spinner { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
.progress-track { display: block; height: 4px; background: var(--band); overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--taupe); transition: width .6s ease; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .status .spinner { animation: none; } }
.table-video { display: flex; gap: 12px; align-items: center; min-width: 200px; }
.table-video img { width: 84px; aspect-ratio: 16 / 9; object-fit: cover; }
.poster-preview { width: 240px; display: block; margin: -6px 0 20px; }
.publish { padding: 12px 0; }
.membership-form { display: flex; gap: 10px; align-items: flex-end; }
.membership-form select, .membership-form input { margin: 0; max-width: 240px; }
.upload-progress { margin: -6px 0 20px; }
.upload-progress small { display: block; color: var(--muted); margin-top: 7px; }
.upload-track { height: 6px; background: var(--band); overflow: hidden; }
.upload-track span { display: block; width: 0; height: 100%; background: var(--taupe); transition: width .2s; }

/* Statistics */
.period-chips { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { border: 1px solid var(--line); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi-label { font: 600 11px var(--sans); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.kpi-value { font: 700 30px/1.1 var(--sans); color: var(--ink); letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.kpi-change { font: 500 13px var(--sans); color: var(--muted); }
.chart-panel { padding: 20px 22px; margin-bottom: 22px; }
.chart-title { font-size: 13px; letter-spacing: 2.5px; text-transform: uppercase; margin: 0 0 4px; }
.chart-note { margin: 0 0 12px; font-size: 15px; }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--input-border); stroke-width: 1; }
.chart .tick { font: 500 11px var(--sans); fill: var(--muted); }
.chart .bar { fill: #b5654a; }
.chart .hit { fill: transparent; }
.chart .bar-group.hover .hit { fill: var(--blush-50); }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--white); font: 500 13px var(--sans); padding: 6px 10px; white-space: nowrap; }
.chart-table { margin-top: 12px; }
.chart-table summary { cursor: pointer; font: 600 12px var(--sans); letter-spacing: 1px; text-transform: uppercase; color: var(--text); }
.chart-table table { margin-top: 8px; max-width: 420px; }
.chart-table td, .chart-table th { padding: 6px 10px; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.stats-grid .panel { padding: 20px 22px; }
.stats-grid td { font-size: 16px; }
.mini-meter { display: inline-block; width: 60px; height: 6px; background: var(--band); vertical-align: middle; margin-right: 6px; position: relative; }
.mini-meter::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--value); background: #b5654a; }
@media (max-width: 960px) { .stats-grid { grid-template-columns: 1fr; } }

.subtitles-admin { margin-top: 24px; }
.subtitles-admin table { margin-bottom: 18px; }
.subtitle-forms h3 { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; margin: 0 0 12px; }
.subtitle-forms .new-playlist-row label { flex: 1; }

/* Home */
.home-hero { background: var(--blush-50); border-bottom: 1px solid var(--blush-line); }
.home-hero-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 56px; padding-bottom: 64px; }
.home-hero-media { flex: 7 1 520px; min-width: 0; position: relative; aspect-ratio: 16 / 9; background: var(--navy); border-radius: 8px; overflow: hidden; display: grid; place-items: center; }
.home-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: filter .2s ease; }
.home-hero-media:hover img { filter: brightness(1.06); }
.hero-badge { position: absolute; top: 20px; left: 20px; background: var(--blush); color: #3a2a24; font: 600 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; padding: 6px 10px; border-radius: 3px; }
.hero-play { position: relative; width: 88px; height: 88px; border-radius: 50%; background: var(--white); color: var(--ink); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.home-hero-media .duration { right: 16px; bottom: 16px; font-size: 13px; padding: 4px 8px; }
.home-hero-text { flex: 5 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.home-hero-text h1 { margin: 0; font: 500 clamp(34px, 4vw, 52px)/1.04 var(--serif); letter-spacing: -.01em; }
.home-hero-text h1 a { color: var(--ink); }
.home-hero-text h1 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.home-hero-summary { margin: 0; font: 400 20px/1.5 var(--serif); color: #4a4340; }
.meta-line { display: flex; flex-wrap: wrap; gap: 8px 0; margin: 0; font-size: 14px; color: var(--muted); }
.meta-line span + span::before { content: "·"; margin: 0 12px; }
.home-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.home-hero-actions form { margin: 0; }
.category-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.category-tile { display: flex; flex-direction: column; justify-content: space-between; min-height: 168px; padding: 24px; border-radius: 8px; background: var(--tone); color: var(--tone-ink); }
.category-tile:hover { color: var(--tone-ink); text-decoration: none; filter: brightness(1.06); }
.category-tile-number { font: 600 11px var(--sans); letter-spacing: .18em; opacity: .85; }
.category-tile-name { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; font: 500 34px/1 var(--serif); }
.category-tile-name svg { flex: none; transition: transform .15s ease; }
.category-tile:hover .category-tile-name svg { transform: translateX(4px); }
.store-band { background: var(--navy); color: var(--white); }
.store-band-inner { max-width: 1920px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 32px 56px; padding-top: 72px; padding-bottom: 72px; }
.store-band-inner > div:first-child { flex: 0 1 680px; display: flex; flex-direction: column; gap: 14px; }
.store-band .eyebrow { color: #e3ccc2; }
.store-band h2 { margin: 0; color: var(--white); font: 400 44px/1.1 var(--serif); }
.store-band p { margin: 0; max-width: 620px; font: 400 20px/1.5 var(--serif); color: #d9d3cf; }
.store-band-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Watch page extras */
.watch-actions .button.small { gap: 8px; }
.up-next-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.up-next-head h2 { margin: 0; font-size: 26px; }
.autoplay-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0; background: none; border: 0; color: var(--cocoa); font: 500 13px var(--sans); }
.switch-track { position: relative; width: 40px; height: 24px; border-radius: 999px; background: #cfc4be; transition: background .2s; }
.switch-track span { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); transition: left .2s; }
.autoplay-switch[aria-checked="true"] .switch-track { background: var(--ink); }
.autoplay-switch[aria-checked="true"] .switch-track span { left: 19px; }

/* Footer */
.footer { background: var(--white); color: #636363; font-family: var(--serif); border-top: 1px solid var(--line); }
.footer-band { background: var(--blush); color: #5a5a5a; }
.footer-columns { max-width: 1920px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; padding-top: 64px; padding-bottom: 56px; }
.footer-columns h3 { margin: 0 0 18px; font: 600 13px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.footer-columns ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.footer-columns a { color: #4f4f4f; }
.footer-columns a:hover { color: var(--ink); }
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.footer-brand img { width: 92px; height: 92px; display: block; }
.footer-motto { font: 500 13px var(--sans); letter-spacing: .14em; color: #3a3a3a; }
.footer-columns .footer-social { flex-direction: row; gap: 4px; }
.footer-social a { width: 44px; height: 44px; display: grid; place-items: center; color: #3a3a3a; }
.footer-bottom { max-width: 1920px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; font-size: 15px; color: #6e6e6e; }

/* Responsive */
@media (max-width: 1280px) {
    .watch-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; }
    .video-card.compact .thumb { width: 140px; }
}
@media (max-width: 1100px) {
    .watch-layout { grid-template-columns: 1fr; }
    .up-next { max-width: 760px; }
}
@media (max-width: 960px) {
    .container { padding: 0 20px; }
    .topbar { position: static; }
    .topbar-row { padding: 12px 16px; gap: 12px 16px; }
    .menu-toggle { margin-right: -8px; }
    .brand img { width: 44px; height: 44px; }
    .brand-name { font-size: 26px; }
    .search { order: 3; flex-basis: 100%; max-width: none; }
    .search-key { display: none; }
    .main { padding: 28px 0 64px; }
    .form-grid { grid-template-columns: 1fr; gap: 0; }
    .filters { grid-template-columns: 1fr 1fr; }
    .filter-search { grid-column: 1 / -1; }
    .new-playlist.inline { grid-template-columns: 1fr; }
    .playlist-head { flex-direction: column; }
    .page-head { flex-direction: column; align-items: flex-start; }
    .home-hero-inner { padding-top: 32px; padding-bottom: 40px; gap: 28px; }
    .store-band-inner { padding-top: 48px; padding-bottom: 48px; }
    .store-band h2 { font-size: 34px; }
    .watch-title { font-size: 32px; }
    .description-box { padding: 22px 20px; }
}
@media (max-width: 640px) {
    html { font-size: 17px; }
    h1 { font-size: 34px; }
    .series-head { flex-direction: column; }
    .series-head img { max-width: 100%; width: 100%; }
    .episode-list .video-card.compact .thumb { width: 136px; }
    .store-link span, .account-name { display: none; }
    .pill-button { padding: 0 14px; }
    .account-links { gap: 8px; }
    .video-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 28px 20px; box-shadow: none; margin: 10px 0; }
    .form-panel { padding: 20px; }
    .video-card.compact .thumb { width: 136px; }
    .home-section-head h2 { font-size: 30px; }
    .category-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .category-tile { min-height: 112px; padding: 18px; }
    .category-tile-name { font-size: 26px; }
    .sort-control { flex-wrap: wrap; }
    .segmented { overflow-x: auto; max-width: 100%; }
}

/* Grid items with actions (playlists, history) and "Naloži več" */
.grid-item { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.grid-item-actions { display: flex; align-items: center; gap: 6px; }
.grid-item-actions form { margin: 0; }
.grid-item-note { flex: 1; font-size: 13px; color: var(--muted); }
.icon-button { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--input-border); border-radius: 999px; background: var(--white); color: var(--ink); }
.icon-button svg { fill: none; stroke: currentColor; stroke-width: 1.7; }
.icon-button:hover { border-color: var(--ink); }
.list-more { margin-top: 48px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.list-more .pager { margin-top: 0; }
.tv-badge { display: inline-flex; flex-direction: column; align-items: center; padding: 4px 10px 3px; border: 2px solid #3a3a3a; border-radius: 3px; color: #3a3a3a; line-height: 1; }
.tv-badge:hover { color: var(--ink); border-color: var(--ink); text-decoration: none; }
.tv-badge span:first-child { font: 500 26px var(--sans); }
.tv-badge span:last-child { font: 500 11px var(--sans); letter-spacing: .3em; margin-top: 3px; }
.footer-bottom a { color: #6e6e6e; text-decoration: underline; }

/* Header on narrower screens: the store link keeps only its icon, on phones it lives in the menu. */
@media (max-width: 1279px) {
    .topbar-row { gap: 12px 24px; }
    .search { flex-basis: 240px; }
    .store-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .store-link { width: 44px; justify-content: center; }
}
@media (max-width: 640px) {
    .account-links { margin-left: auto; }
    .store-link { display: none; }
    .brand { gap: 10px; }
    .brand img { width: 40px; height: 40px; }
    .brand-name { font-size: 24px; }
    .pill-button > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .pill-button { width: 44px; padding: 0; justify-content: center; }
}
@media (max-width: 960px) { .search { flex-basis: 100%; } .account-links { margin-left: auto; } }

/* Category: six videos in a row on wide screens (24 per page divides into 6, 4, 3 and 2 columns). */
.app-main .main > .container { container-type: inline-size; }
@container (min-width: 1000px) {
    .video-grid--six { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 36px 20px; }
    .video-grid--six .card-title { font-size: 18px; }
    .video-grid--six .card-category { font-size: 10px; }
}
@container (min-width: 720px) and (max-width: 999px) {
    .video-grid--six { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 20px; }
    .video-grid--six .card-title { font-size: 18px; }
}
.list-more.is-infinite .pager { display: none; }
/* The browser must not keep the view pinned to the bottom, or every appended page would trigger the next one. */
.list-more, .footer { overflow-anchor: none; }
