/* ========================================
   乡村振兴统计入户调查虚拟仿真实验
   手绘水彩风格版
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=ZCOOL+KuaiLe&family=Long+Cang&family=ZCOOL+XiaoWei&display=swap');

/* === CSS Variables - 手绘水彩配色 === */
:root {
  --paper: #faf3e3;
  --paper-dark: #f0e6d0;
  --paper-shadow: #e8dcc0;
  --ink: #4a3728;
  --ink-light: #6b5340;
  --ink-muted: #8a7560;
  --pencil: #5a4a3a;
  
  --green-deep: #5b7a4a;
  --green-leaf: #7a9e5c;
  --green-light: #a8c48a;
  --green-pale: #d4e4c0;
  
  --gold-wheat: #c9a048;
  --gold-light: #e6cc7a;
  --gold-pale: #f5e8b8;
  
  --red-seal: #c0463a;
  --red-light: #e07060;
  --red-pale: #f5d0c8;
  
  --brown-roof: #8b6040;
  --brown-light: #b08060;
  --brown-pale: #dcc0a0;
  
  --blue-water: #6a9ab8;
  --blue-pale: #c0d8e8;
  
  --orange-sunset: #d88040;
  
  --font-hand: 'Ma Shan Zheng', 'ZCOOL KuaiLe', 'STKaiti', 'KaiTi', cursive;
  --font-body: 'ZCOOL XiaoWei', 'STKaiti', 'KaiTi', 'PingFang SC', 'Microsoft YaHei', serif;
  --font-note: 'Long Cang', 'STXingkai', 'XingKai', cursive;
  
  --hand-radius: 8px 12px 10px 14px;
  --hand-radius-alt: 12px 8px 14px 10px;
  --hand-shadow: 3px 4px 0 rgba(74,55,40,0.12);
  --hand-shadow-lg: 4px 6px 0 rgba(74,55,40,0.1), 6px 10px 20px rgba(74,55,40,0.08);
}

/* === 纸张纹理基础 === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* 纸张纹理覆盖层 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(ellipse at 20% 50%, rgba(201,160,72,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(122,158,92,0.04) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* 页面装饰 - 角落的手绘元素 */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--gold-wheat) 0px, var(--gold-wheat) 8px,
    transparent 8px, transparent 12px,
    var(--green-leaf) 12px, var(--green-leaf) 20px,
    transparent 20px, transparent 24px
  );
  opacity: 0.3;
  z-index: 1000;
}

/* === Utility === */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-accent { color: var(--green-deep); }
.text-danger { color: var(--red-seal); }
.text-warning { color: var(--orange-sunset); }
.text-muted { color: var(--ink-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* === 手绘边框通用样式 === */
.hand-border {
  border: 2.5px solid var(--ink);
  border-radius: var(--hand-radius);
  position: relative;
}

.hand-border::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(74,55,40,0.2);
  border-radius: var(--hand-radius-alt);
  pointer-events: none;
}

/* === Game Container === */
#game-container {
  max-width: 960px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* === 手绘分割线 === */
.wheat-divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}
.wheat-divider::before {
  content: '🌾 ～ ～ ～ 🌾 ～ ～ ～ 🌾';
  color: var(--gold-wheat);
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  opacity: 0.7;
}

/* === Top Bar (HUD) - 手绘风格 === */
#hud {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green-leaf) 100%);
  color: var(--paper);
  padding: 0.7rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-family: var(--font-hand);
  box-shadow: 0 3px 0 rgba(74,55,40,0.2), 0 6px 12px rgba(74,55,40,0.1);
  border-bottom: 3px solid var(--ink);
  position: relative;
}

#hud::before {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--red-seal) 0px, var(--red-seal) 6px,
    transparent 6px, transparent 10px
  );
  opacity: 0.5;
}

#hud::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--gold-wheat);
  border-radius: 2px;
}

#hud .hud-left, #hud .hud-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hud-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(250,243,227,0.15);
  padding: 0.25rem 0.7rem;
  border-radius: 20px 18px 22px 16px;
  border: 1.5px solid rgba(250,243,227,0.3);
}

.hud-item .icon { font-size: 1.1rem; }

.hud-level {
  background: var(--gold-wheat);
  color: var(--ink);
  padding: 0.2rem 0.8rem;
  border-radius: 20px 16px 18px 22px;
  font-size: 0.85rem;
  font-weight: normal;
  border: 2px solid var(--ink);
  font-family: var(--font-hand);
  box-shadow: 2px 2px 0 rgba(74,55,40,0.2);
  transform: rotate(-1deg);
}

/* === Scene Container === */
.scene {
  display: none !important;
  animation: handFadeIn 0.5s ease;
}
.scene.active { display: block !important; }
.scene.active.start-screen { display: flex !important; }
.scene.active.result-screen { display: flex !important; }

/* HUD在开始画面隐藏 */
body.game-started #hud { display: flex; }
#hud { display: none; }

/* 结果画面居中样式 */
#scene-result.scene.active {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
  padding: 2rem;
  text-align: center;
  background: var(--paper);
}

.result-screen-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* === 场景主插画 - 手绘边框风格 === */
.scene-illustration-wrap {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.scene-main-illustration {
  width: 100%;
  max-width: 680px;
  border-radius: 10px 14px 8px 12px;
  border: 3px solid var(--ink);
  box-shadow: var(--hand-shadow-lg);
  transform: rotate(0.3deg);
  position: relative;
  display: block;
}

/* 对话场景插画稍小 */
.dialogue-scene-illustration {
  width: 100%;
  max-width: 420px;
  border-radius: 8px 12px 6px 10px;
  border: 2px solid var(--ink);
  margin-bottom: 0.8rem;
  box-shadow: 3px 4px 0 rgba(74,55,40,0.15);
}

@keyframes handFadeIn {
  from { opacity: 0; transform: translateY(15px) rotate(-0.3deg); }
  to { opacity: 1; transform: translateY(0) rotate(0deg); }
}

@keyframes handSlideUp {
  from { opacity: 0; transform: translateY(30px) rotate(0.5deg); }
  to { opacity: 1; transform: translateY(0) rotate(0deg); }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-1deg); }
  50% { transform: rotate(1deg); }
}

@keyframes bounce-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes drawLine {
  from { width: 0; }
  to { width: 100%; }
}

/* === Start Screen - 手绘封面风格 === */
.start-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
  padding: 2rem;
  text-align: center;
  background: var(--paper);
  position: relative;
  overflow: hidden;
}

.start-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 10% 20%, rgba(201,160,72,0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(122,158,92,0.08) 0%, transparent 40%);
  pointer-events: none;
}

.cover-illustration {
  width: 100%;
  max-width: 720px;
  border-radius: 12px 16px 10px 18px;
  border: 3px solid var(--ink);
  box-shadow: var(--hand-shadow-lg);
  margin-bottom: 1.5rem;
  transform: rotate(-0.5deg);
  position: relative;
  overflow: hidden;
}

.cover-illustration::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 5px solid var(--paper);
  border-radius: 8px 12px 6px 14px;
  pointer-events: none;
  margin: 8px;
}

.cover-illustration img {
  width: 100%;
  display: block;
}

.start-screen h1 {
  font-family: var(--font-hand);
  font-size: 2.4rem;
  color: var(--green-deep);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  text-shadow: 2px 2px 0 rgba(201,160,72,0.2);
  position: relative;
}

.start-screen h1::after {
  content: '';
  display: block;
  width: 60%;
  height: 3px;
  margin: 0.5rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold-wheat), transparent);
  border-radius: 2px;
}

