/* ==========================================================================
   盘拍云 TempBox · H5 设计系统
   护眼取向：暖纸底 + 低饱和鼠尾草绿主色 + 柔墨绿文字，全线避免纯白/纯黑。
   ========================================================================== */

:root{
  --bg:#F6F4EC;
  --bg-2:#EFEBE0;
  --surface:#FFFFFF;
  --surface-2:#FAF8F2;
  --text:#2B332E;
  --text-2:#58645C;
  --muted:#656F69;
  --line:#E5DFD1;
  --line-2:#D6CFBC;
  --primary:#4E7D69;
  --primary-2:#3D6553;
  --primary-soft:#E8F1EB;
  --accent:#B98246;
  --accent-soft:#FBF1E3;
  --ok:#4F8F6B;
  --ok-soft:#E9F3EC;
  --danger:#B85C50;
  --danger-soft:#F9EAE7;
  --shadow-sm:0 1px 2px rgba(43,51,46,.05);
  --shadow:0 2px 6px rgba(43,51,46,.05), 0 12px 32px rgba(43,51,46,.07);
  --r:18px;
  --topbar:56px;
  --navbar:62px;
}

*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html{-webkit-text-size-adjust:100%}
body{
  background:var(--bg);color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-size:15px;line-height:1.68;-webkit-font-smoothing:antialiased;
  min-height:100vh;
  padding-bottom:calc(var(--navbar) + env(safe-area-inset-bottom));
  overscroll-behavior-y:contain;
}
a{color:var(--primary);text-decoration:none}
button{font-family:inherit}
input,textarea,select{font-family:inherit}

/* ---------- 顶栏 ---------- */
.topbar{
  position:sticky;top:0;z-index:30;height:var(--topbar);
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:0 16px;padding-top:env(safe-area-inset-top);
  background:rgba(246,244,236,.88);backdrop-filter:saturate(1.5) blur(14px);
  border-bottom:1px solid rgba(229,223,209,.75);
}
.brand{display:flex;align-items:center;gap:8px;font-weight:800;font-size:15px;letter-spacing:.2px}
.brand i{width:25px;height:25px;border-radius:8px;background:var(--primary);display:grid;place-items:center;
  color:#fff;font-style:normal;font-size:12px}
.userbox{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--text-2);min-width:0}
.userbox .who{max-width:88px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600;color:var(--text)}
.userbox .badge{background:var(--primary-soft);color:var(--primary-2);border-radius:999px;padding:2px 9px;
  font-size:11.5px;font-weight:700;white-space:nowrap}
.userbox .lnk{color:var(--muted);font-size:12.5px;padding:4px 2px}
.userbox .lnk:hover{color:var(--primary-2)}

/* ---------- 主体 ---------- */
.app{max-width:680px;margin:0 auto;padding:16px 16px 24px;display:flex;flex-direction:column;gap:14px}

.card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:18px;box-shadow:var(--shadow-sm);
}
.card.pad-lg{padding:22px 18px}

h1{font-size:20px;font-weight:800;letter-spacing:-.2px}
h2{font-size:17px;font-weight:780;letter-spacing:-.2px}
h3{font-size:15px;font-weight:750}
.muted{color:var(--muted);font-size:13px}
.center{text-align:center}
.sect-title{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 2px 0}
.sect-title h2{font-size:15.5px;color:var(--text-2);font-weight:700}
.sect-title .count{font-size:12.5px;color:var(--muted)}

