/* ===========================================================
   AI 态度测试 · style.css  v2 — Editorial / Paper Poster
   设计方向：复古编辑/纸张杂志风，打破"深色+青蓝渐变"的泛 AI 审美
   暖米色纸张底 + 粗黑展示字 + 每区域纯色色块 + 海报式结果卡片
   H5 移动优先：safe-area、44px 触控、clamp 流式尺寸
   选择器完全匹配 script.js render* 生成的 DOM
   =========================================================== */

/* ----- Fonts & Reset ----- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Paper palette — warm cream, not dark */
  --paper:        #f3ead6;
  --paper-2:      #ece0c8;
  --paper-3:      #e3d4b5;
  --ink:          #1b1714;
  --ink-2:        #5b5249;
  --ink-3:        #8c8071;
  --line:         #cdbf9f;
  --line-soft:    #ddcfb0;

  /* Zone accent colors — bold flat, not gradient */
  --zone-A:       #7c6a4f;   /* 旁观者 · 土褐 */
  --zone-B:       #2f6b4f;   /* 实用者 · 森绿 */
  --zone-C:       #b8651f;   /* 建造者 · 焦橙 */
  --zone-D:       #3b3580;   /* 思辨者 · 靛蓝 */
  --zone-E:       #8a1c20;   /* 分裂者 · 血红 */
  --accent:       var(--ink);

  /* Type */
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono:    'DM Mono', 'SF Mono', ui-monospace, monospace;
  --font-serif:   'Songti SC', 'STSong', 'Noto Serif SC', Georgia, serif;

  /* Sizes */
  --max-w:        480px;
  --radius:       14px;
  --radius-sm:    8px;
  --ease:         cubic-bezier(.22, 1, .36, 1);
  --safe-top:     env(safe-area-inset-top, 0px);
  --safe-bottom:  env(safe-area-inset-bottom, 0px);
}

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  line-height: 1.65;
  /* subtle paper grain via layered gradients */
  background-image:
    radial-gradient(circle at 20% 10%, rgba(180,150,90,.06), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(140,110,70,.05), transparent 45%),
    repeating-linear-gradient(45deg, transparent 0 2px, rgba(120,90,40,.012) 2px 4px);
}

/* ----- App Container ----- */
#app {
  width: 100%;
  max-width: var(--max-w);
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(20px + var(--safe-top)) 18px calc(24px + var(--safe-bottom));
  position: relative;
}

/* ----- Screen Management ----- */
.screen {
  display: none;
  animation: fadeUp .5s var(--ease) forwards;
}
.screen.active {
  display: flex;
  flex-direction: column;
  animation: none;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===========================================================
   START SCREEN  (renderStartScreen)
   =========================================================== */
.start-screen.active {
  justify-content: center;
  align-items: stretch;
  min-height: calc(100vh - 48px);
  min-height: calc(100dvh - 48px);
}

.start-badge {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  border-radius: 4px;
  margin-bottom: 28px;
}

.start-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 11vw, 3.4rem);
  font-weight: 700;
  color: var(--ink);
  line-height: .98;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}
.start-title .t-en {
  display: block;
  font-size: clamp(.8rem, 3.4vw, 1rem);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: 10px;
}

.start-subtitle {
  font-size: clamp(.95rem, 4vw, 1.08rem);
  color: var(--ink-2);
  line-height: 1.55;
  margin-bottom: 8px;
  max-width: 22ch;
}

.start-description {
  margin: 26px 0 4px;
}
.start-description p {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--ink-2);
  letter-spacing: .01em;
}
.start-humor {
  color: var(--ink-3) !important;
  font-style: italic;
  margin-top: 6px !important;
}

/* Zone preview — editorial tag row */
.zone-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 22px 0 8px;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
}
.zone-tag {
  flex: 1 1 auto;
  font-family: var(--font-body);
  font-size: .76rem;
  font-weight: 600;
  padding: 10px 6px;
  text-align: center;
  color: var(--ink-2);
  border-right: 1px solid var(--line);
  transition: background .2s, color .2s;
  cursor: default;
  white-space: nowrap;
}
.zone-tag:last-child { border-right: none; }
.zone-tag:hover {
  background: var(--ink);
  color: var(--paper);
}
/* zone accent underline */
.zone-tag.zone-A { box-shadow: inset 0 -3px 0 var(--zone-A); }
.zone-tag.zone-B { box-shadow: inset 0 -3px 0 var(--zone-B); }
.zone-tag.zone-C { box-shadow: inset 0 -3px 0 var(--zone-C); }
.zone-tag.zone-D { box-shadow: inset 0 -3px 0 var(--zone-D); }
.zone-tag.zone-E { box-shadow: inset 0 -3px 0 var(--zone-E); }

