:root {
  --bg: #fafaf7;
  --ink: #0a0a0a;
  --dim: #888;
  --line: #e8e6df;
  --surface: #f0ede5;
  --accent: #d63a2f;
  --hl: #ffe94d;
  --ai: #1a1a1a;
  --tsinghua: #660874;   /* 清华紫 */
  --beida: #9b1e26;      /* 北大红 */
  --display: 'Archivo Black', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --hand: 'Caveat', cursive;
}
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html, body { height: 100%; }
body {
  background: #e0dbd2;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 20px 60px;
  font-family: 'Noto Sans SC', sans-serif;
  color: var(--ink);
}
.preview-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 4px;
  color: #999; text-transform: uppercase; margin-bottom: 20px;
}

/* Phone shell */
#shell {
  width: 390px; height: 844px; background: var(--bg);
  border-radius: 52px; overflow: hidden; position: relative;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 40px 80px rgba(0,0,0,0.35);
  display: flex; flex-direction: column; flex-shrink: 0;
}
#shell::before {
  content: ''; position: absolute; top: 0; left: 50%;
  transform: translateX(-50%); width: 110px; height: 32px;
  background: #111; border-radius: 0 0 20px 20px; z-index: 100;
}

#sbar {
  height: 44px; background: var(--ink);
  display: flex; align-items: flex-end; padding: 0 28px 8px;
  justify-content: space-between; flex-shrink: 0; z-index: 10;
}
#sbar .t { font-family: var(--mono); font-size: 12px; font-weight: 700; color: white; letter-spacing: -0.5px; }
#sbar .r { font-family: var(--mono); font-size: 10px; color: rgba(255,255,255,0.7); }

/* Header */
#hdr {
  flex-shrink: 0; padding: 18px 22px 12px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg); border-bottom: 1px solid var(--line);
  position: relative; z-index: 5;
}
.hdr-brand {
  display: flex; flex-direction: column; gap: 4px;
}
.hdr-sup { font-family: 'Noto Serif SC', serif; font-size: 10px; font-weight: 400; letter-spacing: 1px; color: #777; }
.hdr-title { font-family: var(--display); font-size: 18px; font-weight: 900; letter-spacing: -0.3px; }
.hdr-title .bt { color: var(--tsinghua); font-size: 1.14em; }
.hdr-title .bp { color: var(--beida); font-size: 1.14em; }
.hdr-title .dot { color: var(--beida); }
.hdr-title .hdr-zh {
  font-family: 'Noto Serif SC', serif; font-weight: 900;
  font-size: 0.85em; letter-spacing: 1px; color: var(--ink);
  margin-left: 2px;
}
.hdr-actions { display: flex; gap: 10px; align-items: center; }
.hdr-icon {
  width: 34px; height: 34px; border: 1px solid var(--line); background: white;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 14px; cursor: pointer; transition: all .18s;
}
.hdr-icon:active { transform: scale(0.94); }
.hdr-avatar {
  width: 34px; height: 34px; background: var(--ink); color: white;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 12px; cursor: pointer;
}

/* Thread */
#thread {
  flex: 1; overflow-y: auto; padding: 20px 22px 200px;
  scroll-behavior: smooth; position: relative;
}
#thread::-webkit-scrollbar { display: none; }

/* Hero / first-open */
.hero {
  margin-bottom: 28px; animation: fade .5s ease both;
}
.hero-greet {
  font-family: 'Noto Serif SC', serif; font-size: 26px; font-weight: 900;
  line-height: 1.2; letter-spacing: 0.5px;
}
.hero-greet .accent { color: var(--accent); font-style: italic; font-family: 'Noto Serif SC', serif; }
.hero-sub {
  font-family: var(--mono); font-size: 10px; letter-spacing: 3px;
  color: var(--dim); margin-top: 8px; text-transform: uppercase;
}

/* Briefing card · risograph zine / 双层错位 / 反色 banner / 旋转贴纸
 * 立体: 双阴影 (黄+墨, 6/6 + 12/12) + 2px 边框
 * 冲击: 顶部 ink banner 反色 (黑底黄期号红涌) 突破卡片左右边
 * 年轻: 大号 italic serif 红色数字 (30px) + 微纸纹点
 * 创意: 右上 №22 旋转贴纸 (黄底 ink 字, rotate -6deg) */
