/* =============================================================================
   摄影计划工作台 · 先行版 v2 —— 响应式覆盖层
   -----------------------------------------------------------------------------
   用法：在 v2/index.html 的 style.css 之后引入（最后加载，权重够压住旧覆盖块）
        <link rel="stylesheet" href="/static/v2/style.css?v=NNN">
        <link rel="stylesheet" href="/static/v2/responsive.css?v=NNN">

   边界（硬约束）：
     · 本文件所有规则都写在 max-width 媒体查询里，最宽 1366px；
       因此 ≥1600px 桌面（含 2242 截图档）一个像素都不会变。
     · 只新增规则，不修改、不删除 style.css 的任何内容。
     · 不引入外部依赖、不用图片、不用 JS。

   断点：
     ≤1366  小笔记本（1366×768 / 1366×900）
     ≤1180  窄桌面 / 横屏平板大号
     ≤1024  平板横屏（iPad 1024×768）
     ≤900   进入手机壳（底部导航）—— 与 style.css 旧手机块同界，此处重写覆盖
     ≤820   平板竖屏（768×1024）
     ≤620   手机（390×844、414）
     ≤420   小屏手机（375、360）

   覆盖页面（body[data-view]）：
     login / home / plans / plan（含分镜三栏焦点区、选片浮层、约定单）/ live
     / library / me；以及通用浮层（含 askConfirm 确认框）
   ============================================================================= */

/* =============================================================================
   ≤1366 · 小笔记本：只收密度，不动结构
   ============================================================================= */
@media (max-width:1366px){
  .main{padding:20px 24px 28px}
  .head{gap:10px;margin-bottom:16px}
  .head h1{font-size:22px}
  .duo{gap:14px}
  .calgrid{gap:6px}
  .calgrid .cell{padding:5px 7px}
  .calgrid .cell .pill{font-size:11.5px;padding:0 6px}
  .weathercard .wstat{padding:2px 12px}
  .weathercard .wtemp b{font-size:38px}
  .weathercard .wicon svg{width:64px;height:64px}
  .kanban{gap:12px}
  .pd-grid{gap:14px}
  .focusgrid{gap:12px}
  .focusgrid{grid-template-columns:190px minmax(0,1fr) 300px}
  .ptitle{font-size:19px}
  .pdinfo-head .dnum{font-size:40px}
}

/* =============================================================================
   ≤1366 且视口不高（1366×768 / 1280×800 这类小笔记本）
   style.css 的 ≥901 块给 .home-cal 写了 flex:85 1 0、.hf-item 写了 flex:1 1 0，
   但「#view 纵向撑满」只在 min-height:880 才启用 → 短视口下没有确定高度，
   flex-basis:0 会把日历压成一条（1366×800 实测 .home-cal 高 40px，是 style.css 原有问题）。
   这里把 flex 改回 auto，恢复自然高度（≥880 高的桌面不受影响）。
   ============================================================================= */
@media (max-width:1366px) and (max-height:879px){
  body[data-view="home"] .homegrid .homeleft > .home-cal{flex:0 0 auto;min-height:0}
  body[data-view="home"] .homegrid .homeleft > .home-alerts{flex:0 0 auto;min-height:0;max-height:none}
  body[data-view="home"] .homegrid .homeleft > .home-alerts .alertlist{
    flex:none;height:auto;overflow:visible;grid-template-rows:none;grid-auto-rows:auto}
  body[data-view="home"] .homefocus.hf-split .hf-item{flex:0 0 auto}
}

/* =============================================================================
   ≤1180 · 窄桌面：首页左右两栏 → 单列堆叠（焦点栏在上、日历在下）
   ============================================================================= */