.start-screen .subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink-muted);
  margin-bottom: 2rem;
  max-width: 500px;
  line-height: 1.8;
}

.start-screen .subtitle::before,
.start-screen .subtitle::after {
  content: ' ✦ ';
  color: var(--gold-wheat);
}

.difficulty-title {
  font-family: var(--font-hand);
  font-size: 1.3rem;
  color: var(--brown-roof);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.difficulty-title::before { content: '【'; color: var(--red-seal); }
.difficulty-title::after { content: '】'; color: var(--red-seal); }

.difficulty-select {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2rem;
}

.diff-card {
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 10px 14px 8px 12px;
  padding: 1.5rem 1.2rem;
  width: 180px;
  cursor: pointer;
  transition: all 0.25s;
  text-align: center;
  position: relative;
  box-shadow: 3px 3px 0 rgba(74,55,40,0.1);
  font-family: var(--font-body);
}

.diff-card::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px dashed rgba(74,55,40,0.15);
  border-radius: 8px 12px 6px 10px;
  pointer-events: none;
}

.diff-card:hover {
  transform: translateY(-4px) rotate(-1deg);
  box-shadow: 5px 7px 0 rgba(74,55,40,0.12);
}

.diff-card.selected {
  border-color: var(--green-deep);
  background: linear-gradient(135deg, #f0f5e8 0%, var(--green-pale) 100%);
  transform: rotate(-1.5deg) scale(1.03);
  box-shadow: 4px 5px 0 rgba(91,122,74,0.2);
}

/* === 开场故事介绍 === */
.story-intro {
  background: var(--paper);
  border: 2px solid var(--paper-shadow);
  border-radius: var(--hand-radius);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem auto;
  max-width: 600px;
  text-align: left;
  position: relative;
  box-shadow: var(--hand-shadow);
}

.story-intro::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px dashed var(--paper-shadow);
  border-radius: 6px 10px 4px 8px;
  pointer-events: none;
}

.story-icon {
  font-size: 1.8rem;
  float: left;
  margin-right: 1rem;
  margin-top: 0.2rem;
}

.story-text p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--ink);
  margin: 0 0 0.6rem 0;
  text-indent: 2em;
}

.story-text p:last-child { margin-bottom: 0; }
.story-text strong { 
  font-family: var(--font-hand); 
  color: var(--green-deep); 
  font-weight: normal;
  font-size: 1rem;
}

/* === 搭档选择 === */
.partner-select {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.partner-card {
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 12px 16px 10px 14px;
  padding: 1rem;
  width: 200px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  position: relative;
  box-shadow: 3px 4px 0 rgba(74,55,40,0.12);
}

.partner-card::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px dashed rgba(74,55,40,0.15);
  border-radius: 10px 14px 8px 12px;
  pointer-events: none;
}

.partner-card:hover {
  transform: translateY(-4px) rotate(1deg);
  box-shadow: 5px 7px 0 rgba(74,55,40,0.15);
}

.partner-card.selected {
  border-color: var(--green-deep);
  background: linear-gradient(135deg, #f0f5e8 0%, var(--green-pale) 100%);
  transform: rotate(-1deg) scale(1.03);
}

.partner-avatar {
  width: 100px;
  height: 120px;
  margin: 0 auto 0.8rem;
  border-radius: 8px 12px 6px 10px;
  overflow: hidden;
  border: 2.5px solid var(--ink);
}

.partner-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.partner-name {
  font-family: var(--font-hand);
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.partner-role {
  font-family: var(--font-note);
  font-size: 0.8rem;
  color: var(--green-deep);
  margin-bottom: 0.5rem;
}

.partner-desc {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* === 教授卡片 === */
.professor-card {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  background: linear-gradient(135deg, var(--paper) 0%, var(--gold-pale) 100%);
  border: 2.5px solid var(--ink);
  border-radius: 12px 16px 10px 14px;
  padding: 1.2rem;
  margin: 1rem 0;
  position: relative;
  box-shadow: var(--hand-shadow);
}

.professor-card::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px dashed var(--gold-wheat);
  border-radius: 10px 14px 8px 12px;
  pointer-events: none;
}

.prof-portrait {
  width: 100px;
  min-width: 100px;
  height: 130px;
  border-radius: 8px 12px 6px 10px;
  overflow: hidden;
  border: 2.5px solid var(--ink);
  box-shadow: 2px 3px 0 rgba(74,55,40,0.15);
}

.prof-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.prof-content { flex: 1; min-width: 0; }

.prof-name {
  font-family: var(--font-hand);
  font-size: 1.2rem;
  color: var(--brown-roof);
  margin-bottom: 0.2rem;
}

.prof-role {
  font-family: var(--font-note);
  font-size: 0.82rem;
  color: var(--gold-wheat);
  margin-bottom: 0.6rem;
}

.prof-quote {
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.85;
  color: var(--ink);
  text-indent: 2em;
  position: relative;
  padding: 0.5rem 0.8rem;
  background: rgba(250,243,227,0.6);
  border-left: 3px solid var(--gold-wheat);
  border-radius: 0 8px 8px 0;
}

/* 王教授调查方案知识点卡片 */
.prof-knowledge {
  margin: 0.8rem 0;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, rgba(250,243,227,0.8), rgba(245,232,184,0.5));
  border: 2px dashed var(--gold-wheat);
  border-radius: 8px 12px 8px 12px;
}
.prof-knowledge h5 {
  font-family: var(--font-title);
  font-size: 0.95rem;
  color: var(--brown-roof);
  margin: 0 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1.5px dashed rgba(180,130,60,0.3);
}
.knowledge-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.kp-item {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-family: var(--font-body);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--ink);
}
.kp-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  background: var(--gold-wheat);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 1px;
}
.kp-item strong { color: var(--brown-roof); }

/* 学习模态框中的知识点样式 */
.knowledge-hint {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--green-deep);
  background: rgba(212,228,192,0.3);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.3rem;
}
.knowledge-tip {
  margin-top: 0.8rem;
  padding: 0.6rem 0.8rem;
  background: linear-gradient(135deg, rgba(212,228,192,0.4), rgba(245,232,184,0.3));
  border-left: 3px solid var(--green-deep);
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  line-height: 1.7;
}

/* 搭档弹窗中的知识点卡片 */
.pm-kp {
  margin: 0.6rem 0 0.3rem;
  padding: 0.55rem 0.7rem;
  background: rgba(250,243,227,0.7);
  border-left: 3px solid var(--gold-wheat);
  border-radius: 0 6px 6px 0;
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--ink);
}
.pm-kp.pm-kp-good {
  background: rgba(212,228,192,0.3);
  border-left-color: var(--green-deep);
}
.pm-kp-title {
  display: block;
  font-family: var(--font-title);
  font-size: 0.82rem;
  color: var(--brown-roof);
  margin-bottom: 0.2rem;
  font-weight: 600;
}
.pm-kp-good .pm-kp-title { color: var(--green-deep); }
.pm-kp strong { color: var(--red-seal); font-weight: 600; }
.pm-kp-good strong { color: var(--green-deep); }

/* 冯教授内联 */
.prof-feng-inline {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin: 0.8rem 0;
  padding: 0.8rem;
  background: rgba(212,228,192,0.2);
  border-radius: var(--hand-radius);
  border-left: 3px solid var(--green-deep);
}

.pf-avatar {
  width: 70px;
  min-width: 70px;
  height: 85px;
  border-radius: 6px 10px 4px 8px;
  overflow: hidden;
  border: 2px solid var(--ink);
}

