* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #0b0b10;
  --card: #17181f;
  --card2: #20222c;
  --line: #2a2c38;
  --text: #f2f2f6;
  --sub: #8e90a2;
  --red: #fe2c55;
  --green: #2fd07a;
  --cyan: #25f4ee;
}

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
}

/* 顶栏 */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11,11,16,.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid #1c1d26;
  padding-top: env(safe-area-inset-top);
}
.bar-in {
  max-width: 640px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.bar-in b { font-size: 18px; letter-spacing: .5px; }
.login { font-size: 14px; color: var(--sub); }
.login.on { color: var(--green); }
.login.off { color: #ffbe3d; }

.page { max-width: 640px; margin: 0 auto; padding: 16px 18px 70px; }

/* 爬评论折叠区 */
.crawl {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 18px;
  overflow: hidden;
}
.crawl summary {
  padding: 16px 18px;
  font-size: 15px;
  color: var(--sub);
  cursor: pointer;
  list-style: none;
}
.crawl summary::-webkit-details-marker { display: none; }
.crawl[open] summary { color: var(--text); border-bottom: 1px solid var(--line); }
.crawl-body { padding: 16px 18px; }

#urls {
  width: 100%; padding: 13px 15px; border-radius: 12px;
  background: var(--card2); border: 1px solid var(--line);
  color: var(--text); font-size: 15px; font-family: inherit; line-height: 1.6;
  outline: none; resize: vertical;
}
#urls::placeholder { color: #5a5c6e; }
#urls:focus { border-color: rgba(254,44,85,.5); }

.go {
  width: 100%; height: 52px; margin-top: 12px;
  border: none; border-radius: 13px;
  background: linear-gradient(135deg, #fe2c55, #ff5f3d);
  color: #fff; font-size: 16.5px; font-weight: 700; font-family: inherit;
  cursor: pointer;
}
.go:active { transform: scale(.99); }
.go:disabled { opacity: .55; }

.crawl-hint { margin-top: 10px; font-size: 14px; color: var(--sub); text-align: center; min-height: 20px; }
.crawl-hint.err { color: #ff8095; }
.crawl-hint.ok { color: var(--green); }

/* 进度条区 */
.progress-line {
  font-size: 14px; color: var(--sub); text-align: center;
  margin-bottom: 16px;
}
.progress-line b { color: var(--text); font-size: 20px; font-weight: 700; }

/* 主舞台 */
#stage { display: flex; flex-direction: column; gap: 14px; }

/* 卡片：一个人 */
.person-card {
  background: linear-gradient(180deg, #1a1b24, #14151c);
  border: 1px solid #2e3040;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}

.pc-who { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pc-avatar {
  width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--card2); display: grid; place-items: center;
  font-size: 18px; color: var(--sub);
}
.pc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pc-name { font-size: 18px; font-weight: 700; }
.pc-meta { font-size: 13px; color: var(--sub); margin-top: 2px; }

.pc-said {
  background: var(--card2);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 19px;
  line-height: 1.5;
  color: #fff;
  position: relative;
  margin-bottom: 18px;
  word-break: break-word;
}
.pc-said::before { content: "他说："; display: block; font-size: 12px; color: var(--sub); margin-bottom: 6px; }
.pc-said.hot { border-left: 3px solid var(--red); }
.pc-said.warm { border-left: 3px solid #ffbe3d; }

.pc-label { font-size: 12.5px; color: var(--sub); margin-bottom: 8px; }

.pc-say {
  background: #101118;
  border: 1px solid #2f3242;
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 16.5px;
  line-height: 1.7;
  color: #e9eaf2;
  margin-bottom: 16px;
  white-space: pre-wrap;
}

.pc-actions { display: flex; gap: 10px; }
.pc-actions button {
  flex: 1; height: 54px; border-radius: 14px;
  font-size: 17px; font-weight: 700; font-family: inherit; cursor: pointer;
  border: none;
}
.btn-copy { background: linear-gradient(135deg, #fe2c55, #ff5f3d); color: #fff; }
.btn-copy:active { transform: scale(.985); }
.btn-skip { background: transparent; border: 1px solid var(--line) !important; color: var(--sub); flex: 0 0 96px !important; }

.pc-reply {
  margin-top: 12px;
  border-top: 1px solid #232532;
  padding-top: 14px;
}
.pc-reply summary {
  font-size: 14px; color: var(--sub); cursor: pointer; list-style: none;
}
.pc-reply summary::-webkit-details-marker { display: none; }
.pc-reply textarea {
  width: 100%; margin-top: 10px; padding: 11px 13px;
  border-radius: 11px; background: var(--card2); border: 1px solid var(--line);
  color: var(--text); font-size: 15px; font-family: inherit; line-height: 1.6;
  outline: none; resize: vertical;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  padding: 8px 14px; border-radius: 20px; font-size: 14px;
  background: var(--card2); border: 1px solid var(--line); color: var(--sub);
  cursor: pointer; font-family: inherit;
}
.chip:active { color: var(--text); }
.chip-save {
  width: 100%; height: 44px; margin-top: 10px; border-radius: 11px;
  background: var(--cyan); color: #04211f; border: none;
  font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer;
}

/* 空状态 */
.blank { text-align: center; padding: 50px 20px; color: var(--sub); }
.blank .ico { font-size: 46px; margin-bottom: 14px; opacity: .65; }
.blank h3 { font-size: 19px; color: #d6d7e2; font-weight: 700; margin-bottom: 10px; }
.blank p { font-size: 15px; line-height: 1.8; }

/* 完成态 */
.done-box {
  text-align: center; padding: 40px 22px;
  background: linear-gradient(180deg, #141a17, #12141a);
  border: 1px solid #1f3a2b; border-radius: 20px;
}
.done-box .ico { font-size: 48px; margin-bottom: 12px; }
.done-box h3 { font-size: 20px; margin-bottom: 8px; }
.done-box p { color: var(--sub); font-size: 15px; line-height: 1.8; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 34px;
  transform: translateX(-50%) translateY(20px);
  background: #262937; color: #fff; font-size: 15px;
  padding: 13px 22px; border-radius: 13px; z-index: 90;
  opacity: 0; pointer-events: none; transition: .2s;
  max-width: 88vw; text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.55);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 700px) {
  .page { padding-top: 26px; }
}
