
/* MOBILE COVER + VIEWPORT FIX — only on screens, never affect A4 print */
@media screen and (max-width:899px){
  html,body{width:100%;height:100%;min-height:0;overflow:hidden}
  .stage{
    width:100%;height:100dvh;min-height:0;
    max-height:100dvh;aspect-ratio:auto;overflow:hidden;
  }
  .stage .slide,.stage .slide.dark{
    position:absolute!important;inset:0!important;
    width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;
    margin:0!important;overflow-x:hidden!important;overflow-y:auto!important;
    overscroll-behavior-y:contain;
    scrollbar-width:none;
  }
  .stage .slide::-webkit-scrollbar{width:0;display:none}
  .topbar{z-index:16;width:100%;left:0;right:0;transform:none}
  .nav{z-index:16;left:clamp(16px,4vw,26px);right:clamp(16px,4vw,26px);bottom:calc(13px + env(safe-area-inset-bottom,0px));width:auto;transform:none}
  .slide:not(.cover){padding-bottom:calc(105px + env(safe-area-inset-bottom,0px))}
  .cover,.cover.dark{
    justify-content:flex-start!important;
    padding-top:calc(84px + env(safe-area-inset-top,0px))!important;
    padding-bottom:calc(84px + env(safe-area-inset-bottom,0px))!important;
  }
  .cover .main-content{
    position:relative;
    z-index:2;
    width:100%;max-width:100%;min-width:0;
    min-height:0!important;height:auto!important;
    margin-top:auto;margin-bottom:0;
    flex:0 0 auto;
    display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;
  }
  .cover .section-tag{
    align-self:flex-start;
    max-width:100%;
    line-height:1.45;
    margin:0 0 20px;
    font-size:10px;
    letter-spacing:.04em;
  }
  .cover .h1{
    max-width:100%;width:100%;
    margin:0 0 18px!important;
    font-size:clamp(29px,7.8vw,40px)!important;
    font-weight:800;line-height:1.43!important;
    letter-spacing:-.016em;
    overflow-wrap:break-word;
    text-wrap:pretty;
  }
  .cover .lead{
    width:100%;max-width:100%!important;
    font-size:clamp(13px,3.5vw,15px)!important;
    line-height:1.9!important;
    margin:0!important;
    text-align:right;
    overflow-wrap:break-word;
  }
  .cover .cover-meta{
    margin:23px 0 0;
    width:100%;min-width:0;
    display:flex;flex-wrap:wrap;align-items:center;
    gap:8px 12px;
    color:#a2a2a6;
    font-size:11px;line-height:1.65;
  }
  .cover-meta span{height:auto;width:auto;border-radius:0;background:none}
  .cover .cover-meta .cover-date{
    display:inline-flex;align-items:center;
    gap:8px;padding-right:11px;border-right:2px solid #e45d1a;
    color:#f7f7f4;white-space:nowrap;
  }
  html[data-theme="light"] .cover .cover-meta .cover-date{color:#202024}
  .cover .footerline{
    z-index:2;
    flex:0 0 auto;
    width:100%;max-width:100%;
    margin-top:22px!important;margin-bottom:auto!important;
    padding:12px 0 0!important;
    border-top:1px solid #303034;
    font-size:10px;line-height:1.65;
    white-space:normal;overflow-wrap:break-word;
  }
  html[data-theme="light"] .cover .footerline{border-color:#d9d8d3}
  .cover .cover-art,.cover .cover-grid{display:none!important}
  .cover:after{top:25%;width:2px;height:60px}
}
@media screen and (max-width:600px){
  .cover,.cover.dark{padding-left:20px!important;padding-right:20px!important}
  .topbar{min-height:64px;padding:14px 20px}
  .brand{gap:9px}
  .brand img{width:clamp(110px,32vw,136px)}
  .brand-context{font-size:10px}
  .nav{left:16px;right:16px}
}
@media screen and (max-width:359px){
  .cover,.cover.dark{padding-left:17px!important;padding-right:17px!important}
  .cover .h1{font-size:29px!important;line-height:1.4!important}
  .cover .lead{font-size:13px!important;line-height:1.85!important}
  .cover .cover-meta{font-size:10px;gap:7px}
  .cover .footerline{font-size:9px}
  .topbar{padding-inline:17px}
  .brand img{width:110px}
  .brand-context{font-size:9px}
}
@media screen and (max-height:630px) and (max-width:899px){
  .cover,.cover.dark{
    padding-top:calc(73px + env(safe-area-inset-top,0px))!important;
    padding-bottom:calc(74px + env(safe-area-inset-bottom,0px))!important;
  }
  .cover .section-tag{margin-bottom:13px}
  .cover .h1{margin-bottom:12px!important}
  .cover .cover-meta{margin-top:16px}
  .cover .footerline{margin-top:15px!important;padding-top:9px!important}
}