.pf-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.pf-text {
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--ink);
}

.pf-text strong {
  font-family: var(--font-hand);
  color: var(--green-deep);
  font-size: 0.95rem;
}

.diff-card.selected::after {
  content: '✓';
  position: absolute;
  top: -10px;
  right: -10px;
  width: 28px;
  height: 28px;
  background: var(--green-deep);
  color: var(--paper);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border: 2px solid var(--paper);
  box-shadow: 2px 2px 0 rgba(74,55,40,0.2);
  font-family: var(--font-hand);
}

.diff-card .diff-icon { font-size: 2.2rem; margin-bottom: 0.5rem; }
.diff-card .diff-name { 
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--green-deep); 
  margin-bottom: 0.4rem; 
}
.diff-card .diff-desc { font-size: 0.82rem; color: var(--ink-muted); line-height: 1.6; }

/* === Buttons - 手绘按钮风格 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.8rem;
  border: 2.5px solid var(--ink);
  border-radius: 10px 14px 8px 12px;
  font-size: 1rem;
  font-family: var(--font-hand);
  font-weight: normal;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  position: relative;
  box-shadow: 3px 3px 0 rgba(74,55,40,0.2);
}

.btn::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px 12px 6px 10px;
  pointer-events: none;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  transform: none !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-leaf) 0%, var(--green-deep) 100%);
  color: var(--paper);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px) rotate(-0.5deg);
  box-shadow: 4px 5px 0 rgba(74,55,40,0.25);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 1px 1px 0 rgba(74,55,40,0.2);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-wheat) 100%);
  color: var(--ink);
}
.btn-gold:hover:not(:disabled) {
  transform: translateY(-2px) rotate(0.5deg);
  box-shadow: 4px 5px 0 rgba(74,55,40,0.2);
}

.btn-danger {
  background: linear-gradient(135deg, var(--red-light) 0%, var(--red-seal) 100%);
  color: var(--paper);
}
.btn-danger:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 4px 5px 0 rgba(74,55,40,0.2);
}

.btn-outline {
  background: transparent;
  border: 2.5px solid var(--green-deep);
  color: var(--green-deep);
  box-shadow: 2px 2px 0 rgba(91,122,74,0.15);
}
.btn-outline::after { display: none; }
.btn-outline:hover:not(:disabled) {
  background: var(--green-pale);
  transform: translateY(-2px);
  box-shadow: 3px 4px 0 rgba(91,122,74,0.2);
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  border-radius: 8px 10px 6px 12px;
}
.btn-lg {
  padding: 0.9rem 2.8rem;
  font-size: 1.2rem;
  border-radius: 14px 10px 16px 8px;
  box-shadow: 4px 4px 0 rgba(74,55,40,0.2);
}

/* === Scene Header - 手绘标题风格 === */
.scene-header {
  background: var(--paper-dark);
  color: var(--ink);
  padding: 1.8rem 2rem 1.5rem;
  text-align: center;
  position: relative;
  border-bottom: 3px solid var(--ink);
}

.scene-header::before {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 3px;
  background: repeating-linear-gradient(
    -45deg,
    var(--gold-wheat) 0px, var(--gold-wheat) 4px,
    transparent 4px, transparent 8px
  );
  opacity: 0.4;
}

.scene-header::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 1.5px dashed rgba(74,55,40,0.15);
  border-radius: 8px;
  pointer-events: none;
}

.scene-header h2 {
  font-family: var(--font-hand);
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
  color: var(--green-deep);
  position: relative;
  z-index: 1;
}

.scene-header p {
  font-family: var(--font-note);
  font-size: 0.95rem;
  color: var(--ink-muted);
  position: relative;
  z-index: 1;
}

/* === Scene Content === */
.scene-body {
  padding: 1.8rem 2rem;
  max-width: 760px;
  margin: 0 auto;
}

/* === Cards - 手绘卡片 === */
.info-card {
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 10px 14px 8px 12px;
  padding: 1.3rem 1.4rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--hand-shadow);
  position: relative;
}

.info-card::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 20px;
  width: 40px;
  height: 18px;
  background: var(--gold-pale);
  border: 1.5px solid var(--ink);
  border-radius: 4px 4px 0 0;
  transform: rotate(-2deg);
  z-index: -1;
  opacity: 0.7;
}

.info-card h4 {
  font-family: var(--font-hand);
  color: var(--green-deep);
  margin-bottom: 0.6rem;
  font-size: 1.15rem;
}

.info-card p {
  line-height: 1.9;
  font-size: 0.95rem;
}

.info-card h3 {
  font-family: var(--font-hand);
  color: var(--brown-roof);
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.item-card {
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 10px 14px 8px 12px;
  padding: 1rem 0.8rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 2px 3px 0 rgba(74,55,40,0.1);
  position: relative;
}

.item-card::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px dashed rgba(74,55,40,0.1);
  border-radius: 8px 12px 6px 10px;
  pointer-events: none;
}

.item-card:hover {
  transform: translateY(-4px) rotate(-1deg);
  box-shadow: 4px 6px 0 rgba(74,55,40,0.12);
}

.item-card.collected {
  border-color: var(--green-deep);
  background: linear-gradient(135deg, #f0f5e8 0%, var(--green-pale) 100%);
}

.item-card.collected::after {
  content: '✓';
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: var(--green-deep);
  color: var(--paper);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  border: 2px solid var(--paper);
  font-family: var(--font-hand);
}

.item-card .item-icon { font-size: 2rem; margin-bottom: 0.4rem; }
.item-card .item-name { 
  font-family: var(--font-hand);
  font-size: 0.95rem; 
  color: var(--ink);
}

.item-card .item-desc {
  font-family: var(--font-note);
  font-size: 0.7rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* === 学习卡片 === */
.learn-card {
  background: var(--paper);
  border: 2px solid var(--paper-shadow);
  border-radius: var(--hand-radius);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  box-shadow: var(--hand-shadow);
}

.learn-card:hover {
  transform: translateY(-3px) rotate(0.5deg);
  border-color: var(--green-leaf);
  box-shadow: 4px 6px 0 rgba(74,55,40,0.18);
}

.learn-card .learn-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.learn-card .learn-title {
  font-family: var(--font-hand);
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.learn-card .learn-desc {
  font-family: var(--font-note);
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}

.learn-card .learn-status {
  font-family: var(--font-note);
  font-size: 0.75rem;
  color: var(--ink-muted);
  border-top: 1px dashed var(--paper-shadow);
  padding-top: 0.4rem;
}

/* === 小测选项悬停效果 === */
.quiz-option:hover {
  border-color: var(--green-leaf) !important;
  transform: translateX(3px);
}

/* === Map / Route Planning - 手绘地图风格 === */
.village-map {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 12px 16px 10px 14px;
  padding: 1.5rem;
  margin: 1.2rem 0;
  position: relative;
  min-height: 320px;
  box-shadow: var(--hand-shadow-lg);
  overflow: hidden;
}

.village-map::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/hand-drawn-map.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.12;
  z-index: 0;
}

.village-map::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 2px dashed rgba(74,55,40,0.2);
  border-radius: 8px 12px 6px 10px;
  pointer-events: none;
  z-index: 1;
}

.village-map h4 { 
  font-family: var(--font-hand);
  color: var(--brown-roof); 
  margin-bottom: 1rem; 
  font-size: 1.2rem;
  position: relative;
  z-index: 2;
  text-align: center;
}

.village-map h4::before { content: '🗺️ '; }

.map-houses {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.9rem;
  position: relative;
  z-index: 2;
}

.map-house {
  background: rgba(250,243,227,0.9);
  border: 2.5px solid var(--ink);
  border-radius: 10px 14px 8px 12px;
  padding: 0.9rem 0.7rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  box-shadow: 2px 3px 0 rgba(74,55,40,0.1);
}

.map-house::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px dashed rgba(74,55,40,0.1);
  border-radius: 8px 12px 6px 10px;
  pointer-events: none;
}

