/* ULTRA finishing system. One shared layer after ui-tokens.css.
   Module styles retain composition; this file owns controls, type and states. */
html{font-size:100%;background:var(--color-canvas)}

body[data-app-page]{font-family:var(--app-font);font-optical-sizing:auto;font-synthesis:style;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
body[data-app-page] :is(button,input,select,textarea,h1,h2,h3,.post-title,.tile-title,.curation-title,.detail-title){font-family:var(--app-font)}
body[data-app-page] :is(button,a,input,select,textarea){-webkit-tap-highlight-color:transparent}
body[data-app-page] :is(button,a,input,select,textarea):focus-visible{outline:2px solid currentColor;outline-offset:3px}
body[data-app-page] .app-header .app-page-name{font:600 28px/1.15 var(--app-font);letter-spacing:-.03em}
body[data-app-page="profile"] .profile-topbar .app-page-name,body[data-app-page="tv"] .app-header .app-page-name{font-size:1.5rem}
body[data-app-page] .app-page-dot{color:var(--app-accent)}
body[data-app-page]:not([data-app-page="reader"]) :is(.app-language,.app-labeled-control,.app-icon,.features-search-toggle,.discover-search-trigger){min-height:44px;border-radius:22px;background:var(--control-glass);border:0;box-shadow:inset 0 0 0 1px #ffffff14,inset 0 1px 0 #ffffff0c;backdrop-filter:none;-webkit-backdrop-filter:none;transition:background-color var(--duration-state) var(--ease-out),transform var(--duration-press) var(--ease-out)}
body[data-app-page] :is(.app-language,.app-labeled-control){font-size:.75rem;line-height:1.2;font-weight:500;padding-inline:12px;gap:7px}
body[data-app-page="discover"] .brandline #discover-switchlang{font:500 12px/1.2 var(--app-font);padding-inline:12px}
body[data-app-page] :is(.app-icon,.features-search-toggle,.discover-search-trigger){width:44px;min-width:44px}
body[data-app-page] :is(.app-language,.app-labeled-control) svg{stroke-width:1.65}
body[data-app-page] #sjr-app-nav{background:linear-gradient(135deg,#ffffff0d,transparent 65%),var(--glass-surface);border:1px solid var(--glass-stroke);border-radius:32px;box-shadow:0 8px 30px #0005,inset 0 1px 0 #ffffff13;backdrop-filter:blur(24px) saturate(115%);-webkit-backdrop-filter:blur(24px) saturate(115%)}
body[data-app-page] #sjr-app-nav a{font:500 .75rem/1.4 var(--app-font);letter-spacing:-.015em;color:#b5b5b5;gap:5px}
body[data-app-page] #sjr-app-nav a.current{color:#fff;font-weight:600}
body[data-app-page] #sjr-app-nav a svg{stroke-width:1.65;width:23px;height:23px}
body[data-app-page] #sjr-app-nav a.current svg{stroke-width:1.85}
body[data-app-page] #sjr-app-nav .dock-indicator{border-radius:26px;background:linear-gradient(145deg,#ffffff20,#ffffff0c);border-color:#ffffff14;box-shadow:inset 0 1px 0 #ffffff13}
/* Home: same lower anchor, no clipped third line from the old 2.06em cap. */
body[data-app-page="home"] .post-copy{bottom:calc(118px + env(safe-area-inset-bottom,0px));text-shadow:0 2px 14px #0008}
body[data-app-page="home"] .post-title,body[data-app-page="home"] .post-title.long{font-size:clamp(25px,6.7vw,30px);font-weight:600;line-height:1.14;letter-spacing:-.04em;text-transform:none;text-wrap:pretty;display:block;-webkit-line-clamp:unset;min-height:0;max-height:none;margin:9px 0}
body[data-app-page="home"] .post-lead{font-size:.8125rem;line-height:1.55;font-weight:400;letter-spacing:0;color:#dedede;-webkit-line-clamp:2;min-height:0;max-height:none;text-wrap:pretty}
body[data-app-page="home"] .post-meta{font-size:.75rem;line-height:1.4;font-weight:500;letter-spacing:.025em;flex-wrap:wrap}
body[data-app-page="home"] .post-kind{font-size:.75rem;letter-spacing:.055em;font-weight:600;color:#ff6961}
body[data-app-page="home"] .post-identity .sjr-person-name{font-size:.8125rem;font-weight:600}
body[data-app-page="home"] .post-cta{font-size:.75rem;font-weight:550;letter-spacing:0}
body[data-app-page="home"] .home-reactions{bottom:calc(118px + env(safe-area-inset-bottom,0px))}
body[data-app-page="home"] .home-reactions svg{width:24px;height:24px;stroke-width:1.65}
body[data-app-page="home"] .post-shade{background:linear-gradient(180deg,#0006,transparent 24%,transparent 40%,#0005 57%,#000d 82%,#000 100%)}
body[data-app-page="home"] .end-content h2{font:600 29px/1.16 var(--app-font);text-transform:none;letter-spacing:-.035em}
/* Discover: refine existing rails, without changing their content or order. */
body[data-app-page="discover"],body[data-app-page="profile"],body[data-app-page="features"]{background:var(--app-canvas)}
body[data-app-page="discover"] .topbar,body[data-app-page="profile"] .profile-topbar,body[data-app-page="features"] .features-header{background:#080808f2;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
body[data-app-page="discover"] .filters{height:56px;padding-block:4px 8px}
body[data-app-page="discover"] .filters button{min-height:44px;height:44px;font-size:.8125rem;font-weight:500;border-radius:22px}
body[data-app-page="discover"] .filters button[aria-pressed="true"]{background:#ffffff10;box-shadow:none;font-weight:600}
body[data-app-page="discover"] :is(.curation-heading h1,.discovery-shelf-head h2){font-size:22px;line-height:1.2;font-weight:600;letter-spacing:-.035em}
body[data-app-page="discover"] .curation-card{border-radius:18px;box-shadow:inset 0 0 0 1px var(--finish-line)}
body[data-app-page="discover"] .curation-details{gap:7px}
body[data-app-page="discover"] .curation-title{font-size:29px;line-height:1.12;font-weight:600;letter-spacing:-.04em;text-wrap:pretty}
body[data-app-page="discover"] .curation-type{font-size:.75rem;line-height:1.4;font-weight:600;letter-spacing:.06em}
body[data-app-page="discover"] .curation-sub{font-size:.8125rem;line-height:1.5;color:#dedede}
body[data-app-page="discover"] #grid .tile-title{font-size:.9375rem;line-height:1.35;font-weight:600;letter-spacing:-.025em}
body[data-app-page="discover"] #grid .type-artist .tile-title{font-size:1rem}
body[data-app-page="discover"] #grid :is(.tile-format,.sjr-note-genre,.sjr-note-name){font-size:.75rem;line-height:1.4;color:var(--color-text-secondary)}
body[data-app-page="discover"] #grid .tile-format{font-weight:500;letter-spacing:.045em;margin-top:12px}
body[data-app-page="discover"] #grid .tile-photo{border-radius:14px;background:var(--color-surface)}
body[data-app-page="discover"] #grid .artwork-tile .tile-photo{border-radius:10px}
body[data-app-page="discover"] #grid :is(.tile-more,.sjr-note-save){width:44px;flex-basis:44px;min-height:44px}
body[data-app-page="discover"] .ref-description{font-size:.9375rem;line-height:1.65;color:#c6c6c6}
body[data-app-page="discover"] .ref-title{font-size:30px;line-height:1.16;font-weight:600;letter-spacing:-.04em;text-wrap:pretty}
body[data-app-page="discover"] :is(.ref-format,.ref-editorial-card small,.ref-release small){font-size:.75rem;line-height:1.4;letter-spacing:.02em}
body[data-app-page="discover"] .ref-icon{width:44px;min-width:44px;min-height:44px}
body[data-app-page="discover"] .ref-section h3{font-size:20px;line-height:1.25;font-weight:600;letter-spacing:-.03em}
body[data-app-page="discover"] .ref-editorial-card{background:var(--color-surface);border-radius:16px}
body[data-app-page="discover"] .ref-editorial-card strong{font-size:.9375rem;line-height:1.4}
/* Profile: sufficient text contrast, controls clear of titles. */
body[data-app-page="profile"] .profile-library-title{font-size:1.5rem;line-height:1.2;font-weight:600;letter-spacing:-.035em}
body[data-app-page="profile"] .profile-subtitle{font-size:.8125rem;line-height:1.55;color:var(--color-text-secondary)}
body[data-app-page="profile"] .profile-tab{font-size:.8125rem;font-weight:500}
body[data-app-page="profile"] .profile-tab.active{font-weight:600}
body[data-app-page="profile"] .profile-card-category{font-size:.75rem;line-height:1.4;font-weight:500;letter-spacing:.045em;color:var(--color-text-secondary)}
body[data-app-page="profile"] .profile-card-title{font-size:.9375rem;line-height:1.35;font-weight:600;letter-spacing:-.025em;padding-right:38px}
body[data-app-page="profile"] .profile-card-artist{font-size:.75rem;line-height:1.5;padding-right:38px;color:var(--color-text-secondary)}
body[data-app-page="profile"] .profile-card-action{width:44px;height:44px;right:-6px;bottom:-4px}
body[data-app-page="profile"] .profile-card-image{border-radius:14px}
body[data-app-page="profile"] .profile-empty p{font-size:.875rem;line-height:1.6;color:var(--color-text-secondary)}
body[data-app-page="profile"] .profile-empty h2{font-size:20px;font-weight:600;line-height:1.25}
/* Reader: compact editorial type across mobile and desktop. */
body[data-app-page] .sjr-reader{font-family:var(--app-font)}
body[data-app-page] :is(.rd-copy h1,.rd-story-header h1){font-family:var(--app-font);font-weight:600;letter-spacing:-.04em;line-height:1.16;text-wrap:pretty}
body[data-app-page] .rd-text{font:400 1rem/1.75 var(--app-font)}
body[data-app-page] .rd-longform{font:400 .9375rem/1.75 var(--app-font);letter-spacing:-.01em;color:var(--rd-ink)}
body[data-app-page] .rd-story-header .rd-meta{font-size:.75rem;line-height:1.4}
body[data-app-page] .rd-exchange h2{font:600 18px/1.5 var(--app-font);letter-spacing:-.025em}
body[data-app-page] .rd-longform p{margin-bottom:20px}
body[data-app-page] .rd-deck{font-size:1rem;line-height:1.65}
body[data-app-page] :is(.glass-sheet,.profile-dialog){background:linear-gradient(145deg,#ffffff08,transparent 60%),#161616f5;border:1px solid #ffffff26;box-shadow:0 16px 44px #0008,inset 0 1px 0 #ffffff13;backdrop-filter:blur(var(--glass-blur)) saturate(var(--glass-saturation));-webkit-backdrop-filter:blur(var(--glass-blur)) saturate(var(--glass-saturation))}
body[data-app-page] :is(.glass-sheet h2,.profile-dialog-head h2){font-size:21px;line-height:1.2;font-weight:600;letter-spacing:-.03em}
body[data-app-page] :is(.glass-language-options,.settings-group){background:#ffffff06}
body[data-app-page="profile"] .settings-group .profile-setting-row{font-size:.875rem;line-height:1.45}
body[data-app-page] :is(.toast,.profile-toast,.features-status:not(:empty)){border-radius:20px;font-size:.8125rem;line-height:1.4;white-space:normal}
@view-transition{navigation:auto}
::view-transition{pointer-events:none}
::view-transition-old(root){animation:app-page-out 110ms ease both}
::view-transition-new(root){animation:app-page-in 170ms ease-out both}
@keyframes app-page-out{to{opacity:0}}
@keyframes app-page-in{from{opacity:0;transform:translateY(2px)}to{opacity:1;transform:none}}
@media(hover:hover){body[data-app-page] :is(.app-language,.app-labeled-control,.app-icon,.features-search-toggle,.discover-search-trigger):hover{background-color:#ffffff10}}
@media(max-width:360px){body[data-app-page] .app-header .app-page-name{font-size:25px}body[data-app-page="profile"] .profile-topbar .app-page-name{font-size:21px}body[data-app-page] :is(.app-language,.app-labeled-control){padding-inline:8px;font-size:.75rem;gap:5px}body[data-app-page="discover"] .brandline #discover-switchlang{font-size:.75rem;padding-inline:8px}body[data-app-page="home"] .post-title,body[data-app-page="home"] .post-title.long{font-size:25px}body[data-app-page="home"] .post-lead{font-size:.8125rem}}
@media(max-height:690px){body[data-app-page="home"] .post-title,body[data-app-page="home"] .post-title.long{font-size:1.5rem;line-height:1.14;min-height:0;max-height:none}body[data-app-page="home"] .post-lead{-webkit-line-clamp:1;min-height:0;max-height:none}}
@media(prefers-reduced-motion:reduce){::view-transition-old(root),::view-transition-new(root){animation:none}body[data-app-page] *{scroll-behavior:auto!important}}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more){body[data-app-page] :is(#sjr-app-nav,.glass-sheet,.profile-dialog,.app-language,.app-labeled-control,.app-icon,.features-search-toggle,.discover-search-trigger){background:#181818;backdrop-filter:none;-webkit-backdrop-filter:none}body[data-app-page] #sjr-app-nav .dock-indicator{background:#383838}}

/* Shared interaction states (formerly split between app-finish and module patches). */
body[data-app-page] :is(.app-language,.app-labeled-control,.app-icon,.glass-sheet-close){transition:transform var(--duration-press) var(--ease-out),background-color var(--duration-state) var(--ease-out)}
body[data-app-page] :is(.app-language,.app-labeled-control,.app-icon,.glass-sheet-close):active{transform:scale(.97)}
body[data-app-page] :is(button,[role="button"]):disabled{opacity:.45;cursor:default}
body[data-app-page] :is(.glass-sheet-close,.profile-dialog-close){min-width:44px;min-height:44px}
body[data-app-page] .glass-sheet-close{background:#ffffff06;box-shadow:inset 0 0 0 1px #ffffff0b}
body[data-app-page="profile"] .profile-top-actions{gap:6px}
body[data-app-page="discover"] .detail-top{background:var(--color-canvas);border-bottom-color:var(--color-hairline)}
body[data-app-page="discover"] .detail-top .icon-btn{border-radius:var(--radius-pill);background:#ffffff06;box-shadow:inset 0 0 0 1px #ffffff13}
body[data-app-page="home"] .home-reactions button{display:flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;border-radius:12px;transition:transform var(--duration-press) var(--ease-out),color var(--duration-state) var(--ease-out)}
body[data-app-page="home"] .home-reactions button:active{transform:scale(.97)}
body[data-app-page="profile"] .profile-storage-note{display:block;margin:8px 0 24px;padding-top:16px;border-top:1px solid var(--color-hairline);color:var(--color-text-secondary);font:.75rem/1.6 var(--font-ui);text-align:left}
body[data-app-page="profile"] .profile-card[data-image-role="artwork"] .profile-card-image{aspect-ratio:1;border-radius:var(--radius-artwork)}
body[data-app-page="profile"] .profile-card[data-image-role="artwork"] .profile-card-image img{object-fit:contain}
body[data-app-page="profile"] .profile-card[data-content-type="video"] .profile-card-image{aspect-ratio:16/9}
body[data-app-page] .rd-longform{max-width:72ch;margin-inline:auto}
body[data-app-page] .rd-longform :is(em,i){font-synthesis:style}
body[data-app-page] .toast{bottom:calc(var(--app-nav-height) + 12px);max-width:calc(100% - 32px)}
body[data-app-page] :is(.profile-dialog,.glass-sheet){max-height:calc(100svh - 32px);overflow-y:auto;overscroll-behavior:contain}
@supports not (backdrop-filter:blur(1px)){
  body[data-app-page] :is(#sjr-app-nav,.glass-sheet,.profile-dialog,.app-language,.app-labeled-control,.app-icon,.features-search-toggle,.discover-search-trigger){background:var(--color-elevated)}
}
@media(prefers-reduced-motion:reduce){
  body[data-app-page] :is(.app-language,.app-labeled-control,.app-icon,.glass-sheet-close,.home-reactions button,.dock-indicator){transition:none;transform:none}
}

/* Opaque accessibility fallback for the same command surfaces, no extra layer. */
@media(prefers-reduced-transparency:reduce){
 body[data-app-page] :is(.glass-sheet,.profile-dialog){background:var(--color-elevated);backdrop-filter:none;-webkit-backdrop-filter:none}
}
