/* Space Jam Radio — shared controls. Content templates remain module-owned. */

html{background:#080809;scrollbar-width:none}
html::-webkit-scrollbar{display:none}
body[data-app-page]{font-family:var(--app-font);color:var(--app-text)}
body[data-app-page] button,body[data-app-page] input,body[data-app-page] select{font-family:var(--app-font)}
body[data-app-page] [hidden]{display:none!important}

/* Full logo, natural aspect ratio, a consistent clickable area. */
body[data-app-page] .app-header{display:flex;align-items:center;gap:8px;box-sizing:border-box;min-height:var(--app-header-height)}
body[data-app-page] .app-brand{
  display:flex;align-items:center;justify-content:flex-start;position:static;
  width:146px;height:44px;min-height:44px;margin:0 auto 0 0;padding:0;
  flex:0 0 146px;overflow:visible;background:none;border:0;transform:none;
}
body[data-app-page] .app-brand img{
  display:block;position:static;inset:auto;transform:none;
  width:140px;height:auto;max-width:100%;max-height:44px;object-fit:contain;
}
body[data-app-page] .app-language,
body[data-app-page] .app-icon{
  height:44px;min-height:44px;min-width:44px;width:44px;flex:0 0 44px;
  padding:0;margin:0;display:inline-flex;align-items:center;justify-content:center;
  color:#f5f5f6;background:transparent;border:0;border-radius:10px;box-sizing:border-box;
  text-decoration:none;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;
}
body[data-app-page] .app-language{font-size:12px;font-weight:650;letter-spacing:.02em}
body[data-app-page] .app-language:before{content:none}
body[data-app-page] .app-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;filter:none}
body[data-app-page] :is(.app-icon,.app-language):active{background:#ffffff14;transform:scale(.96);opacity:1}
body[data-app-page] :is(.app-brand,.app-icon,.app-language):focus-visible{outline:2px solid #fff;outline-offset:3px}

/* Home: keep the full-screen photo feed; give each action one location. */
body[data-app-page="home"] .pocket{max-width:var(--app-width)}
body[data-app-page="home"] .chrome-head{
  padding:env(safe-area-inset-top,0px) var(--app-gutter) 0;
  min-height:calc(var(--app-header-height) + env(safe-area-inset-top,0px));
  background:linear-gradient(180deg,#0009,transparent);pointer-events:none;
}
body[data-app-page="home"] .masthead{width:100%;height:var(--app-header-height);gap:8px;pointer-events:auto}
body[data-app-page="home"] .post-copy{left:var(--app-gutter);right:var(--app-gutter);max-width:none;bottom:calc(128px + env(safe-area-inset-bottom,0px))}
body[data-app-page="home"] .post-title{font-size:clamp(32px,8.8vw,43px);line-height:1.03;letter-spacing:.005em;max-width:24ch;margin:12px 0 12px;-webkit-line-clamp:4}
body[data-app-page="home"] .post-title.long{font-size:clamp(30px,8vw,38px)}
body[data-app-page="home"] .post-lead{font-size:12px;line-height:1.5;max-width:37ch;margin-bottom:12px;color:#d5d5d9}
body[data-app-page="home"] .credit{font-size:10px;margin-bottom:16px;color:#b5b5bd}
body[data-app-page="home"] .post-links{display:flex;flex-flow:row wrap;gap:12px;align-items:center;justify-content:flex-start}
body[data-app-page="home"] .post-cta{height:44px;min-height:44px;font-size:12px;font-weight:650;padding:0 16px;gap:20px;border-radius:9px;box-shadow:none}
body[data-app-page="home"] .post-cta svg{height:18px;width:18px}
body[data-app-page="home"] .post-share{background:#ffffff12;border:1px solid #ffffff1c;text-shadow:none}
body[data-app-page="home"] .photo-counter{top:calc(88px + env(safe-area-inset-top,0px));right:20px;font-size:11px;padding:6px 9px;background:#0005;border:1px solid #ffffff1a}
body[data-app-page="home"] .end-content img{width:176px;height:auto}

/* Discover: identical header rhythm; original curation and grid retained. */
body[data-app-page="discover"] #discovery{max-width:var(--app-width)}
body[data-app-page="discover"] .topbar{padding:env(safe-area-inset-top,0px) var(--app-gutter) 0;background:#0b0b0df5}
body[data-app-page="discover"] .brandline.discover-shell-brand{height:var(--app-header-height);padding:0;gap:8px}
body[data-app-page="discover"] .brandline #discover-switchlang{width:44px;padding:0;font:650 12px/1 var(--app-font);border-radius:10px}
body[data-app-page="discover"] .filters{height:54px;gap:24px;padding-left:20px;padding-right:20px}
body[data-app-page="discover"] .filters button{font-size:13px;font-weight:600;border-bottom-width:2px}
body[data-app-page="discover"] .curation-card{border-radius:14px}
body[data-app-page="discover"] .curation-heading h1{font-family:var(--app-font);font-size:26px;letter-spacing:-.7px}
body[data-app-page="discover"] .grid{padding-left:20px;padding-right:20px;gap:14px;grid-template-columns:repeat(2,minmax(0,1fr))}
body[data-app-page="discover"] .tile-photo{border-radius:11px}
body[data-app-page="discover"] .searchbox{border-radius:10px;background:#19191d;border:1px solid #ffffff08}
body[data-app-page="discover"] .ref-icon{height:44px;min-height:44px;width:44px;border-radius:10px}
body[data-app-page="discover"] .ref-primary{border-radius:10px;min-height:44px}
body[data-app-page="discover"] .ref-platform{border-radius:10px;min-height:44px}
body[data-app-page="discover"] #detail{max-width:var(--app-width)}

/* Profile: same logo and controls, the existing two-tab library. */
body[data-app-page="profile"] .profile-v3{max-width:var(--app-width);padding-left:20px;padding-right:20px}
body[data-app-page="profile"] .profile-topbar{height:calc(var(--app-header-height) + env(safe-area-inset-top,0px));gap:8px}
body[data-app-page="profile"] .profile-top-actions{gap:8px}
body[data-app-page="profile"] #profile-language{order:2}
body[data-app-page="profile"] #profile-settings-button{order:1}
body[data-app-page="profile"] .profile-heading{padding:28px 0}
body[data-app-page="profile"] .profile-kicker{font-size:10px;letter-spacing:.08em;color:#a4a4ac}
body[data-app-page="profile"] .profile-identity h1{font-size:25px;letter-spacing:-.8px}
body[data-app-page="profile"] .profile-subtitle{font-size:12px;line-height:1.5}
body[data-app-page="profile"] .profile-tab{height:58px;gap:8px;font-size:13px}
body[data-app-page="profile"] .profile-card-image{border-radius:11px}
body[data-app-page="profile"] .profile-card-action{min-height:44px;min-width:44px;right:-8px;bottom:-7px}
/* The same storage information remains available in Profile settings. */
body[data-app-page="profile"] .profile-storage-note{display:block}

/* TV: same brand header; keep the official video intact and controls outside. */
body[data-app-page="tv"] .app{max-width:var(--app-width);--nav-h:var(--app-nav-height)}
body[data-app-page="tv"] .top{top:0;left:0;right:0;padding:env(safe-area-inset-top,0px) var(--app-gutter) 0;height:calc(var(--app-header-height) + env(safe-area-inset-top,0px));min-height:0;gap:8px;justify-content:flex-start}
body[data-app-page="tv"] .top .app-brand{pointer-events:auto}
body[data-app-page="tv"] .stage{--media-top:24%;}
body[data-app-page="tv"] .action{width:48px;height:44px;min-height:44px;gap:1px}
body[data-app-page="tv"] .action-icon{width:44px;height:29px}
body[data-app-page="tv"] .action-icon svg{width:24px;height:24px;stroke-width:1.75}
body[data-app-page="tv"] .action-label{font:500 9px/12px var(--app-font);color:#b8b8bf;letter-spacing:0}
body[data-app-page="tv"] .artist-link{min-height:34px;gap:8px}
body[data-app-page="tv"] .source{font-size:11px;min-height:28px;line-height:1.4}
body[data-app-page="tv"] .read-story{min-height:44px;font-size:12px;margin:4px 0 0;line-height:1.35}
body[data-app-page="tv"] .read-story:after{color:#a7a7ae}
body[data-app-page="tv"] .preview-meta{top:calc(var(--media-top) + var(--media-h) + 20px);left:20px;right:84px}
body[data-app-page="tv"] .sheet{max-width:var(--app-width)}

@media(min-width:560px){
  body[data-app-page="home"] .pocket,body[data-app-page="tv"] .app{height:100dvh;max-height:none;margin:0 auto;border:0;border-radius:0;box-shadow:none}
  body[data-app-page="home"] .post{height:100dvh}
  body[data-app-page] #sjr-app-nav{bottom:16px;max-width:calc(var(--app-width) - 2px);border-radius:0 0 17px 17px}
  body[data-app-page="profile"],body[data-app-page="discover"]{max-width:var(--app-width);margin:0 auto;border:0;border-radius:0;min-height:100dvh;overflow-x:hidden;box-sizing:border-box}
  body[data-app-page="profile"] .profile-v3{border:0;min-height:calc(100dvh - 34px)}
  body[data-app-page="discover"] .topbar{border-radius:17px 17px 0 0}
  body[data-app-page="discover"] .curation-card{flex-basis:86%;height:290px}
}
@media(max-width:360px){
  :root{--app-gutter:16px}
  body[data-app-page] .app-brand{width:128px;flex-basis:128px}
  body[data-app-page] .app-brand img{width:126px}
  body[data-app-page] .app-header{gap:4px}
  body[data-app-page="profile"] .profile-v3{padding-left:16px;padding-right:16px}
  body[data-app-page="profile"] .profile-top-actions{gap:4px}
  body[data-app-page="home"] .post-title{font-size:32px}
  body[data-app-page="home"] .post-title.long{font-size:29px}
  body[data-app-page="discover"] .filters{gap:21px;padding-left:16px;padding-right:16px}
}
@media(max-height:690px) and (orientation:portrait){
  body[data-app-page="home"] .post-copy{bottom:calc(122px + env(safe-area-inset-bottom,0px))}
  body[data-app-page="home"] .post-title,body[data-app-page="home"] .post-title.long{font-size:30px;margin:9px 0}
  body[data-app-page="home"] .post-lead{display:none}
  body[data-app-page="home"] .credit{margin-bottom:12px}
}
@media(orientation:landscape) and (max-height:600px){
  body[data-app-page="tv"] .app{height:100dvh;max-width:none;margin:0;border:0;border-radius:0}
}
@media(prefers-reduced-motion:reduce){body[data-app-page] *{scroll-behavior:auto!important}}

.publisher-links{display:flex;flex-wrap:wrap;gap:16px;padding:24px 20px;border-top:1px solid #ffffff18;font-size:12px}.publisher-links a{color:#c9c9ce;text-decoration:none}.magazine-artist{scroll-margin-top:130px}.magazine-artist:target{outline:2px solid #ff5c55;outline-offset:5px}
