/* ============================================================
   美丽妈妈展示端 · 浏览器承载层（只放浏览器里必需的东西）
   ① uni-app 自定义元素的等价表现
   ② 原包 swiper 组件的等价实现（原包用 <swiper>，浏览器没有）
   ④ 浏览器自带、需要清掉的默认样式（ul 列表符号、浮动撑高）
   ⑦ 看图页 / PDF 预览页的独立页面形态
   ⑧ 展示版返回登录入口
   ⑨ 桌面 / 平板尺寸适配
   ⑩ 手机横版展示（窗口宽 ≤ 1000，stage.js 打 html.mlmm-phone）
   ⑪ PDF 预览页 iframe 承载
   ⑫ 看图页圆点等组件等价实现
   ⑬ 展示端收口（body 高度 / 只允许横屏 / 思源黑体 / 退出按钮）
   **视觉一律不放这里，全部在 css/showcase.css。**
   凡是 app.css 里已有的规则，这里一律不重写

   2026-11-05：展示端视觉重做（css/showcase.css）后，本文件里只属于旧版
   「把 PDF 页当图片塞进框里」那套的规则已逐条删除（图标底图、首页封面、
   体验页 pdfbox、项目页 srv-*、手机端旧时间轴），只留浏览器承载必需的部分。
   ============================================================ */

/* ---------- ① uni-app 元素 ---------- */
uni-view, view { display: block; }
uni-image, image { display: block; overflow: hidden; }
uni-image > img, image > img { width: 100%; height: 100%; display: block; }
uni-text, text { display: inline; }

/* ---------- ② swiper 等价实现 ---------- */
/* 时间轴（品牌/流程页）：原包 swiper + swiper-item，这里用横向轨道 */
.tl-track { display: flex; transition: transform .45s cubic-bezier(.25,.8,.3,1); will-change: transform; }
.tl-slide { flex: 0 0 100%; }