@media (max-width:1180px){
  .side{width:184px;flex:0 0 184px;padding:16px 10px}
  .main{padding:18px 20px 24px}

  /* ---- 首页：解除「纵向撑满 + 双栏」，改成自然流（页面滚动） ----
     注意：style.css 的 ≥901 块里有
       body[data-view="home"] .homegrid .homeleft > .home-cal{flex:85 1 0;min-height:0}
     权重比我原先的 .homeleft > .home-cal 高，单列后会把日历压成一条。
     这里用同等/更高权重把它改回 auto，并同时解除所有 flex 挤压。 */
  body[data-view="home"] #view{display:block;overflow-y:auto}
  body[data-view="home"] #view > .weathercard{flex:none;min-height:0;max-height:none}
  body[data-view="home"] .duo.homegrid{grid-template-columns:minmax(0,1fr);gap:14px;align-items:start}
  body[data-view="home"] .duo.homegrid > .card.homefocus{order:-1}
  body[data-view="home"] .duo.homegrid > .homeleft{order:0}
  .homeleft{min-height:0;gap:12px}
  body[data-view="home"] .homegrid .homeleft > .home-cal{flex:0 0 auto;min-height:0;max-height:none}
  body[data-view="home"] .homegrid .homeleft > .home-alerts{flex:0 0 auto;min-height:0;max-height:none}
  body[data-view="home"] .homegrid .homeleft > .home-cal .calwrap,
  body[data-view="home"] .homegrid .homeleft > .home-cal .cal,
  body[data-view="home"] .homegrid .homeleft > .home-cal .calmain{flex:none;min-height:0}
  body[data-view="home"] .homegrid .homeleft > .home-cal .calgrid{grid-auto-rows:minmax(72px,auto)}
  body[data-view="home"] .homegrid .homeleft > .home-alerts .alertlist{
    flex:none;min-height:0;height:auto;overflow:visible;grid-template-rows:none;grid-auto-rows:auto}
  body[data-view="home"] .homegrid .homeleft > .home-alerts .alertbox{height:auto}
  /* 焦点栏「双场」保持上下堆叠，高度各自自适应 */
  .homefocus.hf-split .hf-item{flex:none}
  .homefocus.hf-split .hf-date b{font-size:40px}
  .homefocus.hf-split .hf-cd b{font-size:28px}

  /* ---- 分镜焦点态：解除 100vh 固定高（单列后会把卡片压扁/溢出） ---- */
  .pd-grid.focusing{height:auto;min-height:0;align-items:start}
  .pd-grid.focusing > .pd-left,
  .pd-grid.focusing > .pd-right{height:auto;min-height:0}
  .pd-grid.focusing > .pd-left > .focusgrid{flex:none}
  .pd-grid.focusing .focusgrid > .card{height:auto;min-height:0}
  .pd-grid.focusing .focusleft{flex-direction:row;overflow-x:auto;overflow-y:hidden;max-height:none}
  .pd-grid.focusing .focusleft .flitem{flex:0 0 auto}
  .pd-grid.focusing .focusmid .bigref{flex:none;aspect-ratio:4/3;min-height:0}
  .pd-grid.focusing .focusright{overflow:visible}

  /* ---- 日历：左栏 1/6 收窄一点，把宽度让给格子 ---- */
  .calwrap{grid-template-columns:minmax(104px,1fr) 6fr;gap:12px}
  .calside{padding-right:10px;gap:10px}
  .calside .cs-stat b{font-size:19px}
  .calgrid .cell{padding:4px 6px}

  /* ---- 计划详情：右栏 340 → 300 ---- */
  .pd-grid{grid-template-columns:minmax(0,1fr) 300px;gap:14px}

  /* ---- 分镜三栏焦点区：三栏改单列，左侧分镜列表变顶部横向可切条 ---- */
  .focusgrid{grid-template-columns:minmax(0,1fr);gap:12px}
  .focusgrid > .card.focusleft{
    display:flex;flex-direction:row;align-items:stretch;gap:8px;
    padding:6px;overflow-x:auto;overflow-y:hidden;
    scrollbar-width:thin;-webkit-overflow-scrolling:touch}
  .focusgrid > .card.focusleft .flitem{flex:0 0 auto;min-width:136px;max-width:200px;min-height:44px}
  .focusgrid .focusmid,
  .focusgrid .focusright{min-width:0}
  .focusgrid .focusmid .bigref{max-height:none}
  .focustop{gap:10px}
  .ftsum{row-gap:6px}
}

/* =============================================================================
   ≤1024 · 平板横屏：外壳收窄、日历左栏改顶部横排、看板/详情单列
   ============================================================================= */
