/* Shared library surfaces. Kept separate from the legacy discovery/social styles. */
.poster-scores { position: absolute; inset: auto 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 42px 15px 13px; background: linear-gradient(to bottom, transparent, #0009); color: #ffffff99; font: 400 10px/1.3 Outfit, sans-serif; letter-spacing: .025em; pointer-events: none; }
.poster-score { white-space: nowrap; }
.movie-card[data-back-open="true"] .poster-scores { visibility: hidden; }
.discovery-shortcuts { position: relative; z-index: 1; display: flex; justify-content: center; padding: 0 12px; }
.cinema-entry { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 28px; margin: 0; padding: 4px 0; border: 0; border-radius: 0; background: none; color: #ff8bb1; font: 400 .75rem/1.4 Outfit, sans-serif; letter-spacing: .025em; cursor: pointer; box-shadow: none; }
.cinema-entry:hover { color: #ffc0d5; background: none; }
.cinema-entry:focus-visible { outline: 2px solid #ff8bb1; outline-offset: 3px; }
.cinema-grid-dialog { width: min(820px, calc(100vw - 24px)); height: min(760px, calc(100dvh - 32px)); padding: 22px; scrollbar-gutter: stable; }
.cinema-grid-dialog[open] { animation: cinema-window-arrive 240ms ease-out; }
.cinema-grid-dialog[open]::backdrop { animation: cinema-backdrop-arrive 240ms ease-out; }
.cinema-grid-ready { animation: cinema-content-arrive 180ms ease-out; }
.cinema-skeleton { min-width: 0; }
.cinema-skeleton-line { width: 80%; height: 10px; margin-top: 10px; border-radius: 4px; background: #ffffff0a; }
.cinema-skeleton-date { width: 55%; height: 7px; margin-top: 8px; }
@keyframes cinema-window-arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes cinema-backdrop-arrive { from { opacity: 0; } to { opacity: 1; } }
@keyframes cinema-content-arrive { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cinema-grid-dialog[open], .cinema-grid-dialog[open]::backdrop, .cinema-grid-ready { animation: none; } }
.cinema-intro { max-width: 540px; margin: 0 0 12px; color: #c4c1ca; font-size: .85rem; line-height: 1.5; }
.cinema-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 14px; }
.cinema-tile { display: flex; flex-direction: column; align-items: stretch; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 8px; background: none; color: white; font: inherit; text-align: left; cursor: pointer; box-shadow: none; }
.cinema-tile:focus-visible { outline: 2px solid #ff8bb1; outline-offset: 5px; }
.cinema-poster { display: block; width: 100%; height: auto; aspect-ratio: 2/3; object-fit: cover; border-radius: 8px; background: #2a2530; }
.cinema-poster-missing { display: flex; align-items: center; justify-content: center; padding: 12px; box-sizing: border-box; color: #c4c1ca; font-size: .75rem; text-align: center; }
.cinema-title { display: block; margin-top: 8px; font-size: .85rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.cinema-release-date { display: block; margin-top: 4px; font-size: .7rem; line-height: 1.4; color: #c4c1ca; }
.cinema-watch-status { display: block; margin-top: 4px; color: #ff8bb1; font-size: .7rem; line-height: 1.3; }
.cinema-watch-status:empty { display: none; }
.cinema-source { margin: 16px 0 0; color: #c4c1ca; font-size: .7rem; }
.cinema-film-dialog { width: min(414px, calc(100vw - 24px)); padding: 10px; }
.cinema-film-dialog .rf-dialog-close { z-index: 2; top: 18px; right: 18px; background: #17131de6; }
.cinema-film-dialog .rating-focus { width: 100%; min-height: clamp(340px, 64dvh, 520px); margin: 0; border-radius: 14px; animation: none; }
.cinema-film-dialog .rating-panel { padding: 64px 20px 20px; }
.cinema-film-dialog .rating-title { margin: 0 0 8px; font-size: clamp(1.8rem, 6vw, 2.4rem); line-height: 1.1; }
.cinema-film-date, .cinema-saved-status { margin: 0 0 14px; color: #d8d4df; font-size: .75rem; line-height: 1.5; }
.cinema-saved-status { color: #ff8bb1; }
.cinema-saved-status:empty, .cinema-film-dialog .title-search-status:empty { display: none; }
.cinema-film-dialog > .title-search-status { margin: 12px 10px; }
.cinema-film-dialog > .rf-action { margin: 0 10px; }
.cinema-film-details { margin: 6px 10px 0; color: #c4c1ca; font-size: .9rem; line-height: 1.6; }
.cinema-film-details summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; color: white; }
.cinema-film-details summary::after { content: "+"; margin-left: auto; }
.cinema-film-details[open] summary::after { content: "−"; }
.cinema-film-dialog .rf-action[hidden] { display: none; }
@media (max-width: 600px) {
  .cinema-grid-dialog { padding: 20px 16px; }
  .cinema-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; }
}
@media (max-width: 360px) {
  .cinema-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
:root { --library-muted: #b9b9c2; --library-rule: #35353b; --library-pink: #ff4081; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.library-page, body:has(.profile-page):not([data-page="social"]) { min-height: 100dvh; box-sizing: border-box; }
.library-main { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; padding: 28px 24px 36px; }
.page-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-heading h1 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.03em; margin: 0; }
.text-link { color: #d4d4dc; text-decoration: none; font-size: .88rem; }
.text-link:hover { text-decoration: underline; color: white; }
.rating-progress-line { color: var(--library-muted); display: flex; align-items: center; gap: 16px; font-size: .85rem; margin-bottom: 22px; }
.rating-progress-line progress { appearance: none; height: 3px; width: 90px; border: 0; border-radius: 3px; background: #37373d; accent-color: var(--library-pink); }
.rating-progress-line progress::-webkit-progress-bar { background: #37373d; border-radius: 3px; }
.rating-progress-line progress::-webkit-progress-value { background: var(--library-pink); border-radius: 3px; }
.rating-progress-line progress::-moz-progress-bar { background: var(--library-pink); }
.library-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 16px; }
.view-switch { display: flex; align-items: center; gap: 20px; margin-right: auto; }
.view-switch button { min-height: 44px; padding: 5px 0; color: var(--library-muted); font: inherit; font-weight: 700; background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; box-shadow: none; border-radius: 0; }
.view-switch button[aria-pressed="true"] { color: white; border-bottom-color: var(--library-pink); }
.compact-select select { color-scheme: dark; color: #e8e8ee; font: inherit; font-size: .85rem; background: #222228; border: 1px solid #494950; border-radius: 8px; padding: 10px 25px 10px 10px; min-height: 44px; max-width: 100%; }
.library-feedback { display: flex; align-items: center; flex-wrap: wrap; gap: 0 12px; color: var(--library-muted); font-size: .85rem; }
.library-feedback p { margin: 0; }
.library-feedback p:not(:empty) { padding: 8px 0 16px; }
.rating-stage { overflow: hidden; padding: 10px; margin: -10px; }
.library-search { flex-basis: 100%; }
.library-search input { box-sizing: border-box; width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid #494950; border-radius: 10px; background: #222228; color: white; font: inherit; font-size: .9rem; }
.library-search input:focus-visible { outline: 2px solid #f7a4c1; outline-offset: 2px; }
.rating-feed { padding-top: 4px; }
.rating-feed-slot { margin-bottom: 12px; overflow: hidden; border-radius: 14px; }
.rating-feed-slot:has(.review-prompt:not([hidden])), .rating-focus:has(.review-prompt:not([hidden])) { box-shadow: 0 12px 24px rgba(255, 64, 129, .45); }
.rating-feed-card { overflow: hidden; border: 1px solid #3d3441; border-radius: 14px; background: #19151e; touch-action: pan-y; transition: transform 180ms ease-out; }
.rating-feed-header { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: 88px; box-sizing: border-box; padding: 12px 16px; overflow: hidden; background: linear-gradient(120deg,#393041,#221b2b); }
.rating-feed-header::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,#110e19db,#110e1999); pointer-events: none; }
.rating-scene { position: absolute; inset: -5px; z-index: -2; width: calc(100% + 10px); height: calc(100% + 10px); object-fit: cover; filter: blur(3px); transition: filter 220ms ease-out; }
.rating-engaged .rating-scene { filter: blur(0); }
.rating-feed-type { display: block; color: #e4dce9; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 5px; }
.rating-feed-card .rating-title { font-size: clamp(1.1rem,4.7vw,1.35rem); line-height: 1.2; letter-spacing: -.02em; margin: 0; text-shadow: 0 1px 8px #0009; }
.rating-feed-panel { padding: 8px 16px 12px; }
.rating-feed-card .star-slider { height: 40px; touch-action: pan-y; max-width: 440px; }
.rating-feed-card .star-caption { max-width: 440px; min-height: 16px; margin: 0; }
.rating-feed-card .review-prompt { margin-top: 12px; animation: reviewAppears 180ms ease-out both; }
.rating-feed-card .review-prompt label { margin-bottom: 10px; }
.rating-feed-card .review-text { background: #221c29; margin-top: 6px; padding: 10px; }
.rating-feed-card .editor-actions { gap: 4px 8px; }
.rating-feed-card .primary-action { font-size: .85rem; }
.rating-swipe-hint { color: var(--library-muted); font-size: .75rem; margin: 10px 0 0; }
.rating-feed-card.rating-card-dragging { transition: none; }
.rating-feed-card.rating-saved { animation: ratingFeedSaved 220ms ease-in both; }
@keyframes ratingFeedSaved { to { opacity: 0; transform: translateX(40%); } }
@media (prefers-reduced-motion: reduce) {
  .rating-feed-card, .rating-scene { transition: none !important; }
  .rating-feed-card.rating-saved, .rating-feed-card .review-prompt { animation: none; }
}
.rating-focus { position: relative; isolation: isolate; display: flex; align-items: flex-end; width: min(100%,390px); box-sizing: border-box; min-height: min(62dvh,570px); margin: 16px auto 24px; border-radius: 18px; overflow: hidden; background: #19151e; box-shadow: 0 18px 45px #0006; animation: ratingArrives 320ms cubic-bezier(.2,.8,.2,1) both; }
.rating-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.rating-focus::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg,rgba(10,8,15,.08) 12%,rgba(10,8,15,.24) 32%,rgba(10,8,15,.88) 59%,rgba(10,8,15,.98) 100%); }
.rating-panel { width: 100%; padding: 28px 24px 24px; box-sizing: border-box; }
.poster-unavailable { background: linear-gradient(150deg,#3d3441,#202025); }
.rating-title { color: white; font-size: clamp(1.8rem,4vw,2.6rem); line-height: 1.06; letter-spacing: -.035em; margin: 0 0 20px; outline: none; overflow-wrap: anywhere; text-shadow: 0 2px 12px #0008; }
.star-slider { --rating-fill: 0%; --star-color: #ff4081; position: relative; height: 48px; width: 100%; border-radius: 6px; cursor: ew-resize; touch-action: none; }
.star-muted, .star-fill { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.star-muted { fill: var(--star-color); opacity: .22; stroke: none; }
.star-fill { fill: var(--star-color); clip-path: inset(0 calc(100% - var(--rating-fill)) 0 0); }
.score-range { position: absolute; inset: 0; box-sizing: border-box; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.star-slider:has(:focus-visible) { outline: 2px solid #f7a4c1; outline-offset: 4px; }
.star-caption { display: flex; justify-content: space-between; gap: 10px; color: #d8d4df; font-size: .8rem; min-height: 20px; margin: 0 0 14px; }
.star-value { color: white; font-variant-numeric: tabular-nums; }
.review-editor[data-media-type="tv"] .star-slider { --star-color: #ffd54a; }
.rating-focus .review-text { background: #15121be6; }
.rating-focus .quiet-action { color: #e4deea; }
@keyframes ratingArrives { from { opacity: 0; transform: translateX(-70px) rotate(-4deg); } to { opacity: 1; transform: none; } }
.review-prompt { animation: reviewAppears 180ms ease-out both; }
.review-prompt label { color: var(--library-muted); font-size: .85rem; display: block; margin-bottom: 16px; }
@keyframes reviewAppears { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.review-text { display: block; box-sizing: border-box; width: 100%; resize: vertical; color: white; background: #222228; border: 1px solid #55555f; border-radius: 8px; font: inherit; padding: 12px; margin: 8px 0 0; line-height: 1.5; }
.editor-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.primary-action, .quiet-action { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; box-sizing: border-box; padding: 10px 16px; font: inherit; font-size: .9rem; font-weight: 700; border-radius: 8px; cursor: pointer; text-decoration: none; box-shadow: none; }
.primary-action { border: 0; background: var(--library-pink); color: #18121a; }
.primary-action:disabled { background: #3c3c44; color: #babac4; cursor: default; }
.quiet-action { background: transparent; border: 0; color: #d6d6df; font-weight: 400; padding-left: 10px; padding-right: 10px; }
.quiet-action:hover { color: white; background: #29292f; }
.editor-status { font-size: .8rem; color: var(--library-muted); min-height: 1em; margin: 8px 0 0; }
.editor-status:empty { display: none; }
.library-empty { padding: 52px 10px; text-align: center; color: var(--library-muted); }
.library-empty h2 { color: white; font-size: 1.5rem; }
.library-empty p { line-height: 1.6; margin: 10px auto 24px; max-width: 420px; }
.library-list { list-style: none; padding: 0; margin: 0; }
.library-row { border-bottom: 1px solid var(--library-rule); }
.library-summary { display: flex; align-items: center; gap: 16px; min-height: 86px; cursor: pointer; padding: 10px 2px; box-sizing: border-box; list-style: none; }
summary::-webkit-details-marker { display: none; }
.library-summary::after { content: "⌄"; color: var(--library-muted); width: 14px; }
details[open] > .library-summary::after { content: "⌃"; }
.library-poster { width: 42px; height: 63px; flex-shrink: 0; object-fit: cover; border-radius: 5px; background: #292930; }
.library-title { flex: 1; min-width: 0; color: #f6f6fb; line-height: 1.35; font-size: 1rem; overflow-wrap: anywhere; }
.library-title small { display: block; color: var(--library-muted); font-size: .75rem; margin-top: 3px; }
.library-score { color: #f6f6fb; font-variant-numeric: tabular-nums; font-size: 1rem; white-space: nowrap; }
.library-rank { color: var(--library-muted); width: 28px; flex-shrink: 0; font-variant-numeric: tabular-nums; font-size: .9rem; }
.row-content { padding: 0 18px 20px 60px; max-width: 540px; }
.row-content .review-editor { margin-top: 8px; }
.saved-review { color: #d6d6df; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 12px; }
.ranking-intro { color: var(--library-muted); font-size: .85rem; line-height: 1.5; max-width: 580px; }
.ranking-page-heading { margin-top: 20px; margin-bottom: 8px; }
.ranking-share-button { gap: 8px; border: 1px solid #55505c; white-space: nowrap; }
.ranking-share-button:disabled { opacity: .45; cursor: default; }
.ranking-page .remix-options { margin-left: 0; width: 100%; }
.ranking-share-preview canvas { width: 100%; height: auto; max-height: none; }
.ranking-share-dialog .review-share-help { margin-top: 12px; }
.remix-options { position: relative; margin-left: auto; }
.remix-options > summary { display: flex; min-height: 44px; align-items: center; color: #d6d6df; cursor: pointer; font-size: .9rem; }
.remix-explanation { padding: 16px 0; max-width: 540px; color: var(--library-muted); font-size: .9rem; line-height: 1.6; }
.remix-options[open] { width: 100%; }
.ranking-page .library-row[data-rank] { display: flex; align-items: center; gap: 6px; width: 100%; touch-action: pan-y; -webkit-touch-callout: none; }
.ranking-page .library-row[data-rank] > details { flex: 1; min-width: 0; }
.rank-drag-handle { position: static; width: 36px; min-width: 36px; min-height: 48px; margin: 0; border: 0; padding: 0; background: none; color: #b9b9c2; box-shadow: none; border-radius: 6px; font: inherit; font-size: 27px; line-height: 1; cursor: grab; touch-action: none; }
.is-remixing .library-summary { cursor: pointer; }
.is-remixing .is-ranking-placeholder { opacity: .3; }
.is-ranking-placeholder { outline: 1px dashed #70707b; outline-offset: -1px; }
.is-ranking-dragging { user-select: none; -webkit-user-select: none; cursor: grabbing; }
.ranking-drag-ghost { position: fixed; z-index: 10000; box-sizing: border-box; pointer-events: none; margin: 0; box-shadow: 0 16px 50px #000b; opacity: .96; }
.ranking-drag-ghost.library-row { display: flex; gap: 6px; padding: 0; background: #29292f; border: 1px solid #70707b; border-radius: 8px; }
.ranking-drag-ghost.library-row .rank-drag-handle { position: static; width: 36px; min-width: 36px; min-height: 48px; margin: 0; background: none; }
.ranking-drag-ghost.library-row > details { flex: 1; min-width: 0; }
/* Preserve the film/TV branding while fixing the usable-height calculation. */
.swipe-page { height: 100dvh; min-height: 0; overflow: hidden; box-sizing: border-box; }
.swipe-page .header-bar, .library-page .header-bar, body:has(.profile-page) .header-bar { padding-top: max(8px,env(safe-area-inset-top)); }
.swipe-page #movie-card-container { position: fixed; top: var(--stage-top,120px); left: 0; right: 0; height: var(--stage-height,calc(100dvh - 210px)); min-height: 0; margin: 0; padding: 0; }
.swipe-page #movie-card-container .movie-card { height: min(var(--stage-height,65dvh),600px,calc((100vw - 48px)*1.5)); width: auto; aspect-ratio: 2/3; max-width: none; max-height: none; margin: 0; }
.swipe-page .bottom-nav, .library-page .bottom-nav, body:has(.profile-page) .bottom-nav { box-sizing: border-box; height: calc(60px + env(safe-area-inset-bottom)); padding: 0 0 env(safe-area-inset-bottom); box-shadow: none; }
.library-page .bottom-nav .nav-item.active, body:has(.profile-page) .bottom-nav .nav-item.active { box-shadow: none; background: transparent; color: #ff6da2; }
.bottom-nav [aria-current="page"] { color: #ff6da2; }
.rating-saved { animation: ratingSaved 280ms ease-in both; pointer-events: none; }
@keyframes ratingSaved { to { opacity: 0; transform: translateX(105%) translateY(-12px) rotate(8deg); } }
.library-page :focus-visible, .profile-page :focus-visible { outline: 2px solid #f7a4c1; outline-offset: 4px; }
/* Profile keeps the existing identity/settings flow, with posters ahead of statistics. */
body:has(.profile-page):not([data-page="social"]) .profile-page { max-width: 820px; padding: 28px 24px 36px; gap: 32px; position: relative; z-index: 1; }
.profile-page .profile-header { padding: 0; background: transparent; border: 0; box-shadow: none; border-radius: 0; gap: 20px; }
.profile-page .profile-avatar-wrapper { background: #494950; width: 76px; height: 76px; }
.profile-page .profile-username { font-size: 1.35rem; letter-spacing: -.025em; }
.profile-page .bio-display { color: var(--library-muted); font-size: .95rem; line-height: 1.5; }
.profile-page .profile-media-section, .profile-page .profile-stats-card { border: 0; padding: 0; background: transparent; border-radius: 0; box-shadow: none; }
.profile-section-heading { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.profile-page .grid-heading { color: white; text-shadow: none; font-size: 1.05rem; font-weight: 700; margin: 0; letter-spacing: 0; }
.profile-page .profile-media-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin: 0 0 28px; }
.profile-page .profile-media-tile { padding: 0; border: 0; border-radius: 8px; background: #292930; box-shadow: none; aspect-ratio: 2/3; position: relative; overflow: hidden; cursor: pointer; }
.profile-media-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-poster-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 28px 9px 9px; background: linear-gradient(transparent,rgba(0,0,0,.9)); text-align: left; color: white; font-size: .8rem; }
.profile-poster-caption strong { display: block; font-size: .9rem; margin-top: 3px; }
.profile-stats-summary { display: flex; flex-wrap: wrap; gap: 20px 32px; padding: 20px 0; border-top: 1px solid var(--library-rule); margin: 0; }
.profile-stats-summary div { display: flex; flex-direction: column-reverse; gap: 4px; }
.profile-stats-summary dt { color: var(--library-muted); font-size: .8rem; }
.profile-stats-summary dd { margin: 0; color: white; font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.profile-more-stats { color: var(--library-muted); font-size: .85rem; }
.profile-more-stats summary { min-height: 44px; cursor: pointer; display: flex; align-items: center; }
.profile-more-stats p { line-height: 1.7; }
/* Social opens with activity; friend management is available on demand. */
body[data-page="social"] .profile-page { max-width: 720px; padding: 20px 24px 28px; gap: 18px; box-sizing: border-box; }
.profile-page { position: relative; }
.profile-details { display: flex; flex-direction: column; gap: inherit; min-width: 0; }
.profile-details[aria-busy="true"] { visibility: hidden; }
.profile-loading { position: absolute; inset: 20px 0 auto; text-align: center; }
.details-arrive { animation: details-arrive 400ms ease-out; }
@keyframes details-arrive { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .details-arrive { animation: none; } }
.social-friends > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; color: #f6f6fb; cursor: pointer; font-size: .9rem; }
.social-friends > summary > span:first-child { display: flex; align-items: center; gap: 8px; }
.social-friends > summary::after { content: "+"; font-size: 20px; color: var(--library-muted); }
.social-friends[open] > summary::after { content: "−"; }
.social-following-count { margin-left: auto; font-size: .78rem; color: var(--library-muted); }
.social-page .profile-social-section, .social-page .profile-feed-section, .social-page .friend-profile-inner { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.social-page .profile-social-section { padding: 12px 0 20px; border-bottom: 1px solid var(--library-rule); }
.social-page .social-search-row { flex-wrap: nowrap; }
.social-page .social-search-row input { min-width: 0; width: 100%; min-height: 44px; box-sizing: border-box; border: 1px solid #55555f; border-radius: 8px; box-shadow: none; background: #222228; font: inherit; }
.social-page .social-search-row input::placeholder { color: var(--library-muted); }
.social-page .social-search-row button { border: 1px solid #55555f; }
.social-page .social-status:empty { display: none; }
.social-page .social-following-header { margin-top: 18px; font-size: .8rem; color: var(--library-muted); }
.social-page .following-chip { min-height: 44px; border-width: 1px; background: none; box-shadow: none; }
.social-page .followers-meta { color: var(--library-muted); }
.social-page .profile-feed-section h1 { margin: 0 0 20px; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.03em; }
.social-feed-filter { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -8px 0 12px; color: var(--library-muted); font-size: .85rem; }
.social-page .friend-activity-item { background: none; border: 0; border-bottom: 1px solid var(--library-rule); border-radius: 0; box-shadow: none; margin: 0 0 24px; padding-bottom: 16px; }
.social-page .friend-activity-item.feed-expanded { transform: none; box-shadow: none; }
.social-page .feed-poster-wrap { height: 190px; border-radius: 8px; }
.social-page .feed-poster-wrap.feed-poster-empty { display: none; }
.social-page .feed-card-content { padding: 14px 0 8px; }
.social-page .feed-meta-row { flex-wrap: wrap; }
.social-page .feed-rating-row { flex-wrap: wrap; }
.social-page .compare-block, .social-page .feed-info-strip { padding: 10px 0; border: 0; border-radius: 0; background: none; }
.social-page .feed-topline { text-transform: none; letter-spacing: 0; }
.social-page .feed-insights-bar { box-sizing: border-box; margin: 0; }
@media (max-width: 600px) {
  body[data-page="social"] .profile-page { padding: 16px 18px 28px; }
  .social-page .feed-poster-wrap { height: 160px; }
  .library-main, body:has(.profile-page):not([data-page="social"]) .profile-page { padding: 20px 18px 28px; }
  .page-heading { display: block; margin-bottom: 12px; }
  .page-heading .text-link { display: inline-block; margin-top: 8px; }
  .library-controls { gap: 10px; }
  .view-switch { gap: 16px; }
  .compact-select select { font-size: .8rem; padding-right: 16px; }
  .rating-focus { min-height: min(62dvh,550px); margin-top: 12px; }
  .rating-panel { padding: 24px 20px 20px; }
  .rating-title { font-size: 2rem; margin-bottom: 14px; }
  .library-summary { gap: 10px; }
  .library-rank { width: 24px; }
  .library-title { font-size: .9rem; }
  .row-content { padding: 0 0 20px; }
  .profile-page .profile-media-grid { gap: 10px; }
  .profile-section-heading .text-link { font-size: .8rem; }
}
@media (max-width: 600px) and (max-height: 740px) {
  .rating-focus { min-height: 380px; }
  .rating-panel { padding: 22px 18px 18px; }
  .rating-title { font-size: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .rating-focus, .rating-saved, .review-prompt { animation: none; }
}

/* Cinematic Friends reviews. */
.social-page #friendsActivity { display: block; }
.social-page .cinematic-post { overflow: visible; padding: 0; margin: 0 0 38px; border: 0; background: none; animation: none; opacity: 1; transform: none; }
.social-page .cinematic-post:hover { background: none; }
.social-page .cinematic-post div { margin-top: 0; font-size: inherit; color: inherit; }
.social-page .review-post-author { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; text-align: left; }
.review-author-avatar { width: 34px; height: 34px; object-fit: cover; border-radius: 50%; background: #34303a; flex-shrink: 0; }
.review-author-name { color: #f6f6fb; font-size: .92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-author-time { margin-left: auto; color: #aaa5b1; font-size: .75rem; white-space: nowrap; flex-shrink: 0; }
.review-visual { --review-accent: #ff4081; position: relative; isolation: isolate; aspect-ratio: 1; width: 100%; overflow: hidden; border-radius: 12px; background: radial-gradient(ellipse at 12% 20%,#463041,transparent 70%),#15131a; color: #fff; container-type: inline-size; box-sizing: border-box; text-align: left; }
.review-visual-tv { --review-accent: #ffcc00; background: radial-gradient(ellipse at 12% 20%,#49402a,transparent 70%),#15131a; }
.review-scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.review-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,transparent 0%,#08070b55 30%,#08070bef 73%,#08070bfa),linear-gradient(0deg,#08070bce,transparent 70%); }
.social-page .cinematic-post .review-visual-copy, .review-visual-copy { position: absolute; right: 0; top: 0; bottom: 0; width: 64%; padding: 7%; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 18px; }
.review-visual .review-post-title { font: 600 clamp(22px,5.8cqw,38px)/1.12 'Outfit',sans-serif; letter-spacing: -.025em; color: #fff; margin: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; text-transform: none; text-shadow: 0 2px 12px #0008; }
.social-page .cinematic-post .review-post-rating, .review-post-rating { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: 100%; }
.review-post-stars { position: relative; display: inline-block; white-space: nowrap; line-height: 1; font-size: clamp(14px,3.2cqw,21px); letter-spacing: .04em; color: var(--review-accent); }
.review-stars-muted { opacity: .25; }
.review-stars-fill { position: absolute; inset: 0 auto 0 0; width: var(--score-fill); overflow: hidden; }
.review-post-score { color: var(--review-accent); font: 600 clamp(16px,3.8cqw,24px)/1 'Outfit',sans-serif; white-space: nowrap; font-variant-numeric: tabular-nums; }
.review-post-opinion { font: 400 clamp(15px,3.4cqw,21px)/1.45 'Outfit',sans-serif; color: #f3eef5; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; text-transform: none; }
.review-reveal { padding: 8px 0; min-height: 44px; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--review-accent); font: 500 15px 'Outfit',sans-serif; text-transform: none; }
.social-page .cinematic-post .review-post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; margin: 9px 0 0; }
.social-page .cinematic-post .review-reaction-controls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.post-action, .review-reaction { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; margin: 0; padding: 6px 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: #bbb5c3; font: 400 14px 'Outfit',sans-serif; text-transform: none; letter-spacing: 0; cursor: pointer; }
.post-action:hover, .review-reaction:hover { background: none; color: #fff; transform: none; box-shadow: none; }
.review-reaction { padding: 6px 8px; border-radius: 20px; color: #eee8f2; }
.review-reaction[aria-pressed="true"] { background: #ff40811a; outline: 1px solid #ff408166; }
.post-action:focus-visible, .review-reaction:focus-visible, .review-reveal:focus-visible { outline: 2px solid #ff4081; outline-offset: 3px; }
.read-full-review { color: #f2d7e4; margin-right: 20px; }
.review-feed-share { color: #aaa5b1; }
.review-preview-line { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; margin: 8px 0 0; color: #cec8d5; text-align: left; }
.social-page .cinematic-post strong { color: #f5eef8; text-shadow: none; }
.view-conversation { min-height: 36px; font-size: 13px; }
.review-post-status:empty { display: none; }
.review-post-status { color: #c9a1ad; font-size: 14px; }
.other-feed-activity { color: #aaa5b1; border-top: 1px solid #ffffff14; padding-top: 12px; }
.other-feed-activity > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-size: .85rem; }
.other-feed-activity > summary::after { content: '⌄'; margin-left: auto; }
.social-page .review-secondary-post { margin: 16px 0; border-bottom: 1px solid #ffffff14; padding-bottom: 16px; }
.review-secondary-post h3 { font-size: 1rem; margin: 8px 0; color: #ded8e5; }
.review-secondary-post > p { font-size: .85rem; color: #aaa5b1; }
.social-page .feed-insights-bar { display: none; }
.review-reading-dialog, .review-conversation-dialog { width: min(620px, calc(100vw - 24px)); padding: 24px; box-sizing: border-box; color: #f3eef5; text-align: left; }
.review-reading-dialog h2, .review-conversation-dialog h2 { padding-right: 28px; font: 600 24px/1.2 'Outfit',sans-serif; text-transform: none; overflow-wrap: anywhere; }
.review-reading-byline { color: #bcb5c7; font-size: 14px; }
.review-full-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; font-size: 17px; }
.review-conversation-comment { margin: 0 0 20px; line-height: 1.5; overflow-wrap: anywhere; }
.review-conversation-comment strong { display: block; font-size: 14px; color: #f3eef5; margin-bottom: 4px; }
.review-conversation-comment span { white-space: pre-wrap; }
.review-comment-form label { display: block; font-size: 14px; color: #c8c1d0; }
.review-comment-form textarea { display: block; box-sizing: border-box; width: 100%; margin: 8px 0 12px; border-radius: 8px; border: 1px solid #55505c; background: #25212c; color: #fff; padding: 12px; font: 16px/1.5 'Outfit',sans-serif; resize: vertical; }
.review-emoji-options { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; padding: 24px 0 0; }
.review-emoji-options button { font-size: 26px; padding: 12px; }
.review-spoiler-option { display: flex !important; align-items: center; gap: 8px; min-height: 44px; font-size: 14px !important; }
.review-spoiler-option input { accent-color: #ff4081; width: 18px; height: 18px; }
@media (max-width: 600px) {
  .review-shade { background: linear-gradient(0deg,#08070bfa 0%,#08070be8 44%,#08070b66 72%,#08070b15 100%); }
  .social-page .cinematic-post .review-visual-copy, .review-visual-copy { width: 100%; top: auto; padding: 6%; gap: 12px; justify-content: flex-end; }
  .review-visual .review-post-title { font-size: clamp(22px,6.4cqw,32px); }
  .review-post-opinion { font-size: 15px; line-height: 1.4; -webkit-line-clamp: 4; }
  .review-post-stars { font-size: clamp(14px,4.2cqw,19px); }
  .review-post-score { font-size: 18px; }
  .review-reading-dialog, .review-conversation-dialog { padding: 18px; }
  .review-post-author { gap: 8px; }
}
@media (max-width: 350px) {
  body[data-page="social"] .profile-page { padding-inline: 12px; }
  .review-visual-copy { gap: 9px; }
  .review-post-opinion { -webkit-line-clamp: 3; }
  .review-author-time { font-size: 11px; }
}

/* In-card Friends controls and conversations. */
.social-page .cinematic-post .review-card-footer { position: absolute; inset: auto 0 0; z-index: 1; padding: 8px 16px 10px; box-sizing: border-box; background: linear-gradient(0deg,#08070bfa,#08070bd9 75%,transparent); }
.social-page .cinematic-post .review-card-footer .review-post-actions { flex-wrap: nowrap; gap: 8px; margin: 0; }
.social-page .cinematic-post .review-reaction-controls { flex: 1; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.review-reaction-controls::-webkit-scrollbar { display: none; }
.review-card-footer .review-reaction { flex-shrink: 0; padding-inline: 6px; font-size: 13px; }
.review-card-footer .post-action { flex-shrink: 0; color: #e1dbe7; }
.review-card-footer .review-react-trigger, .review-card-footer .review-feed-share { width: 44px; font-size: 24px; }
.review-card-footer .review-comment-count { font-size: 13px; }
.review-card-footer .review-preview-line { display: block; min-height: 32px; width: 100%; margin: 0; padding: 5px 2px; text-align: left; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-size: 13px; line-height: 22px; }
.review-card-footer .review-post-status { margin: 2px 0; font-size: 12px; }
.social-page .cinematic-post .review-with-controls .review-visual-copy { bottom: var(--post-ui-height,90px); padding-bottom: 12px; }
.review-with-controls .read-full-review { min-height: 32px; padding: 0; margin: 0; font-size: 13px; }
.review-spoiler-hidden .read-full-review { display: none; }
.social-page .cinematic-post .review-inline-panel { position: absolute; z-index: 3; inset: auto 12px 12px; padding: 10px 12px; box-sizing: border-box; border-radius: 18px; background: #17131df5; box-shadow: 0 8px 32px #0008; backdrop-filter: blur(18px); color: #f3eef5; text-align: left; transform-origin: bottom left; animation: review-panel-open .22s ease-out both; }
.review-inline-panel[hidden] { display: none !important; }
.review-inline-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; font: 500 14px 'Outfit',sans-serif; min-height: 36px; }
.review-inline-close { width: 44px; min-height: 36px; padding: 0; color: #d3cbdc; font-size: 26px; }
.social-page .cinematic-post .review-inline-panel .review-emoji-options { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 2px; padding: 4px 0 0; }
.review-emoji-options .post-action { padding: 4px 0; min-height: 44px; font-size: 25px; border-radius: 50%; }
.review-emoji-options .post-action:hover, .review-emoji-options .post-action:focus-visible { background: #ffffff12; }
.social-page .cinematic-post .review-inline-conversation { display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 6px; height: min(76%,420px); }
.review-inline-conversation .review-conversation-thread { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 0 4px 0 0; font: 400 14px/1.4 'Outfit',sans-serif; }
.review-inline-conversation .review-conversation-comment { margin: 0 0 12px; line-height: 1.4; }
.review-inline-conversation .review-conversation-comment strong { font-size: 12px; margin-bottom: 2px; }
.review-inline-conversation .review-comment-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 8px; align-items: end; }
.review-inline-conversation .review-comment-form label { font-size: 0; }
.review-inline-conversation .review-comment-form textarea { margin: 0; padding: 8px; height: 54px; min-height: 54px; resize: none; font: 16px/1.15 'Outfit',sans-serif; border-color: #ffffff25; background: #ffffff09; }
.review-comment-submit { min-height: 44px; color: var(--review-accent,#ff4081); font-size: 13px; }
.review-inline-feedback { grid-column: 1 / -1; color: #e3c4d2; margin: 0; font: 400 12px/1.3 'Outfit',sans-serif; }
.review-inline-feedback:empty { display: none; }
.social-page .review-secondary-post { position: relative; }
.social-page .review-secondary-post .review-card-footer { position: static; padding: 0; background: none; }
.social-page .review-secondary-post .review-inline-panel { position: relative; inset: auto; margin: 8px 0; }
.social-page .review-secondary-post .review-inline-conversation { height: 280px; max-height: none; }
@keyframes review-panel-open { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 600px) {
  .social-page .cinematic-post .review-with-controls .review-visual-copy { padding: 5% 6% 8px; gap: 8px; }
  .review-with-controls .review-post-title { -webkit-line-clamp: 2; }
  .review-with-controls .review-post-opinion { -webkit-line-clamp: 3; }
  .review-with-controls .review-post-rating { gap: 8px; }
  .social-page .cinematic-post .review-card-footer { padding: 4px 10px 8px; }
  .social-page .cinematic-post .review-card-footer .review-post-actions { gap: 4px; }
  .review-card-footer .review-react-trigger, .review-card-footer .review-feed-share { width: 44px; }
}
@media (max-width: 350px) {
  .review-with-controls .review-post-opinion { -webkit-line-clamp: 2; }
  .social-page .cinematic-post .review-inline-panel .review-emoji-options { grid-template-columns: repeat(5,minmax(0,1fr)); }
}
.review-emoji-options .post-action[aria-pressed="true"] { background: #ffffff16; outline: 1px solid var(--review-accent,#ff4081); outline-offset: -2px; }
.diary-recovery{font-size:.85rem;color:#e9c3d9;line-height:1.5;margin:12px 0}
.diary-remove{color:#d7a3a7!important}
