:root {
  color-scheme: light;
  --page: #e7e7e7;
  --paper: #fff;
  --text: #202020;
  --muted: #666;
  --link: #28658c;
  --visited: #6d2b72;
  --line: #b9c7cc;
  --bar: #2d7199;
  --soft: #eef5f6;
  --green: #437c48;
  --red: #a73a31;
}

* { box-sizing: border-box; }
html { background: var(--page); }
body {
  width: min(100%, 680px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  color: var(--text);
  font-family: "SimSun", "宋体", serif;
  font-size: 16px;
  line-height: 1.55;
}
a { color: var(--link); text-decoration: underline; }
button, input, select, textarea { font: inherit; }
i, em { font-style: normal; }

.event-choices {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.event-choice-pair { padding: 12px 0; }
.event-choice-pair + .event-choice-pair { border-top: 1px solid var(--line); }
.event-choice-pair .command { width: 100%; }
.event-choice-preview {
  margin: 7px 2px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.event-choice-preview.is-disabled { color: var(--red); }
strong, b { font-weight: 400; }
small { font-family: inherit; font-style: normal; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.topbar {
  min-height: 40px;
  padding: 6px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 4px solid #1c4f73;
  border-bottom: 1px solid #1c4f73;
  background: #edf4f6;
}
.studio-link { display: flex; align-items: center; gap: 7px; text-decoration: none; }
.seal { display: none; }
.studio-link strong { color: #174f75; font-size: 17px; font-weight: 400; }
.studio-link small { display: none; }
.topbar-actions { display: flex; gap: 7px; }
.settings-button, .back-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--link);
  font-size: 13px;
  text-decoration: underline;
}

.wuxia-shell { width: 100%; padding: 0; }
.game-titlebar { display: none; }
.game-layout { display: block; }

/* WAP link navigation */
.game-categories {
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
}
.game-categories::before {
  content: "精武江湖";
  margin-right: 8px;
  color: #174f75;
  font-weight: 400;
}
.game-categories button {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0 7px;
  border: 0;
  border-right: 1px solid #777;
  border-radius: 0;
  background: transparent;
  color: var(--link);
  text-decoration: underline;
}
.game-categories button:last-child { border-right: 0; }
.game-categories button.is-active { color: var(--visited); font-weight: 400; }
.game-categories button > span, .game-categories button > small { display: none; }
.game-categories button > strong { font-weight: inherit; }
.nav-badge { margin-left: 2px; color: var(--red); font-size: 10px; }
.jianghu-tabs { display:flex; gap:0; padding:5px 9px; border-bottom:1px solid var(--line); background:#f4f0df; }
.jianghu-tabs[hidden] { display:none; }
.jianghu-tabs button { padding:1px 12px; border:0; border-right:1px solid #777; background:transparent; color:var(--link); text-decoration:underline; }
.jianghu-tabs button:last-child { border-right:0; }
.jianghu-tabs button.is-active { color:var(--visited); font-weight:700; }
.shop-item { display:grid; grid-template-columns:auto minmax(0,1fr) minmax(150px,auto); gap:10px; align-items:start; padding:10px 0; border-block:1px solid #7da0b6; }
.shop-item p { margin:3px 0; }
.shop-mark { width:38px; height:38px; display:grid; place-items:center; border:1px solid #8a5614; color:#8a5614; font-weight:700; }
#buyDustForm { display:grid; grid-template-columns:auto 80px; gap:5px 7px; align-items:center; }
#buyDustForm input { width:80px; padding:5px; border:1px solid #888; }
#buyDustForm small { grid-column:1 / -1; }
#buyDustForm button { grid-column:1 / -1; }
.shop-status { min-height:1.4em; color:var(--muted); }
.shop-status.is-error { color:#8b2525; }
@media (max-width:620px) { .shop-item { grid-template-columns:auto 1fr; } #buyDustForm { grid-column:1 / -1; } }

/* One-line player status, like the archived WAP pages */
.character-strip {
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  background: var(--soft);
  font-size: 13px;
}
.identity { display: flex; align-items: baseline; gap: 5px; }
.avatar { display: none; }
.identity strong, .identity div > span { display: inline; }
.identity div > span::before { content: " | "; color: #777; }
.resource { min-width: 125px; }
.resource-label { display: flex; gap: 4px; }
.resource-label strong { font-weight: 400; }
.bar { display: none; }
.hero-numbers { display: flex; gap: 10px; }
.hero-numbers strong { font-weight: 400; }

.adventure-panel, .character-panel {
  padding: 9px;
  border: 0;
  background: #fff;
}
.adventure-panel[hidden], .character-panel[hidden] { display: none; }
.adventure-panel { display: flex; flex-direction: column; }

.chapter-head {
  order: 1;
  padding: 5px 7px;
  border-top: 1px solid #7da0b6;
  border-bottom: 1px solid #7da0b6;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: #e8f1f5;
}
.chapter-head p { margin: 0; color: var(--muted); font-size: 12px; }
.chapter-head #chapterIndex { color: #202020; font-size: 18px; font-weight: 700 !important; line-height: 1.45; }
.chapter-head h2 { margin: 1px 0 0; color: #174f75; font-size: 15px; font-weight: 400 !important; }
.chapter-head .chapter-description { max-width: 440px; margin-top: 3px; color: #333; font-size: 13px; line-height: 1.6; }
.chapter-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.difficulty-badge, .danger-label {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--link);
  font-size: 14px;
  text-align: right;
}
.difficulty-badge strong, .difficulty-badge small,
.danger-label strong, .danger-label small { display: block; }
.difficulty-badge small { display: none; }
.danger-label small { display: none; }

.mobile-stage-toggle {
  order: 2;
  margin-top: 7px;
  padding: 0;
  border: 0;
  display: flex;
  gap: 8px;
  background: transparent;
  color: var(--link);
  text-decoration: underline;
}
.stage-map { order: 2; margin: 7px 0; }
.stage-map:not(.is-map-open) { display: none; }
.stage-act { margin: 4px 0; padding: 4px; border-top: 1px dotted #999; }
.stage-act summary { color: #174f75; cursor: pointer; }
.stage-act-map { display: grid; grid-template-columns: repeat(5,1fr); gap: 3px; }
.stage-node {
  padding: 3px;
  border: 0;
  background: transparent;
  color: var(--link);
  text-decoration: underline;
}
.stage-node span, .stage-node strong, .stage-node small { display: block; }
.stage-node small { color: var(--muted); font-size: 10px; }

.scene { order: 3; padding: 8px 0; display: block; }
.scene-copy { padding: 0; }
.scene-copy > p { margin: 5px 0 9px; color: #222; font-size: 17px; }
.reward-line { font-size: 13px; color: var(--muted); }
.reward-line strong { color: var(--green); }
.chapter-story, .growth-guide {
  margin: 6px 0;
  border: 0;
  border-top: 1px dotted #999;
  background: transparent;
}
.chapter-story summary, .growth-summary { padding: 5px 0; color: var(--link); cursor: pointer; }
.chapter-story-body, .growth-body { padding: 4px 0 7px; }

.enemy-box {
  margin-top: 8px;
  padding: 7px;
  border: 1px solid #9cb2bd;
  background: #f5f9fa;
}
.enemy-heading { display: flex; justify-content: space-between; }
.enemy-heading > div { min-width: 0; display: flex; align-items: baseline; overflow: hidden; white-space: nowrap; }
.enemy-heading span, .enemy-heading strong { display: inline; }
.enemy-heading > div > span::after { content: " · "; color: #777; }
.enemy-heading strong { color: #222; }
.enemy-hp { height: 6px; margin-top: 7px; background: #ddd; }
.enemy-hp i { height: 100%; display: block; background: var(--red); }
.enemy-tactics { margin-top: 5px; }
.enemy-phase, .enemy-weakness { display: none !important; }
.enemy-poise { padding: 4px 0; display: grid; grid-template-columns: 38px 1fr auto; gap: 6px; align-items: center; font-size: 13px; }
.enemy-poise > div { height: 5px; overflow: hidden; background: #ddd; }
.enemy-poise > div i { height: 100%; display: block; background: #9a7335; transition: width 180ms ease; }
.enemy-poise strong { font-weight: 400; }
.enemy-intent { padding: 4px 0; display: flex; justify-content: space-between; font-size: 13px; }
body:not(.is-fighting) .enemy-hp,
body:not(.is-fighting) .enemy-intent,
body:not(.is-fighting) .enemy-poise { display: none; }

.story-objective {
  order: 4;
  padding: 6px 0;
  border-top: 1px dotted #999;
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 7px;
  align-items: center;
}
.objective-progress span, .objective-progress strong,
.objective-copy span, .objective-copy strong, .objective-copy small { display: block; }
.objective-progress span, .objective-copy span, .objective-copy small { color: var(--muted); font-size: 11px; }
.objective-progress > div, .growth-progress > div { display: none; }

.growth-guide { order: 5; }
.preparation-panel { order: 6; padding: 6px 0; border-top: 1px dotted #999; }
.preparation-heading { display: flex; justify-content: space-between; }
.preparation-heading > div { display: flex; gap: 6px; }
.preparation-options { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 5px 12px; }
.preparation-options button { padding: 0; }
.mobile-briefing-toggle { display: none; }

.battle-record {
  order: 7;
  margin-top: 7px;
  padding: 0;
  border: 0;
  border-top: 1px solid #7da0b6;
  background: transparent;
}
.battle-record::before {
  content: "战斗记录";
  padding: 3px 6px;
  display: block;
  background: #e8f1f5;
  color: #174f75;
  font-weight: 400;
}
.log-summary, .log-toolbar { display: none; }
.combat-log { max-height: 170px; padding: 6px; overflow: auto; line-height: 1.75; }
.log-line { display: block; }
.log-mark, .log-line > small { display: none; }

.combat-meters, .battle-stats, .game-coach, .shortcut-hint { display: none !important; }
.action-bar {
  order: 11;
  padding: 6px 0;
  border-top: 1px dotted #999;
  display: flex;
  flex-wrap: wrap;
  gap: 3px 0;
}
.action-group, .prebattle-sheet, .combat-utility-sheet, .utility-sheet-card { display: contents; }
.action-group-title, .prebattle-toggle, .combat-utility-toggle, .utility-sheet-card > header { display: none; }

/* In WAP pages actions are links, not large app buttons. */
.command, .story-objective button, .preparation-panel button,
.panel-tab, .journey-tabs button, .side-panel button,
.world-card button, .log-toolbar button {
  min-height: 0;
  margin: 0;
  padding: 1px 7px;
  border: 0;
  border-right: 1px solid #777;
  border-radius: 0;
  background: transparent;
  color: var(--link);
  text-decoration: underline;
}
.command:last-child { border-right: 0; }
.command small { margin-left: 3px; display: inline; color: var(--muted); font-size: 10px; }
button:disabled { color: #aaa; cursor: not-allowed; }

body:not(.is-fighting) .combat-actions,
body:not(.is-fighting) .automation-actions,
body.is-fighting .journey-actions,
body.is-fighting .mobile-stage-toggle,
body.is-fighting .stage-map,
body.is-fighting .story-objective,
body.is-fighting .growth-guide,
body.is-fighting .scene-copy,
body.is-fighting .preparation-panel,
body.is-fighting #stanceButton,
body.is-fighting #companionAssistButton { display: none; }
body:not(.is-fighting) .support-actions { display: contents; }
body:not(.is-fighting) #stanceButton,
body:not(.is-fighting) #companionAssistButton { display: none !important; }
body:not(.is-fighting) #healButton { order: 5; border-right: 0; }
body.is-fighting .combat-actions,
body.is-fighting .support-actions,
body.is-fighting .automation-actions { display: contents; }

/* Other pages remain plain text lists. */
.panel-tabs, .journey-tabs { padding-bottom: 6px; display: flex; flex-wrap: wrap; }
.panel-tab.is-active { color: var(--visited); font-weight: 400; }
.side-panel { display: none; }
.side-panel.is-active { display: block; }
.category-heading { margin-bottom: 8px; padding: 4px 6px; border-block: 1px solid #7da0b6; background: #e8f1f5; }
.category-heading h2 { margin: 0; color: #174f75; font-size: 18px; }
.category-heading p { margin: 2px 0; font-size: 12px; }
.stat-list > div, .martial-option, .gear-slot, .inventory-item,
.companion-card, .daily-mission, .faction-card, .journey-card,
.identity-dossier, .point-banner, .build-choice, .blessing-choice,
.supply-box, .forge-wallet, .total-bonus, .mastery-banner,
.set-banner, .reputation-card, .side-panel details {
  padding: 6px 0;
  border: 0;
  border-bottom: 1px dotted #999;
  background: transparent;
}
.stat-list > div, .point-banner, .supply-box, .forge-wallet { display: flex; justify-content: space-between; gap: 8px; }
.martial-list, .gear-slots, .inventory, .companion-list,
.daily-mission-list, .faction-list, .journey-grid { display: block; }
.side-panel small, .side-panel span { color: var(--muted); }

.world-sidebar { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 10px;
  display: none;
  place-items: center;
  background: rgba(0,0,0,.65);
}
.modal.is-visible { display: grid; }
.modal-sheet {
  width: min(620px,100%);
  max-height: calc(100vh - 20px);
  padding: 12px;
  overflow: auto;
  border: 2px solid #2d7199;
  background: #fff;
  color: #222;
}
.modal button { color: var(--link); }
.settings-head, .setting-row { display: flex; justify-content: space-between; gap: 10px; }
.difficulty-sheet { width:min(440px,100%); }
.setting-row { padding: 7px 0; border-bottom: 1px dotted #999; }
.setting-options { display: flex; flex-wrap: wrap; gap: 4px; }
.global-notice { position: fixed; top: 5px; left: 50%; z-index: 120; padding: 5px 8px; background: #fff7cb; border: 1px solid #b59642; transform: translateX(-50%); }

@media (max-width: 520px) {
  body { font-size: 15px; }
  .topbar { display: flex; }
  .back-long { display: none; }
  .back-short { display: inline; }
  .game-categories { white-space: normal; }
  .game-categories::before { width: 100%; margin-bottom: 3px; display: block; }
  .game-categories button { margin-bottom: 3px; }
  .character-strip { display: block; }
  .identity, .resource, .hero-numbers { margin: 2px 0; }
  .chapter-head { display: block; }
  .chapter-meta { margin-top: 4px; }
  .scene-copy > p { font-size: 16px; }
  .story-objective { grid-template-columns: 1fr; }
  .stage-act-map { grid-template-columns: repeat(2,1fr); }
  .settings-head, .setting-row { display: block; }
}

/* Main page reduction: one event, one enemy, one decision. */
body:not(.is-fighting) .story-objective,
body:not(.is-fighting) .growth-guide,
body:not(.is-fighting) .preparation-panel,
body:not(.is-fighting) .chapter-story,
body:not(.is-fighting) .reward-line,
body:not(.is-fighting) .battle-record,
body:not(.is-fighting) .quick-prepare,
body:not(.is-fighting) .prebattle-toggle { display: none !important; }

body:not(.is-fighting) .scene { padding-bottom: 2px; }
body:not(.is-fighting) .enemy-box { margin-top: 5px; }
body:not(.is-fighting) .action-bar {
  margin-top: 4px;
  padding-top: 5px;
}
body:not(.is-fighting) .journey-actions { display: contents; }
body:not(.is-fighting) .prebattle-sheet { display: contents; }
body:not(.is-fighting) #challengeButton {
  order: 1;
  padding-left: 7px;
  border-left: 1px solid #777;
  border-right: 0;
  font-weight: 400;
}
body:not(.is-fighting) #healButton { order: 2; border-left: 1px solid #777; border-right: 0; }
body:not(.is-fighting) #challengeButton small,
body:not(.is-fighting) #healButton small { display: none; }
body:not(.is-fighting) #restButton { order: 3; border-left: 1px solid #777; border-right: 0; }
body:not(.is-fighting) #trialButton { order: 4; border-left: 1px solid #777; border-right: 0; }
body:not(.is-fighting) #sweepButton { order: 5; border: 0; border-inline: 1px solid #777; }

/* Battle reduction: enemy, short report and essential commands only. */
body.is-fighting .chapter-head,
body.is-fighting .chapter-meta,
body.is-fighting .combat-meters,
body.is-fighting .battle-stats,
body.is-fighting .game-coach,
body.is-fighting .combat-utility-toggle,
body.is-fighting .shortcut-hint,
body.is-fighting .enemy-phase,
body.is-fighting .enemy-weakness,
body.is-fighting .auto-style,
body.is-fighting #autoBattleButton,
body.is-fighting #stanceButton,
body.is-fighting #companionAssistButton { display: none !important; }

body.is-fighting .adventure-panel { padding-top: 5px; }
body.is-fighting .scene { padding-top: 0; }
body.is-fighting .enemy-box { margin-top: 0; }
body.is-fighting .enemy-tactics { margin-top: 3px; }
body.is-fighting .enemy-intent {
  padding: 3px 0 0;
  border-top: 1px dotted #aaa;
}
body.is-fighting .battle-record { margin-top: 6px; }
body.is-fighting .combat-log {
  max-height: 105px;
  padding: 4px 6px;
  line-height: 1.55;
}
body.is-fighting .log-line:nth-child(n+5) { display: none; }
body.is-fighting .action-bar {
  padding-top: 5px;
  gap: 2px 0;
}
body.is-fighting .combat-actions,
body.is-fighting .support-actions,
body.is-fighting .automation-actions { display: contents; }
body.is-fighting .command { padding-inline: 6px; }
body.is-fighting #attackButton { order: 1; }
body.is-fighting #skillButton { order: 2; }
body.is-fighting #ultimateButton { order: 3; }
body.is-fighting #guardButton { order: 4; }
body.is-fighting #healButton { order: 5; }
body.is-fighting #retreatBattleButton { order: 6; border-right: 0; }

/* Equipment quality and per-attribute comparison colors. */
.quality-common { color: #555; }
.quality-fine { color: #21833a; }
.quality-rare { color: #2468b5; }
.quality-epic { color: #873fb0; }
.quality-legendary { color: #d06400; }
.quality-mythic { color: #d40000; font-weight:700; text-shadow:0 0 1px #8b0000; }
.quality-common,
.quality-fine,
.quality-rare,
.quality-epic,
.quality-legendary { font-weight: 400; }

.item-compare { color: var(--muted); }
.compare-positive,
.delta-positive { color: #168238; font-weight: 400; }
.compare-negative,
.delta-negative { color: #c83232; font-weight: 400; }
.compare-even { color: #666; }
.loot-current strong { margin-left: 2px; }

/* Character, martial, equipment and guild pages: one clear reading order. */
.wallet-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 7px;
  padding: 5px 6px;
  border-block: 1px solid #7da0b6;
  background: #e8f1f5;
}
.wallet-balance strong { font-weight: 700; }

.character-panel .panel-tabs {
  margin: 0 0 7px;
  padding: 3px 0;
  border-bottom: 1px solid #7da0b6;
  gap: 0;
}
.character-panel .panel-tab { padding: 1px 8px; }
.character-panel .panel-tab:first-child { padding-left: 0; }
.character-panel .panel-tabs [data-category-group="character"] {
  min-height: 24px;
  padding: 2px 10px;
  font-family: "SimSun", "宋体", serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0;
  white-space: nowrap;
}
.character-panel .panel-tabs [data-category-group="character"].is-active {
  color: #551a8b;
  font-size: 14px;
  font-weight: 400;
}
.character-panel .panel-tabs [data-category-group="character"] span,
.character-panel .panel-tabs [data-category-group="character"] small,
.character-panel .panel-tabs [data-category-group="character"] strong {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
.section-intro {
  margin: 0 0 7px;
  padding: 4px 6px;
  border-block: 1px solid #7da0b6;
  background: #e8f1f5;
}
.section-intro strong { display: block; color: #174f75; font-size: 16px; }
.section-intro small { display: block; color: #66737b; font-size: 11px; }

#statsPanel.is-active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .72fr);
  gap: 7px 14px;
  align-items: start;
}
.attribute-level {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px;
  border-block: 1px solid #7da0b6;
  background: #e8f1f5;
}
.attribute-level strong { font-weight: 700; }
#statsPanel .status-attributes { grid-column: 1 / -1; margin-top: 4px; }
#statsPanel .section-intro,
#statsPanel .identity-dossier,
#statsPanel .build-choice,
#statsPanel .blessing-choice,
#statsPanel .stat-list { grid-column: 1 / -1; }
#statsPanel .point-banner { margin: 0; }
#statsPanel .growth-plan { display: flex; gap: 5px; align-items: center; }
#statsPanel .growth-plan select { min-width: 0; flex: 1; }
#statsPanel .stat-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 0 12px;
}
#statsPanel .stat-list > div { min-height: 44px; align-items: center; }
.stat-adjust { display: inline-flex; align-items: center; }
.stat-adjust button { min-width: 28px; padding-inline: 7px; text-decoration:none; }
.stat-confirm {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
  gap: 5px;
  padding: 5px 0;
  border-bottom: 1px dotted #999;
}
.stat-confirm button { padding-inline: 8px; }
.stat-confirm select { min-width:130px; max-width:160px; }
#statsPanel .xp-block { align-self: stretch; }

/* Identity reads as one restrained text line; reset browser i/em/strong defaults. */
#identityPanel .identity-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  padding: 6px 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
}
#identityPanel .identity-summary > i,
#identityPanel .identity-summary > em,
#identityPanel .identity-summary > b,
#identityPanel .identity-summary strong,
#identityPanel .identity-summary small {
  font: inherit;
  color: inherit;
}
#identityPanel .identity-summary > i,
#identityPanel .identity-summary > em { font-style: normal; }
#identityPanel .identity-summary > i,
#identityPanel .identity-summary > span,
#identityPanel .identity-summary > span small,
#identityPanel .identity-summary > span strong { display: inline-flex; align-items: center; }
#identityPanel .identity-summary > i::after,
#identityPanel .identity-summary > span small::after,
#identityPanel .identity-summary > span strong::after {
  content: "｜";
  margin: 0 5px;
  color: #7b858b;
}
#identityPanel .identity-summary > span strong { color: #174f75; }
#identityPanel .identity-summary > em { color: #59666d; }
#identityPanel .identity-summary > b { margin-left: auto; color: #59666d; }
#identityPanel .identity-dossier-grid,
#identityPanel .identity-dossier-grid strong,
#identityPanel .identity-dossier-grid small { font-family: inherit; font-style: normal; }
#identityPanel .identity-dossier-grid strong { font-size: 14px; font-weight: 400; }
#identityPanel .identity-summary > strong { color: #174f75; }
#identityPanel .identity-summary > span::before {
  content: "｜";
  margin: 0 5px;
  color: #7b858b;
}
#identityPanel .identity-summary > span { color: #59666d; }

.simple-heading {
  margin: 0;
  padding: 5px 0;
  border-bottom: 1px solid #7da0b6;
  color: #174f75;
  font-size: 14px;
  font-weight: 400;
}

#martialPanel.is-active { display: block; }
#martialPanel .build-presets { margin-bottom: 7px; }
#martialPanel .build-presets > div[role="region"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#martialPanel .build-presets > div[role="region"] > button {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  padding: 6px 5px 6px 0;
  border: 0;
  border-bottom: 1px dotted #9aa;
  background: transparent;
  color: #20282d;
  text-align: left;
  text-decoration: none;
  font: 400 14px/1.65 "SimSun", "宋体", serif;
}
#martialPanel .build-presets > div[role="region"] > button:nth-child(odd) { margin-right: 10px; }
#martialPanel .build-presets button strong,
#martialPanel .build-presets button small,
#martialPanel .build-presets button em {
  display: inline;
  font: inherit;
  font-style: normal;
  color: inherit;
}
#martialPanel .build-presets button > span { min-width: 0; }
#martialPanel .build-presets button strong::after,
#martialPanel .build-presets button small::after {
  content: "｜";
  margin: 0 5px;
  color: #7b858b;
}
#martialPanel .build-presets button strong { color: #174f75; }
#martialPanel .build-presets button small { color: #46555e; }
#martialPanel .build-presets button em { color: #68747a; }
#martialPanel .build-presets button.is-active { background: #eef6f8; }
#martialPanel .build-presets button:disabled { opacity: .68; }
#martialPanel .martial-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
#martialPanel .martial-option { margin: 0; padding: 6px; border: 1px dotted #9aa; }
#martialPanel .martial-option.is-equipped { background: #f0f7fa; border-color: #5f91ad; }
#martialPanel .companion-section { margin-top: 9px; padding-top: 6px; border-top: 1px solid #7da0b6; }
#martialPanel .companion-title { display: flex; justify-content: space-between; gap: 8px; }
#martialPanel .companion-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px; }
#companionPanel.is-active { display: block; }
#companionPanel .companion-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 12px; }
#companionPanel .companion-card { margin: 0; padding: 7px; border: 1px dotted #9aa; }

#gearPanel.is-active { display: block; }
#gearPanel .forge-wallet { margin-bottom: 7px; }
#gearPanel .gear-slots { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
#gearPanel .gear-slot { margin: 0; padding: 7px; border: 1px dotted #9aa; }
#gearPanel .gear-slot > span,
#gearPanel .gear-slot > strong,
#gearPanel .gear-slot > small { display: block; }
#gearPanel .gear-slot > strong { margin: 2px 0; }
#gearPanel .gear-slot > button { margin-top: 5px; padding-left: 0; }
#gearPanel .set-reforge { margin-top: 6px; padding-top: 5px; border-top: 1px dotted #aaa; }
#gearPanel .total-bonus { margin-top: 7px; padding: 5px 0; border-top: 1px solid #7da0b6; }
.status-attributes {
  margin-top: 8px;
  padding-top: 7px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  border-top: 1px solid #7da0b6;
}
.status-attributes > section + section { padding-left: 14px; border-left: 1px solid #9aa; }
.status-attributes h3 { margin: 0; padding: 4px 0; border-bottom: 1px dotted #999; color: #174f75; font-size: 14px; }
.status-attributes .derived-stats {
  margin: 0;
  padding: 6px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 3px 0;
}
.status-attributes .derived-stats > div { display: inline-flex; align-items: baseline; }
.status-attributes .derived-stats > div:not(:last-child)::after,
.gear-details > div > span:not(:last-child)::after {
  content: "｜";
  padding: 0 6px;
  color: #89969d;
}
.status-attributes .derived-stats dt { color: #66737b; }
.status-attributes .derived-stats dd { margin: 0 0 0 4px; font-weight: 700; }
.gear-details > div { padding: 3px 0 6px; }
.gear-details > div > span { padding: 3px 0; display: inline; }
.bag-overview {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: 5px 12px;
  padding: 7px 0;
  border-bottom: 1px dotted #999;
}
.bag-overview span { color: #66737b; }
#medicinePanel .supply-box,
#itemPanel .bag-tools,
#itemPanel .inventory-view,
.task-item-list { border-top: 1px solid var(--line); }
.task-item {
  display: grid;
  grid-template-columns: minmax(90px, auto) 1fr auto;
  gap: 8px;
  align-items: baseline;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
}
.task-item span { color: var(--muted); }
.task-item small { color: var(--green); }
.task-item-empty { margin: 0; padding: 14px 2px; color: var(--muted); border-bottom: 1px solid var(--line); }

footer {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--soft);
  text-align: center;
  font-size: 14px;
}
.item-list { border-top: 1px solid var(--line); }
.item-entry {
  display: grid;
  grid-template-columns: minmax(90px, auto) auto 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
}
.item-entry span { color: var(--text); }
.item-entry small { color: var(--muted); }

.character-feature-list > article { padding: 7px 0; border-bottom: 1px dotted #999; }
.character-feature-list > article header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 8px; }
.character-feature-list > article header strong,
.character-feature-list > article header span,
.character-feature-list > article p,
.character-feature-list > article small { display: block; }
.character-feature-list > article p { margin: 5px 0; }
.character-feature-list > article small { padding-top: 4px; border-top: 1px dotted #aaa; }
.character-feature-list > article button { margin-top: 5px; padding-left: 0; border-right: 0; }

.report-sheet,
.defeat-sheet { max-width: 560px; }
.report-head,
.defeat-head { padding-bottom: 7px; border-bottom: 1px solid #7da0b6; display: flex; align-items: center; gap: 10px; }
.report-head h2,
.defeat-head h2 { margin: 0; }
.report-head p,
.defeat-head p { margin: 3px 0 0; color: var(--muted); }
.report-grade,
.defeat-head > span { min-width: 34px; color: #8b5500; font-size: 24px; text-align: center; }
.report-stats { padding: 6px 0; border-bottom: 1px dotted #999; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.report-stats > div { padding: 0 7px; border-right: 1px solid #999; text-align: center; }
.report-stats > div:first-child { padding-left: 0; }
.report-stats > div:last-child { padding-right: 0; border-right: 0; }
.report-stats strong,
.report-stats span { display: block; }
.report-stats span { margin-top: 2px; color: var(--muted); }
.report-rewards { padding: 7px 0; border-bottom: 1px dotted #999; }
.report-rewards > span { display: block; color: var(--muted); }
.report-rewards > div { margin-top: 5px; display: flex; flex-wrap: wrap; }
.report-rewards i { padding: 0 8px; border-right: 1px solid #999; font-style: normal; }
.report-rewards i:first-child { padding-left: 0; }
.report-rewards i:last-child { border-right: 0; }
.report-rewards i strong { margin-right: 3px; color: #174f75; }
.report-streak,
.report-next { display: none !important; }
.report-actions,
.defeat-actions { padding-top: 8px; display: flex; flex-wrap: wrap; gap: 0; }
.report-actions button,
.defeat-actions button,
.defeat-sheet > .report-difficulty { padding: 2px 8px; border-right: 1px solid #777; }
.report-actions button:first-child,
.defeat-actions button:first-child,
.defeat-sheet > .report-difficulty { padding-left: 0; }
.report-actions button:last-child,
.defeat-actions button:last-child { border-right: 0; }
.defeat-advice,
.defeat-cost { padding: 7px 0; border-bottom: 1px dotted #999; }
.defeat-advice > span,
.defeat-advice > strong,
.defeat-advice > small { display: block; }
.defeat-advice > strong { margin-top: 3px; color: #174f75; }
.defeat-advice > small { margin-top: 4px; color: var(--muted); }

@media (max-width: 520px) {
  .report-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .report-stats > div { padding: 5px 7px; border-bottom: 1px dotted #bbb; }
  .report-stats > div:nth-child(2) { border-right: 0; }
  .report-stats > div:nth-last-child(-n+2) { border-bottom: 0; }
}

#gearPanel .identity-dossier { margin-bottom: 7px; padding: 7px 0; border-bottom: 1px solid #7da0b6; }
#gearPanel .identity-summary { display: flex; flex-wrap: wrap; gap: 3px 0; }
#gearPanel .identity-summary > span { display: inline-flex; align-items: baseline; color: var(--text); }
#gearPanel .identity-summary > span:not(:last-of-type)::after { content: "｜"; margin: 0 6px; color: #777; font-weight: 400; }
#gearPanel .identity-summary b,
#gearPanel .identity-summary strong { font-weight: 400; }
#gearPanel .identity-summary b { color: #59666d; }
#gearPanel .identity-summary strong { color: #174f75; }
#gearPanel .identity-title-choice select {
  max-width: 230px;
  margin-left: 3px;
  padding: 1px 4px;
  border: 1px solid #9aa;
  background: #fff;
  color: #174f75;
  font: inherit;
}
#gearPanel .identity-dossier-grid { margin-top: 6px; padding-top: 5px; border-top: 1px dotted #999; }
#gearPanel .identity-dossier-grid p { margin: 0; display: grid; grid-template-columns: 48px minmax(90px,auto) 1fr; gap: 6px; }
#gearPanel .identity-dossier-grid p > small { color: var(--muted); }
#gearPanel .guild-placeholder { margin: 5px 0 0; padding-top: 5px; border-top: 1px dotted #999; color: var(--muted); }
.social-hall { margin-top: 8px; padding-top: 7px; border-top: 1px dotted #999; }
.social-tabs { display:flex; gap:10px; align-items:center; margin-bottom:7px; }
.social-tabs button { padding:2px 0; border:0; border-bottom:2px solid transparent; }
.social-tabs button.is-active { border-bottom-color:var(--ink); font-weight:700; }
.social-tabs strong { margin-left:auto; color:#8a5614; }
#guildCreateForm { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0; }
#guildCreateForm input { min-width:180px; padding:5px 7px; border:1px solid #999; background:#fffdf5; }
#guildActions { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px 10px; margin:8px 0; padding:8px; background:#f7f1dd; border:1px solid #c6b886; }
#guildActions[hidden] { display:none; }
.guild-progress { grid-column:1 / -1; }
.guild-progress span { display:block; margin-bottom:4px; color:var(--muted); font-size:.88em; }
.guild-progress i { display:block; height:6px; overflow:hidden; background:#ded5b7; border-radius:6px; }
.guild-progress b { display:block; width:0; height:100%; background:#8a5614; transition:width .25s ease; }
#guildNoticeForm { grid-column:1 / -1; display:flex; gap:6px; }
#guildNoticeForm[hidden] { display:none; }
#guildNoticeForm input { flex:1; min-width:0; padding:5px 7px; border:1px solid #999; background:#fffdf5; }
#guildNoticeForm{grid-column:auto;max-width:430px;margin:0 0 8px;padding:5px;border:1px solid #b8c5cb;background:#f5f9fa;align-items:center}
#guildNoticeForm::before{content:"帮派宣言";flex:0 0 auto;color:#174f75;font-size:13px;font-weight:700}
#guildNoticeForm input{flex:1 1 180px;height:30px;padding:3px 6px}
#guildNoticeForm button{flex:0 0 auto;padding:4px 8px;white-space:nowrap}
.guild-routes { grid-column:1 / -1; display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.guild-routes button { padding:7px 4px; }
.guild-routes small { display:block; margin-top:2px; color:var(--muted); font-size:.78em; }
.guild-manage { grid-column:2; grid-row:1 / span 2; display:flex; gap:5px; align-self:center; }
.guild-manage button { position:static; padding:3px 6px; }
#guildList, #guildMemberList, #guildMissionList, #guildShopList, #guildBuildingList, #arenaList, #arenaRanking, #arenaSeasonRewards { display:grid; gap:5px; }
#guildMembers, #guildMissions, #guildShop, #guildBuildings { margin-top:9px; padding-top:7px; border-top:1px dotted #999; }
#guildMembers h3, #guildMissions h3, #guildShop h3, #guildBuildings h3 { margin:0 0 3px; font-size:1em; }
.guild-member-row em { margin-left:5px; color:#8b2525; font-style:normal; font-size:.82em; }
.guild-badge { display:inline-grid; place-items:center; width:20px; height:20px; margin-right:5px; color:#fff; background:#73501e; border-radius:50%; font-size:.75em; font-style:normal; }
.guild-mission.is-complete { background:linear-gradient(90deg,rgba(214,236,205,.65),transparent); }
.guild-building { padding-left:7px; border-left:3px solid #a98b54; }
#guildTreasury { margin:4px 0 7px; padding:6px; background:#f4f0df; }
.arena-tabs { border-bottom:1px dotted #999; }
.arena-rank-row { grid-template-columns:34px minmax(0,1fr); }
.arena-rank-row .rank-number { grid-row:1 / span 2; align-self:center; text-align:center; color:#8a5614; font-size:1.1em; }
.arena-rank-row p, .arena-rank-row small { grid-column:2; }
.arena-rank-row.is-self { margin-inline:-6px; padding-inline:6px; background:#fff4c9; }
.arena-opponent em { color:#8a5614; font-style:normal; font-weight:700; }
.arena-filters { display:flex; gap:6px; margin:6px 0; }
.arena-filters button { padding:3px 8px; border:1px solid #aaa; border-radius:12px; font-size:.82em; }
.arena-filters button.is-active { color:#fff; background:#73501e; border-color:#73501e; }
.arena-strategies { display:flex; flex-wrap:wrap; gap:5px; align-items:center; padding:6px; background:#f4f0df; }
.arena-strategies button { padding:3px 8px; }
.arena-strategies button.is-active { color:#fff; background:#73501e; }
.arena-strategies small { flex-basis:100%; color:var(--muted); }
.arena-rule-note { color:var(--muted); font-size:.86em; }
.season-honor { padding-left:8px; border-left:3px solid #8a5614; }
.social-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 10px; padding:6px 0; border-top:1px dotted #aaa; }
.social-row p, .social-row small { margin:0; }
.social-row button { grid-column:2; grid-row:1 / span 2; align-self:center; }
.social-message { min-height:1.4em; margin:6px 0 0; color:var(--muted); }
.social-message.is-error { color:#8b2525; }
.hero-name-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:7px; padding:6px 0; border-block:1px solid #7da0b6; }
.hero-name-row strong { color:var(--ink); }
.rename-hero-sheet { width:min(420px,100%); }
.rename-hero-sheet label, .rename-hero-sheet label input { display:block; width:100%; }
.rename-hero-sheet label input { margin-top:5px; padding:7px; border:1px solid #888; }
.rename-cost { padding:7px; background:#f4f0df; border:1px solid #b9aa79; }
#renameHeroStatus { min-height:1.4em; color:var(--muted); }
#renameHeroStatus.is-error { color:#8b2525; }
.rename-actions { display:flex; justify-content:flex-end; gap:12px; }
#arenaHistory { padding-left:22px; margin:8px 0 0; }
#arenaHistory li { position:relative; margin:5px 0; padding:5px 54px 5px 0; color:var(--muted); border-bottom:1px dotted #bbb; }
#arenaHistory li small { display:block; margin-top:2px; }
#arenaHistory li button { position:absolute; top:8px; right:0; padding:3px 6px; }
#arenaHistory li.is-win { color:#356b3c; }
#arenaHistory li.is-loss { color:#8b2525; }

@media (max-width: 620px) {
  #guildActions { grid-template-columns:1fr; }
  #guildActions > button { width:100%; }
  .guild-routes { grid-template-columns:1fr; }
  .guild-manage { grid-column:1 / -1; grid-row:auto; }
  #gearPanel .identity-summary > span { flex-basis: 100%; }
  #gearPanel .identity-summary > span:not(:last-of-type)::after { content: ""; margin: 0; }
  #gearPanel .identity-dossier-grid p { grid-template-columns: 48px 1fr; }
  #gearPanel .identity-dossier-grid p > small { grid-column: 2; }
}

#journeyPanel .category-heading { margin-bottom: 5px; }
#journeyPanel .journey-tabs { margin-bottom: 6px; padding: 0 0 5px; border-bottom: 1px dotted #999; }
#journeyPanel .journey-tabs button { flex: 1 1 22%; min-width: 115px; }
#journeyPanel .journey-tabs button strong,
#journeyPanel .journey-tabs button small { display: block; }
#journeyPanel .journey-tabs button small { margin-top: 2px; font-size: 11px; text-decoration: none; }
#journeyPanel .journey-tabs button.is-active { color: var(--visited); background: #f1f1e8; }
#journeyPanel .journey-view.is-active { display: block; }
#journeyPanel .journey-guide { margin: 0; padding: 6px 0 8px; border-bottom: 1px solid #aaa; color: var(--muted); }
#journeyPanel .journey-guide strong { color: #174f75; }
#journeyPanel .journey-section { margin: 0; padding: 9px 0; border-bottom: 1px solid #aaa; }
#journeyPanel .journey-section:last-child { border-bottom: 0; }
#journeyPanel .journey-section > header { margin-bottom: 7px; }
#journeyPanel .journey-section > header strong,
#journeyPanel .journey-section > header small { display: block; }
#journeyPanel .journey-section > header strong { color: #174f75; }
#journeyPanel .journey-section > header small,
#journeyPanel .journey-view-guide { color: var(--muted); }
#journeyPanel .journey-view-guide { margin: 2px 0 8px; padding-bottom: 7px; border-bottom: 1px dotted #999; }
#journeyPanel .daily-itinerary,
#journeyPanel .daily-contract,
#journeyPanel .reputation-card,
#journeyPanel .faction-section { margin: 0; }
#journeyPanel .daily-contract,
#journeyPanel .reputation-card,
#journeyPanel .faction-section,
#journeyPanel .cycle-summary,
#journeyPanel .mastery-summary,
#journeyPanel .bounty-board { margin-top: 7px; }
#journeyPanel .faction-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
#journeyPanel .faction-card { margin: 0; padding: 7px; border: 1px dotted #9aa; }

#journeyPanel .daily-itinerary > header,
#journeyPanel .daily-contract > header,
#journeyPanel .faction-title,
#journeyPanel .tower-card,
#journeyPanel .reputation-card > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 10px; }
#journeyPanel .daily-itinerary > header { padding-bottom: 5px; border-bottom: 1px dotted #aaa; }
#journeyPanel .itinerary-status { display: flex; gap: 0; }
#journeyPanel .itinerary-status > * { padding: 0 6px; border-right: 1px solid #999; }
#journeyPanel .itinerary-status > :last-child { padding-right: 0; border-right: 0; }
#journeyPanel .weekly-journey { margin: 6px 0; padding: 5px 0; border-block: 1px dotted #aaa; display: flex; flex-wrap: wrap; gap: 2px 0; }
#journeyPanel .weekly-journey > * { padding: 0 7px; border-right: 1px solid #999; }
#journeyPanel .weekly-journey > :first-child { padding-left: 0; }
#journeyPanel .weekly-journey > :last-child { padding-right: 0; border-right: 0; flex-basis: 100%; }
#journeyPanel .streak-track { padding: 4px 0 6px; }
#journeyPanel .streak-track span,
#journeyPanel .streak-track small { display: block; }
#journeyPanel .streak-track i { display: inline-block; min-width: 20px; margin-right: 3px; text-align: center; border-right: 1px solid #aaa; }
#journeyPanel .itinerary-tasks { border-top: 1px dotted #aaa; }
#journeyPanel .itinerary-tasks button { width: 100%; padding: 5px 0; border-right: 0; border-bottom: 1px dotted #aaa; display: grid; grid-template-columns: 20px 70px 1fr; text-align: left; text-decoration: none; }
#journeyPanel .itinerary-tasks button span { display: contents; }
#journeyPanel .itinerary-tasks button strong { color: var(--link); }
#journeyPanel .itinerary-tasks button small { color: var(--muted); }
#journeyPanel [data-itinerary-claim] { margin-top: 6px; padding-left: 0; border-right: 0; }

#journeyPanel .daily-contract > header span,
#journeyPanel .daily-contract > header div,
#journeyPanel .daily-contract p,
#journeyPanel .daily-contract > small { display: block; flex-basis: 100%; }
#journeyPanel .daily-contract > header div { margin-top: 3px; }
#journeyPanel .daily-contract > header div > * { margin-right: 7px; }
#journeyPanel .daily-contract p { margin: 5px 0 2px; padding-top: 5px; border-top: 1px dotted #aaa; }
#journeyPanel .daily-contract .contract-start { display: block; margin-top: 6px; padding-left: 0; border-right: 0; }

#journeyPanel .tower-card { align-items: start; }
#journeyPanel .tower-mark { flex: 0 0 24px; }
#journeyPanel .tower-copy { flex: 1 1 240px; }
#journeyPanel .tower-copy strong,
#journeyPanel .tower-copy p,
#journeyPanel .tower-next { display: block; }
#journeyPanel .tower-copy p { margin: 3px 0; }
#journeyPanel .tower-actions { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 5px; }
#journeyPanel .tower-actions button { padding-left: 0; border-right: 0; text-align: left; }
#journeyPanel .tower-next { flex-basis: 100%; padding-top: 4px; border-top: 1px dotted #aaa; color: var(--muted); }
#journeyPanel .mastery-summary > *,
#journeyPanel .cycle-rules p { display: block; margin: 2px 0; }
#journeyPanel .mastery-summary span { padding-block: 3px; border-block: 1px dotted #aaa; }

#journeyPanel .bounty-row { width: 100%; padding: 5px 0; border-right: 0; border-bottom: 1px dotted #aaa; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; text-align: left; text-decoration: none; }
#journeyPanel .bounty-row small { grid-column: 1 / -1; }
#journeyPanel .claim-bounties { margin-top: 6px; padding-left: 0; border-right: 0; }

#journeyPanel .reputation-card { display: grid; grid-template-columns: 30px 1fr; gap: 5px 8px; }
#journeyPanel .reputation-card > div > * { flex-basis: 100%; }
#journeyPanel .reputation-card p,
#journeyPanel .reputation-card em { display: block; margin: 3px 0; }
#journeyPanel .reputation-card em { padding-top: 4px; border-top: 1px dotted #aaa; }
#journeyPanel .reputation-card > button { grid-column: 2; justify-self: start; padding-left: 0; border-right: 0; }
#journeyPanel .faction-title span,
#journeyPanel .faction-title small { flex-basis: 100%; }
#journeyPanel .faction-title button { padding-left: 0; border-right: 0; }
#journeyPanel .faction-card header strong,
#journeyPanel .faction-card header span,
#journeyPanel .faction-card p,
#journeyPanel .faction-card small,
#journeyPanel .faction-card button { display: block; }
#journeyPanel .faction-card header { padding-bottom: 4px; border-bottom: 1px dotted #aaa; }
#journeyPanel .faction-card p { margin: 5px 0; }
#journeyPanel .faction-card small { padding-top: 4px; border-top: 1px dotted #aaa; }
#journeyPanel .faction-card button { margin-top: 5px; padding-left: 0; border-right: 0; }

#journeyPanel details > summary { padding: 5px 0; }
#journeyPanel details > summary span,
#journeyPanel details > summary strong,
#journeyPanel details > summary small { display: block; }
#journeyPanel .achievement-strip { display: flex; flex-wrap: wrap; gap: 0; padding: 5px 0; }
#journeyPanel .achievement-strip span { padding: 0 7px; border-right: 1px solid #999; }
#journeyPanel .achievement-strip span:first-child { padding-left: 0; }
#journeyPanel .achievement-strip span:last-child { border-right: 0; }
#journeyPanel .achievement-board { margin-top: 6px; }
#journeyPanel .achievement-board summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 8px; }
#journeyPanel .destiny-preview-body > header { margin-top: 8px; padding: 5px 0; border-block: 1px dotted #aaa; }
#journeyPanel .destiny-preview-body > header strong,
#journeyPanel .destiny-preview-body > header small { display: block; }

@media (max-width: 620px) {
  #statsPanel.is-active { grid-template-columns: 1fr; }
  #statsPanel .section-intro,
  #statsPanel .identity-dossier,
  #statsPanel .build-choice,
  #statsPanel .blessing-choice,
  #statsPanel .stat-list { grid-column: 1; }
  #statsPanel .stat-list,
  #martialPanel .build-presets > div[role="region"],
  #martialPanel .martial-list,
  #martialPanel .companion-list,
  #companionPanel .companion-list,
  #gearPanel .gear-slots,
  #journeyPanel .faction-list { grid-template-columns: 1fr; }
  #journeyPanel .journey-tabs button { flex-basis: 46%; min-width: 0; }
  #journeyPanel .itinerary-tasks button { grid-template-columns: 20px 62px 1fr; }
  #journeyPanel .weekly-journey > * { padding-inline: 5px; }
}

/* Site-wide typography and separators: keep every screen on the same WAP rhythm. */
body,
body button,
body input,
body select,
body textarea { font-family: "SimSun", serif !important; }
body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body strong,
body b,
body th,
body dt { font-weight: 400 !important; }
body i,
body em,
body cite,
body address { font-style: normal !important; }

.account-modal { z-index: 2000; }
.account-sheet { max-width: 430px; }
.account-sheet form { display: grid; gap: 10px; }
.account-hint { margin: 8px 0 14px; color: #4c555a; line-height: 1.7; }
.account-hint.is-error { color: #a12222; }
.account-switch { width: 100%; padding: 8px; border: 0; background: transparent; }
.account-migration { display: grid; gap: 8px; }
.account-control { position: relative; }
.account-menu { position: absolute; z-index: 30; top: calc(100% + 5px); right: 0; width: 190px; padding: 9px; border: 1px solid #9aa5aa; background: #fff; box-shadow: 0 5px 15px #0002; }
.account-menu span { display: block; margin-bottom: 7px; color: #4c555a; font-size: 13px; }
.account-menu button { width: 100%; padding: 6px; border: 1px solid #9aa5aa; background: #f5f7f7; color: #174f75; }
.topbar > .topbar-actions:only-child { margin-left:auto; }
#resetStatsButton.is-armed { border-color:#8b2525; color:#8b2525; }
.stat-confirm { display:flex; align-items:center; flex-wrap:wrap; }
.stat-action-separator { align-self:stretch; width:1px; min-height:26px; margin:0 3px; background:#9aa5aa; }
body.is-account-locked { overflow: hidden; }
body.is-account-checking .wuxia-shell,
body.is-account-checking .modal { visibility: hidden; }
.retreat-claim-status { min-height:1.4em; margin:6px 0; color:var(--muted); }
.retreat-claim-status.is-error { color:#8b2525; }
.retreat-panel #retreatDuration { margin:8px 0; color:#174f75; }
.retreat-panel .retreat-rewards { margin:8px 0; }
.retreat-panel #claimRetreatButton { width:100%; }

.hero-numbers > span + span::before,
.preparation-heading > div > * + *::before,
.martial-head > div > span::before,
.companion-card header > span::before,
.item-top > div > em::before {
  content: "｜";
  margin: 0 5px;
  color: #7b858b;
}
.martial-head > div,
.companion-card header,
.item-top > div { display: flex; flex-wrap: wrap; align-items: baseline; }
.resource-label > span::after,
.hero-numbers > span > strong::before { content: "："; }

#identityPanel .identity-dossier-grid p {
  margin: 0;
  padding: 6px 0;
  display: grid;
  grid-template-columns: 70px minmax(100px, auto) minmax(0, 1fr);
  align-items: baseline;
  border-bottom: 1px dotted #999;
}
#identityPanel .identity-dossier-grid p > strong,
#identityPanel .identity-dossier-grid p > small {
  padding-left: 8px;
  border-left: 1px solid #aaa;
}

@media (max-width: 460px) {
  #identityPanel .identity-dossier-grid p { grid-template-columns: 60px minmax(0, 1fr); }
  #identityPanel .identity-dossier-grid p > small {
    grid-column: 2;
    margin-top: 2px;
  }
}

/* Phase-three gameplay systems. */
.expedition-card,.training-dummy,.guild-raid,.tactic-choices,.mechanic-forge{margin-top:8px;padding:8px;border:1px solid #9cb2bd;background:#f5f9fa}
.expedition-route{display:grid;grid-template-columns:repeat(6,1fr);gap:5px}.expedition-route i{padding:5px;text-align:center;border:1px solid #aebbc2;background:#fff;font-style:normal}.expedition-route .is-done{background:#dcebdc;color:#27622d}.expedition-route .is-next{border-color:#a06b18;background:#fff4d8}
.expedition-actions,.tactic-choices,.mechanic-forge,.arena-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.tactic-choices>strong,.mechanic-forge>span{width:100%}.tactic-choices button small{display:block}.tactic-choices button.is-active,.guild-subnav button.is-active{background:#174f75;color:#fff}
.training-dummy{display:grid;grid-template-columns:1fr auto;gap:5px}.training-dummy small,.training-dummy p{display:block;margin:3px 0}.training-dummy p{grid-column:1/-1}
.mechanic-forge{margin-inline:0}.mechanic-forge small{width:100%}.mechanic-forge button.is-active{outline:2px solid #a06b18}
.guild-subnav{position:sticky;top:0;z-index:2;margin-bottom:8px;background:#edf4f7}.raid-health{height:9px;overflow:hidden;background:#d8d8d8}.raid-health i{display:block;height:100%;background:#9b3232}.guild-raid ol{margin:6px 0 0;padding-left:24px;columns:2}
.npc-mark{padding:1px 4px;border:1px solid #9a7335;color:#76500f;font-size:11px;font-style:normal}.arena-opponent .arena-actions{justify-content:flex-end}.season-milestone{border-left:3px solid #a06b18}
@media(max-width:460px){.guild-raid ol{columns:1}.tactic-choices button,.expedition-actions button{flex:1}.training-dummy{grid-template-columns:1fr}.training-dummy button{grid-row:2}.training-dummy p{grid-row:3}}

/* Jianghu page: stage, chapter, then a readable versus board. */
.character-strip { display: none; }
.jianghu-section-title {
  margin: 0;
  padding: 5px 7px;
  border-block: 1px solid #7da0b6;
  background: #e8f1f5;
  color: #174f75;
  font-size: 16px;
  line-height: 1.5;
}
.mobile-stage-toggle,
.stage-map { order: 1; }
.chapter-head { order: 2; margin-top: 7px; }
.story-objective { order: 3; }
.growth-guide { order: 4; }
.scene {
  order: 5;
  padding: 7px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 7px;
  align-items: stretch;
}
.scene-copy,
.duel-section-title { grid-column: 1 / -1; }
.duel-section-title { margin-top: 4px; }
.duel-side,
.enemy-box { min-width: 0; margin: 0; padding: 7px; border: 1px solid #9cb2bd; background: #f5f9fa; }
.duel-side header { display: flex; justify-content: space-between; gap: 8px; }
.duel-side header strong { color: #174f75; }
.duel-hp { height: 6px; margin-top: 7px; display: none; overflow: hidden; background: #ddd; }
.duel-hp i { height: 100%; display: block; background: var(--green); transition: width 180ms ease; }
body.is-fighting .duel-hp { display: block; }
.hero-resilience { margin-top: 5px; display: none; grid-template-columns: 38px 1fr auto; gap: 6px; align-items: center; }
.hero-resilience > div { height: 5px; overflow: hidden; background: #ddd; }
.hero-resilience > div i { height: 100%; display: block; background: #9a7335; transition: width 180ms ease; }
.hero-resilience strong { font-weight: 400; }
body.is-fighting .hero-resilience { display: grid; }
.duel-side p,
#enemyHpText,
.enemy-combat-stats { margin: 6px 0 0; font-size: 13px; line-height: 1.7; }
.duel-combat-stats,
.enemy-combat-stats { padding-top: 4px; border-top: 1px dotted #aaa; }
.duel-vs { align-self: center; color: #8b5500; font-size: 15px; }
.enemy-box { margin-top: 0; }
body.is-fighting .enemy-intent { cursor: default; }
.preparation-panel { order: 6; }
.battle-record { order: 7; }
.action-bar { order: 8; }

@media (max-width: 460px) {
  .scene { grid-template-columns: 1fr; }
  .scene-copy,
  .duel-section-title,
  .duel-side,
  .duel-vs,
  .enemy-box { grid-column: 1; }
  .duel-vs { justify-self: center; }
}