.briefing {
  margin-top: 26px;
  margin-right: 20px; /* 留出更深的阴影空间 */
  margin-bottom: 12px;
  background: #f5efe0;
  background-image: radial-gradient(rgba(10,10,10,0.07) 1px, transparent 1.2px);
  background-size: 6px 6px;
  color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 0;
  padding: 0 18px 22px;
  position: relative;
  box-shadow:
    8px 8px 0 0 var(--hl),
    16px 16px 0 0 var(--ink);
}
/* 左下 NEW 红贴纸 · 右上 №22 黄贴纸 形成 collage */
.briefing::after {
  content: 'NEW · 涌';
  position: absolute;
  bottom: -14px; left: 22px;
  background: var(--accent);
  color: var(--hl);
  border: 2px solid var(--ink);
  padding: 4px 10px;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px;
  transform: rotate(3deg);
  box-shadow: 2px 2px 0 0 var(--ink);
  z-index: 3;
}
/* Masthead · 黑底反色 banner, 突出到卡片边外 */
.briefing-masthead {
  display: flex; align-items: center; gap: 8px;
  margin: 0 -18px 16px;
  padding: 9px 14px;
  background: var(--ink);
  border-bottom: 2px solid var(--ink);
}
.briefing-issue {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: var(--hl); letter-spacing: 0.5px;
}
.briefing-divider {
  width: 1px; height: 10px; background: rgba(255,255,255,0.3);
}
.briefing-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: 2.5px;
  color: rgba(255,255,255,0.7); text-transform: uppercase;
  flex: 1;
}
.briefing-mark {
  font-family: 'Noto Serif SC', serif; font-size: 14px; font-weight: 700;
  color: var(--accent); letter-spacing: 1px;
}
/* 右上旋转贴纸 */
.briefing::before {
  content: '№ 22';
  position: absolute;
  top: -12px; right: -10px;
  background: var(--hl);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 4px 9px;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.5px;
  transform: rotate(-6deg);
  z-index: 3;
  box-shadow: 2px 2px 0 0 var(--ink);
}
.briefing-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 24px; font-weight: 900; line-height: 1.3;
  margin-bottom: 22px; letter-spacing: -0.5px;
  color: var(--ink);
}
.briefing-item {
  display: flex; gap: 14px; margin-bottom: 22px;
  font-size: 13.5px; line-height: 1.7; color: var(--ink);
  position: relative;
}
.briefing-item:last-child { margin-bottom: 0; }
.briefing-marker {
  display: flex; flex-direction: column; align-items: flex-start;
  width: 50px; flex-shrink: 0;
  padding-top: 0;
}
.briefing-index {
  font-family: 'Noto Serif SC', serif;
  font-size: 44px; font-style: italic; font-weight: 900;
  color: var(--accent); letter-spacing: -2px;
  line-height: 0.95; margin-bottom: 6px;
  text-shadow: 2px 2px 0 var(--hl);
}
.briefing-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  margin-left: 4px;
  border: 1.5px solid var(--ink);
}
.briefing-dot.yellow { background: var(--hl); }
.briefing-dot.blue { background: #5db3ff; }
.briefing-dot.red { background: var(--accent); }
.briefing-chips {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px;
}
.briefing-chip {
  background: #f5efe0;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-size: 10.5px; font-family: var(--mono); font-weight: 700;
  letter-spacing: 0.5px; line-height: 1.3;
  padding: 5px 10px; border-radius: 0;
  text-transform: uppercase;
  cursor: pointer; transition: background .12s, color .12s, transform .08s;
  box-shadow: 2px 2px 0 0 var(--ink);
}
.briefing-chip:hover {
  background: var(--hl);
  color: var(--ink);
}
.briefing-chip:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 0 var(--ink);
}

/* Message blocks */
.block {
  margin-bottom: 22px; animation: slideUp .4s ease both;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.b-user {
  display: flex; justify-content: flex-end; margin-bottom: 10px;
}
.b-user-bubble {
  max-width: 82%; background: var(--ink); color: white;
  padding: 10px 14px; border-radius: 18px 18px 4px 18px;
  font-size: 13.5px; line-height: 1.5;
}

.b-ai-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.b-ai-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--ink) 0%, #333 100%);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 10px;
}
.b-ai-name { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--dim); text-transform: uppercase; }
.b-ai-status { font-family: var(--mono); font-size: 9px; color: var(--accent); letter-spacing: 1px; }
.b-ai-status .dot {
  display: inline-block; width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent); margin-right: 4px; animation: blink 1s infinite;
}
@keyframes blink { 50% { opacity: 0.2; } }

.b-ai-text {
  font-size: 14px; line-height: 1.65; color: var(--ink);
  padding-left: 30px; margin-bottom: 10px;
}
.b-ai-text .cursor {
  display: inline-block; width: 7px; height: 14px; background: var(--ink);
  vertical-align: -2px; margin-left: 2px; animation: cursor .9s infinite;
}
@keyframes cursor { 50% { opacity: 0; } }

.b-rich { padding-left: 30px; margin-top: 8px; }