.map-house:hover { 
  border-color: var(--green-deep); 
  transform: translateY(-3px) rotate(-1deg);
  box-shadow: 4px 5px 0 rgba(91,122,74,0.15);
}

.map-house.selected { 
  border-color: var(--green-deep); 
  background: linear-gradient(135deg, #f0f5e8 0%, var(--green-pale) 100%);
  transform: scale(1.05) rotate(-1deg);
}

.map-house.selected::after {
  content: '📍';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
}

.map-house.visited { 
  border-color: var(--ink-muted); 
  opacity: 0.5; 
  pointer-events: none; 
  background: var(--paper-dark);
}

.map-house .house-icon { font-size: 1.8rem; }
.map-house .house-name { 
  font-family: var(--font-hand);
  font-size: 0.9rem; 
  font-weight: normal;
  margin-top: 0.2rem; 
}
.map-house .house-type {
  font-family: var(--font-note);
  font-size: 0.75rem;
  color: var(--ink-muted);
  background: var(--paper-dark);
  padding: 0.1rem 0.5rem;
  border-radius: 8px;
  display: inline-block;
  margin-top: 0.3rem;
  border: 1px solid var(--paper-shadow);
}

.map-house .difficulty-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 26px;
  height: 26px;
  border-radius: 50% 45% 50% 45%;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  font-family: var(--font-hand);
  border: 2px solid var(--paper);
  box-shadow: 1px 2px 0 rgba(74,55,40,0.2);
}

.diff-easy { background: var(--green-leaf); }
.diff-medium { background: var(--orange-sunset); }
.diff-hard { background: var(--red-seal); }

/* === 村庄地图Canvas === */
.map-container {
  margin: 1rem 0;
}

.village-map-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 12px 16px 10px 14px;
  overflow: hidden;
  box-shadow: var(--hand-shadow-lg);
}

.village-map-canvas::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/hand-drawn-map.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.2;
  z-index: 0;
}

.map-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 30% 40%, rgba(168,196,138,0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 70%, rgba(230,204,122,0.25) 0%, transparent 50%),
    linear-gradient(180deg, rgba(212,228,192,0.4) 0%, rgba(245,232,184,0.3) 100%);
  z-index: 1;
}

.map-element {
  position: absolute;
  z-index: 2;
}

.map-river {
  background: linear-gradient(180deg, rgba(138,175,200,0.5), rgba(100,150,180,0.6));
  border-radius: 4px;
  transform: rotate(5deg);
  filter: blur(1px);
}

.map-field {
  background: repeating-linear-gradient(
    45deg,
    rgba(168,196,138,0.4),
    rgba(168,196,138,0.4) 6px,
    rgba(122,158,92,0.3) 6px,
    rgba(122,158,92,0.3) 12px
  );
  border-radius: 8px 12px 6px 10px;
  border: 1.5px dashed rgba(91,122,74,0.3);
}

.map-hill {
  background: radial-gradient(ellipse at 50% 100%, rgba(122,158,92,0.4) 0%, transparent 70%);
  border-radius: 50% 50% 0 0;
}

.map-road {
  background: rgba(201,160,72,0.5);
  border-radius: 3px;
  box-shadow: 0 0 4px rgba(201,160,72,0.3);
}

/* 地图点位 */
.map-point {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 10;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
}

.map-point .point-icon {
  font-size: 1.8rem;
  filter: drop-shadow(1px 2px 0 rgba(74,55,40,0.3));
  transition: transform 0.2s;
}

.map-point .point-label {
  font-family: var(--font-note);
  font-size: 0.75rem;
  color: var(--ink);
  background: rgba(250,243,227,0.9);
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--paper-shadow);
  white-space: nowrap;
  margin-top: -4px;
  box-shadow: 1px 1px 0 rgba(74,55,40,0.1);
}

.map-point .point-order {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  background: var(--red-seal);
  color: var(--paper);
  border-radius: 50%;
  font-family: var(--font-hand);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--paper);
  box-shadow: 1px 2px 0 rgba(74,55,40,0.2);
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.map-start .point-icon {
  font-size: 2.2rem;
  animation: pulse-glow 2s ease-in-out infinite;
}

.map-start .point-label {
  background: var(--gold-pale);
  border-color: var(--gold-wheat);
  color: var(--brown-roof);
  font-family: var(--font-hand);
}

.map-house:hover .point-icon {
  transform: scale(1.2);
}

.map-house.house-easy .point-icon { filter: drop-shadow(0 0 4px rgba(122,158,92,0.5)); }
.map-house.house-medium .point-icon { filter: drop-shadow(0 0 4px rgba(201,160,72,0.5)); }
.map-house.house-hard .point-icon { filter: drop-shadow(0 0 4px rgba(192,70,58,0.5)); }

.map-house.selected .point-icon {
  transform: scale(1.3);
  animation: bounce-point 0.5s ease;
}

.map-house.selected .point-order {
  opacity: 1;
  transform: scale(1);
}

.map-house.selected .point-label {
  background: var(--green-pale);
  border-color: var(--green-deep);
  color: var(--green-deep);
  font-weight: bold;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(201,160,72,0.5)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 12px rgba(201,160,72,0.8)); }
}

@keyframes bounce-point {
  0% { transform: scale(1); }
  50% { transform: scale(1.5); }
  100% { transform: scale(1.3); }
}

/* 路径SVG */
.route-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

/* 地图图例 */
.map-legend {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-note);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--paper);
  box-shadow: 1px 1px 0 rgba(74,55,40,0.2);
}

.legend-dot.diff-easy { background: var(--green-leaf); }
.legend-dot.diff-medium { background: var(--orange-sunset); }
.legend-dot.diff-hard { background: var(--red-seal); }
.legend-dot.legend-start { background: var(--gold-wheat); }

/* 路线信息 */
.route-info {
  background: var(--paper);
  border: 2px dashed var(--paper-shadow);
  border-radius: var(--hand-radius);
  padding: 0.8rem 1rem;
  margin-top: 0.8rem;
}

.route-summary {
  display: flex;
  justify-content: space-around;
  font-family: var(--font-note);
  font-size: 0.85rem;
  color: var(--ink-light);
  margin-bottom: 0.5rem;
}

.route-summary strong {
  font-family: var(--font-hand);
  color: var(--green-deep);
  font-size: 1rem;
}

.route-order {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink);
  text-align: center;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--paper-shadow);
  word-break: break-all;
}

/* === Dialogue System - 手绘对话风格 === */
.dialogue-container {
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 12px 16px 10px 14px;
  overflow: hidden;
  margin: 1.2rem 0;
  box-shadow: var(--hand-shadow-lg);
  position: relative;
}