/* 看图页：原包 swiper 可左右滑，这里用原生滚动吸附 */
.swiper { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.swiper::-webkit-scrollbar { display: none; }
.swiper-item { flex: 0 0 100%; scroll-snap-align: start; }

/* ---------- ④ 浏览器默认样式清理 ---------- */
.m-timeline .hd { list-style: none; margin: 0; padding: 0; }

/* ---------- ⑤ 原包固定 100vh 不滚动；浏览器里补滚动（不改变视觉） ---------- */
.m-main { overflow-y: auto; overflow-x: hidden; }

/* ---------- ⑦ 看图页是独立页面（原包 render 不含 layout 组件） ---------- */
.full-page .m-main { margin-left: 0; padding-top: 0; }
.full-page .m-aside, .full-page .m-topbar { display: none; }

/* ---------- ⑧ 展示版返回登录（登录页右上角「展示版」进入时显示；直接访问不显示） ---------- */
.mlmm-back {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 300;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(0, 183, 255, .5);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 26px rgba(0, 40, 80, .2);
  color: #0a63c4;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
}
.mlmm-back:hover { background: #fff; border-color: #00b7ff; }
.mlmm-back-arrow { font-style: normal; font-size: 15px; line-height: 1; }
/* ---------- ⑨ 展示版在 16:9 桌面 / 手机上的适配（2026-10-30）
   只修「被裁 / 被拉伸 / 大片空白」，不改原包视觉：
   ① 页面高度用 --stage-h（stage.js 按真实视口高度换算），替代 100vh 被 zoom 二次缩小的坑
   ② 看图页：swiper / swiper-item 是自定义标签（无 class），图片 contain，不裁不拉伸
   ③ 体验（科目）页：3 列铺满、卡片高度随图片，去掉右侧留白与卡片内白边
   --------------------------------------------------------------- */
.m-main,
swiper,
uni-swiper { height: var(--stage-h, 1024px); }

.swiper { width: 100%; }
swiper-item {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--stage-h, 1024px);
  width: 100%;
}
.swiper img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.swiper img:not([src]) { display: none; }

/* 左侧图标栏：原包 fixed + bottom:0 在 zoom 下只有「视口高 × zoom」高，
   手机上只到 241px、平板到 576px，底部露白 → 统一用 --stage-h 撑满。 */
.m-aside { height: var(--stage-h, 1024px); max-height: none; }

/* ---------- ⑩ 手机横版展示（窗口宽 ≤ 1000 时启用，由 stage.js 打 html.mlmm-phone）
   原包是 iPad 横屏 App；手机上不再整页缩放，改成流式布局，横屏一屏一版：
   · 左侧图标栏 56px、内容区铺满剩余宽度，取消桌面顶栏
   · 品牌 / 流程：顶部年份/步骤条横向可滑，正文区一屏高
   · 体验：4 列卡片网格铺满；项目：封面按屏宽
   · 看图：一张图 contain 满屏
   --------------------------------------------------------------- */
html.mlmm-phone { zoom: 1 !important; }
.mlmm-phone body { overflow: hidden; background: #f2f3f5; }

/* 壳 */
.mlmm-phone .m-aside { width: 56px; height: var(--stage-h, 100vh); background: #2f3336; }
.mlmm-phone .m-aside .logo { background-size: 24px 24px; }
.mlmm-phone .m-aside .nav-item { box-shadow: none; }
.mlmm-phone .m-aside .icon { width: 24px; height: 24px; }
.mlmm-phone .m-aside .icon > .icon { background-size: 24px; }
.mlmm-phone .m-topbar { display: none; }
.mlmm-phone .m-main {
  margin-left: 56px;
  width: calc(100vw - 56px);
  height: var(--stage-h, 100vh);
  padding-top: 0;
  overflow: hidden auto;
  background: #f2f3f5;
}


/* 品牌 / 流程：时间轴外框 */
.mlmm-phone .m-timeline { display: flex; flex-direction: column; height: var(--stage-h, 100vh); }
.mlmm-phone .m-timeline .hd {
  flex: none;
  height: 42px;
  margin: 0;
  padding: 6px 10px 0;
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  background-size: cover;
}
.mlmm-phone .m-timeline .hd::-webkit-scrollbar { display: none; }
.mlmm-phone .m-timeline .tl-track { flex: 1 1 auto; min-height: 0; }
.mlmm-phone .m-timeline .tl-slide { height: 100%; }

/* 看图页（整屏一张） */
.mlmm-phone .full-page .m-main { margin-left: 0; width: 100vw; padding-top: 0; }
.mlmm-phone .uni-status-bar { background: transparent; }

/* ---------- ⑪ PDF 预览页 pages/view/view + 项目页已加载态（2026-11-02）
   原包 pages/view/view 的 render 不含 layout（自带原生导航栏），
   这里把侧栏/顶栏隐掉，web-view 用 iframe 承载原包 hybrid/html/pdf.html 查看器。 */
.pdf-page .m-aside,
.pdf-page .m-topbar { display: none; }
.pdf-page .m-main {
  margin-left: 0;
  padding-top: 0;
  /* 必须是 100% 不能是 100vw：桌面/平板整页有 zoom（视口宽 ÷ 1366），
     vw 不受 zoom 影响 → 100vw 会被放大成「视口 × zoom」那么宽，
     iframe 跟着变宽，pdfh5 按这个更宽的尺寸渲染，PDF 右边就被裁掉了。
     100% 跟随 zoom 后的可用宽度，iframe 宽度正好等于视口，PDF 才装得下。 */
  width: 100%;
  height: var(--stage-h, 1024px);
  overflow: hidden;
  background: #3c3c3c;
}
.pdf-page .uni-status-bar { display: block; width: 100%; height: 100%; }
.pdf-page web-view { display: block; width: 100%; height: 100%; }
.mlmm-pdf-frame { display: block; width: 100%; height: 100%; border: 0; background: #3c3c3c; }
/* 原包这一页有原生返回按钮（titleNView），H5 用同位置的圆形返回补上 */
.mlmm-pdf-back {
  position: fixed;
  left: 14px;
  top: 14px;
  z-index: 320;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
}
.mlmm-pdf-back:hover { background: rgba(0, 0, 0, .72); }

/* ---------- ⑫ 原包组件等价实现（2026-11-02 逐页比对补差）
   · swiper indicator-dots：看图页原包开了 indicator-dots（uni-app 默认圆点） */

.uni-swiper-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--stage-h, 1024px) * 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 5;
  pointer-events: none;
}
.uni-swiper-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, .3);
}
.uni-swiper-dot-active { background-color: #000; }
/* 看图页：原包 swiper 是整屏（100vh），在 zoom 下 100vh 会被二次放大 →
   改用 --stage-h，页面正好等于视口，圆点才落在屏幕内 */
.swiper { height: var(--stage-h, 1024px); }
.uni-margin-wrap { position: relative; height: var(--stage-h, 1024px); }

/* ---------- ⑬ 展示端收口（2026-11-03）
   ① body 高度：原包 app.css 写 body{height:100vh}，桌面/平板有 zoom 时
      100vh 会被放大成「视口高 × zoom」→ 1920 下多出 438px、1440 下多出 49px 滚动条。
      .m-main / swiper / .m-aside 之前已换成 --stage-h，这里把 body 一起收口。
   ② 只允许横屏：手机竖屏时整屏遮罩挡住，横过来自动消失（纯 CSS media query，不靠 JS 判断）
   ③ 思源黑体：原包 body 用的就是 "Source Han Sans CN"，字体在解包时丢了；
      这里补回同名 @font-face，app.css 原 font-family 直接命中，不用改原包样式
   --------------------------------------------------------------- */

/* ① body 高度跟着 zoom 走 */
body { height: var(--stage-h, 100vh); }

/* ③ 思源黑体（Noto Sans SC，与 Source Han Sans 同源，SIL OFL 许可）
   用 unicode-range 分片：拉丁走小文件，中文走大文件，避免首屏拉 2MB */
@font-face {
  font-family: "Source Han Sans CN";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/noto-sans-sc-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Han Sans CN";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/noto-sans-sc-cn-400.woff2") format("woff2");
  unicode-range: U+2E80-2EFF, U+3000-303F, U+3040-30FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
}
@font-face {
  font-family: "Source Han Sans CN";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/noto-sans-sc-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Han Sans CN";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/noto-sans-sc-cn-700.woff2") format("woff2");
  unicode-range: U+2E80-2EFF, U+3000-303F, U+3040-30FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
}

