/* base.css - 变量 / 基础 / 顶栏 */

  :root{
    --green:#07c160; --green-dark:#06ad56; --orange:#ff9800;
    --border:#e5e7eb; --text:#1f2937; --text2:#6b7280;
  }
  *{box-sizing:border-box;margin:0;padding:0;}
  html,body{height:100%;overflow-x:hidden;max-width:100%;}
  body{
    /* 对齐原站字体栈（html: ui-sans-serif...；组件: v-sans, system-ui, ...） */
    font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
    color:var(--text);background:#f5f6f7;display:flex;flex-direction:column;overflow:hidden;width:100%;
  }
  /* 手机版整页可滚动（原站行为），由 canvas.css 覆盖 */
  @media (max-width:768px){
    html,body{height:auto;overflow-x:hidden;overflow-y:visible;}
  }
  /* ===== 顶栏 ===== */
  header{
    height:52px;background:#fff;border-bottom:1px solid var(--border);
    display:flex;align-items:center;padding:0 16px;gap:18px;flex-shrink:0;z-index:10;
  }
  .logo{display:flex;align-items:center;gap:8px;font-size:17px;font-weight:600;}
  .logo .bars{display:flex;gap:2px;align-items:flex-end;}
  .logo .bars i{width:4px;background:var(--green);border-radius:2px;display:block;}
  .logo .bars i:nth-child(1){height:10px}.logo .bars i:nth-child(2){height:16px}.logo .bars i:nth-child(3){height:22px}
  .nav-item{cursor:pointer;color:var(--text);font-size:14px;position:relative;padding:6px 2px;}
  .nav-item.active{color:var(--green);font-weight:600;}
  .nav-item.active::after{content:"";position:absolute;left:0;right:0;bottom:-8px;height:3px;border-radius:3px;background:var(--green);}
  .spacer{flex:1;}
  .top-right{display:flex;align-items:center;gap:18px;font-size:13px;color:var(--text);}
  .badge{display:inline-flex;align-items:center;gap:5px;cursor:pointer;}
  .badge .dot{width:16px;height:16px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:#fff;font-size:10px;}
  /* 原站同款 SVG 图标通用样式 */
  .ico{display:inline-flex;align-items:center;justify-content:center;line-height:0;font-style:normal;}
  .ico svg{display:block}
  .badge .dot .ico svg{width:10px;height:10px}
  .title-edit{display:inline-flex;line-height:0;vertical-align:-3px;margin-left:3px;color:inherit;}  /* 跟随标题颜色 */
  .title-edit svg{width:16px;height:16px}  /* 编辑铅笔加大一个号：14→16 */
  .arr-ico{display:inline-flex;line-height:0;transition:transform .3s;}
  .arr-ico svg{width:13px;height:13px}
  .arr-ico.closed{transform:rotate(-90deg)}
  .ltr{font-style:normal;color:#9aa1ab;display:inline-flex;line-height:0;}
  .wm-num .ltr svg{width:12px;height:12px}
  .drop .ico svg{margin-right:6px;flex-shrink:0}
  .wm-edit svg{width:12px;height:12px}
  .cat-act svg{width:16px;height:16px}
  .btn-login{background:var(--green);color:#fff;border:none;padding:7px 20px;border-radius:6px;font-size:14px;cursor:pointer;}
  .btn-login:hover{background:var(--green-dark);}
  /* 右上角头像图标按钮：不再显示用户名文字 */
  .btn-login.logged.avatar-only{background:transparent;padding:0;border-radius:50%;line-height:0;}
  .btn-login.logged.avatar-only:hover{background:transparent;opacity:.85;}
  .btn-login.logged .login-avatar{width:32px;height:32px;border-radius:50%;object-fit:cover;border:2px solid rgba(255,255,255,.7);box-shadow:0 1px 4px rgba(0,0,0,.2);}
  .btn-login.logged .login-avatar-svg{display:inline-flex;width:32px;height:32px;border-radius:50%;overflow:hidden;box-shadow:0 1px 4px rgba(0,0,0,.2);}
  .btn-login.logged .login-avatar-svg svg{width:100%;height:100%;display:block;}

/* 移动端：输入框字号提到 16px，避免 iOS/安卓聚焦时自动放大页面；用 zoom 保持视觉紧凑 */
@media (max-width:768px){
  input[type=text],input[type=number],textarea,.num-in,.wm-textarea{font-size:16px !important;touch-action:manipulation;}
  .num-in{zoom:.82;}
  .wm-textarea{zoom:.82;}
  /* 小组件文本 / 运营商等文本输入：同样保留 16px 防止 iOS 聚焦自动放大页面，
     再用 zoom 把视觉尺寸缩回桌面版（行高≈28、字号≈13、上下 padding 均匀），
     避免手机版输入框变高、文字偏下、与上下行的间隙不均。 */
  #widgetText,#carrier{zoom:.82;}
}

/* 小程序 web-view 导出保存弹窗（长按图片保存） */
.wx-save-mask{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;background:rgba(0,0,0,.72);align-items:center;justify-content:center;padding:20px;}
.wx-save-box{width:100%;max-width:420px;background:#fff;border-radius:14px;padding:18px;text-align:center;}
.wx-save-title{font-size:16px;font-weight:600;color:#1f2937;}
.wx-save-tip{font-size:12px;color:#9ca3af;margin:6px 0 12px;}
.wx-save-img{display:block;width:100%;max-height:62vh;object-fit:contain;border-radius:8px;background:#f3f4f6;-webkit-touch-callout:default;}
.wx-save-actions{margin-top:14px;}
.wx-save-btn{background:var(--green);color:#fff;border:none;border-radius:8px;padding:9px 28px;font-size:14px;cursor:pointer;}

/* 提示弹窗：对齐原站 ant-message（顶部居中白色圆角卡片 + 状态图标 + 阴影） */
.rc-toast{position:fixed;top:24px;left:50%;transform:translateX(-50%);z-index:4000;
  display:none;align-items:center;gap:10px;max-width:calc(100vw - 40px);
  background:#fff;color:rgba(0,0,0,.88);padding:12px 18px;border-radius:8px;
  box-shadow:0 6px 16px -8px rgba(0,0,0,.16),0 9px 28px 0 rgba(0,0,0,.08);
  font-size:14px;line-height:1.5;word-break:break-word;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue","PingFang SC","Microsoft YaHei",sans-serif;}
.rc-toast-ico{display:inline-flex;width:16px;height:16px;flex-shrink:0;line-height:0;}
.rc-toast-ico svg{width:16px;height:16px;display:block;}
.rc-toast-txt{flex:1;}

/* 个人信息弹窗：复用 stpl-modal 外壳（与其他弹窗同款），内容为头像/昵称/导出次数/会员到期 */
.profile-modal{width:420px;}
.profile-body{padding:8px 0 4px;}
.profile-hero{display:flex;align-items:center;gap:14px;padding:10px 0 16px;border-bottom:1px solid #f0f0f0;}
.profile-avatar{width:56px;height:56px;border-radius:50%;object-fit:cover;flex-shrink:0;border:2px solid #f0f0f0;}
.profile-avatar-svg{width:56px;height:56px;border-radius:50%;overflow:hidden;flex-shrink:0;position:relative;}
.profile-avatar-svg svg{width:100%;height:100%;display:block;}
.profile-avatar-editable{cursor:pointer;}
.profile-avatar-editable::after{content:'✎';position:absolute;right:0;bottom:0;width:18px;height:18px;line-height:18px;text-align:center;background:var(--green);color:#fff;border-radius:50%;font-size:11px;border:2px solid #fff;}
.profile-hero-info{flex:1;min-width:0;}
.profile-name-input{width:100%;font-size:17px;font-weight:600;color:rgba(0,0,0,.88);border:1px solid transparent;background:transparent;border-radius:6px;padding:4px 8px;margin-left:-8px;outline:none;}
.profile-name-input:hover,.profile-name-input:focus{border-color:#d9d9d9;background:#fff;}
.profile-sub{font-size:12px;color:#999;margin-top:4px;}
.profile-id-copy{cursor:pointer;display:inline-block;padding:1px 4px;margin-left:-4px;border-radius:4px;}
.profile-id-copy:hover{background:rgba(7,193,96,.1);color:var(--green);}
.profile-edit-tip{font-size:12px;color:#999;margin-top:10px;}
.profile-cancel{background:#fff;color:#666;border:1px solid #d9d9d9;border-radius:6px;padding:7px 22px;font-size:14px;cursor:pointer;}
.profile-cancel:hover{background:#f5f5f5;}
.profile-edit:disabled{opacity:.6;cursor:not-allowed;}
.profile-list{padding:8px 0 2px;}
.profile-row{display:flex;align-items:center;justify-content:space-between;padding:12px 2px;border-bottom:1px solid #f5f5f5;font-size:14px;}
.profile-row:last-child{border-bottom:none;}
.profile-k{color:#666;}
.profile-v{color:rgba(0,0,0,.88);font-weight:500;display:flex;align-items:center;gap:4px;}
.profile-v.hl{color:var(--green);}
.profile-row-action{cursor:pointer;}
.profile-row-action:active{background:#fafafa;}
.profile-row-arrow{color:#bbb;font-size:16px;line-height:1;margin-left:2px;}
.profile-dev-row{background:#fffbe6;border:1px solid #ffe58f;border-radius:6px;margin-top:6px;padding:10px 12px;}
.dev-member-switch{display:flex;align-items:center;gap:6px;font-size:13px;color:#595959;cursor:pointer;}
.dev-member-switch input[type=checkbox]{width:16px;height:16px;accent-color:#07c160;cursor:pointer;}
.profile-v.warn,.profile-v.warn.hl{color:#ff4d4f;}
.profile-footer{padding-top:16px;display:flex;justify-content:flex-end;gap:10px;}
.profile-edit{background:var(--green);color:#fff;border:none;border-radius:6px;padding:7px 22px;font-size:14px;cursor:pointer;}
.profile-edit:hover{background:var(--green-dark);}
.profile-logout{background:#fff;color:#ff4d4f;border:1px solid #ffccc7;border-radius:6px;padding:7px 22px;font-size:14px;cursor:pointer;}
.profile-logout:hover{background:#fff1f0;}

/* 小程序 web-view 悬浮刷新按钮：可拖拽，位置由 JS 内联 style 决定 */
.wx-mini-toolbar{display:none;position:fixed;left:10px;top:10px;z-index:60;touch-action:none;user-select:none;-webkit-user-select:none;}
.wx-mini-tool{display:flex;flex-direction:column;align-items:center;justify-content:center;width:52px;height:52px;
  background:rgba(255,255,255,.94);color:var(--green);border:1px solid rgba(7,193,96,.35);border-radius:12px;
  font-size:10px;line-height:1.1;cursor:grab;padding:4px 0;box-shadow:0 2px 10px rgba(0,0,0,.14);touch-action:none;}
.wx-mini-ico{font-size:20px;line-height:1;margin-bottom:2px;}
.wx-mini-tool:active{background:rgba(7,193,96,.1);cursor:grabbing;}
body.in-miniprogram .wx-mini-toolbar{display:block;}
@media (max-width:768px){.wx-mini-toolbar{left:8px;top:8px;}.wx-mini-tool{width:46px;height:46px;}}