.start-disclaimer {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--ink-3);
  letter-spacing: .02em;
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: transform .18s var(--ease), background .2s, color .2s, box-shadow .2s;
  -webkit-user-select: none;
  user-select: none;
  min-height: 48px;
}

.btn-primary {
  padding: 15px 28px;
  font-size: 1.02rem;
  background: var(--ink);
  color: var(--paper);
  letter-spacing: .02em;
}
.btn-primary:hover {
  background: #000;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,.16);
}
.btn-primary:active { transform: scale(.97); }

.btn-secondary {
  padding: 13px 22px;
  font-size: .94rem;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-start {
  margin-top: 26px;
  align-self: stretch;
  width: 100%;
}

/* ===========================================================
   QUESTION SCREEN  (renderQuestionScreen)
   =========================================================== */
.question-screen.active {
  padding-top: 2px;
}

.question-header {
  margin-bottom: 26px;
}

.question-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.question-number {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
}
.question-number .q-total {
  font-size: .8rem;
  font-weight: 500;
  color: var(--ink-3);
  margin-left: 2px;
}

.phase-badge {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--paper-2);
  padding: 4px 9px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--paper-3);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: width .5s var(--ease);
}

.progress-text {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--ink-3);
  display: block;
  text-align: right;
  letter-spacing: .04em;
}

.question-body {
  flex: 1;
}

.question-text {
  font-size: clamp(1.15rem, 5.2vw, 1.38rem);
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 26px;
  color: var(--ink);
  letter-spacing: -.005em;
}

/* Option buttons — editorial list */
.options-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-btn {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 15px 16px;
  background: var(--paper-2);
  border: 1.5px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .96rem;
  text-align: left;
  cursor: pointer;
  transition: all .2s var(--ease);
  line-height: 1.45;
}
@media (hover: hover) {
  .option-btn:hover {
    background: var(--paper);
    border-color: var(--ink);
    border-left-color: var(--ink);
    transform: translateX(3px);
  }
}
.option-btn:active {
  transform: scale(.985);
  background: var(--paper-3);
}
.option-btn.selected {
  background: var(--ink);
  border-color: var(--ink);
  border-left-color: var(--ink);
  color: var(--paper);
}

.option-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: .92rem;
  color: var(--ink-3);
  min-width: 16px;
  flex-shrink: 0;
  padding-top: 1px;
}
.option-btn.selected .option-label {
  color: inherit;
  opacity: .7;
}
@media (hover: hover) {
  .option-btn:hover .option-label {
    color: inherit;
    opacity: .7;
  }
}

.option-text {
  flex: 1;
}

/* ===========================================================
   RESULT SCREEN — POSTER CARD DESIGN
   =========================================================== */
.result-screen.active {
  padding-top: 2px;
  padding-bottom: 34px;
}

/* ---------- The Poster Card (screenshot / download target) ---------- */
.poster-card {
  position: relative;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 26px 22px 22px;
  margin-bottom: 14px;
  overflow: hidden;
  /* paper texture inside card */
  background-image:
    radial-gradient(circle at 15% 12%, rgba(180,150,90,.08), transparent 38%),
    radial-gradient(circle at 85% 88%, rgba(140,110,70,.07), transparent 42%);
}
/* zone accent bar across top of poster */
.poster-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
  background: var(--zone-color, var(--ink));
}

.poster-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  padding-top: 4px;
}
.poster-brand {
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.poster-brand b {
  color: var(--ink);
  font-weight: 700;
}
.poster-zone-badge {
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--zone-color, var(--ink));
  padding: 4px 9px;
  border-radius: 4px;
}