.dialogue-scene {
  background: linear-gradient(180deg, #e8efe0 0%, #d4e0c8 100%);
  padding: 1.8rem 1.5rem;
  text-align: center;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
  border-bottom: 2.5px solid var(--ink);
}

.dialogue-scene .scene-icon { font-size: 3.5rem; margin-bottom: 0.5rem; }
.dialogue-scene .scene-desc { 
  font-family: var(--font-note);
  font-size: 0.9rem; 
  color: var(--ink-muted); 
}

/* === 对话立绘布局 === */
.dialogue-main {
  display: flex;
  gap: 0;
  align-items: stretch;
}

.dialogue-main.has-portrait {
  background: linear-gradient(135deg, rgba(212,228,192,0.2) 0%, rgba(250,243,227,1) 30%);
}

.dialogue-portrait {
  width: 160px;
  min-width: 160px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem 0 0 1rem;
  position: relative;
}

.portrait-img {
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  object-position: top center;
  border-radius: 10px 14px 0 0;
  border: 2.5px solid var(--ink);
  border-bottom: none;
  box-shadow: 3px -2px 0 rgba(74,55,40,0.1);
}

.dialogue-content {
  flex: 1;
  min-width: 0;
}

.dialogue-content .dialogue-box {
  border-top: none;
  padding-top: 1rem;
}

.dialogue-content .dialogue-box::before {
  display: none;
}

.dialogue-box {
  padding: 1.2rem 1.5rem;
  border-top: 2px dashed rgba(74,55,40,0.2);
  position: relative;
}

.dialogue-box::before {
  content: '💬';
  position: absolute;
  top: -12px;
  left: 20px;
  font-size: 1.2rem;
  background: var(--paper);
  padding: 0 4px;
}

.dialogue-speaker {
  font-family: var(--font-hand);
  font-size: 1rem;
  color: var(--green-deep);
  margin-bottom: 0.4rem;
  display: inline-block;
  background: var(--green-pale);
  padding: 0.1rem 0.8rem;
  border-radius: 8px 12px 6px 10px;
  border: 1.5px solid var(--green-deep);
}

.dialogue-text {
  font-size: 1rem;
  line-height: 2;
  min-height: 3rem;
  padding: 0.5rem 0;
}

.dialogue-choices {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem 1.5rem 1.2rem;
  border-top: 2px dashed rgba(74,55,40,0.2);
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-dark) 100%);
}

.choice-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.8rem 1.1rem;
  border: 2.5px solid var(--ink);
  border-radius: 10px 14px 8px 12px;
  background: var(--paper);
  font-size: 0.95rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1.7;
  box-shadow: 2px 3px 0 rgba(74,55,40,0.1);
  position: relative;
}

.choice-btn::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px dashed rgba(74,55,40,0.08);
  border-radius: 8px 12px 6px 10px;
  pointer-events: none;
}

.choice-btn:hover:not(:disabled) {
  border-color: var(--green-deep);
  background: #f0f5e8;
  transform: translateX(4px) rotate(-0.3deg);
  box-shadow: 3px 4px 0 rgba(91,122,74,0.15);
}

.choice-btn.correct {
  border-color: var(--green-deep);
  background: linear-gradient(135deg, #e0f0d0 0%, var(--green-pale) 100%);
  animation: wiggle 0.4s;
}

.choice-btn.wrong {
  border-color: var(--red-seal);
  background: linear-gradient(135deg, #f5ddd8 0%, var(--red-pale) 100%);
  animation: shake 0.4s;
}

.choice-btn:disabled { cursor: not-allowed; opacity: 0.65; }

/* === 搭档纠正提示 === */
.partner-correction {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.8rem 1rem;
  margin-top: 1rem;
  background: linear-gradient(135deg, rgba(212,228,192,0.3), rgba(245,232,184,0.3));
  border: 2px dashed var(--gold-wheat);
  border-radius: var(--hand-radius);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.partner-correction.show {
  opacity: 1;
  transform: translateY(0);
}

.pc-avatar {
  width: 50px;
  min-width: 50px;
  height: 60px;
  border-radius: 6px 10px 4px 8px;
  overflow: hidden;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 rgba(74,55,40,0.15);
}

.pc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.pc-content { flex: 1; min-width: 0; }

.pc-name {
  font-family: var(--font-hand);
  font-size: 0.9rem;
  color: var(--green-deep);
  margin-bottom: 0.3rem;
}

.pc-text {
  font-family: var(--font-body);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--ink);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px) rotate(-0.5deg); }
  40% { transform: translateX(6px) rotate(0.5deg); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* === Feedback Toast - 手绘便签风格 === */
.feedback-toast {
  position: fixed;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.7rem 1.5rem;
  border-radius: 10px 14px 8px 12px;
  font-size: 0.95rem;
  font-family: var(--font-hand);
  z-index: 200;
  animation: toastIn 0.35s ease, toastOut 0.4s ease 2.2s forwards;
  box-shadow: var(--hand-shadow-lg);
  max-width: 400px;
  text-align: center;
  border: 2.5px solid var(--ink);
}

.feedback-toast.score-up {
  background: linear-gradient(135deg, #e8f5dc 0%, var(--green-pale) 100%);
  color: var(--green-deep);
}

.feedback-toast.score-down {
  background: linear-gradient(135deg, #f5ddd8 0%, var(--red-pale) 100%);
  color: var(--red-seal);
}

.feedback-toast.info {
  background: linear-gradient(135deg, #dce8f0 0%, var(--blue-pale) 100%);
  color: var(--blue-water);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-25px) rotate(-2deg); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) rotate(0deg); }
}
@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateX(-50%) translateY(-20px) rotate(2deg); }
}

/* === Tablet / Survey Form - 手绘平板风格 === */
.tablet-frame {
  background: linear-gradient(145deg, #5a4a3a 0%, #3a2f25 100%);
  border-radius: 20px 18px 22px 16px;
  padding: 12px;
  margin: 1.2rem auto;
  box-shadow: var(--hand-shadow-lg), inset 0 2px 4px rgba(255,255,255,0.1);
  max-width: 600px;
  border: 3px solid var(--ink);
  position: relative;
}

.tablet-frame::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 4px;
  width: 6px;
  height: 40px;
  background: var(--ink);
  border-radius: 3px;
  transform: translateY(-50%);
}

.tablet-screen {
  background: var(--paper);
  border-radius: 12px 10px 14px 8px;
  overflow: hidden;
  border: 2px solid #2a2018;
}

.tablet-header {
  background: linear-gradient(135deg, var(--green-leaf) 0%, var(--green-deep) 100%);
  color: var(--paper);
  padding: 0.7rem 1.1rem;
  font-family: var(--font-hand);
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--ink);
}

.tablet-progress {
  height: 8px;
  background: var(--paper-dark);
  border-bottom: 1px solid rgba(74,55,40,0.1);
}

.tablet-progress-bar {
  height: 100%;
  background: repeating-linear-gradient(
    -45deg,
    var(--gold-wheat) 0px, var(--gold-wheat) 6px,
    var(--gold-light) 6px, var(--gold-light) 12px
  );
  transition: width 0.4s ease;
  border-radius: 0 4px 4px 0;
}

.tablet-body {
  padding: 1.2rem;
  max-height: 420px;
  overflow-y: auto;
}

.tablet-footer {
  padding: 0.8rem 1.1rem;
  border-top: 2px dashed rgba(74,55,40,0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--paper-dark);
}

/* Form inside tablet */
.form-group {
  margin-bottom: 1.1rem;
}

.form-label {
  display: block;
  font-family: var(--font-hand);
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.form-label .required { color: var(--red-seal); }

.form-input, .form-select {
  width: 100%;
  padding: 0.55rem 0.8rem;
  border: 2px solid var(--ink);
  border-radius: 8px 12px 6px 10px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  transition: all 0.2s;
  background: var(--paper);
  color: var(--ink);
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--green-deep);
  box-shadow: 3px 3px 0 rgba(91,122,74,0.15);
  transform: translateY(-1px);
}

