/* css/detail.css — 网页版异兽详情（浅色，平移自 detail.wxss，rpx×0.5→px） */
.dt-root { max-width: 750px; }
.dt-card { background: #FFFFFF; border-radius: 10px; padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 6px rgba(0,0,0,0.04); }

.dt-loading, .dt-error-box { text-align: center; padding: 30px 12px; }
.dt-error-box { color: #B0533A; }

.dt-title-row { display: flex; align-items: baseline; gap: 8px; }
.dt-creature-name { font-size: 24px; font-weight: bold; color: #3A2E26; }
.dt-pinyin { font-size: 14px; color: #9C8F80; }
.dt-tag-row { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.dt-tag { font-size: 12px; color: #8B2941; background: rgba(139,41,65,0.08); padding: 4px 12px; border-radius: 14px; }

.dt-section-title { font-size: 16px; font-weight: bold; color: #8B2941; margin-bottom: 8px; }
.dt-classical { font-family: "Kaiti SC", "KaiTi", serif; font-size: 15px; line-height: 1.9; color: #4A3B2F; }
.dt-ability-list { display: flex; flex-wrap: wrap; gap: 8px; }
.dt-ability { font-size: 12px; color: #6B5D4F; background: rgba(139,41,65,0.06); padding: 6px 14px; border-radius: 20px; }

.dt-portrait-card { padding-bottom: 14px; }
.dt-beast-portrait { width: 100%; height: 360px; border-radius: 12px; display: block; margin-top: 8px; background: #0d1626; touch-action: none; }
.dt-beast-photo { width: 100%; height: 420px; border-radius: 12px; display: block; margin-top: 8px; background: #0d1626; border: 1px solid rgba(201,178,122,0.55); box-shadow: 0 6px 24px rgba(13,22,38,0.25); object-fit: contain; }
.dt-rotate-hint { text-align: center; font-size: 12px; color: #9C8F80; margin-top: 8px; }
.dt-copy2d-btn { display: block; width: 100%; margin-top: 12px; background: #8B2941; color: #FFFFFF; font-size: 15px; font-weight: bold; border: none; border-radius: 28px; padding: 11px 0; cursor: pointer; }
.dt-copy2d-btn:disabled { background: #C8AEB6; }
.dt-copy2d-btn:active { opacity: 0.9; }

.dt-story-card { border-left: 6px solid rgba(139,41,65,0.35); }
.dt-story-text { font-family: "Songti SC", "SimSun", serif; font-size: 15px; line-height: 2.0; color: #4A3B2F; text-align: justify; text-indent: 2em; }

/* 真图预览弹窗 */
.dt-modal-mask { position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,0.78); display: flex; align-items: center; justify-content: center; padding: 24px; }
.dt-modal { background: #14100C; border: 1px solid rgba(201,178,122,0.4); border-radius: 12px; padding: 16px; max-width: 92vw; max-height: 88vh; overflow: auto; text-align: center; }
.dt-modal-img { max-width: 100%; max-height: 70vh; border-radius: 10px; display: block; }
.dt-btn-row { margin-top: 12px; }
.dt-modal-close { background: linear-gradient(135deg, #B89340, #E8C97A); color: #241a14; border: none; border-radius: 22px; padding: 9px 28px; font-size: 14px; font-weight: bold; cursor: pointer; }

/* v10.1: 全图鉴网格 + 动漫成长序列 */
.dt-codex-section { margin-top: 8px; }
.dt-codex-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 12px; flex-wrap: wrap; }
.dt-codex-search { flex: 1 1 160px; max-width: 240px; border: 1px solid rgba(139,41,65,0.25); border-radius: 18px; padding: 8px 14px; font-size: 14px; outline: none; }
.dt-codex-search:focus { border-color: #8B2941; }
/* v25.2: 全图鉴网格只列名字（chip 流），点击跳详情看出处 */
.dt-codex-grid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 460px; overflow-y: auto; padding: 4px; align-content: flex-start; }
.dt-codex-cell { display: inline-flex; align-items: center; padding: 5px 12px; background: #fff; border: 1px solid rgba(139,41,65,0.14); border-radius: 14px; cursor: pointer; transition: transform .12s, box-shadow .12s, border-color .12s, background .12s; font: inherit; }
.dt-codex-cell:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(139,41,65,0.16); border-color: rgba(139,41,65,0.5); background: #fbf5f1; }
.dt-codex-name { font-size: 13px; color: #3A2E26; line-height: 1.2; }

.dt-growth-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 6px 0; }
.dt-growth-cell { text-align: center; }
.dt-growth-img { width: 96px; height: 96px; object-fit: contain; background: #faf6f1; border-radius: 12px; border: 1px solid rgba(139,41,65,0.10); }
.dt-growth-label { font-size: 12px; color: #8B2941; margin-top: 4px; font-weight: bold; }
.dt-growth-arrow { color: #C8AEB6; font-size: 20px; font-weight: bold; }

/* v11.0: 形态对决 */
.dt-morph-own { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.dt-morph-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex: none; }
.dt-morph-own-title { font-size: 15px; color: #3A2E26; font-weight: bold; }
.dt-morph-own-desc { font-size: 13px; color: #6B5D4F; line-height: 1.6; margin-top: 4px; }
.dt-morph-note { background: rgba(214,178,92,0.10); border: 1px solid rgba(214,178,92,0.35); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: #5C4D3A; line-height: 1.6; margin-bottom: 12px; }
.dt-morph-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .dt-morph-grid { grid-template-columns: repeat(3, 1fr); } }
.dt-morph-cell { background: #faf6f1; border: 1px solid rgba(139,41,65,0.10); border-radius: 10px; padding: 10px; transition: transform .12s, border-color .12s, box-shadow .12s; }
.dt-morph-cell:hover { transform: translateY(-2px); border-color: rgba(139,41,65,0.35); box-shadow: 0 4px 12px rgba(139,41,65,0.10); }
.dt-morph-cell.active { background: rgba(139,41,65,0.08); border-color: #8B2941; }
.dt-morph-cell-name { font-size: 14px; font-weight: bold; color: #3A2E26; margin-bottom: 5px; display: flex; align-items: center; gap: 5px; }
.dt-morph-self { font-size: 10px; color: #fff; background: #8B2941; padding: 1px 6px; border-radius: 8px; }
.dt-morph-cell-feat { font-size: 12px; color: #6B5D4F; line-height: 1.5; }

/* v11.0: 形态问答 · 涌现 */
.dt-quiz-q { font-size: 15px; font-weight: bold; color: #3A2E26; margin-bottom: 12px; line-height: 1.6; }
.dt-quiz-options { display: grid; gap: 8px; }
.dt-quiz-opt { text-align: left; background: #fff; border: 1px solid rgba(139,41,65,0.20); border-radius: 22px; padding: 10px 16px; font-size: 14px; color: #3A2E26; cursor: pointer; transition: background .12s, border-color .12s; }
.dt-quiz-opt:hover:not(:disabled) { background: rgba(139,41,65,0.06); border-color: rgba(139,41,65,0.45); }
.dt-quiz-opt.correct { background: rgba(76,175,80,0.15) !important; border-color: #4CAF50 !important; color: #2E7D32 !important; }
.dt-quiz-opt.wrong { background: rgba(244,67,54,0.12) !important; border-color: #F44336 !important; color: #C62828 !important; }
.dt-quiz-result { margin-top: 12px; }
.dt-quiz-ok { color: #2E7D32; font-weight: bold; font-size: 14px; margin-bottom: 6px; }
.dt-quiz-wrong { color: #C62828; font-size: 14px; margin-bottom: 8px; }
.dt-quiz-retry { background: #8B2941; color: #fff; border: none; border-radius: 18px; padding: 8px 18px; font-size: 13px; cursor: pointer; }
.dt-quiz-tip { margin-top: 10px; font-size: 12px; color: #9C8F80; text-align: center; }
.dt-emergence-line { font-size: 13px; color: #6B5D4F; line-height: 1.6; }
.dt-emergence-ability { display: inline-block; margin-top: 8px; font-size: 15px; font-weight: bold; color: #8B2941; background: linear-gradient(135deg, #F4E4B0, #E8C97A); padding: 8px 16px; border-radius: 20px; animation: dtEmergePop .5s ease; }
@keyframes dtEmergePop {
  0% { transform: scale(0.7); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ============================================================
v11.1: 形态对决小游戏（对战 + 问答夺能 + 能力谱/装备槽）
   ============================================================ */
.duel-wrap { margin-top: 4px; }
.duel-status { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.duel-chip { font-size: 12px; background: rgba(139,41,65,0.08); color: #8B2941; border: 1px solid rgba(139,41,65,0.25); padding: 4px 12px; border-radius: 14px; }
.duel-arena { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; margin-bottom: 12px; }
.duel-side { background: #FAF6EE; border: 1px solid rgba(139,41,65,0.18); border-radius: 12px; padding: 12px; text-align: center; min-height: 180px; display: flex; flex-direction: column; justify-content: center; }
.duel-vs { align-self: center; font-weight: 900; font-size: 20px; color: #8B2941; letter-spacing: 1px; }
.duel-face { width: 100%; max-height: 150px; object-fit: contain; border-radius: 8px; background: #0d1626; }
.duel-face-empty { display: flex; align-items: center; justify-content: center; height: 110px; font-size: 34px; color: #B0A48E; }
.duel-face-name { font-weight: 700; font-size: 15px; margin-top: 8px; color: #3A2E26; }
.duel-face-feat { font-size: 12px; color: #6B5D4F; margin-top: 4px; line-height: 1.5; }
.duel-empty { color: #9C8F80; font-size: 13px; margin: 6px 0 8px; }
.duel-empty-sub { color: #B0A48E; font-size: 12px; margin-top: 8px; line-height: 1.5; }
.duel-picks { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.duel-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.duel-cat { font-size: 12px; padding: 5px 12px; border-radius: 14px; border: 1px solid rgba(139,41,65,0.25); background: #fff; color: #6B5D4F; cursor: pointer; }
.duel-cat:hover { border-color: #8B2941; }
.duel-cat.on { background: #8B2941; color: #fff; border-color: #8B2941; font-weight: 700; }
.duel-cands { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.duel-pick { font-size: 12px; padding: 4px 10px; border-radius: 12px; border: 1px solid rgba(139,41,65,0.20); background: #fff; color: #3A2E26; cursor: pointer; }
.duel-pick:hover { border-color: #8B2941; }
.duel-pick.on { background: #D6B25C; border-color: #D6B25C; color: #3A2E26; font-weight: 700; }
.duel-pick.self { opacity: 0.45; cursor: not-allowed; }
.duel-compare { margin-bottom: 12px; }
.duel-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.duel-table th, .duel-table td { border: 1px solid rgba(139,41,65,0.15); padding: 6px 8px; text-align: left; color: #3A2E26; vertical-align: top; }
.duel-table th { background: rgba(139,41,65,0.06); white-space: nowrap; font-weight: 700; }
.duel-quiz-title { font-weight: 700; font-size: 14px; color: #8B2941; margin: 6px 0 10px; }
.duel-quiz-foot { margin-top: 8px; }
.duel-mini { font-size: 12px; margin-top: 8px; background: #fff; border: 1px solid rgba(139,41,65,0.3); color: #8B2941; border-radius: 12px; padding: 4px 12px; cursor: pointer; }
.duel-mini:hover { border-color: #8B2941; }
.duel-loadout { margin-top: 14px; border-top: 1px dashed rgba(139,41,65,0.25); padding-top: 6px; }
.duel-sub { font-size: 12px; color: #9C8F80; margin: 8px 0 6px; }
.duel-slots { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.duel-slot { min-width: 92px; padding: 8px 10px; border-radius: 10px; border: 1.5px dashed rgba(139,41,65,0.35); background: #fff; color: #B0A48E; font-size: 12.5px; cursor: pointer; text-align: center; }
.duel-slot.filled { border-style: solid; background: linear-gradient(135deg, #F4E4B0, #E8C97A); color: #3A2E26; font-weight: 700; }
.duel-slot.sel { outline: 2px solid #8B2941; outline-offset: 1px; }
.duel-bank { display: flex; flex-wrap: wrap; gap: 8px; }
.duel-bank-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: #fff; border: 1px solid rgba(214,178,92,0.55); border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 700; color: #8B6A1F; cursor: pointer; }
.duel-bank-card:hover { border-color: #8B2941; }
.duel-bank-src { font-size: 10.5px; font-weight: 400; color: #B0A48E; }
.dt-quiz-opt.disabled { opacity: 0.75; cursor: default; }
@media (max-width: 640px) {
  .duel-arena { grid-template-columns: 1fr; }
  .duel-vs { text-align: center; }
}

/* v11.1: 形态对决小游戏 */
.duel-status { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.duel-chip { font-size: 12px; background: rgba(139,41,65,0.08); color: #8B2941; border: 1px solid rgba(139,41,65,0.25); padding: 4px 12px; border-radius: 14px; }
.duel-arena { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; margin-bottom: 12px; }
.duel-side { background: #faf6f1; border: 1px solid rgba(139,41,65,0.18); border-radius: 12px; padding: 12px; text-align: center; min-height: 180px; }
.duel-vs { align-self: center; font-weight: 900; font-size: 20px; color: #8B2941; }
.duel-face { width: 100%; max-height: 150px; object-fit: contain; border-radius: 8px; background: #0d1626; display: block; }
.duel-face-empty { height: 110px; display: flex; align-items: center; justify-content: center; font-size: 34px; color: #9C8F80; }
.duel-face-name { font-weight: 700; font-size: 15px; margin-top: 6px; color: #3A2E26; }
.duel-face-feat { font-size: 12px; color: #6B5D4F; margin-top: 4px; line-height: 1.5; }
.duel-empty { color: #9C8F80; font-size: 13px; margin: 18px 0 8px; }
.duel-empty-sub { color: #B0A48E; font-size: 12px; margin-top: 8px; line-height: 1.5; }
.duel-picks { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.duel-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.duel-cat { font-size: 12px; padding: 5px 12px; border-radius: 14px; border: 1px solid rgba(139,41,65,0.25); background: #fff; color: #6B5D4F; cursor: pointer; }
.duel-cat.on { background: #8B2941; color: #fff; border-color: #8B2941; font-weight: 700; }
.duel-cands { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.duel-pick { font-size: 12px; padding: 4px 10px; border-radius: 12px; border: 1px solid rgba(139,41,65,0.20); background: #fff; color: #3A2E26; cursor: pointer; }
.duel-pick:hover:not(:disabled) { border-color: #8B2941; }
.duel-pick.on { background: #D6B25C; border-color: #D6B25C; color: #3A2E26; font-weight: 700; }
.duel-pick.self { opacity: 0.45; cursor: not-allowed; }
.duel-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 12px; }
.duel-table th, .duel-table td { border: 1px solid rgba(139,41,65,0.15); padding: 6px 8px; text-align: left; color: #3A2E26; }
.duel-table th { background: rgba(139,41,65,0.06); white-space: nowrap; }
.duel-quiz-title { font-weight: 700; font-size: 14px; color: #8B2941; margin: 4px 0 10px; }
.duel-quiz-foot { margin-top: 8px; }
.duel-mini { font-size: 12px; margin-top: 8px; background: #fff; border: 1px solid rgba(139,41,65,0.3); color: #8B2941; border-radius: 12px; padding: 4px 12px; cursor: pointer; }
.duel-mini:hover { background: rgba(139,41,65,0.06); }
.duel-loadout { margin-top: 14px; }
.duel-sub { font-size: 12px; color: #9C8F80; margin: 10px 0 6px; }
.duel-slots { display: flex; gap: 8px; flex-wrap: wrap; }
.duel-slot { min-width: 92px; padding: 8px 10px; border-radius: 10px; border: 1.5px dashed rgba(139,41,65,0.35); background: #fff; color: #B0A48E; font-size: 12.5px; cursor: pointer; }
.duel-slot.filled { border-style: solid; background: linear-gradient(135deg, #F4E4B0, #E8C97A); color: #3A2E26; font-weight: 700; }
.duel-slot.sel { outline: 2px solid #8B2941; outline-offset: 1px; }
.duel-bank { display: flex; flex-wrap: wrap; gap: 8px; }
.duel-bank-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: #fff; border: 1px solid rgba(214,178,92,0.55); border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 700; color: #8B6A1F; cursor: pointer; }
.duel-bank-card:hover { border-color: #8B2941; }
.duel-bank-src { font-size: 10.5px; font-weight: 400; color: #B0A48E; }
.dt-quiz-opt.disabled { opacity: 0.75; cursor: default; }
@media (max-width: 640px) {
  .duel-arena { grid-template-columns: 1fr; }
  .duel-vs { text-align: center; }
}

/* ===== v11.2 形态对决：玩法说明 + 答题下一步引导 ===== */
.duel-howto { margin: 10rpx 0 14rpx; padding: 14rpx 18rpx; border: 1rpx dashed rgba(176,138,62,0.45); border-radius: 12rpx; background: rgba(201,162,39,0.06); color: #6E5836; font-size: 22rpx; line-height: 1.7; }
.duel-howto b { color: #8A6A2E; }
.dt-emergence-next { margin-top: 10rpx; padding: 12rpx 16rpx; border-radius: 12rpx; background: rgba(46,92,54,0.08); color: #2E5C36; font-size: 22rpx; line-height: 1.7; }

/* ===== v24（2026-09-12 用户反馈）：大类内细分 + 横向图卡排（同类异兽带图对比） ===== */
.duel-cats { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.duel-cand-group { margin: 2px 0 12px; }
.duel-cand-gtitle { font-size: 12px; font-weight: 700; color: #8B2941; opacity: .85; margin: 0 0 4px 2px; }
.duel-cand-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; padding: 2px 2px 8px; }   /* v28.1（2026-09-13）：候选区每行固定 7 只，超出自动换行（原为横向滚动条） */
.duel-pick.duel-pick-card { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 6px 4px; border-radius: 10px; }
.duel-pick-card .duel-pick-img { width: min(60px, 100%); aspect-ratio: 1 / 1; height: auto; object-fit: contain; border-radius: 8px; background: rgba(139,41,65,0.06); }
.duel-pick-card .duel-pick-nm { font-size: 11px; margin-top: 4px; line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
.duel-pick-card.on { outline: 2px solid #D6B25C; outline-offset: 1px; }
/* 窄屏适配：≤760px 用 4 列，≤480px 用 3 列 */
@media (max-width: 760px) { .duel-cand-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 480px) { .duel-cand-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ==== 异兽真名注音（ruby 头顶拼音，2026-09-13）==== */
ruby { ruby-position: over; }
ruby > rt { display: block; font-size: .58em; line-height: 1.05; color: rgba(201,178,122,.95); letter-spacing: .3px; text-align: center; font-style: normal; }
.codex-card-name rt, .dt-codex-name rt, .gh-beast-name rt, .gm-board-name rt, .gm-friend-row-name rt, .duel-pick-nm rt, .duel-pick rt, .gh-story-name rt { font-size: .55em; }
#dtName rt { font-size: .42em; letter-spacing: 1px; }

/* ================= v27（2026-09-13 用户指令）：形态对决约战（⚔ 挑战TA → 吞噬天帝应战） ================= */
.duel-foe-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.duel-challenge { background: #8B2941; color: #F7E9D8; font-weight: bold; border-color: #8B2941; }
.duel-challenge:hover { background: #A03350; border-color: #A03350; color: #fff; }
