/* ===== Phone UI (≤860px): app-style bottom tab bar, menu sheet, quick native-feeling page transitions =====
   Markup of the bar is in every page (build.py: tabbar); the sheet is built by assets/mobile.js from the header's nav.
   The header keeps the logo and the language switch; the old ☰ dropdown is gone on phones. */
.tabbar,.msheet{display:none}

/* ---------- page transitions on phones (kinds are set in the <head> script) ---------- */
.tabbar{view-transition-name:tab-bar}
html:active-view-transition-type(m-push)::view-transition-old(root){animation:m-out .36s cubic-bezier(.32,.72,0,1) both;box-shadow:none}
html:active-view-transition-type(m-push)::view-transition-new(root){animation:m-in .36s cubic-bezier(.32,.72,0,1) both;
  box-shadow:-1px 0 0 rgba(255,255,255,.08),-22px 0 46px rgba(0,0,0,.5)}
html:active-view-transition-type(m-tab)::view-transition-old(root){animation:m-fo .12s linear both;box-shadow:none}
html:active-view-transition-type(m-tab)::view-transition-new(root){animation:m-fi .26s cubic-bezier(.2,.8,.2,1) both;box-shadow:none}
html:active-view-transition-type(m-push,m-tab)::view-transition-group(site-header),
html:active-view-transition-type(m-push,m-tab)::view-transition-group(tab-bar),
html:active-view-transition-type(m-push,m-tab)::view-transition-group(chat-fab){animation-duration:.2s}
@keyframes m-out{to{transform:translateX(-28%);opacity:.4}}
@keyframes m-in{from{transform:translateX(100%)}}
@keyframes m-fo{to{opacity:0}}
@keyframes m-fi{from{opacity:0;transform:translateY(8px)}}