/* ② 竖屏遮罩：展示端只允许横屏。
   只在「手机/平板竖屏」出现（orientation: portrait + 宽 ≤1000）；
   桌面窗口窄但不是手机的场景也一并挡住——展示端本来就不该竖着用。 */
.mlmm-portrait-mask { display: none; }

@media (orientation: portrait) and (max-width: 1000px) {
  .mlmm-portrait-mask {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 24px;
    box-sizing: border-box;
    background: #0b3f78;
    background-image:
      radial-gradient(900px 520px at 12% -10%, rgba(0, 183, 255, .55), transparent 62%),
      radial-gradient(700px 460px at 105% 110%, rgba(0, 96, 176, .6), transparent 60%);
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    text-align: center;
  }
  /* 手机图标：竖着 → 转成横着，带一点呼吸动画 */
  .mlmm-portrait-mask .pm-phone {
    width: 74px;
    height: 122px;
    border: 3px solid rgba(255, 255, 255, .92);
    border-radius: 12px;
    position: relative;
    animation: mlmm-rotate-hint 2.4s ease-in-out infinite;
  }
  .mlmm-portrait-mask .pm-phone::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 7px;
    width: 22px;
    height: 3px;
    margin-left: -11px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .75);
  }
  .mlmm-portrait-mask .pm-title {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: .04em;
  }
  .mlmm-portrait-mask .pm-sub {
    font-size: 13.5px;
    line-height: 1.8;
    color: rgba(255, 255, 255, .72);
    max-width: 260px;
  }
  .mlmm-portrait-mask .pm-brand {
    margin-top: 6px;
    font-size: 11.5px;
    letter-spacing: .22em;
    color: rgba(255, 255, 255, .5);
  }
}

@keyframes mlmm-rotate-hint {
  0%, 35%   { transform: rotate(0deg); }
  60%, 100% { transform: rotate(90deg); }
}

/* 横屏时彻底不占位，也不接收点击 */
@media (orientation: landscape), (min-width: 1001px) {
  .mlmm-portrait-mask { display: none; }
}

/* ── 展示端出口（2026-11-04）─────────────────────────────────
   从登录页点「展示版」进来后，原来没有任何返回入口，
   竖屏手机上只看到「请横屏使用」，用户被困住。 */
.mlmm-portrait-mask .pm-back {
  margin-top: 10px;
  padding: 11px 26px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: .04em;
  transition: background .18s ease, border-color .18s ease;
}
.mlmm-portrait-mask .pm-back:active {
  background: rgba(255, 255, 255, .24);
  border-color: rgba(255, 255, 255, .8);
}

/* 右上角常驻返回：横屏时也能退出展示端 */
.mlmm-exit {
  position: fixed;
  top: 12px;
  right: 14px;
  z-index: 9500;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(12, 26, 40, .55);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  letter-spacing: .02em;
}
.mlmm-exit:active { background: rgba(12, 26, 40, .8); }

/* 竖屏遮罩内部的返回按钮单独处理：遮罩已覆盖全屏，常驻按钮会被挡住，
   所以遮罩显示时把常驻按钮提到遮罩之上。 */
@media (orientation: portrait) and (max-width: 1000px) {
  .mlmm-exit { z-index: 9600; }
}