@media (max-width:1024px){
  .side{width:168px;flex:0 0 168px;padding:14px 8px}
  .brand{font-size:13px;gap:6px;padding:0 6px 14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .brand i{width:18px;height:18px;flex:none}
  .nav button{padding:10px 10px;font-size:13.5px}
  .main{padding:16px 16px 20px}
  .head h1{font-size:21px}

  /* 首页：确保单列后 #view 由页面自身滚动，不被 flex 压 */
  body[data-view="home"] #view{display:block;overflow-y:auto}

  /* ---- 日历左栏：1/6 竖栏 → 顶部横排（次要信息让位） ---- */
  .calwrap{grid-template-columns:minmax(0,1fr);gap:8px}
  .calside{
    flex-direction:row;flex-wrap:wrap;align-items:baseline;justify-content:flex-start;
    gap:8px 16px;padding:0 0 6px;border-right:0;border-bottom:1px solid var(--hair);
    text-align:left}
  .calside .cs-ym{flex-direction:row;align-items:baseline;gap:6px}
  .calside .cs-ym b{font-size:22px}
  .calside .cs-ym span{font-size:22px;margin-top:0}
  .calside .cs-almanac{display:none}
  .calside .cs-yiji{display:none}
  .calside .cs-stats{display:flex;flex-direction:row;gap:14px}
  .calside .cs-stat{flex-direction:row;align-items:baseline;gap:4px}
  .calside .cs-stat b{font-size:15px}
  body[data-view="home"] .homegrid .homeleft > .home-cal .calgrid{grid-auto-rows:minmax(64px,auto)}

  /* ---- 计划看板：三状态列 → 单列堆叠（解除桌面「列内滚动」，改页面自然滚动） ---- */
  body[data-view="plans"] #view{overflow-y:auto;overflow-x:hidden;display:block}
  .kanban{grid-template-columns:minmax(0,1fr);gap:12px;flex:none;min-height:0}
  .kcol{display:block;min-height:0;overflow:visible}
  .kbody{flex:none;min-height:0;overflow:visible;padding-right:0}
  .khint{margin-left:0}

  /* ---- 计划详情：主区 + 右栏 → 单列 ---- */
  .pd-grid{grid-template-columns:minmax(0,1fr);gap:14px}
  .pd-left,.pd-right{min-width:0}
  .pd-right{order:2}

  /* ---- 分镜内嵌两栏、双栏表单 → 单列 ---- */
  .shotinline{grid-template-columns:minmax(0,1fr);gap:12px}
  .shotref{min-height:180px}
  .grid2{grid-template-columns:minmax(0,1fr)}
  .perm{grid-template-columns:minmax(0,1fr)}
  .f2{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid3{grid-template-columns:minmax(0,1fr)}

  /* ---- 资料库 / 我的：解除桌面内部滚动，改页面自然滚动 ----
     style.css ≥901 块把 library #view 设成 overflow:hidden + .libscroll 内滚；
     单列后内容变高，必须改回 #view 自身滚动，否则内容被裁。 */
  body[data-view="library"] #view{overflow-y:auto;overflow-x:hidden;display:block}
  .libwrap{height:auto;overflow:visible;display:block;min-height:0}
  .libscroll{flex:none;min-height:0;height:auto;overflow:visible;padding-bottom:0;padding-right:0;margin-right:0}
  .liblist{overflow:visible}
  .libtabs{overflow-x:auto;flex-wrap:nowrap}
  .libsearchrow{flex-wrap:wrap}
  .libfilters{gap:6px}
  .matgrid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px}

  /* ---- 现场 / 大屏：两栏 → 单列 ---- */
  .livescreen{grid-template-columns:minmax(0,1fr)}
  .limg{min-height:240px}

  /* ---- 点击区：平板/中屏一律 ≥44px（含被 style.css 压小的按钮） ---- */
  .btn-sm{min-height:44px}
  .iconbtn,.phead .iconbtn{width:44px;height:44px}
  .pdinfo .kvinfo .btn{min-height:44px;padding:0 12px}
  .focusbar .btn{min-height:44px}
  .pdmini .minicollapse{width:44px;height:44px}
  .seg button,.chip{min-height:44px}
  .overlay > .modal > .mfoot .btn,
  .overlay > .modal > .mfoot .btn-sm{min-height:44px !important;padding:0 16px !important}
  .overlay > .modal .f input,
  .overlay > .modal .f select,
  .overlay > .modal .f textarea{min-height:44px !important}

  /* ---- 通用行：允许折行 ---- */
  .phead{flex-wrap:wrap}
  .pdinfo-head{flex-wrap:wrap}
  .kmeta,.kchips,.prepsum,.ftsum,.memberrow,.libfilters{flex-wrap:wrap;row-gap:6px}
  .weathercard{flex-wrap:wrap}
}

/* =============================================================================
   ≤900 · 手机壳：底部导航（重写旧手机块，保证 768 档一致）
   ============================================================================= */
@media (max-width:900px){
  html,body{max-width:100%;overflow-x:hidden}
  .shell{
    flex-direction:column;margin:0;border-radius:0;box-shadow:none;
    min-height:100vh;height:auto;max-width:none;overflow:visible;background:transparent}
  .main{padding:14px 14px 86px;min-width:0;overflow:visible}
  #view{overflow:visible}
  .side{
    position:fixed;left:0;right:0;bottom:0;top:auto;width:100%;
    flex:none;order:0;z-index:30;flex-direction:row;
    padding:4px 6px calc(4px + env(safe-area-inset-bottom, 0px));gap:0;
    border-right:0;border-top:1px solid var(--line-soft);
    background:rgba(255,255,255,.96);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);
    height:auto}
  .brand,.sidefoot{display:none}
  .nav{flex-direction:row;justify-content:space-around;gap:0;width:100%}
  .nav button{
    flex:1;flex-direction:column;align-items:center;justify-content:center;gap:2px;
    padding:6px 2px;font-size:11.5px;min-height:52px;border-radius:10px;text-align:center}
  .head{margin-bottom:12px;gap:8px}
  .head h1{font-size:20px}
  .head .btn-sm{min-height:44px}

  /* 首页：自然流单列 */
  body[data-view="home"] #view{display:block}
  body[data-view="home"] #view > .weathercard{flex:none;min-height:0}
  .duo.homegrid{grid-template-columns:minmax(0,1fr);gap:12px}
  .duo.homegrid > .card.homefocus{order:-1}
  .homeleft{gap:10px}
  .homeleft > .home-cal,
  .homeleft > .home-alerts{flex:none;max-height:none}
  .homeleft > .home-alerts .alertlist{overflow:visible}
  .homefocus.hf-split .hf-item{flex:none;padding:18px}
  .homefocus.hf-split .hf-date b{font-size:38px}
  .homefocus.hf-split .hf-cd b{font-size:26px}

  /* 日历 */
  .calwrap{grid-template-columns:minmax(0,1fr)}
  .calgrid{grid-auto-rows:minmax(56px,auto);gap:5px}
  .calgrid .cell{padding:4px 4px}
  .calgrid .cell .d{font-size:12.5px;line-height:1.4;height:auto}
  .calgrid .cell .pills{flex:1 1 auto;gap:3px}
  .calgrid .cell .pill{height:18px;line-height:18px;font-size:10.5px;padding:0 4px;border-radius:5px}
  .calgrid .cell .pill .pt{font-size:9.5px}
  .calhead div{font-size:11.5px;padding:5px 0}
  .calnav{padding:0 2px 2px}

  /* 计划详情 / 焦点区 / 看板 */
  .kanban{grid-template-columns:minmax(0,1fr)}
  .pd-grid{grid-template-columns:minmax(0,1fr)}
  .focusgrid{grid-template-columns:minmax(0,1fr)}
  .focusgrid > .card.focusleft{padding:5px}
  .focusgrid .focusleft .flitem{min-width:124px}
  .shotinline{grid-template-columns:minmax(0,1fr)}
  .pdinfo-head{gap:12px}
  .pdinfo-head .dnum{font-size:38px}

  /* 现场 */
  .livewrap{margin:-14px -14px -86px;border-radius:0;min-height:calc(100vh - 0px);padding:12px 12px 18px}
  .livescreen{grid-template-columns:minmax(0,1fr)}
  .limg{min-height:220px}
  .livebar{gap:8px}

  /* 资料库 */
  .libwrap{height:auto;overflow:visible}
  .libscroll{overflow:visible;padding-bottom:0}
  .libtabs button{padding:9px 14px 10px;font-size:14.5px}
  .matgrid{grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:10px}

  /* 我的 */
  .mehead{gap:10px}
  .melist{max-width:none}
  .workgrid{grid-template-columns:repeat(3,minmax(0,1fr))}

  /* 空状态与卡片内边距 */
  .card.pad{padding:14px}
  .empty{padding:28px 14px}

  /* 浮层：宽度 calc(100% - 24px)、内部可滚 */
  .overlay{padding:12px;align-items:center}
  .overlay .modal,
  .modal{
    width:calc(100% - 24px) !important;
    max-width:calc(100vw - 24px) !important;
    max-height:calc(100vh - 24px);
    max-height:calc(100dvh - 24px);
    overflow-y:auto;overflow-x:hidden;
    padding:20px;border-radius:16px;
    -webkit-overflow-scrolling:touch}
  .mfoot{gap:10px}
  /* style.css 里有 .overlay > .modal > .mfoot .btn-sm{min-height:32px}（4 类权重），
     必须提高权重并加 !important 才能把弹窗按钮拉回 44px 点击区 */
  .overlay > .modal > .mfoot .btn,
  .overlay > .modal > .mfoot .btn-sm{min-height:44px !important;padding:0 16px !important;font-size:13.5px}
  .overlay > .modal > .mfoot > .row{width:100%;flex-wrap:wrap;justify-content:flex-end;gap:8px}
  .overlay > .modal > .mfoot > .row > .btn{flex:1 1 calc(50% - 4px);min-width:0}
  .overlay > .modal .f input,
  .overlay > .modal .f select,
  .overlay > .modal .f textarea{min-height:44px !important;font-size:16px}
  .wizform,.wzusers,.wzgrid{grid-template-columns:minmax(0,1fr)}

  /* 可点区域 ≥44px */
  .btn{min-height:44px}
  .btn-sm{min-height:44px;padding:0 14px}
  .iconbtn{width:44px;height:44px}
  .chip{min-height:44px;padding:6px 14px;display:inline-flex;align-items:center}
  .seg button{min-height:44px}
  .thumbs button{height:56px}
  .flitem,.slitem{min-height:48px}
  .alertrow,.li,.merow,.lirow,.plrow,.shothe,.fold,.todo{min-height:48px}
  .qrow{padding:10px 0;min-height:44px}
  .loginfoot button,.lgcheck{min-height:44px}
  .vswitch button{min-height:44px}

  /* 表格与信息行允许折行，不横向溢出 */
  table.shots{width:100%;table-layout:fixed}
  table.shots th,table.shots td{white-space:normal;word-break:break-word;padding:8px}
  table.shots th:nth-child(5),table.shots td:nth-child(5),
  table.shots th:nth-child(7),table.shots td:nth-child(7){display:none}
  .kvinfo,.pdinfo-head .dline,.pdinfo-head .tline,.hero-title,.ptitle,.kname,.li .t{
    word-break:break-word;overflow-wrap:anywhere}
  .kv{grid-template-columns:76px minmax(0,1fr)}
  .kv b{word-break:break-word}
  .row{flex-wrap:wrap}

  /* 图片/媒体永不撑破 */
  img,svg,video,canvas{max-width:100%}
  .thumbs,.lthumbs{overflow-x:auto;max-width:100%}
}

