@font-face{
  font-family:"PDD Number";
  src:url("../assets/PDDSansStd06-Regular.otf") format("opentype");
  font-style:normal;
  font-weight:400;
  font-display:swap;
}
:root{
  --red:#e6382d;
  --page:#f5f5f5;
  --course-bg:#f2f2f2;
  --card:#fff;
  --text:#2b2b2b;
  --muted:#a7a7a7;
  --blue:#5575ff;
  /* V6.8：底部导航是 body 根层的独立固定面板；导航本身不读取底部安全区。 */
  --safe-bottom:env(safe-area-inset-bottom);
  /* 正版导航的可见容器：图标 + 文字在 48px 内完整显示。 */
  --tabbar-height:48px;
  /* 初版001：导航可见区保持短容器，底部安全区并入同色导航背景。 */
  --tabbar-total:calc(var(--tabbar-height) + var(--safe-bottom));
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Noto Sans CJK SC","Microsoft YaHei",sans-serif;
  color:var(--text);
  /* body 背景与底部导航同色，确保全面屏底边视觉连续。 */
  background:#fff;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{
  width:100%;
  height:var(--pwa-height,100dvh);
  min-height:var(--pwa-height,100dvh);
  overflow:hidden;
  margin:0;
  padding:0;
  background:#fff;
  overscroll-behavior:none;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
/* V6.5：只针对 iPhone 主屏幕 PWA。根层固定铺满动态视口，
   不再为 Safari 地址栏/底部工具栏保留布局空间。 */
body{
  position:fixed;
  inset:0;
  width:100vw;
  height:100dvh;
  min-height:100dvh;
  overflow:hidden;
}
button,input{font:inherit}
button{border:0;background:none;padding:0;color:inherit;cursor:pointer}
img{display:block;user-select:none;-webkit-user-drag:none}
[hidden]{display:none!important}

html.pwa-standalone,html.pwa-standalone body{background:#fff}

/* standalone 启动画面：遮住首帧白屏，但不阻塞下面主界面的并行渲染。 */
.launch-splash{position:fixed;inset:0;z-index:6000;display:flex;align-items:flex-end;justify-content:center;min-height:100%;padding:0 20px calc(62px + env(safe-area-inset-bottom));background:#fff;opacity:1;pointer-events:auto;transition:opacity .56s cubic-bezier(.16,.82,.2,1)}
.launch-splash.is-leaving{opacity:0;pointer-events:none}
.launch-brand{display:flex;align-items:center;justify-content:center;gap:7px;transform:translateY(6px);animation:launch-brand-in .42s ease-out both}
.launch-brand img{width:48px;height:48px;border-radius:11px;object-fit:cover}
.launch-brand span{color:#e6382d;font-size:25px;font-weight:600;letter-spacing:-1px;white-space:nowrap}
@keyframes launch-brand-in{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(6px)}}
html.pwa-browser .launch-splash{display:none}
@media (prefers-reduced-motion:reduce){.launch-splash,.app{transition:none}.launch-brand{animation:none}}

/* ===== App 容器：直接占满 iPhone PWA 的整个视觉视口 ===== */
.app{
  position:fixed;
  inset:0;
  width:100vw;
  max-width:none;
  height:var(--pwa-height,100dvh);
  min-height:var(--pwa-height,100dvh);
  margin:0;
  background:var(--page);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  isolation:isolate;
}
html.pwa-standalone .app{opacity:0;transform:scale(1.012);transform-origin:center center;transition:opacity .56s ease,transform .68s cubic-bezier(.16,.82,.2,1)}
html.pwa-standalone .app.launch-app-ready{opacity:1;transform:scale(1)}

/* ===== Header：系统状态栏由系统绘制，网页只避让安全区 ===== */
.topbar{
  flex:none;
  position:relative;
  z-index:5;
  background:var(--red);
  color:#fff;
  padding-top:env(safe-area-inset-top);
}
.merchant-row{height:45px;display:flex;align-items:flex-start;justify-content:space-between;padding:0 15px 0 14px}
.merchant-left{display:flex;align-items:center;min-width:0;text-align:left;color:#fff}
.merchant-logo{width:34px;height:34px;flex:none;border-radius:4px;object-fit:cover;align-self:flex-start;transition:none}
.merchant-meta{margin-left:7px;min-width:0;display:block}
.merchant-name-line{height:18px;display:flex;align-items:center;gap:4px;white-space:nowrap}
.merchant-name{font-size:14px;font-weight:500;line-height:18px;letter-spacing:-.1px}
.merchant-meta.is-no-message .merchant-name-line{height:34px}
.merchant-meta.is-no-message .merchant-name{font-size:17px;line-height:22px;font-weight:500}
.merchant-eye{width:19px;height:18px;object-fit:contain;flex:none}
.merchant-caret-hit{width:34px;height:34px;display:flex;align-items:center;justify-content:center;flex:none;margin:-8px -6px -8px -7px}
.merchant-caret{width:22px;height:22px;object-fit:contain;margin:0;transition:transform .16s ease}
.merchant-left[aria-expanded="true"] .merchant-caret{transform:rotate(180deg)}
.message-pill{margin-top:2px;width:93px;height:17px;border-radius:9px;background:#fff;color:#e34a37;padding:0;font-size:10.5px;line-height:17px;text-align:center;display:block;white-space:nowrap;overflow:hidden}
.top-actions{display:flex;gap:18px;margin-top:-3px;margin-right:-1px}
.top-action{width:30px;color:#fff;display:flex;flex-direction:column;align-items:center;font-size:12px;line-height:18px;gap:1px;font-weight:400}
.top-action img{width:30px;height:24px;object-fit:contain}
.top-action:first-child img{width:29px}
#scanBtn img{filter:brightness(0) invert(1)}

/* 店铺切换：从红色头部向下延展，页面与根层底部导航同步变暗。 */
.merchant-backdrop{position:fixed;top:calc(env(safe-area-inset-top) + 45px);right:0;bottom:0;left:0;width:100%;padding:0;border:0;background:rgba(0,0,0,.48);z-index:2000;opacity:0;pointer-events:none;transition:opacity .22s ease}
.merchant-backdrop.is-open{opacity:1;pointer-events:auto}
.merchant-dropdown{position:fixed;top:calc(env(safe-area-inset-top) + 45px);right:0;left:0;width:100%;max-height:0;padding:0;overflow:hidden;background:#fff;box-shadow:0 8px 18px rgba(0,0,0,.04);border-radius:0;z-index:2001;color:#333;opacity:.82;transform:translateY(-7px) scaleY(.965);transform-origin:top;transition:max-height .48s cubic-bezier(.16,.82,.2,1),opacity .24s ease,transform .48s cubic-bezier(.16,.82,.2,1)}
.merchant-dropdown.is-open{max-height:300px;opacity:1;transform:translateY(0) scaleY(1)}
.merchant-account-list:empty{display:none}
.merchant-store{position:relative;width:100%;height:43px;display:flex;align-items:center;padding:4px 14px;border:0;border-bottom:1px solid #f0f0f0;background:#fff;text-align:left;color:#333}
.merchant-store:active{background:#fafafa}
.merchant-dropdown.is-open .merchant-store{animation:merchant-row-enter .36s cubic-bezier(.16,.82,.2,1) both;animation-delay:calc(70ms + var(--merchant-row-index, 5) * 48ms)}
@keyframes merchant-row-enter{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}
.store-avatar{width:35px;height:35px;flex:none;margin-right:9px;border-radius:5px;object-fit:cover}
.store-avatar-muted,.store-avatar-purple,.store-avatar-blue{display:flex;align-items:center;justify-content:center;text-align:center;font-size:7px;font-weight:600;line-height:10px;letter-spacing:-.3px}
.store-avatar-muted{background:linear-gradient(145deg,#f7f7f7,#ededed);border:1px solid #e6e6e6;color:#aaa;filter:grayscale(1)}
.store-avatar-purple{background:#f6eaff;border:1px solid #ead4ff;color:#9c52e9;font-size:9px}
.store-avatar-blue{background:#eaf0ff;border:1px solid #d6e0ff;color:#3f69c8;font-size:8px}
.store-copy{display:flex;flex:1;min-width:0;flex-direction:column;justify-content:center;gap:1px}
.store-name{overflow:hidden;font-size:16px;line-height:18px;font-weight:400;text-overflow:ellipsis;white-space:nowrap}
.store-copy small{display:flex;align-items:center;gap:7px;min-width:0;color:#8a8a8a;font-size:12px;line-height:15px;white-space:nowrap}
.store-copy small b{overflow:hidden;color:#f05245;font-weight:400;text-overflow:ellipsis}
.merchant-store.is-disabled .store-name{color:#a7a7a7}
.merchant-store.is-selected .store-name{color:#4a65f6;font-size:17px}
.store-online-dot{width:9px;height:9px;flex:none;border-radius:50%;background:#43c700}
.store-copy small em{width:1px;height:13px;background:#d8d8d8;font-style:normal}
.store-check{margin-left:10px;color:#4a65f6;font-size:26px;font-weight:400;line-height:1}
.store-unread{position:absolute;top:7px;left:45px;width:10px;height:10px;border-radius:50%;background:#ff5a63;box-shadow:0 0 0 1px #fff}
.store-flow-tag{margin-left:8px;padding:5px 8px;border-radius:13px;background:linear-gradient(90deg,#ff7a5c,#ff3834);color:#fff;font-size:12px;line-height:15px;white-space:nowrap}
.merchant-add{border-bottom:0}
.store-add-icon{display:flex;align-items:center;justify-content:center;border:1px solid #7390ff;border-radius:5px;color:#5274ff;font-size:27px;font-weight:300;line-height:1}
.merchant-add .store-name{font-size:17px;color:#333}
.merchant-add .store-copy small{color:#aaa}
.store-manage{height:23px;margin-left:10px;padding-left:16px;border-left:1px solid #eee;color:#4a65f6;font-size:16px;line-height:23px;white-space:nowrap}
.merchant-dropdown.is-managing .merchant-store{padding-left:14px}
.store-drag{width:25px;height:28px;flex:none;margin-right:7px;position:relative}
.store-drag::before,.store-drag::after,.store-drag i{position:absolute;left:3px;width:17px;height:2px;border-radius:2px;background:#b6b6b6;content:""}
.store-drag::before{top:8px}.store-drag i{top:13px}.store-drag::after{top:18px}
.store-exit{display:flex;align-items:center;margin-left:12px;color:#ef4438;font-size:16px;line-height:26px;white-space:nowrap}
.store-exit::before{content:"−";display:inline-flex;width:16px;height:16px;margin-right:4px;align-items:center;justify-content:center;border-radius:50%;background:#ef4438;color:#fff;font-size:16px;font-weight:500;line-height:16px}

/* ===== 隐私隐藏：仅影响头像 / 店铺名 / 眼睛图标，不影响数据 ===== */
.avatar{transition:none}
.avatar.is-empty{background:#f2f2f2;border:1px solid rgba(0,0,0,.05)}
.store-avatar.is-empty{background:#f2f2f2;border:1px solid #e6e6e6}
.avatar.hidden{filter:blur(5px)}

/* ===== Scroll 内容区域 ===== */
.content{
  flex:1;
  min-height:0;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  position:relative;
  padding:calc(3px + var(--refresh-pull, 0px)) 8px var(--tabbar-total);
  background:linear-gradient(to bottom,#e6382d 0,#e6382d calc(var(--refresh-pull, 0px) + 12px),#f2aaa4 calc(var(--refresh-pull, 0px) + 92px),#f8d8d5 calc(var(--refresh-pull, 0px) + 150px),var(--page) calc(var(--refresh-pull, 0px) + 184px),var(--course-bg) calc(var(--refresh-pull, 0px) + 184px) 100%);
  overscroll-behavior-y:contain;
}
.refresh-indicator{position:absolute;top:0;left:0;right:0;height:48px;display:flex;align-items:center;justify-content:center;gap:7px;color:#fff;font-size:12px;opacity:0;pointer-events:none;transform:translateY(calc(-48px + var(--refresh-pull, 0px) * .88));transition:opacity .2s ease,transform .34s cubic-bezier(.16,.82,.2,1);z-index:2}
.refresh-indicator.is-visible{opacity:1}
.refresh-indicator.is-pulling{transition:none}
.refresh-indicator.is-refreshing{color:#fff}
.refresh-glyph{width:23px;height:23px;display:block;overflow:visible;opacity:0;transform:scale(.82);transition:opacity .18s ease,transform .24s cubic-bezier(.16,.82,.2,1)}
.refresh-glyph path{fill:none;stroke:#fff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:43 8;stroke-dashoffset:0}
.refresh-indicator.is-ready .refresh-glyph{opacity:1;transform:scale(1)}
.refresh-indicator.is-refreshing .refresh-glyph{opacity:1}
.refresh-indicator.is-complete .refresh-glyph{opacity:1;transform:scale(1)}
.refresh-indicator.is-refreshing .refresh-glyph path{animation:refresh-gap-turn .92s linear infinite}
@keyframes refresh-gap-turn{to{stroke-dashoffset:-51px}}
.content::-webkit-scrollbar{display:none}
.page-mine{background:var(--page)}

/* 数据统计卡：隐私模式不影响数字 */
.stats-card{background:var(--card);border-radius:8px;margin-bottom:8px;overflow:hidden}
.stats-grid{height:120px;display:grid;grid-template-columns:repeat(5,1fr);grid-template-rows:repeat(2,1fr);padding:7px 5px 4px}
.stat{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0}
.stat strong{font-family:"PDD Number",-apple-system,BlinkMacSystemFont,sans-serif;font-size:20px;font-weight:400;line-height:20px;color:#202020;min-width:28px;text-align:center}
.stat span{font-size:13px;font-weight:400;line-height:16px;color:#666;white-space:nowrap}

/* 功能宫格 */
.apps-card{background:var(--card);border-radius:8px;margin-bottom:8px;overflow:hidden}
.apps-grid{height:144px;display:grid;grid-template-columns:repeat(5,1fr);grid-template-rows:repeat(2,1fr)}
.app-item{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:0;color:#333;font-size:13px;font-weight:400;line-height:18px;min-width:0}
.app-item img,.app-item video{width:41px;height:42px;object-fit:contain}
.app-icon-wrap{position:relative;display:block;width:41px;height:42px;flex:none}
.app-icon-wrap>img{display:block;width:41px;height:42px;object-fit:contain}
.product-icon-wrap{position:relative;overflow:visible}
.product-count-badge{position:absolute;right:2px;bottom:4px;display:flex;align-items:center;justify-content:center;min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:rgba(252,127,0,.88);color:#fff;font-family:"PDD Number",-apple-system,BlinkMacSystemFont,sans-serif;font-size:10px;line-height:17px;font-weight:600;white-space:nowrap;box-sizing:border-box;pointer-events:none}
.product-count-badge.is-wide{right:-2px;min-width:28px}
.product-count-badge .badge-plus{font-size:7px;line-height:1;margin-left:1px;transform:translateY(-1px)}
.app-item video{pointer-events:none}
.app-video-loop{position:relative;display:block;width:41px;height:42px;overflow:hidden}
.app-video-loop video{position:absolute;inset:0;width:100%;height:100%;margin:0!important;opacity:0;transition:opacity .22s linear}
.app-video-loop video.is-active{opacity:1}
.app-video-loop.is-crossfading video.is-next{opacity:1}
.app-item:nth-child(-n+5)>img,.app-item:nth-child(-n+5)>.app-video-loop{margin-top:5px}
.app-item:nth-child(-n+5)>.app-icon-wrap{margin-top:5px}
.app-item:nth-child(n+6)>img,.app-item:nth-child(n+6)>.app-video-loop{margin-top:0}
.app-item span{white-space:nowrap}

/* Banner */
.survey-banner{height:56px;background:var(--card);border-radius:8px;margin-bottom:8px;display:flex;align-items:center;padding:4px 10px 4px 8px;background:linear-gradient(90deg,#ffecdd 0%,#fff 28%,#fff 100%)}
.survey-icon{width:27px;height:27px;flex:none;object-fit:contain;margin-left:1px;margin-right:7px;transform:translateY(-3px)}
.survey-banner p{margin:0;flex:1;min-width:0;font-size:13px;line-height:18px;color:#333;font-weight:400;letter-spacing:-.08px;transform:translateY(-2px)}
.survey-banner p strong{font-size:15px;line-height:20px;font-weight:600}
.survey-banner p span{color:#ff5b00;font-weight:600}
.link-btn,.course-link{color:var(--blue);white-space:nowrap;font-weight:400}
.link-btn{font-size:13px;margin-left:4px;display:flex;align-items:center;gap:2px;transform:translateY(-1px)}
.link-btn b,.course-link b{display:inline-block;width:6px;height:6px;border-top:1px solid currentColor;border-right:1px solid currentColor;transform:rotate(45deg);flex:none;margin-left:0}

/* ===== 新商家首页：成长页只在导航连续三击后显示 ===== */
.new-merchant-view{display:flex;max-height:0;flex-direction:column;gap:8px;margin-bottom:0;overflow:hidden;opacity:0;transform:translateY(8px);pointer-events:none;transition:max-height .36s cubic-bezier(.16,.82,.2,1),margin-bottom .36s ease,opacity .24s ease,transform .36s cubic-bezier(.16,.82,.2,1)}
.new-merchant-view.is-visible{max-height:1800px;margin-bottom:8px;opacity:1;transform:translateY(0);pointer-events:auto}
.new-read-card{min-height:76px;display:flex;align-items:center;gap:12px;padding:14px 14px 14px 9px;background:linear-gradient(90deg,#fff3ef 0%,#fff 72%);border-radius:10px}
.new-read-icon{width:20px;height:20px;flex:none;display:flex;align-items:center;justify-content:center;border-radius:50%;background:#ff5252;color:#fff;font-size:14px;line-height:20px;font-weight:700}
.new-read-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;text-align:left}
.new-read-copy strong{color:#333;font-size:15px;line-height:20px;font-weight:600;white-space:nowrap}
.new-read-copy span{color:#333;font-size:13px;line-height:18px;white-space:nowrap}
.new-card-link{display:flex;align-items:center;gap:5px;color:var(--blue);font-size:16px;line-height:22px;white-space:nowrap}
.new-card-link b{width:8px;height:8px;border-top:2px solid currentColor;border-right:2px solid currentColor;transform:rotate(45deg)}
.new-growth-card{width:calc(100% - 8px);margin:0 auto;padding:0 12px 12px;background:#fff;border-radius:10px}
.new-section-title{padding:14px 0 12px;color:#333;font-size:18px;line-height:24px;font-weight:600}
.traffic-growth-panel{width:calc(100% - 8px);margin:0 auto;padding:16px 12px 9px;overflow:hidden;border:1.5px solid #ff8d82;border-radius:9px;background:linear-gradient(145deg,#fff7f3 0%,#fff 68%)}
.traffic-growth-heading{display:flex;flex-direction:column;gap:3px}
.traffic-growth-heading span{color:#222;font-size:17px;line-height:24px;font-weight:600}
.traffic-growth-heading strong{color:#e64a3b;font-size:26px;line-height:32px}
.traffic-scale{position:relative;height:100px;display:flex;align-items:flex-end;gap:8px;padding:8px 5px 10px}
.traffic-bar{align-self:flex-end;flex:1 1 0;width:auto;height:var(--bar-height);min-width:0;border-radius:3px 3px 0 0;background:#fde9e7;transition:background .18s ease,transform .18s ease}
.traffic-bar.is-before{background:#e84b3c}
.traffic-bar.is-selected{background:linear-gradient(to top,#f4bd63 0 4px,#ffe7e3 4px 100%);box-shadow:none}
.traffic-bar:active{transform:scaleY(.96);transform-origin:bottom}
.traffic-scale-marker{display:none}
.traffic-level-labels{height:31px;display:grid;grid-template-columns:repeat(13,minmax(0,1fr));gap:8px;padding:9px 5px 0}
.traffic-level-labels button:nth-child(1){grid-column:1}
.traffic-level-labels button:nth-child(2){grid-column:4}
.traffic-level-labels button:nth-child(3){grid-column:7}
.traffic-level-labels button:nth-child(4){grid-column:10}
.traffic-level-labels button:nth-child(5){grid-column:13}
.traffic-level-labels button{color:#aaa;text-align:center;font-size:15px;line-height:22px;white-space:nowrap}
.traffic-level-labels button.is-active{color:#e64a3b;font-weight:600}
.new-journey-card{margin:14px 0 0;padding:0;border:2px solid #ffb0a5;border-radius:9px;background:#fff;overflow:hidden}
.journey-official-art{display:block;width:100%;height:auto;max-width:none}
.journey-title{color:#9a2816;text-align:center;font-size:24px;line-height:30px;font-weight:700;letter-spacing:.2px}
.journey-track{position:relative;display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:24px 0 12px}
.journey-line{position:absolute;z-index:0;top:36px;right:8%;left:8%;height:5px;border-radius:3px;background:linear-gradient(90deg,#ff4a4a 0 67%,#ffd1cb 67%)}
.journey-step{position:relative;z-index:1;display:flex;min-width:0;align-items:center;flex-direction:column;gap:5px;text-align:center}
.journey-step i{width:24px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:#ff4a4a;color:#fff;font-size:16px;font-style:normal;font-weight:700}
.journey-step.is-current i{border:6px solid #ff4a4a;background:#fff;color:#ff4a4a;font-size:0}
.journey-step.is-locked .lock-icon{position:relative;z-index:2;width:24px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:0;background:#fff}
.lock-icon svg{display:block;width:24px;height:24px;overflow:visible}
.lock-shackle{fill:none;stroke:#f16464;stroke-width:2.4;stroke-linecap:round}
.lock-body{fill:#f16464}
.lock-keyhole{fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round}
.journey-step strong{color:#333;font-size:15px;line-height:20px;font-weight:600;white-space:nowrap}
.journey-step small{color:#666;font-size:12px;line-height:16px}
.journey-tip{position:relative;width:max-content;margin:0 auto 12px;padding:4px 22px;border-radius:2px;background:#ff6857;color:#fff;font-size:15px;line-height:20px;font-weight:700;clip-path:polygon(0 50%,7% 0,93% 0,100% 50%,93% 100%,7% 100%)}
.journey-tip::before,.journey-tip::after{position:absolute;top:0;color:#ffc4bd;font-size:23px;line-height:28px;font-weight:400}
.journey-tip::before{content:"‹‹";left:-13px}
.journey-tip::after{content:"››";right:-13px}
.new-action-list{border-top:1px solid #f3e1de}
.new-action-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 0;border-bottom:1px solid #f3e1de}
.new-action-row>div{display:flex;min-width:0;flex-direction:column;gap:3px}
.new-action-row strong{color:#333;font-size:16px;line-height:22px}
.new-action-row span{overflow:hidden;color:#888;font-size:12px;line-height:18px;text-overflow:ellipsis;white-space:nowrap}
.new-action-row button{flex:none;min-width:78px;height:36px;padding:0 14px;border-radius:18px;background:#4f69f8;color:#fff;font-size:15px}

/* 课程列表 */
.course-list{display:flex;flex-direction:column;gap:8px}
.course-card{height:104px;position:relative;display:flex;padding:9px 12px 8px 12px;background:var(--card);border-radius:8px;overflow:visible}
.close-card{position:absolute;right:4px;top:3px;width:10px;height:10px;z-index:3}
.close-card::before,.close-card::after{content:"";position:absolute;left:4.5px;top:0;width:1px;height:10px;background:#c8c8c8;transform-origin:center}
.close-card::before{transform:rotate(45deg)}
.close-card::after{transform:rotate(-45deg)}
.course-main{flex:1;min-width:0;padding-right:7px;display:flex;flex-direction:column}
.course-main h2{margin:0 0 4px;font-size:16px;line-height:22px;font-weight:500;color:#292929;letter-spacing:-.3px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.course-meta{font-size:13px;font-weight:400;color:#a3a3a3;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.course-source{margin-top:auto;font-size:12px;font-weight:400;color:#aaa;line-height:18px}
.course-side{width:80px;flex:none;display:flex;flex-direction:column;align-items:stretch;justify-content:space-between;gap:2px}
.thumb{width:80px;height:60px;border-radius:5px;object-fit:cover;transform:translateY(-1px)}
.course-link{text-align:right;font-size:13px;line-height:20px;display:flex;align-items:center;justify-content:flex-end;gap:2px}

/* ===== 初版002 底部 Tab：可见区对齐正版，背景延伸到底部安全区 =====
   iPhone 主屏幕网页的 fixed 视口通常在 Home Indicator 上方结束；
   通过向下延伸一个安全区并再留出少量视觉校准，让导航上边缘和正版网页处于同一条水平线，
   同时把安全区保持为同色背景，不覆盖系统 Home Indicator。 */
.bottom-nav{
  position:fixed;
  left:0;
  right:0;
  bottom:calc(-1 * var(--safe-bottom) - 7px);
  width:100vw;
  height:var(--tabbar-total);
  display:block;
  background:#fff;
  border-top:1px solid #f0f0f0;
  padding:0 0 var(--safe-bottom);
  box-sizing:border-box;
  z-index:1000;
  overflow:visible;
  transform:translateZ(0);
  -webkit-transform:translateZ(0);
}
.nav-item{position:absolute;top:0;left:var(--nav-left);width:var(--nav-width);height:var(--tabbar-height);padding-top:3px;color:#5d5d5d;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;font-size:11px;font-weight:400;line-height:15px;-webkit-tap-highlight-color:transparent}
/* 五个按钮各自覆盖本列的整块短导航面板，空白区域同样可点。 */
.bottom-nav .nav-item:nth-child(1){--nav-left:0%;--nav-width:20%}
.bottom-nav .nav-item:nth-child(2){--nav-left:20%;--nav-width:20%}
.bottom-nav .nav-item:nth-child(3){--nav-left:40%;--nav-width:20%}
.bottom-nav .nav-item:nth-child(4){--nav-left:60%;--nav-width:20%}
.bottom-nav .nav-item:nth-child(5){--nav-left:80%;--nav-width:20%}
/* 原版导航图标：方形线框，选中态为红色填充。单图 + JS 切 src。
   尺寸对齐正版实测（正版图标画布 72px @3x = 24pt，字形约 21pt），全排统一固定、点击不变大 */
.nav-ico{display:block;height:24px;width:24px;object-fit:contain;flex:none}
.nav-item.active{color:var(--red)}

@media (max-width:360px){
  .traffic-scale{gap:4px;padding-right:2px;padding-left:2px}
  .new-action-row span{font-size:11px}
  .journey-title{font-size:22px;line-height:28px}
}

/* 聊天图标角标：素材已去除内置角标，角标由 JS 动态渲染。包裹层与其余 tab 图标同尺寸保证整排对齐 */
.nav-icon-wrap{position:relative;display:flex;align-items:center;justify-content:center;height:24px;width:24px}
.nav-badge{
  position:absolute;
  top:-3px;
  right:-9px;
  min-width:17px;
  height:17px;
  padding:0 4px;
  border-radius:9px;
  background:#ff3b30;
  color:#fff;
  font-size:10px;
  line-height:17px;
  text-align:center;
  font-weight:600;
  box-sizing:border-box;
}
.nav-badge.is-wide{right:-15px}

/* ===== 我的页面 ===== */
.mine-hero{margin:10px 8px 8px;border-radius:8px;background:var(--card);display:flex;align-items:center;padding:16px}
.mine-avatar{width:56px;height:56px;border-radius:10px;object-fit:cover;flex:none;transition:filter .2s ease}
.mine-meta{margin-left:12px;min-width:0}
.mine-name{font-size:17px;font-weight:600;line-height:24px;color:#292929}
.mine-account{font-size:12px;color:#999;line-height:18px;margin-top:2px}
.mine-card{margin:0 8px 8px;border-radius:8px;background:var(--card);overflow:hidden}
.mine-row{width:100%;display:flex;align-items:center;justify-content:space-between;height:52px;padding:0 14px;font-size:15px;color:#333;border-bottom:1px solid #f2f2f2}
.mine-row:last-child{border-bottom:0}
.row-arrow{width:7px;height:7px;border-top:1.5px solid #c0c0c0;border-right:1.5px solid #c0c0c0;transform:rotate(45deg);flex:none}
.mine-card-title-row{display:flex;align-items:center;justify-content:space-between;padding-right:12px}.mine-card-title{font-size:13px;color:#999;padding:10px 14px 2px;font-weight:400}.mine-random{height:27px;padding:0 11px;border:1px solid #ffd4ca;border-radius:14px;background:#fff5f1;color:var(--red);font-size:11px;line-height:25px}.mine-random:active{background:#ffe9e2}
.mine-form{padding:4px 14px 14px}
.mine-field{display:flex;align-items:center;height:46px;border-bottom:1px solid #f5f5f5}
.mine-field span{width:76px;font-size:15px;color:#333;flex:none}
.mine-field input{flex:1;border:0;outline:0;background:none;text-align:right;font-size:15px;font-family:"PDD Number",-apple-system,BlinkMacSystemFont,sans-serif;color:#202020}
.mine-save{width:100%;height:44px;margin-top:14px;border-radius:22px;background:var(--red);color:#fff;font-size:16px;font-weight:500}
.mine-version{padding:2px 0 18px;color:#b7b7b7;font-size:11px;line-height:18px;text-align:center}

/* ===== 订单模拟与声音提醒 ===== */
.page-order{background:#f5f5f5;padding-top:10px}
.order-sim-head,.order-card{margin:0 8px 8px;border-radius:10px;background:#fff}
.order-sim-head{display:flex;align-items:center;justify-content:space-between;padding:14px 15px;background:linear-gradient(135deg,#fff5f2,#fff)}
.order-sim-head h1{margin:0;color:#292929;font-size:17px;font-weight:600;line-height:24px}
.order-sim-head p{margin:3px 0 0;color:#999;font-size:12px;line-height:18px}
.order-switch{position:relative;display:block;width:46px;height:28px;flex:none}
.order-switch input{position:absolute;opacity:0;pointer-events:none}
.order-switch span,.order-switch b{position:absolute;inset:0;border-radius:14px;background:#d7d7d7;transition:background .18s ease}
.order-switch span::after,.order-switch b::after{position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.16);content:"";transition:transform .2s ease}
.order-switch input:checked + span,.order-switch input:checked + b{background:var(--red)}
.order-switch input:checked + span::after,.order-switch input:checked + b::after{transform:translateX(18px)}
.order-card-title{display:flex;align-items:baseline;justify-content:space-between;padding:13px 14px 10px}
.order-card-title strong{color:#292929;font-size:15px;font-weight:600}
.order-card-title span{color:#a1a1a1;font-size:11px;line-height:16px}
.order-event-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:0 10px 12px}
.order-event{height:59px;border-radius:9px;text-align:left;padding:9px 10px;display:flex;flex-direction:column;justify-content:center;gap:2px}
.order-event b{font-size:14px;font-weight:500;line-height:20px}
.order-event span{font-size:11px;line-height:16px}
.order-event-consult{background:#fff3ed;color:#e8692e}.order-event-pending{background:#fff7e9;color:#d88b16}.order-event-paid{background:#edfaf0;color:#25a24a}
.order-event:active,.order-sound-test:active{transform:scale(.97)}
.order-total-grid{display:grid;grid-template-columns:repeat(3,1fr);padding:0 8px 14px}
.order-total-grid div{display:flex;flex-direction:column;align-items:center;gap:2px;border-right:1px solid #f1f1f1}
.order-total-grid div:last-child{border-right:0}
.order-total-grid strong{font-family:"PDD Number",-apple-system,BlinkMacSystemFont,sans-serif;color:#202020;font-size:22px;font-weight:400;line-height:27px}
.order-total-grid span{color:#777;font-size:11px;line-height:17px}
.order-settings-card{overflow:hidden}
.order-setting-row{display:grid;grid-template-columns:minmax(74px,1fr) 64px 72px 42px;align-items:center;gap:7px;min-height:57px;padding:7px 12px;border-top:1px solid #f3f3f3}
.order-setting-label{min-width:0;display:flex;flex-direction:column;gap:1px}
.order-setting-label b{color:#333;font-size:13px;font-weight:500;line-height:18px}.order-setting-label small{overflow:hidden;color:#aaa;font-size:10px;line-height:15px;text-overflow:ellipsis;white-space:nowrap}
.order-setting-row label{display:flex;align-items:center;gap:2px;color:#999;font-size:10px;white-space:nowrap}
.order-setting-row input[type=number]{width:38px;height:27px;border:1px solid #e6e6e6;border-radius:6px;outline:0;background:#fafafa;color:#333;font-size:12px;text-align:center}
.order-setting-row label i,.order-common-setting label i{color:#aaa;font-size:10px;font-style:normal}
.order-sound-test{height:27px;border-radius:14px;background:#fff1ed;color:var(--red);font-size:11px;transition:transform .12s ease}
.order-common-setting{display:grid;grid-template-columns:1.15fr .85fr;gap:0 12px;padding:10px 12px 12px;border-top:1px solid #f3f3f3}
.order-common-setting>label{display:flex;align-items:center;gap:6px;min-width:0;color:#777;font-size:11px;line-height:28px}
.order-common-setting>label:first-child{grid-column:1 / -1}
.order-common-setting input[type=number]{width:74px;height:28px;border:1px solid #e6e6e6;border-radius:6px;outline:0;background:#fafafa;text-align:right;padding:0 7px;color:#333;font-size:12px}
.order-sound-toggle{position:relative}.order-sound-toggle input{position:absolute;opacity:0;pointer-events:none}.order-sound-toggle b{position:relative;width:34px;height:20px;border-radius:10px;background:#d7d7d7;transition:background .18s ease}.order-sound-toggle b::after{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;content:"";box-shadow:0 1px 2px rgba(0,0,0,.16);transition:transform .18s ease}.order-sound-toggle input:checked + b{background:#47b968}.order-sound-toggle input:checked + b::after{transform:translateX(14px)}
.order-volume{grid-column:1 / -1}.order-volume input[type=range]{flex:1;min-width:60px;accent-color:var(--red)}.order-volume output{width:35px;color:#999;text-align:right;font-size:10px}
.order-delta-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:12px 12px 8px;border-top:1px solid #f3f3f3}.order-delta-head strong{color:#333;font-size:14px;font-weight:600}.order-delta-head span{color:#aaa;font-size:10px;line-height:14px;text-align:right}
.order-delta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:0 12px 12px}.order-delta-row{min-width:0;padding:9px 9px 8px;border:1px solid #f0f0f0;border-radius:10px;background:#fcfcfc}.order-delta-name{display:flex;align-items:baseline;justify-content:space-between;gap:5px;margin-bottom:7px}.order-delta-name b{overflow:hidden;color:#444;font-size:12px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.order-delta-name small{flex:none;color:#aaa;font-size:9px;line-height:14px}.order-delta-presets{display:flex;gap:4px}.order-delta-presets button{flex:1;height:27px;border:1px solid #e5e5e5;border-radius:7px;background:#fff;color:#777;font-size:10px;line-height:25px}.order-delta-presets button.active{border-color:#ffd3c8;background:#fff0ec;color:var(--red);font-weight:600}.order-delta-custom{width:100%;height:24px;margin-top:6px;border-radius:6px;background:transparent;color:#8d8d8d;font-size:10px}.order-delta-row.is-custom .order-delta-custom{background:#f4f4f4;color:#555}.order-delta-custom-fields{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:6px}.order-delta-custom-fields label{display:flex;align-items:center;gap:3px;color:#aaa;font-size:9px;white-space:nowrap}.order-delta-row input{width:100%;height:26px;border:1px solid #e6e6e6;border-radius:6px;outline:0;background:#fff;color:#333;font-size:11px;text-align:center}
.order-test-tip{padding:0 16px 18px;color:#aaa;font-size:10px;line-height:16px;text-align:center}
.order-auto-switch-row{display:flex;align-items:center;justify-content:space-between;padding:0 14px 10px;color:#555;font-size:13px}
.order-auto-grid,.order-rate-grid{display:grid;grid-template-columns:1fr;gap:0;padding:0 12px}.order-auto-grid label,.order-rate-grid label{display:grid;grid-template-columns:minmax(0,1fr) 108px 22px;align-items:center;gap:7px;min-height:48px;border-top:1px solid #f3f3f3;color:#888;font-size:12px;white-space:nowrap}.order-auto-grid label span,.order-rate-grid label span{overflow:hidden;text-overflow:ellipsis}.order-auto-grid input,.order-rate-grid input{width:100%;min-width:0;height:32px;border:1px solid #e1e1e1;border-radius:7px;background:#fff;color:#333;font-size:13px;padding:0 8px;text-align:right;outline:0}.order-auto-grid i,.order-rate-grid i{color:#aaa;font-size:10px;font-style:normal}.order-rate-grid label{grid-template-columns:minmax(0,1fr) 108px 22px}.order-rate-grid input{padding-right:8px}
.order-payment-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-top:1px solid #f3f3f3}.order-amount-range{display:flex;align-items:center;gap:6px;color:#777;font-size:11px}.order-amount-range>div{display:flex;align-items:center;gap:4px}.order-amount-range input{width:58px;height:28px;border:1px solid #e1e1e1;border-radius:6px;background:#fff;color:#333;font-size:12px;text-align:center;outline:0}.order-amount-range em{color:#aaa;font-size:10px;font-style:normal}.order-amount-range i{color:#aaa;font-size:10px;font-style:normal}.order-sound-toggle{display:flex;align-items:center;gap:6px;position:static;color:#777;font-size:11px;white-space:nowrap}.order-sound-toggle label{position:relative;display:block;width:34px;height:20px}.order-sound-toggle input{position:absolute;opacity:0;pointer-events:none}.order-sound-toggle b{position:absolute;inset:0;border-radius:10px;background:#d7d7d7;transition:background .18s ease}.order-sound-toggle b::after{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;content:"";box-shadow:0 1px 2px rgba(0,0,0,.16);transition:transform .18s ease}.order-sound-toggle input:checked + b{background:#47b968}.order-sound-toggle input:checked + b::after{transform:translateX(14px)}
.order-settings-card>div.order-volume{display:flex;align-items:center;gap:8px;padding:0 12px 10px;color:#777;font-size:11px}.order-settings-card>div.order-volume input[type=range]{flex:1;min-width:60px;accent-color:var(--red)}.order-settings-card>div.order-volume output{width:35px;color:#999;text-align:right;font-size:10px}.order-sound-tests{display:flex;align-items:center;gap:6px;padding:0 12px 12px;color:#777;font-size:11px}.order-sound-tests>span{margin-right:auto}.order-sound-tests .order-sound-test{height:28px;padding:0 8px;border-radius:14px;background:#fff1ed;color:var(--red);font-size:10px;white-space:nowrap}
.traffic-card{overflow:hidden}.traffic-row{display:grid;grid-template-columns:minmax(128px,1fr) repeat(3,minmax(72px,92px));align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border-top:1px solid #f3f3f3}.traffic-name{display:flex;align-items:center;gap:8px;min-width:0}.traffic-switch{position:relative;display:block;width:28px;height:20px;flex:none}.traffic-switch input{position:absolute;opacity:0;pointer-events:none}.traffic-switch b{position:absolute;inset:0;border-radius:10px;background:#cfcfcf;transition:background .18s ease}.traffic-switch b::after{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;content:"";box-shadow:0 1px 2px rgba(0,0,0,.12);transition:transform .18s ease}.traffic-switch input:checked + b{background:#20ad70}.traffic-switch input:checked + b::after{transform:translateX(8px)}.traffic-name strong{overflow:hidden;color:#555;font-size:13px;font-weight:500;line-height:17px;text-overflow:ellipsis;white-space:nowrap}.traffic-row label:not(.traffic-switch){position:relative;display:flex;flex-direction:column;gap:4px;min-width:0;color:#999;font-size:9px;white-space:nowrap}.traffic-row input{width:100%;max-width:92px;height:32px;box-sizing:border-box;border:1px solid #dedede;border-radius:7px;background:#fff;color:#333;font-size:13px;padding:0 7px;text-align:center;outline:0}.traffic-row label i{position:absolute;right:6px;bottom:9px;margin:0;color:#aaa;font-size:9px;font-style:normal;pointer-events:none}.traffic-row label:first-of-type input{padding-right:20px}
@media (max-width:360px){.order-auto-grid,.order-rate-grid{padding-left:10px;padding-right:10px}.order-auto-grid label,.order-rate-grid label{grid-template-columns:minmax(0,1fr) 92px 20px;gap:5px}.order-auto-grid input,.order-rate-grid input{font-size:12px}.traffic-row{grid-template-columns:minmax(104px,1fr) repeat(3,minmax(64px,88px));gap:5px;padding-left:9px;padding-right:9px}.traffic-name{gap:6px}.traffic-name strong{font-size:12px}.traffic-row input{max-width:88px}.order-amount-range input{width:51px}}

/* ===== 弹层 ===== */
.overlay{position:absolute;inset:0;background:rgba(0,0,0,.22);z-index:50;opacity:0;pointer-events:none;transition:opacity .18s ease}
.overlay.open{opacity:1;pointer-events:auto}
.search-panel{background:#fff;padding:12px 12px 18px;transform:translateY(-100%);transition:transform .22s ease;padding-top:max(12px,env(safe-area-inset-top))}
.overlay.open .search-panel{transform:translateY(0)}
.search-input-wrap{display:flex;align-items:center;gap:8px}
.search-mini{font-size:24px;color:#999;line-height:1}
.search-input-wrap input{flex:1;border:0;outline:0;background:#f2f2f2;border-radius:18px;height:35px;padding:0 14px;font-size:14px}
.search-input-wrap button{color:#555;font-size:14px}
.search-empty{height:80px;display:flex;align-items:center;justify-content:center;color:#aaa;font-size:13px}

.scan-overlay{background:rgba(0,0,0,.74)}
.scan-backdrop-close{position:absolute;inset:0;width:100%;height:100%}
.scan-panel{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:230px;height:270px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff}
.scan-frame{width:190px;height:190px;position:relative}
.scan-frame i{position:absolute;width:32px;height:32px;border-color:#fff;border-style:solid}
.scan-frame i:nth-child(1){left:0;top:0;border-width:3px 0 0 3px}
.scan-frame i:nth-child(2){right:0;top:0;border-width:3px 3px 0 0}
.scan-frame i:nth-child(3){left:0;bottom:0;border-width:0 0 3px 3px}
.scan-frame i:nth-child(4){right:0;bottom:0;border-width:0 3px 3px 0}
.scan-caption{margin-top:22px;font-size:15px}

.name-sheet{position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:14px 14px 0 0;padding:18px 16px calc(18px + env(safe-area-inset-bottom));transform:translateY(105%);transition:transform .24s ease}
.overlay.open .name-sheet{transform:translateY(0)}
.sheet-title{font-size:16px;font-weight:600;text-align:center;margin-bottom:14px;color:#292929}
.sheet-input{width:100%;height:42px;border:0;outline:0;background:#f2f2f2;border-radius:10px;padding:0 14px;font-size:14px}
.sheet-actions{display:flex;gap:10px;margin-top:14px}
.sheet-btn{flex:1;height:42px;border-radius:10px;background:#f2f2f2;color:#333;font-size:15px}
.sheet-btn.primary{background:var(--red);color:#fff}

/* 添加账号：头像上传入口与店铺名称同属一个轻量底部弹层 */
.account-sheet{padding-top:16px}
.account-avatar-picker{display:flex;align-items:center;justify-content:center;gap:10px;height:62px;margin-bottom:12px;border:1px dashed #d7d7d7;border-radius:10px;background:#fafafa;color:#666;font-size:14px}
.account-avatar-picker img{width:44px;height:44px;border-radius:7px;object-fit:cover;background:#f2f2f2}
.account-avatar-picker:active{background:#f2f2f2}

/* 切换成功提示：不使用整页遮罩，模拟正版的居中信息卡。 */
.account-switch-notice{position:fixed;top:43%;left:50%;z-index:2200;width:228px;padding:17px 13px 15px;border-radius:12px;background:#fff;box-shadow:0 10px 25px rgba(0,0,0,.18);opacity:0;transform:translate(-50%,-44%) scale(.94);transition:opacity .24s ease,transform .34s cubic-bezier(.16,.82,.2,1)}
.account-switch-notice.open{opacity:1;transform:translate(-50%,-50%) scale(1)}
.account-switch-title{display:flex;align-items:center;justify-content:center;gap:7px;color:#555;font-size:16px;line-height:25px}
.account-switch-title i{display:flex;width:20px;height:20px;align-items:center;justify-content:center;border-radius:50%;background:#37b921;color:#fff;font-size:14px;font-style:normal;font-weight:700}
.account-switch-target{display:flex;align-items:center;min-height:53px;margin-top:12px;padding:8px 10px;border-radius:6px;background:#f7f7f7}
.account-switch-target img{width:35px;height:35px;flex:none;border-radius:5px;object-fit:cover}
.account-switch-target strong{overflow:hidden;margin-left:10px;color:#3d3d3d;font-size:16px;font-weight:400;text-overflow:ellipsis;white-space:nowrap}

@media (prefers-reduced-motion:reduce){.merchant-backdrop,.merchant-dropdown,.account-switch-notice{transition:none}.merchant-dropdown.is-open .merchant-store{animation:none}}

/* 聊天角标弹层 */
.badge-tip{font-size:12px;color:#999;text-align:center;margin:-6px 0 12px;line-height:17px}
.badge-opts{display:flex;gap:10px;margin-bottom:12px}
.badge-opt{flex:1;height:40px;border-radius:10px;background:#f2f2f2;color:#333;font-size:15px}
.badge-opt.active{background:#fdeceb;color:var(--red);font-weight:600}

.toast{position:absolute;left:50%;bottom:calc(74px + var(--safe-bottom));transform:translate(-50%,10px);background:rgba(0,0,0,.72);color:#fff;border-radius:6px;padding:7px 11px;font-size:12px;opacity:0;pointer-events:none;z-index:60;transition:opacity .18s ease,transform .18s ease;white-space:nowrap}
.toast.show{opacity:1;transform:translate(-50%,0)}

/* ===== 正式版：启动页与授权码入口 ===== */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.license-gate{position:fixed;inset:0;z-index:5500;display:flex;align-items:stretch;justify-content:center;overflow:hidden;background:linear-gradient(180deg,#fff1f2 0,#fff 47%,#fff 100%);color:#222}
.production.license-locked .app,.production.license-locked .bottom-nav,.auth-preview.license-locked .app,.auth-preview.license-locked .bottom-nav{visibility:hidden!important;pointer-events:none!important}
html.production .test-only{display:none!important}
html.production .nav-item[data-tab="订单"]{display:none!important}
html.production .bottom-nav .nav-item[data-tab="首页"]{--nav-left:0%;--nav-width:25%}
html.production .bottom-nav .nav-item[data-tab="聊天"]{--nav-left:25%;--nav-width:25%}
html.production .bottom-nav .nav-item[data-tab="成长"]{--nav-left:50%;--nav-width:25%}
html.production .bottom-nav .nav-item[data-tab="我的"]{--nav-left:75%;--nav-width:25%}
.license-welcome{width:100%;height:100%;min-height:0;box-sizing:border-box;padding:calc(18px + env(safe-area-inset-top)) 28px calc(18px + env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center;text-align:center;overflow:hidden}
.license-kicker{margin-top:2px;padding:6px 15px;border-radius:18px;background:#e84b3d;color:#fff;font-size:15px;font-weight:700;letter-spacing:.2px}
.license-welcome h1{margin:clamp(30px,5.9vh,50px) 0 7px;color:#ff4c52;font-size:clamp(32px,5.2vh,40px);line-height:1.16;font-weight:800;letter-spacing:1px;flex:none}
.license-welcome-subtitle{margin:0;color:#707070;font-size:24px;line-height:1.4;font-weight:300}
.license-welcome-visual{width:min(355px,86vw);height:clamp(180px,25vh,230px);margin-top:clamp(10px,1.6vh,16px);display:flex;align-items:center;justify-content:center;flex:none;overflow:hidden}
.license-slide-image{display:block;width:100%;height:100%;object-fit:contain;opacity:1;transform:scale(1);transition:opacity .22s ease,transform .22s ease}
.license-slide-image.is-changing{opacity:.15;transform:scale(.98)}
.license-dots{height:14px;display:flex;align-items:center;justify-content:center;gap:10px;margin-top:2px}.license-dots button{width:9px;height:9px;padding:0;border:0;border-radius:50%;background:#d8d8d8}.license-dots button.active{width:25px;border-radius:7px;background:#4d67f8}
.license-open,.license-alt-login{width:100%;height:clamp(50px,6.8vh,56px);border-radius:9px;font-size:clamp(17px,2.5vh,20px);flex:none}.license-open{margin-top:clamp(14px,2.2vh,18px);background:#4d67f8;color:#fff;box-shadow:0 6px 13px rgba(77,103,248,.16)}.license-alt-login{margin-top:clamp(12px,1.8vh,15px);border:1.5px solid #5972ff;background:#fff;color:#516bff}
.license-other-login{width:100%;display:flex;align-items:center;gap:16px;margin-top:clamp(14px,2vh,18px);color:#aaa;font-size:clamp(14px,2.1vh,16px);flex:none}.license-other-login:before,.license-other-login:after{content:"";height:1px;flex:1;background:#e2e2e2}.license-login-icons{display:flex;align-items:center;justify-content:center;gap:clamp(40px,7.5vw,66px);margin-top:clamp(12px,1.8vh,16px);flex:none}.license-login-icons button{width:clamp(58px,7.2vh,64px);height:clamp(58px,7.2vh,64px);padding:0;border:0;border-radius:50%;background:transparent;overflow:hidden}.license-login-icons img{display:block;width:100%;height:100%;object-fit:cover}
.license-agreement{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:clamp(12px,2vh,17px);color:#4a4a4a;font-size:clamp(12px,1.9vh,15px);line-height:20px;white-space:nowrap;flex:none}.license-agreement input{width:18px;height:18px;margin:0;accent-color:#4d67f8}.license-agreement a{color:#4d67f8;text-decoration:none}
.license-welcome-foot{margin-top:clamp(6px,1vh,8px);color:#aaa;font-size:clamp(10px,1.5vh,12px);flex:none}
.license-sheet{position:fixed;inset:0;z-index:5600;display:flex;align-items:flex-end;justify-content:center;background:rgba(0,0,0,.34)}
.license-sheet-backdrop{position:absolute;inset:0;width:100%;height:100%;background:transparent}
.license-card{position:relative;width:min(100%,420px);padding:24px 22px calc(22px + env(safe-area-inset-bottom));border-radius:20px 20px 0 0;background:#fff;text-align:center;box-shadow:0 -8px 30px rgba(0,0,0,.12)}
.license-logo{width:54px;height:54px;margin:0 auto 10px;border-radius:13px;object-fit:cover}
.license-card h2{margin:0;color:#292929;font-size:21px;line-height:29px}.license-card p{margin:7px 0 16px;color:#999;font-size:13px}
.license-input-wrap{display:block}.license-input-wrap input{display:block;width:100%;height:48px;border:1px solid #e3e3e3;outline:0;border-radius:10px;background:#f8f8f8;padding:0 14px;color:#292929;font-size:16px;text-align:center;letter-spacing:1px}.license-input-wrap input:focus{border-color:#5575ff;background:#fff;box-shadow:0 0 0 3px rgba(85,117,255,.12)}
.license-submit{width:100%;height:48px;margin-top:14px;border-radius:10px;background:#e6382d;color:#fff;font-size:16px}.license-submit:disabled{opacity:.55}
.license-status{min-height:18px;margin-top:10px;color:#999;font-size:12px;line-height:18px}.license-status.is-error{color:#e6382d}.license-version{margin-top:10px;color:#c1c1c1;font-size:11px}
/* 浏览器访问先显示添加到桌面引导，只有桌面独立窗口才进入登录授权页。 */
html.production.pwa-browser .license-gate{display:none!important}
@media (max-height:760px){.license-welcome h1{margin-top:24px;font-size:34px}.license-welcome-subtitle{font-size:20px}.license-welcome-visual{height:180px;margin-top:10px}.license-open{margin-top:12px}.license-login-icons{gap:40px;margin-top:10px}.license-agreement{margin-top:10px}}


/* ===== V6.6：Safari 安装引导 / standalone 主界面分流 ===== */
.install-guide{display:none;position:fixed;inset:0;z-index:5000;background:linear-gradient(180deg,#fff4f4 0,#fff 44%,#fff 100%);color:#222;overflow:auto;-webkit-overflow-scrolling:touch;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Helvetica Neue",Arial,sans-serif}
html.pwa-browser body{overflow:hidden;background:#fff}
html.pwa-browser .app{display:none!important}
html.pwa-browser .bottom-nav{display:none!important}
html.pwa-browser .install-guide{display:block}
html.pwa-standalone .install-guide{display:none!important}
html.pwa-standalone .app{display:flex}
.guide-safe-top{height:max(18px,env(safe-area-inset-top))}
.guide-main{min-height:calc(100dvh - max(18px,env(safe-area-inset-top)));box-sizing:border-box;padding:8px 26px 34px;display:flex;flex-direction:column;align-items:center}
.guide-kicker{align-self:center;margin-top:2px;padding:6px 14px;border-radius:18px;background:#e84a3c;color:#fff;font-size:15px;font-weight:700;letter-spacing:.2px}
.guide-main h1{margin:78px 0 8px;font-size:39px;line-height:1.12;color:#ff4b4b;font-weight:800;letter-spacing:1px;text-align:center}
.guide-subtitle{margin:0;color:#707070;font-size:24px;line-height:1.4;text-align:center;font-weight:300}
.guide-visual{position:relative;width:min(330px,82vw);height:315px;margin-top:30px;flex:none}
.guide-orbit{position:absolute;border:1px solid rgba(255,91,91,.14);border-radius:50%;left:50%;top:50%;transform:translate(-50%,-50%)}
.orbit-a{width:276px;height:276px}.orbit-b{width:220px;height:220px}
.guide-phone{position:absolute;left:50%;top:43px;transform:translateX(-50%);width:138px;height:234px;border-radius:27px;background:linear-gradient(160deg,#28242a,#070707);box-shadow:0 18px 35px rgba(235,73,73,.14);padding:8px;box-sizing:border-box}
.guide-phone-notch{position:absolute;left:50%;top:8px;transform:translateX(-50%);width:52px;height:10px;border-radius:8px;background:#111;z-index:2}
.guide-phone-screen{height:100%;border-radius:21px;background:linear-gradient(180deg,#e93d32 0 26%,#f5f5f5 26% 100%);padding:55px 9px 10px;box-sizing:border-box;overflow:hidden}
.guide-mini-row{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-bottom:11px}.guide-mini-row span{height:18px;border-radius:5px;background:#fff;opacity:.95}
.guide-mini-card{height:52px;border-radius:9px;background:#fff;margin-bottom:8px;box-shadow:0 1px 5px rgba(0,0,0,.06)}.guide-mini-card.small{height:42px}
.guide-app-icon{position:absolute;right:42px;top:115px;width:100px;height:100px;border-radius:25px;background:#fff;box-shadow:0 14px 32px rgba(239,73,73,.25);padding:5px;box-sizing:border-box;transform:rotate(4deg)}
.guide-app-icon img{display:block;width:100%;height:100%;border-radius:22px;object-fit:cover}
.guide-dots{height:16px;display:flex;align-items:center;justify-content:center;gap:9px;margin-top:0}.guide-dots i{width:8px;height:8px;border-radius:50%;background:#d7d7d7}.guide-dots i.active{width:24px;border-radius:6px;background:#4d67ff}
.guide-primary,.guide-secondary{width:100%;height:58px;border-radius:8px;font-size:20px;font-weight:400;flex:none}
.guide-primary{margin-top:26px;background:#4d67f8;color:#fff}.guide-secondary{margin-top:20px;border:1.5px solid #5972ff;background:#fff;color:#516bff}
.guide-tip{margin:22px 0 0;text-align:center;font-size:13px;line-height:20px;color:#a0a0a0}
.install-sheet{position:fixed;inset:0;z-index:5100;opacity:0;pointer-events:none;transition:opacity .2s ease}.install-sheet.open{opacity:1;pointer-events:auto}.install-sheet-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.34);width:100%;height:100%}
.install-sheet-card{position:absolute;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));background:#fff;border-radius:22px;padding:9px 20px 20px;transform:translateY(115%);transition:transform .25s ease;box-shadow:0 16px 45px rgba(0,0,0,.16)}.install-sheet.open .install-sheet-card{transform:translateY(0)}
.sheet-handle{width:38px;height:5px;border-radius:4px;background:#d8d8d8;margin:0 auto 13px}.install-sheet-card h2{text-align:center;margin:0 0 18px;font-size:20px}
.install-step{display:flex;gap:13px;align-items:flex-start;padding:14px 0;border-bottom:1px solid #f0f0f0}.install-step b{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:#ff8400;color:#fff;font-size:15px;flex:none}.install-step div{display:flex;flex-direction:column;gap:5px}.install-step strong{font-size:16px;line-height:22px}.install-step span{font-size:13px;line-height:19px;color:#888}
.install-sheet-ok{width:100%;height:48px;border-radius:24px;background:#ff7a00;color:#fff;font-size:17px;margin-top:18px}
@media (max-height:760px){.guide-main h1{margin-top:34px;font-size:34px}.guide-subtitle{font-size:20px}.guide-visual{height:260px;transform:scale(.86);transform-origin:top center;margin-bottom:-36px}.guide-primary{margin-top:18px}.guide-tip{margin-top:14px}}

/* ===== V6.5：主屏幕 PWA 强制全面屏几何 ===== */
@media (display-mode:standalone){
  html,body,.app{
    width:100vw!important;
    height:var(--pwa-height,100dvh)!important;
    min-height:var(--pwa-height,100dvh)!important;
    max-width:none!important;
    margin:0!important;
  }
}
html.standalone,
html.standalone body,
html.standalone .app{
  width:100vw!important;
  height:var(--pwa-height,100dvh)!important;
  min-height:var(--pwa-height,100dvh)!important;
  max-width:none!important;
  margin:0!important;
}

@media (max-height:700px){
  .stats-grid{height:108px}
  .apps-grid{height:132px}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}
