/* ==========================================================================
   飘零浅醉 · 手机版样式
   --------------------------------------------------------------------------
   依据 Ardot 画布「飘零浅醉 · 手机版设计」= https://ardot.tencent.com/file/726089712227134
   三屏（375 宽）：首页 / 阅读页 / 归档页。关键尺寸取自设计稿实测：
     顶部导航 58（归档 56）· 阅读页工具条 52 + 进度条 2
     首屏 padding 34/20/36/20，徽标居中 135×22，主标题 44，按钮 48
     天空观测面板 292（radius 22）· 数据栏 padding 18/0
     分区 padding 40/20 · 卡片 padding 20（radius 18）
     影像 335×190 / 335×160（radius 14）· 手记卡 padding 16/18（radius 14）
     CTA padding 44/20 · 页脚 padding 36/20/28/20
   作用范围：仅 ≤767px（手机）。桌面端一行都不受影响（全部规则包在媒体查询内）。
   ========================================================================== */

/* 手机专用 DOM：桌面端一律不显示
   ⚠️ .nav-m 必须列在这里！它是 .nav-inner(space-between) 的第 4 个子元素、
      且排在 .nav-actions 之后，只藏 .m-burger 的话里面的「讨论」链接会
      作为普通 block 露在电脑版右上角。 */
.nav-m,.m-burger,.m-drawer,.m-toolbar,.m-ptrack{display:none}

