* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #F5F1E5; --card: #FFFDF2; --border: #E2D7A3; --accent: #D4A017;
  --text: #3D3212; --text-light: #8A7B4B; --blue: #2563eb;
}
body { font-family: -apple-system, "PingFang SC", "Helvetica Neue", sans-serif; background: var(--bg); color: var(--text); height: 100vh; height: 100dvh; overflow: hidden; }
#app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.page { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 0; }
#page-chat { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0; }

/* Tab bar - 扁平化 */
.tab-bar { display: flex; height: calc(54px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--border); flex-shrink: 0; order: 999; position: relative; z-index: 150; padding-bottom: env(safe-area-inset-bottom); }
.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: #999; font-size: 10px; cursor: pointer; }
.tab-item.active { color: var(--accent); }
.tab-icon { width: 23px; height: 23px; display: block; }
.tab-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab-text { font-size: 10px; }

/* Page header */
.page-header { padding: 12px; background: var(--card); border-bottom: 1px solid var(--border); }
.page-header h2 { font-size: 17px; }
.games-search { width: 100%; height: 36px; margin-top: 10px; padding: 0 12px; border: 1px solid #CBBF8A; border-radius: 10px; background: #FFFCF0; color: var(--text); font-size: 14px; }
.games-search:focus { outline: 2px solid rgba(212,160,23,.25); border-color: var(--accent); }

/* Games grid —— 真瀑布流（两列由 JS 生成，算法与手机小程序 games/list.vue 一致：奇数/偶数分列） */
.games-grid { display: flex; align-items: flex-start; gap: 10px; padding: 10px; }
.waterfall-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.game-card { background: var(--card); border-radius: 12px; overflow: hidden; border: 1px solid var(--border); cursor: pointer; display: flex; flex-direction: column; min-width: 0; }
.game-card:active { opacity: .85; }
/* 封面保持原始比例（widthFix 同款）：不裁不拉伸，卡片高低错落 —— 这是「瀑布流」的关键 */
.game-card-img { width: 100%; height: auto; object-fit: contain; background: #EDE5CE; display: block; }
.game-card-body { padding: 8px 10px; flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.game-card-name { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 另一语言的标题（中文界面显示英文名、英文界面显示中文名）2026-09-18 */
.game-card-sub { font-size: 11px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
/* 标签行允许折行（瀑布流本来就高低错落），但芯片自己不折字 */
.game-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.game-card-tags .tag-chip, .game-card-tag { white-space: nowrap; }
.game-card-tag { font-size: 10px; padding: 1px 5px; border-radius: 4px; background: #FFF7D6; color: #B8860B; }
/* 能力标签芯片（支持全卡 / 支持图片输出） */
.tag-chip { font-size: 10px; padding: 1px 6px; border-radius: 6px; font-weight: 600; white-space: nowrap; }
.tag-chip-cards { background: #E8F0FE; color: #2563EB; border: 1px solid #BBD3FB; }
.tag-chip-img { background: #E7F7EE; color: #0E9F6E; border: 1px solid #B7E7CE; }
.tag-chip-score { background: #F3E8FF; color: #7C3AED; border: 1px solid #D9C6F7; }
.loading { text-align: center; padding: 20px; color: var(--text-light); font-size: 13px; }
.games-sentinel { height: 1px;  display: block; width: 100%; margin: 0; padding: 14px 0 20px; border: 0; background: transparent; color: #8A7D45; font-size: 12px; text-align: center; }
.games-sentinel:active { color: var(--accent); }

/* Detail page */
.detail-header { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--border); }
.back-btn { background: none; border: none; color: var(--accent); font-size: 14px; cursor: pointer; padding: 4px 0; }
.detail-content { padding: 16px 16px 150px; }
.detail-mode-switch { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; height: 38px; margin: 0 0 16px; padding: 3px; border-radius: 20px; background: #EDE6CF; overflow: hidden; }
.detail-mode-thumb { position: absolute; z-index: 0; left: 3px; top: 3px; width: calc(50% - 3px); height: 30px; border-radius: 15px; background: var(--card); box-shadow: 0 2px 7px rgba(82,62,8,.14); transition: transform .24s ease; }
.detail-mode-tab { position: relative; z-index: 1; border: 0; background: transparent; color: var(--text-light); font-size: 12px; font-weight: 600; cursor: pointer; }
.detail-mode-tab.active { color: #8A6400; }
.detail-mode-panel { animation: detail-panel-in .18s ease; }
@keyframes detail-panel-in { from { opacity: .45; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.detail-hero { display: flex; gap: 14px; margin-bottom: 18px; }
.detail-img { width: 90px; height: 90px; border-radius: 10px; object-fit: contain; background: #EDE5CE; flex-shrink: 0; }
.detail-info { flex: 1; min-width: 0; }
.detail-info h1 { font-size: 18px; margin-bottom: 6px; }
.detail-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.detail-tag { font-size: 11px; padding: 2px 7px; border-radius: 5px; background: #FFF7D6; color: #B8860B; }
.detail-section { margin-bottom: 18px; }
.detail-section h3 { font-size: 15px; margin-bottom: 8px; }
.detail-section p { font-size: 13px; line-height: 1.6; color: #555; }
.exp-item { display: flex; align-items: center; gap: 10px; padding: 8px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; }
.exp-item-icon { width: 32px; height: 32px; border-radius: 6px; object-fit: contain; }
.exp-item-name { font-size: 13px; font-weight: 600; }
.detail-bottom { position: fixed; z-index: 180; left: 0; right: 0; bottom: calc(54px + env(safe-area-inset-bottom)); padding: 8px 16px; background: rgba(255,253,242,.94); border-top: 1px solid var(--border); box-shadow: 0 -4px 14px rgba(61,50,18,.08); backdrop-filter: blur(8px); }
.start-chat-btn { width: 100%; padding: 11px; background: var(--accent); color: #fff; border: none; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }

/* Chat header */
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--card); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.header-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; cursor: pointer; }
.header-thumb { width: 32px; height: 32px; border-radius: 6px; flex-shrink: 0; object-fit: contain; }
.header-info { flex: 1; min-width: 0; }
.chat-title { display: block; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-game-name { display: block; font-size: 11px; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-actions { display: flex; gap: 6px; flex-shrink: 0; }
.history-btn { font-size: 12px; color: var(--text-light); border: 1px solid var(--border); border-radius: 14px; padding: 3px 10px; background: none; cursor: pointer; }
.new-chat-btn { font-size: 12px; color: var(--accent); border: 1px solid var(--accent); border-radius: 14px; padding: 3px 10px; background: none; cursor: pointer; }

/* Chat area */
.chat { flex: 1; overflow-y: auto; padding: 10px 14px; -webkit-overflow-scrolling: touch; min-height: 0; }
.msg-row { display: flex; margin-bottom: 10px; }
.msg-row.user { justify-content: flex-end; }
.msg-row.assistant { justify-content: flex-start; }
.bubble { max-width: 85%; padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.6; word-wrap: break-word; }
.user-bubble { background: #E4EFFF; border: 1px solid #C2D4FF; border-bottom-right-radius: 4px; }
.assistant-bubble { background: var(--card); border: 1px solid var(--border); border-bottom-left-radius: 4px; max-width: 100%; width: 100%; }
.assistant-bubble.pending { color: var(--text-light); }
.assistant-bubble h1, .assistant-bubble h2, .assistant-bubble h3, .assistant-bubble h4, .assistant-bubble h5, .assistant-bubble h6 { color: #3D3212; line-height: 1.35; margin: 8px 0 5px; }
.assistant-bubble h1 { font-size: 18px; }
.assistant-bubble h2 { font-size: 16px; }
.assistant-bubble h3 { font-size: 15px; }
.assistant-bubble h4, .assistant-bubble h5, .assistant-bubble h6 { font-size: 14px; }
.assistant-bubble p { margin: 0 0 5px; }
.assistant-bubble hr { border: 0; border-top: 1px solid var(--border); margin: 8px 0; }
.assistant-bubble blockquote { margin: 6px 0; padding: 5px 9px; border-left: 3px solid var(--accent); background: #FFF9E8; color: #665A38; }
.assistant-bubble ul { margin: 4px 0 7px; padding-left: 20px; }
.assistant-bubble li { margin: 2px 0; }
.assistant-bubble code { background: #F0E8C8; border-radius: 3px; padding: 1px 4px; font-size: 12px; }
.assistant-bubble a { color: #8A6400; text-decoration: underline; }
.assistant-bubble.pending { color: var(--text-light); }
.assistant-bubble.pending::after { content: ' ···'; animation: mobile-pulse 1.2s infinite; }
@keyframes mobile-pulse { 0%,100% { opacity: .25; } 50% { opacity: 1; } }
.bubble img { max-width: 100%; border-radius: 6px; }
.disclaimer { margin-top: 6px; padding-top: 5px; border-top: 1px dashed rgba(0,0,0,.08); font-size: 10px; color: #aaa; text-align: center; }
.fb-error-btn { font-size: 10px; color: #EF4444; border: 1px solid rgba(239,68,68,.3); border-radius: 6px; padding: 2px 6px; margin-top: 4px; display: inline-block; cursor: pointer; }
.empty { text-align: center; padding: 30px 16px; color: var(--text-light); font-size: 13px; }
.game-welcome-card { display: flex; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 16px; }
.game-welcome-img { width: 60px; height: 60px; border-radius: 10px; margin-right: 10px; object-fit: contain; flex-shrink: 0; }
.game-welcome-info { flex: 1; min-width: 0; text-align: left; }
.game-welcome-title { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-welcome-tags { display: flex; gap: 5px; margin-top: 4px; }
.tag { font-size: 10px; padding: 1px 6px; border-radius: 4px; background: #FFF7D6; color: #B8860B; }
.quick-asks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-btn { display: flex; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px; cursor: pointer; }
.quick-btn:active { background: #F5F1E5; }
.quick-icon-wrap { width: 26px; height: 26px; border-radius: 6px; background: #FDF6E3; display: flex; align-items: center; justify-content: center; margin-right: 6px; font-size: 12px; flex-shrink: 0; }
.quick-text { font-size: 12px; font-weight: 500; }

/* Composer */
.composer { background: var(--card); border-top: 1px solid var(--border); padding: 6px 14px; margin-bottom: 0; flex-shrink: 0; }
.composer-tools { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tools-left { display: flex; align-items: center; gap: 6px; }
.game-chip { display: flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 14px; cursor: pointer; }
.chip-icon { width: 24px; height: 24px; border-radius: 6px; object-fit: contain; }
.chip-empty { width: 24px; height: 24px; border-radius: 6px; background: #EEF1FF; position: relative; }
.chip-empty::before, .chip-empty::after { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); background: #A08C4B; border-radius: 2px; }
.chip-empty::before { width: 12px; height: 2px; }
.chip-empty::after { width: 2px; height: 12px; }
.game-name { font-size: 11px; color: var(--text-light); }
.clear-btn { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; color: var(--text-light); font-size: 14px; cursor: pointer; }
.tools-right { display: flex; align-items: center; gap: 6px; }
.template-btn { padding: 3px 8px; background: #E8E0C8; border: 1px solid #C8B888; border-radius: 14px; font-size: 11px; color: #8A7B4B; cursor: pointer; }
.template-btn.active { background: #4CAF50; border-color: #388E3C; color: #fff; font-weight: 600; }
.input-bar { display: flex; gap: 8px; align-items: center; }
.input { flex: 1; background: #FFFCF0; border: 1px solid #CBBF8A; color: var(--text); border-radius: 8px; padding: 7px 10px; font-size: 13px; }
.input:focus { outline: 2px solid var(--accent); }
.send-btn { background: var(--accent); color: #fff; font-size: 13px; border-radius: 8px; padding: 7px 14px; border: none; cursor: pointer; flex-shrink: 0; }
.send-btn.stop { background: #c0392b; }

/* Account */
.account-content { padding: 14px; }
.account-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.account-row { display: flex; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid #F0E8C8; }
.account-row:last-child { border-bottom: none; }
.account-label { font-size: 13px; color: var(--text-light); }
.account-value { font-size: 13px; font-weight: 500; }
.account-btn { padding: 12px 14px; font-size: 13px; color: var(--text); cursor: pointer; border-bottom: 1px solid #F0E8C8; }
.account-btn:last-child { border-bottom: none; }
a.account-btn { display: block; text-decoration: none; }
.geo-links { margin: 0; padding: 9px 14px; font-size: 12px; color: var(--text-light); background: var(--card); border-bottom: 1px solid var(--border); }
.geo-links a { color: var(--accent); text-decoration: none; }
.geo-links .sep { margin: 0 6px; color: var(--text-light); opacity: .7; }
.account-btn:active { background: #F5F1E5; }
.dev-note { text-align: center; font-size: 11px; color: var(--text-light); margin-top: 16px; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 200; display: flex; align-items: flex-end; }
.modal-panel { width: 100%; max-height: 70vh; background: var(--card); border-radius: 14px 14px 0 0; padding: 14px; overflow-y: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.modal-head h3 { font-size: 15px; }
.modal-close { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--text-light); cursor: pointer; }
.contact-item { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text); font-size: 13px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; width: 100%; }
.contact-grid .contact-qrcode { max-width: min(160px, 42vw); max-height: 24vh; }
.contact-grid small { text-align: center; line-height: 1.35; }
.contact-item small { color: var(--text-light); }
.contact-qrcode { width: auto; max-width: min(210px, 68vw); max-height: 34vh; object-fit: contain; border-radius: 10px; display: block; }
.contact-divider { height: 1px; background: var(--border); margin: 18px 0; }
.search-input { width: 100%; background: #FFFCF0; border: 1px solid #CBBF8A; border-radius: 8px; padding: 7px 10px; font-size: 13px; margin-bottom: 10px; }
.game-item { display: flex; align-items: center; gap: 10px; padding: 8px; margin-bottom: 6px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.game-item:active { background: #F5F1E5; }
.game-item-icon { width: 36px; height: 36px; border-radius: 6px; object-fit: contain; }
.game-item-info { flex: 1; min-width: 0; }
.gi-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gi-scores { display: flex; gap: 6px; margin-top: 2px; font-size: 10px; color: #B45309; }

/* Feedback */
.fb-types { display: flex; gap: 6px; margin-bottom: 10px; }
.fb-type { flex: 1; padding: 7px; text-align: center; background: #F5F1E5; border: 1px solid var(--border); border-radius: 8px; font-size: 12px; color: var(--text-light); cursor: pointer; }
.fb-type.active { border-color: #2563eb; background: #E4EFFF; color: #2563eb; font-weight: 600; }
.fb-textarea { width: 100%; height: 90px; background: #FFFCF0; border: 1px solid #CBBF8A; border-radius: 8px; padding: 8px; font-size: 13px; resize: none; margin-bottom: 10px; }
.fb-submit { width: 100%; padding: 10px; background: #2563eb; color: #fff; border: none; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.rules-overview-section { margin-top: 4px; }
.rules-overview-head { position: sticky; top: 0; z-index: 3; padding: 2px 0 8px; background: var(--bg); }
.rules-overview-head h3 { margin: 0; }
.rules-overview-toc { width: 100%; height: 34px; margin-top: 7px; padding: 0 10px; border: 1px solid #D8CB95; border-radius: 8px; background: #FFFDF2; color: #5B4C20; font-size: 12px; text-overflow: ellipsis; }
.rules-overview-empty { padding: 28px 12px; border: 1px dashed var(--border); border-radius: 9px; text-align: center; color: var(--text-light); font-size: 12px; }
/* 规则简介登录锁（2026-09-21：不弹窗、只文字提示 + 说明可提问试用） */
.rules-locked { padding: 26px 14px; border: 1px dashed var(--border); border-radius: 9px; text-align: center; background: #FFFDF2; }
.rules-locked-icon { font-size: 26px; line-height: 1; margin-bottom: 8px; }
.rules-locked-title { font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 6px; }
.rules-locked-sub { font-size: 12px; color: var(--text-light); margin: 0; line-height: 1.6; }
.rules-overview-content { max-height: none; min-height: 180px; font-size: 12px; line-height: 1.65; color: #4A4A4A; background: #FFFDF2; border: 1px solid #E2D7A3; border-radius: 9px; padding: 11px 12px; overflow-wrap: anywhere; }
.rules-overview-content h1 { font-size: 15px; color: #3D3212; line-height: 1.35; margin: 2px 0 8px; }
.rules-overview-content h2 { font-size: 14px; color: #3D3212; line-height: 1.4; margin: 10px 0 6px; }
.rules-overview-content h3 { font-size: 13px; color: #3D3212; line-height: 1.4; margin: 9px 0 5px; }
.rules-overview-content h4, .rules-overview-content h5, .rules-overview-content h6 { font-size: 12px; color: #3D3212; margin: 7px 0 4px; }
.rules-overview-content p { margin: 0 0 5px; }
.rules-overview-content strong { color: #3D3212; }
.rules-overview-content ul { margin: 4px 0 7px; padding-left: 18px; }
.rules-overview-content li { margin: 2px 0; }
.rules-overview-content blockquote { margin: 6px 0; padding: 5px 8px; border-left: 3px solid var(--accent); background: #FFF9E8; }
.rules-overview-content hr { border: 0; border-top: 1px solid var(--border); margin: 8px 0; }
/* Markdown 表格：外层可横向滚动，宽度自适应不撑破详情容器 */
.rules-overview-content .md-table-wrap { margin: 7px 0 9px; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #E2D7A3; border-radius: 8px; background: #FFFFFF; }
.rules-overview-content table.md-table { border-collapse: collapse; width: 100%; font-size: 11.5px; line-height: 1.5; }
.rules-overview-content table.md-table th, .rules-overview-content table.md-table td { border: 1px solid #EADFBB; padding: 5px 7px; text-align: left; vertical-align: top; word-break: break-word; overflow-wrap: anywhere; }
.rules-overview-content table.md-table th { background: #F7F1DC; color: #3D3212; font-weight: 600; white-space: nowrap; }
.rules-overview-content table.md-table tbody tr:nth-child(even) td { background: #FFFDF7; }
.rules-overview-content p.md-oli { margin: 0 0 4px; }
.games-error {
  grid-column: 1 / -1;
  padding: 28px 16px;
  text-align: center;
  font-size: 13px;
  color: #8A7B4B;
  line-height: 1.7;
}
.games-retry {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 18px;
  border: 1px solid var(--accent);
  border-radius: 16px;
  color: #fff;
  background: var(--accent);
  font-weight: 600;
  font-size: 13px;
}

/* ===== 首页 ===== */
.home-hero {
  margin: 16px;
  padding: 28px 22px;
  background: linear-gradient(135deg, #D4A017, #B8860B);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.home-hero-bg { display: flex; align-items: center; }
.home-hero-icon { font-size: 42px; margin-right: 16px; }
.home-hero-title { font-size: 22px; font-weight: bold; color: #FFFDF2; }
.home-hero-desc { font-size: 13px; color: rgba(255,253,242,0.85); margin-top: 4px; }
.home-hero-arrow { font-size: 24px; color: #FFFDF2; }

.home-btn-row { display: flex; gap: 12px; margin: 12px 16px; }
.home-btn-card {
  flex: 1;
  background: #FFFDF2;
  border-radius: 14px;
  padding: 18px 12px;
  text-align: center;
  border: 1px solid #E8DFC0;
  cursor: pointer;
}
.home-btn-icon { font-size: 28px; display: block; }
.home-btn-label { font-size: 14px; color: #2C2416; font-weight: 600; margin-top: 6px; display: block; }

.home-forum { margin: 20px 16px; }
.home-forum-header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.home-forum-title { font-size: 18px; font-weight: bold; color: #2C2416; }
.home-forum-sub { font-size: 13px; color: #8A7B4B; }

.home-q-card {
  background: #FFFDF2;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid #E8DFC0;
  margin-bottom: 10px;
  cursor: pointer;
}
.home-q-header { display: flex; align-items: center; gap: 8px; }
.home-q-avatar { width: 32px; height: 32px; border-radius: 50%; background: #F0E8D0; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.home-q-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.home-q-username { font-size: 14px; color: #5A4E30; font-weight: 600; }
.home-q-game-tag { font-size: 11px; color: #D4A017; background: rgba(212,160,23,0.12); padding: 2px 10px; border-radius: 10px; margin-left: auto; }
.home-q-title { font-size: 16px; color: #2C2416; font-weight: 600; margin-top: 8px; }
.home-q-reply { font-size: 13px; color: #8A7B4B; margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-q-time { font-size: 11px; color: #B8AD8A; margin-top: 4px; }

.home-post-btn {
  margin: 16px 0;
  padding: 16px;
  background: #D4A017;
  border-radius: 14px;
  text-align: center;
  font-size: 16px;
  color: #FFFDF2;
  font-weight: bold;
  cursor: pointer;
}

/* ===== 组卡页 ===== */
.deck-tabs { display: flex; gap: 8px; margin: 0 16px 12px; }
.deck-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  background: #FFFDF2;
  border-radius: 10px;
  font-size: 14px;
  color: #8A7B4B;
  cursor: pointer;
}
.deck-tab.active { background: #D4A017; color: #FFFDF2; font-weight: 600; }

.deck-form { margin: 0 16px; }
.deck-label { font-size: 14px; color: #5A4E30; font-weight: 600; margin-bottom: 8px; }
.deck-select {
  width: 100%;
  padding: 14px;
  background: #FFFDF2;
  border-radius: 12px;
  border: 1px solid #E8DFC0;
  font-size: 15px;
  box-sizing: border-box;
}
.deck-textarea {
  width: 100%;
  padding: 14px;
  background: #FFFDF2;
  border-radius: 12px;
  border: 1px solid #E8DFC0;
  font-size: 15px;
  min-height: 100px;
  box-sizing: border-box;
  resize: vertical;
}
.deck-cycle-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.deck-cycle-tag {
  padding: 6px 14px;
  border-radius: 16px;
  background: #FFFDF2;
  border: 1px solid #E8DFC0;
  font-size: 13px;
  color: #5A4E30;
  cursor: pointer;
}
.deck-cycle-tag.active { background: #D4A017; color: #FFFDF2; border-color: #D4A017; }

.deck-submit {
  margin: 20px 0;
  padding: 16px;
  background: #D4A017;
  border-radius: 14px;
  text-align: center;
  font-size: 18px;
  color: #FFFDF2;
  font-weight: bold;
  cursor: pointer;
}
.deck-submit:disabled { opacity: 0.6; }

.deck-result {
  margin-top: 16px;
  background: #FFFDF2;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid #E8DFC0;
}
.deck-result-title { font-size: 16px; font-weight: bold; color: #2C2416; margin-bottom: 10px; }
.deck-result-content { max-height: 400px; overflow-y: auto; font-size: 14px; color: #5A4E30; line-height: 1.7; white-space: pre-wrap; }


/* ===== 论坛工具栏 ===== */
.forum-toolbar {
  display: flex;
  gap: 10px;
  padding: 12px 0 8px;
  align-items: center;
  flex-wrap: wrap;
}
.forum-btn {
  padding: 8px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #F5F1E5, #EDE7D3);
  border: 1.5px solid #D4C9A8;
  color: #5A4E30;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.forum-btn:active {
  transform: scale(0.96);
}
.forum-btn.primary {
  background: linear-gradient(135deg, #D4A017, #B8860B);
  border-color: #D4A017;
  color: #FFFDF2;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(212,160,23,0.3);
}
.forum-btn.active {
  background: linear-gradient(135deg, #E8DFC0, #D4C9A8);
  border-color: #D4A017;
  color: #2C2416;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(212,160,23,0.15);
}
.forum-search-wrap {
  flex: 1;
  position: relative;
  min-width: 140px;
}
.forum-search {
  width: 100%;
  height: 36px;
  background: #FFFDF2;
  border-radius: 18px;
  border: 1.5px solid #D4C9A8;
  padding: 0 32px 0 16px;
  font-size: 13px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.forum-search:focus {
  border-color: #D4A017;
  outline: none;
  box-shadow: 0 0 0 3px rgba(212,160,23,0.1);
}
.forum-search::placeholder {
  color: #B8AD8A;
}
.forum-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: #E8DFC0;
  border: none;
  color: #8A7B4B;
  font-size: 11px;
  cursor: pointer;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 联系我们：邮箱 */
.contact-mail { margin-top: 10px; text-align: center; font-size: 12.5px; color: #6B5E33; }
.contact-mail a { color: #B8860B; text-decoration: none; border-bottom: 1px dashed rgba(184,134,11,.5); }

/* 诡镇组卡（站内页）：独立滚动容器，避免被 page-home 的 overflow:hidden 裁掉 */
.deck-page { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.deck-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 78px; }

/* 行内引用折叠块（2026-10-23） */
.cl-cite { margin: 6px 0 10px; border-left: 3px solid #D4A017; background: #FBF6E3; border-radius: 0 6px 6px 0; }
.cl-cite > summary { cursor: pointer; list-style: none; padding: 6px 10px; font-size: 12.5px; color: #8A6A12; font-weight: 600; }
.cl-cite > summary::-webkit-details-marker { display: none; }
.cl-cite > summary::before { content: '▸ '; }
.cl-cite[open] > summary::before { content: '▾ '; }
.cl-cite .cl-cite-b { padding: 2px 10px 8px; font-size: 12.5px; line-height: 1.65; color: #4A3D1C; white-space: normal; }


/* ===== 引用来源（每条各自折叠；2026-10-27 v4） ===== */
.src-list { margin: 8px 0 4px; }
.src-item { border: 1px solid #E8E0CC; border-radius: 9px; background: #FFFDF2; margin-bottom: 5px; overflow: hidden; }
.src-row { display: flex; align-items: center; gap: 6px; padding: 6px 9px; cursor: pointer; user-select: none; }
.src-idx { flex: 0 0 auto; width: 15px; height: 15px; border-radius: 4px; background: rgba(212,160,23,.13);
  color: #8A6A0F; font-size: 9.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.src-label { flex: 0 0 auto; font-size: 11.5px; font-weight: 600; color: #2B2A26; }
.src-peek { flex: 1 1 auto; min-width: 0; margin-left: 6px; font-size: 11px; color: #8E8878;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.src-pg { font-size: 9.5px; color: #8A6A0F; background: rgba(212,160,23,.10);
  border: 1px solid rgba(212,160,23,.22); border-radius: 999px; padding: 0 5px; line-height: 13px; }
.src-chev { margin-left: auto; color: #B9B3A2; transition: transform .16s; }
.src-item.open .src-chev { transform: rotate(180deg); }
.src-body { display: none; padding: 0 9px 8px 30px; font-size: 11px; line-height: 1.55; color: #6B6656; }
.src-item.open .src-body { display: block; }