/* =============================================================================
   ≤820 · 平板竖屏：全单列 + 大点击区
   ============================================================================= */
@media (max-width:820px){
  .main{padding:13px 13px 84px}
  .head h1{font-size:19px}

  /* 首页 */
  .weathercard{flex-wrap:wrap;gap:10px;padding:12px 14px}
  .weathercard .wleft{gap:12px}
  .weathercard .wicon svg{width:52px;height:52px}
  .weathercard .wtemp b{font-size:32px}
  .weathercard .wstats{justify-content:flex-start;flex-wrap:wrap;gap:6px 0}
  .weathercard .wstat{padding:2px 10px}
  .homefocus.hf-split .hf-item{padding:16px}
  .homefocus.hf-split .hf-date b{font-size:36px}
  .homefocus.hf-split .hf-kv{grid-template-columns:42px minmax(0,1fr)}
  .calgrid{grid-auto-rows:minmax(54px,auto)}
  .calside{border-bottom:0}
  .calside .cs-stats{gap:10px}
  .calside .cs-stat b{font-size:14px}
  .homeleft > .home-alerts .alertlist{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .homeleft > .home-alerts .alertbox{min-height:64px}

  /* 计划列表 */
  .kcard{padding:10px 11px;margin-bottom:7px}
  .khead{padding-bottom:6px}
  .kmeta{gap:8px}

  /* 计划详情 */
  .phead .ptitle{font-size:18px;max-width:none}
  .stagebar i{width:26px}
  .pdinfo-head{flex-wrap:wrap;gap:8px 12px}
  .pdinfo-head .dnum{font-size:34px}
  .pdinfo-head .tline{font-size:18px}
  .pd-fill,.pd-right{min-width:0}
  .quote{padding:14px}
  .prepsum{gap:10px}

  /* 焦点区 */
  .focustop{padding:10px 12px}
  .focusgrid .focusleft .flitem{min-width:116px}
  .focusmid{padding:10px}
  .focusright{padding:12px}
  .focusgrid .focusmid .bigref{aspect-ratio:3/2}
  .f2{grid-template-columns:repeat(2,minmax(0,1fr))}

  /* 现场 */
  .limg{min-height:200px}
  .livewrap{padding:10px 10px 16px;gap:10px}
  .lthumb{width:92px;height:58px;min-height:58px}

  /* 资料库 */
  .libtabs button{padding:8px 12px 9px;font-size:14px}
  .libsearchrow{gap:8px}
  .libfilterbtn{min-height:44px}
  .lirow{padding:10px 12px}
  .lirow > .small.muted{max-width:none}

  /* 我的 */
  .mehead{padding:12px}
  .meavatar{width:48px;height:48px;border-radius:14px}
  .merow{padding:12px 14px;min-height:52px}

  /* 折叠/更多按钮 */
  .fold{padding:12px 0}
  .more{padding-bottom:4px}

  /* 浮层内部：控件单列、按钮满行 */
  .modal{padding:18px}
  .modal h2{font-size:17px}
  .grid2,.wizform,.grid3,.perm{grid-template-columns:minmax(0,1fr)}
  .mfoot .btn{min-height:46px}
  .seg{max-width:100%;overflow-x:auto}
  .seg button{padding:8px 12px;min-height:44px;white-space:nowrap}

  /* 登录 */
  .loginwrap{min-height:calc(100vh - 40px);padding:12px}
  .logincard{width:100%;max-width:420px;padding:22px 18px}
}

/* =============================================================================
   ≤620 · 手机：字号/间距再收一档
   ============================================================================= */
@media (max-width:620px){
  .main{padding:12px 12px 82px}
  .head{margin-bottom:10px}
  .head h1{font-size:18.5px}
  .head .btn-sm{min-height:44px}
  .crumbs{font-size:12px;margin-bottom:10px}

  /* 首页 */
  .weathercard{padding:10px 12px;gap:8px;
    flex-direction:column;align-items:stretch;justify-content:flex-start}
  .weathercard .wleft{width:100%;gap:10px}
  .weathercard .wicon svg{width:44px;height:44px}
  .weathercard .wtemp b{font-size:28px}
  .weathercard .wtemp span{font-size:13px}
  /* 天气数据格：390 下 5 个格子必须竖排整行，原样式在 row 里会横向溢出被裁 */
  .weathercard .wstats{
    width:100%;flex:none;display:flex;flex-direction:column;align-items:stretch;
    gap:2px;justify-content:flex-start;overflow:visible}
  .weathercard .wstat{
    flex:0 0 auto;min-width:0;width:auto;max-width:100%;padding:1px 0;
    flex-direction:row;align-items:baseline;justify-content:flex-start;gap:8px;border-left:0}
  .weathercard .wstat span{font-size:11px;min-width:30px;flex:none;letter-spacing:0}
  .weathercard .wstat b{font-size:12px;white-space:normal;word-break:break-word;overflow-wrap:anywhere}
  .weathercard .wstat.gold b,.weathercard .wstat.blue b{font-size:11.5px}
  .weathercard .wrow2{justify-content:flex-start}
  .homefocus.hf-split .hf-item{padding:14px;gap:8px}
  .homefocus.hf-split .hf-title{font-size:18px}
  .homefocus.hf-split .hf-date b{font-size:32px}
  .homefocus.hf-split .hf-date span{font-size:13px}
  .homefocus.hf-split .hf-date em{font-size:11.5px}
  .homefocus.hf-split .hf-kv{row-gap:5px;font-size:12.5px}
  .homefocus.hf-split .hf-cd b{font-size:24px}
  .homefocus.hf-split .hf-cd span{font-size:11.5px}

  /* 日历：格子更矮，计划条一行省略 */
  .calgrid{grid-auto-rows:minmax(48px,auto);gap:4px}
  .calgrid .cell{padding:3px 3px}
  .calgrid .cell .d{font-size:12px;line-height:1.35}
  .calgrid .cell .pill{height:16px;line-height:16px;font-size:10px;padding:0 3px}
  .calgrid .cell .pill .pt{display:none}
  .calhead div{font-size:10.5px;padding:4px 0}
  .calfoot{display:none}
  .calside{gap:6px 12px}
  .calside .cs-ym b{font-size:18px}
  .calside .cs-ym span{font-size:18px}
  .calside .cs-stat b{font-size:13px}
  .calside .cs-stat span{font-size:10.5px}
  .card.pad{padding:12px}

  /* 计划列表 / 详情 */
  .phead{gap:6px}
  .phead .ptitle{font-size:17px}
  .phead .iconbtn{width:44px;height:44px}
  .stagebar i{width:20px;height:4px}
  /* 看板卡片信息行：单行省略改折行，避免「已过 48 天」被裁成半个字 */
  .kcard .kname,.kcard .kdate{word-break:break-word;overflow-wrap:anywhere}
  .kcard .kmeta .kcell{min-width:0;max-width:100%;white-space:normal;overflow:visible;
    text-overflow:clip;word-break:break-word;overflow-wrap:anywhere}
  .kcard .kchips{gap:4px}
  .kcard .kchip{white-space:normal;text-align:left}
  .pdinfo-head .dnum{font-size:30px}
  .pdinfo-head .tline{font-size:17px}
  .pdinfo-head .dline{font-size:12.5px}
  .pdacts{flex-wrap:wrap}
  .pdacts .btn{min-width:calc(50% - 4px)}
  .qrow{font-size:13px;gap:8px}
  .qrow span:first-child{color:var(--text-mute)}
  .kv{grid-template-columns:64px minmax(0,1fr);font-size:13px}
  .f label{font-size:12.5px}
  .f input,.f select,.f textarea{min-height:46px;font-size:16px}

  /* 焦点区：缩略条更紧凑 */
  .focustop{flex-direction:column;align-items:flex-start;gap:6px;padding:10px}
  .focusgrid .focusleft .flitem{min-width:108px}
  .focusgrid .focusleft .flitem .th{width:28px;height:20px}
  .focusgrid .focusmid .bigref{aspect-ratio:4/3}
  .thumbs button{height:48px}
  .f2{grid-template-columns:minmax(0,1fr)}

  /* 现场 */
  .livescreen{gap:8px}
  .limg{min-height:180px}
  .lpanel{padding:10px}
  .lthumb{width:84px;height:54px;min-height:54px}
  .livebar b{font-size:13px}

  /* 资料库 */
  .libtabs{gap:2px}
  .libtabs button{padding:8px 10px 9px;font-size:13.5px}
  .matgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .matname{font-size:13px}
  .lirow{gap:8px;padding:10px}
  .lic{width:28px;height:28px}

  /* 我的 */
  .mename{font-size:16px}
  .meroles{gap:5px}
  .merow{padding:11px 12px;font-size:13.5px}
  .workgrid{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}

  /* 登录 */
  .logincard{padding:20px 16px;border-radius:16px}
  .loginbrand{font-size:15px}
  .loginsub{font-size:12px;margin-bottom:16px}

  /* 浮层 */
  .overlay{padding:10px}
  .modal{padding:16px;border-radius:14px;max-height:calc(100dvh - 20px)}
  .modal h2{font-size:16px}
  .mfoot{flex-wrap:wrap;gap:8px;width:100%}
  /* 弹窗底部操作：按钮整行、44px 以上，不再挤在右上角 */
  .overlay > .modal > .mfoot,
  .mfoot{display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}
  .overlay > .modal > .mfoot > .row,
  .mfoot > .row{width:100%;flex-wrap:wrap;justify-content:stretch;gap:8px}
  .overlay > .modal > .mfoot .btn,
  .overlay > .modal > .mfoot > .row > .btn,
  .mfoot .btn{width:100% !important;flex:1 1 100% !important;min-height:46px !important}
  .wiz{gap:6px;font-size:12px}
  .perm label{min-height:44px}
  /* 选片 / 约定单 / 确认框：内部不再横向溢出 */
  .selseg,.seg{flex-wrap:nowrap;overflow-x:auto}
  #selOverlay .modal,#quoteOverlay .modal,#askOverlay .modal{overflow-y:auto}

  /* 通用 */
  .empty{padding:22px 12px}
  .btn{font-size:13.5px;padding:0 14px}
  .badge{font-size:12px}
}

/* =============================================================================
   ≤420 · 小屏手机（375 / 360）
   ============================================================================= */
@media (max-width:420px){
  .main{padding:10px 10px 80px}
  .head h1{font-size:17.5px}
  .nav button{font-size:10.5px;min-height:50px;gap:1px;padding:4px 0}
  .nav .dot{width:6px;height:6px}

  /* 日历：7 列极限压缩 */
  .calgrid{gap:3px}
  .calgrid .cell{padding:2px 2px;border-radius:6px}
  .calgrid .cell .d{font-size:11px}
  .calgrid .cell .pill{height:14px;line-height:14px;font-size:9.5px;padding:0 2px;border-radius:4px}
  .calgrid .cell .pills{gap:2px}
  .calhead div{font-size:10px;padding:3px 0}
  .calnav .navicon{width:36px;height:36px}
  .calnav .navtext{font-size:11.5px}

  /* 首页 */
  .weathercard{padding:9px 10px}
  .weathercard .wicon svg{width:38px;height:38px}
  .weathercard .wtemp b{font-size:25px}
  .weathercard .wstats{gap:4px 0}
  .weathercard .wstat{padding:1px 8px}
  .homefocus.hf-split .hf-item{padding:12px;gap:7px}
  .homefocus.hf-split .hf-title{font-size:17px}
  .homefocus.hf-split .hf-date b{font-size:28px}
  .homefocus.hf-split .hf-kv{grid-template-columns:38px minmax(0,1fr)}
  .homefocus.hf-split .hf-cd b{font-size:22px}

  /* 详情/焦点 */
  .pdinfo-head .dnum{font-size:26px}
  .pdinfo-head .tline{font-size:16px}
  .focusgrid .focusleft .flitem{min-width:98px}
  .focusgrid .focusleft .flitem .fn{width:12px}
  .focustop{padding:8px}
  .ftsum{font-size:12px}
  .btn{padding:0 12px;font-size:13px}
  .iconbtn{width:44px;height:44px}

  /* 浮层 */
  .overlay{padding:8px}
  .modal{padding:14px;border-radius:12px;max-height:calc(100dvh - 16px)}
  .mfoot .btn{min-height:46px}
  .modal .grid2,.modal .perm{grid-template-columns:minmax(0,1fr)}

  /* 资料库 / 我的 */
  .matgrid{grid-template-columns:minmax(0,1fr);gap:10px}
  .matcard{display:flex;align-items:center;gap:10px}
  .matimg{width:88px;flex:none;aspect-ratio:4/3}
  .matname{margin-top:0}
  .workgrid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .mehead{padding:10px}
  .meavatar{width:44px;height:44px}
  .melist{gap:10px}
  .merow .ic{width:26px;height:26px}

  /* 现场 */
  .limg{min-height:160px}
  .lthumb{width:76px;height:50px;min-height:50px}
  .livebar{font-size:12px}

  /* 登录 */
  .logincard{padding:18px 14px}
  .lgcheck{font-size:13px}
}
/* ===== Lead 补：宽屏 + 短视口（如 1440x760）首页日历同样会塌，补一段 ===== */
@media (min-width:1367px) and (max-height:879px){
  body[data-view="home"] #view > .weathercard{flex:0 0 25%}
  body[data-view="home"] .homegrid .homeleft > .home-cal{flex:1 1 auto}
  body[data-view="home"] .homegrid .homeleft > .home-alerts{flex:0 0 auto}
}
/* ===== Lead 补（v1.1.5）：矮视口下 grid 行必须能压缩，否则整块溢出视口 ===== */
@media (max-height:879px){
  body[data-view="home"] #view{overflow:hidden}
  body[data-view="home"] #view > .duo.homegrid{grid-auto-rows:minmax(0,1fr);max-height:100%}
  body[data-view="home"] #view > .duo.homegrid > *{min-height:0;overflow-y:auto;overflow-x:hidden;
    scrollbar-width:none;-ms-overflow-style:none}
  body[data-view="home"] #view > .duo.homegrid > *::-webkit-scrollbar{width:0;height:0}
}
/* Lead 补（v1.1.5）：≤1366 时 #view 被改成 block，矮屏下整块撑破视口；
   这里在「宽≤1366 且高<880」时恢复成 flex 撑满，让两栏自己内部滚动 */