.form-input.error {
  border-color: var(--red-seal);
  background: #fff5f3;
}

.form-error {
  font-family: var(--font-note);
  font-size: 0.8rem;
  color: var(--red-seal);
  margin-top: 0.25rem;
}

.form-hint {
  font-family: var(--font-note);
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-top: 0.25rem;
  font-style: italic;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.form-section-title {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--green-deep);
  margin: 1.3rem 0 0.7rem;
  padding-bottom: 0.3rem;
  border-bottom: 2.5px solid var(--green-deep);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.form-section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--green-deep) 0px, var(--green-deep) 4px,
    transparent 4px, transparent 8px
  );
  margin-left: 0.5rem;
  border-bottom: none;
}

/* Logic Warning - 手绘便签 */
.logic-warning {
  background: linear-gradient(135deg, #fdf6e3 0%, var(--gold-pale) 100%);
  border: 2px solid var(--gold-wheat);
  border-radius: 8px 12px 6px 10px;
  padding: 0.6rem 0.8rem;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--brown-roof);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  box-shadow: 2px 2px 0 rgba(201,160,72,0.2);
  font-family: var(--font-note);
  transform: rotate(-0.3deg);
}

.logic-warning .warn-icon { flex-shrink: 0; font-size: 1rem; }

/* === Random Event - 手绘突发风格 === */
.event-card {
  background: linear-gradient(135deg, #fdf6e3 0%, #fef0d0 100%);
  border: 3px solid var(--orange-sunset);
  border-radius: 14px 10px 16px 8px;
  padding: 1.8rem;
  margin: 1.2rem 0;
  animation: handSlideUp 0.4s ease;
  box-shadow: var(--hand-shadow-lg);
  position: relative;
  transform: rotate(-0.3deg);
}

.event-card::before {
  content: '⚡';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  background: var(--orange-sunset);
  color: var(--paper);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid var(--ink);
}

.event-card .event-icon { font-size: 2.5rem; text-align: center; margin-bottom: 0.6rem; margin-top: 0.5rem; }
.event-card .event-title { 
  font-family: var(--font-hand);
  font-size: 1.3rem;
  color: var(--orange-sunset); 
  text-align: center; 
  margin-bottom: 0.6rem; 
}
.event-card .event-desc { 
  font-size: 0.95rem; 
  text-align: center; 
  margin-bottom: 1.2rem;
  line-height: 1.8;
}

/* === Review Screen === */
.review-list { list-style: none; }

.review-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0;
  border-bottom: 1.5px dashed rgba(74,55,40,0.15);
  font-size: 0.92rem;
}

.review-item:last-child { border-bottom: none; }
.review-icon { font-size: 1rem; flex-shrink: 0; margin-top: 0.2rem; }
.review-ok .review-icon { color: var(--green-deep); }
.review-err .review-icon { color: var(--red-seal); }

/* === Result Screen - 手绘奖状风格 === */
.result-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
  padding: 2rem;
  text-align: center;
  background: var(--paper);
}

.result-card {
  background: var(--paper);
  border: 3.5px solid var(--gold-wheat);
  border-radius: 16px 20px 14px 18px;
  padding: 2.5rem;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--hand-shadow-lg);
  position: relative;
}

.result-card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 2px dashed rgba(201,160,72,0.3);
  border-radius: 12px 16px 10px 14px;
  pointer-events: none;
}

.result-card::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  border: 1px solid rgba(201,160,72,0.15);
  border-radius: 10px 14px 8px 12px;
  pointer-events: none;
}

.result-badge {
  width: 100px;
  height: 100px;
  margin: 0 auto 0.5rem;
}

.result-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.result-score {
  font-family: var(--font-hand);
  font-size: 4.5rem;
  color: var(--red-seal);
  line-height: 1;
  margin: 0.5rem 0;
  text-shadow: 3px 3px 0 rgba(201,160,72,0.2);
}

.result-grade {
  font-family: var(--font-hand);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.result-stars { font-size: 2rem; margin-bottom: 1rem; letter-spacing: 0.2em; }

.result-meta {
  font-family: var(--font-note);
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.result-breakdown {
  width: 100%;
  margin: 1.5rem 0;
}

/* === 施组长核验卡片 === */
.shi-review-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: linear-gradient(135deg, var(--red-pale) 0%, var(--gold-pale) 100%);
  border: 2.5px solid var(--red-seal);
  border-radius: 12px 16px 10px 14px;
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  position: relative;
  box-shadow: var(--hand-shadow);
}

.shi-review-card::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(183,65,48,0.3);
  border-radius: 10px 14px 8px 12px;
  pointer-events: none;
}

.shi-avatar {
  width: 60px;
  min-width: 60px;
  height: 70px;
  border-radius: 8px 12px 6px 10px;
  background: var(--paper);
  border: 2.5px solid var(--red-seal);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 3px 0 rgba(183,65,48,0.15);
}

.shi-icon {
  font-size: 2rem;
}

.shi-content { flex: 1; min-width: 0; }

.shi-name {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--red-seal);
  margin-bottom: 0.15rem;
}

.shi-role {
  font-family: var(--font-note);
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}

.shi-comment {
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--ink);
  text-indent: 2em;
  padding: 0.5rem 0.7rem;
  background: rgba(255,255,255,0.5);
  border-radius: 6px 10px 4px 8px;
  border-left: 3px solid var(--red-seal);
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1.5px dashed rgba(74,55,40,0.12);
  font-size: 0.9rem;
}

.result-bar {
  width: 120px;
  height: 12px;
  background: var(--paper-dark);
  border-radius: 6px;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  padding: 1.5px;
}

.result-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}

/* === Props Panel - 手绘背包风格 === */
.props-panel {
  position: fixed;
  right: -320px;
  top: 56px;
  width: 300px;
  height: calc(100vh - 56px);
  background: var(--paper);
  border-left: 3px solid var(--ink);
  box-shadow: -6px 0 20px rgba(74,55,40,0.12);
  z-index: 150;
  transition: right 0.35s ease;
  overflow-y: auto;
  padding: 1.2rem;
}

.props-panel.open { right: 0; }

.props-panel h4 { 
  font-family: var(--font-hand);
  color: var(--brown-roof); 
  margin-bottom: 1rem; 
  font-size: 1.2rem;
  text-align: center;
  border-bottom: 2px dashed rgba(74,55,40,0.2);
  padding-bottom: 0.5rem;
}

.prop-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.8rem;
  border: 2px solid var(--ink);
  border-radius: 10px 14px 8px 12px;
  margin-bottom: 0.6rem;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  font-family: var(--font-body);
  background: var(--paper);
  box-shadow: 2px 2px 0 rgba(74,55,40,0.08);
}

.prop-item:hover { 
  border-color: var(--green-deep); 
  background: #f0f5e8;
  transform: translateX(-4px);
}

.prop-item .prop-icon { font-size: 1.3rem; }
.prop-item.disabled { opacity: 0.4; cursor: not-allowed; }

.prop-detail {
  background: var(--paper-dark);
  border: 2px dashed var(--ink-muted);
  border-radius: 8px 12px 6px 10px;
  padding: 0.9rem;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.8;
  font-family: var(--font-note);
}

.prop-close {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--font-hand);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0 rgba(74,55,40,0.1);
}