/* Member card — AI-generated, one per result */
.mcard {
  background: white; border: 1px solid var(--line); border-radius: 4px;
  padding: 16px; margin-bottom: 10px; position: relative; overflow: hidden;
  cursor: pointer; transition: all .18s;
}
.mcard:active { transform: scale(0.98); }
.mcard::before {
  content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
  background: var(--accent);
}
.mcard-head {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px;
}
.mcard-ava {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--ink); color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Noto Serif SC', serif; font-size: 18px; font-weight: 700;
  border-radius: 2px;
}
.mcard-ava.v1 { background: linear-gradient(135deg, #d63a2f, #8a1a10); }
.mcard-ava.v2 { background: linear-gradient(135deg, #1a1a1a, #444); }
.mcard-ava.v3 { background: linear-gradient(135deg, #2d5a8f, #142f4c); }
.mcard-ava.v4 { background: linear-gradient(135deg, #6a4a2a, #3a2614); }
.mcard-name { font-family: 'Noto Serif SC', serif; font-size: 16px; font-weight: 700; }
.mcard-meta { font-size: 11px; color: var(--dim); margin-top: 2px; font-family: var(--mono); letter-spacing: 0.5px; }
.mcard-score {
  position: absolute; top: 14px; right: 14px;
  font-family: var(--display); font-size: 20px; color: var(--accent); line-height: 1;
}
.mcard-score-sub { font-family: var(--mono); font-size: 8px; color: var(--dim); letter-spacing: 2px; text-align: right; margin-top: 2px; }
.mcard-reason {
  font-family: 'Noto Serif SC', serif; font-size: 13px; line-height: 1.7;
  font-style: italic; color: #333; padding: 10px 0;
  border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line);
  margin-bottom: 10px; position: relative;
}
.mcard-reason::before {
  content: '"'; font-family: Georgia, serif; font-size: 36px; color: var(--accent);
  position: absolute; left: -4px; top: -4px; line-height: 1; opacity: 0.4;
}
.mcard-reason-text { padding-left: 16px; }
.mcard-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mcard-btn {
  padding: 7px 12px; font-size: 11px; border: 1px solid var(--ink);
  background: transparent; cursor: pointer; font-family: 'Noto Sans SC';
  letter-spacing: 1px; transition: all .15s; border-radius: 2px;
}
.mcard-btn.primary { background: var(--ink); color: white; }
.mcard-btn:active { transform: scale(0.95); }

/* Meetup card in thread */
.ucard {
  background: white; border: 1px solid var(--line); border-radius: 4px;
  padding: 14px; margin-bottom: 10px; position: relative;
}
.ucard.dark { background: var(--ink); color: white; }
.ucard-tag {
  font-family: var(--mono); font-size: 9px; letter-spacing: 2px;
  color: var(--accent); margin-bottom: 8px; text-transform: uppercase;
}
.ucard.dark .ucard-tag { color: var(--hl); }
.ucard-title { font-family: 'Noto Serif SC', serif; font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.ucard-meta { font-size: 12px; color: var(--dim); line-height: 1.6; margin-bottom: 10px; }
.ucard.dark .ucard-meta { color: rgba(255,255,255,0.65); }
.ucard-row { display: flex; justify-content: space-between; align-items: center; }
.ucard-seats { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; }
.ucard.dark .ucard-seats { color: rgba(255,255,255,0.6); }

/* Draft / composer card */
.draft {
  background: #fffbea; border: 1px solid #f0d65e; border-radius: 4px;
  padding: 14px; margin-bottom: 10px;
}
.draft-label { font-family: var(--mono); font-size: 9px; letter-spacing: 2px; color: #8a6a0e; margin-bottom: 8px; text-transform: uppercase; }
.draft-text { font-family: var(--hand); font-size: 17px; line-height: 1.5; color: #2a1e00; margin-bottom: 12px; white-space: pre-wrap; }
.draft-actions { display: flex; gap: 8px; }

/* Trait dialogue card */
.trait-card {
  background: linear-gradient(135deg, #0a0a0a 0%, #2a1614 100%);
  color: white; border-radius: 4px; padding: 18px; margin-bottom: 10px;
  position: relative; overflow: hidden;
}
.trait-card::before {
  content: '✦'; position: absolute; top: -10px; right: -6px;
  font-size: 60px; color: var(--accent); opacity: 0.35;
}
.trait-label { font-family: var(--mono); font-size: 9px; letter-spacing: 3px; color: var(--hl); margin-bottom: 10px; }
.trait-q { font-family: 'Noto Serif SC', serif; font-size: 15px; line-height: 1.55; margin-bottom: 12px; }
.trait-options { display: flex; flex-direction: column; gap: 6px; }
.trait-opt {
  padding: 10px 12px; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 2px;
  font-size: 12.5px; cursor: pointer; transition: all .15s;
}
.trait-opt:hover { background: rgba(255,255,255,0.15); }
.trait-opt:active { transform: scale(0.97); }
.trait-progress {
  font-family: var(--mono); font-size: 9px; color: rgba(255,255,255,0.4);
  letter-spacing: 2px; margin-top: 10px;
}

/* Portrait result */
.portrait {
  background: var(--ink); color: white; padding: 20px;
  border-radius: 4px; margin-bottom: 10px; position: relative; overflow: hidden;
}
.portrait-label { font-family: var(--mono); font-size: 9px; letter-spacing: 3px; color: var(--hl); margin-bottom: 8px; }
.portrait-type { font-family: var(--display); font-size: 28px; color: white; margin-bottom: 4px; }
.portrait-type .x { color: var(--accent); }
.portrait-desc { font-size: 13px; line-height: 1.6; color: rgba(255,255,255,0.78); margin-bottom: 14px; }
.portrait-bars { display: flex; flex-direction: column; gap: 8px; }
.portrait-bar-row { display: flex; align-items: center; gap: 10px; font-size: 11px; }
.portrait-bar-label { width: 70px; font-family: var(--mono); letter-spacing: 1px; color: rgba(255,255,255,0.6); }
.portrait-bar-track { flex: 1; height: 4px; background: rgba(255,255,255,0.1); position: relative; }
.portrait-bar-fill { height: 100%; background: var(--accent); animation: fill 1s ease both; }
@keyframes fill { from { width: 0 !important; } }
.portrait-bar-val { width: 28px; text-align: right; font-family: var(--mono); color: var(--hl); }

/* Follow-up chips (shown after each AI block) */
.followup {
  padding-left: 30px; margin-top: 10px; margin-bottom: 4px;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.fup-chip {
  padding: 6px 10px; font-size: 11px; border: 1px dashed var(--line);
  background: transparent; cursor: pointer; color: var(--dim);
  font-family: 'Noto Sans SC'; transition: all .15s; border-radius: 14px;
}
.fup-chip:hover { border-color: var(--ink); color: var(--ink); }
.fup-chip::before { content: '↳ '; color: var(--accent); }

/* Suggestions strip above command bar */
#suggs {
  position: absolute; bottom: 92px; left: 0; right: 0;
  padding: 0 22px; display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none;
  background: linear-gradient(to top, var(--bg) 60%, transparent);
  padding-top: 20px; padding-bottom: 8px; z-index: 6;
}
#suggs::-webkit-scrollbar { display: none; }
.sugg {
  flex-shrink: 0; padding: 8px 12px; background: white;
  border: 1px solid var(--line); border-radius: 20px;
  font-size: 11.5px; cursor: pointer; color: var(--ink);
  display: flex; align-items: center; gap: 6px;
  transition: all .15s;
}
.sugg:active { transform: scale(0.96); background: var(--ink); color: white; }
.sugg-emoji { font-size: 13px; }

/* Command bar */
#cmdbar {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 12px 18px 22px; background: var(--bg);
  border-top: 1px solid var(--line); z-index: 7;
  display: flex; align-items: center; gap: 8px;
}
.cmd-btn-voice, .cmd-btn-send {
  width: 38px; height: 38px; flex-shrink: 0;
  border: none; background: var(--ink); color: white; cursor: pointer;
  border-radius: 50%; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.cmd-btn-send { background: var(--accent); }
.cmd-btn-voice { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.cmd-btn-voice:active, .cmd-btn-send:active { transform: scale(0.9); }
#cmd-input {
  flex: 1; border: 1px solid var(--line); background: white;
  padding: 10px 14px; border-radius: 20px; font-size: 13.5px;
  font-family: 'Noto Sans SC'; outline: none;
  transition: border .15s;
}
#cmd-input:focus { border-color: var(--ink); }

/* Thinking indicator */
.thinking {
  padding-left: 30px; display: flex; gap: 6px; align-items: center;
  font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: 2px;
  margin-bottom: 14px;
}
.thinking-dots { display: flex; gap: 3px; }
.thinking-dots span {
  width: 5px; height: 5px; background: var(--ink); border-radius: 50%;
  animation: thk 1.2s infinite;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.15s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes thk {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Inbox button red dot */
.hdr-inbox { position: relative; }
.hdr-dot {
  position: absolute; top: 4px; right: 4px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 2px var(--bg);
}

/* Inbox panel */
#inbox {
  position: absolute; inset: 0; background: var(--bg);
  z-index: 22; transform: translateX(100%); transition: transform .3s;
  overflow-y: auto; padding: 24px 22px 40px;
}
#inbox.open { transform: translateX(0); }
.ib-head { display:flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.ib-title { font-family: 'Noto Serif SC', serif; font-size: 20px; font-weight: 900; }
.ib-close { font-family: var(--mono); font-size: 11px; color: var(--dim); cursor: pointer; }
.ib-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.ib-tab {
  flex: 1; text-align: center; padding: 10px 0; cursor: pointer;
  font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--dim);
  border-bottom: 2px solid transparent; text-transform: uppercase;
}
.ib-tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.ib-tab .cnt { color: var(--accent); font-weight: 700; margin-left: 4px; }
.ib-empty { padding: 40px 20px; text-align: center; color: var(--dim); font-size: 12.5px; line-height: 1.7; }
.ib-item {
  background: white; border: 1px solid var(--line); padding: 14px;
  margin-bottom: 10px; border-radius: 3px; position: relative;
  cursor: pointer; transition: border-color .15s;
}
.ib-item:hover { border-color: var(--ink); }
.ib-item.unread { border-left: 3px solid var(--accent); }
.ib-item-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ib-ava {
  width: 36px; height: 36px; border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Noto Serif SC', serif; font-size: 15px; color: white; font-weight: 700;
}
.ib-meta { flex: 1; }
.ib-name { font-size: 13.5px; font-weight: 700; }
.ib-sub { font-family: var(--mono); font-size: 9px; letter-spacing: 1px; color: var(--dim); margin-top: 2px; }
.ib-badge {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 1.2px; padding: 3px 7px;
  border-radius: 10px; font-weight: 700;
}
.ib-badge.sent    { background:#eef4fb; color:#2a5f8f; }
.ib-badge.accept  { background:#e8f7ec; color:#2a9d4a; }
.ib-badge.pending { background:#fff6d9; color:#8a6a0e; }
.ib-badge.decline { background:#f3e6e6; color:#8a1a10; }
.ib-badge.new     { background:#fceceb; color:var(--beida); }
.ib-body { font-size: 12.5px; color: #333; line-height: 1.55; font-family: 'Noto Serif SC', serif; }
.ib-time { font-family: var(--mono); font-size: 9px; color: var(--dim); letter-spacing: 1px; margin-top: 8px; }
.ib-acts { display: flex; gap: 6px; margin-top: 10px; }
.ib-acts button {
  font-family: 'Noto Sans SC'; font-size: 11px; padding: 6px 12px; border-radius: 2px;
  border: 1px solid var(--line); background: white; cursor: pointer;
}
.ib-acts .primary { background: var(--ink); color: white; border-color: var(--ink); }
.ib-acts .accept { background: #16a34a; color: white; border-color: #16a34a; }

/* History panel */
#history {
  position: absolute; inset: 0; background: var(--bg);
  z-index: 20; transform: translateX(100%); transition: transform .3s;
  overflow-y: auto; padding: 24px 22px 40px;
}
#history.open { transform: translateX(0); }
.hist-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}
.hist-title { font-family: 'Noto Serif SC', serif; font-size: 20px; font-weight: 900; }
.hist-close { font-family: var(--mono); font-size: 11px; color: var(--dim); cursor: pointer; }
.hist-sec { font-family: var(--mono); font-size: 9px; letter-spacing: 3px; color: var(--dim); margin: 18px 0 10px; text-transform: uppercase; }
.hist-item {
  background: white; border: 1px solid var(--line); padding: 12px 14px;
  margin-bottom: 8px; border-radius: 3px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.hist-q { font-size: 13px; color: var(--ink); flex: 1; }
.hist-time { font-family: var(--mono); font-size: 9px; color: var(--dim); letter-spacing: 1px; }

/* Detail sheet */
#detail {
  position: absolute; inset: 0; background: var(--bg);
  z-index: 30; transform: translateY(100%); transition: transform .35s cubic-bezier(.2,.9,.3,1);
  overflow-y: auto;
}
#detail.open { transform: translateY(0); }
.det-head { position: sticky; top: 0; background: var(--bg); padding: 16px 22px; border-bottom: 1px solid var(--line); z-index: 2; display: flex; justify-content: space-between; align-items: center; }
.det-close { font-family: var(--mono); font-size: 11px; cursor: pointer; color: var(--dim); }
.det-body { padding: 20px 22px 40px; }
.det-ava-lg {
  width: 72px; height: 72px; background: var(--ink); color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Noto Serif SC', serif; font-size: 30px; font-weight: 700;
  margin-bottom: 14px; border-radius: 2px;
}
.det-name { font-family: 'Noto Serif SC', serif; font-size: 22px; font-weight: 900; }
.det-meta { font-family: var(--mono); font-size: 11px; color: var(--dim); margin-top: 4px; letter-spacing: 0.5px; }
.det-sec { margin-top: 22px; }
.det-sec-label { font-family: var(--mono); font-size: 9px; letter-spacing: 3px; color: var(--dim); margin-bottom: 8px; text-transform: uppercase; }
.det-bio { font-family: 'Noto Serif SC', serif; font-size: 13.5px; line-height: 1.75; color: #222; }
.det-opener {
  background: #fffbea; border: 1px solid #f0d65e; padding: 14px;
  font-family: var(--hand); font-size: 18px; line-height: 1.5; color: #2a1e00;
  white-space: pre-wrap; border-radius: 3px;
}
.det-cta {
  margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.det-cta button {
  padding: 12px; border: 1px solid var(--ink); background: transparent;
  cursor: pointer; font-family: 'Noto Sans SC'; font-size: 12px; letter-spacing: 1px;
  border-radius: 2px;
}
.det-cta button.primary { background: var(--ink); color: white; }

/* Toast */
#toast {
  position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: white; padding: 10px 16px; border-radius: 4px;
  font-size: 12px; opacity: 0; transition: all .3s; z-index: 50; pointer-events: none;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Scroll fade */
.scroll-fade-top {
  position: absolute; top: 0; left: 0; right: 0; height: 20px;
  background: linear-gradient(to bottom, var(--bg), transparent);
  pointer-events: none; z-index: 4;
}

/* ============ LANDING · clean / light ============ */
#landing {
  position: absolute; inset: 0; background: var(--bg); color: var(--ink);
  z-index: 90; overflow-y: auto; overflow-x: hidden;
  font-family: 'Noto Sans SC', sans-serif;
}
#landing.hide { display: none; }
#landing::-webkit-scrollbar { display: none; }

/* Top micro-bar */
.lx-top {
  padding: 16px 24px 0; display: flex; justify-content: space-between;
  align-items: center;
  font-family: var(--mono); font-size: 9px; letter-spacing: 2.5px;
  color: var(--dim); text-transform: uppercase;
}
.lx-top .live {
  display: flex; align-items: center; gap: 6px; color: #0a0a0a;
}
.lx-top .live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #2a9d4a;
  animation: pulseLite 1.8s infinite;
}
@keyframes pulseLite {
  0%, 100% { box-shadow: 0 0 0 0 rgba(42,157,74,0.45); }
  50%      { box-shadow: 0 0 0 5px rgba(42,157,74,0); }
}

/* Hero */
.lx-hero {
  padding: 40px 24px 28px;
}
.lx-sup {
  font-family: 'Noto Serif SC', serif; font-size: 13px; font-weight: 400;
  letter-spacing: 1px; color: #777; margin-bottom: 8px;
}
.lx-brand {
  font-family: var(--display); font-size: 52px; line-height: 0.95;
  letter-spacing: -2.5px; margin-bottom: 4px; color: var(--ink);
}
.lx-brand .bt { color: var(--tsinghua); font-size: 1.14em; }
.lx-brand .bp { color: var(--beida); font-size: 1.14em; }
.lx-brand-row {
  display: flex; align-items: baseline; gap: 14px; margin-top: 8px;
  padding-top: 10px; border-top: 1px solid var(--line);
}
.lx-brand-zh {
  font-family: 'Noto Serif SC', serif; font-size: 22px; font-weight: 900;
  letter-spacing: 4px;
}
.lx-brand-zh .dot { color: var(--beida); }
.lx-brand-badge {
  font-family: var(--mono); font-size: 9px; letter-spacing: 2px;
  color: var(--dim); text-transform: uppercase; margin-left: auto;
}
.lx-tag {
  margin-top: 24px;
  font-family: 'Noto Serif SC', serif; font-size: 19px; line-height: 1.55;
  color: var(--ink); font-weight: 500;
}
.lx-tag .k { color: var(--beida); font-weight: 700; }
.lx-tag .u {
  background: linear-gradient(to top, #ffe94d 45%, transparent 45%);
  padding: 0 2px;
}
.lx-tag-sub {
  margin-top: 8px; font-size: 12.5px; color: var(--dim); line-height: 1.6;
  font-family: 'Noto Sans SC';
}

/* Stats — thin inline row */
.lx-stats {
  margin: 26px 24px 6px; padding: 18px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.lx-stat {
  flex: 1; text-align: center; padding: 0 4px;
  border-right: 1px solid var(--line);
}
.lx-stat:last-child { border-right: none; }
.lx-stat-num {
  font-family: var(--display); font-size: 26px; line-height: 1; color: var(--ink);
  letter-spacing: -1px;
}
.lx-stat-num .u {
  font-size: 11px; color: var(--dim); margin-left: 2px;
  font-family: 'Noto Sans SC'; font-weight: 700;
}
.lx-stat-num .bt { color: var(--tsinghua); }
.lx-stat-num .bp { color: var(--beida); }
.lx-stat-lbl {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.8px;
  color: var(--dim); margin-top: 5px; text-transform: uppercase;
}

/* Section */
.lx-sec {
  padding: 22px 24px 6px;
}
.lx-sec-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: 2.5px;
  color: var(--dim); margin-bottom: 14px; text-transform: uppercase;
  display: flex; align-items: center; justify-content: space-between;
}
.lx-sec-label .num { color: var(--beida); font-weight: 700; margin-right: 6px; }
.lx-sec-label .right { color: var(--dim); letter-spacing: 1.5px; }

/* Peek cards · clean white */
.lx-peek-card {
  background: white; border: 1px solid var(--line);
  padding: 14px 16px; margin-bottom: 8px; border-radius: 3px;
  animation: peekIn .4s ease both;
  transition: transform .15s, border-color .15s;
}
.lx-peek-card:hover { border-color: var(--ink); }
@keyframes peekIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.lx-peek-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.lx-peek-time {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.2px;
  color: var(--dim);
}
.lx-peek-kind {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 1.5px;
  padding: 3px 7px; border-radius: 10px; font-weight: 700;
}
.lx-peek-kind.bottle { background: #eef4fb; color: #2a5f8f; }
.lx-peek-kind.meet   { background: #fff6d9; color: #8a6a0e; }
.lx-peek-kind.match  { background: #fceceb; color: var(--beida); }
.lx-peek-kind.bounty { background: #f3eaf6; color: var(--tsinghua); }
.lx-peek-text {
  font-size: 13px; line-height: 1.6; color: #2a2a2a;
}
.lx-peek-text .masked {
  display: inline-block; background: #f2efe7;
  color: #555; padding: 1px 6px; border-radius: 2px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.5px;
}
.lx-peek-text .blur {
  display: inline-block; background: #e8e5dc;
  color: transparent; border-radius: 2px; padding: 0 6px;
  filter: blur(3.5px); user-select: none;
}

/* Features — clean list */
.lx-feat-list {
  margin: 0 24px;
}
.lx-feat-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.lx-feat-row:last-child { border-bottom: none; }
.lx-feat-ico {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  background: var(--surface); display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.lx-feat-ico.t { background: rgba(102,8,116,0.08); }
.lx-feat-ico.p { background: rgba(155,30,38,0.08); }
.lx-feat-body { flex: 1; }
.lx-feat-title { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.lx-feat-desc { font-size: 12px; line-height: 1.55; color: var(--dim); }

/* Quote · italic serif */
.lx-quote {
  margin: 24px 24px 0; padding: 22px 20px;
  background: var(--surface); border-radius: 3px;
  position: relative;
}
.lx-quote::before {
  content: '"'; position: absolute; top: -6px; left: 12px;
  font-family: Georgia, serif; font-size: 56px; color: var(--beida);
  line-height: 1; opacity: 0.7;
}
.lx-quote-text {
  font-family: 'Noto Serif SC', serif; font-size: 14.5px; line-height: 1.7;
  color: #2a2a2a; font-style: italic; padding-left: 18px;
}
.lx-quote-src {
  font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px;
  color: var(--dim); margin-top: 10px; padding-left: 18px;
}

/* Gate */
.lx-gate {
  margin: 24px 24px 0; padding: 14px;
  border: 1px dashed var(--line); border-radius: 3px; text-align: center;
  background: white;
}
.lx-gate-eye { font-size: 15px; margin-bottom: 4px; }
.lx-gate-t {
  font-family: var(--mono); font-size: 10px; letter-spacing: 2px;
  color: var(--ink); text-transform: uppercase;
}
.lx-gate-sub {
  font-size: 11px; color: var(--dim); margin-top: 4px;
  line-height: 1.6;
}
.lx-gate-t .bt { color: var(--tsinghua); }
.lx-gate-t .bp { color: var(--beida); }

/* CTA */
.lx-cta {
  padding: 20px 24px 26px; margin-top: 24px; position: sticky; bottom: 0;
  background: linear-gradient(to top, var(--bg) 70%, rgba(250,250,247,0));
  border-top: 1px solid var(--line);
}
.lx-cta-btn {
  width: 100%; padding: 15px; background: var(--ink); color: white;
  border: none; font-family: 'Noto Sans SC'; font-size: 13.5px; font-weight: 700;
  letter-spacing: 3px; cursor: pointer; border-radius: 2px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .15s, background .15s;
}
.lx-cta-btn:active { transform: scale(0.97); }
.lx-cta-btn .arrow { font-family: var(--mono); font-weight: 400; }
.lx-cta-mini {
  text-align: center; font-size: 11px; margin-top: 10px;
  color: var(--dim); letter-spacing: 0.5px;
}
.lx-cta-mini .accent { color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: var(--beida); text-underline-offset: 3px; }

/* ============ AUTH ============ */
#auth {
  position: absolute; inset: 0; background: var(--bg);
  z-index: 80; display: flex; flex-direction: column;
  padding: 60px 28px 40px; overflow-y: auto;
}
#auth.hide { display: none; }
.auth-sup {
  font-family: 'Noto Serif SC', serif; font-size: 11px; font-weight: 400;
  letter-spacing: 1px; color: #777; margin-bottom: 6px;
}
.auth-brand {
  font-family: var(--display); font-size: 36px; letter-spacing: -1px;
  line-height: 1; margin-bottom: 6px;
}
.auth-brand .bt { color: var(--tsinghua); font-size: 1.14em; }
.auth-brand .bp { color: var(--beida); font-size: 1.14em; }
.auth-sub { font-family: 'Noto Serif SC', serif; font-size: 12px; letter-spacing: 1px; color: #555; }
.auth-lines { display: flex; gap: 6px; margin-top: 26px; margin-bottom: 40px; }
.auth-lines span { height: 2px; background: var(--ink); animation: growLine 1.2s ease both; }
.auth-lines span:nth-child(1) { width: 60px; }
.auth-lines span:nth-child(2) { width: 20px; background: var(--accent); animation-delay: .2s; }
.auth-lines span:nth-child(3) { width: 100px; animation-delay: .4s; }
.auth-lines span:nth-child(4) { width: 12px; background: var(--hl); animation-delay: .6s; }
@keyframes growLine { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); } }

.auth-step { animation: fade .4s ease both; }
.auth-step.hide { display: none; }
.auth-title {
  font-family: 'Noto Serif SC', serif; font-size: 26px; font-weight: 900;
  line-height: 1.3; margin-bottom: 10px;
}
.auth-desc { font-size: 13px; color: #444; line-height: 1.65; margin-bottom: 26px; }
.auth-label { font-family: var(--mono); font-size: 9px; letter-spacing: 3px; color: var(--dim); margin-bottom: 8px; text-transform: uppercase; }
.auth-input {
  width: 100%; padding: 14px 0; border: none; border-bottom: 1.5px solid var(--ink);
  background: transparent; font-family: var(--mono); font-size: 16px;
  outline: none; margin-bottom: 20px;
}
.auth-input:focus { border-color: var(--accent); }
.auth-input.code {
  font-family: var(--mono); font-size: 22px; letter-spacing: 8px; text-align: center;
}
.auth-hint { font-size: 11px; color: var(--dim); margin-top: -14px; margin-bottom: 20px; }
.auth-hint .resend { color: var(--accent); cursor: pointer; text-decoration: underline; }
.auth-btn {
  width: 100%; padding: 15px; background: var(--ink); color: white;
  font-family: 'Noto Sans SC'; font-size: 14px; letter-spacing: 2px; font-weight: 700;
  border: none; cursor: pointer; margin-top: 20px; border-radius: 2px;
  transition: all .15s;
}
.auth-btn:disabled { background: var(--line); color: var(--dim); cursor: not-allowed; }
.auth-btn:active:not(:disabled) { transform: scale(0.98); }
.auth-btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); margin-top: 8px; }
.auth-err {
  color: var(--accent); font-size: 12px; margin-top: -12px; margin-bottom: 16px;
  animation: shake .4s;
}
@keyframes notifIn {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes notifOut {
  to { transform: translateY(-30px); opacity: 0; }
}
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}
.auth-foot {
  margin-top: auto; padding-top: 30px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 2px;
  color: var(--dim); text-align: center; text-transform: uppercase;
}
.auth-foot .dot { color: var(--accent); }
.auth-domains { display: flex; gap: 8px; margin-top: 16px; margin-bottom: 6px; }
.auth-domain {
  flex: 1; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 2px;
  font-family: var(--mono); font-size: 10px; color: var(--dim); text-align: center;
}
.auth-domain.hot { border-color: var(--ink); color: var(--ink); border-style: solid; }
.auth-alumni-link {
  font-size: 12px; color: var(--accent); cursor: pointer; margin-top: 14px;
  text-decoration: underline; text-underline-offset: 3px;
}
.alumni-upload-box {
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line); background: var(--surface);
  height: 130px; cursor: pointer; overflow: hidden;
}
.alumni-upload-box:hover { border-color: var(--ink); }
.alumni-upload-box img { width: 100%; height: 100%; object-fit: contain; }
#alumni-preview-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.alumni-upload-icon { font-size: 28px; color: var(--dim); }
.alumni-upload-hint { font-family: var(--mono); font-size: 10px; color: var(--dim); }
#alumni-result.ok { background: #660874; color: #fff; padding: 10px 14px; }
#alumni-result.err { background: var(--accent); color: #fff; padding: 10px 14px; }

/* ============ DAILY PROBE ============ */
.probe {
  margin-bottom: 24px; background: white;
  border: 1px solid var(--line); border-radius: 4px;
  padding: 18px; position: relative; overflow: hidden;
  animation: slideUp .4s ease both;
}
.probe::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(to bottom, var(--hl), var(--accent));
}
.probe-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.probe-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: 2.5px;
  color: var(--accent); text-transform: uppercase;
}
.probe-skip { font-family: var(--mono); font-size: 10px; color: var(--dim); cursor: pointer; }
.probe-skip:hover { color: var(--ink); }
.probe-q {
  font-family: 'Noto Serif SC', serif; font-size: 17px; font-weight: 700;
  line-height: 1.5; margin-bottom: 4px;
}
.probe-q .emoji { font-family: 'Noto Sans SC'; font-size: 20px; margin-right: 4px; }
.probe-sub { font-size: 11px; color: var(--dim); margin-bottom: 14px; }
.probe-opts { display: flex; flex-direction: column; gap: 6px; }
.probe-opt {
  padding: 11px 14px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 3px;
  font-size: 13px; cursor: pointer; transition: all .15s;
  display: flex; justify-content: space-between; align-items: center;
}
.probe-opt:hover { border-color: var(--ink); }
.probe-opt.picked { background: var(--ink); color: white; border-color: var(--ink); }
.probe-opt .tag { font-family: var(--mono); font-size: 9px; opacity: 0.5; letter-spacing: 1px; }
.probe-insight {
  margin-top: 14px; padding: 12px; background: #fffbea;
  border-radius: 3px; font-size: 12.5px; line-height: 1.6; color: #2a1e00;
  animation: slideUp .35s ease both;
}
.probe-insight .pi-label { font-family: var(--mono); font-size: 9px; letter-spacing: 2px; color: #8a6a0e; margin-bottom: 4px; }
.probe-progress {
  margin-top: 10px; display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; color: var(--dim);
}
.probe-progress-bar {
  flex: 1; height: 3px; background: var(--line); position: relative; overflow: hidden;
}
.probe-progress-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--hl), var(--accent));
  transition: width .6s ease;
}