@media (max-width:1366px) and (max-height:879px){
  body[data-view="home"] #view{display:flex!important;flex-direction:column!important;
    height:100%!important;min-height:0!important;overflow:hidden!important}
  body[data-view="home"] #view > .weathercard{flex:0 0 auto!important;min-height:0!important}
  body[data-view="home"] #view > .duo.homegrid{flex:1 1 0!important;min-height:0!important;
    grid-auto-rows:minmax(0,1fr)!important;height:auto!important}
  body[data-view="home"] #view > .duo.homegrid > *{min-height:0!important;overflow-y:auto!important;
    overflow-x:hidden!important;scrollbar-width:none}
  body[data-view="home"] #view > .duo.homegrid > *::-webkit-scrollbar{width:0;height:0}
}
/* Lead 补（v1.1.5）：1366×768 这类矮笔记本，焦点栏每格只有 ~270px，必须再压一档 */
@media (max-height:879px) and (max-width:1440px){
  body[data-view="home"] .homefocus.hf-split .hf-item{padding:10px 14px;gap:5px;justify-content:flex-start}
  body[data-view="home"] .homefocus.hf-split .hf-title{font-size:16px}
  body[data-view="home"] .homefocus.hf-split .hf-date{padding-top:5px}
  body[data-view="home"] .homefocus.hf-split .hf-date b{font-size:28px}
  body[data-view="home"] .homefocus.hf-split .hf-kv{padding-top:5px;row-gap:3px;font-size:11.5px}
  body[data-view="home"] .homefocus.hf-split .hf-kv > span{font-size:11px}
  body[data-view="home"] .homefocus.hf-split .hf-kv b{font-size:11.5px}
  body[data-view="home"] .homefocus.hf-split .hf-cd{margin-top:4px;padding-top:0}
  body[data-view="home"] .homefocus.hf-split .hf-cd b{font-size:20px}
  body[data-view="home"] .homefocus.hf-split .hf-cd span{font-size:11px}
}
/* Lead 补（v1.1.9）：矮视口（不限宽度）一律走 flex 撑满，避免 #view 变 block 后首页只剩 434px 高 */
@media (max-height:879px){
  body[data-view="home"] #view{display:flex!important;flex-direction:column!important;
    height:100%!important;min-height:0!important;overflow:hidden!important}
  body[data-view="home"] #view > .weathercard{flex:0 0 auto!important}
  body[data-view="home"] #view > .duo.homegrid{flex:1 1 0!important;min-height:0!important;
    max-height:none!important;grid-auto-rows:minmax(0,1fr)!important}
  body[data-view="home"] #view > .duo.homegrid > *{min-height:0!important;overflow-y:auto!important;
    overflow-x:hidden!important;scrollbar-width:none}
  body[data-view="home"] #view > .duo.homegrid > *::-webkit-scrollbar{width:0;height:0}
}
/* Lead 补（v1.1.9b）：矮视口焦点栏两块改成「按内容高度 + 面板内滚动」，
   不再把每块硬压成一半高度导致标题被切 */