.poster-hero {
  text-align: left;
  margin-bottom: 18px;
}
.poster-level-num {
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 22vw, 5.6rem);
  font-weight: 700;
  line-height: .85;
  letter-spacing: -.04em;
  color: var(--zone-color, var(--ink));
}
.poster-level-name {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 8.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--ink);
  margin-top: 8px;
}
.poster-tagline {
  font-family: var(--font-serif);
  font-size: clamp(.95rem, 4.2vw, 1.08rem);
  font-style: italic;
  color: var(--ink-2);
  line-height: 1.55;
  margin-top: 12px;
  padding-left: 12px;
  border-left: 3px solid var(--zone-color, var(--ink));
}

/* stars row */
.poster-stars {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0;
  padding: 12px 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}
.poster-stars .stars-label {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-right: 4px;
}
.poster-stars .stars-row {
  font-size: 1.15rem;
  letter-spacing: 1px;
  line-height: 1;
}

/* the quote — pull quote */
.poster-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 5vw, 1.3rem);
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  margin: 16px 0 18px;
  position: relative;
}
.poster-quote::before {
  content: '“';
  font-family: var(--font-serif);
  font-size: 3rem;
  line-height: 0;
  position: relative;
  top: .5em;
  color: var(--zone-color, var(--ink));
  opacity: .5;
  margin-right: 2px;
}

.poster-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1.5px solid var(--ink);
}
.poster-footer .pf-left {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .08em;
  color: var(--ink-2);
  line-height: 1.5;
}
.poster-footer .pf-left b {
  color: var(--ink);
  font-weight: 700;
}
.poster-footer .pf-qr {
  width: 56px;
  height: 56px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  flex-shrink: 0;
  overflow: hidden;
  padding: 3px;
  box-sizing: border-box;
}
.poster-footer .pf-qr img {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.poster-footer .pf-qr .qr-fallback {
  font-family: var(--font-mono);
  font-size: .5rem;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  line-height: 1.1;
  letter-spacing: .02em;
}
/* Pre-generated poster image replaces DOM card for native long-press save */
.poster-card-img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  border: 2px solid var(--ink);
  background: var(--paper);
  margin-bottom: 14px;
  /* allow iOS/Android context menu for saving image */
  -webkit-touch-callout: default;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: auto;
}

/* ---------- Share prompt + actions ---------- */
.poster-prompt {
  text-align: center;
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--ink-2);
  letter-spacing: .03em;
  margin: 6px 0 16px;
  line-height: 1.7;
}
.poster-prompt b {
  color: var(--ink);
  font-weight: 600;
}

.poster-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.poster-actions .btn {
  width: 100%;
}
.btn-poster-save {
  background: var(--ink);
  color: var(--paper);
}
.btn-poster-save:hover { background: #000; }
.btn-screenshot {
  background: var(--paper-2);
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-screenshot:hover { background: var(--paper-3); }
.btn-retry {
  background: transparent;
  color: var(--ink-2);
  border: 1.5px dashed var(--line);
  min-height: 44px;
  font-size: .9rem;
}
.btn-retry:hover {
  color: var(--ink);
  border-color: var(--ink);
  border-style: solid;
}

/* ---------- Detail sections (below poster) ---------- */
.result-details {
  margin-top: 6px;
  padding-bottom: 28px;
}
.result-details-title {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 8px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--ink);
}

.result-section {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  padding: 16px 0;
  margin-bottom: 0;
}
.result-section:last-child { border-bottom: none; }

.result-section h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -.005em;
}

.result-section p,
.result-section li {
  font-size: .9rem;
  color: var(--ink-2);
  line-height: 1.7;
}
.result-section p { color: var(--ink); }

.result-description p {
  color: var(--ink);
  font-size: .94rem;
  line-height: 1.7;
}

/* Stars in detail (kept for compatibility, poster has its own) */
.result-stars .stars-row {
  font-size: 1.2rem;
  letter-spacing: 2px;
}

/* tags */
.tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.tag {
  display: inline-block;
  font-size: .78rem;
  padding: 5px 11px;
  border-radius: 4px;
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--line);
}

/* scenes list */
.result-scenes ul {
  list-style: none;
  padding: 0;
}
.result-scenes ul li {
  margin-bottom: 8px;
  padding-left: 22px;
  position: relative;
}
.result-scenes ul li::before {
  content: '▸';
  position: absolute;
  left: 4px;
  top: 0;
  font-size: .8rem;
  color: var(--zone-color, var(--ink-3));
}

/* think section */
.result-think p {
  color: var(--ink);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: .94rem;
}

