/* CINEMAN / Spatial edition. The original control styles remain the functional base. */
:root {
  --bg: #101014;
  --bg-deep: #121016;
  --surface: #1a171e;
  --surface-solid: #1a171e;
  --surface-strong: #25212a;
  --ink: #f4ede5;
  --muted: #a69b9e;
  --accent: #e8b88c;
  --accent-strong: #ffdbb4;
  --accent-soft: rgba(232,184,140,.1);
  --teal: #e8b88c;
  --gold: #e8b88c;
  --line: rgba(223,190,173,.14);
  --line-strong: rgba(223,190,173,.35);
  --shadow: 0 24px 65px #0007;
  --glow: 0 0 30px #e7805212;
  font-family: "Segoe UI", system-ui, sans-serif;
}
html { background: var(--bg); scroll-padding-top: 30px; }
body, body.player-open {
  background: radial-gradient(ellipse at 83% 15%, #3b192033, transparent 45%), #101014;
}
body::before { display: none; }
[hidden] { display: none !important; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent-strong); outline-offset: 4px;
}
button { letter-spacing: .01em; }
a { color: inherit; }
.ambient-grain { position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse at 100% 0, #8f344512, transparent 60%); }
.scene-canvas { opacity: .52; filter: none; }
.shell { width: min(1680px,100%); padding: 0 40px 48px 224px; }
.topbar, body.player-open .topbar {
  position: relative; top: auto; margin: 0 0 32px -184px; min-height: 106px; padding: 22px 0;
  background: none; backdrop-filter: none; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; flex-shrink: 0; }
.brand-mark { font: 50px/.8 Georgia,serif; letter-spacing: -.16em; padding-right: 10px; }
.brand-mark > span { color: #e88480; }
.brand strong { display: block; font-size: 20px; font-weight: 600; letter-spacing: .2em; }
.brand small { display: block; margin-top: 6px; font-size: 8px; letter-spacing: .12em; color: var(--muted); }
.topbar-edition { font-size: 9px; letter-spacing: .16em; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.topbar-edition > span { width: 5px; height: 5px; border-radius: 50%; background: #a7bc9c; box-shadow: 0 0 10px #a7bc9c55; }
.topbar-edition em { font-style: normal; color: #665d65; margin-left: 15px; }
.top-actions { gap: 10px; }
.age-badge { min-width: 36px; height: 28px; border-radius: 5px; background: none; box-shadow: none; border-color: var(--line); font-size: 11px; color: var(--muted); }
.profile-button, .icon-button, .ghost-button { background: #242027; border-color: var(--line); box-shadow: none; border-radius: 10px; }
.profile-button { background: #1a171e; }
.primary-button { gap: 16px; min-height: 44px; padding: 12px 20px; border: 1px solid #e8b88c; border-radius: 9px;
  background: #e8b88c; color: #231820; box-shadow: 0 6px 22px #e8b88c12; font-size: 13px; font-weight: 650; }
.primary-button:hover { background: #ffdbb4; border-color: #ffdbb4; color: #231820; transform: translateY(-2px); box-shadow: 0 8px 24px #e8b88c24; }
.main-menu, body.player-open .main-menu {
  position: fixed; top: 140px; left: max(40px, calc((100vw - 1680px) / 2 + 40px)); width: 150px;
  display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; z-index: 8;
  background: none; border: 0; box-shadow: none; backdrop-filter: none; border-radius: 0;
}
.nav-caption { margin: 0 12px 18px; color: #8a7c86; font-size: 9px; letter-spacing: .18em; }
.menu-button {
  min-width: 0; width: 100%; min-height: 46px; justify-content: flex-start; padding: 12px;
  gap: 10px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; color: var(--muted);
}
.menu-button svg { flex: 0 0 17px; width: 17px; height: 17px; }
.menu-button small { margin-left: auto; font-size: 8px; opacity: .55; }
.menu-button:hover { background: #231e26; border-color: var(--line); color: var(--ink); transform: none; box-shadow: none; }
.menu-button.active { color: var(--accent-strong); background: linear-gradient(100deg,#e8b88c20,#e8b88c08); border-color: #e8b88c30; box-shadow: inset 2px 0 var(--accent); }
.nav-foot { display: grid; gap: 23px; margin-top: 60px; padding: 23px 10px 0; border-top: 1px solid var(--line); }
.nav-foot p { font: italic 18px/1.55 Georgia,serif; color: #a79a9c; }
.nav-version { font-size: 7px; letter-spacing: .12em; color: #71646e; }
.motion-switch { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 11px; text-align: left; }
.motion-indicator { width: 22px; height: 12px; border: 1px solid #7d776b; border-radius: 10px; background: #474737; padding: 2px; }
.motion-indicator::after { content: ""; display: block; width: 6px; height: 6px; border-radius: 50%; background: #dacaaf; transform: translateX(8px); transition: transform .2s; }
.motion-switch[aria-pressed="false"] .motion-indicator { background: #29252c; border-color: #51464e; }
.motion-switch[aria-pressed="false"] .motion-indicator::after { transform: none; background: #95878f; }
.app-page { transform: none; transition: none; }
.cinema-hero {
  position: relative; display: grid; grid-template-columns: .9fr 1.2fr; align-items: center;
  min-height: 410px; margin: 0 0 30px; padding: 28px 34px;
  border: 1px solid #b9867133; border-radius: 20px; isolation: auto; transform-style: flat;
  background: radial-gradient(ellipse at 72% 48%,#752e4147,transparent 58%), linear-gradient(110deg,#1d1720,#1c171e 60%,#241c25);
  box-shadow: inset 0 1px #fff1,0 22px 55px #0003; overflow: hidden;
}
.cinema-hero::before, .cinema-hero::after { display: none; }
.hero-copy { position: relative; z-index: 3; min-width: 0; max-width: none; min-height: 0; padding: 0; transform: none; pointer-events: auto; }
.hero-copy .hero-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--accent); font-size: 8px; font-weight: 500; letter-spacing: .19em; }
.hero-kicker > span { width: 16px; height: 1px; background: currentColor; }
.hero-copy h2 { max-width: 430px; margin: 0; font: 400 clamp(34px,3.4vw,58px)/1.08 Georgia,"Times New Roman",serif; letter-spacing: -.035em; text-shadow: none; }
.hero-copy h2 em { color: var(--accent); font-weight: 400; }
.hero-copy p:not(.hero-kicker) { max-width: 285px; margin: 18px 0 0; color: #b9a9ae; font-size: 12px; line-height: 1.75; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 22px; }
.hero-browse { padding: 10px 0; background: none; border: none; color: #cdbbc1; font-size: 11px; }
.hero-browse span { padding-left: 8px; color: var(--accent); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 28px; }
.hero-stats span { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 0 20px 0 0; border: 0; border-right: 1px solid var(--line); }
.hero-stats span:last-child { border: 0; }
.hero-stats strong { font: 400 22px/1 Georgia,serif; color: #f0ddcf; }
.hero-stats em { font-size: 9px; font-style: normal; color: var(--muted); text-transform: none; letter-spacing: .04em; }
.exhibition { position: relative; min-width: 0; height: 344px; perspective: 1100px; }
.hero-posters { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0;
  display: block; perspective: none; transform-style: preserve-3d; transform: rotateX(-4deg) rotateY(var(--gallery-y,-6deg)); transition: transform .7s ease; }
.gallery-art {
  --fan-x: 0px; --fan-y: 0px; --fan-z: 0px; --fan-turn: 0deg;
  display: block; position: absolute; left: 50%; top: 44%; width: clamp(126px,12.3vw,190px); aspect-ratio: 9/16;
  padding: 0; color: #fff; border: 1px solid #f0c9ab55; border-radius: 10px; background: #2f2229;
  transform: translate(-50%,-50%) translate3d(var(--fan-x),var(--fan-y),var(--fan-z)) rotateY(var(--fan-turn));
  transform-style: preserve-3d; box-shadow: 5px 8px 0 #140f1680,0 28px 34px #0008, inset 0 0 0 3px #ffffff08;
  transition: transform .45s ease,border-color .3s,box-shadow .3s; outline-offset: 6px;
}
.gallery-art:nth-child(1) { --fan-x: -170px; --fan-z: -120px; --fan-turn: -28deg; --fan-y: 12px; }
.gallery-art:nth-child(2) { --fan-x: -90px; --fan-z: -38px; --fan-turn: -18deg; --fan-y: -5px; }
.gallery-art:nth-child(3) { --fan-z: 38px; --fan-turn: -5deg; }
.gallery-art:nth-child(4) { --fan-x: 94px; --fan-z: -30px; --fan-turn: 17deg; --fan-y: 10px; }
.gallery-art:nth-child(5) { --fan-x: 173px; --fan-z: -125px; --fan-turn: 28deg; --fan-y: 4px; }
.gallery-art img { display: block; width: 100%; height: 100%; position: absolute; inset: 0; border-radius: 9px; object-fit: cover; }
.gallery-art-caption { position: absolute; inset: auto 0 0; min-height: 70px; padding: 22px 13px 12px; display: grid; gap: 5px; border-radius: 0 0 9px 9px; background: linear-gradient(transparent,#100e15ec); text-align: left; pointer-events: none; }
.gallery-art-caption small { font-size: 7px; text-transform: uppercase; color: #f3ccb2; letter-spacing: .1em; }
.gallery-art-caption strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 500; }
.gallery-art:focus-visible { --fan-z: 100px; outline-color: var(--accent); z-index: 6; }
.gallery-orbit { position: absolute; width: 90%; height: 90px; bottom: -6px; left: 5%; border: 1px solid #f0bb9133; border-radius: 50%; transform: rotateX(48deg); box-shadow: 0 0 35px #e87c6b0c,inset 0 0 35px #e87c6b0c; }
.gallery-orbit::after { content: ""; position: absolute; inset: 17px -24px; border: 1px solid #f0bb9110; border-radius: 50%; }
.exhibition-caption { position: absolute; bottom: -18px; left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 14px; color: #9c838f; font-size: 6px; letter-spacing: .15em; }
.exhibition-caption button { display: grid; place-items: center; height: 30px; width: 30px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #291f29; color: var(--accent); font-size: 20px; }
.toolbar { position: relative; top: auto; grid-template-columns: minmax(180px,1fr) minmax(130px,.55fr) minmax(130px,.55fr) minmax(150px,.65fr) auto;
  margin-bottom: 22px; padding: 0; gap: 8px; background: none; border: 0; box-shadow: none; backdrop-filter: none; }
.search-box, .select-box, .auth-form label, .meta-editor label { background: #1b181f; border-color: #b8968828; border-radius: 9px; min-height: 46px; }
.search-box:focus-within, .select-box:focus-within, .auth-form label:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px #e8b88c10; }
.search-box input, .select-box select { font-size: 12px; }
.select-box { padding: 0 8px 0 10px; gap: 5px; }
.select-box span { font-size: 10px; color: #8d7c86; }
.select-box select { min-width: 0; }
.toolbar-actions { display: flex; align-items: stretch; gap: 8px; }
.shuffle-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 46px; padding: 10px 13px; border: 1px solid #e8b88c60; border-radius: 9px;
  background: #e8b88c18; color: var(--accent); font-size: 12px; font-weight: 600; white-space: nowrap; }
.shuffle-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.shuffle-button:hover:not(:disabled) { background: #e8b88c2b; border-color: var(--accent); }
.shuffle-button:disabled { opacity: .4; cursor: not-allowed; }
.view-toggle { gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; width: auto; background: #1b181f; }
.view-toggle .icon-button { min-height: 36px; width: 34px; padding: 6px; border: 0; background: none; }
.view-toggle .active { background: #e8b88c20; color: var(--accent); box-shadow: none; }
.library-head { padding: 0 0 18px; margin-bottom: 0; align-items: center; flex-direction: row; border: 0; background: none; box-shadow: none; backdrop-filter: none; }
.library-head h2 { font-size: 20px; font-weight: 500; letter-spacing: -.025em; }
.library-head p { margin-top: 8px; font-size: 10px; color: #8b7e89; }
.library-head .ghost-button { min-height: 34px; padding: 8px 12px; font-size: 11px; }
.video-grid { grid-template-columns: repeat(auto-fill,minmax(255px,1fr)); gap: 20px; perspective: 1600px; }
.video-card { border: 1px solid #ad8d8325; border-radius: 13px; background: linear-gradient(135deg,#24202a,#1b181f);
  box-shadow: 0 2px 0 #08070a,0 14px 25px #0003; animation: none; backdrop-filter: none; }
.video-card::before { background: linear-gradient(130deg,#ffd3a416,transparent 30%,transparent 80%,#d95f7310); }
.video-card:hover, .video-card:focus-visible { border-color: #d9b49b70; box-shadow: 0 18px 30px #0006; }
/* Touch devices have no hover tilt. Keep hit areas aligned while scrolling. */
@media (hover: none), (pointer: coarse) {
  .video-grid { perspective: none; }
  .video-card { transform-style: flat; }
  .video-card, .video-card:hover, .video-card:focus-visible { transform: none; }
}
.preview { background: #17141a; }
.preview::before { display: none; }
.preview-poster { filter: saturate(.85); }
.video-card:hover .preview-poster { filter: saturate(1); }
.preview-video { pointer-events: none; }
.preview-toggle { width: 34px; height: 34px; border-radius: 8px; background: #17141cbb; }
.preview-toggle[aria-pressed="true"] { color: #ffe1c6; border-color: var(--accent); background: #2a1d26e6; }
.preview-loading .preview::after { content: "Зареждане…"; display: grid; place-items: center; background: #15101955; color: #fff; font-size: 12px; }
.play-mark { width: 35px; height: 35px; border-color: #fff5; box-shadow: none; }
.format-badge, .duration-badge { border-radius: 6px; font-weight: 500; font-size: 10px; }
.format-badge { text-transform: uppercase; color: #e2d4d5; }
.duration-badge { color: #fff; }
.video-copy { gap: 9px; padding: 15px; }
.video-copy h3 { font-size: 13px; font-weight: 550; line-height: 1.5; }
.video-copy p { font-size: 10px; color: #897b87; }
.video-stats { gap: 4px 10px; }
.video-stats span { padding: 0; background: none; border: 0; font-size: 9px; color: #a3929c; }
.video-stats span:nth-child(3) { display: none; }
.tag-chip { padding: 3px 7px; font-size: 9px; border-radius: 5px; background: #cba8940b; border-color: #cba89417; color: #c9b5b6; }
.tag-chip:hover { color: var(--ink); border-color: #cba89460; background: #cba89417; }
.card-actions { padding-top: 10px; margin-top: 2px; border-top: 1px solid var(--line); }
.favorite-chip { border: 0; background: none; padding: 0; font-size: 10px; }
.star-button { min-height: 28px; width: 23px; font-size: 17px; color: #726270; }
.star-button.active { color: #e8b88c; }
.section-kicker { color: #b59382; font-size: 8px; letter-spacing: .2em; margin-bottom: 14px; }
.accent-dot { color: #e49b84; }
.category-head, .profile-head { margin: 0 0 28px; padding: 0; border: 0; background: none; box-shadow: none; backdrop-filter: none; }
.category-head h2, .profile-head h2 { font: 400 clamp(26px,3vw,42px)/1.2 Georgia,serif; }
.category-head p:not(.section-kicker), .profile-head p:not(.section-kicker) { margin-top: 12px; font-size: 12px; }
.category-tabs, .profile-tabs { gap: 4px; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 26px; }
.tab-button { border: 1px solid transparent; background: none; border-radius: 8px; font-size: 12px; color: var(--muted); }
.tab-button.active { background: #e8b88c16; border-color: #e8b88c30; color: var(--accent); box-shadow: none; }
.category-grid { grid-template-columns: repeat(auto-fill,minmax(175px,1fr)); gap: 22px; perspective: 1500px; }
.category-card { display: block; position: relative; overflow: hidden; padding: 0; border: 1px solid #d9b39940; border-radius: 12px; box-shadow: 5px 5px 0 #30242d,0 20px 40px #0005; background: #201921; animation: none; backdrop-filter: none; transform-style: flat; isolation: isolate; }
.category-card:hover, .category-card:focus-visible { border-color: var(--accent); box-shadow: 5px 8px 0 #51313b,0 24px 40px #0007; }
.category-media { aspect-ratio: 9/16; min-height: 0; background: #19141c; isolation: isolate; }
.category-media img { height: 100%; object-fit: cover; z-index: 0; }
.category-media::after { background: linear-gradient(transparent 40%,#100e15 100%); z-index: 1; pointer-events: none; }
.category-copy { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; z-index: 2; pointer-events: none; }
.category-copy strong { font: 400 22px/1.15 Georgia,serif; white-space: normal; overflow-wrap: anywhere; color: #fff2e5; }
.category-copy span { color: #c7a79e; font-size: 10px; margin-top: 7px; }
.category-media > span { top: 12px; bottom: auto; left: 12px; right: auto; max-width: calc(100% - 94px); padding: 5px 8px; font-size: 8px; border-radius: 5px; background: #16111cbc; color: #d6c1b3; transform: none; }
.category-image-button, .category-hide-button { width: 28px; height: 28px; min-height: 28px; border-radius: 6px; background: #16111cbc; }
.category-hide-button { left: auto; right: 45px; }
.profile-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.profile-stat, .profile-section { border-radius: 14px; background: linear-gradient(135deg,#25202b,#1b181f); box-shadow: 0 10px 25px #0002; }
.profile-stat strong { font: 400 34px/1 Georgia,serif; color: var(--accent); }
.profile-section { margin-top: 22px; padding: 22px; }
.admin-tools, .admin-user { border-radius: 10px; background: #211c24; }
.auth-panel { border-radius: 20px; border-color: #d0ad9555; background: #211a25; box-shadow: 0 30px 100px #0009; }
.auth-panel h2 { font: 32px Georgia,serif; }
.auth-form input { font-size: 16px; }
.recovery-fields { display: grid; gap: 10px; color: #bcaab3; font-size: 12px; }
.recovery-code { display: grid; gap: 4px; padding: 12px; border: 1px solid #e8b88c55; border-radius: 9px; background: #e8b88c0d; }
.recovery-code strong { color: var(--accent); font-size: 25px; letter-spacing: .22em; }
.auth-form .show-passwords { display: flex; min-height: 32px; align-items: center; gap: 8px; padding: 0; border: 0; background: none; }
.auth-form .show-passwords input { width: 16px; height: 16px; }
.access-gate { min-height: 560px; display: grid; grid-template-columns: 1fr 1fr; padding: 52px; overflow: hidden; text-align: left; border-radius: 22px; background: radial-gradient(ellipse at 85% 45%,#77324a60,transparent 65%),#1c1720; backdrop-filter: none; }
.access-copy { z-index: 2; min-width: 0; }
.access-copy h1 { margin-bottom: 24px; font: 400 clamp(38px,4.5vw,66px)/1.05 Georgia,serif; letter-spacing: -.04em; text-shadow: none; }
.access-copy h1 em { color: var(--accent); }
.access-copy > p:not(.section-kicker) { max-width: 330px; margin-bottom: 25px; font-size: 13px; line-height: 1.8; }
.access-copy > small { display: block; margin-top: 20px; color: #b098a5; font-size: 9px; }
.access-art { position: relative; width: 100%; height: 400px; perspective: 1100px; }
.access-art img { position: absolute; top: 50%; left: 50%; width: min(15vw,220px); aspect-ratio: 9/16; object-fit: cover; border-radius: 12px; border: 1px solid #dbb69b55; box-shadow: 0 30px 50px #0009; transform: translate(-50%,-50%) translateZ(30px) rotateY(-8deg); }
.access-art img:first-child { transform: translate(-100%,-50%) translateZ(-90px) rotateY(-30deg); }
.access-art img:last-child { transform: translate(0%,-50%) translateZ(-120px) rotateY(30deg); }
.connection-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; margin-bottom: 20px; color: #ffe1cf; border: 1px solid #c3977966; border-radius: 10px; background: #38202a; font-size: 13px; }
.watch-navigation { margin-top: 0; }
.watch-stage { border-color: #c0957b55; box-shadow: 0 0 0 5px #241b25,0 28px 60px #0006; border-radius: 12px; }
.watch-card { border-color: #bd9c8326; background: linear-gradient(135deg,#211c26,#19151c); border-radius: 12px; }
.watch-summary h2 { font-weight: 500; }
.watch-queue-item img { border: 1px solid var(--line); }
.watch-queue-item:hover img { border-color: var(--accent); }
.toast { border-radius: 12px; background: #30252f; border-color: #d3a68b77; }
body.motion-off .video-card, body.motion-off .category-card { transform: none !important; animation: none; }
body.motion-off .hero-posters { transform: rotateX(-4deg) rotateY(-6deg); }
body.motion-off .gallery-art { transition: none; }
@media (hover:hover) and (pointer:fine) {
  body:not(.motion-off) .gallery-art:hover { transform: translate(-50%,-50%) translate3d(var(--fan-x),calc(var(--fan-y) - 14px),calc(var(--fan-z) + 55px)) rotateY(0deg); border-color: var(--accent-strong); z-index: 5; box-shadow: 0 30px 45px #0009; }
}
@media (min-width:1550px) { .video-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (max-width:1200px) {
  .shell { padding-left: 184px; padding-right: 26px; }
  .topbar, body.player-open .topbar { margin-left: -158px; }
  .main-menu, body.player-open .main-menu { left: 26px; width: 134px; }
  .topbar-edition { display: none; }
  .cinema-hero { padding: 28px; grid-template-columns: 1fr 1fr; min-height: 380px; }
  .exhibition { height: 300px; }
  .gallery-art { width: 136px; }
  .gallery-art:nth-child(1) { --fan-x: -116px; }
  .gallery-art:nth-child(2) { --fan-x: -60px; }
  .gallery-art:nth-child(4) { --fan-x: 62px; }
  .gallery-art:nth-child(5) { --fan-x: 118px; }
  .hero-copy h2 { font-size: 42px; }
  .hero-cta { gap: 7px; }
  .hero-stats { gap: 12px; }
  .hero-stats span { padding-right: 14px; }
  .toolbar { grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto; }
  .toolbar .search-box { grid-column: 1/-1; }
  .category-grid { gap: 18px; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); }
}
@media (max-width:900px) {
  .shell { padding: 0 22px 110px; }
  .topbar, body.player-open .topbar { min-height: 86px; margin: 0 0 24px; padding: 20px 0; }
  .main-menu, body.player-open .main-menu {
    position: fixed; left: 50%; top: auto; bottom: max(14px,env(safe-area-inset-bottom)); transform: translateX(-50%);
    width: min(440px,calc(100% - 28px)); flex-direction: row; gap: 4px; padding: 6px;
    border: 1px solid #d1b4a34a; border-radius: 16px; background: #211a24f5; box-shadow: 0 10px 45px #0009; backdrop-filter: blur(18px); z-index: 20;
  }
  .menu-button { flex: 1 1 0; width: auto; min-height: 46px; justify-content: center; padding: 8px 5px; font-size: 11px; gap: 6px; }
  .menu-button.active { box-shadow: none; }
  .nav-caption, .nav-foot p, .nav-version, .menu-button small { display: none; }
  .nav-foot { margin: 0; padding: 0 2px 0 5px; border: 0; border-left: 1px solid var(--line); align-content: center; gap: 0; }
  .motion-switch { padding: 4px; width: 28px; min-height: 36px; }
  #motionLabel { display: none; }
  .hero-copy h2 { font-size: clamp(34px,5.5vw,48px); }
  .cinema-hero { padding: 28px; }
  .hero-stats { margin-top: 24px; }
  .video-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  .video-grid.list { grid-template-columns: 1fr; }
  .video-grid.list .video-card { grid-template-columns: minmax(170px,32%) minmax(0,1fr); }
  .access-gate { min-height: 500px; padding: 36px; }
  .access-art img { width: 170px; }
  .watch-layout { grid-template-columns: minmax(0,1fr); }
  .toast { bottom: 100px; }
}
@media (max-width:600px) {
  .shell { padding-inline: 16px; }
  .topbar, body.player-open .topbar { min-height: 80px; margin-bottom: 20px; align-items: center; flex-wrap: nowrap; gap: 10px; }
  .brand-mark { font-size: 43px; }
  .brand { gap: 8px; }
  .brand strong { font-size: 16px; }
  .brand small { font-size: 6px; letter-spacing: .07em; }
  .top-actions { gap: 6px; align-items: center; }
  .profile-button { padding: 8px; min-height: 38px; gap: 5px; }
  .profile-button span { max-width: 55px; font-size: 10px; }
  .age-badge { min-width: 28px; width: 28px; height: 25px; font-size: 9px; }
  .top-actions .icon-button { width: 32px; min-height: 36px; padding: 6px; }
  .cinema-hero { min-height: 0; grid-template-columns: 1fr; padding: 24px 24px 32px; margin-bottom: 22px; border-radius: 15px; }
  .hero-copy { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; }
  .hero-copy .hero-kicker { grid-column: 1/-1; font-size: 7px; margin-bottom: 15px; }
  .hero-copy h2 { font-size: 38px; }
  .hero-copy p:not(.hero-kicker) { display: none; }
  .hero-stats { margin: 6px 0 0; display: grid; align-content: start; gap: 9px; text-align: right; }
  .hero-stats span { display: grid; gap: 2px; border: 0; padding: 0; }
  .hero-stats span:last-child { display: none; }
  .hero-stats strong { font-size: 21px; }
  .hero-stats em { font-size: 8px; }
  .hero-cta { grid-column: 1/-1; grid-row: 3; margin-top: 16px; gap: 16px; }
  .hero-cta .primary-button { padding: 10px 14px; font-size: 11px; min-height: 40px; }
  .hero-browse { font-size: 10px; }
  .exhibition { height: 242px; margin-top: 16px; }
  .hero-posters { inset: 0; margin: 0; height: 100%; min-height: 0; width: 100%; }
  .gallery-art { width: 120px; }
  .gallery-art:nth-child(1) { --fan-x: -103px; --fan-z: -160px; }
  .gallery-art:nth-child(2) { --fan-x: -56px; --fan-z: -48px; }
  .gallery-art:nth-child(3) { --fan-z: 18px; }
  .gallery-art:nth-child(4) { --fan-x: 58px; --fan-z: -48px; }
  .gallery-art:nth-child(5) { --fan-x: 108px; --fan-z: -155px; }
  .exhibition-caption { bottom: -6px; font-size: 5px; gap: 10px; }
  .gallery-orbit { height: 65px; bottom: 10px; }
  .toolbar { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .toolbar .search-box { grid-column: 1/-1; }
  .toolbar .sort-box, .toolbar-actions { grid-column: 1/-1; }
  .toolbar-actions .shuffle-button { flex: 1; }
  .view-toggle { justify-self: end; justify-content: center; align-self: stretch; }
  .search-box, .select-box { min-height: 44px; width: auto; }
  .search-box input { font-size: 16px; }
  .select-box select { font-size: 13px; }
  .select-box span { font-size: 9px; }
  .library-head { flex-direction: row; align-items: center; gap: 10px; padding-bottom: 16px; }
  .library-head h2 { font-size: 18px; }
  .library-head p { font-size: 9px; line-height: 1.6; }
  .library-head .ghost-button { flex-shrink: 0; font-size: 10px; padding: 6px 9px; }
  .video-grid { grid-template-columns: 1fr; gap: 20px; }
  .video-grid.list .video-card { grid-template-columns: 1fr; }
  .video-copy h3 { font-size: 15px; }
  .video-stats span { font-size: 10px; }
  .category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 14px; }
  .category-head { display: grid; gap: 20px; }
  .category-head h2 { font-size: 29px; }
  .category-copy { padding: 14px; }
  .category-copy strong { font-size: 20px; }
  .category-search { width: 100%; }
  .category-tabs, .profile-tabs { margin-bottom: 22px; }
  .tab-button { font-size: 12px; }
  .profile-stats { gap: 8px; }
  .profile-stat { padding: 16px 12px; }
  .profile-stat strong { font-size: 28px; }
  .profile-stat span { font-size: 10px; }
  .profile-section { padding: 18px; }
  .access-gate { grid-template-columns: 1fr; padding: 32px 26px; min-height: 0; gap: 26px; }
  .access-copy h1 { font-size: 44px; }
  .access-art { height: 280px; }
  .access-art img { width: 140px; }
  .watch-stage { border-radius: 9px; box-shadow: 0 0 0 3px #241b25; }
  .watch-summary h2 { font-size: 22px; }
}
@media (pointer:coarse) {
  .preview-toggle { width: 44px; height: 44px; }
  .star-button { min-height: 38px; width: 29px; }
  .favorite-chip { min-height: 38px; }
  .exhibition-caption button { height: 44px; width: 44px; }
  .category-image-button, .category-hide-button { min-height: 34px; height: 34px; width: 34px; }
}
@media (max-width:380px) {
  .age-badge { display: none; }
  .brand small { display: none; }
  .cinema-hero { padding-inline: 18px; }
  .hero-copy h2 { font-size: 34px; }
  .gallery-art { width: 108px; }
  .hero-cta { gap: 10px; }
  .gallery-art:nth-child(1) { --fan-x: -91px; }
  .gallery-art:nth-child(5) { --fan-x: 93px; }
  .menu-button { font-size: 10px; gap: 5px; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .video-card, .category-card { transform: none !important; }
  .hero-posters { transform: rotateX(-4deg) rotateY(-6deg) !important; }
}

/* Decorative artwork stays behind the interface and never intercepts input. */
.background-artwork { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; contain: layout paint; }
.background-artwork::after { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg,#10101435 0%,#101014b3 23%,#101014de 49%,#10101480 76%,#10101426),
    linear-gradient(0deg,#101014ce,transparent 70%,#10101430); }
.background-portrait { position: absolute; top: 7vh; right: -5vw; width: clamp(320px,40vw,720px); height: 104vh;
  opacity: .42; transform: perspective(1200px) rotateY(-12deg) rotateZ(6deg);
  mask-image: linear-gradient(180deg,transparent,#000 12%,#000 75%,transparent);
  -webkit-mask-image: linear-gradient(180deg,transparent,#000 12%,#000 75%,transparent); }
.background-portrait-1 { top: 16vh; right: auto; left: -9vw; width: clamp(280px,34vw,580px); height: 94vh;
  opacity: .3; transform: perspective(1200px) rotateY(15deg) rotateZ(-8deg); }
.background-portrait img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover;
  object-position: center 20%; opacity: 0; filter: saturate(.7); transition: opacity 2.6s ease-in-out; }
.background-portrait img.is-visible { opacity: 1; }
body.player-open .background-artwork { visibility: hidden; }
body.motion-off .background-portrait img { transition: none; }
@media (max-width: 900px) {
  .background-portrait { right: -28vw; top: 4vh; width: 95vw; height: 100vh; opacity: .32; transform: rotate(7deg); }
  .background-artwork::after { background: linear-gradient(90deg,#101014cc,#10101473),linear-gradient(0deg,#101014a6,transparent 80%); }
}
@media (prefers-reduced-motion: reduce) {
  .background-portrait img { transition: none; }
}
