:root {
    color-scheme: dark;
    --primary: #d8b56f;
    --primary-dark: #a78042;
    --secondary: #a16c43;
    --accent: #e1bf7c;
    --dark: #17130e;
    --darker: #0c0c0b;
    --light: #f4eee2;
    --gray: #c0b299;
    --border: #675337;
    --card-bg: #211a13;
    --card-shadow: 0 12px 30px #00000030;
    --transition: 180ms ease;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 110px; }
body { margin: 0; background: #090909; color: var(--light); font: 16px/1.6 'Segoe UI', Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
a { color: inherit; }
button, a, input, select, textarea, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid #efcd83; outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
.container { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 100; background: #0e0d0bf5; border-bottom: 3px solid #8e7243; }
.header-content { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 88px; }
.logo { display: inline-flex; align-items: baseline; flex-shrink: 0; color: var(--light); text-decoration: none; font-size: 27px; font-weight: 650; letter-spacing: -1.1px; }
.logo span { color: var(--accent); }
nav ul { display: flex; align-items: center; gap: 6px; list-style: none; padding: 0; margin: 0; }
nav a { display: block; border: 2px solid transparent; border-radius: 6px; text-decoration: none; padding: 8px 12px; font-size: 14px; color: #c8baa2; transition: color var(--transition), background var(--transition); }
nav a:hover { background: #282016; color: #f2dba9; }
nav a.active { color: #ecd2a0; border-color: #887043; background: #272014; }
nav a[data-page="add"] { background: #d8b56f; color: #21180a; font-weight: 600; }
main.container { padding-block: 32px 0; }
.page { display: none; }
.page.active { display: block; animation: page-in 220ms ease-out; }
@keyframes page-in { from { opacity: .5; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.page-title { font-size: clamp(28px, 3.5vw, 38px); font-weight: 500; line-height: 1.2; letter-spacing: -1px; margin: 12px 0 28px; }
.eyebrow { color: #ddbb7c; font-size: 11px; font-weight: 600; line-height: 1.8; letter-spacing: 2.2px; text-transform: uppercase; }
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 42px 38px 32px; border: 2px solid #544126; border-bottom: 4px solid #987642; border-radius: 12px; background: radial-gradient(ellipse at 90% 50%, #58351d90, transparent 61%), linear-gradient(110deg, #0b0b0a 15%, #17120d 64%, #24190f); }
.hero-copy { position: relative; z-index: 1; width: 55%; }
.hero .eyebrow { margin-bottom: 22px; }
.hero h1 { font-size: clamp(40px, 5vw, 62px); font-weight: 500; line-height: 1.08; letter-spacing: -2.2px; margin-bottom: 23px; }
.hero h1 em { font-family: Georgia, serif; font-weight: 400; color: #e0ba72; }
.hero-description { max-width: 350px; color: #c2b6a4; font-size: 15px; line-height: 1.75; margin-bottom: 0; }
.hero-bottom { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 29px; }
.hero-bottom small { font-size: 10px; letter-spacing: 1.6px; color: #bfa577; }
.theater-screen { position: absolute; z-index: 0; width: 36%; height: 235px; right: 45px; top: 50px; border-radius: 10px; transform: perspective(850px) rotateY(var(--screen-tilt, -7deg)); transition: transform 500ms ease; background: radial-gradient(ellipse at 64% 45%, #e7c58d 0%, #b9874e 8%, #634320 21%, #312219 44%, #10100e 73%); border: 4px solid #b18f51; box-shadow: 0 0 0 8px #0c0b09, 0 0 0 11px #584527, 0 0 75px #ba7e3b35, 0 35px 48px #00000099; overflow: hidden; }
.theater-screen::before, .theater-screen::after { content: ''; position: absolute; border-radius: 50%; }
.theater-screen::before { width: 135%; height: 125%; top: 37%; left: -25%; border: 12px solid #d2af72; background: linear-gradient(160deg, #7b522c, #17140f 60%); box-shadow: 0 -6px 27px #e8c18580; transform: rotate(-25deg); }
.theater-screen::after { width: 118%; height: 103%; top: 48%; left: 18%; background: linear-gradient(150deg, #a57643, #2a2016 45%, #0c0c0b 75%); box-shadow: 0 -4px 0 #d2ae6a80; transform: rotate(24deg); }
.home-toolbar { display: flex; gap: 20px; align-items: center; justify-content: space-between; margin-top: 25px; padding-bottom: 19px; border-bottom: 3px solid #52432c; }
.collection-tabs { display: flex; gap: 5px; background: #17130e; padding: 4px; border: 2px solid #75603d; border-radius: 8px; }
.collection-tabs a { padding: 9px 15px; color: #c9bda8; border-radius: 4px; text-decoration: none; font-size: 14px; font-weight: 600; }
.collection-tabs a:first-child { color: #21190d; background: linear-gradient(115deg, #dabb7f, #c09b59); }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; margin: 27px 0 20px; }
.section-heading h2 { font-size: 25px; font-weight: 500; letter-spacing: -.6px; margin: 0; }
.section-heading span { font-size: 12px; color: #c1b197; text-align: right; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; max-width: 100%; min-height: 44px; border: 2px solid #e9cd90; border-radius: 7px; padding: 10px 18px; color: #21180a; background: linear-gradient(110deg, #e1bf7b, #ba914e); font-size: 14px; font-weight: 600; text-decoration: none; box-shadow: 0 3px 0 #604621; transition: transform var(--transition), background var(--transition); }
.btn:hover { transform: translateY(-2px); }
.btn-outline { color: #e6c990; background: #211a11; border-color: #8c7145; box-shadow: none; }
.btn-danger { color: #f0c5a8; background: #3c241b; border-color: #976449; box-shadow: none; }
.btn-small { font-size: 12px; padding: 8px 10px; min-height: 40px; }
.form-container { max-width: 830px; margin: 0 auto; padding: 30px; border: 2px solid #715934; border-radius: 12px; background: linear-gradient(130deg, #251c13, #141310); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.form-group { min-width: 0; }
.full-width { grid-column: 1 / -1; }
label, .field-label { display: block; margin-bottom: 8px; font-weight: 500; color: #d9c6a1; font-size: 14px; }
input, select, textarea { width: 100%; min-width: 0; border: 2px solid #6c5738; border-radius: 7px; padding: 11px 13px; color: var(--light); background: #100f0c; font-size: 16px; }
input::placeholder, textarea::placeholder { color: #a99c87; opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: #e1bf7c; }
textarea { min-height: 125px; resize: vertical; }
select option { color: var(--light); background: #211a13; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 25px; }
.form-actions .btn { flex: 1 1 180px; }
.rating-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.rating-field legend { padding: 0; }
.rating { display: flex; flex-direction: row-reverse; justify-content: flex-end; position: relative; gap: 2px; }
.rating input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.rating label { display: grid; place-items: center; min-width: 40px; min-height: 44px; font-size: 30px; color: #85734f; margin: 0; cursor: pointer; }
.rating input:checked ~ label, .rating label:hover, .rating label:hover ~ label { color: #edc775; }
.rating input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.movies-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; align-items: start; }
.movie-card { min-width: 0; padding: 7px; border: 2px solid #5c482d; border-radius: 10px; background: linear-gradient(155deg, #302116, #171411); transition: border-color var(--transition), box-shadow var(--transition); }
.movie-card:nth-child(4n + 2) { background: linear-gradient(155deg, #242620, #141613); border-color: #5b5b42; }
.movie-card:nth-child(4n + 3) { background: linear-gradient(155deg, #35231b, #171311); border-color: #6e4b31; }
.movie-card:nth-child(4n + 4) { background: linear-gradient(155deg, #252620, #141413); border-color: #5c5844; }
.movie-card:hover { border-color: #dabb7d; box-shadow: 0 0 24px #c699421c; }
.movie-poster { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; display: block; border: 2px solid #b4914b44; border-radius: 5px; background: #18140d; }
.movie-info { padding: 12px 6px 6px; }
.movie-title { font-size: 16px; line-height: 1.4; font-weight: 600; margin: 0 0 8px; overflow-wrap: anywhere; }
.movie-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--gray); }
.movie-rating { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px; margin-top: 10px; font-size: 12px; color: #e9c777; }
.stars { letter-spacing: 2px; font-size: 17px; }
.movie-genre { font-size: 12px; color: var(--gray); margin-top: 5px; overflow-wrap: anywhere; }
.movie-details { margin-top: 14px; border-top: 2px solid #655033; padding-top: 10px; }
.movie-details summary { color: #ddc598; font-size: 12px; min-height: 30px; }
.movie-comment { font-size: 14px; line-height: 1.65; color: #d1c1a9; margin: 10px 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.movie-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.movie-actions .btn { flex: 1 1 110px; }
.filters { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; padding: 22px; border: 2px solid #5e4b2e; border-radius: 10px; background: #1b160f; }
.filter-group { flex: 1 1 150px; min-width: 0; }
.filter-group:last-child { flex-grow: 0; }
.search-container { position: relative; margin-bottom: 22px; }
.search-input { padding-left: 42px; }
.search-icon { position: absolute; top: 50%; left: 15px; transform: translateY(-50%); color: #c9ad75; pointer-events: none; }
.home-toolbar .search-container { width: 260px; max-width: 100%; margin: 0; }
.search-results { display: none; position: absolute; z-index: 20; top: calc(100% + 6px); width: 100%; max-height: 380px; overflow-y: auto; border: 2px solid #967947; border-radius: 8px; background: #16120d; box-shadow: 0 15px 35px #00000080; }
.search-result-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 0; border-bottom: 1px solid #4f3e26; text-align: left; color: var(--light); background: #16120d; font-size: 14px; }
button.search-result-item:hover { background: #352819; }
.search-result-poster { flex-shrink: 0; width: 42px; height: 63px; object-fit: cover; border-radius: 4px; }
.search-result-info { min-width: 0; }
.search-result-title { font-weight: 600; overflow-wrap: anywhere; }
.search-result-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--gray); }
.kp-rating { color: var(--accent); }
.api-info { margin-bottom: 20px; color: #c7b89e; font-size: 14px; line-height: 1.7; }
.api-info i { color: var(--accent); margin-right: 6px; }
.empty-state { grid-column: 1 / -1; padding: 45px 24px; text-align: center; border: 2px solid #59462a; border-radius: 12px; background: radial-gradient(ellipse at top, #36261975, transparent 70%), #12110e; color: #bfae90; }
.empty-state > i { font-size: 32px; color: #d1ab65; margin-bottom: 20px; }
.empty-state h3 { color: #f0e1c6; font-size: 22px; font-weight: 500; margin-bottom: 10px; }
.empty-state p { margin-bottom: 0; }
.watchlist-item { display: flex; align-items: center; gap: 20px; padding: 17px; margin-bottom: 14px; border: 2px solid #655031; border-radius: 10px; background: linear-gradient(105deg, #2a2015, #151410); }
.watchlist-poster { width: 64px; height: 96px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
.watchlist-info { flex: 1; min-width: 0; }
.watchlist-title { font-weight: 600; overflow-wrap: anywhere; }
.watchlist-meta { color: var(--gray); font-size: 13px; overflow-wrap: anywhere; }
.watchlist-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.watchlist-add { margin-bottom: 25px; border: 2px solid #75603d; border-radius: 10px; background: #1b160f; }
.watchlist-add > summary { padding: 15px 20px; font-weight: 500; color: #e2c895; }
.watchlist-add .form-container { border: 0; max-width: none; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.stat-card { padding: 26px; background: linear-gradient(140deg, #2b2015, #151410); border: 2px solid #695231; border-radius: 10px; }
.stat-value { font-family: Georgia, serif; font-size: 42px; line-height: 1.2; color: #e0ba72; margin-bottom: 12px; overflow-wrap: anywhere; }
#favorite-genre { font-size: 30px; }
.stat-label { color: #c5b391; font-size: 14px; }
.genre-stats { display: grid; gap: 18px; max-width: 800px; margin: 25px auto 0; }
.genre-row { display: grid; grid-template-columns: minmax(100px, 160px) minmax(0, 1fr) 32px; align-items: center; gap: 18px; font-size: 14px; }
.genre-name { overflow-wrap: anywhere; }
.genre-track { height: 9px; background: #2c2418; border-radius: 6px; overflow: hidden; }
.genre-fill { height: 100%; background: linear-gradient(90deg, #95713c, #dfbd77); border-radius: inherit; }
.genre-count { text-align: right; font-variant-numeric: tabular-nums; color: #cbb995; }
.modal { color: var(--light); background: #1b150e; border: 2px solid #a28551; border-radius: 12px; padding: 0; width: min(500px, calc(100% - 32px)); max-height: calc(100% - 40px); box-shadow: 0 25px 80px #000; }
.modal::backdrop { background: #000000b8; backdrop-filter: blur(6px); }
.modal-content { padding: 28px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.modal-title { font-size: 23px; color: #e0bd7d; font-weight: 500; margin: 0; }
.close-modal { flex-shrink: 0; width: 44px; height: 44px; background: #2e2417; color: #e7cf9e; border: 2px solid #8c7145; border-radius: 6px; font-size: 24px; }
.notification-stack { position: fixed; bottom: 24px; right: 24px; z-index: 200; width: min(380px, calc(100% - 32px)); pointer-events: none; }
.notification { padding: 16px 20px; margin-top: 10px; border: 2px solid #aa8b50; border-radius: 8px; color: #f4e5c8; background: #2a2114; box-shadow: 0 8px 30px #00000080; font-size: 14px; }
.notification.error { border-color: #c58864; background: #362117; }
.spinner { width: 20px; height: 20px; border: 3px solid #584729; border-top-color: #e1bf7c; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
footer { margin-top: 45px; color: #ae9c7b; font-size: 12px; }
.footer-content { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 3px solid #53422b; padding-block: 24px 32px; }
.footer-content p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 1050px) { .header-content { flex-wrap: wrap; gap: 10px; padding-block: 17px; } .movies-grid { gap: 16px; } .hero-bottom small { max-width: 210px; text-align: right; } .movie-title { font-size: 14px; } }
@media (max-width: 800px) {
    .container { width: calc(100% - 40px); }
    .site-header { position: static; }
    .header-content { justify-content: center; }
    nav { width: 100%; }
    nav ul { justify-content: center; flex-wrap: wrap; }
    nav a { font-size: 13px; padding: 8px 10px; }
    main.container { padding-top: 22px; }
    .hero { padding: 32px 25px; }
    .hero h1 { font-size: 43px; }
    .hero-copy { width: 55%; }
    .theater-screen { right: 26px; top: 71px; height: 195px; width: 35%; }
    .hero-bottom small { display: none; }
    .movies-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    .home-toolbar { flex-wrap: wrap; gap: 14px; }
    .home-toolbar .search-container { flex: 1 1 200px; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .watchlist-item { flex-wrap: wrap; }
    .watchlist-actions { margin-left: 84px; }
}
@media (max-width: 560px) {
    .container { width: calc(100% - 32px); }
    nav a { font-size: 12px; padding: 7px 8px; }
    .hero { display: flex; flex-direction: column; padding: 28px 20px; }
    .hero-copy { width: 100%; }
    .hero h1 { font-size: 40px; letter-spacing: -1.4px; }
    .hero .eyebrow { font-size: 10px; letter-spacing: 1.6px; }
    .hero-description { font-size: 14px; }
    .hero-bottom { order: 1; margin-top: 23px; }
    .theater-screen { position: relative; order: 2; width: calc(100% - 24px); height: auto; aspect-ratio: 1.85; top: auto; right: auto; margin: 33px 12px 10px; transform: none; }
    .home-toolbar { align-items: stretch; flex-direction: column; }
    .home-toolbar .search-container { width: 100%; flex: none; }
    .collection-tabs { align-self: flex-start; }
    .collection-tabs a { font-size: 12px; padding: 9px 10px; }
    .section-heading h2 { font-size: 22px; }
    .section-heading span { max-width: 90px; }
    .movies-grid { gap: 14px 12px; }
    .movie-card { padding: 5px; }
    .movie-info { padding: 10px 3px 4px; }
    .movie-title { font-size: 13px; }
    .movie-meta, .movie-genre { font-size: 11px; }
    .stars { font-size: 14px; letter-spacing: 1px; }
    .movie-details summary { font-size: 11px; min-height: 44px; }
    .form-container { padding: 21px 17px; }
    .form-grid { grid-template-columns: 1fr; gap: 20px; }
    .filters { padding: 16px; gap: 14px; }
    .filter-group { flex-basis: 100%; }
    .filter-group:last-child { flex-grow: 1; }
    .filter-group .btn { width: 100%; }
    .stat-card { padding: 20px 16px; }
    .stat-value { font-size: 34px; }
    #favorite-genre { font-size: 24px; }
    .stat-label { font-size: 12px; }
    .genre-row { grid-template-columns: 95px minmax(0, 1fr) 24px; gap: 12px; font-size: 12px; }
    .watchlist-item { gap: 14px; padding: 14px; }
    .watchlist-actions { margin-left: 0; width: 100%; }
    .watchlist-actions .btn:first-child { flex: 1; }
    .empty-state { padding: 32px 18px; }
    .empty-state h3 { font-size: 20px; }
    .modal-content { padding: 22px; }
    .modal-title { font-size: 21px; }
    .notification-stack { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .theater-screen, .btn:hover { transform: none; }
}

/* Personal cinema center */
body { background: radial-gradient(ellipse at 100% 10%, #33221540, transparent 55%), #090909; }
button { color: inherit; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 500; padding: 12px 18px; background: #e1bf7c; color: #17120a; border-radius: 4px; }
.skip-link:focus { top: 8px; }
.site-header .header-content { min-height: 86px; flex-wrap: nowrap; }
.global-search { position: relative; flex: 1; max-width: 520px; margin: 0; }
.global-search input { padding-right: 40px; background: #191610; font-size: 14px; }
.global-search kbd { position: absolute; right: 14px; top: 11px; padding: 0 5px; color: #9c8b6b; border: 1px solid #6c5738; border-radius: 3px; font-size: 12px; }
.primary-nav { display: flex; gap: 9px; padding: 0 0 13px; flex-wrap: wrap; }
.primary-nav a { padding: 7px 15px; font-size: 13px; }
.primary-nav a.active { border-color: #9b7b44; color: #f1d7a3; background: #302514; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 2px 0 27px; }
.page-heading .eyebrow { margin-bottom: 8px; }
.page-heading .page-title { margin: 0 0 12px; }
.page-description { margin: 0; color: #bdaa89; max-width: 680px; font-size: 14px; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.center-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 35px; border: 2px solid #71532d; border-bottom-width: 4px; border-radius: 12px; background: radial-gradient(ellipse at 100% 60%, #65401e90, transparent 60%), #11100d; }
.center-hero h1 { font-size: clamp(28px, 3.4vw, 41px); font-weight: 500; line-height: 1.2; letter-spacing: -1.1px; margin: 10px 0 14px; }
.center-hero h1 em { font-family: Georgia, serif; font-weight: 400; color: #dfb972; }
.center-hero p:last-child { margin: 0; font-size: 14px; color: #bdab8d; }
.mini-screen { position: relative; flex: 0 0 25%; aspect-ratio: 1.85; border: 3px solid #b6924d; border-radius: 7px; box-shadow: 0 0 0 6px #11100d, 0 0 0 9px #574124, 0 0 40px #cba45420; background: linear-gradient(20deg,#392b18,#8a6937 44%,#bca16b 45%,#41321c 51%,#17140d 77%); transform: rotate(-3deg); }
.quick-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin: 23px 0 31px; }
.quick-stats a, .quick-stats button { position: relative; padding: 21px; text-align: left; border: 2px solid #5e4829; border-radius: 9px; background: linear-gradient(135deg,#2b2115,#14130f); text-decoration: none; transition: border-color 180ms ease; }
.quick-stats > :nth-child(2) { background: linear-gradient(135deg,#24291f,#131510); border-color: #55573d; }
.quick-stats > :nth-child(3) { background: linear-gradient(135deg,#322219,#17110d); border-color: #705133; }
.quick-stats > :nth-child(4) { background: linear-gradient(135deg,#29271f,#151410); border-color: #635b3d; }
.quick-stats > :hover { border-color: #d9b56e; }
.quick-stats strong { display: block; color: #dfbb75; font-family: Georgia, serif; font-size: 35px; font-weight: 400; line-height: 1.1; }
.quick-stats span { display: block; color: #c4b596; font-size: 12px; margin-top: 9px; }
.quick-stats b { position: absolute; top: 15px; right: 17px; color: #9e8458; font-weight: 400; }
.home-columns { display: grid; grid-template-columns: 1.1fr 1fr; gap: 35px; margin-top: 16px; }
.text-link, .text-button { color: #d5b882; background: transparent; border: 0; font-size: 13px; padding: 4px 0; text-decoration: none; text-align: left; }
.text-link:hover, .text-button:hover { color: #ffe0a0; text-decoration: underline; }
.small { font-size: 12px; }
.muted { color: #bcac8c; }
.spaced { margin-top: 22px; }
.inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 15px; }
.title-button { display: block; padding: 0; border: 0; background: transparent; text-align: left; color: #f0e7d7; font-size: 16px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.title-button:hover { color: #e3be75; }
.poster-button { width: 100%; display: block; padding: 0; border: 0; background: transparent; border-radius: 6px; overflow: hidden; }
.poster-button img { transition: filter 180ms ease; }
.poster-button:hover img { filter: brightness(1.12); }
.card-title-row { display: flex; gap: 9px; justify-content: space-between; align-items: flex-start; min-height: 44px; margin-bottom: 6px; }
.select-card { margin: 0; padding: 2px; flex-shrink: 0; }
.select-card input { width: 19px; height: 19px; margin: 0; accent-color: #d4ae60; }
.card-rating { display: flex; gap: 7px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 12px; }
.card-rating select { font-size: 12px; color: #e7c47d; padding: 6px; width: 105px; border-color: #6b542e; }
.card-rating > span { color: #b6a585; font-size: 11px; }
.card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 13px; padding-top: 10px; border-top: 2px solid #534228; font-size: 12px; color: #bead8c; }
.card-bottom .text-button { font-size: 12px; }
.movie-card { position: relative; }
.movie-list { grid-template-columns: 1fr; }
.list-card { display: flex; align-items: center; gap: 20px; padding: 13px; }
.list-card .poster-button { width: 75px; flex-shrink: 0; }
.list-card .movie-info { flex: 1; min-width: 0; padding: 0; }
.list-card .card-title-row { min-height: 0; }
.list-card .card-bottom { border: 0; margin-top: 2px; padding-top: 0; }
.library-toolbar { display: flex; gap: 20px; justify-content: space-between; margin-bottom: 18px; }
.library-toolbar > input { max-width: 490px; }
.view-switch { display: flex; align-items: center; gap: 4px; padding: 4px; border: 2px solid #6f5733; background: #19150e; border-radius: 7px; }
.small-choice, .view-switch a { display: inline-block; white-space: nowrap; border: 0; border-radius: 4px; background: transparent; color: #c6b796; padding: 9px 12px; font-size: 13px; text-decoration: none; }
.small-choice[aria-pressed="true"] { background: #d4b473; color: #21180a; }
.filter-panel { background: #17140e; border: 2px solid #69512e; border-radius: 9px; }
.filter-panel > summary { padding: 15px 19px; color: #e5c890; }
.filter-panel > summary span { margin-left: 12px; }
.filter-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 17px; padding: 7px 20px 20px; }
.filter-grid input, .filter-grid select { font-size: 14px; }
.filter-panel > p { padding: 0 20px 16px; margin: 0; }
.field-hint { font-size: 12px; color: #b7a789; margin: 9px 0 0; }
.form-error { font-size: 14px; color: #f0b58f; }
.form-error:empty { display: none; }
.preset-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; margin: 17px 0; }
.preset-bar > select { width: 245px; max-width: 100%; font-size: 13px; }
.sort-label { display: flex; gap: 9px; align-items: center; margin: 0 0 0 auto; font-size: 12px; }
.sort-label select { width: 180px; font-size: 13px; }
.tag-row, .preset-shortcuts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tag { border: 1px solid #81653a; border-radius: 5px; padding: 6px 10px; color: #d7bd8d; background: #292013; font-size: 12px; overflow-wrap: anywhere; max-width: 100%; }
.tag:hover { border-color: #e0bb76; }
.preset-shortcuts { margin-bottom: 20px; }
.result-count { color: #bdaa88; font-size: 13px; margin: 20px 0 16px; }
.selection-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 17px; padding: 14px 18px; border: 2px solid #bd9955; background: #352713; border-radius: 8px; margin-top: 18px; font-size: 14px; }
.diary-toolbar { display: flex; align-items: center; gap: 24px; margin-bottom: 25px; }
.diary-toolbar label { display: flex; align-items: center; gap: 14px; margin: 0; }
.diary-toolbar select { width: 230px; }
.timeline-row { display: flex; gap: 25px; padding: 22px 0; border-top: 2px solid #4e3d24; }
.timeline-date { width: 155px; flex-shrink: 0; color: #c4a670; font-size: 13px; }
.timeline-body { min-width: 0; flex: 1; }
.timeline-body .small { margin-top: 7px; }
.view-note { color: #d0c0a1; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.75; margin: 13px 0 0; }
.home-columns .timeline-row { gap: 17px; }
.home-columns .timeline-date { width: 105px; font-size: 12px; }
.quote-filters { display: flex; gap: 16px; margin-bottom: 20px; }
.quote-filters > select { max-width: 280px; }
.quote-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; align-items: start; }
.quote-card { padding: 24px; border: 2px solid #866438; border-radius: 10px; background: radial-gradient(ellipse at 100% 0%,#6944203d,transparent 65%),linear-gradient(135deg,#241a10,#11110e); min-width: 0; }
.quote-source { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.quote-source .text-button { overflow-wrap: anywhere; }
.quote-card blockquote { margin: 20px 0 15px; font: 24px/1.5 Georgia, serif; color: #efdab2; white-space: pre-wrap; overflow-wrap: anywhere; }
.badge { color: #dbc28b; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; border: 1px solid #997846; padding: 4px 7px; border-radius: 3px; }
.spoiler-cover { padding: 23px 0; color: #beac8a; font-size: 14px; }
.quote-card .tag-row { margin-top: 17px; }
.search-group-title { font-size: 22px; font-weight: 500; margin: 35px 0 20px; }
.collections-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.collection-card { padding: 20px; border: 2px solid #705331; border-radius: 10px; background: linear-gradient(140deg,#332315,#14130f); min-width: 0; }
.collection-card > p { font-size: 13px; color: #bfae8c; overflow-wrap: anywhere; }
.collection-spines { display: flex; justify-content: center; align-items: flex-end; height: 155px; overflow: hidden; margin-bottom: 22px; border-bottom: 3px solid #ba9553; }
.collection-spines img { width: 30%; height: 145px; object-fit: cover; transform: rotate(-8deg); margin-right: -8px; border: 2px solid #896b39; border-radius: 5px 5px 0 0; }
.collection-spines img:nth-child(2) { transform: none; z-index: 1; height: 152px; }
.collection-spines img:nth-child(3) { transform: rotate(8deg); }
.empty-spine { width: 80%; height: 110px; background: linear-gradient(120deg,#8d6b39,#251c10 65%); border: 2px solid #967747; border-radius: 7px 7px 0 0; }
.collection-row { display: flex; align-items: center; gap: 22px; padding: 18px; border: 2px solid #594229; border-radius: 8px; background: #1b160f; margin-bottom: 13px; }
.collection-row-info { flex: 1; min-width: 0; }
.collection-row-info p { margin-bottom: 0; }
.collection-row .inline-actions { margin: 0; }
.average-rating { display: flex; align-items: center; gap: 25px; padding: 25px; background: #231a10; border: 2px solid #6e512e; border-radius: 10px; }
.average-rating strong { font: 35px Georgia, serif; color: #e5bc70; white-space: nowrap; }
.average-rating p { margin: 0; font-size: 14px; color: #d2bf9d; }
.genre-button { width: 100%; padding: 10px 0; border: 0; background: transparent; color: #eddfc5; text-align: left; }
.genre-button:hover .genre-name { color: #ecc77f; text-decoration: underline; }
.genre-fill { display: block; }
.data-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 23px; }
.data-panel { padding: 25px; border: 2px solid #644c2b; border-radius: 10px; background: #1d170f; }
.data-panel h2 { font-size: 22px; font-weight: 500; }
.data-panel p, .danger-zone p { color: #bcab8c; font-size: 14px; }
.saved-filter-row { display: flex; align-items: center; gap: 15px; padding-block: 12px; border-top: 1px solid #554126; }
.saved-filter-row > span { flex: 1; overflow-wrap: anywhere; }
.danger-zone { border-top: 2px solid #69462f; margin-top: 40px; padding-top: 25px; }
.danger-zone h2 { font-size: 20px; font-weight: 500; color: #d7b193; }
.danger-text { color: #d5a283; }
.movie-dialog { width: min(900px,calc(100% - 40px)); max-height: calc(100dvh - 40px); padding: 0; background: #12110e; }
.form-dialog { width: min(730px,calc(100% - 32px)); max-height: calc(100dvh - 40px); }
.drawer-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 25px; background: #21190f; border-bottom: 2px solid #6d512d; }
.drawer-heading .eyebrow { margin: 0; }
.detail-hero { display: flex; align-items: center; gap: 28px; padding: 28px; }
.detail-poster { width: 155px; aspect-ratio: 2/3; object-fit: cover; border: 2px solid #97723b; border-radius: 7px; flex-shrink: 0; }
.detail-hero > div { min-width: 0; }
.detail-hero h2 { font-size: clamp(25px,3.5vw,36px); line-height: 1.2; font-weight: 500; margin-bottom: 13px; overflow-wrap: anywhere; }
.detail-hero .eyebrow { margin: 0 0 12px; }
.detail-hero .muted { font-size: 14px; }
.detail-numbers { color: #ddbe80; font-size: 13px; margin: 17px 0 0; }
.detail-numbers span { color: #88744d; padding: 0 6px; }
.detail-tabs { display: flex; gap: 8px; padding: 0 28px 18px; border-bottom: 2px solid #584024; }
.detail-section { padding: 28px; }
.detail-section > h3 { font-size: 19px; font-weight: 500; color: #e0c392; }
.detail-section .quote-card + .quote-card { margin-top: 19px; }
.detail-management { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 30px; padding-top: 22px; border-top: 2px solid #4d3b21; }
.form-dialog .form-grid { align-items: start; }
.form-dialog .form-actions { position: sticky; bottom: -28px; padding: 17px 0 0; background: #1b150e; }
.form-dialog label { margin-top: 0; }
.check-label { display: flex; gap: 12px; align-items: center; margin-bottom: 0; font-size: 14px; }
.check-label input { width: 19px; height: 19px; accent-color: #d3ac62; flex-shrink: 0; }
.movie-picker { max-height: 400px; overflow-y: auto; padding: 5px; }
.movie-picker .check-label { padding: 12px 0; border-bottom: 1px solid #554025; }
.entry-film-title { color: #e3c083; padding-bottom: 16px; border-bottom: 2px solid #6b512c; font-size: 20px; }
.api-message { margin: 0; padding: 15px; color: #c9b794; font-size: 14px; }
.notification-stack { z-index: 300; }
.notification { pointer-events: auto; }
.notification .text-button { display: block; font-weight: 600; margin-top: 8px; }
.drawer-notifications { position: sticky; bottom: 0; padding: 0 18px; background: #12110e; z-index: 2; }
.drawer-notifications:has(.notification) { padding-bottom: 18px; }
@media(min-width:1000px) { .container { width: min(1240px,calc(100% - 80px)); } }
@media(max-width:1000px) {
    .primary-nav { gap: 3px; }
    .primary-nav a { padding: 7px 10px; font-size: 12px; }
    .global-search { max-width: 390px; }
    .filter-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .home-columns { gap: 25px; }
    .home-columns .timeline-row { display: block; }
    .home-columns .timeline-date { width: auto; margin-bottom: 10px; }
}
@media(max-width:800px) {
    .site-header .header-content { flex-wrap: wrap; justify-content: space-between; gap: 15px; }
    .global-search { order: 3; flex-basis: 100%; max-width: none; }
    .primary-nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
    .primary-nav a { text-align: center; }
    .page-heading { flex-direction: column; align-items: flex-start; gap: 14px; }
    .center-hero { padding: 25px; }
    .mini-screen { display: none; }
    .quick-stats { gap: 12px; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .home-columns, .quote-grid, .data-panels { grid-template-columns: 1fr; }
    .collections-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .library-toolbar { flex-wrap: wrap; gap: 12px; }
    .library-toolbar > input { max-width: none; }
    .filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .sort-label { margin-left: 0; }
    .filter-panel > summary span { display: block; margin: 4px 0 0 15px; }
    .detail-hero { gap: 20px; }
    .detail-poster { width: 115px; }
}
@media(max-width:560px) {
    .site-header .header-content > .btn { font-size: 12px; padding: 8px 11px; }
    .logo { font-size: 23px; }
    .global-search input { font-size: 16px; }
    .global-search kbd { display: none; }
    .primary-nav { gap: 3px 1px; }
    .primary-nav a { font-size: 11px; padding: 8px 2px; }
    .center-hero { padding: 24px 20px; }
    .center-hero h1 { font-size: 29px; }
    .center-hero p:last-child { font-size: 13px; }
    .center-hero .eyebrow { font-size: 10px; letter-spacing: 1.7px; }
    .quick-stats a, .quick-stats button { padding: 17px; }
    .quick-stats strong { font-size: 30px; }
    .quick-stats span { font-size: 11px; }
    .section-heading { flex-wrap: wrap; gap: 10px; }
    .section-heading h2 { font-size: 22px; }
    .card-title-row .title-button { font-size: 13px; }
    .select-card { padding: 0; }
    .select-card input { width: 16px; height: 16px; }
    .card-bottom { flex-wrap: wrap; }
    .card-rating select { width: 100%; font-size: 13px; }
    .card-rating > span { display: block; }
    .list-card { gap: 12px; padding: 9px; }
    .list-card .poster-button { width: 60px; }
    .list-card .card-rating select { width: 105px; }
    .filter-grid { grid-template-columns: 1fr; padding: 8px 16px 20px; }
    .filter-grid input, .filter-grid select { font-size: 16px; }
    .preset-bar > select { width: 100%; }
    .sort-label { width: 100%; }
    .sort-label select { flex: 1; }
    .small-choice, .view-switch a { font-size: 12px; padding: 9px 10px; }
    .diary-toolbar { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
    .diary-toolbar label { width: 100%; }
    .diary-toolbar select { width: 100%; }
    .timeline-row { flex-direction: column; gap: 10px; }
    .timeline-date { width: auto; }
    .quote-filters { flex-direction: column; }
    .quote-filters > select { max-width: none; }
    .quote-card { padding: 20px; }
    .quote-card blockquote { font-size: 22px; }
    .collections-grid { grid-template-columns: 1fr; }
    .collection-row { gap: 14px; flex-wrap: wrap; }
    .collection-row .inline-actions { width: 100%; justify-content: flex-end; }
    .average-rating { align-items: flex-start; flex-direction: column; gap: 12px; }
    .data-panel { padding: 20px; }
    .saved-filter-row { flex-wrap: wrap; }
    .saved-filter-row > span { flex-basis: 100%; }
    .drawer-heading { padding: 13px 18px; }
    .drawer-heading .eyebrow { font-size: 10px; letter-spacing: 1px; }
    .movie-dialog { width: calc(100% - 16px); }
    .detail-hero { align-items: flex-start; padding: 22px 18px; gap: 15px; }
    .detail-poster { width: 72px; }
    .detail-hero h2 { font-size: 24px; }
    .detail-hero .eyebrow { font-size: 10px; letter-spacing: 1px; }
    .detail-hero .inline-actions { margin-left: -87px; margin-top: 28px; }
    .detail-tabs { gap: 3px; padding: 0 16px 16px; flex-wrap: wrap; }
    .detail-tabs .small-choice { font-size: 12px; padding: 8px 9px; }
    .detail-section { padding: 20px 18px; }
    .detail-management { align-items: stretch; flex-direction: column; }
    .form-dialog .form-actions { bottom: -22px; }
}

/* Account controls deliberately use the same warm cinema palette. */
.account-button { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-banner { display:flex; flex-wrap:wrap; gap:12px; align-items:center; padding-top:14px; padding-bottom:14px; color:var(--text-secondary, #c8bdab); font-size:.86rem; }
.account-banner span { flex:1 1 300px; }
.account-content { display:grid; gap:16px; }
.account-content form { display:grid; gap:12px; }
.account-content p { line-height:1.6; overflow-wrap:anywhere; }
@media(max-width:600px){.account-button{max-width:100%;}.header-content{flex-wrap:wrap;}.account-banner{font-size:.8rem;}}