@media(max-width:860px){
  :root{--hd:58px;--tb:calc(58px + env(safe-area-inset-bottom,0px))}
  html{-webkit-tap-highlight-color:transparent}
  body{padding-bottom:var(--tb)}
  a,button{touch-action:manipulation}

  /* header: logo + language */
  .hd{height:var(--hd);padding:0 max(16px,env(safe-area-inset-right)) 0 max(16px,env(safe-area-inset-left))}
  .logo img{height:30px}
  .burger,#nav,#nav.open{display:none}
  .hd>.lang{margin-left:auto;flex:none}
  .hd>.lang a{white-space:nowrap}

  /* things that were measured against the old 66px header */
  .hero2{min-height:calc(100svh - var(--hd) - var(--tb))}
  .home .screen{min-height:calc(100svh - var(--hd) - var(--tb))}
  .nbar{top:var(--hd)}
  .nposter img{max-height:calc(100svh - var(--hd) - var(--tb))}

  /* ---------- tab bar ---------- */
  .tabbar{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:0;right:0;bottom:0;z-index:60;height:var(--tb);
    padding:0 max(4px,env(safe-area-inset-right)) env(safe-area-inset-bottom,0px) max(4px,env(safe-area-inset-left));
    background:rgba(9,9,10,.88);-webkit-backdrop-filter:saturate(1.5) blur(18px);backdrop-filter:saturate(1.5) blur(18px);
    border-top:1px solid rgba(255,255,255,.09)}
  .tb{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;height:58px;min-width:0;padding:0;border:0;
    background:none;color:#8a8680;font-family:var(--font-label);font-size:9.5px;font-weight:600;line-height:1;letter-spacing:.1em;cursor:pointer;
    -webkit-user-select:none;user-select:none;transition:color .2s,transform .18s cubic-bezier(.2,.8,.2,1)}
  .tb i{width:23px;height:23px;background:currentColor;-webkit-mask:var(--m) center/contain no-repeat;mask:var(--m) center/contain no-repeat}
  .tb::before{content:"";position:absolute;top:-1px;left:50%;width:20px;height:2px;margin-left:-10px;border-radius:0 0 2px 2px;background:var(--red);
    transform:scaleX(0);transition:transform .25s cubic-bezier(.2,.8,.2,1)}
  .tb[aria-current],.tb.on,.tb[aria-expanded=true]{color:#fff}
  .tb[aria-current]::before,.tb.on::before{transform:none}
  .tb:active{transform:scale(.9)}
  .tb:focus-visible{outline:1px dashed rgba(255,255,255,.6);outline-offset:-6px}
  .tb[data-k=home]{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11.2 12 4.3l8 6.9M6.3 9.6v9.9h11.4V9.6M10 19.5v-5h4v5'/%3E%3C/svg%3E")}
  .tb[data-k=news]{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 4.5h8.6L18 7.9v11.6H6zM14.4 4.7V8H18M9 11.5h6M9 14.5h6M9 17.5h3.5'/%3E%3C/svg%3E")}
  .tb[data-k=artist]{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='3.5' width='6' height='11' rx='3'/%3E%3Cpath d='M6 11.5a6 6 0 0 0 12 0M12 17.5v3M9 20.5h6'/%3E%3C/svg%3E")}
  .tb[data-k=live]{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v1.8a1.7 1.7 0 0 0 0 3.4v1.8a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1.8a1.7 1.7 0 0 0 0-3.4zM14.5 7.7v1.6M14.5 11.2v1.6M14.5 14.7v1.6'/%3E%3C/svg%3E")}
  .tb[data-k=menu]{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M5 7.5h14M5 12h14M5 16.5h14'/%3E%3C/svg%3E")}
  .tb[data-k=menu][aria-expanded=true]{--m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E")}

  /* ---------- menu sheet ---------- */
  html.mn-open,html.mn-open body{overflow:hidden}
  .msheet{display:block;position:fixed;inset:0;z-index:58;visibility:hidden;pointer-events:none;transition:visibility 0s .34s}
  .msheet.on{visibility:visible;pointer-events:auto;transition-delay:0s}
  .ms-bd{position:absolute;inset:0;background:rgba(0,0,0,.62);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);opacity:0;transition:opacity .3s;touch-action:none}
  .msheet.on .ms-bd{opacity:1}
  .ms-panel{position:absolute;left:0;right:0;bottom:var(--tb);max-height:calc(100dvh - var(--tb) - 40px);overflow-y:auto;overscroll-behavior:contain;
    padding:8px max(20px,env(safe-area-inset-right)) 18px max(20px,env(safe-area-inset-left));background:#141517;border-radius:22px 22px 0 0;
    border-top:1px solid rgba(255,255,255,.1);box-shadow:0 -24px 60px rgba(0,0,0,.6);outline:none;
    transform:translateY(calc(100% + 30px));transition:transform .38s cubic-bezier(.32,.72,0,1)}
  .msheet.on .ms-panel{transform:none}
  .ms-panel.drag{transition:none}
  .ms-grab{width:38px;height:4px;margin:4px auto 8px;border-radius:2px;background:rgba(255,255,255,.22)}
  .ms-list{list-style:none;margin:0;padding:0}
  .ms-list a{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:54px;padding:0 4px;border-bottom:1px solid rgba(255,255,255,.07);
    font-family:var(--font-label);font-size:15px;font-weight:600;line-height:1;letter-spacing:.08em;color:var(--text);transition:background .15s}
  .ms-list a:active{background:rgba(255,255,255,.05)}
  .ms-list a[aria-current]{color:var(--red)}
  .ms-list a .ico{width:14px;height:14px;color:#6f6b65}
  .ms-list a[aria-current] .ico{color:var(--red)}
  .msheet.on .ms-list li{animation:ms-in .42s cubic-bezier(.2,.8,.2,1) calc(var(--i)*28ms + 60ms) backwards}
  @keyframes ms-in{from{opacity:0;transform:translateY(14px)}}
  .ms-foot{display:flex;align-items:center;justify-content:center;padding-top:18px}
  .ms-foot .social{display:flex;gap:18px}
  .ms-foot .social img{width:26px;height:26px}

  /* chat button sits above the bar; out of the way while the menu is open */
  .prc-fab{left:16px;bottom:calc(var(--tb) + 14px)}
  html.mn-open .prc-fab{opacity:0;pointer-events:none}

  /* heading entrance: shorter wait after the quicker transition */
  html[data-vt="1"]{--pt-d:.16s}
  html[data-vt="1"] .hero2-copy .eyebrow{animation-delay:.12s}
  html[data-vt="1"] .hero2-copy h1{animation-delay:.18s}
  html[data-vt="1"] .hero2-copy .lede{animation-delay:.24s}
  html[data-vt="1"] .hero2-copy .hero2-cta{animation-delay:.3s}
  html[data-vt="1"] .hero2-news{animation-delay:.36s}
}
/* tablets in portrait: chat panel above the bar (phones show it full screen) */
@media(min-width:561px) and (max-width:860px){
  .prc-panel{left:16px;bottom:calc(var(--tb) + 80px);height:min(680px,calc(100dvh - var(--tb) - 104px))}
}
@media (prefers-reduced-motion:reduce){
  .ms-panel,.ms-bd,.tb,.tb::before{transition-duration:.01s}
  .msheet.on .ms-list li{animation:none}
}
/* ---------- touch screens: pressing a picture belongs to the interface, not to the browser's copy / save menu ---------- */
@media (hover:none){
  a img,.rec,.rec *,.tabbar,.msheet,header,.hero2-bg{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
  .article-body a,.article-body img{-webkit-touch-callout:default;-webkit-user-select:auto;user-select:auto}
  /* press and hold a record: the disc slides out and spins, as hover does with a mouse (class set by mobile.js;
     the hover rules themselves are neutralised first, because a touch leaves hover stuck on) */
  .rec:hover .disc-wrap{transform:translateX(16%)}
  .rec:hover .disc,.rec:hover .disc::before{animation-play-state:paused}
  .rec:hover .sleeve{transform:none;box-shadow:0 14px 30px rgba(0,0,0,.55),inset 0 0 0 1px rgba(255,255,255,.06)}
  .rec:hover .rec-tip{opacity:0;transform:translate(-50%,6px)}
  .rec.press{z-index:5}
  .rec.press .disc-wrap{transform:translateX(30%)}
  .rec.press .disc,.rec.press .disc::before{animation-play-state:running}
  .rec.press .sleeve{transform:translateX(-8%) rotate(-3deg) scale(.98);box-shadow:0 22px 40px rgba(0,0,0,.65)}
  .rec.press .rec-tip{opacity:1;transform:translate(-50%,0)}
  /* pressed feedback on cards */
  .ag:active,.ni>a:active,.hn-item:active,.card:active{opacity:.78}
}
@media (hover:none){
  a:has(img){-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
  .article-body a:has(img){-webkit-touch-callout:default}
}
