/* =========================================================
   可乐诗人 · 手机端适配（poetcore 拼贴海报式）
   断点：≤640px 为手机；≥641px 桌面/平板一条规则都不碰。
   思路：手机上不隐藏拼贴，而是把海报浓缩成「海报带」——
   色块 + 贴纸 + 线稿 + 今日一句斜叠，便签双列，卡片保留撕边。
   ========================================================= */

/* 手机海报带：桌面与平板上一概不渲染 */
.cg-m-band{display:none}

@media (max-width:640px){

  /* body 不再当滚动容器（垂直滚动条会吃掉 15px 宽度）；html 上已有 overflow-x:clip 兜底 */
  body.cg-on{overflow-x:visible}

  /* ---------- 1 页头：两行紧凑 + 导航横滑 ---------- */
  .cg-hd{padding:10px 14px 0;gap:8px}
  .cg-site{gap:9px}
  .cg-site .en{display:none}
  .cg-site .nm{font-size:1.16rem;letter-spacing:.18em}
  .cg-logo{width:34px;height:34px;border-width:1.8px}
  .cg-tools{margin-left:auto;gap:7px;padding-bottom:8px}
  .cg-pill{padding:6px 10px 5px;font-size:11px}
  .cg-si{width:56px}
  .cg-nav{order:10;width:100%;margin-left:0;flex-wrap:nowrap;overflow-x:auto;
    padding:4px 2px 9px;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .cg-nav::-webkit-scrollbar{display:none}
  .cg-nav .ntape,.cg-nav .nclip{display:none}
  .cg-nav a{flex:0 0 auto;padding:8px 14px 7px;font-size:.88rem;
    box-shadow:2px 2px 0 rgba(34,34,34,.13)}
  .cg-nav a:nth-child(n){margin-top:0}
  .cg-nav a:nth-child(odd){transform:rotate(-.8deg)}
  .cg-nav a:nth-child(even){transform:rotate(.8deg)}

  /* ---------- 2 首页：海报带 + 便签双列 + 撕边卡片 ---------- */
  .cg-hero{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-start;
    height:auto;padding:12px 16px 4px}
  .cg-m-band{order:1;display:block;position:relative;flex:0 0 100%;height:186px;margin:2px 0 0}
  .cg-m-band .mb-blk{position:absolute;clip-path:var(--cg-t4);opacity:.92}
  .cg-m-band .mb-blk.r{background:rgba(184,38,38,.82);top:10px;left:-16px;width:158px;height:112px;transform:rotate(-4deg)}
  .cg-m-band .mb-blk.g{background:rgba(56,54,52,.8);top:78px;right:-20px;width:138px;height:96px;transform:rotate(3deg)}
  .cg-m-band .mb-blk.b{background:rgba(122,136,153,.55);top:0;right:64px;width:92px;height:62px;transform:rotate(-2deg)}
  .cg-m-band .mb-st{position:absolute;filter:drop-shadow(2px 4px 5px rgba(34,34,34,.2))}
  .cg-m-band .mb-st.s1{top:-4px;left:20px;width:98px;transform:rotate(-3deg);z-index:3}
  .cg-m-band .mb-st.s2{top:96px;right:8px;width:96px;transform:rotate(6deg);z-index:4}
  .cg-m-band .mb-st.s3{top:44px;left:158px;width:56px;transform:rotate(-9deg);z-index:4}
  .cg-m-band .mb-ln{position:absolute;left:10px;top:16px;width:150px;opacity:.5;z-index:2}
  .cg-m-band .mb-word{position:absolute;top:16px;right:170px;
    font-family:"Elite","Courier Prime",monospace;font-size:.62rem;letter-spacing:.22em;
    color:var(--cg-ink);background:var(--cg-card);padding:4px 9px 3px;
    clip-path:var(--cg-t2);box-shadow:2px 2px 0 rgba(34,34,34,.14);
    transform:rotate(-2deg);z-index:5}
  html.night .cg-m-band .mb-blk.r{background:rgba(208,87,78,.5)}
  html.night .cg-m-band .mb-blk.g{background:rgba(10,30,34,.92)}
  html.night .cg-m-band .mb-blk.b{background:rgba(15,163,177,.3)}
  html.night .cg-m-band .mb-st{filter:drop-shadow(2px 4px 5px rgba(0,0,0,.55)) brightness(.82) saturate(.92)}
  html.night .cg-m-band .mb-word{clip-path:none;border:1px solid rgba(15,163,177,.26)}

  /* 今日一句：斜叠在海报带上（order 提到便签之前，内联 top/left 必须清零） */
  .cg-hero .cg-main{order:2;position:relative !important;top:auto !important;left:auto !important;
    flex:0 0 100%;width:100% !important;
    margin:-96px 0 0 !important;transform:rotate(-1.6deg) !important;
    padding:24px 22px 20px;z-index:20;
    clip-path:var(--cg-t3) !important;border:0 !important;
    filter:drop-shadow(0 10px 12px rgba(34,34,34,.22))}
  /* 两张便签：双列小贴纸，垫在主卡下一行（显式宽度并排，不赌 flex-basis） */
  .cg-hero .cg-slip,.cg-hero .cg-main,.cg-rail .cg-who,.cg-rail .cg-hot{box-sizing:border-box !important}
  .cg-hero .cg-slip{order:3;position:static !important;flex:none !important;
    width:calc(50% - 10px) !important;min-width:0;
    margin:2px 0 0 !important;padding:13px 14px 11px !important;
    clip-path:var(--cg-t1) !important;border:0 !important;
    filter:drop-shadow(2px 4px 4px rgba(34,34,34,.16))}
  .cg-hero .cg-slip:nth-of-type(1){transform:rotate(-2.2deg) !important}
  .cg-hero .cg-slip:nth-of-type(2){transform:rotate(1.6deg) !important}
  .cg-hero .cg-slip em{text-align:left !important}
  /* 头像卡 + 标签墙：通栏堆叠，根治右溢出 */
  .cg-rail{order:4;position:static;width:100%;display:block;margin-top:6px}
  .cg-rail .cg-who,.cg-rail .cg-hot{flex:none;width:100% !important;max-width:100% !important;
    margin:0 0 14px;clip-path:var(--cg-t1) !important;border:0 !important}
  .cg-rail .cg-who{padding:26px 20px 20px;transform:rotate(-.8deg);
    filter:drop-shadow(0 8px 10px rgba(34,34,34,.14))}
  .cg-rail .cg-hot{padding:18px 16px 16px;transform:rotate(.7deg);
    filter:drop-shadow(0 8px 10px rgba(34,34,34,.14))}
  .cg-hot .wall{padding-right:2px}

  /* ---------- 3 诗歌单页：角贴回归 + 卡片密度 ---------- */
  .cg-title{padding:30px 0 20px}
  .cg-title h1,.cg-title h2{font-size:2.4rem;letter-spacing:.4em;text-indent:.4em}
  .cg-title .tape{top:12px;width:84px}
  .cg-corner{display:block !important;opacity:.6;filter:none}
  .cg-title img.cg-corner:nth-of-type(1){top:10px !important;left:2px !important;width:62px !important;transform:rotate(-8deg) !important}
  .cg-title img.cg-corner:nth-of-type(2){top:6px !important;right:2px !important;width:52px !important;transform:rotate(7deg) !important}
  .cg-title img.cg-corner:nth-of-type(3),.cg-title img.cg-corner:nth-of-type(4){display:none !important}
  .cg-ji{margin-top:30px}
  .cg-ji-head{gap:10px;margin-bottom:16px}
  .cg-ji-sticker{font-size:.92rem;padding:9px 15px 8px}
  .cg-poem{margin-bottom:24px;padding:15px 16px 12px}
  .cg-poem h3{font-size:1rem;letter-spacing:.12em;margin-bottom:9px}
  .cg-poem .stz,.cg-poem .verses p{font-size:.97rem;line-height:2.05}

  /* ---------- 4 单首诗页：印章落款 ---------- */
  .poem-wrap{padding-top:1.5rem}
  h1.pt{display:flex;align-items:center;gap:.75rem;letter-spacing:.12em;font-size:1.45rem}
  h1.pt::after{content:"詩";flex:0 0 auto;width:2.15rem;height:2.15rem;
    border:2px solid var(--seal);color:var(--seal);display:grid;place-items:center;
    font-size:1.02rem;font-weight:400;transform:rotate(-6deg)}
  .pmeta{margin-bottom:2rem}
  .pfoot{gap:.7rem}
  .pager{padding-bottom:2.4rem}

  /* ---------- 5 播放器 ---------- */
  .cg-playwrap{right:12px;bottom:12px}
  .cg-plist{width:200px;bottom:52px}

  /* ---------- 6 波点底：手机上略收，避免糊成一片 ---------- */
  body.cg-on::before{background-size:64px 64px,110px 110px,88px 88px}
}

/* 极窄屏（≤360px）：海报带微缩，防挤压 */
@media (max-width:360px){
  .cg-m-band{height:170px}
  .cg-m-band .mb-blk.r{width:140px;height:100px}
  .cg-m-band .mb-blk.g{width:120px;height:86px}
  .cg-m-band .mb-st.s1{width:86px}
  .cg-m-band .mb-word{right:150px}
  .cg-hero .cg-main{margin-top:-84px !important}
}