/* ---------- 表单 ---------- */
label{display:block;font-size:13px;color:var(--muted);margin:14px 0 6px;font-weight:600}
label:first-child{margin-top:0}
input[type=text],input[type=password],input[type=email],input[type=number],select,textarea{
  width:100%;padding:13px 14px;border:1px solid var(--line);border-radius:12px;
  background:var(--surface-2);color:var(--text);font-size:15px;transition:border-color .16s,background .16s;
}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--primary);background:#fff}
input::placeholder,textarea::placeholder{color:#AAB4AC}
/* textarea 默认带 resize 手柄和粗边框，在手机上很难看，统一成与输入框一致的观感 */
textarea{resize:vertical;line-height:1.65;font-size:14.5px;min-height:96px}
select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2387938B' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center;padding-right:36px}

/* ---------- 按钮 ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  padding:13px 20px;border-radius:13px;font-size:15px;font-weight:700;
  border:1px solid transparent;cursor:pointer;transition:transform .12s,background .18s,box-shadow .18s;
  background:var(--surface-2);color:var(--text);width:100%;
}
.btn:active{transform:translateY(1px)}
.btn.pri{background:var(--primary);color:#fff;box-shadow:0 6px 18px rgba(78,125,105,.2)}
.btn.pri:hover{background:var(--primary-2)}
.btn.ghost{background:transparent;border-color:var(--line-2);color:var(--text-2)}
.btn.ghost:hover{background:var(--surface-2)}
.btn.sm{padding:8px 13px;font-size:13px;width:auto;border-radius:10px}
.btn[disabled]{opacity:.55;pointer-events:none}
.btn-row{display:flex;gap:10px}

/* ---------- 标签页 ---------- */
.tabs{display:flex;gap:6px;background:var(--bg-2);border-radius:13px;padding:4px;margin-bottom:18px}
.tabs button{
  flex:1;border:none;background:transparent;color:var(--text-2);font-size:14px;font-weight:700;
  padding:10px;border-radius:10px;cursor:pointer;transition:background .18s,color .18s;
}
.tabs button.on{background:var(--surface);color:var(--primary-2);box-shadow:var(--shadow-sm)}

/* ---------- 文件网格 ---------- */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:12px}
.tile{
  background:var(--surface);border:1px solid var(--line);border-radius:15px;overflow:hidden;
  display:flex;flex-direction:column;box-shadow:var(--shadow-sm);transition:transform .16s,box-shadow .18s;
}
.tile:active{transform:scale(.99)}
.tile .thumb{aspect-ratio:1;background:var(--bg-2);position:relative;overflow:hidden;display:block}
.tile .thumb img{width:100%;height:100%;object-fit:cover;display:block}
.tile .thumb video{width:100%;height:100%;object-fit:cover;display:block}
.tile .ph{aspect-ratio:1;display:grid;place-items:center;background:var(--surface-2);color:var(--muted);font-size:26px}
.tile .info{padding:9px 10px 10px;display:flex;flex-direction:column;gap:6px}
.tile .nm{font-size:12.5px;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tile .sz{font-size:11.5px;color:var(--muted)}
.tile .acts{display:flex;gap:6px}
.tile .acts button{
  flex:1;font-size:12px;padding:6px 0;border-radius:8px;border:1px solid var(--line);
  background:var(--surface-2);color:var(--text-2);font-weight:600;cursor:pointer;
}
.tile .acts button:hover{background:var(--primary-soft);color:var(--primary-2);border-color:var(--primary-soft)}

.empty{
  grid-column:1/-1;text-align:center;padding:44px 20px;color:var(--muted);font-size:13.5px;
  border:1px dashed var(--line-2);border-radius:16px;background:var(--surface-2);
}
.empty .ic{font-size:30px;display:block;margin-bottom:10px;opacity:.65}

/* ---------- 上传进度 ---------- */
.up-list{display:flex;flex-direction:column;gap:9px;margin-top:14px}
.up{background:var(--surface-2);border:1px solid var(--line);border-radius:12px;padding:11px 13px}
.up .row{display:flex;justify-content:space-between;gap:10px;font-size:12.5px;color:var(--text-2);margin-bottom:7px}
.up .row .nmx{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600;color:var(--text)}
.up .row .pct{color:var(--muted);flex:none;font-variant-numeric:tabular-nums}
.progress{height:6px;border-radius:99px;background:var(--bg-2);overflow:hidden}
.progress i{display:block;height:100%;width:0;border-radius:99px;
  background:linear-gradient(90deg,var(--primary),#6FA189);transition:width .22s ease}
.up.done .progress i{background:var(--ok)}
.up.err .progress i{background:var(--danger)}

/* ---------- 会员档位 ---------- */
.tier{
  border:1.5px solid var(--line);border-radius:15px;padding:15px;margin-bottom:10px;cursor:pointer;
  transition:border-color .18s,background .18s,box-shadow .18s;background:var(--surface);
}
.tier:hover{border-color:var(--line-2)}
.tier.on{border-color:var(--primary);background:var(--primary-soft);box-shadow:0 4px 16px rgba(78,125,105,.12)}
.tier .top{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.tier .nm{font-size:15px;font-weight:750}
.tier .price{font-size:15px;font-weight:800;color:var(--primary-2);font-variant-numeric:tabular-nums}
.tier .price small{font-size:11.5px;font-weight:600;color:var(--muted)}
.tier .sub{font-size:12.5px;color:var(--muted);margin-top:3px}

/* ---------- 账户信息 ---------- */
.kv{display:flex;justify-content:space-between;gap:14px;padding:11px 0;border-bottom:1px solid var(--line);font-size:14px}
.kv:last-of-type{border-bottom:none}
.kv .k{color:var(--muted)}
.kv .v{font-weight:600;text-align:right;word-break:break-all}

/* ---------- 分享页 ---------- */
.share-head{text-align:center;padding:6px 0 2px}
.share-head .ic{font-size:34px;display:block;margin-bottom:8px}
.share-head h1{font-size:19px}
.share-head p{color:var(--muted);font-size:13px;margin-top:5px}

/* ---------- 底部导航 ---------- */
.navbar{
  position:fixed;left:0;right:0;bottom:0;z-index:30;height:calc(var(--navbar) + env(safe-area-inset-bottom));
  padding-bottom:env(safe-area-inset-bottom);
  display:flex;background:rgba(255,255,255,.94);backdrop-filter:blur(14px);
  border-top:1px solid var(--line);
}
.navbar a{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
  color:var(--muted);font-size:11px;font-weight:600;transition:color .16s;position:relative;
}
.navbar a .ic{font-size:19px;line-height:1}
.navbar a.on{color:var(--primary-2)}
.navbar a.on::before{content:"";position:absolute;top:0;width:26px;height:2.5px;border-radius:0 0 3px 3px;background:var(--primary)}
@media(min-width:720px){
  /* 桌面端把底部导航收成一行胶囊，避免大片留白 */
  .navbar{position:sticky;bottom:auto;height:auto;border-top:none;background:transparent;
    max-width:680px;margin:0 auto;padding:0 16px 20px;gap:8px;backdrop-filter:none}
  .navbar a{flex:none;flex-direction:row;gap:5px;padding:9px 14px;border-radius:11px;font-size:13px}
  .navbar a.on{background:var(--primary-soft)}
  .navbar a.on::before{display:none}
  body{padding-bottom:0}
}

/* ---------- Toast ---------- */
.toast{
  position:fixed;left:50%;bottom:calc(var(--navbar) + 22px + env(safe-area-inset-bottom));
  transform:translate(-50%,14px);z-index:60;max-width:min(86vw,420px);
  background:#2B332E;color:#F6F4EC;padding:12px 18px;border-radius:13px;font-size:13.5px;
  box-shadow:0 10px 30px rgba(20,26,22,.28);opacity:0;pointer-events:none;
  transition:opacity .22s,transform .22s;text-align:center;line-height:1.55;
}
.toast.show{opacity:1;transform:translate(-50%,0)}
.toast.err{background:#8E463C}

/* ---------- 页脚提示 ---------- */
.hint-foot{text-align:center;font-size:11.5px;color:var(--muted);padding:8px 0 4px;line-height:1.7}
.hint-foot a{color:var(--text-2);text-decoration:underline;text-underline-offset:2px}

/* ---------- 内联 SVG 图标 ---------- */
.ni{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;flex:none;vertical-align:-3px}
.brand .ni{width:15px;height:15px;stroke:#fff;stroke-width:2}
.navbar a .ni{width:20px;height:20px}
.empty .ic .ni{width:34px;height:34px;stroke-width:1.5}
.tile .ph .ni{width:30px;height:30px;stroke-width:1.5}
.btn .ni{width:16px;height:16px}
.share-head .ic .ni{width:34px;height:34px;stroke-width:1.5}

/* ==========================================================================
   会员 / 分享 / 弹层（v0.3 新增）：到期时间、可购状态、二维码
   ========================================================================== */

/* ---- 会员状态卡 ---- */
.mem-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.mem-tier{font-size:19px;font-weight:820;letter-spacing:-.3px}
.mem-days{text-align:right;line-height:1.1;flex:none}
.mem-days b{font-size:26px;font-weight:850;color:var(--primary-2);font-variant-numeric:tabular-nums}
.mem-days span{display:block;font-size:11.5px;color:var(--muted);margin-top:2px}
.mem-days.off b{color:var(--muted);font-size:18px}
.mem-meta{display:flex;justify-content:space-between;gap:12px;font-size:13px;color:var(--muted);
  padding:9px 0;border-top:1px dashed var(--line);margin-top:12px}
.mem-meta:first-of-type{margin-top:14px}
.mem-meta b{color:var(--text);font-weight:650;font-variant-numeric:tabular-nums}
.mem-tip{font-size:12px;color:var(--muted);line-height:1.6;background:var(--surface-2);
  border-radius:10px;padding:9px 11px;margin-top:12px}

/* ---- 套餐卡 ---- */
.plan{display:flex;align-items:center;justify-content:space-between;gap:12px;
  border:1.5px solid var(--line);border-radius:14px;padding:14px;margin-bottom:10px;background:var(--surface);
  transition:border-color .16s,background .16s}
.plan:last-of-type{margin-bottom:0}
.plan-cur{border-color:var(--primary);background:var(--primary-soft)}
.plan-off{opacity:.72;background:var(--surface-2)}
.plan-l{min-width:0;flex:1}
.plan-nm{font-size:15px;font-weight:750;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.plan-sub{font-size:12.5px;color:var(--muted);margin-top:2px}
.plan-exp{font-size:11.5px;color:var(--primary-2);margin-top:5px}
.plan-off-why{font-size:11.5px;color:var(--danger);margin-top:5px;line-height:1.5}
.plan-r{text-align:right;flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:7px}
.plan-price{font-size:19px;font-weight:850;letter-spacing:-.4px;font-variant-numeric:tabular-nums;color:var(--text)}
.plan-price small{font-size:11.5px;color:var(--muted);font-weight:600;margin-left:2px;letter-spacing:0}
.plan-per{font-size:11px;color:var(--ok);font-weight:700;font-variant-numeric:tabular-nums}

.pill-act{font-size:10.5px;font-weight:800;padding:1px 7px;border-radius:999px;letter-spacing:.2px}
.pill-act.new{background:var(--primary-soft);color:var(--primary-2)}
.pill-act.renew{background:var(--ok-soft);color:#3C7355}
.pill-act.up{background:var(--accent-soft);color:#8C5F2A}
.pill-cur{font-size:10.5px;font-weight:800;padding:1px 7px;border-radius:999px;
  background:var(--primary);color:#fff}

/* ---- 规则说明 ---- */
.rule-box{margin-top:16px;border-top:1px dashed var(--line);padding-top:12px}
.rule-t{font-size:12px;font-weight:700;color:var(--text-2);margin-bottom:6px}
.rule-box ul{list-style:none;display:flex;flex-direction:column;gap:4px}
.rule-box li{font-size:11.5px;color:var(--muted);line-height:1.65;padding-left:12px;position:relative}
.rule-box li::before{content:"";position:absolute;left:0;top:8px;width:4px;height:4px;border-radius:50%;background:var(--line-2)}
.rule-box b{color:var(--text-2)}

/* ---- 我的分享 ---- */
.share-item{border:1px solid var(--line);border-radius:13px;padding:12px 13px;margin-bottom:10px;background:var(--surface)}
.share-item:last-child{margin-bottom:0}
.si-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.si-name{font-size:14px;font-weight:700}
.si-meta{display:flex;gap:10px;flex-wrap:wrap;font-size:11.5px;color:var(--muted);margin-top:5px}
.si-acts{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
.pill-st{font-size:11px;font-weight:700;padding:1px 8px;border-radius:999px}
.pill-st.ok{background:var(--ok-soft);color:#3C7355}
.pill-st.off{background:var(--bg-2);color:var(--muted)}

/* 分享页有效期标签 */
.share-meta{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-top:12px}
.sm-pill{font-size:11.5px;color:var(--text-2);background:var(--surface-2);border:1px solid var(--line);
  border-radius:999px;padding:3px 10px}
.sm-pill.off{color:var(--danger);background:var(--danger-soft);border-color:#E8CFC9}

/* ---- 底部弹层 ---- */
.sheet{position:fixed;inset:0;z-index:70;display:none;align-items:flex-end;justify-content:center;
  background:rgba(30,38,33,.42);backdrop-filter:blur(2px)}
.sheet.on{display:flex}
.sheet-box{width:100%;max-width:520px;background:var(--surface);border-radius:20px 20px 0 0;
  padding:20px 18px calc(20px + env(safe-area-inset-bottom));animation:sheetUp .22s ease;
  max-height:86vh;overflow-y:auto}
@keyframes sheetUp{from{transform:translateY(16px);opacity:.6}to{transform:none;opacity:1}}
@media(min-width:720px){
  .sheet{align-items:center}
  .sheet-box{border-radius:20px;max-width:420px}
}
.sheet-t{font-size:16.5px;font-weight:800;margin-bottom:10px}

/* 二维码容器：白底足够留白，扫码器才能定位 */
.qr-wrap{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px;
  width:max-content;margin:12px auto 8px;line-height:0}
.qr-wrap img{width:240px;height:240px;display:block;image-rendering:-webkit-optimize-contrast}

.btn.danger{color:var(--danger);border-color:#E4CFCA;background:transparent}
.btn.danger:hover{background:var(--danger-soft)}
.plan-warn{font-size:11px;color:#8C5F2A;background:var(--accent-soft);border-radius:8px;
  padding:5px 8px;margin-top:6px;line-height:1.55}

/* ---- U 盘备份卡 ---- */
.usb-card{background:linear-gradient(180deg,#FBFDFB,var(--surface))}
.usb-card.hot{border-color:var(--primary);box-shadow:0 4px 16px rgba(78,125,105,.12)}
.usb-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.usb-t{font-size:15px;font-weight:750}
.usb-dot{width:9px;height:9px;border-radius:50%;background:var(--line-2);flex:none;margin-top:7px}
.usb-dot.on{background:var(--ok);box-shadow:0 0 0 4px rgba(79,143,107,.16)}
.usb-acts{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.usb-list{margin-top:12px;display:flex;flex-direction:column;gap:8px;max-height:280px;overflow-y:auto}
.usb-hint{font-size:12px;color:var(--muted);margin-top:10px;line-height:1.6}

/* ---------- 会员页 v2：档位 tab / 套餐卡 / 用量条 ---------- */
.mem-card{background:linear-gradient(180deg,#FCFDFB,var(--surface))}
.usage-bar{height:5px;border-radius:99px;background:var(--bg-2);overflow:hidden;margin-top:10px}
.usage-bar i{display:block;height:100%;background:var(--primary);border-radius:99px;transition:width .3s}
.pill-warn{font-size:10.5px;font-weight:800;padding:1px 7px;border-radius:999px;
  background:var(--accent-soft);color:#8C5F2A}
.mem-sched{font-size:11.5px;color:var(--primary-2);background:var(--primary-soft);
  border-radius:9px;padding:7px 10px;margin-top:10px;line-height:1.5}

.tier-tabs{display:flex;gap:6px;margin-bottom:12px;background:var(--bg-2);
  border-radius:12px;padding:4px}
.tier-tab{flex:1;border:none;background:transparent;color:var(--text-2);font:inherit;
  font-size:13px;font-weight:700;padding:8px 6px;border-radius:9px;cursor:pointer;
  position:relative;transition:background .16s,color .16s}
.tier-tab.on{background:var(--surface);color:var(--primary-2);box-shadow:0 1px 4px rgba(40,60,50,.08)}
.tier-tab i{position:absolute;top:-2px;right:2px;font-size:8.5px;font-style:normal;
  background:var(--accent);color:#fff;border-radius:99px;padding:0 4px;line-height:1.5}

.plan{flex-wrap:wrap}
.plan-acts{flex-basis:100%;display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
.plan-acts .btn.sm{flex:1 1 auto;min-width:44%;white-space:nowrap;font-size:12px}
.plan-acts .btn small{opacity:.72;font-weight:600;margin-left:3px}
.plan-badge{font-size:10px;font-weight:800;padding:1px 6px;border-radius:999px;
  background:var(--accent);color:#fff;letter-spacing:.2px}
.plan-origin{font-size:11px;color:var(--muted);font-weight:600;margin-left:5px;
  text-decoration:line-through}
.count.near-full{color:var(--danger);font-weight:750}

/* ==========================================================================
   云盘：面包屑 / 文件夹 / 多选 / 更紧凑的缩略图网格
   ========================================================================== */

/* 面包屑 */
.crumb{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:13px;padding:0 4px}
.crumb a{color:var(--primary-2);text-decoration:none}
.crumb .sep{color:var(--muted-2)}
.crumb .cur{color:var(--text-2);font-weight:600}

/* 文件夹行 */
.folders{display:grid;grid-template-columns:repeat(auto-fill,minmax(152px,1fr));gap:10px}
.folders:empty{display:none}
.fcard{
  position:relative;display:flex;align-items:center;gap:8px;background:var(--surface);
  border:1px solid var(--line);border-radius:12px;padding:12px 30px 12px 12px;cursor:pointer;
  min-height:48px;
}
.fcard:active{transform:scale(.99)}
.fcard .fic{width:22px;height:22px;color:var(--primary);flex:0 0 auto;display:grid;place-items:center}
.fcard .fic .ni{width:20px;height:20px;stroke-width:1.7}
.fcard .fnm{flex:1;font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fcard .fct{font-size:11.5px;color:var(--muted);flex:0 0 auto}
.fcard .fmore{
  position:absolute;top:50%;right:4px;transform:translateY(-50%);
  width:26px;height:26px;border:0;background:transparent;color:var(--muted);
  font-size:17px;line-height:1;cursor:pointer;border-radius:8px;
}
.fcard .fmore:hover{background:var(--bg-2);color:var(--text-2)}
.fcard.sel{border-color:var(--primary);box-shadow:0 0 0 2px var(--primary-soft)}

/* 缩略图更紧凑：同样一屏多放 1–2 列，缩略图本身在服务端已压到 320px 长边 */
.grid{grid-template-columns:repeat(auto-fill,minmax(108px,1fr));gap:9px}
.tile .info{padding:7px 8px 8px;gap:4px}
.tile .nm{font-size:12px}
.tile .sz{font-size:11px}
.tile .acts button{font-size:11px;padding:4px 6px}

/* 多选态 */
.tile.sel{outline:2px solid var(--primary);outline-offset:1px;border-radius:12px}
.tile .thumb .chk{
  position:absolute;top:6px;right:6px;width:20px;height:20px;border-radius:50%;
  border:2px solid rgba(255,255,255,.9);background:rgba(0,0,0,.18);display:none;
}
.tile.sel .thumb .chk{display:block;background:var(--primary)}
.tile.sel .thumb .chk::after{
  content:"";position:absolute;left:5.5px;top:2px;width:5px;height:9px;
  border:2px solid #fff;border-top:0;border-left:0;transform:rotate(42deg);
}

/* 批量操作条：吸附在底部导航上方 */
.selbar{
  position:fixed;left:0;right:0;bottom:calc(64px + env(safe-area-inset-bottom));
  display:none;align-items:center;gap:10px;justify-content:space-between;
  background:var(--surface);border-top:1px solid var(--line);padding:10px 16px;
  box-shadow:0 -6px 20px rgba(0,0,0,.06);z-index:40;
}
.selbar.on{display:flex}
.selbar .n{font-size:13px;font-weight:600;color:var(--text-2)}
.selbar .btn.sm{min-width:80px}
.selbar .btn.danger{background:var(--danger);color:#fff;border-color:var(--danger)}

/* 通用危险按钮 */
.btn.danger{background:var(--danger);color:#fff;border:1px solid var(--danger)}
.btn.danger:hover{background:#a8503f;border-color:#a8503f}

/* 云盘工具栏：主操作独占一行，次操作两列平分，避免四个按钮各占一行把首屏撑满 */
.drive-bar{display:flex;flex-direction:column;gap:8px}
.drive-bar .row-main{display:flex;gap:8px}
.drive-bar .row-main .btn{flex:1}
.drive-bar .row-main .btn.ghost{flex:0 0 84px;padding-left:0;padding-right:0}
.drive-bar .row-sub{display:flex;gap:8px}
.drive-bar .row-sub .btn{flex:1;font-size:13.5px;padding:9px 8px}

/* 自绘对话框（替代 WebView 不可用的原生 prompt/confirm） */
.dlg-mask{position:fixed;inset:0;background:rgba(24,30,27,.42);display:flex;
  align-items:center;justify-content:center;padding:24px;z-index:120;
  animation:dlgFade .14s ease-out}
@keyframes dlgFade{from{opacity:0}to{opacity:1}}
.dlg{background:var(--surface);border-radius:16px;padding:20px;width:100%;max-width:340px;
  box-shadow:0 14px 44px rgba(0,0,0,.2)}
.dlg h3{font-size:16px;margin:0 0 8px;color:var(--text)}
.dlg p{font-size:13px;color:var(--muted);line-height:1.6;margin:0 0 14px}
.dlg input{width:100%;margin:0 0 14px}
.dlg-btns{display:flex;gap:10px}
.dlg-btns .btn{flex:1}
.dlg p{white-space:pre-line}

/* 对话框动作清单（文件夹菜单等） */
.dlg-acts{display:flex;flex-direction:column;gap:8px}
.dlg-acts .btn{width:100%}
/* 批量条三项操作更紧凑 */
.selbar .btn.sm{min-width:58px;padding:7px 8px;font-size:13px}

/* 全屏图片查看器（分享页 / 云盘点图看大图） */
.img-viewer{position:fixed;inset:0;z-index:200;background:#0E1210;
  display:flex;align-items:center;justify-content:center;padding:16px;
  animation:dlgFade .15s ease-out}
.img-viewer img{max-width:100%;max-height:100%;object-fit:contain;border-radius:6px}
.img-viewer .iv-close{position:absolute;top:14px;right:14px;width:38px;height:38px;
  border:0;border-radius:50%;background:rgba(255,255,255,.16);color:#fff;
  font-size:15px;line-height:1;cursor:pointer}
.img-viewer .iv-close:hover{background:rgba(255,255,255,.28)}
.img-viewer .iv-name{position:absolute;left:0;right:0;bottom:max(14px,env(safe-area-inset-bottom));
  text-align:center;color:#E7EDE9;font-size:12.5px;padding:0 24px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* 分享页网格：访客只看照片，格子比云盘大一点，单张时不至于小得看不清 */
.share-grid{grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:11px}
.share-grid .tile .nm{font-size:12.5px}

/* 分享页缩略图：没有下载权限时也给出可点的手感 */
.share-tip{font-size:12.5px;color:var(--muted);text-align:center;margin-top:10px}

/* ==========================================================================
   帮助与反馈（工单）
   ========================================================================== */
.tag-dot{
  display:inline-block;min-width:16px;height:16px;line-height:16px;padding:0 5px;
  margin-left:6px;border-radius:99px;background:var(--danger);color:#fff;
  font-size:10.5px;font-style:normal;text-align:center;vertical-align:middle;
}
.kv .v .tag-dot{margin-left:0}

.tk-item{cursor:pointer;transition:transform .12s ease}
.tk-item:active{transform:scale(.995)}
.tk-item-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.tk-cat{font-size:11.5px;color:var(--primary-2);background:var(--primary-soft);
  padding:2px 8px;border-radius:99px}
.tk-st{font-size:11.5px;padding:2px 8px;border-radius:99px;background:var(--bg-2);color:var(--muted)}
.tk-st.st-open{background:#FBEEE2;color:#9A6335}
.tk-st.st-ok{background:var(--primary-soft);color:var(--primary-2)}
.tk-st.st-off{background:var(--bg-2);color:var(--muted)}
.tk-item-sub{font-size:14.5px;font-weight:600;color:var(--text);margin-bottom:6px;
  display:flex;align-items:center;gap:6px}
.tk-item-last{font-size:12.5px;color:var(--muted);line-height:1.6;
  overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.tk-item-foot{font-size:11.5px;color:var(--muted-2);margin-top:8px}

.tk-detail-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.tk-back{font-size:13.5px;color:var(--primary-2);text-decoration:none}
.tk-detail-sub{font-size:16px;font-weight:600;line-height:1.5;margin-bottom:6px}
.tk-detail-meta{font-size:12px;color:var(--muted)}

.tk-thread{display:flex;flex-direction:column;gap:14px;padding:16px}
.tk-msg{display:flex;flex-direction:column;align-items:flex-start;gap:5px}
.tk-msg.admin{align-items:flex-end}
.tk-meta{font-size:11px;color:var(--muted-2)}
.tk-bubble{
  max-width:82%;padding:10px 13px;border-radius:14px;background:var(--bg-2);
  font-size:14px;line-height:1.62;word-break:break-word;
}
.tk-msg.admin .tk-bubble{background:var(--primary-soft);color:var(--text)}

/* 工单回复框：H5 全局只给 input 设了 width:100%，textarea 会缩成默认列宽 */
.card textarea{width:100%;min-height:82px;resize:vertical;margin-top:4px}

/* 帮助页 FAQ */
.faq{padding:0;overflow:hidden}
.faq summary{
  padding:16px;font-size:14px;font-weight:600;color:var(--text);cursor:pointer;
  list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;
}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"›";color:var(--muted);font-size:18px;transition:transform .18s}
.faq[open] summary::after{transform:rotate(90deg)}
.faq-body{padding:0 16px 16px;display:flex;flex-direction:column;gap:4px}
.faq-q{font-size:13.5px;font-weight:600;color:var(--text);margin-top:10px}
.faq-a{font-size:13px;color:var(--muted);line-height:1.72}
.tk-item.has-new{border-color:var(--primary);box-shadow:0 0 0 1px var(--primary-soft)}
.tk-item-foot b{color:var(--primary-2);font-weight:600}

/* 提交工单表单 */
.form-label{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;
  color:var(--text);margin:16px 0 8px}
.form-label .opt{font-size:11.5px;color:var(--muted-2);font-weight:400}
.form-label .req{font-size:11.5px;color:var(--danger);font-weight:500}
.cat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:8px}
.cat-chip{
  padding:9px 6px;border-radius:10px;border:1px solid var(--line);background:var(--surface);
  color:var(--text-2);font-size:13px;cursor:pointer;transition:all .15s;
}
.cat-chip.on{border-color:var(--primary);background:var(--primary-soft);color:var(--primary-2);font-weight:600}
.cat-chip:active{transform:scale(.98)}
#tkBody{min-height:150px;line-height:1.7}
.form-foot{display:flex;justify-content:space-between;gap:10px;margin-top:6px}
.form-hint{font-size:11.5px;color:var(--muted-2);line-height:1.5}
.form-count{font-size:11.5px;color:var(--muted);flex:0 0 auto;font-variant-numeric:tabular-nums}

/* ==========================================================================
   云盘 v3：单主按钮工具条 / 长按多选 / 移动选择器 / 分享有效期
   ========================================================================== */

/* --- 顶部工具条：一个主操作 + 两个图标按钮 --- */
.drive-card{padding:14px}
.drive-top{display:flex;align-items:center;gap:8px}
.up-main{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;
  height:46px;font-size:14.5px;border-radius:13px}
.up-main .i{display:grid;place-items:center;width:18px;height:18px}
.up-main .ni{width:18px;height:18px;stroke-width:2}
.icon-btn{flex:0 0 46px;width:46px;height:46px;display:grid;place-items:center;
  border:1px solid var(--line);border-radius:13px;background:var(--surface-2);
  color:var(--text-2);cursor:pointer;transition:background .16s,color .16s}
.icon-btn:hover{background:var(--primary-soft);color:var(--primary-2);border-color:var(--primary-soft)}
.icon-btn .ni{width:20px;height:20px;stroke-width:1.8}

/* --- 目录头：面包屑 + 容量 --- */
.drive-head{display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin:16px 2px 10px;min-height:20px}
.drive-head .count{font-size:12px;color:var(--muted);white-space:nowrap;
  font-variant-numeric:tabular-nums}

/* --- 多选：进入选择态后每张卡片都显示勾选圈 --- */
.grid.picking .tile .thumb .chk{display:block}
.grid.picking .tile .acts{display:none}
body.picking .folders .fmore{opacity:.35;pointer-events:none}

/* --- 底部批量操作条 --- */
.selbar{display:none;align-items:center;gap:8px;padding:9px 12px}
.selbar.on{display:flex}
.selbar .n{font-size:12.5px;font-weight:600;color:var(--text-2);white-space:nowrap}
.selbar .n b{color:var(--primary-2);font-size:14px;font-variant-numeric:tabular-nums}
.selbar .grow{flex:1}
.selbar .sel-all{border:0;background:transparent;color:var(--primary-2);font:inherit;
  font-size:12.5px;font-weight:700;padding:6px 2px;cursor:pointer;white-space:nowrap}
.selbar .sel-act{border:1px solid var(--line);background:var(--surface-2);color:var(--text-2);
  font:inherit;font-size:12.5px;font-weight:700;padding:8px 11px;border-radius:10px;
  cursor:pointer;white-space:nowrap;transition:background .16s,color .16s}
.selbar .sel-act:hover{background:var(--primary-soft);color:var(--primary-2);border-color:var(--primary-soft)}
.selbar .sel-act[disabled]{opacity:.4;pointer-events:none}
.selbar .sel-act.danger{color:#fff;background:var(--danger);border-color:var(--danger)}
.selbar .sel-x{border:0;background:transparent;color:var(--muted);font-size:15px;
  width:30px;height:30px;border-radius:50%;cursor:pointer;line-height:1}
.selbar .sel-x:hover{background:var(--bg-2);color:var(--text)}

/* --- 移动选择器 --- */
.mv-crumb{display:flex;flex-wrap:wrap;align-items:center;gap:5px;font-size:12.5px;
  color:var(--muted);margin:2px 0 10px;min-height:18px}
.mv-crumb a{color:var(--primary-2);text-decoration:none}
.mv-crumb .cur{color:var(--text);font-weight:700}
.mv-list{max-height:46vh;overflow-y:auto;display:flex;flex-direction:column;gap:6px;
  border:1px solid var(--line);border-radius:13px;padding:8px;background:var(--surface-2)}
.mv-row{display:flex;align-items:center;gap:9px;padding:11px 12px;border-radius:10px;
  background:var(--surface);border:1px solid var(--line);cursor:pointer}
.mv-row:hover{border-color:var(--primary-soft);background:var(--primary-soft)}
.mv-row.off{opacity:.5;cursor:not-allowed;background:var(--bg-2)}
.mv-row .fic{width:18px;height:18px;color:var(--primary);flex:none;display:grid;place-items:center}
.mv-row .fic .ni{width:18px;height:18px}
.mv-row .fnm{flex:1;font-size:13.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mv-row .arw{color:var(--muted-2);font-size:15px}
.mv-row .tag{font-size:10.5px;color:var(--muted);background:var(--bg-2);border-radius:6px;padding:2px 6px}
.mv-empty{text-align:center;color:var(--muted);font-size:12.5px;padding:22px 10px}

/* --- 分享有效期 --- */
.sheet-sub{font-size:12.5px;color:var(--muted);margin:-4px 0 14px}
.field-l{font-size:12.5px;font-weight:700;color:var(--text-2);margin:14px 0 7px}
.chips{display:flex;flex-wrap:wrap;gap:7px}
.chip{border:1px solid var(--line);background:var(--surface-2);color:var(--text-2);
  font:inherit;font-size:13px;font-weight:600;padding:8px 14px;border-radius:999px;cursor:pointer;
  transition:background .16s,color .16s,border-color .16s}
.chip:hover{border-color:var(--primary-soft);color:var(--primary-2)}
.chip.on{background:var(--primary);border-color:var(--primary);color:#fff}
.sh-count{display:flex;align-items:center;gap:8px;margin-top:10px}
.sh-count input{width:88px;padding:10px 12px;text-align:center;font-variant-numeric:tabular-nums}
.sh-count .unit{font-size:13px;font-weight:700;color:var(--text-2)}
.chk-row{display:flex;align-items:center;gap:9px;margin-top:16px;font-size:13.5px;
  color:var(--text-2);cursor:pointer}
.chk-row input{width:18px;height:18px;accent-color:var(--primary);flex:none}
.err{color:var(--danger);font-size:12.5px;margin-top:10px;min-height:16px;line-height:1.4}

/* --- 永久会员 --- */
.mem-days.life b{font-size:22px;letter-spacing:.5px}
.pill-life{font-size:10.5px;font-weight:800;padding:1px 7px;border-radius:999px;
  background:var(--accent);color:#fff;vertical-align:2px}
.mem-life{border-color:#E2D7B8;background:linear-gradient(180deg,#FFFDF6,var(--surface))}
