:root {
  color-scheme: dark;
  --background: #0b0917;
  --surface: #151124;
  --surface-raised: #211a35;
  --border: #3b3055;
  --text: #fbf7ff;
  --muted: #c7bcd9;
  --accent: #ddc4ff;
  --accent-ink: #201033;
  --mint: #91f3e0;
  --rose: #ffabd8;
  --radius: 26px;
  --radius-control: 15px;
  --radius-card: 20px;
  --surface-sheen: linear-gradient(150deg, #201831, var(--surface) 72%);
  --surface-shadow: inset 0 1px #ffffff0e, 0 .6rem 1.8rem #05030e58;
  --violet-glow: 0 0 1.35rem #ac78ff38;
  --display-font: "El Messiri", "Alexandria", "Noto Sans Arabic", Tahoma, sans-serif;
  scrollbar-color: #765896 var(--background);
  font: 93.75%/1.75 "Alexandria", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { display: flex; flex-direction: column; margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(ellipse at 86% 0, #231338 0%, transparent 40rem), radial-gradient(ellipse at 0 46rem, #0d242b 0%, transparent 36rem), var(--background); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
a, button, input, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
[hidden] { display: none !important; }
p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { font-family: var(--display-font); font-weight: 700; line-height: 1.27; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.8rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.7rem); }
h3 { font-size: 1.1rem; }
.icon { width: 1.25rem; height: 1.25rem; flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
#library-results { scroll-margin-top: 7rem; }
.pagination { display: grid; gap: .65rem; padding-block: .5rem; margin-block: 1rem; }
.pagination-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .25rem; font-size: .85rem; }
.pagination-mobile { display: none; }
.page-link, .page-gap { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; min-width: 36px; min-height: 40px; padding: .25rem .45rem; border: 1px solid #549bdc; border-radius: 4px; background: #101b30; color: #c9e5ff; }
a.page-link:hover { background: #162e4a; border-color: #9ccfff; box-shadow: 0 0 .6rem #3996f136; }
.page-link.current { background: #1687ed; color: #fff; border-color: #53adff; font-weight: 700; }
.page-link.disabled { opacity: .4; }
.page-previous .icon { transform: scaleX(-1); }
.page-link .icon { width: 1rem; height: 1rem; }
.page-gap { color: #a4c5e6; }
.pagination-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem 1.1rem; font-size: .78rem; }
.page-size-form, .page-size-form label { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.page-size-form select { width: auto; min-width: 4.5rem; padding: .3rem .5rem; }
.page-size-form button { padding: .35rem .6rem; }
.page-jump { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; max-width: 100%; }
.page-jump label { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.page-jump input { width: 4.5rem; min-width: 3rem; padding: .35rem; text-align: center; }
.page-jump button { padding: .4rem .65rem; }
@media (max-width: 600px) {
  .pagination-desktop { display: none; }
  .pagination-mobile { display: flex; gap: .18rem; }
  .pagination-mobile .page-word { display: none; }
  .pagination-mobile .page-link { min-width: 32px; min-height: 40px; padding-inline: .3rem; }
  .pagination-mobile .page-gap { min-width: 18px; padding-inline: .15rem; }
  .pagination-meta { gap: .5rem .8rem; }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.header { position: sticky; z-index: 5; top: 0; background: #100b1de8; border-bottom: 1px solid #694d8c72; box-shadow: 0 .35rem 1.8rem #05030e62; backdrop-filter: blur(16px); }
.header-inner, .shell, .site-footer { width: min(100% - 3rem, 1200px); margin-inline: auto; }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1.3rem; }
.brand { display: flex; align-items: center; gap: .6rem; font: 700 1.4rem/1.65 var(--display-font); min-width: 0; }
.brand small { display: block; font: 500 .64rem/1.8 "Alexandria", Tahoma, sans-serif; color: var(--muted); margin-top: 0; }
.brand-mark { width: 48px; height: 48px; flex: none; overflow: hidden; display: grid; place-items: center; border: 1px solid #e8ccff8c; border-radius: 16px; box-shadow: 0 0 1.1rem #ac78ff30; }
.brand-mark img { display: block; width: 100%; height: 100%; }
.desktop-nav, .account { display: flex; align-items: center; gap: .9rem; }
.desktop-nav a { color: var(--muted); font-size: .85rem; padding: .55rem .6rem; white-space: nowrap; border-radius: 12px; }
.desktop-nav a.active, .desktop-nav a:hover { color: var(--accent); background: #a877ff20; }
.account { gap: .35rem; }
.account form { margin: 0; }
.admin-link { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; font-size: .9rem; color: var(--accent); padding: .6rem .45rem; min-height: 44px; border-radius: 12px; }
.admin-link:hover { background: #a877ff20; }
.mobile-nav { display: none; }
.shell { flex: 1; padding-block: 1.65rem 1.5rem; }
.site-footer { border-top: 1px solid var(--border); padding-block: .7rem 1.3rem; color: var(--muted); font-size: .78rem; text-align: center; }
.button, button:not(.media-card) {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  max-width: 100%; padding: .55rem .9rem; border-radius: var(--radius-control); background: linear-gradient(155deg, #2a2040, var(--surface-raised)); color: var(--text);
  border: 1px solid var(--border); font-weight: 650; cursor: pointer;
  overflow-wrap: anywhere; transition: background-color .18s, border-color .18s, box-shadow .18s, transform .18s;
}
.button:hover, button:not(.media-card):hover { background: #302446; border-color: #8061a4; box-shadow: 0 0 .9rem #a877ff26; }
.button.primary, button.primary { color: var(--accent-ink); background: linear-gradient(145deg, #efdcff, #c29aff); border-color: #ead7ff; box-shadow: var(--violet-glow); }
.button.primary:hover, button.primary:hover { background: linear-gradient(145deg, #f7e9ff, #d2b2ff); box-shadow: 0 0 1.5rem #b37cff66; }
button.quiet { background: transparent; border-color: transparent; }
button.danger { color: #ffb0b6; }
button:disabled { opacity: .58; cursor: wait; }
.connection-badge, button.connection-badge { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; padding: .3rem .55rem; border: 1px solid #497a6d; border-radius: 999px; background: #14312e; color: var(--mint); font-size: .73rem; font-weight: 650; white-space: nowrap; }
.connection-badge.internet { border-color: #836746; background: #362737; color: #ffd89a; }
.connection-badge .icon { width: 1rem; height: 1rem; }
.connection-message { position: absolute; z-index: 1; inset-block-start: calc(100% + .35rem); inset-inline-end: max(.5rem, calc((100% - 1200px) / 2)); width: min(13rem, 70vw); padding: .55rem .65rem; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); color: var(--text); font-size: .78rem; box-shadow: var(--surface-shadow); }
.hero { isolation: isolate; position: relative; overflow: hidden; min-height: 430px; display: flex; align-items: center; background: #161127; border: 1px solid #76539c; border-radius: 32px; padding: clamp(1.35rem, 3.5vw, 2.85rem); margin-bottom: 2.7rem; box-shadow: inset 0 1px #e3baff38, 0 1.15rem 3.6rem #02010974, 0 0 2.5rem #a367f92a; }
.hero-copy { position: relative; width: min(100%, 34rem); }
.hero h1 { font-size: clamp(2.2rem, 4.9vw, 4.3rem); }
.eyebrow { display: flex; align-items: center; gap: .5rem; color: var(--accent); font-weight: 700; font-size: .84rem; margin-bottom: .55rem; }
.eyebrow span { display: inline-block; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--mint); box-shadow: 0 0 .7rem #83ffe8ba; }
.hero h1 span, .login-panel h1 span { color: var(--accent); }
.hero h1 .hero-highlight { color: #e6c8ff; text-shadow: 0 0 1.5rem #c197ff42; }
.hero-copy > p:not(.eyebrow), .page-intro > p:not(.eyebrow) { max-width: 35rem; color: #e4d8f2; margin: .85rem 0 1.2rem; font-size: .98rem; }
.hero-art { z-index: -1; position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(ellipse at 15% 75%, #277f7e60, transparent 45%),
  radial-gradient(ellipse at 24% 32%, #864cc66e, transparent 50%),
  linear-gradient(125deg, #251834, #161126 72%); }
.hero-visual { position: absolute; inset: 0 52% 0 3%; display: grid; place-items: center; }
.hero-orbit { position: absolute; width: min(92%, 450px); aspect-ratio: 1.7; border: 1px solid #bf91ff65; border-radius: 50%; transform: rotate(-27deg); box-shadow: 0 0 1.5rem #b17bf52d; }
.orbit-inner { width: min(78%, 370px); border-color: #8bf3e357; transform: rotate(25deg); }
.hero-frame { position: absolute; width: min(66%, 320px); aspect-ratio: 1.57; border: 1px solid #b891f3; border-radius: clamp(12px, 2vw, 24px); box-shadow: 0 0 1.55rem #bb76ff40; }
.frame-back { background: #43255d90; transform: translate(-13%, -17%) rotate(-17deg); }
.frame-mid { background: #245155ad; border-color: #83f5e0c7; transform: translate(13%, 19%) rotate(14deg); box-shadow: 0 0 1.6rem #7cfde64b; }
.frame-front { display: grid; place-items: center; background: linear-gradient(148deg, #45295deb, #171329f4 77%); border-color: #ecd4ff; box-shadow: inset 0 1px #ffffff48, 0 0 2.3rem #b17bf57a, 0 .95rem 2.3rem #0a071b90; transform: rotate(-4deg); }
.frame-front > span { display: grid; place-items: center; width: 26%; aspect-ratio: 1; border-radius: 32%; color: var(--mint); border: 1px solid #91f3e078; background: #7defdd15; box-shadow: inset 0 0 1rem #7defdd22, 0 0 1.1rem #7defdd29; }
.frame-front .icon { width: 58%; height: 58%; filter: drop-shadow(0 0 .35rem #9fffe780); }
.section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.section-head .eyebrow { margin-bottom: .2rem; }
.section-head h2 { display: flex; align-items: center; gap: .5rem; }
.section-head h2::before { content: ""; width: 4px; height: .8em; border-radius: 999px; background: linear-gradient(var(--accent), var(--mint)); box-shadow: 0 0 .7rem #b886ff65; flex: none; }
.category-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 1rem; }
.home-categories { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.category-tile { --hue: #e2bcff; --wash: #3d235b; position: relative; overflow: hidden; display: grid; align-content: space-between; gap: .8rem; min-width: 0; min-height: 198px; padding: 1.15rem; border: 1px solid var(--border); border-radius: var(--radius); background: radial-gradient(ellipse at top right, var(--wash), transparent 82%), var(--surface); box-shadow: var(--surface-shadow); transition: transform .2s, border-color .2s, box-shadow .2s; }
.category-tile:hover, .media-card:hover { border-color: var(--hue, var(--accent)); box-shadow: var(--surface-shadow), var(--violet-glow); }
@media (hover: hover) and (pointer: fine) {
  .category-tile:hover, .media-card:hover { transform: translateY(-3px); }
}
.category-tile.movies, .page-intro.movies { --hue: #e2bcff; --wash: #422964; }
.category-tile.series, .page-intro.series { --hue: var(--rose); --wash: #4c264c; }
.category-tile.photos, .page-intro.photos { --hue: var(--mint); --wash: #224a4b; }
.category-tile.videos, .page-intro.videos { --hue: #b6d2ff; --wash: #263b63; }
.category-tile.music, .page-intro.music { --hue: #ffd89a; --wash: #54364b; }
.category-tile.documents, .page-intro.documents { --hue: #b9c7ff; --wash: #303d62; }
.tile-number { position: absolute; inset-inline-end: 1rem; top: .85rem; color: var(--hue); font-weight: 700; font-size: .79rem; opacity: .75; }
.tile-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 15px; border: 1px solid #ffffff29; background: #ffffff10; color: var(--hue); box-shadow: inset 0 0 .75rem #ffffff0f, 0 0 .95rem #b989ff22; }
.tile-icon .icon { width: 1.5rem; height: 1.5rem; filter: drop-shadow(0 0 .35rem currentColor); }
.category-tile p { color: #e4d8ef; font-size: .86rem; margin-top: .32rem; overflow-wrap: anywhere; }
.tile-meta { display: flex; align-items: center; justify-content: space-between; color: var(--hue); font-size: .82rem; }
.page-intro { --wash: #3c2655; margin-bottom: 1.6rem; padding: clamp(1.2rem, 4.4vw, 3rem); border-radius: var(--radius); border: 1px solid #66517c; background: radial-gradient(ellipse at top right, var(--wash), transparent 86%), var(--surface); box-shadow: var(--surface-shadow), 0 0 1.9rem #b17bf522; }
.page-intro .eyebrow { color: var(--hue, var(--accent)); }
.page-intro h1, .watch h1 { font-size: clamp(1.65rem, 4.2vw, 2.65rem); overflow-wrap: anywhere; }
.section-banner { position: relative; isolation: isolate; overflow: hidden; }
.section-banner > :not(.section-banner-art):not(.banner-snow):not(.banner-motion-toggle) { position: relative; z-index: 2; }
.page-intro { position: relative; isolation: isolate; }
.page-intro > :not(.banner-snow):not(.section-banner-art):not(.banner-motion-toggle) { position: relative; z-index: 2; }
.banner-snow { position: absolute; inset: 0; display: block; overflow: hidden; border-radius: inherit; pointer-events: none; z-index: 1; color: var(--hue, #e2d4ff); }
.banner-snow i { position: absolute; inset: 0 auto 0 var(--snow-x); width: 22px; background: radial-gradient(circle at 50% 8px, #ffffffe6 0 calc(var(--snow-size) * .5), currentColor var(--snow-size), transparent calc(var(--snow-size) + 4px)), radial-gradient(10px 10px at 50% 8px, #d3bcff50, transparent); filter: blur(.7px); animation: banner-snowfall var(--snow-time) var(--snow-delay) linear infinite; }
.banner-snow i:nth-child(3n) { filter: blur(1.5px); }
.banner-motion-toggle { position: absolute; inset: .65rem auto auto .65rem; z-index: 3; }
button.banner-motion-toggle { display: grid; place-items: center; width: 36px; min-height: 36px; padding: 0; color: #e8d8ff; background: #160f27b3; border-color: #b68ddd75; border-radius: 50%; }
.banner-motion-toggle .icon { width: 1rem; height: 1rem; }
.banner-snow i:nth-child(1) { --snow-x: 7%; --snow-time: 9s; --snow-delay: -3s; --snow-drift: -21px; --snow-size: 2px; }
.banner-snow i:nth-child(2) { --snow-x: 50%; --snow-time: 10s; --snow-delay: -10s; --snow-drift: -8px; --snow-size: 2.5px; }
.banner-snow i:nth-child(3) { --snow-x: 93%; --snow-time: 11s; --snow-delay: -0s; --snow-drift: 5px; --snow-size: 3px; }
.banner-snow i:nth-child(4) { --snow-x: 36%; --snow-time: 12s; --snow-delay: -7s; --snow-drift: 18px; --snow-size: 2px; }
.banner-snow i:nth-child(5) { --snow-x: 79%; --snow-time: 13s; --snow-delay: -14s; --snow-drift: -12px; --snow-size: 2.5px; }
.banner-snow i:nth-child(6) { --snow-x: 22%; --snow-time: 14s; --snow-delay: -4s; --snow-drift: 1px; --snow-size: 3px; }
.banner-snow i:nth-child(7) { --snow-x: 65%; --snow-time: 15s; --snow-delay: -11s; --snow-drift: 14px; --snow-size: 2px; }
.banner-snow i:nth-child(8) { --snow-x: 8%; --snow-time: 9s; --snow-delay: -1s; --snow-drift: -16px; --snow-size: 2.5px; }
.banner-snow i:nth-child(9) { --snow-x: 51%; --snow-time: 10s; --snow-delay: -8s; --snow-drift: -3px; --snow-size: 3px; }
.banner-snow i:nth-child(10) { --snow-x: 94%; --snow-time: 11s; --snow-delay: -15s; --snow-drift: 10px; --snow-size: 2px; }
.banner-snow i:nth-child(11) { --snow-x: 37%; --snow-time: 12s; --snow-delay: -5s; --snow-drift: -20px; --snow-size: 2.5px; }
.banner-snow i:nth-child(12) { --snow-x: 80%; --snow-time: 13s; --snow-delay: -12s; --snow-drift: -7px; --snow-size: 3px; }
.banner-snow i:nth-child(13) { --snow-x: 23%; --snow-time: 14s; --snow-delay: -2s; --snow-drift: 6px; --snow-size: 2px; }
.banner-snow i:nth-child(14) { --snow-x: 66%; --snow-time: 15s; --snow-delay: -9s; --snow-drift: 19px; --snow-size: 2.5px; }
.banner-snow i:nth-child(15) { --snow-x: 9%; --snow-time: 9s; --snow-delay: -16s; --snow-drift: -11px; --snow-size: 3px; }
.banner-snow i:nth-child(16) { --snow-x: 52%; --snow-time: 10s; --snow-delay: -6s; --snow-drift: 2px; --snow-size: 2px; }
.banner-snow i:nth-child(17) { --snow-x: 95%; --snow-time: 11s; --snow-delay: -13s; --snow-drift: 15px; --snow-size: 2.5px; }
.banner-snow i:nth-child(18) { --snow-x: 38%; --snow-time: 12s; --snow-delay: -3s; --snow-drift: -15px; --snow-size: 3px; }
@keyframes banner-snowfall { 0% { transform: translate3d(0, -7%, 0); opacity: 0; } 12% { opacity: .85; } 85% { opacity: .65; } 100% { transform: translate3d(var(--snow-drift), 100%, 0); opacity: 0; } }
html[data-diwan-motion="off"] .banner-snow { display: none; }
@media (prefers-reduced-motion: reduce) {
  html[data-diwan-motion="auto"] .banner-snow { display: none; }
  .banner-snow i { animation-duration: var(--snow-time) !important; }
}
.page-intro.section-banner > .section-banner-copy { width: 58%; max-width: 40rem; }
.page-intro.section-banner .section-banner-copy > p:not(.eyebrow) { max-width: 35rem; color: #e4d8f2; margin: .85rem 0 1.2rem; font-size: .98rem; }
.catalog-intro.section-banner > .section-banner-copy { max-width: 62%; }
.section-banner-art { --art-color: #ddc4ff; --art-glow: #c797ff29; position: absolute; inset-block: 0; inset-inline-end: 0; width: 52%; overflow: hidden; pointer-events: none; user-select: none; z-index: 0; color: var(--art-color); -webkit-mask-image: linear-gradient(to right, #000 0%, #000 72%, transparent); mask-image: linear-gradient(to right, #000 0%, #000 72%, transparent); }
.section-banner-art-music { --art-color: #ffd89a; --art-glow: #ffd89a24; }
.section-banner-art-series { --art-color: #ffabd8; --art-glow: #ffabd829; }
.section-banner-art-photos { --art-color: #91f3e0; --art-glow: #91f3e024; }
.section-banner-art-videos { --art-color: #b6d2ff; --art-glow: #9abfff29; }
.section-banner-art-documents { --art-color: #bec9ff; --art-glow: #9dacff29; }
.section-banner-drawing { display: block; width: 100%; height: 100%; filter: drop-shadow(0 0 14px var(--art-glow)); }
.banner-symbol { position: absolute; display: block; opacity: .5; filter: drop-shadow(0 0 10px var(--art-glow)); }
.section-banner-art .banner-symbol .icon { width: 100%; height: 100%; }
.banner-symbol-one { width: 42px; height: 42px; left: 14%; top: 20%; transform: rotate(-16deg); }
.banner-symbol-two { width: 30px; height: 30px; right: 13%; top: 19%; transform: rotate(15deg); opacity: .35; }
.family-intro.section-banner > .section-banner-art { height: calc(100% - 3.4rem); bottom: auto; }
@media (max-width: 940px) {
  .page-intro.section-banner > .section-banner-copy { width: 100%; max-width: none; }
  .catalog-intro.section-banner > .section-banner-copy { max-width: calc(100% - 64px); }
  .family-intro.section-banner > .section-banner-copy { max-width: 100%; }
  .section-banner-art { width: 66%; opacity: .28; }
  .banner-symbol-one { width: 32px; height: 32px; }
  .banner-symbol-two { width: 24px; height: 24px; }
}
.breadcrumb { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: .3rem; color: var(--accent); }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.55rem; }
.toolbar > *, .root-options > *, .player-tools > * { min-width: 0; max-width: 100%; }
.photo-gallery-filters { display: grid; grid-template-columns: minmax(0, 1fr); padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface-sheen); }
.photo-date-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; align-items: end; }
.photo-date-controls label { min-width: 0; }
.photo-date-help { grid-column: 1 / -1; }
@media (max-width: 600px) {
  .photo-date-controls { grid-template-columns: minmax(0, 1fr); }
}
.search { flex: 1 1 12rem; display: flex; align-items: center; gap: .55rem; padding-inline: .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-control); box-shadow: inset 0 1px #ffffff0c; }
.search:focus-within { border-color: var(--mint); box-shadow: 0 0 .95rem #84ffe030; }
.search input { border: 0; padding-inline: 0; background: transparent; }
input, select { background: #100c1d; border: 1px solid #564369; border-radius: var(--radius-control); color: var(--text); min-height: 44px; padding: .55rem .65rem; width: 100%; min-width: 0; }
input::placeholder { color: #b8abcb; }
.media-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .9rem; }
.media-card { display: grid; align-content: start; text-align: start; min-width: 0; color: var(--text); background: var(--surface-sheen); border: 1px solid var(--border); padding: 0; overflow: hidden; border-radius: var(--radius-card); box-shadow: var(--surface-shadow); cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; }
.media-art { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 10; background: radial-gradient(ellipse at top right, #443168, #181027 83%); color: var(--accent); }
.photo-grid .media-art { aspect-ratio: 4 / 3; }
.media-art img { display: block; width: 100%; height: 100%; position: absolute; object-fit: cover; }
.media-art > .icon { width: 2.1rem; height: 2.1rem; }
.media-label { display: grid; gap: .15rem; padding: .6rem .75rem; min-height: 45px; overflow-wrap: anywhere; }
.media-label b { overflow: hidden; text-align: start; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.media-label small { color: var(--muted); }
.document-upload { margin-bottom: 1.2rem; }
.document-upload summary { min-height: 44px; cursor: pointer; color: var(--accent); }
.document-upload form { margin-top: .65rem; }
.document-extension { position: absolute; inset-inline-start: .5rem; bottom: .5rem; padding: .2rem .45rem; border: 1px solid #9faeec70; border-radius: .5rem; background: #171526ed; color: #d2d9ff; font-size: .75rem; font-weight: 700; }
.document-pages { margin-top: 1rem; }
.document-title { overflow-wrap: anywhere; }
.document-actions { margin-top: 1rem; }
.document-file-choice { max-width: 24rem; }
.document-file-note, .document-share-status { font-size: .82rem; overflow-wrap: anywhere; }
.document-file-note:empty, .document-share-status:empty { display: none; }
.document-actions [aria-disabled="true"] { opacity: .5; cursor: default; }
.file-share-progress { width: 100%; height: .45rem; accent-color: var(--accent); }
.native-audio-timeline { display: flex; align-items: center; gap: .6rem; min-width: 0; padding: .4rem .65rem; border-radius: 1.2rem; background: #ffffff14; font: .8rem sans-serif; }
.native-audio-timeline span { flex: none; }
.native-audio-timeline input { flex: 1; min-width: 0; width: auto; padding: 0; accent-color: #ffdb9e; }
.diwan-native .header .connection-badge, .diwan-native [data-android-install] { display: none; }
.diwan-pip :is(.header, .mobile-nav, .site-footer, .floating-music), .diwan-pip [data-video] > :not(.screen) { display: none !important; }
.diwan-pip .shell, .diwan-pip .watch { margin: 0; padding: 0; width: 100%; max-width: none; }
.diwan-pip .screen { width: 100vw; height: 100vh; min-height: 0; aspect-ratio: auto; border: 0; border-radius: 0; }
.file-actions { min-width: 0; max-width: 100%; }
.light-foot .file-actions { width: 100%; margin-top: 0; gap: .25rem; }
.light-foot .file-actions .root-options { justify-content: center; }
.light-foot .file-actions .document-file-choice { width: 100%; margin-inline: auto; font-size: .78rem; }
.light-foot .file-actions select { min-height: 40px; padding-block: .35rem; }
.light-foot .file-actions p { margin: 0; }
.light-foot [data-quiet-file-actions] { position: relative; }
.light-foot [data-quiet-file-actions] [data-document-file-choice] { display: flex; align-items: center; gap: .45rem; height: 44px; white-space: nowrap; }
.light-foot [data-quiet-file-actions] select { flex: 1; width: auto; min-width: 0; height: 44px; }
.light-foot [data-quiet-file-actions] .root-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.light-foot [data-quiet-file-actions] .root-options > :is(a, button) { min-width: 0; min-height: 44px; padding-inline: .5rem; }
.light-foot [data-quiet-file-actions] :is([data-document-download-label], [data-document-share-label]) { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .8rem; }
.light-foot [data-quiet-file-actions] [data-document-file-note] { display: none; }
.light-foot [data-quiet-file-actions] [data-document-share-status] { position: absolute; z-index: 4; inset-inline: 0; bottom: calc(100% + .5rem); border-radius: 15px; padding: .6rem; background: #241b36ed; }
.light-foot [data-quiet-file-actions] [data-document-share-status]:empty { display: none; }
.light-foot [data-quiet-file-actions][data-file-meta-loading="true"]::before { content: ''; position: absolute; bottom: calc(100% + .4rem); inset-inline-start: .5rem; width: 16px; height: 16px; border: 2px solid #e6ccff38; border-top-color: var(--mint); border-radius: 50%; animation: photo-spin .8s linear infinite; }
.family-media-file h1 { font-size: clamp(1.2rem, 3vw, 2rem); }
.document-open-tools { margin-top: .65rem; }
.document-image { display: block; width: 100%; max-height: 75dvh; object-fit: contain; background: #08060c; border-radius: var(--radius-control); }
.document-frame { display: block; width: 100%; min-height: 28rem; height: 75dvh; border: 0; border-radius: var(--radius-control); background: #171526; }
.document-text { margin: 0; max-height: 75dvh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; }
.home-shelf { margin-bottom: 2.25rem; scroll-margin-top: 6rem; }
.shelf-empty { padding: .85rem 1.1rem; color: var(--muted); background: var(--surface-sheen); border: 1px solid var(--border); border-radius: var(--radius-card); }
.shelf-item { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.shelf-item .media-card { flex: 1; align-content: start; }
.shelf-cover img { object-fit: contain; }
.resume-time { position: absolute; inset-inline-end: .5rem; bottom: .5rem; background: #100e17ed; border-radius: 7px; padding: .12rem .48rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.up-next-badge { position: absolute; inset-inline-start: .5rem; bottom: .5rem; background: #100e17ed; border-radius: 7px; padding: .12rem .48rem; color: var(--accent); font-size: .82rem; }
.shelf-actions, .start-options { display: flex; flex-wrap: wrap; gap: .4rem; }
.shelf-actions .button { flex: 1 1 auto; }
.shelf-actions .button, .shelf-item .favorite-form button { font-size: .88rem; padding-inline: .55rem; }
.shelf-item .favorite-form button { width: 100%; }
.favorite-form { margin: 0; }
.favorite-heart { color: var(--rose); font-size: 1.25rem; line-height: 1; text-shadow: 0 0 .65rem #ff9acd5a; }
.favorite-message { color: var(--muted); font-size: .9rem; }
.play-badge { position: absolute; bottom: .5rem; inset-inline-start: .5rem; background: #130b21ed; color: var(--accent); border: 1px solid #e7c5ff91; border-radius: 50%; width: 2.15rem; height: 2.15rem; display: grid; place-items: center; box-shadow: 0 0 .85rem #c797ff50; }
.offline-badge { position: absolute; top: .35rem; inset-inline-end: .35rem; border-radius: .45rem; background: #100e17ed; color: #fff; padding: .13rem .4rem; font-size: .7rem; }
.empty { border: 1px dashed #6b517f; border-radius: var(--radius); padding: clamp(1.25rem,5vw,3rem); text-align: center; color: var(--muted); background: #1a122680; }
.empty h1, .empty h3 { color: var(--text); margin-bottom: .5rem; }
.empty h1 { font-size: 1.8rem; }
.empty .icon { width: 2rem; height: 2rem; margin-bottom: .5rem; }
.empty .button { margin-top: 1rem; }
.panel, .login-panel { background: var(--surface-sheen); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1rem,3vw,1.65rem); min-width: 0; box-shadow: var(--surface-shadow); }
.login-panel { max-width: 33rem; margin: min(9vh, 5rem) auto 0; padding: clamp(1.2rem,5vw,2.5rem); border-color: #76539c; background: radial-gradient(ellipse at top right,#382354,transparent 68%), var(--surface); box-shadow: var(--surface-shadow), 0 0 2.3rem #a877ff36; }
.login-panel h1 { font-size: clamp(1.9rem,6vw,3.3rem); }
.login-panel > p:not(.eyebrow) { margin: .7rem 0 1.25rem; }
.dev-login { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: .8rem; }
.stack label, .inline-form label { display: grid; gap: .32rem; font-size: .92rem; color: #e2d7e7; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 1rem; align-items: start; }
.panel > h2 { margin-bottom: .8rem; }
.panel.stack > h2 { margin-bottom: 0; }
.source, .user-card { border-top: 1px solid var(--border); padding-top: .8rem; display: grid; gap: .45rem; min-width: 0; }
.source b { overflow-wrap: anywhere; text-align: left; font-size: .9rem; }
.source-meta, .root-options, .inline-form { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.source form { justify-self: start; }
.root-options button { max-width: 100%; overflow-wrap: anywhere; }
.inline-form { align-items: end; }
.inline-form label { flex: 1 1 6.6rem; }
.user-card .section-head { margin: 0; }
summary { cursor: pointer; padding: .4rem 0; }
.user-card details form { padding-block: .35rem; }
.folder-account label { min-width: 0; max-width: 24rem; }
.folder-tabs { margin-block: .8rem; }
.folder-path { text-align: start; overflow-wrap: anywhere; }
.share-options { min-width: 0; margin: 0; padding: .7rem; border: 1px solid var(--border); border-radius: var(--radius-card); }
.share-options legend { padding-inline: .35rem; color: var(--muted); }
.share-options .share-option { display: flex; align-items: center; min-height: 44px; gap: .6rem; padding: .35rem .5rem; border-radius: var(--radius-control); cursor: pointer; overflow-wrap: anywhere; }
.share-option:hover, .share-option:focus-within { background: #b389ec19; }
.share-option input { flex: none; width: 1.15rem; height: 1.15rem; min-height: 0; margin: 0; accent-color: var(--accent); }
.pill { display: inline-block; padding: .16rem .65rem; border: 1px solid #705786; border-radius: 100px; font-size: .78rem; color: #eadbfa; background: #c79bff13; overflow-wrap: anywhere; }
.notice { padding: .8rem 1rem; background: #203e35; color: #dcf7e9; border: 1px solid #3f7460; border-radius: 12px; margin-bottom: .8rem; }
.notice.error { background: #49282e; color: #ffd4d7; border-color: #794b56; }
#directory-path { overflow-wrap: anywhere; margin-block: .25rem .65rem; font-size: .85rem; }
#directory-list { padding: 0; list-style: none; display: grid; gap: .25rem; max-height: 19rem; overflow: auto; }
#directory-list button { justify-content: start; width: 100%; text-align: start; overflow-wrap: anywhere; }
.lightbox { color: var(--text); border: 1px solid #a181c3; border-radius: var(--radius); background: var(--surface-sheen); box-shadow: 0 0 2.2rem #bd88ff52; width: min(96vw, 1000px); max-height: 92dvh; padding: .65rem; overflow: auto; }
.lightbox[open] { animation: reveal .22s ease both; }
.lightbox::backdrop { background: #090511eb; backdrop-filter: blur(9px); }
.photo-viewer-open, .photo-viewer-open body { overflow: hidden; }
.light-head, .light-foot { display: flex; min-width: 0; justify-content: space-between; align-items: center; gap: .55rem; padding: .25rem; }
.light-head p { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: .92rem; }
.light-head > :not(p) { flex: none; }
#light-index { direction: ltr; color: var(--muted); font-size: .82rem; }
.light-foot { position: relative; justify-content: center; flex-wrap: wrap; text-align: center; }
.light-notices { position: absolute; z-index: 4; bottom: calc(100% + .5rem); inset-inline: .7rem; display: grid; gap: .3rem; pointer-events: none; }
.light-notices > span { padding: .5rem .7rem; border-radius: 15px; background: #241b36eb; color: #eee5fa; font-size: .78rem; }
.light-foot > a, .light-foot > span { font-size: .84rem; }
.light-stage { position: relative; min-width: 0; min-height: 0; }
.light-surface { position: relative; width: 100%; height: min(62dvh, 680px); overflow: hidden; background: #08060c; touch-action: none; }
.light-frame { position: relative; width: 100%; height: 100%; }
.light-surface .light-ambience { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(28px) brightness(.62) saturate(1.3); transform: scale(1.16); pointer-events: none; }
.light-glass { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 25% 12%, #f6eaff1c, transparent 65%), linear-gradient(135deg, #d5b5ff16, #08061130); box-shadow: inset 0 0 5rem #08061135; }
.light-frame { z-index: 1; }
.photo-loading { position: absolute; z-index: 3; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: max-content; max-width: calc(100% - 2rem); display: flex; flex-direction: column; align-items: center; gap: .8rem; padding: 1rem 1.4rem; border: 1px solid #e8d3ff4d; border-radius: 24px; background: #241b36c9; backdrop-filter: blur(18px); box-shadow: 0 .8rem 3rem #05020b5c, inset 0 1px #ffffff24; text-align: center; color: #fbf7ff; font-size: .88rem; }
.photo-spinner { width: 36px; height: 36px; border: 3px solid #e6ccff38; border-top-color: var(--mint); border-right-color: var(--accent); border-radius: 50%; animation: photo-spin .8s linear infinite; }
@keyframes photo-spin { to { transform: rotate(360deg); } }
.light-outgoing { position: absolute; inset: 0; pointer-events: none; }
.lightbox[data-hide-caption] #light-title { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); }
.lightbox[data-preparing] #light-index { visibility: hidden; }
.light-surface img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.light-surface.zoomed { cursor: grab; }
.light-surface.zoomed:active { cursor: grabbing; }
.light-stage > button { position: absolute; top: 50%; transform: translateY(-50%); width: clamp(44px, 6vw, 54px); aspect-ratio: 1; padding: 0; background: #181027d9; }
.light-stage > button .icon { width: clamp(24px, 3vw, 30px); height: auto; stroke-width: 2.4; }
.light-prev { inset-inline-start: max(.4rem, env(safe-area-inset-right)); }
.light-prev .icon { transform: scaleX(-1); }
.light-next { inset-inline-end: max(.4rem, env(safe-area-inset-left)); }
.light-zoom { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem; max-width: 100%; direction: ltr; }
.light-zoom button { min-width: 44px; padding-inline: .55rem; }
.light-zoom [data-zoom="reset"] { font-size: .83rem; font-variant-numeric: tabular-nums; }
.light-zoom button:disabled { cursor: default; }
.light-foot [data-photo-fullscreen] { min-width: 44px; padding-inline: .55rem; }
.light-foot [data-photo-fullscreen][aria-pressed="true"] { color: var(--mint); }
.light-foot [data-slideshow-toggle] { width: 8.8rem; flex: none; white-space: nowrap; }
.lightbox[data-preparing] [data-slideshow-toggle][hidden] { display: inline-flex !important; visibility: hidden; }
.light-stage > button:disabled { cursor: default; }
.lightbox[data-slideshow][data-expanded-view] [data-step],
.lightbox[data-slideshow] .light-screen:fullscreen [data-step] { display: none; }
.slideshow-config { width: min(calc(100% - 1.5rem), 33rem); max-height: calc(100dvh - 1.5rem); overflow: auto; overflow-wrap: anywhere; color: var(--text); border-color: #a181c3; }
.slideshow-config::backdrop { background: #0b0715ce; backdrop-filter: blur(6px); }
.slideshow-config .section-head { margin-bottom: 0; }
.slideshow-config-actions { position: sticky; bottom: -.5rem; z-index: 1; padding: .65rem 0; background: #181126f5; border-top: 1px solid #d7b0ff36; }
.slideshow-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: .65rem; }
.slideshow-fields label { min-width: 0; }
.slideshow-toggles { display: flex; flex-wrap: wrap; gap: .35rem .85rem; }
.slideshow-config .slideshow-toggles label, .slideshow-config .slideshow-song-shuffle { display: flex; align-items: center; min-height: 44px; gap: .4rem; }
.slideshow-config input[type="checkbox"] { width: 1.15rem; height: 1.15rem; min-height: 0; flex: none; margin: 0; padding: 0; accent-color: var(--accent); }
.slideshow-config input[type="range"] { margin: 0; accent-color: var(--accent); }
.lightbox[data-expanded-view] { position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: #08060c; overflow: hidden; animation: none; }
:is(.lightbox[data-expanded-view] .light-screen, .light-screen:fullscreen) { width: 100%; height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; background: #08060c; }
:is(.lightbox[data-expanded-view] .light-screen, .light-screen:fullscreen) .light-surface { height: 100%; }
:is(.lightbox[data-expanded-view] .light-screen, .light-screen:fullscreen) { grid-template-rows: minmax(0, 1fr); }
:is(.lightbox[data-expanded-view] .light-screen, .light-screen:fullscreen) :is(.light-head, .light-foot, button) { display: none !important; }
@media (max-width: 860px), (pointer: coarse), (max-width: 1050px) and (max-height: 530px) {
  .lightbox { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: #08060c; overflow: hidden; }
  .lightbox[open] { animation: none; }
  .light-screen { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
  .light-surface { height: 100%; }
  .light-head, .light-foot { background: #110d1b; padding-inline: max(.55rem, env(safe-area-inset-right)) max(.55rem, env(safe-area-inset-left)); }
  .light-head { padding-top: max(.35rem, env(safe-area-inset-top)); }
  .light-foot { padding-bottom: max(.35rem, env(safe-area-inset-bottom)); }
}
.photo-map { display: block; width: 100%; background: #101c35; border: 1px solid #53627e; border-radius: var(--radius-card); }
.photo-map path { fill: #426a6f; fill-rule: evenodd; }
.photo-map circle { fill: var(--mint); }
.photo-map text { fill: #102823; font-size: 2.35px; font-weight: 800; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.photo-map a:hover circle, .photo-map a:focus circle { fill: #fff; }
.map-links { display: flex; gap: .5rem; flex-wrap: wrap; margin-block: .8rem; }
.watch-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .65rem; margin-bottom: .8rem; }
.series-heading .favorite-form { margin-top: .7rem; }
.screen { position: relative; overflow: hidden; border-radius: var(--radius); background: #050507; border: 1px solid #775893; box-shadow: 0 0 1.8rem #ae76ff37; }
.screen video { width: 100%; max-height: 72vh; min-height: 12rem; aspect-ratio: 16/9; display: block; object-fit: contain; background: #060508; }
.screen-overlay { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 55%, #392356c4, #0d0919e6 85%); display: grid; align-content: safe center; justify-items: center; gap: .5rem; text-align: center; padding: 1rem; overflow: auto; }
.start-options { justify-content: center; }
.up-next { background: #100d1aee; overflow: auto; }
.player-message { color: #f0deef; font-size: .92rem; }
.player-tools { display: flex; align-items: end; flex-wrap: wrap; gap: .55rem; padding-block: .75rem; }
.player-tools label { display: flex; align-items: center; gap: .45rem; }
.music-filters { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)) auto; gap: .65rem; align-items: end; margin-bottom: 1.25rem; }
.music-filters label { display: grid; gap: .3rem; min-width: 0; color: var(--muted); }
.floating-music { position: fixed; z-index: 6; inset-inline-end: 1rem; bottom: max(1rem, env(safe-area-inset-bottom)); width: min(100% - 2rem, 29rem); max-height: 68vh; overflow: hidden auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: .25rem; padding: .4rem; border: 1px solid #96755c; border-radius: var(--radius-card); background: radial-gradient(ellipse at top right, #4d334c, transparent 80%), #1b1428; box-shadow: var(--surface-shadow), 0 0 1.6rem #ffc98524; }
.floating-music { isolation: isolate; }
.floating-music > :not(.music-spectrum) { position: relative; z-index: 1; }
.floating-music .music-spectrum { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .12; z-index: 0; transition: opacity .4s ease; }
.floating-music[data-spectrum-active] .music-spectrum { opacity: .72; }
.floating-music .music-bar-buttons button:not([data-music-toggle]):not([aria-pressed="true"]), .floating-music .music-utility button, .floating-music button.music-grip { background-color: #21172cb3; }
.floating-music[data-positioned] { inset: var(--music-top) auto auto var(--music-left); max-width: var(--music-bound-width); max-height: min(68vh, var(--music-bound-height)); }
.music-open .site-footer { padding-bottom: 11rem; }
.shell:focus { outline: none; }
.page-loading::after { content: ''; position: fixed; z-index: 30; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, transparent, var(--mint), var(--accent), transparent); animation: loading-progress 1s linear infinite; pointer-events: none; }
@keyframes loading-progress { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
.music-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .25rem; }
.music-now { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .4rem; min-width: 0; }
.music-now > div, .music-label { min-width: 0; overflow-wrap: anywhere; }
.music-now strong, .music-now small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.9; padding-block: .04em; }
.music-now strong { font-size: .9rem; }
.music-now small { font-size: .72rem; }
.floating-music[data-minimized] > :not(.music-bar):not(.sr):not(.music-spectrum), .floating-music[data-minimized] :is([data-music-sleep-button], [data-music-equalizer-button], [data-music-playlist-button], [data-music-details], [data-music-status]) { display: none; }
.floating-music[data-minimized] { max-height: none; }
.music-minimized.music-open .site-footer { padding-bottom: calc(8rem + env(safe-area-inset-bottom)); }
.music-symbol { display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: 13px; border: 1px solid #bf956969; background: #ffd89915; color: #ffd89a; }
.music-now button.music-grip { width: 36px; min-height: 38px; padding: 0; color: #ffd89a; cursor: grab; touch-action: none; user-select: none; }
.floating-music[data-dragging] .music-grip { cursor: grabbing; }
.music-utility { display: flex; gap: .2rem; }
.music-utility button:not(.media-card) { width: 36px; min-height: 38px; padding: 0; }
.music-utility [aria-expanded="true"] { color: #ffd89a; border-color: #d7a76b; background: #53384b; }
.music-utility [data-music-sleep-button][aria-pressed="true"] { color: var(--mint); border-color: #75b8ac; background: #17352f; }
.music-now [data-music-sleep-countdown] { color: var(--mint); font-variant-numeric: tabular-nums; }
.music-now div:has([data-music-sleep-countdown]:not([hidden])) [data-music-details] { display: none; }
.music-sleep-panel { padding: .5rem .2rem .2rem; border-top: 1px solid var(--border); }
.music-sleep-panel .section-head { margin-bottom: 0; gap: .5rem; flex-wrap: wrap; }
.music-sleep-panel .section-head button { padding: .35rem .6rem; font-size: .8rem; }
.music-sleep-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
.music-sleep-presets button { padding-inline: .3rem; font-size: .8rem; }
.music-sleep-form label { flex: 1 1 8rem; min-width: 0; }
.music-bar-buttons { display: grid; direction: ltr; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.35fr) minmax(0, 1fr); align-items: center; gap: .2rem; }
.music-bar-buttons button:not(.media-card) { position: relative; min-width: 0; min-height: 44px; padding: 0; }
.music-bar-buttons button[data-music-toggle] { min-height: 50px; color: var(--accent-ink); background: #ffd89a; border-color: #ffebb9; }
.music-bar-buttons [data-music-toggle] .icon { width: 1.5rem; height: 1.5rem; }
.music-bar-buttons button[data-music-toggle]:hover { background: #ffe7b8; }
.floating-music > audio { display: block; width: 100%; min-width: 0; height: 44px; }
.music-playlist-panel { padding: .45rem .2rem .2rem; border-top: 1px solid var(--border); }
.music-utility [data-music-equalizer-button][data-enabled] { color: var(--mint); border-color: #75b8ac; }
.music-equalizer-panel { padding: .6rem .35rem .25rem; border-top: 1px solid var(--border); border-radius: 0 0 1rem 1rem; background: #110c1b94; gap: .5rem; }
.music-equalizer-panel .music-motion-preference { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem; align-items: center; margin-top: .6rem; font-size: .8rem; }
.music-motion-preference select { width: 100%; padding: .3rem .6rem; min-width: 0; font-size: 16px; }
.music-equalizer-panel .section-head { margin: 0; gap: .5rem; }
.music-equalizer-panel .section-head strong { font-size: .9rem; }
.music-equalizer-panel fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.music-equalizer-panel .music-effect-switch { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; white-space: nowrap; }
.music-effect-switch input[type="checkbox"] { width: 1.1rem; height: 1.1rem; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: #baecda; }
.music-equalizer-preset { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .6rem; font-size: .8rem; }
.music-equalizer-preset select { min-width: 0; width: 100%; padding: .35rem .6rem; font-size: 16px; }
.music-equalizer-bands { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .15rem; padding-block: .7rem .45rem; }
.music-equalizer-bands label { display: grid; justify-items: center; gap: .25rem; min-width: 0; font-size: .75rem; font-variant-numeric: tabular-nums; }
.music-equalizer-bands output { color: #e1c4ff; font-size: .72rem; white-space: nowrap; }
.music-equalizer-bands input { writing-mode: vertical-lr; direction: rtl; width: 44px; height: 96px; padding: 0; accent-color: #d6b1ff; cursor: ns-resize; }
.music-equalizer-bands small { font-size: .6rem; color: var(--muted); }
.music-equalizer-options { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.music-equalizer-options button { padding: .35rem .55rem; min-height: 38px; font-size: .75rem; }
.music-equalizer-panel [data-equalizer-status] { font-size: .78rem; margin: 0; }
.music-bar-buttons button:disabled, .music-edit-track button:disabled { cursor: default; }
.music-edit-track { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; }
.music-bar-buttons button[aria-pressed="true"] { color: #ffd89a; border-color: #d7a76b; background: #53384b; }
.music-bar-buttons [data-music-favorite][aria-pressed="true"] .icon { color: var(--rose); fill: currentColor; }
.repeat-one { display: none; }
[data-music-repeat][data-mode="one"] .repeat-one { display: inline; }
.music-add label, .music-manage .inline-form label { min-width: 0; }
.floating-music [role="status"]:empty { display: none; }
.music-now div:has([data-music-status]:not(:empty)) [data-music-details] { display: none; }
.music-manage { margin-bottom: 1.25rem; }
.music-manage summary { min-height: 44px; }
.music-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.music-edit-track { margin: .25rem .4rem .5rem; }
button.music-track { width: 100%; justify-content: flex-start; padding: .65rem; text-align: start; }
.music-track[aria-current] { border-color: #d7a76b; box-shadow: 0 0 .85rem #ffc9852c; }
.music-label { flex: 1; }
.music-label small { display: block; color: var(--muted); font-weight: 500; }
.music-time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .82rem; }
.music-shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: .65rem; }
.music-shortcut { display: flex; align-items: center; gap: .7rem; padding: .75rem; min-width: 0; background: var(--surface-sheen); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--surface-shadow); }
.music-shortcut:hover { border-color: #d7a76b; }
.music-shortcut .music-label strong { display: block; }
.reveal { animation: reveal .38s cubic-bezier(.22,.7,.25,1) both; }
@keyframes reveal { from { opacity: .15; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 940px) {
  .desktop-nav { display: none; }
  .header-inner, .shell, .site-footer { width: min(100% - 1.75rem,1200px); }
  .header-inner { flex-wrap: wrap; padding-block: .4rem; }
  .account { flex-wrap: wrap; }
  .account button.quiet { padding-inline: .55rem; }
  .site-footer:has(~ .mobile-nav) { padding-bottom: calc(6.3rem + env(safe-area-inset-bottom)); }
  .mobile-nav { position: fixed; z-index: 5; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); gap: .15rem; inset-inline: .45rem; bottom: .35rem; padding: .25rem .3rem calc(.25rem + env(safe-area-inset-bottom)); background: #171026f5; border: 1px solid #785998a3; border-radius: 19px; box-shadow: 0 0 1.45rem #a76aff38, 0 .3rem 1.3rem #04020cbd; backdrop-filter: blur(18px); }
  .mobile-nav a { min-width: 0; display: grid; grid-template-rows: minmax(1.4rem, auto) auto; justify-items: center; align-content: start; gap: .25rem; min-height: 70px; text-align: center; overflow-wrap: normal; line-height: 1.85; border: 1px solid transparent; border-radius: 13px; color: var(--muted); font-size: clamp(.58rem, 2.65vw, .7rem); padding: .35rem .1rem; }
  .mobile-nav a span { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .mobile-nav a[href="/library/series"] span { font-size: .9em; }
  .mobile-nav a.active { color: var(--accent); background: #ae7aff26; border-color: #bc90f76e; }
  .mobile-nav a.active .icon { filter: drop-shadow(0 0 .38rem #cea9ffc2); }
  .floating-music { inset-inline-end: .45rem; width: calc(100% - .9rem); bottom: calc(var(--music-nav-height, 4.45rem) + .75rem); max-height: min(68dvh, calc(100dvh - var(--music-nav-height, 4.45rem) - 5.5rem)); }
  .music-open .site-footer { padding-bottom: calc(16rem + env(safe-area-inset-bottom)); }
  .hero-visual { opacity: .52; inset-inline-start: 55%; inset-inline-end: 0; }
  input:not([type=checkbox]):not([type=radio]), select { font-size: max(1rem, 16px); }
  .category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem; }
  .media-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: .65rem; }
  .admin-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 520px) {
  .header-inner { min-height: 61px; gap: .2rem .55rem; }
  .brand-mark { width: 44px; height: 44px; border-radius: 14px; }
  .hero { min-height: 0; margin-bottom: 1.6rem; padding: 1.2rem; border-radius: var(--radius); }
  .hero-visual { inset: 0 45% 28% -12%; opacity: .23; }
  .category-tile { min-height: 173px; padding: .8rem; }
  .category-tile p { font-size: .8rem; }
  .media-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .media-label { padding: .5rem; font-size: .85rem; }
  .music-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .music-filters label:first-child, .music-filters button { grid-column: 1 / -1; }
}
@media (max-width: 350px) {
  .admin-link span { display: none; }
  .admin-link { width: 44px; justify-content: center; }
  .brand { gap: .45rem; }
}
@media (max-width: 320px) {
  .header-inner, .shell, .site-footer { width: calc(100% - 1rem); }
  .media-grid, .category-grid { grid-template-columns: minmax(0, 1fr); }
  .hero, .page-intro, .panel, .login-panel { padding-inline: .85rem; }
  .mobile-nav { inset-inline: .2rem; padding-inline: .15rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
.media-art.cover-art { aspect-ratio: 2 / 3; }
.catalog-entry { grid-template-columns: 70px minmax(0, 1fr); gap: .8rem; }
.catalog-entry > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-fit: cover; border-radius: 10px; }
.series-heading { display: grid; grid-template-columns: clamp(76px, 16vw, 140px) minmax(0, 1fr); align-items: center; gap: 1rem; }
.series-heading > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-fit: cover; border-radius: 12px; }
.series-heading h1 { overflow-wrap: anywhere; }
.series-watch-actions { grid-column: 1 / -1; }
.series-heading, .episode-row, .season-panel { scroll-margin-top: 6rem; }
.episode-heading { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .7rem; }
.episode-heading h3 { overflow-wrap: anywhere; }
.episode-status { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .5rem; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: .8rem; }
.episode-status.watched { background: #17352f; color: #b9fbe9; border-color: #4a8579; }
.episode-status.in-progress { color: var(--accent); }
.media-label .episode-status { justify-self: start; }
.movie-watch-actions { margin-bottom: .8rem; }
.family-filters, .family-review-status { margin-bottom: 1rem; }
.family-filters .pill { color: inherit; border-color: currentColor; }
.family-pages { margin-top: 1rem; }
.review-card { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface-sheen); box-shadow: var(--surface-shadow); }
.review-card label { display: block; cursor: pointer; }
.review-choice { display: flex; align-items: center; gap: .55rem; padding: .65rem; overflow-wrap: anywhere; }
.review-choice input { width: 1.25rem; height: 1.25rem; min-height: 0; flex: none; accent-color: var(--accent); }
.review-context { display: flex; flex-wrap: wrap; gap: .4rem .65rem; padding: 0 .65rem .65rem; color: var(--muted); font-size: .84rem; }
.review-context a { color: var(--accent); }
.face-art { aspect-ratio: 4 / 3; }
.face-art img { object-fit: contain; }
.face-group-card { cursor: default; }
.face-group-link { display: block; min-width: 0; }
.quick-face-name { padding: 0 .55rem .65rem; }
.face-name-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .4rem; }
.face-name-fields label { min-width: 0; }
.face-name-fields button { padding-inline: .6rem; font-size: .85rem; }
.inline-face-error { color: #ffb0b6; font-size: .78rem; margin-top: .4rem; overflow-wrap: anywhere; }
.face-name-status { min-height: 1.5em; margin-block: .4rem; color: var(--mint); }
.person-relationship-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-block: .3rem 1rem; }
.person-relationship-filters .button { font-size: .82rem; padding: .4rem .65rem; }
.person-relationship-form { display: grid; gap: .3rem; padding: 0 .55rem .65rem; }
.person-relationship-buttons { display: flex; flex-wrap: wrap; gap: .35rem; }
.person-relationship-buttons button { flex: 1; min-width: 0; font-size: .72rem; padding: .4rem .2rem; white-space: nowrap; }
.person-relationship-buttons [name="is_family"][aria-pressed="true"] { background: #183f37; border-color: #78cabb; color: var(--mint); }
.person-relationship-buttons [name="is_friend"][aria-pressed="true"] { background: #44283d; border-color: #d792bc; color: var(--rose); }
.person-relationship-buttons [name="category"][aria-pressed="true"] { background: #362c46; border-color: #aa87cd; }
.person-card-item { display: grid; grid-template-rows: 1fr auto; min-width: 0; gap: .2rem; }
.person-category-select { font-size: 16px; min-height: 44px; padding: .3rem .15rem; border-radius: 11px; }
.person-category-status { min-height: 1.7em; margin-block-start: .25rem; font-size: .75rem; }
.family-filter-panel .people-grid:has(.person-category-select) { grid-auto-columns: 6rem; }
.person-relationship-feedback { font-size: .75rem; overflow-wrap: anywhere; }
.photo-admin-tools { margin-bottom: .8rem; padding: 1rem; }
.photo-admin-tools summary { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; min-height: 44px; cursor: pointer; font-size: .9rem; }
.photo-admin-tools summary > .icon { margin-inline-start: auto; width: 16px; height: 16px; }
.photo-admin-tools[open] summary > .icon { transform: rotate(-90deg); }
.photo-analysis-body { padding-block-start: .65rem; font-size: .8rem; }
.photo-topic-shortcuts .button { font-size: .78rem; padding: .35rem .65rem; box-shadow: none; }
.photo-admin-tabs { display: flex; flex-wrap: wrap; gap: .45rem; margin-block: 1rem; }
.photo-admin-tabs .button { flex: 1 1 8rem; font-size: .8rem; padding: .45rem .6rem; text-align: center; }
.photo-admin-review { min-width: 0; }
.review-media-filter .button { font-size: .78rem; padding: .4rem .6rem; }
.face-cover-link { margin: 0 .55rem .65rem; font-size: .75rem; padding: .4rem; }
.person-cover-link { margin-block-start: .6rem; }
.person-cover-picker > div > p { margin-block-start: .4rem; font-size: .8rem; }
.portrait-choice .face-art { aspect-ratio: 1; }
.portrait-choice .media-label { font-size: .8rem; width: 100%; }
.portrait-choice[aria-pressed="true"] { border-color: var(--mint); box-shadow: 0 0 .75rem #91f3e030; }
.portrait-choice:disabled { opacity: 1; cursor: default; }
.person-cover-upload { padding: 1rem; border-radius: 20px; }
.person-cover-upload h4 { margin: 0; font-size: .95rem; }
.person-cover-upload input[type="file"] { min-width: 0; max-width: 100%; padding: .45rem; }
.person-cover-file-field { position: relative; min-width: 0; }
.person-cover-file-field > input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.person-cover-file-field:focus-within > .button { outline: 2px solid var(--mint); outline-offset: 2px; }
.person-cover-file-field > small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; color: var(--muted); }
.person-cover-preview, .uploaded-person-cover > img { width: min(100%, 180px); aspect-ratio: 1; border-radius: 50%; border: 2px solid #b9a0d4; overflow: hidden; justify-self: center; background: #211a35; }
.person-cover-preview { position: relative; width: min(100%,260px); touch-action: none; overscroll-behavior: contain; user-select: none; cursor: grab; direction: ltr; }
.person-cover-preview[data-dragging] { cursor: grabbing; }
.person-cover-preview img { position: absolute; left: 0; top: 0; display: block; max-width: none; pointer-events: none; user-select: none; -webkit-user-drag: none; transform-origin: 0 0; }
.person-cover-gesture-hint { font-size: .78rem; text-align: center; }
.person-cover-zoom-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.person-cover-fine-controls > summary { min-height: 44px; cursor: pointer; font-size: .8rem; }
.uploaded-person-cover { display: grid; justify-items: center; gap: .4rem; font-size: .78rem; color: var(--muted); }
.uploaded-person-cover > img { object-fit: cover; }
.person-cover-upload input[type="range"] { padding: 0; accent-color: var(--mint); }
.person-cover-upload-feedback { min-height: 1.8em; font-size: .78rem; }
.person-profile .person-relationship-form { padding: .6rem 0 0; }
.person-profile .person-relationship-buttons { max-width: 16rem; }
.person-relationship-badges { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; }
.friend-person .person-portrait { border-color: var(--rose); }
.family-person .person-portrait { border-color: var(--mint); }
.people-shelf { padding: 1rem; border: 1px solid #705189; border-radius: var(--radius); background: radial-gradient(ellipse at top right,#39254f,transparent 85%), var(--surface); box-shadow: var(--surface-shadow), 0 0 1.6rem #aa77f72c; }
.hero .hero-family-link { font-size: .9rem; padding-inline: .72rem; }
.hero .eyebrow bdi { min-width: 0; overflow-wrap: anywhere; }
.home-people { margin-block-start: .85rem; max-width: 100%; width: fit-content; padding: .3rem .55rem; background: #130c20bd; border: 1px solid #785799; border-radius: 17px; box-shadow: inset 0 1px #e6c1ff19, 0 0 1.1rem #ac78ff20; }
.home-people .people-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 4rem; gap: .2rem; padding: .3rem; overflow-x: auto; scrollbar-width: thin; }
.home-people .person-card { padding: .2rem; font-size: .76rem; border-radius: 10px; }
.home-people .person-portrait { width: 44px; padding: 2px; }
.family-folder-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: .65rem; }
.family-folder-card { --hue: var(--accent); display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; min-width: 0; padding: .75rem; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface-sheen); box-shadow: var(--surface-shadow); }
.family-shelf.shared .family-folder-card { --hue: var(--mint); border-color: #4f897e; }
.family-folder-card:hover, .family-shelf.shared .family-folder-card:hover { border-color: var(--hue); box-shadow: var(--surface-shadow), 0 0 .9rem #a877ff30; }
.family-folder-label { flex: 1 1 8rem; min-width: 0; display: grid; overflow-wrap: anywhere; }
.family-folder-label small { color: var(--muted); }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .55rem; }
.person-card { min-width: 0; display: grid; justify-items: center; align-content: start; gap: .2rem; padding: .65rem .3rem; text-align: center; border: 1px solid transparent; border-radius: 16px; transition: border-color .2s, background .2s; }
.person-card:hover, .person-card[aria-current] { background: #ac78ff20; border-color: #9069b1; }
.person-choice { position: relative; cursor: pointer; }
.person-choice input { position: absolute; inset-block-start: .5rem; inset-inline-start: .5rem; width: 1.2rem; height: 1.2rem; min-height: 0; margin: 0; padding: 0; accent-color: var(--mint); }
.person-choice:has(input:checked) { background: #ac78ff20; border-color: var(--mint); }
.person-choice:has(input:checked) .person-portrait { border-color: var(--mint); box-shadow: 0 0 .85rem #91f3e075; }
.person-portrait { width: clamp(68px, 11vw, 92px); aspect-ratio: 1; padding: 3px; border: 1px solid #be98ec; border-radius: 50%; background: #170f28; box-shadow: 0 0 .8rem #bc89fa63, 0 .3rem 1rem #100a19a0; }
.person-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.person-card[aria-current] .person-portrait { border-color: var(--mint); box-shadow: 0 0 .85rem #91f3e075; }
.person-card strong { max-width: 100%; overflow-wrap: anywhere; }
.person-card small { color: var(--muted); }
.person-profile { display: flex; align-items: center; gap: clamp(.8rem, 3vw, 1.75rem); }
.person-profile > div { min-width: 0; }
.person-profile .person-portrait { flex: none; width: clamp(72px, 14vw, 120px); }
.merge-card .media-label button { margin-block-start: .35rem; }

/* Home: a compact welcome, clear destinations and independently scrollable shelves. */
.home-layout { display: grid; gap: 1.35rem; min-width: 0; }
.home-layout > * { min-width: 0; }
.home-welcome.hero { min-height: 238px; padding: clamp(1.1rem, 2.8vw, 1.7rem); margin: 0; border-color: #78549a8c; border-radius: 26px; box-shadow: inset 0 1px #e3baff26, 0 .7rem 2rem #02010950; }
.home-welcome .hero-copy { width: min(100%, 35rem); }
.home-welcome h1 { font-size: clamp(1.65rem, 3.4vw, 2.65rem); line-height: 1.5; }
.home-welcome .eyebrow { font-size: .76rem; font-weight: 550; margin-bottom: .3rem; }
.home-welcome .hero-copy > p:not(.eyebrow) { font-size: .86rem; line-height: 1.9; margin: .4rem 0 0; max-width: 29rem; }
.home-welcome .hero-visual { opacity: .72; inset: 0 58% 0 2%; }
.home-welcome .hero-frame { width: min(61%, 220px); }
.home-welcome .home-people { margin-top: .75rem; padding: .15rem .3rem; border-color: #b293d336; background: #17102285; box-shadow: inset 0 1px #e6c1ff0d; }
.home-welcome .home-people .people-grid { grid-auto-columns: 3.7rem; gap: .2rem; padding: .2rem; }
.home-welcome .home-people .person-card { font-size: .7rem; }
.home-welcome .home-people .person-portrait { width: 40px; box-shadow: 0 .2rem .6rem #100a1970; }
.home-layout .section-head { gap: .5rem; margin-bottom: .8rem; }
.home-layout .section-head h2 { font-size: clamp(1.1rem, 2vw, 1.3rem); line-height: 1.7; }
.home-layout .section-head h2::before { width: 3px; box-shadow: none; }
.home-count { flex: none; display: inline-flex; align-items: center; padding: .12rem .55rem; border: 1px solid #ad8ad52e; border-radius: 99px; color: var(--muted); background: #c8a3ff0a; font-size: .7rem; font-variant-numeric: tabular-nums; }
.home-category-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .65rem; }
.home-category { --hue: #ddc4ff; --wash: #38264e; display: grid; justify-items: start; align-content: start; gap: .3rem; min-width: 0; padding: .9rem; border: 1px solid #ffffff15; border-radius: 20px; background: radial-gradient(ellipse at 100% 0, var(--wash), transparent 95%), #161121; box-shadow: inset 0 1px #ffffff0a, 0 .35rem .9rem #04020c30; transition: border-color .18s, background-color .18s, transform .18s; }
.home-category.series { --hue: #ffb6d9; --wash: #46283e; }
.home-category.photos { --hue: #91f3e0; --wash: #1c3c3d; }
.home-category.videos { --hue: #b6d2ff; --wash: #24334c; }
.home-category.music { --hue: #ffd89a; --wash: #43342f; }
.home-category.documents { --hue: #bec9ff; --wash: #2b304d; }
.home-category .tile-icon { width: 36px; height: 36px; border-radius: 12px; border-color: #ffffff20; margin-bottom: .2rem; box-shadow: inset 0 1px #ffffff10; }
.home-category .tile-icon .icon { width: 20px; height: 20px; filter: none; }
.home-category strong { font-size: .86rem; font-weight: 600; line-height: 1.9; overflow-wrap: normal; }
.home-category small { font-size: .7rem; line-height: 1.8; color: var(--muted); }
.home-category:hover { border-color: var(--hue); }
@media (hover: hover) and (pointer: fine) { .home-category:hover { transform: translateY(-2px); } }
.home-panel { min-width: 0; padding: 1rem; border: 1px solid #aa87cd2e; border-radius: 22px; background: linear-gradient(145deg, #21182f85, #151020ba); box-shadow: inset 0 1px #ffffff06; }
.home-layout .home-shelf { margin-bottom: 0; }
.home-folder-shelves, .home-empty-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.home-folder-shelves > :only-child, .home-empty-grid > :only-child { grid-column: 1 / -1; }
.home-layout .family-folder-grid { grid-template-columns: minmax(0, 1fr); }
.home-layout .family-folder-card { gap: .6rem; padding: .7rem; border-radius: 15px; background: #ffffff03; box-shadow: none; }
.home-layout .family-folder-card .tile-icon { width: 36px; height: 36px; border-radius: 12px; box-shadow: none; }
.home-layout .family-folder-card .tile-icon .icon { width: 20px; height: 20px; filter: none; }
.home-layout .family-folder-label strong { font-size: .88rem; font-weight: 550; line-height: 1.9; }
.home-layout .family-folder-label small { font-size: .74rem; }
.home-layout .family-shelf.shared .family-folder-card { border-color: #91f3e02e; }
.home-media-row { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 23%); align-items: stretch; gap: .7rem; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x proximity; scrollbar-width: thin; padding: .2rem .1rem .6rem; }
.home-media-row .shelf-item { scroll-snap-align: start; }
.home-media-row .media-card { border-radius: 15px; box-shadow: none; }
.home-media-row .media-label { padding: .6rem; font-size: .86rem; }
.home-media-row .media-label small { font-size: .74rem; }
.home-media-row .shelf-actions .button, .home-media-row .favorite-form button { min-height: 44px; font-size: .76rem; padding: .45rem .4rem; border-radius: 12px; box-shadow: none; }
.home-media-row .resume-time, .home-media-row .up-next-badge { font-size: .72rem; }
.home-section-links { display: flex; flex-wrap: wrap; gap: .2rem .6rem; color: #e5ca9f; font-size: .73rem; }
.home-section-links a { min-height: 44px; display: inline-flex; align-items: center; border-radius: 10px; padding-inline: .25rem; }
.home-music .music-shortcut { display: flex; width: 100%; justify-content: flex-start; gap: .7rem; padding: .65rem; border-radius: 15px; background: #ffffff03; box-shadow: none; text-align: start; font-weight: inherit; }
.home-music .music-label { min-width: 0; font-size: .86rem; }
.home-music .music-label strong, .home-music .music-label small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.home-music .music-label small { font-size: .74rem; }
.home-music .music-symbol { width: 36px; height: 36px; border-radius: 12px; flex: none; }
.home-empty-hint { padding: 1rem; border: 1px dashed #aa87cd32; border-radius: 20px; background: #21182f35; }
.home-empty-hint h2 { display: flex; align-items: center; gap: .5rem; color: #dfc7fa; font-size: 1rem; line-height: 1.9; }
.home-empty-hint h2 .icon { width: 18px; height: 18px; }
.home-empty-hint p { margin-top: .3rem; color: var(--muted); font-size: .8rem; }
@media (max-width: 940px) {
  .home-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-welcome .hero-visual { inset: 0 53% 0 -4%; opacity: .32; }
  .home-media-row { grid-auto-columns: minmax(160px, 31%); }
}
@media (max-width: 600px) {
  .admin-link span { display: none; }
  .admin-link { min-width: 44px; justify-content: center; }
  .home-layout { gap: 1.2rem; }
  .home-welcome.hero { min-height: 0; padding: 1.1rem; border-radius: 22px; }
  .home-welcome h1 { font-size: 1.65rem; }
  .home-welcome .hero-copy > p:not(.eyebrow) { font-size: .8rem; max-width: 21rem; }
  .home-welcome .hero-visual { inset: 0 50% 20% -25%; opacity: .13; }
  .home-category-grid { gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, max(6rem, calc((100% - 1rem) / 3))), 1fr)); }
  .home-category { padding: .75rem .6rem; border-radius: 17px; }
  .home-category strong { font-size: .8rem; }
  .home-panel { padding: .8rem; border-radius: 20px; }
  .home-folder-shelves, .home-empty-grid { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .home-media-row { grid-auto-columns: minmax(140px, 46%); gap: .6rem; }
}

/* Film and series libraries share the quieter surfaces and scale of Home. */
.catalog-library { --catalog-accent: var(--accent); min-width: 0; }
.catalog-library.series { --catalog-accent: var(--rose); }
.catalog-intro { display: flex; align-items: center; gap: 1rem; min-width: 0; padding: 1.2rem 1.35rem; margin-bottom: 1rem; border: 1px solid #aa87cd35; border-radius: 24px; background: radial-gradient(ellipse at 100% 0, #49305e75, transparent 80%), #171121; box-shadow: inset 0 1px #ffffff0b; }
.series .catalog-intro { background: radial-gradient(ellipse at 100% 0, #57334e70, transparent 80%), #171121; }
.catalog-intro > div { min-width: 0; }
.catalog-intro > .tile-icon { --hue: var(--catalog-accent); width: 48px; height: 48px; flex: none; border-radius: 16px; box-shadow: inset 0 1px #ffffff10; }
.catalog-intro .tile-icon .icon { filter: none; }
.catalog-intro .eyebrow { margin-bottom: .15rem; font-size: .7rem; font-weight: 500; color: var(--catalog-accent); }
.catalog-intro h1 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.5; }
.catalog-intro p:not(.eyebrow) { margin-top: .2rem; color: var(--muted); font-size: .82rem; }
.catalog-library .toolbar { gap: .6rem; padding: .8rem; margin-bottom: 1.1rem; border: 1px solid #aa87cd2e; border-radius: 20px; background: linear-gradient(145deg, #21182f85, #151020ba); }
.catalog-library .toolbar > label:not(.search) { flex: 0 1 12rem; }
.catalog-library .search { flex-basis: 17rem; box-shadow: none; border-color: #aa87cd35; border-radius: 13px; }
.catalog-library :is(.toolbar button, .toolbar select, .toolbar input) { font-size: .85rem; border-radius: 13px; }
.catalog-library .toolbar button { font-weight: 550; padding-inline: 1rem; box-shadow: none; }
.catalog-library .result-head { margin-bottom: .6rem; gap: .5rem; }
.catalog-library .result-head h2 { font-size: 1.15rem; line-height: 1.7; }
.catalog-library .result-head h2::before { width: 3px; box-shadow: none; }
.catalog-library .result-head > span { font-size: .75rem; color: var(--muted); }
.catalog-library .pagination { margin-block: .7rem; }
.catalog-library .pagination-meta { font-size: .73rem; gap: .5rem .8rem; }
.catalog-library .result-head + .pagination .page-jump { display: none; }
.catalog-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, max(10.5rem, calc((100% - 5rem) / 6))), 1fr)); gap: 1.1rem 1rem; padding-block: .25rem; }
.catalog-grid .media-card { border-color: #aa87cd30; border-radius: 18px; background: linear-gradient(145deg, #21182f, #151020); box-shadow: inset 0 1px #ffffff08, 0 .35rem 1rem #03020b35; }
.catalog-grid .media-art { aspect-ratio: 16 / 9; background: radial-gradient(ellipse at top right, #44316885, #181027 83%); overflow: hidden; border-bottom: 1px solid #ffffff0a; }
.catalog-grid .media-art:not(.cover-art) img { object-fit: contain; }
.catalog-grid .media-art img { transition: transform .25s ease; }
.catalog-grid .play-badge { width: 32px; height: 32px; bottom: .6rem; inset-inline-start: .6rem; border-color: #e7c5ff4d; background: #171020db; box-shadow: 0 .2rem .6rem #03020b60; }
.catalog-grid .play-badge .icon { width: 18px; height: 18px; }
.catalog-grid .media-label { gap: .35rem; padding: .65rem .7rem .75rem; }
.catalog-grid .media-label > b { font-size: .88rem; line-height: 1.85; font-weight: 550; }
.catalog-grid .catalog-watched-badge { position: absolute; top: .5rem; inset-inline-start: .5rem; max-width: calc(100% - 1rem); padding: .12rem .35rem; font-size: .66rem; line-height: 1.8; border-color: #91f3e04d; background: #17352ff2; color: #b9fbe9; }
.catalog-grid .offline-badge { max-width: calc(100% - .7rem); line-height: 1.8; font-size: .66rem; }
.catalog-library .empty { padding: 1.6rem 1rem; border-color: #aa87cd2e; border-radius: 22px; box-shadow: none; }
.catalog-library .empty h3 { font-size: 1.1rem; line-height: 1.8; }
.catalog-library .empty p { font-size: .85rem; }
.catalog-detail :is(h1, h2, h3) { line-height: 1.7; }
.catalog-detail h1 { font-size: clamp(1.3rem, 3vw, 2rem); }
.catalog-detail .breadcrumb { font-size: .82rem; }
.catalog-detail .series-heading { grid-template-columns: clamp(76px, 14vw, 112px) minmax(0, 1fr); padding: 1.1rem; gap: .85rem; margin-bottom: 1.1rem; border-color: #aa87cd35; border-radius: 22px; box-shadow: inset 0 1px #ffffff08; }
.catalog-detail .series-heading > img { aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; border: 1px solid #ffffff14; box-shadow: 0 .4rem 1rem #05030e55; }
.catalog-detail .eyebrow { font-size: .75rem; }
.catalog-detail :is(.button, button) { font-size: .8rem; font-weight: 550; border-radius: 13px; box-shadow: none; }
.catalog-detail .episode-status { font-size: .73rem; }
.catalog-detail .series-watch-actions { padding-top: .65rem; border-top: 1px solid #aa87cd25; gap: .5rem; }
.catalog-detail .season-panel { padding: 1rem; gap: .75rem; border-color: #aa87cd2e; border-radius: 22px; background: linear-gradient(145deg, #21182f85, #151020ba); box-shadow: none; }
.catalog-detail .episode-heading { gap: .4rem .65rem; }
.catalog-detail .episode-heading h2 { font-size: 1.15rem; }
.catalog-detail .episode-heading h3 { font-size: .95rem; font-weight: 600; }
.catalog-detail .episode-row { position: relative; padding: .85rem; gap: .65rem; border-radius: 16px; border-color: #aa87cd2b; background: #ffffff03; box-shadow: none; }
.episode-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; min-width: 0; }
.catalog-detail .episode-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.catalog-detail .episode-grid .episode-card { display: flex; flex-direction: column; padding: 0; gap: 0; overflow: hidden; border: 1px solid #aa87cd30; background: linear-gradient(145deg, #21182f, #151020); }
.episode-card .episode-thumbnail { aspect-ratio: 16 / 9; flex: none; overflow: hidden; border-bottom: 1px solid #ffffff0a; }
.episode-thumbnail .play-badge { width: 30px; height: 30px; bottom: .4rem; inset-inline-start: .4rem; border-color: #e7c5ff4d; box-shadow: 0 .2rem .6rem #03020b60; }
.episode-thumbnail .play-badge .icon { width: 17px; height: 17px; }
.episode-card .episode-thumbnail > .media-runtime-overlay { inset-inline-end: .4rem; bottom: .4rem; padding: .1rem .3rem; font-size: .66rem; }
.episode-thumbnail .episode-thumb-status { position: absolute; top: .4rem; inset-inline-end: .4rem; max-width: calc(100% - .8rem); padding: .1rem .35rem; gap: .2rem; background: #171020ed; border-color: #ffffff30; font-size: .64rem; line-height: 1.8; }
.episode-thumbnail .episode-thumb-status.watched { background: #17352fed; border-color: #91f3e04d; }
.episode-thumb-status bdi { white-space: nowrap; }
.episode-card-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .25rem .4rem; padding: .35rem .45rem; flex: 1; min-width: 0; }
.catalog-detail .episode-card-footer h3 { font-size: .82rem; font-weight: 550; line-height: 1.7; min-width: 0; }
.episode-card-footer h3 a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.episode-card-actions { display: flex; align-items: center; gap: .25rem; margin: 0; }
.catalog-detail .episode-card-actions button { width: 44px; min-height: 44px; padding: 0; border-radius: 12px; background: #ffffff05; }
.episode-card-actions .icon { width: 18px; height: 18px; }
.episode-card-footer.has-reset { grid-template-columns: minmax(0, 1fr); }
.episode-card-footer.has-reset .episode-card-actions { justify-self: end; }
.catalog-watch [data-watch-heading] { padding: .9rem 1rem; margin-bottom: .8rem; border: 1px solid #aa87cd2e; border-radius: 20px; background: linear-gradient(145deg, #21182f85, #151020ba); }
.catalog-watch .watch-heading { margin-bottom: .6rem; }
.catalog-watch .movie-watch-actions { margin-bottom: 0; gap: .5rem; }
.catalog-watch .screen { border-radius: 22px; border-color: #aa87cd4a; box-shadow: 0 .5rem 1.4rem #03020b55; }
.catalog-watch .player-tools { gap: .5rem; padding-block: .9rem; font-size: .8rem; }
@media (hover: hover) and (pointer: fine) {
  .catalog-grid .media-card:hover { border-color: #c7a6e77a; box-shadow: 0 .5rem 1.2rem #03020b60, 0 0 1rem #ac78ff16; }
  .catalog-grid .media-card:hover img { transform: scale(1.025); }
}
@media (max-width: 600px) {
  .catalog-intro { padding: 1rem; gap: .8rem; border-radius: 22px; }
  .catalog-intro h1 { font-size: 1.5rem; }
  .catalog-intro p:not(.eyebrow) { font-size: .78rem; }
  .catalog-library .toolbar { padding: .65rem; gap: .5rem; }
  .catalog-library .toolbar .search { flex-basis: 100%; }
  .catalog-library .toolbar > label:not(.search) { flex: 1 1 10rem; }
  .catalog-library .toolbar :is(select, input) { font-size: max(1rem, 16px); }
  .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, max(8.5rem, calc((100% - .75rem) / 2))), 1fr)); gap: .9rem .75rem; }
  .catalog-grid .media-card { border-radius: 16px; }
  .catalog-grid .media-label { padding: .55rem .6rem .65rem; }
  .catalog-grid .media-label > b { font-size: .82rem; }
  .catalog-detail .series-heading { padding: .9rem; }
  .catalog-detail .series-watch-actions > .episode-status { flex-basis: 100%; }
  .catalog-detail .season-panel { padding: .8rem; }
  .catalog-detail .episode-row { padding: .75rem; }
  .catalog-detail .episode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .catalog-detail .episode-actions :is(.button, button) { padding-inline: .4rem; font-size: .75rem; }
  .catalog-detail .root-options > form { max-width: 100%; }
  .catalog-watch [data-watch-heading] { padding: .8rem; }
}
@media (max-width: 359px) {
  .catalog-detail .episode-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Navigation stays usable while the requested page is arriving. */
:is(.desktop-nav, .mobile-nav) a { position: relative; touch-action: manipulation; }
:is(.desktop-nav, .mobile-nav) a.nav-pending { color: var(--mint); background: #91f3e019; border-color: #91f3e060; }
:is(.desktop-nav, .mobile-nav) a.nav-pending::after { content: ''; position: absolute; inset-inline-end: 5px; top: 5px; width: 11px; height: 11px; border: 1.5px solid #91f3e035; border-top-color: var(--mint); border-radius: 50%; animation: photo-spin .7s linear infinite; }
.navigation-failure { position: absolute; inset: 100% .7rem auto; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .4rem .7rem; padding: .7rem; border: 1px solid #a683c366; border-radius: 0 0 18px 18px; background: #21182ff5; box-shadow: 0 .6rem 1.5rem #05030e80; font-size: .82rem; }
.navigation-failure button { font-size: .8rem; }
@media (pointer: coarse) {
  .header, .mobile-nav { backdrop-filter: none; }
  .reveal { animation-duration: .18s; }
}
.catalog-library .result-head + .pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .7rem; }
.catalog-library .result-head + .pagination .pagination-meta > .muted { display: none; }
.catalog-library .result-head + .pagination .page-size-form label { font-size: .7rem; }
.catalog-library .result-head + .pagination .page-size-form select { min-width: 4.5rem; }

/* Family libraries use Home's compact surfaces with mint and blue accents. */
.family-library { --family-accent: var(--mint); --family-wash: #23413f; min-width: 0; }
.family-library.videos { --family-accent: #b6d2ff; --family-wash: #293b56; }
.family-intro.catalog-intro { display: grid; gap: .85rem; background: radial-gradient(ellipse at 100% 0, var(--family-wash), transparent 88%), #171121; border-color: #a2d5cf30; }
.family-intro-heading { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.family-intro-heading > div { min-width: 0; }
.family-intro .tile-icon { --hue: var(--family-accent); width: 44px; height: 44px; flex: none; border-radius: 15px; box-shadow: inset 0 1px #ffffff0d; }
.family-intro .tile-icon .icon { width: 23px; height: 23px; filter: none; }
.family-intro .eyebrow { color: var(--family-accent); }
.family-intro-actions { gap: .5rem; }
.family-intro-actions:empty { display: none; }
.family-intro-actions :is(.button, button) { min-height: 44px; padding: .45rem .7rem; font-size: .79rem; font-weight: 550; border-radius: 13px; border-color: #b1c8d32b; background: #ffffff05; box-shadow: none; }
.family-intro-actions .family-organize { width: 44px; padding-inline: 0; margin-inline-start: auto; }
.family-intro-actions .primary, .family-filter-panel :is(button, .button).primary, .person-library > .toolbar .primary { color: #15342e; border-color: #b8f7e2; background: linear-gradient(145deg, #c8f9eb, #91ddce); box-shadow: none; }
.family-library.videos .family-intro-actions .primary { color: #192b47; border-color: #cfe2ff; background: linear-gradient(145deg, #e0ebff, #afcbf4); }
.family-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-bottom: 1.1rem; }
.family-filter-panel { min-width: 0; border: 1px solid #aa87cd2e; border-radius: 18px; background: linear-gradient(145deg, #21182f85, #151020ba); box-shadow: inset 0 1px #ffffff06; }
.family-tools > :only-child, .family-tools > [open] { grid-column: 1 / -1; }
.family-filter-panel summary { display: flex; align-items: center; gap: .55rem; min-height: 52px; padding: .7rem .85rem; list-style: none; cursor: pointer; border-radius: inherit; font-size: .8rem; font-weight: 550; line-height: 1.8; touch-action: manipulation; }
.family-filter-panel summary::-webkit-details-marker { display: none; }
.family-filter-panel summary > span:first-of-type { flex: 1; min-width: 0; }
.family-filter-panel summary > .icon:first-child { color: var(--family-accent); width: 18px; height: 18px; }
.family-filter-panel summary > .icon:last-child { width: 14px; height: 14px; color: var(--muted); transition: transform .18s; }
.family-filter-panel[open] > summary { color: var(--family-accent); }
.family-filter-panel[open] > summary > .icon:last-child { transform: rotate(-90deg); }
.family-filter-body { padding: 0 .8rem .8rem; }
.family-filter-body .family-filters, .family-filter-body .toolbar { margin-bottom: 0; }
.family-filter-panel :is(.button, button:not(.media-card)) { font-size: .77rem; font-weight: 550; padding: .45rem .65rem; border-radius: 12px; box-shadow: none; }
.family-filter-panel .people-shelf { padding: .7rem; border-color: #91f3e025; border-radius: 15px; background: #ffffff02; box-shadow: none; }
.family-filter-panel .people-grid { position: relative; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 4.5rem; gap: .35rem; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; padding: .3rem .1rem .5rem; }
.family-filter-panel .person-card { padding: .3rem .15rem; font-size: .74rem; gap: .25rem; border-radius: 12px; }
.family-filter-panel .person-card strong { font-weight: 550; line-height: 1.9; }
.family-filter-panel .person-card small { font-size: .66rem; }
.family-filter-panel .person-portrait { width: 48px; padding: 2px; box-shadow: 0 .2rem .6rem #100a1950; }
.family-filter-panel .person-choice input { inset-block-start: .3rem; inset-inline-start: .1rem; width: 16px; height: 16px; z-index: 1; }
.family-filter-panel .person-relationship-filters { position: relative; flex-wrap: nowrap; overflow-x: auto; gap: .35rem; padding-block: .1rem .4rem; margin-bottom: .5rem; scrollbar-width: thin; }
.family-filter-panel .person-relationship-filters .button { flex: none; font-size: .72rem; padding-inline: .55rem; }
.family-filter-panel .stack { gap: .65rem; }
.family-filter-panel p.muted { font-size: .74rem; line-height: 1.9; }
.family-group-row { gap: .4rem; }
.family-group-row > b { flex-basis: 100%; color: var(--muted); font-size: .75rem; font-weight: 500; }
.family-group-row .pill { font-size: .68rem; padding: .05rem .35rem; }
.family-filter-panel .photo-gallery-filters { padding: 0; border: 0; background: transparent; gap: .7rem; }
.family-filter-panel .photo-date-controls { display: flex; flex-wrap: wrap; gap: .65rem; align-items: end; }
.family-filter-panel .photo-date-controls label { flex: 1 1 10rem; display: grid; gap: .35rem; font-size: .78rem; color: var(--muted); }
.family-filter-panel .photo-date-help { flex-basis: 100%; font-size: .72rem; line-height: 1.9; }
.family-filter-panel .search { border-color: #aa87cd35; border-radius: 13px; box-shadow: none; }
.family-library > .result-head { margin-bottom: .6rem; gap: .5rem; }
.family-library > .result-head h2 { font-size: 1.15rem; line-height: 1.7; }
.family-library > .result-head h2::before { width: 3px; box-shadow: none; }
.family-library > .result-head > span { color: var(--muted); font-size: .75rem; }
.family-library > .pagination { margin-block: .7rem; }
.family-library .pagination-meta { font-size: .73rem; gap: .5rem .8rem; }
.family-library .result-head + .pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .7rem; }
.family-library .result-head + .pagination :is(.page-jump, .pagination-meta > .muted) { display: none; }
.family-library .result-head + .pagination .page-size-form label { font-size: .7rem; }
.family-library .result-head + .pagination .page-size-form select { min-width: 4.5rem; }
.family-grid { position: relative; grid-template-columns: repeat(auto-fill, minmax(min(100%, max(10.5rem, calc((100% - 4rem) / 5))), 1fr)); gap: 1rem .9rem; padding-block: .25rem; }
.family-grid .media-card { border-color: #aa87cd30; border-radius: 18px; background: linear-gradient(145deg, #21182f, #151020); box-shadow: inset 0 1px #ffffff08, 0 .35rem 1rem #03020b35; }
.family-grid .media-art { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid #ffffff0a; background: radial-gradient(ellipse at top right, #30455070, #181027 83%); }
.family-grid.photo-grid .media-art { aspect-ratio: 4 / 3; }
.family-grid .media-art img { transition: transform .25s ease; }
.family-grid .media-label { padding: .6rem .7rem; gap: .2rem; }
.family-grid .media-label > b { font-size: .84rem; font-weight: 550; line-height: 1.85; }
.family-grid .media-label time { font-variant-numeric: tabular-nums; }
.family-grid .media-label small { font-size: .7rem; }
.family-library.videos .family-grid .media-label > b { min-height: 3.7em; }
.family-grid .play-badge { width: 32px; height: 32px; bottom: .55rem; inset-inline-start: .55rem; border-color: #cfe2ff50; color: #d6e7ff; background: #171020db; box-shadow: 0 .2rem .6rem #03020b60; }
.family-grid .play-badge .icon { width: 18px; height: 18px; }
.family-grid .offline-badge { max-width: calc(100% - .7rem); font-size: .66rem; line-height: 1.8; }
.family-library > .empty { padding: 1.5rem 1rem; border-color: #aa87cd2e; border-radius: 22px; box-shadow: none; }
.family-library > .empty :is(h2, h3) { font-size: 1.1rem; line-height: 1.8; }
.family-library > .empty p { font-size: .85rem; }
.person-library > .breadcrumb { font-size: .82rem; }
.person-library .person-profile { padding: 1.1rem; gap: .85rem; margin-bottom: 1rem; border-color: #aa87cd35; border-radius: 22px; background: radial-gradient(ellipse at top right, #23413f75, transparent 88%), #171121; box-shadow: inset 0 1px #ffffff08; }
.person-library .person-profile h1 { font-size: clamp(1.3rem, 3vw, 2rem); line-height: 1.7; }
.person-library .person-profile .eyebrow { font-size: .7rem; }
.person-library .person-profile .person-portrait { width: clamp(64px, 10vw, 88px); box-shadow: 0 .25rem .8rem #100a1960; }
.person-library > .toolbar { gap: .45rem; margin-bottom: 1rem; }
.person-library > .toolbar .button, .person-library > .toolbar button { font-size: .78rem; padding-inline: .65rem; border-radius: 13px; box-shadow: none; }
.person-library .person-date-panel { margin-bottom: 1rem; }
.family-watch [data-watch-heading] { padding: .9rem 1rem; margin-bottom: .8rem; border: 1px solid #aa87cd2e; border-radius: 20px; background: linear-gradient(145deg, #21182f85, #151020ba); }
.family-watch .watch-heading h1 { font-size: clamp(1.2rem, 3vw, 1.8rem); line-height: 1.8; }
.family-watch .breadcrumb { font-size: .82rem; }
.family-watch .screen { border-radius: 22px; border-color: #a7c5ed40; box-shadow: 0 .5rem 1.4rem #03020b55; }
.family-watch :is(.watch-heading, .player-tools, .file-actions) :is(.button, button) { font-size: .8rem; border-radius: 13px; box-shadow: none; }
.family-watch .player-tools { font-size: .8rem; gap: .5rem; padding-block: .9rem; }
@media (hover: hover) and (pointer: fine) {
  .family-grid .media-card:hover { border-color: #b5d9de75; box-shadow: 0 .5rem 1.2rem #03020b60, 0 0 1rem #91f3e012; }
  .family-grid .media-card:hover img { transform: scale(1.02); }
}
@media (max-width: 600px) {
  .family-intro.catalog-intro { padding: 1rem; gap: .75rem; }
  .family-intro-heading { gap: .75rem; }
  .family-intro h1 { font-size: 1.5rem; }
  .family-filter-panel summary { padding: .65rem .7rem; font-size: .76rem; gap: .4rem; }
  .family-filter-body { padding-inline: .65rem; }
  .family-filter-panel :is(select, input:not([type=checkbox])) { font-size: max(1rem, 16px); }
  .family-filter-panel .photo-date-controls label { flex-basis: 100%; }
  .family-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, max(8.5rem, calc((100% - .75rem) / 2))), 1fr)); gap: .85rem .75rem; }
  .family-grid .media-card { border-radius: 16px; }
  .family-grid .media-label { padding: .5rem .6rem; }
  .family-grid .media-label > b { font-size: .8rem; }
  .person-library .person-profile { padding: .9rem; }
  .family-watch [data-watch-heading] { padding: .8rem; }
}
.family-tools:has(> details[open]) > details { grid-column: 1 / -1; }
.family-intro { position: relative; }
.family-intro-actions:not(:has(> *)) { display: none; }
.family-intro-actions:has(> .family-organize:only-child) { display: contents; }
.family-intro-actions > .family-organize:only-child { position: absolute; inset-inline-end: 1rem; top: 1rem; }
.family-intro:has(.family-organize:only-child) .family-intro-heading { padding-inline-end: 3rem; }
@media (max-width: 350px) {
  .family-intro-actions :is(.button, button) { padding-inline: .35rem; }
}
.person-library .person-profile > div { flex: 1; }
.person-library .person-relationship-buttons button { flex: 0 1 auto; min-width: 3.7rem; padding: .35rem .65rem; font-size: .76rem; white-space: nowrap; border-radius: 12px; }

.media-runtime { display: inline-flex; align-items: center; gap: .3rem; min-width: 0; color: #d0c4df; font-size: .75rem; line-height: 1.8; font-weight: 500; white-space: nowrap; }
.media-runtime .icon { width: 14px; height: 14px; color: var(--muted); }
.media-runtime bdi { font-variant-numeric: tabular-nums; }
.watch-title { flex: 1 1 12rem; min-width: 0; }
.watch-title > .media-runtime { margin-block-start: .25rem; }
.episode-heading > .media-runtime { margin-inline-start: auto; }
.media-art > .media-runtime-overlay { position: absolute; inset-inline-end: .55rem; bottom: .55rem; gap: .25rem; padding: .15rem .4rem; border: 1px solid #ffffff25; border-radius: 8px; background: #120d20e8; color: #fbf7ff; font-size: .72rem; box-shadow: 0 .15rem .4rem #0005; }
.media-runtime-overlay .icon { width: 12px; height: 12px; color: #e6d7f5; }

/* Shared dropdown spacing also covers controls added after navigation. */
select:not([multiple]):not([size]), select[size="1"]:not([multiple]) {
  -webkit-appearance: none;
  appearance: none;
  background-image: url('select-chevron.svg');
  background-repeat: no-repeat;
  background-size: 1.1rem 1.1rem;
  background-position: left .8rem center;
  padding-inline-start: .7rem;
  padding-inline-end: 2.2rem;
  text-align: start;
  text-overflow: ellipsis;
}
select:not([multiple]):not([size]):dir(ltr), select[size="1"]:not([multiple]):dir(ltr) {
  background-position: right .8rem center;
}
input[placeholder]:placeholder-shown, textarea[placeholder]:placeholder-shown {
  direction: rtl;
  text-align: right;
}
