* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f3f4f6; color: #1f2328; font-size: 15px; line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
textarea, input { font: inherit; }
.loading, .empty { padding: 60px 20px; text-align: center; color: #888; }

/* ---------- 首页 ---------- */
.top {
  position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid #e5e7eb;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
}
.top h1 { font-size: 17px; margin: 0; line-height: 1.35; }
.top .sub { color: #6b7280; font-size: 13px; margin-top: 2px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.me { color: #2563eb; }
.versions { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.versions button { padding: 5px 12px; border-radius: 16px; background: #f3f4f6; font-size: 13px; white-space: nowrap; }
.versions button.on { background: #1f2937; color: #fff; }
.tip {
  margin: 12px 12px 0; padding: 12px 14px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px;
  font-size: 14px; color: #1e3a8a;
}
.tip b { color: #1d4ed8; }
.vnote { margin: 10px 12px 0; padding: 10px 14px; background: #fff; border-radius: 10px; font-size: 13px; color: #4b5563; white-space: pre-wrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; padding: 12px; }
.card { background: #fff; border-radius: 10px; overflow: hidden; position: relative; text-align: left; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.card img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #ddd; }
.card .t { padding: 6px 8px 8px; font-size: 13px; line-height: 1.35; }
.badge {
  position: absolute; top: 6px; right: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  font-size: 12px; line-height: 22px; text-align: center; color: #fff; background: #e53935; font-weight: 600;
}
.badge.gray { background: rgba(0,0,0,.55); }
.bottombar {
  position: sticky; bottom: 0; background: #fff; border-top: 1px solid #e5e7eb; display: flex; gap: 10px;
  padding: 10px 12px calc(env(safe-area-inset-bottom) + 10px);
}
.btn { padding: 10px 16px; border-radius: 10px; background: #f3f4f6; font-size: 15px; text-align: center; }
.btn.primary { background: #2563eb; color: #fff; }
.btn.green { background: #16a34a; color: #fff; }
.btn.danger { color: #dc2626; }
.btn.block { flex: 1; }
.btn:disabled { opacity: .5; }
.foot { text-align: center; color: #9ca3af; font-size: 12px; padding: 10px 0 18px; }

/* ---------- 意见列表 ---------- */
.chips { display: flex; gap: 8px; padding: 10px 12px 0; overflow-x: auto; }
.chips button { padding: 5px 12px; border-radius: 16px; background: #fff; font-size: 13px; white-space: nowrap; border: 1px solid #e5e7eb; }
.chips button.on { background: #1f2937; color: #fff; border-color: #1f2937; }
.clist { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.citem { background: #fff; border-radius: 10px; padding: 12px; text-align: left; display: flex; gap: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.citem .thumb { width: 92px; height: 52px; border-radius: 6px; object-fit: cover; flex: none; background: #ddd; }
.citem .body { flex: 1; min-width: 0; }
.citem .meta { font-size: 12px; color: #6b7280; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.citem .txt { font-size: 14px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.st { display: inline-block; padding: 0 7px; border-radius: 9px; font-size: 12px; color: #fff; line-height: 18px; }
.st.open { background: #e53935; } .st.question { background: #f59e0b; } .st.done { background: #16a34a; } .st.closed { background: #9ca3af; }
.no { font-weight: 600; color: #111; }

/* ---------- 看图 ---------- */
.viewer { position: fixed; inset: 0; background: #111; color: #fff; display: flex; flex-direction: column; }
.vhead { display: flex; align-items: center; gap: 6px; padding: calc(env(safe-area-inset-top) + 6px) 8px 6px; background: rgba(0,0,0,.6); z-index: 3; }
.vhead .title { flex: 1; font-size: 14px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vhead .ib { width: 40px; height: 36px; font-size: 20px; border-radius: 8px; }
.vhead .cnt { font-size: 12px; color: #aaa; padding-right: 4px; }
.wrap { flex: 1; position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.stage img { display: block; pointer-events: none; -webkit-touch-callout: none; user-select: none; -webkit-user-drag: none; }
.stage svg { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.hint {
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%); background: rgba(37,99,235,.92);
  padding: 6px 12px; border-radius: 16px; font-size: 13px; white-space: nowrap; pointer-events: none; z-index: 2; max-width: 92%;
  overflow: hidden; text-overflow: ellipsis;
}
.hint.dark { background: rgba(0,0,0,.65); }
.toast {
  position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); background: rgba(0,0,0,.82); color: #fff;
  padding: 8px 14px; border-radius: 8px; font-size: 14px; z-index: 50; pointer-events: none; max-width: 86%; text-align: center;
}
.navbtn { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 56px; background: rgba(0,0,0,.35); color: #fff; font-size: 22px; z-index: 2; }
.navbtn.prev { left: 0; border-radius: 0 8px 8px 0; } .navbtn.next { right: 0; border-radius: 8px 0 0 8px; }
.tools { display: flex; gap: 6px; padding: 8px 8px calc(env(safe-area-inset-bottom) + 8px); background: #1b1b1b; z-index: 3; }
.tools button { flex: 1; padding: 9px 4px; border-radius: 10px; background: #2a2a2a; color: #ddd; font-size: 14px; }
.tools button.on { background: #2563eb; color: #fff; }
.tools button.go { background: #16a34a; color: #fff; }

/* ---------- 底部弹层 ---------- */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 20; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; background: #fff; color: #1f2328;
  border-radius: 14px 14px 0 0; max-height: 78vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px 14px calc(env(safe-area-inset-bottom) + 12px); box-shadow: 0 -4px 20px rgba(0,0,0,.2);
}
@media (min-width: 760px) { .sheet { left: auto; right: 16px; bottom: 16px; width: 420px; border-radius: 14px; max-height: 86vh; } }
.sheet h3 { margin: 0 0 8px; font-size: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sheet .x { margin-left: auto; font-size: 22px; line-height: 1; color: #9ca3af; padding: 0 4px; }
.field { margin-bottom: 10px; }
.field label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.field input, .field textarea {
  width: 100%; border: 1px solid #d1d5db; border-radius: 8px; padding: 8px 10px; font-size: 16px; background: #fff; color: #111;
}
.field textarea { min-height: 88px; resize: vertical; }
.photos { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.photos .ph { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: #eee; position: relative; }
.photos .phw { position: relative; }
.photos .del { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 10px; background: #111; color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.photos .add { width: 64px; height: 64px; border-radius: 8px; border: 1px dashed #9ca3af; color: #6b7280; font-size: 12px; display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.3; }
.row { display: flex; gap: 10px; }
.ctext { white-space: pre-wrap; font-size: 15px; margin: 6px 0 8px; }
.target { font-size: 13px; color: #374151; background: #f3f4f6; border-radius: 6px; padding: 4px 8px; display: inline-block; margin-bottom: 4px; }
.replies { border-top: 1px solid #eee; margin-top: 8px; padding-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.rep { font-size: 14px; padding: 8px 10px; border-radius: 8px; background: #f9fafb; }
.rep.team { background: #ecfdf5; border: 1px solid #a7f3d0; }
.rep .who { font-size: 12px; color: #6b7280; margin-bottom: 2px; }
.rep .t { white-space: pre-wrap; }
.small { font-size: 12px; color: #6b7280; }

/* ---------- 大图 / 弹窗 ---------- */
.lightbox { position: fixed; inset: 0; background: #000; z-index: 40; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 100%; max-height: 100%; }
.modal { position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal .box { background: #fff; color: #111; border-radius: 12px; padding: 18px; width: 100%; max-width: 360px; }
.modal h4 { margin: 0 0 6px; font-size: 16px; }
.modal p { margin: 0 0 12px; color: #6b7280; font-size: 13px; }
.vnote summary { color: #2563eb; cursor: pointer; }

/* ---------- 平台版新增 ---------- */
.login { max-width: 360px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 70px) 24px 40px; }
.login h1 { font-size: 22px; margin: 0 0 4px; }
.login .sub { color: #6b7280; font-size: 13px; margin-bottom: 26px; }
.login .btn { width: 100%; margin-top: 6px; }
.login .err { color: #dc2626; font-size: 13px; min-height: 20px; }
.menu { margin-left: auto; color: #2563eb; font-size: 14px; }
.plist { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.pcard { background: #fff; border-radius: 12px; overflow: hidden; display: flex; text-align: left; box-shadow: 0 1px 2px rgba(0,0,0,.06); position: relative; }
.pcard img, .pcard .noimg { width: 120px; min-height: 84px; object-fit: cover; flex: none; background: #e5e7eb; }
.pcard .body { padding: 10px 12px; min-width: 0; flex: 1; }
.pcard .name { font-weight: 600; font-size: 15px; line-height: 1.35; }
.pcard .dot { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 5px; background: #e53935; }
.counts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.card .play { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 1px 7px; border-radius: 9px; }
.card img.vert { object-fit: contain; background: #111; }
.vbar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #1b1b1b; z-index: 3; }
.vbar .pp { width: 38px; height: 32px; border-radius: 8px; background: #2a2a2a; color: #fff; font-size: 16px; }
.vbar .tm { font-size: 12px; color: #ccc; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vbar .sp { font-size: 12px; color: #ccc; padding: 4px 6px; border-radius: 6px; background: #2a2a2a; }
.track { flex: 1; height: 30px; position: relative; touch-action: none; cursor: pointer; }
.track .rail { position: absolute; left: 0; right: 0; top: 13px; height: 4px; background: #444; border-radius: 2px; }
.track .fill { position: absolute; left: 0; top: 13px; height: 4px; background: #2563eb; border-radius: 2px; }
.track .knob { position: absolute; top: 8px; width: 14px; height: 14px; margin-left: -7px; border-radius: 7px; background: #fff; }
.track .mk { position: absolute; top: 4px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; }
.tchip { display: inline-block; background: #111; color: #fff; border-radius: 6px; padding: 1px 7px; font-size: 12px; font-variant-numeric: tabular-nums; }
.teambox { margin-top: 12px; padding: 10px; border-radius: 10px; background: #f0f9ff; border: 1px solid #bae6fd; }
.teambox .row { flex-wrap: wrap; }
.teambox .btn { padding: 8px 10px; font-size: 14px; }
.btn.orange { background: #f59e0b; color: #fff; }
.section-t { padding: 14px 14px 0; font-size: 13px; color: #6b7280; }