/* quote section (full, below) */
.result-quote {
  text-align: center;
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 20px 16px;
  margin-bottom: 18px;
}
.result-quote blockquote {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--ink);
  font-style: italic;
  font-weight: 600;
  line-height: 1.55;
}

/* L16 Split section */
.l16-split-section {
  background: var(--paper-2);
  border: 1.5px solid var(--zone-E);
  border-left: 5px solid var(--zone-E);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  margin-bottom: 14px;
}
.l16-split-icon {
  font-size: 2.2rem;
  margin-bottom: 6px;
}
.l16-split-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.l16-split-tag {
  font-family: var(--font-serif);
  font-size: .88rem;
  color: var(--zone-E);
  font-style: italic;
  margin-bottom: 10px;
}
.l16-split-desc {
  font-size: .88rem;
  color: var(--ink-2);
  line-height: 1.7;
}

/* Divider */
.result-divider {
  border: none;
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}

/* legacy share section (hidden, replaced by poster actions) */
.result-share { display: none; }

/* ---------- Download toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--safe-bottom));
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--paper);
  font-size: .86rem;
  padding: 12px 20px;
  border-radius: 10px;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
  max-width: 80vw;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,.2);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===========================================================
   SHARE GUIDE (微信内分享引导浮层)
   =========================================================== */
.share-guide {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(20, 16, 11, .72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  box-sizing: border-box;
  color: var(--paper);
  animation: shareGuideIn .18s ease-out;
  cursor: pointer;
}
@keyframes shareGuideIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.share-guide-arrow {
  position: absolute;
  top: calc(14px + var(--safe-top, 0px));
  right: 18px;
  font-size: 2.4rem;
  line-height: 1;
  transform: rotate(-12deg);
  animation: shareArrow 1s ease-in-out infinite;
}
@keyframes shareArrow {
  0%, 100% { transform: rotate(-12deg) translateX(0); }
  50% { transform: rotate(-12deg) translateX(-8px); }
}
.share-guide-body {
  text-align: center;
  max-width: 30ch;
}
.share-guide-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 6vw, 1.6rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -.01em;
}
.share-guide-text {
  font-size: clamp(.92rem, 4vw, 1.04rem);
  line-height: 1.7;
  color: rgba(255, 252, 245, .92);
}
.share-guide-text b {
  font-family: var(--font-mono);
  letter-spacing: .12em;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(255, 252, 245, .16);
}
.share-guide-tip {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: .74rem;
  color: rgba(255, 252, 245, .6);
  letter-spacing: .02em;
}
.share-guide-close {
  position: absolute;
  bottom: calc(28px + var(--safe-bottom, 0px));
  left: 0; right: 0;
  text-align: center;
  font-size: .76rem;
  color: rgba(255, 252, 245, .55);
  font-family: var(--font-mono);
}

/* ===========================================================
   POSTER OVERLAY (移动端长按保存海报浮层)
   =========================================================== */