.prop-close:hover {
  background: var(--red-pale);
  transform: rotate(90deg);
}

/* === Learning Modal - 手绘书本风格 === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(74,55,40,0.5);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: handFadeIn 0.25s;
}

.modal {
  background: var(--paper);
  border-radius: 16px 12px 18px 10px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--hand-shadow-lg), 0 0 0 4px var(--paper), 0 0 0 6px var(--ink);
  animation: handSlideUp 0.35s ease;
  border: none;
  position: relative;
}

.modal-header {
  padding: 1.3rem 1.5rem;
  border-bottom: 2.5px dashed rgba(74,55,40,0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, var(--paper-dark) 0%, var(--paper) 100%);
  border-radius: 16px 12px 0 0;
}

.modal-header h3 { 
  font-family: var(--font-hand);
  color: var(--green-deep); 
  font-size: 1.25rem; 
}

.modal-close {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--font-hand);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  padding: 1.5rem;
}

.modal-body h4 { 
  font-family: var(--font-hand);
  color: var(--brown-roof); 
  margin: 1.2rem 0 0.6rem; 
  font-size: 1.05rem;
}

.modal-body h4:first-child { margin-top: 0; }

.modal-body p, .modal-body li { 
  font-size: 0.92rem; 
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

.modal-body ul { 
  padding-left: 1.5rem; 
}

.modal-body ul li {
  list-style: none;
  position: relative;
}

.modal-body ul li::before {
  content: '✦';
  position: absolute;
  left: -1.2rem;
  color: var(--gold-wheat);
  font-size: 0.7rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 2.5px dashed rgba(74,55,40,0.2);
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  background: var(--paper-dark);
  border-radius: 0 0 18px 10px;
}

/* === Report === */
.report-section {
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 10px 14px 8px 12px;
  padding: 1.3rem;
  margin: 1.2rem 0;
  box-shadow: var(--hand-shadow);
}

.report-section h4 {
  font-family: var(--font-hand);
  color: var(--green-deep);
  border-bottom: 2px dashed rgba(74,55,40,0.2);
  padding-bottom: 0.4rem;
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}

/* === 装饰性图章/印章 === */
.seal-stamp {
  display: inline-block;
  border: 3px solid var(--red-seal);
  color: var(--red-seal);
  padding: 0.3rem 0.8rem;
  font-family: var(--font-hand);
  font-size: 0.9rem;
  border-radius: 4px;
  transform: rotate(-5deg);
  opacity: 0.8;
  background: rgba(192,70,58,0.05);
}

/* === 手绘箭头指示 === */
.hand-arrow {
  display: inline-block;
  color: var(--red-seal);
  font-family: var(--font-note);
  font-size: 0.9rem;
}

/* === 成功卡片特殊样式 === */
.success-card {
  background: linear-gradient(135deg, #f0f5e8 0%, var(--green-pale) 100%);
  border-color: var(--green-deep);
  border-radius: 10px 14px 8px 12px;
  padding: 1.2rem;
  border: 2.5px solid var(--green-deep);
  text-align: center;
}

.success-card p {
  color: var(--green-deep);
  font-family: var(--font-hand);
  font-size: 1.05rem;
}

/* === 纸张胶带装饰 === */
.washi-tape {
  position: absolute;
  width: 80px;
  height: 24px;
  background: rgba(201,160,72,0.3);
  transform: rotate(-3deg);
  z-index: 10;
}

.washi-tape.top-left { top: -8px; left: 20px; }
.washi-tape.top-right { top: -8px; right: 20px; transform: rotate(3deg); }

/* === 问卷-聊天双栏布局 === */
.survey-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.2rem;
  align-items: start;
}

.survey-tablet {
  position: sticky;
  top: 1rem;
}

/* === AI聊天面板 === */
.chat-panel {
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 14px 18px 12px 16px;
  display: flex;
  flex-direction: column;
  height: 600px;
  max-height: 75vh;
  box-shadow: var(--hand-shadow);
  overflow: hidden;
  position: relative;
}

.chat-panel::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(74,55,40,0.12);
  border-radius: 12px 16px 10px 14px;
  pointer-events: none;
  z-index: 1;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, var(--green-pale), rgba(212,228,192,0.4));
  border-bottom: 2px solid var(--ink);
  position: relative;
  z-index: 2;
}

.chat-farmer-info {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.chat-avatar {
  width: 48px;
  height: 56px;
  border-radius: 6px 10px 4px 8px;
  overflow: hidden;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 rgba(74,55,40,0.12);
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.chat-farmer-name {
  font-family: var(--font-hand);
  font-size: 1rem;
  color: var(--green-deep);
}

.chat-farmer-desc {
  font-family: var(--font-note);
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-note);
  font-size: 0.75rem;
  color: var(--green-deep);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4caf50;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: rgba(250,248,240,0.5);
  position: relative;
  z-index: 2;
}

.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--paper-shadow); border-radius: 3px; }

/* 欢迎消息 */
.chat-welcome {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.welcome-avatar {
  width: 36px;
  height: 44px;
  border-radius: 5px 8px 3px 6px;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  flex-shrink: 0;
}

.welcome-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.welcome-bubble {
  background: var(--paper);
  border: 2px solid var(--green-leaf);
  border-radius: 4px 12px 12px 12px;
  padding: 0.6rem 0.8rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--ink);
  box-shadow: 2px 2px 0 rgba(91,122,74,0.1);
}

.welcome-bubble p { margin: 0 0 0.3rem 0; }
.welcome-bubble p:last-child { margin-bottom: 0; }

/* 消息气泡 */
.chat-msg {
  display: flex;
  gap: 0.4rem;
  align-items: flex-end;
  animation: msg-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes msg-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.farmer-msg { align-self: flex-start; }
.user-msg { align-self: flex-end; flex-direction: row-reverse; }

.msg-avatar {
  flex-shrink: 0;
}

.farmer-avatar-small {
  width: 32px;
  height: 40px;
  border-radius: 4px 7px 3px 5px;
  overflow: hidden;
  border: 1.5px solid var(--ink);
}

.farmer-avatar-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.user-avatar-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-water), #5a9fd4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border: 1.5px solid var(--ink);
}

.msg-bubble {
  max-width: 250px;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  line-height: 1.65;
  word-wrap: break-word;
}

.farmer-bubble {
  background: var(--paper);
  border: 1.5px solid var(--green-leaf);
  border-radius: 4px 10px 10px 10px;
  color: var(--ink);
  box-shadow: 1px 2px 0 rgba(91,122,74,0.08);
}

.user-bubble {
  background: linear-gradient(135deg, var(--green-leaf), var(--green-deep));
  border: 1.5px solid var(--green-deep);
  border-radius: 10px 4px 10px 10px;
  color: white;
}

/* 正在输入 */
.typing-bubble {
  padding: 0.6rem 0.8rem;
  display: flex;
  gap: 4px;
  align-items: center;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-leaf);
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* 系统提示 */
.chat-system-hint {
  text-align: center;
  font-family: var(--font-note);
  font-size: 0.72rem;
  color: var(--orange-sunset);
  padding: 0.3rem 0.6rem;
  background: rgba(230,150,60,0.08);
  border-radius: 6px;
  align-self: center;
}

/* 输入区域 */
.chat-input-area {
  border-top: 2px solid var(--ink);
  background: var(--paper);
  position: relative;
  z-index: 2;
}

.quick-phrases {
  display: flex;
  gap: 0.3rem;
  padding: 0.5rem 0.6rem;
  flex-wrap: wrap;
  border-bottom: 1px dashed var(--paper-shadow);
}