@media (max-height:900px){
  body[data-view="home"] .homefocus.hf-split{justify-content:flex-start!important}
  body[data-view="home"] .homefocus.hf-split .hf-item{flex:0 0 auto!important;min-height:0!important;
    justify-content:flex-start!important}
}
/* Lead 补（v1.1.10）：矮视口下焦点栏的字段改成「两列并排」，
   六行压成三行，两场计划才放得进一屏。 */
@media (max-height:900px){
  body[data-view="home"] .homefocus.hf-split .hf-kv{
    grid-template-columns:auto minmax(0,1fr) auto minmax(0,1fr)!important;
    column-gap:12px!important;row-gap:4px!important;align-items:baseline;
  }
  body[data-view="home"] .homefocus.hf-split .hf-kv > span{text-align:left;white-space:nowrap}
  body[data-view="home"] .homefocus.hf-split .hf-kv > b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
/* Lead 补（v1.1.11b）：矮屏有了两列字段后内容变小，两块应铺满面板，别在底部留空 */
@media (max-height:900px){
  body[data-view="home"] .homefocus.hf-split .hf-item{flex:1 1 0!important;justify-content:center!important}
}
@media (max-height:760px){
  body[data-view="home"] .homefocus.hf-split{justify-content:flex-start!important}
  body[data-view="home"] .homefocus.hf-split .hf-item{flex:0 0 auto!important;justify-content:flex-start!important}
}
