/* ============================================================
 * pet_home_v2.css  梅·小屋D包纯CSS热修  20260903  r4
 * 基线：gitee main R22 (edb5fe94)；叠加在 shells/pet_home.html
 * 合入：壳页 <head> 末尾加 <link rel="stylesheet" href="/hotfix/pet_home_v2.css?v=20260903b">
 * 回滚：删 link 行 30 秒恢复；纯 CSS、零 JS、不碰任何功能/字段/钩子
 * ①760悬浮卡满铺零白边 ②100dvh+safe-area四向双声明 ③横屏海报模糊底兜底不拉伸
 * ④热区<44px透明补齐视觉不动 ⑤今日动线卡(l2rb)只CSS融皮暖卡风 ⑥D4下半白块根因修复
 * 避让：splash seg1-4(z99999)与跳过钮一行不碰，本文件无遮罩层/无z-index升高
 * r3：body/html裸规则(4处)收敛到 body:has(>#stage)（#stage=小屋页独有、w1_polish同款锚点；
 *     壳body无静态类，body.page-pet为死规则）；html用 html:has(>body>#stage)。
 * r4(08:30风令/兰08:27定性单)：r3基础上把剩余无页面作用域的裸规则批照同型锚定——
 *     #l2RouteBar.l2rb-bar、.room、.room img/#room img、.l2rb-node、#l2RouteBar .l2rb-* 暖卡皮组
 *     全部加 body:has(>#stage) 前缀（@media 内同），仅加前缀零属性/零值改动；
 *     hall两页天然不匹配（park=<main class=stage>、school无#stage）零影响。
 *     有意保持无前缀：#stage（id全app唯一=天然页面锚，成长墙小卡是class .stage非#stage）；
 *     .ledou-pop .lp-close（全局发豆弹层44px热区，须跨练习/Tom/乐园页生效；加小屋前缀会致
 *     他页✕退回32px违反热区铁律④）。版戳 ?v=20260903a → ?v=20260903b。
 * ============================================================ */

/* ⑥+① D4白块根因：l2动线卡(#l2RouteBar)注入为body直接子项，body{display:flex}
   把它和#stage横排——动线卡被挤成左半窄列、奶白背景align-stretch撑满全高=大片白块；
   #stage被挤右半、房间内容横向截断。修法：body回block纵向流，#stage靠margin:auto居中。 */
body:has(>#stage){ display:block !important; }

#stage{
  width:100% !important;
  max-width:480px;
  margin-left:auto !important;
  margin-right:auto !important;
  float:none;
}
body:has(>#stage) #l2RouteBar.l2rb-bar{
  position:static !important;
  width:auto !important;
  max-width:none !important;
  flex:none;
}

/* ① 760断点：560px悬浮卡→满铺（用#id钉舞台，.stage类与成长墙.stages .stage小卡同名绝不误伤） */
@media (min-width:760px){
  #stage{
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
    background:#FFEFC2 !important; /* 热修：满铺后#stage自身白底会盖住body暖墙、右侧房间容器未满到右缘露白；显式暖墙底兜底，与body同色零色差 */
  }
  body:has(>#stage){ background:#FFEFC2; } /* 满铺后理论不露；兜底同暖墙色，极端高度下四边零白 */
}

/* ② 100dvh+safe-area四向（vh在前dvh在后双声明；R22原有左右两向，补齐上/下页面级兜底） */
body:has(>#stage){
  min-height:100vh;
  min-height:100dvh;
  padding-top:env(safe-area-inset-top, 0px);
  padding-bottom:env(safe-area-inset-bottom, 0px);
  padding-left:env(safe-area-inset-left, 0px);
  padding-right:env(safe-area-inset-right, 0px);
}
#stage{
  min-height:100vh;
  min-height:100dvh;
}

/* ③ 横屏：房间海报模糊底兜底不拉伸。≥768横屏房间高度受限：背景改暖墙渐变cover兜底；
   真宠物海报(雷A包注入,src含/img/pet/)contain居中不拉伸。
   注：纯CSS单层无法让同一张<img>海报既清晰又模糊铺底（伪元素拿不到src）；
   暖墙兜底已保证零白边零拉伸。若风要求同图blur(24px)延伸底，需雷JS包加双层结构，
   选择器以雨CDP实测DOM为准，此处预留属性钩子。 */