.poster-overlay {
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: rgba(20, 16, 11, .88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px calc(80px + var(--safe-bottom, 0px));
  box-sizing: border-box;
  animation: shareGuideIn .18s ease-out;
  overflow-y: auto;
}
.poster-overlay img {
  max-width: 86%;
  max-height: 70vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
  /* 关键：允许长按唤出系统"保存图像"菜单 */
  -webkit-touch-callout: default;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: auto;
}
.poster-overlay-hint {
  margin-top: 18px;
  color: rgba(255, 252, 245, .92);
  font-size: clamp(.9rem, 4vw, 1rem);
  text-align: center;
  font-family: var(--font-mono);
  letter-spacing: .03em;
}
.poster-overlay-close {
  position: absolute;
  bottom: calc(28px + var(--safe-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 252, 245, .14);
  color: var(--paper);
  border: 1px solid rgba(255, 252, 245, .3);
  border-radius: 999px;
  padding: 11px 32px;
  font-size: .9rem;
  font-family: var(--font-mono);
  letter-spacing: .05em;
  cursor: pointer;
}
.poster-overlay-close:active {
  background: rgba(255, 252, 245, .26);
}

/* ===========================================================
   NICKNAME SCREEN (投票后、结果前)
   =========================================================== */
.nickname-screen.active {
  padding-top: 2px;
}
.nickname-header {
  margin-bottom: 22px;
}
.nickname-field {
  position: relative;
  margin: 0 auto 26px;
  max-width: 360px;
}
.nickname-input {
  width: 100%;
  box-sizing: border-box;
  padding: 16px 70px 16px 18px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  letter-spacing: .01em;
  transition: border-color .2s, box-shadow .2s;
}
.nickname-input:focus {
  border-color: var(--zone-color, var(--ink));
  box-shadow: 0 0 0 3px rgba(124, 106, 79, .12);
}
.nickname-input::placeholder {
  color: var(--ink-3);
  opacity: .7;
}
.nickname-counter {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--ink-3);
  pointer-events: none;
}
.nickname-actions {
  display: flex;
  justify-content: center;
}

/* ===========================================================
   POSTER NICK (海报上的昵称行)
   =========================================================== */
.poster-nick {
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 600;
  color: var(--zone-color, #1b1714);
  opacity: .82;
  letter-spacing: .04em;
  margin-bottom: 8px;
  word-break: break-all;
}

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 380px) {
  #app { padding: calc(16px + var(--safe-top)) 14px calc(20px + var(--safe-bottom)); }
  .poster-card { padding: 22px 18px 18px; }
  .zone-tag { font-size: .7rem; padding: 9px 4px; }
}

@media (min-width: 560px) {
  #app { padding-left: 24px; padding-right: 24px; }
}

/* prefer-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ----- Scrollbar ----- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* ===========================================================
   PROGRESS META ROW + LIVE STATS  (in question header)
   =========================================================== */
.progress-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.live-stats {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: .62rem;
  color: var(--ink-3);
  letter-spacing: .01em;
  flex: 1;
  min-width: 0;
}
.live-stats b {
  color: var(--zone-E);
  font-weight: 600;
}
.live-stats .ls-sep { opacity: .4; }
.live-stats .ls-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c0392b;
  display: inline-block;
  margin-right: 2px;
  animation: livePulse 1.4s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.7); }
}

/* ===========================================================
   LANDING SCREEN  (warning before quiz starts)
   =========================================================== */
.landing-screen.active {
  justify-content: flex-start;
  align-items: stretch;
  padding-top: 8px;
}
.landing-tag {
  align-self: center;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 6vw, 1.9rem);
  font-weight: 700;
  letter-spacing: .02em;
  text-align: center;
  padding: 16px 24px;
  border: 2px solid var(--zone-E);
  color: var(--zone-E);
  border-radius: 6px;
  margin-bottom: 26px;
}
.landing-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 2.8rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: 18px;
  text-align: center;
}
.landing-disclaimer {
  font-size: .9rem;
  color: var(--ink);
  margin-bottom: 22px;
  line-height: 1.7;
  padding: 14px 16px;
  border: 1.5px solid var(--zone-E);
  border-radius: var(--radius-sm);
  background: var(--paper-2);
}
.landing-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: .92rem;
  color: var(--ink-2);
  line-height: 1.65;
  padding: 14px;
  border-left: 3px solid var(--zone-E);
  background: var(--paper-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 22px;
}
.landing-stats {
  display: flex;
  gap: 0;
  margin-bottom: 22px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.landing-stats .ls-item {
  flex: 1;
  padding: 14px 10px;
  text-align: center;
  border-right: 1.5px solid var(--ink);
}
.landing-stats .ls-item:last-child { border-right: none; }
.landing-stats .ls-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.landing-stats .ls-label {
  display: block;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 5px;
}
.landing-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-giveup {
  background: transparent;
  color: var(--ink-2);
  border: 1.5px dashed var(--line);
  font-size: .94rem;
  min-height: 48px;
}
.btn-giveup:hover {
  color: var(--zone-E);
  border-color: var(--zone-E);
  border-style: solid;
}
.btn-continue {
  width: 100%;
}
.landing-footnote {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: .66rem;
  color: var(--ink-3);
  text-align: center;
  letter-spacing: .02em;
}
.landing-xhs-link,
.result-xhs-link {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: .66rem;
  color: var(--ink-3);
  text-decoration: none;
  text-align: center;
  letter-spacing: .02em;
  transition: color .2s;
  -webkit-tap-highlight-color: transparent;
}
.result-xhs-link {
  margin-top: 4px;
}
.landing-xhs-link:active,
.landing-xhs-link:hover,
.result-xhs-link:active,
.result-xhs-link:hover {
  color: #8a1c20;
}

/* ===========================================================
   GIVE-UP SCREEN  (humorous)
   =========================================================== */
.giveup-screen.active {
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: calc(100vh - 48px);
  min-height: calc(100dvh - 48px);
}
.giveup-emoji {
  font-size: 3.5rem;
  margin-bottom: 18px;
}
.giveup-tag {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.giveup-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 8vw, 2.4rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
  letter-spacing: -.01em;
}
.giveup-lead {
  font-size: .95rem;
  color: var(--ink-2);
  line-height: 1.7;
  margin-bottom: 22px;
  max-width: 32ch;
}
.giveup-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: .92rem;
  color: var(--ink);
  line-height: 1.65;
  padding: 16px;
  background: var(--paper-2);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  max-width: 34ch;
}
.giveup-humor {
  font-size: .82rem;
  color: var(--ink-3);
  line-height: 1.7;
  margin-bottom: 26px;
  font-style: italic;
  max-width: 32ch;
}
.giveup-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 300px;
}
.giveup-actions .btn { width: 100%; }

