/* 派派 AI · 「更多工具」下拉 + 手机端（先只适配「一键成片」这一条流程）
   放在所有样式表最后加载。电脑端只受第一段影响。 */

/* ---------- 更多工具：生成视频 / 生成图片 退到二线 ---------- */
.tab-more{position:relative;display:flex;align-items:stretch}
.tabs .tm-btn{cursor:pointer;gap:7px;color:#86868B;user-select:none}
.tabs .tm-btn:hover,.tabs .tm-btn.on{color:var(--text)}
.tabs .tm-btn.on{color:var(--blue);font-weight:500}
.tm-chev{width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin-top:-4px;opacity:.75}
.tm-menu{position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%);width:268px;padding:6px;border-radius:16px;background:#fff;border:1px solid var(--line);box-shadow:0 18px 50px rgba(0,0,0,.16);z-index:40;animation:tmIn .18s cubic-bezier(.2,.8,.2,1)}
.tm-menu.hidden{display:none}
@keyframes tmIn{from{opacity:0;margin-top:-6px}to{opacity:1;margin-top:0}}
.tabs .tm-menu a{display:flex;flex-direction:column;align-items:flex-start;gap:2px;height:auto;padding:11px 14px;border-radius:11px;color:var(--text);font-size:14.5px;font-weight:400;cursor:pointer;background:none;box-shadow:none;white-space:normal}
.tabs .tm-menu a:hover{background:rgba(0,0,0,.05)}
.tm-menu a b{font-weight:500}.tm-menu a small{font-size:12.5px;color:var(--dim);line-height:1.4}
.tabs .tm-menu a.on b{color:var(--blue)}
.fm-wx{margin-top:12px;font-size:13px;line-height:1.6;color:#B25E00}

/* ---------- 一键成片第 5 步的两处老毛病（电脑端也有） ---------- */
.fm-prog .bar{position:static}   /* 全局的 .bar 是绝对定位，进度条跑到了页面最底下 */
.fm-g small{color:#fff}.fm-g .st{color:#fff}   /* 镜头小图上的字原来是深色压深色 */
.fm-g.d .st{color:#30D158}.fm-g.r .st{color:#64D2FF}.fm-g.f .st{color:#FF6961}.fm-g.q .st{color:rgba(255,255,255,.8)}
.fm-g.end .ecard b{color:#fff}.fm-g.end .ecard span{color:rgba(255,255,255,.7)}

/* ---------- 窄屏导航：分段控件（原来选中的那一格是蓝底蓝字，看不见） ---------- */
@media (max-width:980px){
  .top{height:auto}   /* apple.css 把顶栏高度定死了 56px，导航换行后会压住下面的内容 */
  .tabs{background:#ECECEF;border:0;padding:3px;border-radius:13px;gap:0}
  .tabs a{padding:10px 4px;border-radius:10px;font-size:14.5px;white-space:nowrap;color:#424245}
  .tabs>a.on,.tabs .tm-btn.on{background:#fff;color:var(--text);font-weight:600;box-shadow:0 1px 4px rgba(0,0,0,.14)}
  .tab-more{flex:1}.tabs .tm-btn{flex:1;justify-content:center;color:#6E6E73}
  .tm-menu{left:auto;right:0;transform:none;top:calc(100% + 10px)}
  .tabs .tm-menu a{padding:13px 14px;font-size:15.5px;flex:none}
}

/* ---------- 手机 ---------- */
@media (max-width:760px){
  html{-webkit-text-size-adjust:100%}
  body{-webkit-tap-highlight-color:transparent}
  .top{position:relative;padding:12px 16px 12px;gap:0 10px}
  .top .brand{font-size:19px}.top .brand-mark{width:24px;height:24px}
  .credit{display:flex;height:32px;padding:0 5px 0 11px;font-size:13px;gap:5px}.credit .plus{font-size:12px;padding:2px 9px}
  .me{gap:10px}.menu{top:44px}
  .tabs{margin-top:12px}
  .toast{bottom:auto;top:14px;transform:translate(-50%,-30px);width:max-content;max-width:calc(100vw - 32px);text-align:center;line-height:1.5;font-size:14px}
  .toast.show{transform:translate(-50%,0)}
  .foot{padding:16px 16px calc(16px + env(safe-area-inset-bottom));font-size:11.5px;line-height:1.9}

  /* 我的作品：成片存在这里，先保证不横向撑破、能看能下载（其余页面以后再适配） */
  .wall{padding:18px 16px 40px;max-width:100vw;overflow-x:clip}
  .hero{margin:0;padding:0 0 12px;height:auto}.hero h1{font-size:30px}.hero p{font-size:14px}
  .wall-bar{flex-wrap:wrap;gap:10px}
  .filters{flex:1 1 100%;flex-wrap:nowrap}
  .filters .chip,.full .filters .chip{flex:1;text-align:center;white-space:nowrap;padding:8px 2px;font-size:14px}
  .wall-bar .search,.full .search{flex:1 1 100%;max-width:none;width:auto;margin:0}
  .wall-bar .sort{flex:1 1 28%;min-width:0;padding:9px 6px;font-size:13px}
  .cards,.full .cards,.cards.img{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}

  /* 一键成片 */
  .film{padding:20px 16px 0;max-width:100vw;overflow-x:clip}
  .film .sin,.film .msel,.film .fm-shot input,.film .fm-shot select,.film .fm-card input,.film .fm-slot .pi input{font-size:16px}   /* 小于 16px 的输入框，iPhone 点上去会把整页放大 */
  .fm-head{flex-direction:column;align-items:stretch;gap:16px}
  .fm-head h1{font-size:30px}
  .fm-head p{font-size:14.5px;line-height:1.65;margin-top:6px}
  .film:not([data-step="1"]) .fm-head>div:first-child{display:none}   /* 进了流程以后不再重复大标题，把位置留给内容 */
  .fm-acts{gap:8px}
  .fm-acts .msel{flex:1;min-width:0;max-width:none;height:44px;border-radius:12px;padding:0 10px}
  .fm-acts .tbtn{flex:none;height:44px;padding:0 16px;font-size:15px}

  .fm-steps{margin:18px 0;padding:0;gap:6px;justify-content:space-between}
  .fm-steps i{flex:1;max-width:none;min-width:6px}
  .fm-steps a{font-size:0;gap:0}
  .fm-steps a b{width:30px;height:30px;font-size:13px}
  .fm-steps a.on{font-size:15px;gap:8px}
  .fm-sub{font-size:14.5px;line-height:1.65;margin-bottom:14px}

  /* ① 选模板：一行一个 */
  .fm-tpls{grid-template-columns:1fr;gap:10px}
  .fm-tpl{display:grid;grid-template-columns:54px minmax(0,1fr);grid-template-areas:"i n" "i d" "i e";column-gap:14px;row-gap:3px;align-items:center;min-height:0;padding:16px;border-radius:18px}
  .fm-tpl:hover{transform:none;border-color:var(--line);box-shadow:var(--shadow)}
  .fm-tpl:active{background:#F5F5F7}
  .fm-tpl .ti{grid-area:i;font-size:40px;line-height:1;text-align:center}
  .fm-tpl b{grid-area:n;font-size:18px}
  .fm-tpl p{grid-area:d;min-height:0;font-size:13.5px;line-height:1.5}
  .fm-tpl .slots{display:none}
  .fm-tpl em{grid-area:e;font-size:13px;margin-top:3px}
  .fm-why{grid-template-columns:1fr;gap:10px;margin-top:16px}
  .fm-why div{padding:16px;font-size:14px;line-height:1.75}.fm-why b{font-size:15.5px}

  /* ② 上传照片：一类一张卡，照片一行一张（左图右备注） */
  .fm-slots{grid-template-columns:1fr;gap:10px}
  .fm-slot{padding:16px;gap:8px;border-radius:18px}
  .fm-slot .sh b{font-size:17px}.fm-slot .sh small{font-size:13px}
  .fm-slot .tip{min-height:0;font-size:13.5px;line-height:1.55}
  .fm-slot .ph{grid-template-columns:1fr;gap:10px;margin-top:4px}
  .fm-slot .pi{display:flex;align-items:center;gap:12px;overflow:visible;background:none;border-radius:0}
  .fm-slot .pi img{width:84px;flex:none;border-radius:12px}
  .fm-slot .pi input{position:static;flex:1;min-width:0;height:48px;padding:0 14px;border-radius:12px;background:#F5F5F7;color:var(--text)}
  .fm-slot .pi input::placeholder{color:var(--dim)}
  .fm-slot .pi span{top:-7px;left:65px;right:auto;width:26px;height:26px;font-size:16px;background:#1D1D1F;box-shadow:0 0 0 2px #fff}
  .fm-slot .pa{aspect-ratio:auto;height:60px;flex-direction:row;gap:8px;font-size:15.5px;color:var(--blue);border-radius:14px}
  .fm-slot .pa .ic{width:20px;height:20px;color:var(--blue)}

  /* 底部操作条：贴底、通栏，按钮占满一行 */
  .fm-bar{position:sticky;bottom:0;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px 12px;margin:18px -16px 0;
    padding:12px 16px calc(12px + env(safe-area-inset-bottom));border-radius:20px 20px 0 0;border-width:1px 0 0;box-shadow:0 -8px 24px rgba(0,0,0,.08)}
  .fm-bar>span,.fm-bar>.cta{grid-column:1/-1}
  .fm-bar>span{font-size:13px;line-height:1.5}
  .film .fm-bar .cta{position:static;width:100%!important;height:52px!important;padding:0 20px!important;margin:0;font-size:17px}
  .film .fm-bar .cta .ic-arrow{right:18px}
  .fm-bar .msel{margin:0;width:100%;max-width:none;height:44px;border-radius:12px;padding:0 10px}
  .fm-bar .lnk{margin:0;white-space:nowrap;font-size:14.5px}
  .film[data-step="3"] .fm-bar>span{display:none}

  /* ③ 填写信息 */
  .fm-form{grid-template-columns:1fr;gap:10px}
  .fm-col{padding:18px 16px;gap:18px;border-radius:18px}
  .fm-col .f label{font-size:14px;margin-bottom:8px;line-height:1.5}
  .fm-col .sin{padding:12px 14px}
  .fm-col .chips{gap:8px}
  .fm-col .chip2{font-size:14.5px;padding:9px 15px}
  .fm-col .row-l{flex-wrap:wrap}.fm-col .row-l .toggle{flex:none}
  .fm-col label.row-l{flex-wrap:nowrap;color:var(--text)}
  .fm-col .row-l .sin{flex:1 1 150px!important;width:auto}

  /* ④ 确认分镜 */
  .fm-shots{grid-template-columns:1fr;gap:10px}
  .fm-shot{position:relative;grid-template-columns:78px minmax(0,1fr);gap:12px;padding:14px;border-radius:18px}
  .fm-shot .no{position:absolute;top:8px;left:8px;width:24px;height:24px;font-size:13px;border-radius:8px;z-index:1;box-shadow:0 0 0 2px #fff}
  .fm-shot img{width:78px;border-radius:12px}
  .fm-shot .sb{gap:8px}
  .fm-shot .r1{flex-wrap:wrap;gap:8px}.fm-shot .r1 b{flex:1 0 100%;font-size:16.5px}
  .fm-shot select{height:36px;padding:0 8px;border-radius:9px}
  .fm-shot .mv{gap:6px}.fm-shot .mv a{width:36px;height:36px;font-size:17px;border-radius:9px}
  .fm-shot label{font-size:12.5px;gap:4px}
  .fm-shot input{padding:9px 11px;border-radius:10px;width:100%;box-sizing:border-box;min-width:0}
  .fm-card{flex-wrap:wrap;gap:8px;padding:16px;border-radius:18px;margin-top:10px}
  .fm-card b{flex:1 0 100%;font-size:16.5px;margin:0 0 2px}
  .fm-card input{flex:1 0 100%;padding:10px 12px;border-radius:10px;box-sizing:border-box}

  /* ⑤ 进度 + 成片 */
  .fm-final{grid-template-columns:1fr;gap:16px;padding:14px;border-radius:20px}
  .fm-final::before{top:24px;left:24px}
  .fm-final video{max-height:64vh;border-radius:14px}
  .fm-final h2{font-size:22px;line-height:1.35}.fm-final p{font-size:13.5px;margin-top:4px}
  .fm-final .vbtns{flex-direction:column;gap:8px;margin-top:14px}
  .fm-final .vbtn{width:100%;height:50px;padding:0 16px;font-size:16px;box-sizing:border-box}
  .fm-prog{padding:16px;border-radius:18px;margin-bottom:10px}
  .fm-prog .pl{gap:10px}.fm-prog .pl b{font-size:15.5px;line-height:1.45}.fm-prog .pl span{font-size:16px;flex:none}
  .fm-prog .bar{height:8px}
  .fm-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding-bottom:28px}
  .fm-g{border-radius:12px}.fm-g .st{font-size:11px;padding:2px 7px;top:6px;left:6px}.fm-g small{font-size:11px;padding:16px 7px 6px;line-height:1.35}
  .fm-g .retry{font-size:14px;padding:8px 18px;white-space:nowrap}
  .fm-g.end .ecard b{font-size:13px}.fm-g.end .ecard span{font-size:10px}
}