.quick-btn {
  font-family: var(--font-note);
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  background: rgba(212,228,192,0.3);
  border: 1.5px solid var(--green-leaf);
  border-radius: 6px;
  color: var(--green-deep);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.quick-btn:hover {
  background: var(--green-pale);
  transform: translateY(-1px);
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.6rem;
  align-items: center;
}

.chat-input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 0.5rem 0.7rem;
  border: 2px solid var(--paper-shadow);
  border-radius: 8px 12px 8px 12px;
  background: rgba(250,248,240,0.8);
  outline: none;
  transition: border-color 0.2s;
}

.chat-input:focus {
  border-color: var(--green-deep);
}

.chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--green-deep);
  background: linear-gradient(135deg, var(--green-leaf), var(--green-deep));
  color: white;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.chat-send-btn:hover {
  transform: scale(1.1) rotate(-10deg);
}

/* === AI评价卡片 === */
.ai-eval-card {
  background: linear-gradient(135deg, #f0f5ff 0%, #e8f0fe 100%);
  border: 2.5px solid #4a7fc1;
  border-radius: 12px 16px 10px 14px;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--hand-shadow);
}

.ai-eval-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, #4a7fc1, #5a9fd4);
  color: white;
  flex-wrap: wrap;
}

.ai-eval-icon { font-size: 1.3rem; }
.ai-eval-title {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  flex: 1;
}
.ai-eval-avg {
  font-family: var(--font-hand);
  font-size: 0.9rem;
  background: rgba(255,255,255,0.2);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}
.ai-eval-avg strong { font-size: 1.1rem; }

.ai-eval-body {
  padding: 1rem;
}

.ai-eval-house {
  background: rgba(255,255,255,0.7);
  border: 1.5px solid rgba(74,127,193,0.2);
  border-radius: 8px 12px 6px 10px;
  padding: 0.8rem 1rem;
  margin-bottom: 0.8rem;
}

.ai-eval-house:last-child { margin-bottom: 0; }

.ai-eval-house-name {
  font-family: var(--font-hand);
  font-size: 0.95rem;
  color: var(--blue-water);
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed rgba(74,127,193,0.2);
}

.ai-eval-section {
  margin-bottom: 0.5rem;
}

.ai-eval-label {
  font-family: var(--font-hand);
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.ai-eval-label.good { color: var(--green-deep); }
.ai-eval-label.bad { color: var(--orange-sunset); }
.ai-eval-label.tip { color: var(--blue-water); }

.ai-eval-list {
  margin: 0;
  padding-left: 1.2rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--ink);
}

.ai-eval-list.bad-list li::marker { color: var(--orange-sunset); }
.ai-eval-list.tip-list li::marker { color: var(--blue-water); }

.ai-eval-list li {
  margin-bottom: 0.2rem;
}

.ai-eval-summary {
  margin-top: 0.5rem;
  padding: 0.5rem 0.7rem;
  background: rgba(74,127,193,0.06);
  border-left: 3px solid var(--blue-water);
  border-radius: 0 6px 6px 0;
  font-family: var(--font-body);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--ink-muted);
  font-style: italic;
}

/* === 搭档校验弹窗 === */
.partner-modal-mask {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(40,35,25,0.55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(2px);
}
.partner-modal-mask.show { opacity: 1; }

.partner-modal {
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 16px 20px 14px 18px;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  gap: 0;
  box-shadow: 6px 8px 0 rgba(60,45,20,0.18);
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
}
.partner-modal-mask.show .partner-modal { transform: translateY(0) scale(1); }

.partner-modal.pm-error { border-color: var(--red-seal); }
.partner-modal.pm-error::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--red-seal), #d4615a);
}
.partner-modal.pm-success { border-color: var(--green-deep); }
.partner-modal.pm-success::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--green-leaf), var(--green-deep));
}

.pm-avatar {
  width: 110px;
  min-width: 110px;
  background: linear-gradient(180deg, rgba(212,228,192,0.3), rgba(245,232,184,0.2));
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem 0.5rem;
  border-right: 2px dashed var(--paper-shadow);
}
.pm-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  object-fit: cover;
  box-shadow: 2px 3px 0 rgba(60,45,20,0.1);
}

.pm-body {
  flex: 1;
  padding: 1.2rem 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.pm-name {
  font-family: var(--font-title);
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.pm-error .pm-name::before { content: '⚠️'; font-size: 0.9rem; }
.pm-success .pm-name::before { content: '✅'; font-size: 0.9rem; }

.pm-text {
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--ink);
  flex: 1;
  overflow-y: auto;
  padding-right: 0.3rem;
  min-height: 0;
}
.pm-text p { margin: 0 0 0.5rem; }
.pm-text p:last-child { margin-bottom: 0; }

.pm-issue-list {
  margin: 0.5rem 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.pm-issue-list li {
  font-family: var(--font-body);
  font-size: 0.82rem;
  line-height: 1.6;
  padding: 0.4rem 0.6rem;
  border-radius: 6px 8px 6px 8px;
  background: rgba(245,232,184,0.35);
  border-left: 3px solid var(--gold-wheat);
}
.pm-issue-list.missing-list li {
  background: rgba(220,108,92,0.08);
  border-left-color: var(--red-seal);
}
.pm-issue-list.warning-list li {
  background: rgba(232,168,56,0.1);
  border-left-color: var(--gold-wheat);
}

.pm-tip {
  margin-top: 0.6rem !important;
  padding: 0.5rem 0.7rem;
  background: rgba(212,228,192,0.3);
  border-radius: 6px;
  font-size: 0.82rem !important;
  color: var(--green-deep);
  border: 1px dashed var(--green-leaf);
}

.pm-close-btn {
  margin-top: 0.9rem;
  align-self: flex-end;
  min-width: 120px;
  flex-shrink: 0;
}

/* === Responsive === */
@media (max-width: 600px) {
  .start-screen h1 { font-size: 1.8rem; }
  .start-screen .cover-illustration { max-width: 100%; }
  .difficulty-select { flex-direction: column; align-items: center; }
  .diff-card { width: 100%; max-width: 280px; }
  .scene-body { padding: 1.2rem 1rem; }
  .form-row { grid-template-columns: 1fr; }
  .map-houses { grid-template-columns: repeat(2, 1fr); }
  .tablet-frame { border-radius: 12px; padding: 6px; }
  #hud { font-size: 0.8rem; padding: 0.6rem 0.8rem; }
  .props-panel { width: 260px; }
  .item-grid { grid-template-columns: repeat(2, 1fr); }
  .scene-header h2 { font-size: 1.3rem; }
  .survey-layout { grid-template-columns: 1fr; }
  .chat-panel { height: 450px; max-height: 60vh; }
  .survey-tablet { position: static; }
  .partner-modal { flex-direction: column; }
  .pm-avatar { width: 100%; min-width: auto; border-right: none; border-bottom: 2px dashed var(--paper-shadow); padding: 0.8rem; }
  .pm-avatar img { width: 60px; height: 60px; }
}

/* === 滚动条美化 === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--paper-dark); }
::-webkit-scrollbar-thumb { 
  background: var(--brown-pale); 
  border-radius: 4px;
  border: 1px solid var(--paper-shadow);
}
::-webkit-scrollbar-thumb:hover { background: var(--brown-light); }

/* === 选择文本颜色 === */
::selection {
  background: var(--gold-pale);
  color: var(--ink);
}
