/* 问道长生 · 宣纸白底浅色系(规范 4.5 配色) */
:root {
  --paper: #FBF8F1;
  --bg: #F3EDE0;
  --card-border: #E8E2D4;
  --ink: #3F3A34;
  --ink-strong: #2B2620;
  --muted: #8C8578;
  --gold: #C9A45C;
  --jade: #6FA698;
  --zhu: #C05F55;
  --purple: #8B6FA8;
  --peach: #D88FA5;
  --azure: #7FA8C9;
  --bamboo: #8FBFA0;
  --rule-bg: #E8E4DC;
}

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

html, body { height: 100%; }

body {
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  position: relative;
}
/* 淡墨远山背景(纯 CSS) */
body::before {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 38% at 18% 92%, rgba(111, 166, 152, 0.09), transparent),
    radial-gradient(ellipse 48% 32% at 72% 96%, rgba(139, 111, 168, 0.08), transparent),
    radial-gradient(ellipse 42% 28% at 45% 100%, rgba(201, 164, 92, 0.07), transparent),
    radial-gradient(ellipse 60% 25% at 90% 90%, rgba(111, 166, 152, 0.06), transparent);
}

/* ===== 顶栏 ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 22px;
  background: var(--paper);
  border-bottom: 2px solid var(--gold);
  flex: 0 0 auto;
  z-index: 10;
}
.topbar-left { display: flex; align-items: baseline; gap: 12px; }
.game-title {
  font-size: 1.35em;
  font-weight: 700;
  color: var(--jade);
  letter-spacing: 0.12em;
}
.game-sub { color: var(--muted); font-size: 0.85em; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.author { color: var(--muted); font-size: 0.82em; margin-right: 6px; }

button {
  font-family: inherit;
  font-size: 0.88em;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--jade);
  background: var(--paper);
  color: var(--jade);
  cursor: pointer;
  transition: all .15s;
}
button:hover { background: var(--jade); color: #fff; }
button.primary { background: var(--jade); color: #fff; }
button.primary:hover { background: #5d9485; }
button.danger { border-color: var(--zhu); color: var(--zhu); }
button.danger:hover { background: var(--zhu); color: #fff; }

/* ===== 布局 ===== */
.layout {
  display: flex;
  flex: 1 1 auto;
  overflow: hidden;
}

/* ===== 消息流 ===== */
.chat {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px 28px 120px;
  scroll-behavior: smooth;
}
.chat-inner { max-width: 780px; margin: 0 auto; }