@media (min-width:760px) and (orientation:landscape){
  body:has(>#stage) .room{
    background:
      radial-gradient(130% 90% at 50% 0%, rgba(255,243,210,.60), rgba(255,224,160,0) 62%),
      linear-gradient(180deg, #FFEFC2 0%, #FFE0A0 58%, #E3B277 58.5%, #C98F4F 100%) !important;
    background-size:cover !important;
    background-position:center !important;
    background-repeat:no-repeat !important;
  }
  body:has(>#stage) .room img[src*="/img/pet/"],
  body:has(>#stage) #room img[src*="pet"]{
    object-fit:contain !important;
    object-position:center center !important;
    max-width:100% !important;
    max-height:100% !important;
  }
}

/* ④ 热区<44px透明补齐（视觉不动、target仍是原元素） */
/* 乐豆气泡✕：R22视觉32px(::after inset:-6扩命中到44)。L0量元素本体rect也要≥44：
   本体补44×44，回拉定位让✕视觉原位（原32框top6/right10→✕中心右-26/顶22；
   44框改top0/right4→中心仍右-26/顶22）。
   注：.ledou-pop为全局发豆弹层(练习/Tom/乐园发豆均弹)，44热区须跨页生效，故【不】加小屋作用域前缀。 */
.ledou-pop .lp-close{
  position:absolute !important;
  top:0 !important;
  right:4px !important;
  width:44px !important;
  height:44px !important;
  min-width:44px !important;
  min-height:44px !important;
  padding:0 !important;
  margin:0 !important;
  background:transparent !important;
  line-height:44px !important;
  text-align:center !important;
}
.ledou-pop .lp-close::after{ content:''; position:absolute; inset:0; }

/* 动线卡五节点<a>：本体透明补≥44px高（点/名视觉不变，整列点击区变大）——锚小屋页(r4) */
body:has(>#stage) .l2rb-node{
  min-height:44px !important;
  position:relative;
}
body:has(>#stage) .l2rb-node:not(:last-child)::after{ pointer-events:none !important; } /* 箭头装饰不挡点 */

/* ⑤ 今日动线卡：只CSS融皮小屋暖卡风（功能一行不碰：三行/✅/跳转/上报全保留）。
   皮=.zone/.pet-card同款：暖卡#FFFDF5+木色边#EBD9A8+圆角18+软阴影；标题保留；间距统一12px。
   r4：整组锚小屋页 body:has(>#stage)，动线卡在hall等他页不套小屋暖卡皮。 */
body:has(>#stage) #l2RouteBar.l2rb-bar{
  margin:12px !important;
  padding:10px 12px 8px !important;
  background:#FFFDF5 !important;
  border:2px solid #EBD9A8 !important;
  border-radius:18px !important;
  box-shadow:0 3px 0 rgba(120,80,20,.18) !important;
  box-sizing:border-box !important;
}
body:has(>#stage) #l2RouteBar .l2rb-title{ color:#8B5A12 !important; }
@media (max-width:430px){
  /* 扩 l2 自带 350 断点：375 视口五节点一屏全显（点26px+卡边距收+标签微缩，视觉不变味） */
  body:has(>#stage) #l2RouteBar.l2rb-bar{ margin:10px 4px !important; padding:9px 4px 7px !important; }
  body:has(>#stage) #l2RouteBar .l2rb-dot{ width:26px !important; height:26px !important; font-size:14px !important; margin:0 auto; }
  body:has(>#stage) #l2RouteBar .l2rb-name{ font-size:9px !important; white-space:nowrap; }
  body:has(>#stage) #l2RouteBar .l2rb-node{ padding:0 !important; }
  body:has(>#stage) #l2RouteBar .l2rb-node:not(:last-child)::after{ top:11px !important; font-size:12px !important; right:-3px !important; z-index:2; }
  /* 末节点(TOM树屋)标签右收不出血：整列右对齐+右内边距，让长标签留在屏内 */
  body:has(>#stage) #l2RouteBar .l2rb-node:last-child .l2rb-name{ max-width:96% !important; }
  body:has(>#stage) #l2RouteBar .l2rb-title{ font-size:10px !important; margin-bottom:3px !important; }
}

/* ⑥ 收尾兜底：页面级零横向溢出 */
html:has(>body>#stage), body:has(>#stage){ overflow-x:hidden !important; max-width:100% !important; }
#stage{ overflow:hidden; }

/* seg避让：本文件无position:fixed全屏遮罩、不升高z-index到splash(z99999)之上，
   overlay与跳过钮层级/点击完全不受影响。 */
