:root {
  /* ===== 暖奶油配色（适配河马老师毛绒场景参考图）===== */
  --hippo-skin: #FDD835;          /* 河马黄 */
  --hippo-blue: #4A90D9;          /* 帽子蓝（点缀） */
  --hippo-cyan: #26A69A;          /* 薄荷青（参考图拱窗） */
  --hippo-cyan-light: #7FD4CB;
  --hippo-green: #43A047;         /* 背带绿 */
  --wood: #D9A86C;                /* 暖木色（参考图地板） */

  --bg-top: #FFFBF2;              /* 奶油白 */
  --bg-mid: #F9EEDC;              /* 米色 */
  --bg-bottom: #EAD0A8;           /* 浅木色 */
  --bg-panel: rgba(255, 251, 243, 0.72);
  --bg-panel-strong: rgba(255, 250, 242, 0.93);
  --border: rgba(214, 178, 122, 0.38);
  --border-glow: rgba(38, 166, 154, 0.5);
  --text: #5D4632;                /* 暖棕文字 */
  --text-muted: #A38A6C;
  --accent: #26A69A;
  --accent-blue: #4A90D9;
  --danger: #EF5350;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(160, 118, 60, 0.16);
  --shadow-glow: 0 0 24px rgba(38, 166, 154, 0.22);
  --font: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%; width: 100%; overflow: hidden;
  font-family: var(--font); color: var(--text);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 52%, var(--bg-bottom) 100%);
}

/* ===== AI 显式标识条 ===== */
.ai-label-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 6px 12px; font-size: 12px; color: var(--text-muted);
  background: rgba(255, 250, 240, 0.92); border-bottom: 1px solid var(--border); backdrop-filter: blur(8px);
}
.ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.8); } }

/* ===== 全屏 3D 背景 ===== */
.bg-canvas { position: fixed; inset: 0; z-index: 0; }
.bg-canvas canvas { display: block; width: 100% !important; height: 100% !important; }

/* ===== 首页提示 ===== */
.home-hint {
  position: fixed; left: 50%; bottom: 8%; transform: translateX(-50%);
  z-index: 6; pointer-events: none; font-size: 14px; color: var(--text-muted);
  padding: 8px 18px; border: 1px solid var(--border); border-radius: 24px;
  background: rgba(255, 250, 240, 0.6); backdrop-filter: blur(6px);
  animation: floatHint 3s ease-in-out infinite;
}
@keyframes floatHint { 0%,100% { opacity: .6; } 50% { opacity: 1; } }

/* ===== 首页点击层 ===== */
.home-click { position: fixed; inset: 0; z-index: 10; cursor: pointer; }
body:not(.on-home) .home-click { display: none; }

