/* Pad PWA 样式。iPad Safari 16+：flex / gap / clamp 都可以用。
   字号按「离眼睛 40-60cm 的平板」定，比手机大一档。 */

:root {
  --brand: #e8734a;
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #8a8a8a;
  --line: #ececec;
  --ok: #2e9e5b;
  --warn: #d9822b;
  --err: #cf3d3d;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.view { height: 100%; }
[hidden] { display: none !important; }

/* ---------- 启动 ---------- */

.view#view-boot { display: flex; align-items: center; justify-content: center; }
.boot-box { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.boot { color: var(--muted); font-size: 16px; }

.btn-primary {
  border: 0;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  padding: 12px 26px;
  border-radius: 12px;
  cursor: pointer;
}

/* ---------- 登录 ---------- */

#view-login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

h1 { font-size: 26px; font-weight: 600; letter-spacing: 2px; margin-bottom: 26px; }

.qr-wrap {
  position: relative;
  width: 240px;
  height: 240px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr { width: 240px; height: 240px; display: block; }

.qr-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-size: 14px;
  color: var(--muted);
  background: #fff;
  text-align: center;
}

.countdown {
  margin-top: 10px;
  color: #b0a79e;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.hint {
  margin-top: 22px;
  max-width: 360px;
  font-size: 15px;
  line-height: 1.6;
  color: #6f6660;
}

/* ---------- 列表 ---------- */

#view-list { display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.topbar-title b { font-size: 20px; font-weight: 600; }
.topbar-title span { font-size: 13px; color: var(--muted); }

/* 顶栏昵称：本身是按钮，点了弹编辑框。未设置时显示「编辑昵称」引导。 */
.name-btn {
  flex: none;
  max-width: 46vw;
  padding: 8px 0;
  margin: -8px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.name-btn.is-empty {
  font-size: 15px;
  font-weight: 500;
  color: var(--brand);
}

.topbar-actions { display: flex; align-items: center; gap: 2px; flex: none; }

/* 下拉刷新提示条（iOS PWA 没有原生下拉刷新，只能自己做） */
.pull {
  height: 0;
  overflow: hidden;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 34px;
  background: #f7f5f3;
  transition: height 0.15s ease;
}

.btn-text {
  flex: none;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 14px;
  padding: 10px 4px 10px 12px;
  cursor: pointer;
}

.list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 2px 0 40px;
        user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

/* 日期分组头：随列表吸顶，右侧带份数（对齐小程序时间轴） */
.day {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 16px 20px 8px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: #3d332b;
  letter-spacing: 0.5px;
}

.day-rel {
  padding: 1px 8px;
  border-radius: 999px;
  background: #fbe9e1;
  color: #c4593c;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.day-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  color: #b0a79e;
  letter-spacing: 0;
}

/* 文件卡片：白底 + 细边，圆角比小程序略小（平板一屏能放更多） */
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 14px 10px;
  padding: 14px 16px;
  border: 1px solid #efedea;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(61, 51, 43, 0.04);
  cursor: pointer;
  transition: background 0.12s ease;
}

.row:active { background: #faf8f6; }

/* 类型徽标：按扩展名配色，和微信端一致 */
.tag {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: #f2eae2;
  color: #8a7b6e;
}

.b-pdf   { background: #fbe3dc; color: #d4645c; }
.b-word  { background: #dfebf5; color: #4f7fa6; }
.b-ppt   { background: #fbeedd; color: #d08a3e; }
.b-img   { background: #eee3f4; color: #8e63b0; }
.b-txt   { background: #e4f0e8; color: #5e8f70; }
.b-epub  { background: #f8e2ec; color: #c0678c; }
.b-other { background: #f2eae2; color: #8a7b6e; }

.row-main { flex: 1; min-width: 0; }

.row-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  color: #2b2622;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-meta { margin-top: 5px; font-size: 12.5px; color: #9a938b; }

.row-meta .st-ok   { color: #2e9e5b; }
.row-meta .st-wait { color: #d9822b; }
.row-meta .st-err  { color: #cf3d3d; }

.row-arrow { flex: none; color: #d5d0ca; font-size: 22px; line-height: 1; }

.empty { padding: 60px 20px; text-align: center; color: var(--muted); font-size: 15px; }

/* ---------- 浮层 ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(32px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: 80%;
  padding: 12px 18px;
  background: rgba(20, 20, 20, 0.86);
  color: #fff;
  font-size: 14px;
  border-radius: 12px;
  z-index: 20;
}

/* ---------- 支付浮层 ---------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  /* 顶部对齐 + 卡片 margin:auto：内容比屏幕高时顶部不会被裁掉，还能滚动 */
  align-items: flex-start;
  justify-content: center;
  padding: calc(20px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
  background: rgba(28, 24, 20, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.sheet-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: auto;
  padding: 26px 22px 22px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.sheet-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f5f2ef;
  color: #9a938c;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.sheet-head { display: block; padding-right: 40px; }
.sheet-kicker { font-size: 12px; letter-spacing: 2px; color: var(--brand); }
.sheet-head b { display: block; margin-top: 6px; font-size: 20px; letter-spacing: 0.5px; }

/* 昵称编辑 */
.name-input {
  width: 100%;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fdfcfb;
  font: inherit;
  font-size: 18px;
  color: var(--text);
}

.name-input:focus { outline: none; border-color: var(--brand); background: #fff; }

.name-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.name-actions .btn-text { padding: 10px 14px; }

.pay-slogan {
  margin-top: 10px;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: #5c554e;
}

.pay-hint { margin-top: 6px; font-size: 13px; line-height: 1.6; color: var(--muted); }

.pay-plans { display: flex; gap: 12px; margin: 20px 0 18px; }

.plan {
  position: relative;
  flex: 1;
  padding: 16px 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: #fff;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.plan.on {
  border-color: var(--brand);
  background: #fff7f3;
  box-shadow: 0 6px 18px rgba(232, 115, 74, 0.12);
}

/* 套餐名与天数同一行，整体靠左，价格独占一行 */
.plan-head { display: flex; align-items: baseline; justify-content: flex-start; gap: 8px; }

.plan b { font-size: 15px; font-weight: 600; letter-spacing: 1px; }

.plan-price { margin-top: 6px; font-size: 26px; font-weight: 600; line-height: 1.1; }
.plan-price i { font-style: normal; font-size: 14px; margin-right: 2px; }
.plan.on .plan-price { color: var(--brand); }

.plan-unit { font-size: 12px; color: var(--muted); }

/* 日均价：让「贵不贵」一眼可比，年卡换算下来更低 */
.plan-day { display: block; margin-top: 2px; font-size: 11.5px; color: var(--brand); }

.plan-badge {
  position: absolute;
  top: -9px;
  right: 10px;
  padding: 2px 8px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.pay-qr-block { text-align: center; }

.pay-qr-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
  padding: 10px;
  border-radius: 16px;
  background: #faf8f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pay-qr { width: 180px; height: 180px; display: block; border-radius: 6px; }

.pay-qr-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 16px;
  font-size: 13px;
  color: var(--muted);
  background: #faf8f6;
  text-align: center;
}

.pay-scan { margin-top: 10px; font-size: 12.5px; color: var(--muted); }

.pay-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  min-height: 20px;
  font-size: 13px;
  color: var(--muted);
}

/* 有状态文案时左边点一个呼吸的小圆点，提示「正在等」 */
.pay-status:not(:empty)::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  animation: pay-pulse 1.4s ease-in-out infinite;
}

@keyframes pay-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}


/* ---------- 阅读 ---------- */

#view-read { display: flex; flex-direction: column; }

.read-bar { justify-content: flex-start; gap: 4px; }

.read-title {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  color: #4a4a4a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.read-body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #f3f1ee;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px;
}

/* 图片/PDF 的舞台：脱离文档流铺满可视区，缩放与平移都只作用在这里，
   不会带着顶栏、按钮一起放大。touch-action 关掉浏览器自身的双指缩放。 */
.read-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f3f1ee;
  touch-action: none;
  overscroll-behavior: none;
}

.read-zoom {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  will-change: transform;
}

#read-canvas {
  display: block;
  background: #fff;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
  max-width: 100%;
  max-height: 100%;
}

/* 图片按可视区 contain：整张都在屏内，不裁切、不留大片空白 */
.read-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  margin: 0 auto;
}

.read-text {
  width: 100%;
  max-width: 780px;
  background: #fff;
  border-radius: 10px;
  padding: 30px 24px 90px;
  font-size: 20px;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
}

.read-msg {
  align-self: center;
  margin: 0 auto;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
  line-height: 1.7;
}

/* 额度用完：阅读区换成整块卡片，给出原因和出口，不再只是一行灰字 */
.quota-card {
  width: 100%;
  max-width: 340px;
  margin: auto;
  padding: 26px 22px 20px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.quota-ico {
  width: 52px;
  height: 52px;
  margin: 0 auto;
  border-radius: 50%;
  background: #fff1ea;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quota-card h3 { margin-top: 14px; font-size: 18px; font-weight: 600; letter-spacing: 0.5px; }

.quota-card p { margin-top: 8px; font-size: 13px; line-height: 1.7; color: var(--muted); }

.quota-count {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #faf6f3;
  color: #a0938a;
  font-size: 12px;
}

.quota-btn { width: 100%; margin-top: 16px; }

.quota-skip {
  margin-top: 6px;
  padding: 8px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.read-foot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(253, 252, 251, 0.97);
}

.nav-btn {
  border: 1px solid #e2ded9;
  background: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 15px;
  color: #4a4a4a;
  cursor: pointer;
}

.nav-btn:disabled { opacity: 0.3; }

.read-page {
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- 大屏微调 ---------- */

@media (min-width: 1024px) {
  .row-title { font-size: 18px; }
  .day { padding-left: 24px; padding-right: 24px; }
  .row { margin-left: 18px; margin-right: 18px; }
}

/* ---------- 底栏：首页 / 书架 ---------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  display: flex;
  justify-content: center;
  gap: 64px;
  padding: 8px 20px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 2px 10px;
  border: 0;
  background: none;
  color: #a39a92;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.tab svg { width: 24px; height: 24px; }
.tab.active { color: var(--brand); }

/* 底栏是浮层：列表多留一截，最后一行不会被挡住 */
#view-list .list { padding-bottom: 104px; }

/* ---------- 书架 ---------- */

#view-shelf { display: flex; flex-direction: column; }

/* 文件 / 视频切换：和首页列表一样贴顶，不跟着内容滚 */
.shelf-tabs {
  display: flex;
  gap: 6px;
  margin: 10px 14px 2px;
  padding: 4px;
  border-radius: 12px;
  background: #f4efea;
}

.shelf-tab {
  flex: 1;
  border: 0;
  border-radius: 9px;
  background: none;
  padding: 8px 0;
  font: inherit;
  font-size: 14px;
  color: #8a8179;
  cursor: pointer;
}

.shelf-tab.active {
  background: #fff;
  color: #c4593c;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(61, 51, 43, 0.08);
}

/* 整页一个滚动容器：合集区与文件列表一起滚 */
.shelf-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 104px;
}

/* 合集内页头：返回 + 合集名 + 数量（对齐小程序合集页） */
.col-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 4px;
}

.col-back {
  flex: none;
  border: 0;
  background: none;
  padding: 4px 0;
  color: #c4593c;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.col-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 17px;
  font-weight: 600;
  color: #2b2622;
}

.col-num { flex: none; font-size: 12.5px; color: #b0a79e; }

/* 合集区：默认两行，超出点「更多」 */
.col-sec { padding-top: 12px; }

.col-sec-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 20px 12px;
}

.col-sec-title { font-size: 16px; font-weight: 600; color: #2b2622; }
.col-sec-num { font-size: 12.5px; color: #b0a79e; }

.col-more {
  margin-left: auto;
  border: 0;
  background: none;
  padding: 2px 0;
  color: #c4593c;
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}

.col-grid {
  display: grid;
  gap: 12px;
  padding: 0 14px 16px;
}

.col-card {
  display: flex;
  flex-direction: column;
  /* button 的 UA 样式带 align-items: flex-start（Chromium / 华为浏览器），
     不覆盖的话封面会被压成内容宽度，变成细细一条 */
  align-items: stretch;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.col-card:active .col-cover { transform: scale(0.97); }

/* 合集封面：没有图片时用浅色底 + 书架图标 + 数量 */
.col-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 78px;
  border-radius: 13px;
  background: linear-gradient(150deg, #fdeee5 0%, #f7d9c4 100%);
  color: #c4593c;
  box-shadow: 0 1px 2px rgba(61, 51, 43, 0.05);
  transition: transform 0.12s ease;
}

.col-count { margin-top: 4px; font-size: 12px; font-weight: 600; color: #c4593c; }

.col-title {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.4;
  color: #2b2622;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.col-meta {
  margin-top: 3px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11.5px;
  color: #9a938b;
}

/* 列表在整页滚动容器里，不再自己滚 */
.shelf-list { flex: none; overflow: visible; padding: 0 0 6px; }

/* 视频行：封面 + 时长，没封面就用深色底 + 「B站」 */
.vthumb {
  position: relative;
  flex: none;
  width: 72px;
  height: 50px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, #6d6a75 0%, #3d3a44 100%);
}

.vthumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vthumb-text {
  color: #fff;
  font-size: 11px;
  letter-spacing: 1px;
  opacity: 0.85;
}

.vdur {
  position: absolute;
  right: 3px;
  bottom: 3px;
  padding: 0 5px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 10.5px;
  line-height: 16px;
}

.row-p {
  flex: none;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f6f1eb;
  color: #8b7d6f;
  font-size: 11px;
}

/* ---------- 看视频 ---------- */

#view-watch { display: flex; flex-direction: column; }

.watch-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
  font-weight: 600;
  color: #2b2622;
}

.watch-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px calc(24px + env(safe-area-inset-bottom));
}

.watch-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

.watch-box iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.watch-tip { margin-top: 10px; font-size: 13px; color: #9a938b; }

/* 非会员引导页：书架 tab 始终可见，点进去看到这个 */
.lock-card {
  margin: 30px auto;
  max-width: 560px;
  padding: 34px 28px;
  border: 1px solid #f0e4dc;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(61, 51, 43, 0.06);
  text-align: center;
}

.lock-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: #fbe9e1;
  color: #c4593c;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lock-card h2 { font-size: 21px; margin-bottom: 8px; }
.lock-card p { margin-bottom: 22px; font-size: 14px; line-height: 1.7; color: #8a8179; }
.lock-card .btn-primary { padding: 13px 30px; }

/* ---------- 列表多选 ---------- */

.check {
  display: none;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #d8d1ca;
  background: #fff;
}

.list.selecting .check { display: block; }
.list.selecting .row-arrow { display: none; }
.row.picked { background: #fff6f2; border-color: #f3c9b7; }
.check.on {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: inset 0 0 0 4px #fff;
}

/* 家长模式在文件名下面顺带显示已有标签 */
.row-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.mini-tag {
  padding: 1px 8px;
  border-radius: 999px;
  background: #f6f1eb;
  color: #8b7d6f;
  font-size: 11px;
  line-height: 18px;
}

.select-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 18;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.select-bar b { margin-right: auto; font-size: 14px; }

.select-bar button {
  border: 0;
  border-radius: 11px;
  background: #f4efea;
  color: #5b5149;
  font: inherit;
  font-size: 14px;
  padding: 10px 16px;
  cursor: pointer;
}

.select-bar button.primary { background: var(--brand); color: #fff; }
.select-bar button.danger { background: #fdeceb; color: #c4483f; }

/* ---------- 选择合集 ---------- */

.pick-list {
  max-height: 46vh;
  overflow-y: auto;
  margin: 4px 0 10px;
  border-top: 1px solid var(--line, #eee3dc);
}

.pick-row {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 14px 4px;
  border: 0;
  border-bottom: 1px solid var(--line, #eee3dc);
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pick-row-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.pick-row-num {
  flex: none;
  margin-left: 10px;
  color: var(--faint, #9b918a);
  font-size: 13px;
}

.pick-empty {
  margin: 10px 0;
  color: var(--faint, #9b918a);
  font-size: 14px;
}

.pick-new {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pick-new .name-input { flex: 1; }
.pick-new .btn-primary { flex: none; }

/* ---------- 标签选择 ---------- */

.tag-group { margin: 16px 0 8px; font-size: 13px; color: var(--muted); }
.tag-chips { display: flex; flex-wrap: wrap; gap: 10px; min-height: 8px; }

.tag-chip {
  padding: 8px 16px;
  border: 1px solid #e8e2dc;
  border-radius: 999px;
  background: #fff;
  color: #6f6660;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.tag-chip.on {
  border-color: #f0b9a4;
  background: #fbe9e1;
  color: #c4593c;
  font-weight: 600;
}