/* 轻提示（分享复制链接等）——只在手机端会被触发 */
.m-toast{position:fixed;left:50%;bottom:32px;z-index:90;
         transform:translate(-50%,10px);opacity:0;pointer-events:none;
         max-width:80vw;padding:10px 18px;border-radius:999px;
         background:rgba(7,18,15,.94);border:1px solid rgba(116,172,140,.32);
         color:#CFE2D8;font-size:13px;line-height:1.5;text-align:center;
         transition:opacity .25s ease,transform .25s ease;
         backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.m-toast.on{opacity:1;transform:translate(-50%,0)}

@media (max-width:767px){

  /* ====================== 全局 ====================== */
  :root{--pad:20px}
  html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
  body{background:#07120F}
  .wrap{max-width:none}

  /* ====================== 顶部导航 ====================== */
  .nav{background:#07120F;backdrop-filter:none;-webkit-backdrop-filter:none;
       border-bottom:1px solid rgba(116,172,140,.12)}
  .nav-inner{height:58px;gap:12px}
  .brand{gap:9px}
  .brand-mark{height:28px;width:auto;border-radius:0;display:block}
  .brand-text{gap:0}
  .brand-name{font-size:16px;letter-spacing:.4px;line-height:1.2}
  .brand-sub{display:none}
  .nav-links,.nav-actions{display:none}
  /* 归档页导航略矮，与设计稿一致 */
  .pg-arch .nav-inner{height:56px}
  .pg-arch .brand-mark{height:26px;width:auto}
  .pg-arch .brand-name{font-size:15.5px}

  /* 右侧：讨论 + 菜单按钮 */
  .m-burger{display:flex;align-items:center;justify-content:center;
            width:22px;height:22px;padding:0;border:0;background:none;color:#EFF5F1;cursor:pointer}
  .m-burger svg{width:22px;height:22px}
  .nav-m{display:flex;align-items:center;gap:16px;flex:0 0 auto}
  .nav-m a{font-size:13.5px;color:#9CC9B4;padding:4px 0}
  .pg-arch .nav-m a{font-size:13px}
  .pg-arch .m-burger,.pg-arch .m-burger svg{width:20px;height:20px}

  /* 抽屉菜单 */
  .m-drawer{position:fixed;inset:0;z-index:80;background:rgba(4,11,9,.97);
            backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);
            display:none;flex-direction:column;padding:0 20px}
  .m-drawer.open{display:flex}
  .m-drawer-top{height:58px;display:flex;align-items:center;justify-content:space-between;flex:0 0 auto}
  .m-drawer-top span{font-family:var(--serif);font-size:16px;color:#EFF5F1}
  .m-drawer-x{width:22px;height:22px;padding:0;border:0;background:none;color:#9CC9B4;
              font-size:20px;line-height:1;cursor:pointer}
  .m-drawer-in{display:flex;flex-direction:column;padding:14px 0 0}
  .m-drawer-in a{font-family:var(--serif);font-size:19px;color:#CFE2D8;
                 padding:16px 0;border-bottom:1px solid rgba(116,172,140,.12)}
  .m-drawer-in a:last-child{border-bottom:0}
  .m-drawer-cta{margin-top:24px;display:flex;align-items:center;justify-content:center;
                height:48px;border-radius:999px;background:var(--amber);color:var(--ink) !important;
                font-family:var(--sans) !important;font-size:15px;font-weight:500;border:0 !important}

  /* ====================== 首屏 ====================== */
  .hero{padding:0;overflow:visible;
        background:linear-gradient(180deg,#051210 0%,#0F2B24 60%,#173D30 100%)}
  /* display:contents 让 hero-copy 的子元素直接参与外层 flex 排序，
     从而把「面板」插到「数据栏」之前（与设计稿一致），无需改 HTML 结构 */
  .hero-inner{display:flex;flex-direction:column;align-items:stretch;gap:0;padding-top:34px;padding-bottom:36px}
  .hero-copy{display:contents}

  .badge{order:1;align-self:center;padding:6px 12px;margin:0 0 26px;
         font-size:11px;letter-spacing:.4px;line-height:1.35;
         background:rgba(116,172,140,.13);border:1px solid rgba(116,172,140,.3)}
  .couplet{order:2;margin:0 0 14px;font-size:13px;letter-spacing:.8px;line-height:1.6}
  .hero-title{order:3;gap:0;margin:0 0 16px}
  .hero-title .line-a,.hero-title .line-b{font-size:44px;line-height:1.16;letter-spacing:1.4px}
  .hero-poetry{order:4;margin:0 0 14px;font-size:14px;letter-spacing:1.2px}
  .hero-desc{order:5;margin:0 0 26px;font-size:13.5px;line-height:1.85;max-width:none}
  .hero-cta{order:6;flex-direction:column;gap:10px;flex-wrap:nowrap}
  .hero-cta a{width:100%;height:48px;padding:0;font-size:15px}
  .sky-panel{order:7}
  .stats{order:8;margin:26px 0 0;padding:18px 0;gap:12px;
         justify-content:space-between;flex-wrap:nowrap;width:100%}
  .stats>div{display:flex;flex-direction:column;gap:3px;min-width:0}
  .stats dt{font-size:21px;line-height:1.1}
  .stats dd{margin:0;font-size:11px;line-height:1.3}

  /* 天空观测面板：固定 292 高，叶脉星图居中、指数卡贴底（设计稿是叠放关系） */
  .sky-panel{position:relative;display:block;flex:0 0 auto;
             width:100%;height:292px;min-height:0;border-radius:22px;padding:16px;
             box-shadow:none;
             background:linear-gradient(180deg,#E6F0EB 0%,#B5D6C7 52%,#21614D 100%)}
  .panel-top{position:relative;z-index:3}
  .chip-dark{padding:5px 11px;font-size:11px}
  .sun-icon{width:22px;height:22px}
  .vein{position:absolute;left:50%;top:44%;transform:translate(-50%,-50%);
        width:180px;height:180px;margin:0}
  .glass{position:absolute;left:16px;right:16px;bottom:16px;z-index:2;
         width:auto;padding:12px 14px 14px;border-radius:16px;gap:8px;
         background:rgba(8,23,18,.62)}
  .glass-label{font-size:11.5px;letter-spacing:.4px}
  .glass-tag{font-size:11.5px}
  .glass-value{font-size:24px}
  .glass-meta{font-size:10.5px;line-height:1.5}
  .bars{height:34px;gap:5px}
  .bars i{border-radius:4px}
  .bars-cap{display:none}

  /* ====================== 通用分区 ====================== */
  .section{padding-top:40px;padding-bottom:40px}
  .section.light{background:#F1F5F0}
  .section.dark{background:#081613}
  .sec-head{margin-bottom:22px;align-items:flex-start;gap:10px}
  .eyebrow{font-size:11.5px;letter-spacing:2.4px;margin-bottom:10px}
  .sec-title{font-size:25px;line-height:1.32;letter-spacing:.6px}
  .sec-note{font-size:12px;align-self:flex-start;white-space:normal}
  .sec-link{font-size:12.5px;align-self:flex-end;padding-bottom:2px}
  /* 三向分区设计稿里没有「查看全部栏目」链接 */
  #themes .sec-link{display:none}
  /* 手记区标题行：左标题 + 右「全部 N 篇」同一行 */
  #notes .sec-head{flex-direction:row;align-items:flex-end;justify-content:space-between;gap:12px}

  /* ====================== 三向卡片 ====================== */
  .bento{display:flex;flex-direction:column;gap:22px}
  .card{padding:20px;border-radius:18px;border-color:#DBE8E0;box-shadow:none}
  .card:hover{transform:none;box-shadow:none}
  .card-top{margin-bottom:14px}
  .card-top svg{width:22px;height:22px}
  .card-title{font-size:20px;line-height:1.38;margin-bottom:14px}
  .card-desc{font-size:13px;line-height:1.85;margin-bottom:14px}
  .card-desc.dark{margin-bottom:14px}
  .chip-light,.chip-amber{padding:5px 11px;font-size:11px}
  .card-stats{gap:32px}
  .card-stats strong{font-size:17px;line-height:1.25}
  .card-stats span{font-size:11px;line-height:1.4}
  .snippet{padding:13px 14px 14px;border-radius:12px;gap:7px}
  .snippet-tag{font-size:10px;letter-spacing:2px}
  .snippet-body{font-size:13px;line-height:1.8}
  .card-wide{flex-direction:column;align-items:flex-start;gap:12px;padding:20px}
  .wide-left{gap:12px}
  .wide-title{font-size:20px;line-height:1.38}
  .wide-right{width:100%;flex:none;align-items:flex-start;gap:14px}
  .wide-desc{font-size:13px;line-height:1.85;text-align:left}
  .tags{gap:8px;flex-wrap:wrap}
  .tags span{padding:5px 13px;font-size:11.5px}

  /* ====================== 影像 ====================== */
  .gallery{display:flex;flex-direction:column;gap:20px}
  .frame{border-radius:14px}
  .gallery .shot:nth-child(1) .frame,
  .gallery .shot:nth-child(2) .frame{aspect-ratio:335 / 190 !important}
  .gallery .shot:nth-child(3) .frame,
  .gallery .shot:nth-child(4) .frame{aspect-ratio:335 / 160 !important}
  .shot:hover{transform:none}
  .shot figcaption{font-size:12px;margin-top:8px}

  /* ====================== 手记列表 ====================== */
  .notes{gap:12px}
  .note{flex-direction:column;align-items:flex-start;gap:8px;padding:16px 18px;border-radius:14px}
  .note:hover{transform:none;box-shadow:none;border-color:var(--line)}
  .note-title{font-size:16px;line-height:1.45}
  .note-meta{font-size:11.5px;white-space:normal;line-height:1.4}
  .today-tag{margin-left:8px;padding:2px 8px;font-size:10px}
  .notes-more{margin-top:18px;text-align:center}
  .notes-more .sec-link{display:flex;align-items:center;justify-content:center;
                        width:100%;height:46px;border:1px solid #3C7C62;border-radius:999px;
                        color:#3C7C60;font-size:14px;font-weight:500;align-self:stretch}

  /* ====================== 订阅 CTA ====================== */
  .cta{padding-top:44px;padding-bottom:44px}
  .cta-inner{gap:22px}
  .cta-logo{width:200px}
  .cta-title{font-size:27px;line-height:1.3}
  .cta-sub{font-size:13.5px;line-height:1.8}
  .subscribe{flex-direction:column;gap:12px;width:100%;flex-wrap:nowrap}
  .field{width:100%;height:48px;padding:0 20px;font-size:14px;border-radius:999px}
  .subscribe .btn-primary{width:100%;height:48px;padding:0;font-size:15px}
  .cta-note{font-size:11.5px}

  /* ====================== 页脚 ====================== */
  /* 手机版仍走竖排：品牌块 → 分隔线 → 居中版权 + 备案。
     电脑版把页脚拍平成了单行 flex，这里必须逐项显式撤销
     （display:contents / .footer .wrap 的 flex / white-space:nowrap） */
  .footer{padding-top:36px;padding-bottom:28px}
  .footer .wrap{display:block}
  .foot-top{display:flex;flex-direction:column;align-items:flex-start;gap:10px}
  .foot-brand{display:flex;flex-direction:column;flex:0 0 100%;width:100%;max-width:none;gap:12px}
  .brand-line{gap:10px}
  .brand-line svg{width:26px;height:26px}
  .foot-name{font-size:18px;white-space:normal}
  .foot-tag{font-size:12.5px;line-height:1.8;white-space:normal}
  .foot-line{display:block;height:1px;background:#12241F;margin-top:24px}
  .foot-bottom{display:flex;flex-direction:column;align-items:center;gap:7px;margin-top:14px;text-align:center}
  .foot-beian{order:1;flex-direction:column;align-items:center;gap:6px;font-size:11px}
  .foot-beian::before{display:none}
  .foot-bottom>span{order:2;font-size:11px;line-height:1.6;white-space:normal}
  .foot-beian .beian{font-size:11px;gap:5px;white-space:normal}
  .foot-beian .beian svg{width:12px;height:12px}
  /* 阅读页 / 归档页页脚：设计稿只有分隔线 + 备案 + 版权 */
  .footer-compact{padding-top:28px;padding-bottom:24px}
  .footer-compact .foot-top{display:none}
  .footer-compact .foot-line{margin-top:0}
  .footer-compact .foot-bottom{margin-top:14px}

  /* ====================== 阅读页：工具条 + 进度条 ====================== */
  .pg-post .nav{display:none}
  .m-toolbar{display:flex;position:sticky;top:0;z-index:70;
             height:52px;padding:0 20px;align-items:center;justify-content:space-between;
             background:#07120F}
  .m-toolbar button{padding:0;border:0;background:none;color:#EFF5F1;
                    font-family:var(--sans);font-size:13.5px;cursor:pointer;
                    display:inline-flex;align-items:center;gap:6px}
  .m-toolbar svg{width:18px;height:18px}
  .m-tcat{font-size:13.5px;font-weight:500;color:#9CC9B4}
  .m-share{color:#9CC9B4}
  /* 进度条：设计稿是一条深色轨道 + 琥珀进度；轨道由手机专用 div 画，.progress 仍是 JS 驱动的进度 */
  .m-ptrack{display:block;position:fixed;top:52px;left:0;right:0;height:2px;background:#12342A;z-index:69}
  .pg-post .progress{top:52px;height:2px;background:#D7884A;z-index:70}

  /* ====================== 阅读页：头部 / 正文 ====================== */
  .post-head{padding-top:26px;padding-bottom:30px;
             background:linear-gradient(180deg,#051210 0%,#0F2B24 100%)}
  .post-crumb{display:none}
  .post-cat{padding:5px 12px;font-size:11px;margin-bottom:14px;letter-spacing:.4px}
  .post-title{font-size:27px;line-height:1.32;letter-spacing:.6px}
  .post-meta{margin-top:14px;gap:10px;font-size:12px}
  /* 设计稿只保留「日期 · 天气 · 时长」三项（AQI / 字数 / 第 N 观测日 收起）。
     子元素序列：1span 2i 3span 4i 5span 6i 7span 8i 9span 10i 11span 12.tag
     → 留 1,2,3,4,7；隐 5,6,8 与 9 之后全部（含 auto-tag）。 */
  .post-meta>*:nth-child(5),
  .post-meta>*:nth-child(6),
  .post-meta>*:nth-child(8),
  .post-meta>*:nth-child(n+9){display:none}

  .article{padding-top:26px;padding-bottom:26px;background:#FDFEFD}
  .article-body{max-width:none}
  .article-body p{font-size:16px;line-height:2;letter-spacing:.3px;margin-bottom:18px}
  .article-body p:first-child::first-letter{
    font-size:inherit;font-weight:inherit;color:inherit;float:none;margin:0}
  .article-body h2{font-size:17.5px;line-height:1.6;letter-spacing:.4px;color:#12332A;
                   margin:26px 0 14px;padding-left:12px;border-left:3px solid var(--amber)}
  .article-body blockquote{margin:20px 0;padding:16px 18px;border-radius:12px;
                           background:#EDF5F0;border-left:3px solid rgba(116,172,140,.5);
                           font-size:15px;line-height:1.9;color:#2F6B4F}
  .article-body blockquote::before,.article-body blockquote::after{content:none}
  .obs-card{margin:24px 0;padding:18px;border-radius:16px;
            background:#0F2A21}
  .obs-title{font-size:12.5px;letter-spacing:0;margin-bottom:14px}
  .obs-title::after{display:none}
  .obs-grid{grid-template-columns:repeat(2,1fr);gap:14px}
  .obs-grid dt{font-size:11px}
  .obs-grid dd{font-size:16px}
  .post-tags{gap:8px;margin-top:26px;padding-top:22px}
  .post-tags span{padding:5px 13px;font-size:11.5px}
  .post-nav{padding-top:26px;padding-bottom:26px}
  .post-nav-inner{grid-template-columns:1fr;gap:12px}
  .pnav{padding:16px 18px;border-radius:14px}
  .pnav.next{text-align:left;align-items:flex-start}
  .pnav-label{font-size:11.5px;letter-spacing:1.4px}
  .pnav-title{font-size:15.5px}

  /* ====================== 归档页 ====================== */
  .pg-arch .arch-head{padding:30px 0 0;background:#F1F5F0}
  .arch-head .wrap{padding:0 20px}
  .pg-arch .arch-title{font-size:30px;line-height:1.3;color:#12332A;letter-spacing:.6px}
  .pg-arch .arch-sub{margin-top:12px;font-size:13px;line-height:1.75;color:#5F7A6C}
  .filters{margin:20px 0;gap:8px}
  .filter{padding:8px 15px;font-size:12.5px;background:#fff;
          border:1px solid #DBE8E0;color:#5F7A6C;border-radius:999px}
  .filter:hover{border-color:#DBE8E0;color:#5F7A6C}
  .filter.on{background:var(--moss);border-color:var(--moss);color:#fff;font-weight:500}

  .arch-list{background:#F1F5F0;padding-top:0;padding-bottom:20px}
  .arch-inner{max-width:none;display:flex;flex-direction:column;gap:12px}
  .arch-row{
    display:grid;gap:8px;align-items:center;
    grid-template-columns:auto auto 1fr;
    grid-template-areas:
      "title title title"
      "ex    ex    ex"
      "cat   date  min";
    padding:16px 18px;border:1px solid #DBE8E0;border-radius:14px;background:#fff;
  }
  .arch-row:hover{background:#fff;padding-left:18px}
  .arch-row.today{border-color:#BC8749}
  .arch-row-t{grid-area:title;font-size:16px;line-height:1.45;font-weight:500;
              display:flex;align-items:center;justify-content:space-between;gap:8px}
  .arch-row-t .auto{margin:0;flex:0 0 auto;padding:3px 8px;border-radius:999px;
                    background:var(--amber);color:var(--ink);font-family:var(--sans);
                    font-size:10px;font-weight:500;line-height:1.4}
  .arch-ex{grid-area:ex;font-size:12.5px;line-height:1.7;color:#7E9A8B;
           display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .arch-cat{grid-area:cat;background:none;padding:0;font-size:11px;color:#A3B8AC}
  .arch-date{grid-area:date;flex:none;font-size:11px;color:#A3B8AC}
  .arch-min{grid-area:min;font-size:11px;color:#A3B8AC}
  .arch-cat::after,.arch-date::after{content:'·';margin-left:6px;color:#C6D5CC}
  .pager{padding:16px 0 8px;margin-top:20px;gap:10px;flex-wrap:wrap}
  .pager button{min-width:34px;height:34px;padding:0 10px;border-radius:999px;
                border:1px solid #DBE8E0;background:transparent;color:#5F7A6C;font-size:13px}
  .pager button:first-child,.pager button:last-child{padding:0 14px;font-size:12.5px;color:#7E9A8B}
  .pager button.on{background:var(--moss);border-color:var(--moss);color:#fff;font-weight:500}

  /* ====================== 回到顶部 ====================== */
  .to-top{right:16px;bottom:16px;width:40px;height:40px;font-size:16px}
}

/* 超窄屏（≤340px）再收一档，避免文字挤压出框 */
@media (max-width:340px){
  .hero-title .line-a,.hero-title .line-b{font-size:38px}
  .sec-title{font-size:22px}
  .stats dt{font-size:19px}
  .stats dd{font-size:10.5px}
  .card-title,.wide-title{font-size:18px}
  .pg-arch .arch-title{font-size:26px}
  .pager button{min-width:30px;height:32px;padding:0 8px}
}