/* ===== 径向功能菜单 ===== */
.radial-menu { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.radial-center {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 30px 8px rgba(38,166,154,.4);
  animation: pulse 1.8s infinite;
}
.radial-btn {
  position: absolute; left: 50%; top: 46%;
  width: 92px; height: 92px; margin: -46px 0 0 -46px;
  border-radius: 26px; border: 1px solid var(--border-glow);
  background: rgba(255, 250, 240, 0.9); backdrop-filter: blur(14px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  cursor: pointer; pointer-events: auto; opacity: 0;
  transform: translate(0, 0) scale(.4);
  transition: opacity .45s cubic-bezier(.2,.8,.3,1), transform .45s cubic-bezier(.2,.8,.3,1), box-shadow .2s;
  box-shadow: var(--shadow);
}
.radial-btn.show { opacity: 1; }
.radial-btn:hover { box-shadow: var(--shadow-glow), 0 0 0 2px var(--accent); }
.radial-btn .mini-char {
  width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(38, 166, 154, .22), rgba(253, 216, 53, .18));
  border: 1px solid rgba(93, 70, 50, .18);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  transition: color .2s, border-color .2s, box-shadow .2s;
}
.radial-btn .mini-char svg { width: 24px; height: 24px; display: block; }
.radial-btn:hover .mini-char {
  color: #fff; border-color: var(--accent);
  box-shadow: 0 0 16px rgba(38, 166, 154, .45);
}
.radial-btn .mini-label { font-size: 12px; color: var(--text); }
.radial-ripple {
  position: absolute; left: 50%; top: 46%; width: 10px; height: 10px;
  border-radius: 50%; background: transparent; border: 2px solid var(--accent);
  transform: translate(-50%, -50%); pointer-events: none; opacity: .8;
  animation: ripple .6s ease-out forwards;
}
@keyframes ripple { to { width: 220px; height: 220px; opacity: 0; } }

/* ===== 主应用层 ===== */
.app { position: fixed; inset: 0; display: flex; flex-direction: column; padding-top: 28px; z-index: 30; pointer-events: none; }
.app-header {
  pointer-events: auto; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; margin: 8px 18px 0; background: var(--bg-panel);
  border: 1px solid var(--border); border-radius: var(--radius); backdrop-filter: blur(16px); box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #FFF59D, #FBC02D 70%);
  border: 2px solid var(--hippo-blue); box-shadow: 0 0 16px rgba(251,192,45,.35);
  overflow: hidden; display: flex; align-items: flex-start; justify-content: center;
}
.brand-avatar img { width: 100%; height: auto; transform: translateY(-6%) scale(1.18); transform-origin: top center; }
.brand h1 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: .5px; }
.brand-tag { display: inline-block; margin-left: 6px; padding: 2px 8px; font-size: 12px; font-weight: 500; color: #6B4E12; background: var(--hippo-skin); border-radius: 20px; vertical-align: middle; }
.brand-sub { margin: 2px 0 0; font-size: 12px; color: var(--text-muted); }

/* ===== 用户区（登录/注册 + 管理入口） ===== */
.user-area { display: flex; align-items: center; gap: 10px; }
.pill-btn {
  padding: 7px 16px; border: 1px solid var(--border); border-radius: 22px;
  background: rgba(255, 255, 255, 0.55); color: var(--text); font-size: 13px; cursor: pointer;
  transition: all .25s;
}
.pill-btn:hover { border-color: var(--border-glow); box-shadow: var(--shadow-glow); }
.pill-btn.primary { background: linear-gradient(135deg, var(--accent), var(--hippo-cyan-light)); color: #fff; border-color: transparent; }
.pill-btn.admin-on { background: linear-gradient(135deg, #F9A825, #FBC02D); color: #5D4632; border-color: transparent; }

.app-main { flex: 1; position: relative; pointer-events: none; }

/* ===== 功能视图（主图缩小置顶后，面板居其下方） ===== */
.feature-view {
  position: absolute; top: 34vh; left: 16px; right: 16px; bottom: 10px;
  max-width: 780px; margin: 0 auto;
  display: flex; flex-direction: column;
  background: var(--bg-panel-strong); border: 1px solid var(--border);
  border-radius: var(--radius); backdrop-filter: blur(18px); box-shadow: var(--shadow);
  pointer-events: none; overflow: hidden;
  transform: translateY(28px); opacity: 0;
  transition: transform .45s cubic-bezier(.2,.8,.3,1), opacity .35s;
}
.feature-view.active { transform: translateY(0); opacity: 1; pointer-events: auto; }
.feature-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.feature-title { font-size: 15px; font-weight: 600; color: var(--accent); }.feature-scroll { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }

/* ===== 聊天 ===== */
.chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px 4px; }
.message { max-width: 88%; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; line-height: 1.6; animation: fadeIn .3s ease; }
.message.user { align-self: flex-end; background: linear-gradient(135deg, rgba(38,166,154,.16), rgba(253,216,53,.18)); border: 1px solid rgba(38,166,154,.3); border-bottom-right-radius: 4px; }
.message.ai { align-self: flex-start; background: rgba(255,255,255,.6); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.message .speaker { font-size: 11px; color: var(--accent); margin-bottom: 4px; }
.message .text { color: var(--text); white-space: pre-wrap; }
.message .meta { margin-top: 6px; font-size: 11px; color: var(--text-muted); }
.message .ai-label { display: inline-block; margin-top: 6px; padding: 2px 6px; font-size: 10px; color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; opacity: .8; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.chat-input-area { padding: 12px 16px; border-top: 1px solid var(--border); }
.input-wrap { display: flex; align-items: center; gap: 8px; padding: 6px; background: rgba(255,255,255,.55); border: 1px solid var(--border); border-radius: 28px; }
.input-wrap input { flex: 1; padding: 10px 14px; border: none; outline: none; background: transparent; color: var(--text); font-size: 14px; }
.input-wrap input::placeholder { color: var(--text-muted); }
.icon-btn { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: none; border-radius: 50%; background: rgba(93,70,50,.08); color: var(--text-muted); cursor: pointer; transition: all .2s; }
.icon-btn:hover { background: rgba(38,166,154,.18); color: #fff; }
.icon-btn.primary { color: #fff; background: linear-gradient(135deg, var(--accent), var(--hippo-cyan-light)); }
.icon-btn.recording { color: #fff; background: var(--danger); animation: recordingPulse 1.2s infinite; }
@keyframes recordingPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,83,80,.5); } 50% { box-shadow: 0 0 0 8px rgba(239,83,80,0); } }
.treehole-intro { padding: 12px; margin-bottom: 8px; font-size: 13px; color: var(--text-muted); background: rgba(129,199,132,.1); border: 1px solid rgba(129,199,132,.3); border-radius: var(--radius-sm); }

/* ===== 心理自评 ===== */
.assess-card { padding: 18px; background: rgba(255,255,255,.55); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.assess-card h2 { margin: 0 0 6px; font-size: 15px; color: var(--accent); }
.assess-card p { margin: 0 0 14px; font-size: 13px; color: var(--text-muted); }
.mood-slider-wrap { padding: 0 4px; }
.mood-slider-wrap input[type=range] { width: 100%; accent-color: var(--accent); }
.mood-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.mood-value { margin-top: 8px; font-size: 18px; font-weight: 600; color: var(--accent); text-align: center; }
.assess-questions { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.assess-q { padding: 14px; background: rgba(255,255,255,.45); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.assess-q-text { margin-bottom: 10px; font-size: 14px; }
.assess-options { display: flex; gap: 8px; flex-wrap: wrap; }
.assess-opt { padding: 6px 12px; border: 1px solid var(--border); border-radius: 20px; background: rgba(255,255,255,.5); color: var(--text-muted); font-size: 13px; cursor: pointer; transition: all .2s; }
.assess-opt:hover, .assess-opt.selected { color: #fff; border-color: var(--accent); background: rgba(38,166,154,.25); }
.assess-result { display: none; margin-top: 16px; padding: 14px; background: rgba(38,166,154,.1); border: 1px solid var(--border-glow); border-radius: var(--radius-sm); }
.assess-result.visible { display: block; }
.assess-disclaimer { padding: 12px; font-size: 12px; color: var(--text-muted); background: rgba(239,83,80,.06); border: 1px solid rgba(239,83,80,.25); border-radius: var(--radius-sm); }
.assess-stage-picker { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.assess-stage-picker[hidden] { display: none; }
.assess-stage-opt { flex: 1 1 220px; padding: 14px 16px; border: 1.5px dashed var(--border); border-radius: var(--radius-sm); background: rgba(255,255,255,.55); color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s; text-align: left; }
.assess-stage-opt:hover { border-color: var(--accent); background: rgba(38,166,154,.12); transform: translateY(-1px); }
.assess-stage-opt:active { transform: translateY(0); }
.assess-progress { display: flex; align-items: center; gap: 8px; margin: 6px 0 12px; font-size: 12.5px; color: var(--text-muted); }
.assess-progress[hidden] { display: none; }
.assess-progress-bar { flex: 1; height: 6px; background: rgba(38,166,154,.12); border-radius: 3px; overflow: hidden; }
.assess-progress-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #F5B841); border-radius: 3px; transition: width .25s; }
.assess-link { display: inline-block; margin: 4px 0 0; padding: 6px 0; background: transparent; border: none; color: var(--text-muted); font-size: 12.5px; cursor: pointer; }
.assess-link:hover { color: var(--accent); }
.assess-dim-bar { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 13px; }
.assess-dim-bar b { width: 64px; color: var(--text); font-weight: 600; }
.assess-dim-bar .assess-bar { flex: 1; height: 8px; background: rgba(38,166,154,.12); border-radius: 4px; overflow: hidden; }
.assess-dim-bar .assess-bar i { display: block; height: 100%; background: linear-gradient(90deg, #26A69A, #7CB342, #F5B841, #EF6C00, #C62828); border-radius: 4px; }
.assess-dim-bar .assess-dim-score { width: 56px; text-align: right; font-weight: 600; color: var(--accent); }
.assess-warn { margin-top: 10px; padding: 10px 12px; background: rgba(198,40,40,.08); border: 1px solid rgba(198,40,40,.35); border-radius: var(--radius-sm); color: #B71C1C; font-size: 13px; line-height: 1.6; }

/* ===== 情绪日记 ===== */
.diary-editor { padding: 16px; background: rgba(255,255,255,.55); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.diary-date { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.diary-label { display: block; font-size: 13px; color: var(--accent); margin-bottom: 8px; }
.mood-picker { display: flex; gap: 8px; margin-bottom: 14px; }
.mood-emoji { width: 46px; height: 46px; font-size: 24px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.55); cursor: pointer; transition: all .2s; }
.mood-emoji:hover, .mood-emoji.selected { border-color: var(--accent); background: rgba(38,166,154,.15); box-shadow: var(--shadow-glow); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tag-chip { padding: 6px 12px; border: 1px solid var(--border); border-radius: 20px; background: rgba(255,255,255,.5); color: var(--text-muted); font-size: 13px; cursor: pointer; transition: all .2s; }
.tag-chip.selected { color: #fff; border-color: var(--accent); background: rgba(38,166,154,.28); }
.diary-note textarea { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: rgba(255,255,255,.6); color: var(--text); font-size: 14px; resize: vertical; outline: none; font-family: var(--font); }
.diary-note textarea:focus { border-color: var(--accent); }
.diary-history h3 { font-size: 14px; color: var(--accent); margin: 4px 0 10px; }
.diary-list { display: flex; flex-direction: column; gap: 10px; }
.diary-item { padding: 12px; background: rgba(255,255,255,.45); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.diary-item-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.diary-item-date { font-size: 13px; color: var(--text); }
.diary-item-mood { font-size: 20px; }
.diary-item-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.diary-item-tags span { font-size: 11px; padding: 2px 8px; border-radius: 12px; background: rgba(38,166,154,.14); color: var(--accent); }
.diary-item-text { font-size: 13px; color: var(--text-muted); line-height: 1.5; white-space: pre-wrap; }
.diary-empty { font-size: 13px; color: var(--text-muted); text-align: center; padding: 20px; }

/* ===== 我的报告 ===== */
.report-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.period-tabs { display: flex; gap: 6px; }
.period-btn { padding: 8px 16px; border: 1px solid var(--border); border-radius: 20px; background: rgba(255,255,255,.5); color: var(--text-muted); font-size: 13px; cursor: pointer; transition: all .2s; }
.period-btn.active { color: #fff; background: linear-gradient(135deg, rgba(38,166,154,.9), rgba(127,212,203,.9)); border-color: rgba(255,255,255,.2); }
.report-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-card { padding: 14px; text-align: center; background: rgba(255,255,255,.55); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.stat-card .num { font-size: 22px; font-weight: 700; color: var(--accent); }
.stat-card .lbl { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.report-output { padding: 16px; background: rgba(255,255,255,.55); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; line-height: 1.7; white-space: pre-wrap; color: var(--text); }
.report-output.empty { color: var(--text-muted); text-align: center; }
.report-output h3 { color: var(--accent); margin: 14px 0 6px; }
.report-output ul { padding-left: 20px; margin: 6px 0; }
.report-actions { display: flex; gap: 8px; margin-top: 10px; }
.report-loading { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 14px; }

/* ===== 设置（管理员） ===== */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.settings-card { padding: 16px; background: rgba(255,255,255,.55); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.settings-card.span-2 { grid-column: span 2; }
.settings-card h3 { margin: 0 0 12px; font-size: 14px; color: var(--accent); }
.settings-card label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--text-muted); }
.settings-card input, .settings-card select { display: block; width: 100%; margin-top: 6px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: rgba(255,255,255,.7); color: var(--text); font-size: 13px; outline: none; }
.settings-card input:focus, .settings-card select:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(38,166,154,.14); }
.settings-card .hint { display: block; margin-top: 4px; font-size: 11px; color: var(--text-muted); line-height: 1.5; }
.settings-card code { display: inline-block; padding: 4px 8px; margin: 4px 0; background: rgba(160,118,60,.12); border-radius: 6px; font-size: 12px; color: var(--accent); }

/* ===== 通用按钮 ===== */
.btn-primary { padding: 10px 22px; border: none; border-radius: 24px; background: linear-gradient(135deg, var(--accent), var(--hippo-cyan-light)); color: #fff; font-size: 14px; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.btn-secondary { padding: 8px 18px; border: 1px solid var(--border); border-radius: 24px; background: transparent; color: var(--text); font-size: 13px; cursor: pointer; }

/* ===== 弹窗 ===== */
.modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(93, 66, 40, 0.4); backdrop-filter: blur(6px); }
.modal-card { position: relative; z-index: 1; width: 420px; max-width: 90vw; max-height: 80vh; overflow-y: auto; padding: 22px; background: var(--bg-panel-strong); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.modal-card h3 { margin: 0 0 14px; font-size: 16px; color: var(--accent); }
.modal-card label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--text-muted); }
.modal-card input { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: rgba(255,255,255,.7); color: var(--text); font-size: 14px; outline: none; }
.modal-card input:focus { border-color: var(--accent); }
.modal-card select { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: rgba(255,255,255,.7); color: var(--text); font-size: 14px; outline: none; }
.modal-card select:focus { border-color: var(--accent); }
.auth-profile-title { margin: 4px 0 8px; font-size: 13px; color: var(--text); font-weight: 600; }
.auth-profile-title span { font-weight: 400; color: var(--text-muted); font-size: 12px; }
.auth-profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin-bottom: 12px; }
.auth-profile-grid label { margin-bottom: 0; }
.auth-profile-grid .half { display: block; }
@media (max-width: 420px) { .auth-profile-grid { grid-template-columns: 1fr 1fr; } }
.profile-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 12px; border-radius: 16px; background: rgba(38,166,154,.12); border: 1px solid rgba(38,166,154,.35); color: var(--accent); font-size: 12.5px; }
.profile-edit-btn { background: transparent; border: none; color: var(--accent); font-size: 12.5px; cursor: pointer; padding: 0; text-decoration: underline; }
.profile-chip-bar { display: flex; justify-content: flex-end; margin-top: 4px; }
.profile-chip-bar:empty { display: none; }
.modal-card .hint { display: block; margin-top: 10px; font-size: 11px; color: var(--text-muted); line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; margin-top: 6px; }
.modal-actions .btn-primary { flex: 1; }
.auth-error { display: none; margin-bottom: 10px; padding: 8px 12px; font-size: 12px; color: var(--danger); background: rgba(239,83,80,.08); border: 1px solid rgba(239,83,80,.3); border-radius: var(--radius-sm); }
.auth-error.visible { display: block; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.auth-tab { flex: 1; padding: 9px 0; border: 1px solid var(--border); border-radius: 20px; background: transparent; color: var(--text-muted); font-size: 13px; cursor: pointer; transition: all .2s; }
.auth-tab.active { color: #fff; background: linear-gradient(135deg, var(--accent), var(--hippo-cyan-light)); border-color: transparent; }
.model-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.model-item { padding: 12px; text-align: center; background: rgba(255,255,255,.55); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: all .2s; }
.model-item:hover, .model-item.active { border-color: var(--accent); background: rgba(38,166,154,.12); }
.model-item-name { font-size: 13px; color: var(--text); }

/* ===== 危机横幅 ===== */
.crisis-banner { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 3000; padding: 12px 20px; background: rgba(239,83,80,.95); color: #fff; border-radius: 24px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.2); }

/* ===== 响应式 ===== */
@media (max-width: 980px) {
  .feature-view { top: 28vh; left: 12px; right: 12px; bottom: 8px; max-width: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-card.span-2 { grid-column: span 1; }
  .model-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .app-header { flex-direction: column; gap: 10px; padding: 10px 14px; }
  .radial-btn { width: 76px; height: 76px; margin: -38px 0 0 -38px; }
  .radial-btn .mini-char { width: 38px; height: 38px; }
  .radial-btn .mini-char svg { width: 20px; height: 20px; }
  .report-stats { grid-template-columns: 1fr; }
}

/* ===== v10：功能栏工具条 ===== */
.bar-tools { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.tool-chip { border: 1.5px solid var(--border, #EADFCC); background: rgba(255,255,255,.75); color: var(--text, #4E3B2A);
  font-size: 12px; padding: 5px 10px; border-radius: 16px; cursor: pointer; transition: .15s; white-space: nowrap; }
.tool-chip:hover { border-color: var(--hippo-cyan, #26A69A); color: var(--hippo-cyan, #26A69A); }
.tool-chip.active { background: var(--hippo-cyan, #26A69A); border-color: var(--hippo-cyan, #26A69A); color: #fff; }
.tool-chip.danger { color: #E07856; }
.tool-chip.danger:hover { border-color: #E07856; background: #FBE9E1; }

/* ===== v10：音色选择浮层 ===== */
.voice-pop { position: fixed; z-index: 3200; width: 232px; background: #FFFDF8; border: 1.5px solid #EADFCC;
  border-radius: 18px; box-shadow: 0 12px 40px rgba(160,118,60,.22); padding: 10px; }
.voice-pop-title { font-size: 12px; color: #8C7A64; padding: 2px 6px 8px; font-weight: 600; }
.voice-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: none; background: none;
  padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.voice-opt:hover { background: rgba(38,166,154,.1); }
.voice-opt.selected { background: rgba(38,166,154,.16); }
.voice-opt .v-ico { font-size: 22px; }
.voice-opt b { display: block; font-size: 13.5px; color: #4E3B2A; }
.voice-opt i { display: block; font-style: normal; font-size: 11px; color: #8C7A64; }
[hidden] { display: none !important; }

/* ===== v10：情绪温度计 ===== */
.thermo { padding: 6px 2px 2px; }
.thermo-value { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin-bottom: 14px; }
.thermo-num { font-size: 46px; font-weight: 800; line-height: 1; color: #F57C00; transition: color .15s; }
.thermo-label { font-size: 13px; font-weight: 600; padding: 4px 14px; border-radius: 16px; background: rgba(245,124,0,.12); color: #F57C00; transition: .15s; }
.thermo-track { position: relative; height: 46px; border-radius: 14px; padding: 5px; background: #FFF; border: 1.5px solid #EADFCC;
  box-shadow: inset 0 2px 6px rgba(160,118,60,.08); cursor: pointer; touch-action: none; user-select: none; }
.thermo-segs { display: flex; gap: 3px; height: 100%; }
.thermo-seg { flex: 1; border-radius: 8px; opacity: .22; transition: opacity .15s; display: grid; place-items: center; position: relative; }
.thermo-seg.on { opacity: 1; }
.thermo-seg i { font-style: normal; font-size: 11px; font-weight: 700; color: rgba(255,255,255,.95); text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.thermo-thumb { position: absolute; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%;
  background: #F57C00; border: 3px solid #FFF; box-shadow: 0 3px 10px rgba(0,0,0,.28); transition: left .1s ease-out; pointer-events: none; }
.thermo-ends { display: flex; justify-content: space-between; font-size: 11.5px; color: #8C7A64; margin-top: 8px; }

/* ===== v10：心理报告 ===== */
.report-status { margin: 10px 0; }
.report-status .hint.warn { color: #E07856; background: rgba(224,120,86,.1); border-radius: 12px; padding: 10px 14px; }
.report-loading { text-align: center; padding: 30px 10px; color: #8C7A64; font-size: 14px; }
.report-view { margin-top: 12px; }
.report-view:empty { display: none; }
.report-actions { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.report-history { margin-top: 22px; }
.report-history h3 { font-size: 14px; color: #8C7A64; margin-bottom: 10px; }
.report-list { display: grid; gap: 8px; }
.report-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(255,255,255,.7);
  border: 1.5px solid #EADFCC; border-radius: 14px; padding: 10px 14px; }
.report-item .ri-main b { display: block; font-size: 13.5px; color: #4E3B2A; }
.report-item .ri-main span { font-size: 11.5px; color: #8C7A64; }
.report-item .ri-acts { display: flex; gap: 6px; }
.btn-primary:disabled { opacity: .55; cursor: wait; }

/* ===== v11：功能页标题栏「回到主页」提示 ===== */
.bar-hint { flex: 0 1 auto; min-width: 0; margin-left: 10px; font-size: 11.5px; color: #B09A7E;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: none; }
.feature-title { flex-shrink: 0; white-space: nowrap; }
/* 小屏：提示单独占一行，避免挤压标题和工具按钮 */
@media (max-width: 560px) {
  .feature-bar { flex-wrap: wrap; row-gap: 2px; }
  .bar-tools { flex-basis: 100%; justify-content: flex-end; margin-left: auto; }
  .bar-hint { order: 3; flex-basis: 100%; margin-left: 0; text-align: right; }
}

/* ===== v13：首页主图下方文案 ===== */
.home-tagline {
  position: fixed; left: 50%; bottom: 13.5%; transform: translateX(-50%);
  z-index: 6; pointer-events: none; width: max-content; max-width: 82vw;
  font-size: 13px; line-height: 1.9; color: #A08B6E; text-align: center;
  text-shadow: 0 1px 0 rgba(255,255,255,.8);
  transition: opacity .4s;
}
body:not(.on-home) .home-tagline { opacity: 0; }
@media (max-height: 700px) { .home-tagline { bottom: 15%; font-size: 12px; } }

/* ===== v14：横屏布局（河马在左，首页文案 / 功能面板在右） ===== */
@media (orientation: landscape) and (max-height: 540px) {
  /* 首页：文案移到右侧垂直居中，与左半区河马呼应 */
  .home-tagline {
    left: auto; right: 7vw; top: 50%; bottom: auto;
    transform: translateY(-50%);
    max-width: 36vw; text-align: left; line-height: 2.15; font-size: 12.5px;
  }
  /* 首页提示气泡：跟随文案区放右下，左半区留给河马 */
  .home-hint { left: auto; right: 7vw; bottom: 10%; transform: none; }
  /* 功能页：面板占右侧，顶部与河马视线齐平，留足呼吸感 */
  .feature-view {
    top: 24vh; left: auto; right: 18px; bottom: 16px;
    width: 54%; max-width: 660px; margin: 0;
  }
}

/* ===== v18：聊天双模式切换（日常陪伴 / 树洞倾诉合并） ===== */
.chat-mode-switch {
  display: inline-flex; background: rgba(255,255,255,.75); border: 1px solid rgba(160,140,110,.25);
  border-radius: 999px; padding: 2px; gap: 2px; flex: 0 0 auto;
}
.mode-opt {
  border: 0; background: transparent; cursor: pointer; white-space: nowrap;
  font-size: 12px; padding: 5px 12px; border-radius: 999px; color: #A08B6E;
  font-family: inherit; transition: all .2s;
}
.mode-opt.active { background: var(--teal, #26A69A); color: #fff; font-weight: 600; box-shadow: 0 2px 6px rgba(38,166,154,.3); }
#view-chat .treehole-messages .message .speaker { color: #2E7D32; }

/* ===== v18：心理知识模块 ===== */
.knowledge-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.kb-card {
  background: rgba(255,255,255,.9); border: 1px solid rgba(160,140,110,.18); border-radius: 14px;
  padding: 14px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 8px;
  transition: transform .18s, box-shadow .18s; text-align: left;
}
.kb-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(120,100,70,.14); }
.kb-head { display: flex; justify-content: space-between; align-items: center; }
.kb-cat { font-size: 11px; color: #fff; padding: 2px 9px; border-radius: 999px; }
.kb-time { font-size: 11px; color: #B09A7E; }
.kb-card h3 { margin: 0; font-size: 15px; color: #5B4A36; line-height: 1.45; }
.kb-card p { margin: 0; font-size: 12.5px; color: #8D7B63; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kb-read { font-size: 12px; color: var(--teal, #26A69A); align-self: flex-end; }
.knowledge-reader { max-width: 720px; }
.kb-article { background: rgba(255,255,255,.92); border: 1px solid rgba(160,140,110,.18); border-radius: 16px; padding: 26px 30px; margin-top: 12px; }
.kb-article h2 { margin: 0 0 8px; font-size: 20px; color: #5B4A36; }
.kb-meta { font-size: 12px; color: #B09A7E; padding-bottom: 14px; border-bottom: 1px dashed rgba(160,140,110,.25); margin-bottom: 14px; }
.kb-article p { font-size: 14px; line-height: 2; color: #6B5A45; margin: 0 0 12px; }
.kb-foot { margin-top: 18px; padding-top: 12px; border-top: 1px dashed rgba(160,140,110,.25); font-size: 12px; color: #B09A7E; }

/* ===== v19：河马小课堂（视频课程） ===== */
.classroom-lock {
  text-align: center; padding: 34px 20px; background: rgba(255,255,255,.85);
  border: 1px dashed rgba(160,140,110,.35); border-radius: 16px; margin-bottom: 14px;
}
.classroom-lock .lock-emoji { font-size: 34px; margin-bottom: 6px; }
.classroom-lock p { font-size: 13px; color: #8D7B63; margin: 0 0 14px; }
.classroom-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cr-card {
  background: rgba(255,255,255,.9); border: 1px solid rgba(160,140,110,.18); border-radius: 14px;
  overflow: hidden; cursor: pointer; transition: transform .18s, box-shadow .18s;
}
.cr-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(120,100,70,.14); }
.cr-cover {
  position: relative; height: 118px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #26A69A 0%, #4DB6AC 55%, #80CBC4 100%);
}
.cr-cover img { width: 100%; height: 100%; object-fit: cover; }
.cr-cover-ico { font-size: 40px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.2)); }
.cr-play-badge {
  position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.92); color: #26A69A; display: flex; align-items: center; justify-content: center;
  font-size: 14px; padding-left: 3px; box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.cr-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0,0,0,.25); }
.cr-prog i { display: block; height: 100%; background: #FFD54F; }
.cr-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.cr-cat { font-size: 11px; color: #fff; background: #26A69A; align-self: flex-start; padding: 2px 9px; border-radius: 999px; }
.cr-body h3 { margin: 0; font-size: 15px; color: #5B4A36; line-height: 1.45; }
.cr-body p { margin: 0; font-size: 12.5px; color: #8D7B63; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cr-dur { font-size: 11.5px; color: #B09A7E; }
.classroom-player { max-width: 760px; }
.cr-player-wrap {
  background: rgba(255,255,255,.92); border: 1px solid rgba(160,140,110,.18);
  border-radius: 16px; padding: 16px; margin-top: 12px;
}
.cr-player-wrap video, .cr-player-wrap iframe { width: 100%; aspect-ratio: 16/9; border-radius: 12px; background: #000; border: 0; display: block; }
.cr-novideo {
  aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ECE4D6, #F7F2E9); border-radius: 12px;
  color: #A08B6E; font-size: 15px;
}
.cr-hls-hint { font-size: 11.5px; color: #B09A7E; margin-top: 6px; }
.cr-info { padding: 14px 4px 4px; display: flex; flex-direction: column; gap: 7px; }
.cr-info h2 { margin: 0; font-size: 18px; color: #5B4A36; }
.cr-info p { margin: 0; font-size: 13px; color: #8D7B63; line-height: 1.8; }