/* ===========================================================
   VOTE SCREEN  (bonus LLM question after Q20)
   =========================================================== */
.vote-screen.active {
  padding-top: 2px;
}
.vote-header {
  margin-bottom: 22px;
}
.vote-bonus-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  padding: 5px 10px;
  border-radius: 4px;
  margin-bottom: 18px;
}
.vote-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 8vw, 2.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: 12px;
}
.vote-subtitle {
  font-size: .95rem;
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 8px;
}
.vote-hint {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--ink-3);
  letter-spacing: .02em;
}
.llm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 22px;
}
.llm-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: var(--paper-2);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: transform .18s var(--ease), background .2s, border-color .2s, box-shadow .2s;
  min-height: 56px;
}
.llm-option:hover {
  background: var(--paper);
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}
.llm-option:active { transform: scale(.97); }
.llm-emoji {
  font-size: 1.3rem;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}
.llm-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.llm-name {
  font-size: .86rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.llm-vendor {
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--ink-3);
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-skip-vote {
  width: 100%;
  background: transparent;
  color: var(--ink-3);
  border: 1.5px dashed var(--line);
  font-size: .86rem;
  min-height: 44px;
}
.btn-skip-vote:hover {
  color: var(--ink);
  border-color: var(--ink);
  border-style: solid;
}

/* ===========================================================
   RESULT — LLM VOTE SECTION
   =========================================================== */
.result-llm-vote .vote-result-card {
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.vrc-you {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 12px;
}
.vrc-emoji {
  font-size: 1.6rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.vrc-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.vrc-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.vrc-vendor {
  font-family: var(--font-mono);
  font-size: .66rem;
  color: var(--ink-3);
  letter-spacing: .04em;
}
.vrc-share {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--zone-E);
  flex-shrink: 0;
}
.vrc-note {
  font-size: .84rem;
  color: var(--ink-2);
  margin-bottom: 14px;
  line-height: 1.6;
}
.vrc-note b { color: var(--ink); font-weight: 600; }
.vrc-ranking-title {
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.vrc-ranking ul {
  list-style: none;
  padding: 0;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  font-size: .82rem;
  border-radius: 4px;
  color: var(--ink-2);
}
.rank-item.rank-voted {
  background: var(--paper);
  border: 1.5px solid var(--zone-E);
  color: var(--ink);
  font-weight: 600;
}
.rank-pos {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  color: var(--ink-3);
  min-width: 16px;
}
.rank-voted .rank-pos { color: var(--zone-E); }
.rank-emoji { font-size: 1rem; }
.rank-name {
  flex: 1;
  font-size: .84rem;
}
.rank-share {
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 600;
  color: var(--ink-2);
}
.rank-voted .rank-share { color: var(--zone-E); }
.vote-skipped-note {
  font-size: .88rem;
  color: var(--ink-2);
}
.link-btn {
  background: none;
  border: none;
  color: var(--zone-E);
  font-weight: 600;
  cursor: pointer;
  font-size: .88rem;
  text-decoration: underline;
  padding: 0;
  font-family: var(--font-body);
}

/* llm-grid single-column on very narrow screens */
@media (max-width: 340px) {
  .llm-grid { grid-template-columns: 1fr; }
}