.turn-card {
  background: var(--paper);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.turn-card.user {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 4px 8px;
}

.time-line {
  color: var(--gold);
  font-size: 0.95em;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.story-text {
  color: var(--ink);
  line-height: 1.95;
  font-size: 1.02em;
  margin-bottom: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}
.story-text:last-child { margin-bottom: 0; }

.player-line {
  text-align: right;
  color: var(--muted);
  font-size: 0.92em;
  font-style: italic;
}

.latex-block { margin: 10px 0; }
.latex-block:first-child { margin-top: 0; }

/* ===== LaTeX 面板组件 ===== */
.lx-panel {
  border: 2px solid var(--jade);
  background: var(--paper);
  border-radius: 12px;
  padding: 12px 18px;
  width: fit-content;
  max-width: 100%;
  margin: 8px 0;
}
.lx-array { display: block; }
.lx-row {
  display: block;
  line-height: 1.85;
  word-break: break-word;
  white-space: pre-wrap;
}
.lx-array > .lx-row:first-child { text-align: center; }
.lx-colorbox {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  line-height: 1.7;
  vertical-align: middle;
}
.lx-rule {
  display: inline-block;
  vertical-align: middle;
  border-radius: 2px;
  background: currentColor;
}
.lx-overline {
  display: block;
  border-top: 2px solid currentColor;
  margin: 5px 0;
  line-height: 0;
}
.lx-overline-inner { display: none; }
.lx-scale { display: inline-block; max-width: 100%; }
.lx-sp { display: inline-block; }
.lx-frac {
  display: inline-flex;
  flex-direction: column;
  vertical-align: middle;
  text-align: center;
  margin: 0 2px;
}
.lx-frac-top { border-bottom: 1px solid currentColor; padding: 0 4px; line-height: 1.3; }
.lx-frac-bot { padding: 0 4px; line-height: 1.3; }

/* 天道推演中 */
.divining {
  color: var(--muted);
  font-size: 0.95em;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px;
}
.divining-ring {
  width: 14px;
  height: 14px;
  border: 2px solid var(--gold);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  flex: 0 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.divining .dots::after { content: '…'; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '·'; } 50% { content: '··'; } 75% { content: '···'; } }

/* ===== 结构化模板面板 ===== */
.tpl-panel {
  border: 2px solid var(--jade);
  background: var(--paper);
  border-radius: 12px;
  padding: 10px 16px 12px;
  max-width: 100%;
  margin: 0;
}
.tpl-block { margin: 8px 0; }
.tpl-title {
  text-align: center;
  font-size: 1.15em;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: 8px;
  margin-bottom: 2px;
}
.tpl-hr {
  height: 0;
  border-top: 2px solid var(--gold);
  margin: 6px 0;
  opacity: 0.9;
}
.tpl-line {
  line-height: 1.85;
  word-break: break-word;
  color: var(--ink);
}
.tpl-note {
  line-height: 1.7;
  font-size: 0.85em;
  color: var(--muted);
  word-break: break-word;
}
.tpl-danger {
  color: var(--zhu);
  font-weight: 700;
  line-height: 1.7;
}
.tpl-warn .tpl-title { margin-bottom: 2px; }

/* 输入提示选项:点击聚焦输入框 */
.tpl-input-hint { border-style: dashed; }
.tpl-input-go {
  color: var(--jade);
  font-size: 0.8em;
  font-weight: 700;
  flex: 0 0 auto;
}
.tpl-input-hint:hover .tpl-input-go { color: var(--ink-strong); }

/* 选项行:整体一个按钮,label 融入其中,不再有分离的"格子"感 */
.tpl-option, .lx-option {
  cursor: pointer;
  border: 1px solid rgba(111, 166, 152, 0.45);
  background: #FFFDF8;
  border-radius: 8px;
  padding: 7px 12px;
  margin: 4px 0;
  transition: all .15s;
  border-left: 3px solid var(--jade);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tpl-option:hover, .lx-option:hover {
  background: rgba(111, 166, 152, 0.14);
  border-color: var(--jade);
  box-shadow: 0 1px 4px rgba(111, 166, 152, 0.25);
}
.tpl-option.selected, .lx-option.selected {
  background: rgba(201, 164, 92, 0.16);
  border-color: var(--gold);
  border-left-color: var(--gold);
  box-shadow: 0 1px 5px rgba(201, 164, 92, 0.3);
}
.tpl-option.committed, .lx-option.committed { opacity: 0.6; }
.tpl-opt-btn {
  display: inline-block;
  min-width: 24px;
  text-align: center;
  padding: 1px 7px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.88em;
  flex: 0 0 auto;
}
.tpl-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.76em;
  font-weight: 700;
  flex: 0 0 auto;
}
.tpl-opt-text { color: var(--ink-strong); flex: 1 1 auto; }

/* 多选「确定」按钮 */
.tpl-confirm-row { margin-top: 10px; text-align: right; }
.tpl-confirm {
  font-family: inherit;
  font-size: 0.9em;
  padding: 6px 20px;
  border-radius: 8px;
  border: 1px solid var(--jade);
  background: var(--paper);
  color: var(--jade);
  cursor: pointer;
  transition: all .15s;
}
.tpl-confirm:hover { background: var(--jade); color: #fff; }
.tpl-confirm:disabled { opacity: 0.5; cursor: default; }

/* 回合内「行动」输入条 */
.tpl-actionbar {
  margin-top: 14px;
  border-top: 1px dashed var(--gold);
  padding-top: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.tpl-action-label {
  color: var(--gold);
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 0.05em;
  flex: 0 0 auto;
}
.tpl-action-input {
  flex: 1;
  font-family: inherit;
  font-size: 0.95em;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: #FFFDF8;
  color: var(--ink);
  outline: none;
  min-width: 120px;
}
.tpl-action-input:focus { border-color: var(--jade); }
.tpl-action-send {
  font-family: inherit;
  font-size: 0.92em;
  padding: 8px 20px;
  border-radius: 8px;
  border: 1px solid var(--jade);
  background: var(--jade);
  color: #fff;
  cursor: pointer;
  flex: 0 0 auto;
  transition: all .15s;
}
.tpl-action-send:hover { background: #5d9485; }
.tpl-action-send:disabled { opacity: 0.5; cursor: default; }

/* 战斗操作:五行灵气 + 回合指令 */
.tpl-combat-title {
  color: var(--zhu);
  font-size: 0.82em;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.tpl-combat-elems { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.tpl-elem {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.85em;
  font-weight: 700;
}

/* 地图:九州舆图 */
.tpl-map { display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
.tpl-region {
  background: #FFFDF8;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 8px 12px;
}
.tpl-region-name { color: var(--ink); font-weight: 700; font-size: 0.95em; }
.tpl-region-meta { color: var(--muted); font-size: 0.8em; margin-top: 2px; }

/* 背包:乾坤袋 */
.tpl-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFFDF8;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 6px 0;
  flex-wrap: wrap;
}
.tpl-item-name { color: var(--ink); font-weight: 700; font-size: 0.95em; }
.tpl-item-count { color: var(--gold); }
.tpl-item-desc { color: var(--muted); font-size: 0.8em; flex: 1 1 auto; }
.tpl-item-act {
  font-family: inherit;
  font-size: 0.82em;
  padding: 4px 14px;
  border-radius: 8px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  flex: 0 0 auto;
}
.tpl-item-act:hover { background: rgba(201, 164, 92, 0.14); }
.tpl-item-act:disabled { opacity: 0.5; cursor: default; }

/* 结局结算:天道锐评 */
.tpl-verdict { border-width: 2px; }
.tpl-verdict-score {
  text-align: center;
  font-size: 1.3em;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 0.1em;
  margin: 6px 0;
}
.tpl-verdict .tpl-line { font-size: 0.98em; }
.tpl-verdict-sharp {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(139, 111, 168, 0.12);
  color: #6a4e8f;
  font-weight: 700;
  line-height: 1.7;
}
.tpl-verdict-end { text-align: center; margin-top: 8px; }
.tpl-restart {
  font-family: inherit;
  font-size: 0.95em;
  padding: 9px 26px;
  border-radius: 8px;
  border: 1px solid var(--purple);
  background: var(--purple);
  color: #fff;
  cursor: pointer;
  transition: all .15s;
}
.tpl-restart:hover { background: #7a5f96; }

/* 输入表单(面板内填写) */
.tpl-form-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  flex-wrap: wrap;
}
.tpl-form-label {
  color: var(--ink);
  font-size: 0.95em;
  min-width: 52px;
  flex: 0 0 auto;
}
.tpl-form-input {
  flex: 1 1 200px;
  font-family: inherit;
  font-size: 0.95em;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: #FFFDF8;
  color: var(--ink);
  outline: none;
}
.tpl-form-input:focus { border-color: var(--jade); }
.tpl-form-submit {
  font-family: inherit;
  font-size: 0.92em;
  padding: 7px 22px;
  border-radius: 8px;
  border: 1px solid var(--jade);
  background: var(--jade);
  color: #fff;
  cursor: pointer;
  transition: all .15s;
}
.tpl-form-submit:hover { background: #5d9485; }
.tpl-form-submit:disabled { opacity: 0.5; cursor: default; }

/* 状态卡 */
.tpl-status .tpl-title { margin-bottom: 2px; }
.tpl-status .tpl-line { font-size: 0.95em; }

/* ===== 侧栏 ===== */
.sidebar {
  flex: 0 0 300px;
  transition: opacity .2s;
  overflow-y: auto;
  padding: 20px 16px;
  border-left: 1px solid var(--card-border);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* 启动画面阶段隐藏侧栏,进入游戏后显示 */
.sidebar.hidden { display: none; }
body.launch-mode .layout { justify-content: center; }
.side-card {
  background: #FFFDF8;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 16px;
}
.side-title {
  color: var(--jade);
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gold);
}
.side-body { color: var(--ink); font-size: 0.9em; line-height: 1.75; }
.side-body .lx-panel {
  border-width: 1px;
  padding: 8px 12px;
  width: 100%;
  margin: 0;
  font-size: 0.85em;
}
.side-body .lx-panel .lx-array > .lx-row { white-space: normal; }
.muted { color: var(--muted); font-size: 0.88em; }

/* 快捷指令 */
.cmd-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.cmd-chip {
  font-size: 0.82em;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--jade);
  color: var(--jade);
  background: transparent;
  cursor: pointer;
  transition: all .15s;
}
.cmd-chip:hover { background: var(--jade); color: #fff; }

/* ===== 输入栏 ===== */
.inputbar {
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
  padding: 14px 22px;
  background: var(--paper);
  border-top: 1px solid var(--card-border);
}
.inputbar input {
  flex: 1;
  font-family: inherit;
  font-size: 1em;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: #FFFDF8;
  color: var(--ink);
  outline: none;
}
.inputbar input:focus { border-color: var(--jade); }
.inputbar button { padding: 10px 26px; font-size: 1em; }

/* ===== 模态 ===== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(43, 38, 32, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-mask.hidden { display: none; }
.modal {
  background: var(--paper);
  border-radius: 14px;
  border-top: 4px solid var(--jade);
  width: 460px;
  max-width: 92vw;
  padding: 24px 28px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.modal h3 { color: var(--jade); margin-bottom: 16px; letter-spacing: .06em; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.85em; color: var(--muted); margin-bottom: 5px; }
.field input, .field select {
  width: 100%;
  font-family: inherit;
  font-size: 0.95em;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: #FFFDF8;
  color: var(--ink);
}
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.hint { font-size: 0.82em; color: var(--muted); line-height: 1.7; margin-top: 4px; }

/* 存档面板(轮回碑) */
.save-modal { width: 520px; max-width: 94vw; border-top: 4px solid var(--jade); }
.save-list { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 4px; }
.save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #FFFDF8;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 14px;
}
.save-info { flex: 1 1 auto; min-width: 0; }
.save-name { color: var(--ink); font-weight: 700; font-size: 0.95em; }
.save-desc { color: var(--muted); font-size: 0.8em; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.save-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.save-actions button {
  font-family: inherit; font-size: 0.85em; padding: 5px 14px;
  border-radius: 8px; border: 1px solid var(--jade);
  background: var(--paper); color: var(--jade); cursor: pointer;
}
.save-actions button:hover { background: var(--jade); color: #fff; }
.save-actions button.primary { background: var(--jade); color: #fff; }
.save-io { display: flex; gap: 10px; margin-top: 12px; }
.save-io button {
  flex: 1; font-family: inherit; font-size: 0.9em; padding: 8px 0;
  border-radius: 8px; border: 1px dashed var(--gold);
  background: transparent; color: var(--gold); cursor: pointer;
}
.save-io button:hover { background: rgba(201, 164, 92, 0.1); }

/* 诊断面板 */
.diag-modal { width: 640px; max-width: 94vw; border-top: 4px solid var(--purple); }
.diag-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.diag-stat {
  background: rgba(139, 111, 168, 0.1);
  color: #6a4e8f;
  border-radius: 999px;
  padding: 2px 12px;
  font-size: 0.8em;
  font-weight: 700;
}
.diag-list {
  max-height: 320px;
  overflow-y: auto;
  background: #FFFDF8;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.78em;
  line-height: 1.7;
  font-family: ui-monospace, monospace;
}
.diag-row { color: var(--ink); border-bottom: 1px dashed #EAE4D6; padding: 2px 0; word-break: break-all; }
.diag-row:last-child { border-bottom: none; }
.diag-meta { color: var(--zhu); }
.diag-error { color: var(--zhu); font-weight: 700; }
.diag-truncated { color: var(--zhu); }

/* 成本估算 */
.diag-cost {
  background: rgba(201, 164, 92, 0.1);
  color: #8a6d2f;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78em;
  margin-bottom: 8px;
}

/* 新手引导 */
.guide-modal { border-top: 4px solid var(--jade); }
.guide-list { margin: 6px 0 4px; padding-left: 20px; }
.guide-list li {
  color: var(--ink);
  line-height: 1.9;
  font-size: 0.93em;
  margin: 4px 0;
}

/* 修仙风格确认弹窗 */
.confirm-modal { border-top: 4px solid var(--gold); }
.confirm-msg {
  color: var(--ink);
  line-height: 1.9;
  font-size: 0.98em;
}

/* ===== 欢迎卡片 ===== */
.welcome-actions { display: flex; gap: 14px; margin-top: 16px; }
.badge {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  font-size: 0.72em;
  padding: 1px 8px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 6px;
}

/* ===== 流式光标 ===== */
.stream-cursor::after {
  content: '▍';
  color: var(--gold);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #D8D2C2; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== 启动画面(新世界开启页) ===== */
.launch-view {
  max-width: 620px;
  margin: 0 auto;
  padding: 48px 24px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.launch-view > * { opacity: 0; animation: launch-in .5s ease forwards; }
.launch-view > *:nth-child(1) { animation-delay: 0s; }
.launch-view > *:nth-child(2) { animation-delay: .1s; }
.launch-view > *:nth-child(3) { animation-delay: .18s; }
.launch-view > *:nth-child(4) { animation-delay: .26s; }
.launch-view > *:nth-child(5) { animation-delay: .34s; }
.launch-view > *:nth-child(6) { animation-delay: .42s; }
.launch-view > *:nth-child(7) { animation-delay: .5s; }
@keyframes launch-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.launch-trigram {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--jade);
  background: conic-gradient(from 0deg, var(--jade) 0 50%, #FBF8F1 50% 100%);
  animation: trigram-spin 14s linear infinite;
  box-shadow: 0 0 24px rgba(111, 166, 152, 0.35);
}
@keyframes trigram-spin { to { transform: rotate(360deg); } }
.launch-title {
  font-size: 2.4em;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  font-family: "KaiTi", "STKaiti", "Kaiti SC", serif;
}
.launch-sub { color: var(--muted); font-size: 0.9em; letter-spacing: 0.08em; }
.launch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 520px;
}
.launch-card {
  background: var(--paper);
  border: 1px solid rgba(111, 166, 152, 0.4);
  border-radius: 12px;
  padding: 14px 16px;
  transition: all .2s;
}
.launch-card:hover { border-color: var(--jade); box-shadow: 0 2px 10px rgba(111,166,152,.18); transform: translateY(-2px); }
.launch-card-title { color: var(--jade); font-weight: 700; font-size: 1.05em; letter-spacing: .1em; }
.launch-card-desc { color: var(--muted); font-size: 0.84em; margin-top: 4px; }
.launch-btn {
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
}
.launch-btn-main {
  margin-top: 10px;
  font-size: 1.15em;
  padding: 12px 46px;
  border-radius: 10px;
  border: none;
  background: var(--jade);
  color: #fff;
  letter-spacing: 0.12em;
  box-shadow: 0 3px 12px rgba(111, 166, 152, 0.4);
}
.launch-btn-main:hover { background: #5d9485; transform: translateY(-2px); box-shadow: 0 5px 16px rgba(111,166,152,.5); }
.launch-btn-sub {
  font-size: 0.95em;
  padding: 9px 30px;
  border-radius: 10px;
  border: 1px solid var(--jade);
  background: transparent;
  color: var(--jade);
}
.launch-btn-sub:hover { background: rgba(111, 166, 152, 0.12); }
.launch-btn-resume {
  font-size: 0.9em;
  padding: 9px 26px;
  border-radius: 10px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
}
.launch-btn-resume:hover { background: rgba(201, 164, 92, 0.14); }
.launch-footer {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 0.8em;
}
.launch-help {
  font-family: inherit;
  font-size: 0.85em;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 6px;
}
.launch-help:hover { color: var(--jade); }

/* ===== 移动端 ===== */
@media (max-width: 520px) {
  .launch-grid { grid-template-columns: 1fr; }
  .launch-title { font-size: 1.8em; }
  .launch-view { padding: 28px 16px 16px; }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    right: 0;
    top: 56px;
    bottom: 0;
    width: 78vw;
    max-width: 320px;
    transform: translateX(105%);
    transition: transform .25s;
    box-shadow: -4px 0 16px rgba(0,0,0,.12);
    z-index: 50;
  }
  .sidebar.open { transform: translateX(0); }
  .game-sub { display: none; }
  .chat { padding: 16px 14px 110px; }
  .turn-card { padding: 14px 16px; }
  .author { display: none; }
}

/* 调试用按钮:默认隐藏,仅 debug 模式(?debug=1)显示 */
.btn-debug { display: none; }
body.debug .btn-debug { display: inline-block; }

/* ===== 道号系统「随口一诺」===== */
.dao-modal { max-width: 460px; }
.dao-body { display: flex; flex-direction: column; gap: 10px; padding: 6px 2px; }
.dao-line { color: var(--muted, #8C8578); font-size: 0.92em; line-height: 1.7; margin: 0; }
.dao-token {
  font-family: 'Courier New', monospace; letter-spacing: 2px; text-align: center;
  font-size: 1.05em; padding: 10px 8px; margin: 4px 0;
  border: 1px dashed var(--border, #C9BFA9); border-radius: 6px; background: rgba(0,0,0,0.03);
  color: var(--accent, #8A6D3B); user-select: all;
}
.dao-body input {
  padding: 8px 10px; border: 1px solid var(--border, #C9BFA9); border-radius: 6px;
  background: var(--card, #FFFDF8); color: inherit; font-size: 0.95em; outline: none;
}
.dao-body input:focus { border-color: var(--accent, #8A6D3B); }
.dao-body button { padding: 8px 14px; border-radius: 6px; border: 1px solid var(--border, #C9BFA9); background: transparent; cursor: pointer; font-size: 0.92em; }
.dao-body button.primary { background: var(--accent, #8A6D3B); color: #FFF; border-color: transparent; }

/* 道号对话框内链接式按钮(登录入口等) */
.dao-link {
  background: transparent !important; border: none !important;
  color: var(--accent, #8A6D3B) !important; text-decoration: underline;
  font-size: 0.88em !important; padding: 4px 0 !important; cursor: pointer;
}
