:root {
  color-scheme: dark;
  /* 字号缩放系数（0.9–1.4），只影响文字，不影响盒子尺寸与布局。 */
  --text-scale: 1;
  --bg: #0e1916;
  --surface: #15221d;
  --surface-2: #1b2c24;
  --border: #b9c39320;
  --gold: #d4c49a;
  --mint: #a5c3ac;
  --text: #e4e5d6;
  --muted: #8b9b8d;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: calc(13px * var(--text-scale))/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; opacity: .35; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
button, a, input, select { touch-action: manipulation; }
button svg { flex-shrink: 0; }
button { border: 0; background: none; }
button:not(:disabled) { transition: color .2s, background .2s, border-color .2s, box-shadow .2s, transform .2s; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; display: block; }
small { font-size: calc(11px * var(--text-scale)); }
i { font-style: normal; }
b, strong { font-weight: 500; }
svg { vertical-align: middle; }
::selection { background: #7ca68955; color: #fff; }
::-webkit-scrollbar { width: 6px; height: 5px; }
::-webkit-scrollbar-thumb { background: #63785c66; border-radius: 8px; }
.muted { color: var(--muted); }
.gold-text { color: var(--gold); }
.center { text-align: center; }
.danger { color: #e59b8c; }
.wide { width: 100%; }
.button { min-height: 42px; padding: 10px 20px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; letter-spacing: .5px; border: 1px solid transparent; border-radius: 3px; }
.button.primary { color: #1b2e23; background: #c6d2b4; border-color: #e0e3c4; font-weight: 600; box-shadow: 0 4px 25px #020e0b22; }
.button.primary:hover:not(:disabled) { background: #e0e4c9; box-shadow: 0 0 25px #c6d2b425; }
.button.secondary { background: #a0b79509; border-color: #aec99d30; color: #c1cdb5; }
.button.secondary:hover:not(:disabled) { background: #a0b79518; border-color: #aec99d77; }
.button.small { min-height: 33px; padding: 6px 13px; font-size: calc(12px * var(--text-scale)); }
.button.danger-button { color: #e6b1a3; background: #c2836c0c; border-color: #c2836c44; }
.button.end-turn { min-width: 165px; border-color: #b9c49b55; background: #43513a44; color: #d5d6b9; }
.button.end-turn:hover:not(:disabled) { background: #65734c55; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: var(--mint); font-size: calc(11px * var(--text-scale)); padding: 4px 0; white-space: nowrap; }
.text-button:hover { color: #e2e4bd; }
.icon-button { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #aab7a4; }
.icon-button:hover { background: #d0dbc011; color: #e2e4bd; }
kbd { font: calc(10px * var(--text-scale))/1.6 var(--sans); border: 1px solid #b4c3a333; border-radius: 3px; padding: 0 5px; color: #a7b49e; }
.sidebar { width: 224px; background: linear-gradient(155deg, #19271f, #142018 75%); border-right: 1px solid #b9c3931c; padding: 32px 20px 20px; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 0 29px; text-align: left; }
.brand img { width: 40px; height: 46px; object-fit: cover; }
.brand b { font: calc(19px * var(--text-scale)) var(--serif); letter-spacing: 2px; color: #e0d8b9; white-space: nowrap; }
.brand small { display: block; font-size: calc(7px * var(--text-scale)); letter-spacing: 1.6px; color: #a5ad8c; margin-top: 6px; }
.sidebar-rule { border-top: 1px solid var(--border); padding: 21px 8px 14px; display: flex; justify-content: space-between; color: #687d68; font-size: calc(10px * var(--text-scale)); letter-spacing: 2px; }
.sidebar-rule i { font-size: calc(9px * var(--text-scale)); letter-spacing: 0; }
.sidebar nav { display: grid; gap: 6px; }
.nav-item { width: 100%; min-height: 45px; display: flex; align-items: center; text-align: left; gap: 13px; color: #96a78f; padding: 12px 13px; font-size: calc(12px * var(--text-scale)); border: 1px solid transparent; border-radius: 4px; }
.nav-item.active { background: linear-gradient(90deg, #667a4938, #64714c19); border-color: #9eaf692b; color: #d4d7b0; position: relative; }
.nav-item.active:before { content: ''; position: absolute; left: -21px; height: 21px; width: 2px; background: #c6c79c; box-shadow: 0 0 12px #aabb7177; }
.nav-item:hover { color: #dddcc2; background-color: #bfd0ac09; }
.nav-item small, .nav-item kbd, .nav-dot { margin-left: auto; }
.nav-item small { font-size: calc(9px * var(--text-scale)); color: #889b76; }
.nav-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.sidebar-subtitle { font-size: calc(10px * var(--text-scale)); letter-spacing: 2px; color: #6e806a; margin: 36px 12px 18px; }
.traveler-mini { display: flex; align-items: center; gap: 11px; padding: 0 10px; }
.mini-avatar { width: 35px; height: 35px; border: 1px solid #c3c79455; background: #61764722; border-radius: 50%; display: grid; place-items: center; color: var(--gold); font-size: calc(23px * var(--text-scale)); }
.traveler-mini b { font-size: calc(11px * var(--text-scale)); color: #c8cdb7; display: block; }
.traveler-mini small { color: #71846c; font-size: calc(9px * var(--text-scale)); }
.online-dot { width: 5px; height: 5px; border-radius: 50%; background: #98b784; margin-left: auto; box-shadow: 0 0 8px #98b78455; }
.sidebar-run { margin: 20px 12px; color: #6f826b; font-size: calc(10px * var(--text-scale)); }
.sidebar-run b { float: right; color: #cad1b7; font-size: calc(12px * var(--text-scale)); }
.sidebar-run i { color: #6e826a; font-size: calc(9px * var(--text-scale)); }
.thin-progress { height: 2px; background: #71846022; margin-top: 14px; }
.thin-progress span { height: 100%; display: block; background: #b4c492; }
.sidebar-bottom { margin-top: auto; padding-top: 24px; }
.local-note { display: flex; align-items: center; gap: 8px; color: #758a70; font-size: calc(10px * var(--text-scale)); padding: 0 12px 15px; border-bottom: 1px solid var(--border); margin-bottom: 13px; }
.local-note i { width: 4px; height: 4px; border-radius: 50%; background: #718f69; margin-left: auto; }
.sidebar-bottom .nav-item { font-size: calc(11px * var(--text-scale)); min-height: 40px; }
.sidebar-bottom .nav-item svg { width: 17px; height: 17px; }
.build-label { color: #50664e; font-size: calc(7px * var(--text-scale)); letter-spacing: 1.4px; margin: 23px 12px 0; display: flex; justify-content: space-between; }
.main { margin-left: 224px; min-height: 100vh; background: radial-gradient(ellipse at 80% 0%, #26352522, transparent 45%), var(--bg); }
.topbar { min-height: 79px; border-bottom: 1px solid var(--border); padding: 0 36px; display: flex; align-items: center; gap: 24px; }
.breadcrumb { display: flex; align-items: center; gap: 13px; color: #718870; font-size: calc(10px * var(--text-scale)); letter-spacing: .5px; white-space: nowrap; }
.breadcrumb strong { color: #c1cab5; font-size: calc(11px * var(--text-scale)); }
.slash { color: #4f6855; }
.resource-bar { display: flex; margin-left: auto; gap: 25px; }
.resource { display: flex; align-items: center; gap: 9px; padding: 0; color: #a6ba9b; text-align: left; }
.resource.hp { color: #b69783; }
.resource.gold { color: #c8b77f; }
.resource.echoes { color: #98bba3; }
.stat-text small { display: block; font-size: calc(8px * var(--text-scale)); letter-spacing: 1px; color: #72856f; line-height: 1.5; }
.stat-text strong { font-size: calc(14px * var(--text-scale)); line-height: 1.8; color: #c9d0b8; font-variant-numeric: tabular-nums; }
.stat-text strong i { font-size: calc(10px * var(--text-scale)); color: #7e9278; }
.help-trigger { border: 1px solid #82957225; width: 28px; height: 28px; margin-left: 3px; }
.workspace { padding: 29px 36px 0; max-width: 1680px; margin: 0 auto; min-height: calc(100vh - 139px); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.eyebrow { color: #8b9a7c; font-size: calc(8px * var(--text-scale)); letter-spacing: 2.4px; margin-bottom: 6px; }
.page-heading h1 { font: calc(25px * var(--text-scale))/1.5 var(--serif); letter-spacing: 3px; }
.page-heading h1 span { font: italic calc(13px * var(--text-scale))/1.5 Georgia, serif; letter-spacing: .3px; color: #6d856f; margin-left: 16px; }
.heading-side { display: flex; align-items: center; gap: 23px; margin-top: 11px; }
.save-indicator { display: inline-flex; align-items: center; gap: 6px; font-size: calc(9px * var(--text-scale)); letter-spacing: .5px; color: #7b9275; white-space: nowrap; }
.save-indicator svg { color: #9db38b; }
.save-indicator.warning { color: #e0b08c; }
.notice { border: 1px solid #ac936c55; background: #ac936c0d; color: #d9c4a1; margin-bottom: 17px; padding: 11px 15px; font-size: calc(11px * var(--text-scale)); display: flex; align-items: center; gap: 10px; }
.notice button { color: #f0d5a6; margin-left: auto; text-decoration: underline; }
.journey-panel { position: relative; border: 1px solid #98b1863d; border-radius: 5px; min-height: 626px; overflow: hidden; display: grid; grid-template-columns: 40% 60%; background: #193b31; isolation: isolate; }
.scene-image, .scene-shade, .scene-grain { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.scene-image { background: url('./assets/world-tree.png') center / cover no-repeat; opacity: .7; filter: saturate(.68); }
.scene-shade { background: linear-gradient(90deg, #0c211bd9 0%, #102b2266 33%, #0b231db0 55%, #0a211db0 100%), linear-gradient(0deg, #0b211cf5 0%, transparent 30%, #1b33223d 100%); }
.scene-grain { background-image: radial-gradient(#c8d5aa2b .6px, transparent .6px); background-size: 29px 33px; opacity: .35; mask-image: linear-gradient(180deg, #000, transparent); }
.journey-panel:before, .journey-panel:after { content: ''; position: absolute; width: 17px; height: 17px; border-color: #d4d4a18c; border-style: solid; pointer-events: none; z-index: 4; }
.journey-panel:before { left: 8px; top: 8px; border-width: 1px 0 0 1px; }
.journey-panel:after { right: 8px; bottom: 8px; border-width: 0 1px 1px 0; }
.chapter-intro { padding: 35px 0 30px 36px; position: relative; z-index: 3; max-width: 350px; display: flex; flex-direction: column; }
.chapter-eyebrow { font-size: calc(9px * var(--text-scale)); letter-spacing: 2.5px; color: #c3c9aa; display: flex; align-items: center; gap: 10px; }
.chapter-eyebrow>span:last-child { color: #91a991; letter-spacing: 1px; font-size: calc(8px * var(--text-scale)); margin-left: -3px; }
.tiny-diamond { width: 5px; height: 5px; background: #d2cda2; transform: rotate(45deg); display: inline-block; }
.region-seal { position: absolute; color: #c3d3b1; opacity: .14; width: 160px; right: -10px; top: 66px; pointer-events: none; }
.region-seal .card-art { height: 180px; width: 160px; }
.chapter-intro h2 { font: calc(56px * var(--text-scale))/1.4 var(--serif); letter-spacing: 13px; margin-top: 40px; color: #e6e8d1; text-shadow: 0 2px 25px #092a20; }
.chapter-english { font: calc(11px * var(--text-scale))/1.5 Georgia, serif; letter-spacing: 6px; color: #afc0a3; margin: 6px 0 19px; }
.chapter-mechanics { font-size: calc(10px * var(--text-scale)); display: flex; align-items: center; gap: 8px; color: #acbba5; margin: 6px 0 27px; }
.chapter-mechanics .element-glyph { font-size: calc(18px * var(--text-scale)); }
.separator { display: inline-block; margin: 0 8px; color: #768f75; }
.chapter-progress { margin-top: 10px; font-size: calc(9px * var(--text-scale)); color: #9fb39a; width: 100%; max-width: 268px; }
.chapter-progress>b { float: right; font: calc(12px * var(--text-scale)) Georgia, serif; color: #cfdbbb; margin-top: -1px; }
.chapter-progress b small { color: #7d987e; font-size: calc(9px * var(--text-scale)); }
.chapter-steps { display: flex; gap: 5px; margin-top: 13px; }
.chapter-steps i { height: 2px; background: #a3b38b28; flex: 1; }
.chapter-steps i.done { background: #cccf9c; box-shadow: 0 0 5px #c4d39c44; }
.next-node { margin-top: auto; padding: 23px 0 0; width: 100%; max-width: 270px; }
.next-node-label { display: flex; justify-content: space-between; color: #9cb196; font-size: calc(9px * var(--text-scale)); letter-spacing: .5px; }
.next-node-label i { font: calc(7px * var(--text-scale)) Georgia, serif; letter-spacing: 1px; color: #738e73; }
.next-node-title { display: flex; gap: 11px; align-items: center; margin-top: 15px; }
.node-icon { width: 39px; height: 39px; border: 1px solid #c4c79a5c; color: #c7ceaa; display: grid; place-items: center; background: #6e8b5720; clip-path: polygon(10% 0,90% 0,100% 10%,100% 90%,90% 100%,10% 100%,0 90%,0 10%); }
.next-node-title h3 { font: calc(19px * var(--text-scale)) var(--serif); letter-spacing: 2px; color: #e0e1c4; }
.node-tier { color: #96ad8c; font: calc(20px * var(--text-scale)) Georgia, serif; margin-left: auto; }
.next-node>p { color: #a2b59c; font-size: calc(10px * var(--text-scale)); line-height: 1.9; margin: 13px 0 20px; min-height: 38px; }
.next-node .primary { height: 43px; letter-spacing: 2px; font-size: calc(12px * var(--text-scale)); justify-content: space-between; padding-inline: 20px; }
.chapter-footnote { color: #789975; font-size: calc(8px * var(--text-scale)); display: flex; align-items: center; gap: 6px; margin-top: 17px; }
.chapter-footnote .text-button { margin-left: auto; }
.chapter-footnote i { margin: 0 2px; }
.chapter-footnote svg { opacity: .8; }
.story-title { font: calc(18px * var(--text-scale)) var(--serif); margin-bottom: 10px; color: var(--gold); }
.story-body { font: calc(12px * var(--text-scale))/1.9 var(--serif); color: #c5d0b8; max-height: 110px; overflow-y: auto; margin-bottom: 12px; }
.route-area { position: relative; margin: 18px 17px 25px 0; z-index: 2; }
.map-title { position: absolute; right: 14px; top: 4px; text-align: right; z-index: 2; }
.map-title>span { color: #c1caae; font: calc(12px * var(--text-scale)) var(--serif); letter-spacing: 3px; }
.map-title small { display: block; font-size: calc(8px * var(--text-scale)); color: #76957b; letter-spacing: .5px; margin-top: 5px; }
.route-map { position: absolute; inset: 18px 5px 7px 0; }
.map-lines { width: 100%; height: 100%; position: absolute; inset: 0; overflow: visible; }
.map-lines path { fill: none; stroke: #9cb29b35; stroke-width: 1.3; stroke-dasharray: 3 6; vector-effect: non-scaling-stroke; }
.map-lines .traveled { stroke: #bfcba1aa; stroke-dasharray: none; }
.map-lines .reachable { stroke: #d6d5a98c; }
.map-node { position: absolute; transform: translate(-50%, -50%); padding: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; opacity: 1 !important; color: #829786; background: #19362ccf; }
.node-shape { width: 34px; height: 34px; border: 1px solid #94ab914f; border-radius: 50%; display: grid; place-items: center; transition: .2s; box-shadow: 0 0 0 5px #123126aa; }
.map-node.type-elite { color: #c0ad81; }
.map-node.type-shop { color: #b8b28b; }
.map-node.type-event { color: #a4b8a2; }
.map-node.type-rest { color: #a3c2b6; }
.map-node.type-boss { width: 53px; height: 53px; color: #c4bca2; background: #1b3028e6; }
.map-node.type-boss .node-shape { width: 45px; height: 45px; border-radius: 3px; transform: rotate(45deg); border-color: #bbbc9580; box-shadow: 0 0 0 4px #1b3028, 0 0 0 5px #babc9540; }
.map-node.type-boss .node-shape svg { transform: rotate(-45deg); }
.map-node.type-rest .node-shape { border-radius: 3px; transform: rotate(45deg); width: 31px; height: 31px; }
.map-node.type-rest .node-shape svg { transform: rotate(-45deg); }
.map-node .node-label { position: absolute; top: 45px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: calc(8px * var(--text-scale)); letter-spacing: 1.5px; color: #94b096; opacity: 0; }
.map-node:not(:disabled):hover .node-label, .map-node.chosen .node-label { opacity: 1; }
.map-node.completed { color: #b9c69d; }
.map-node.completed .node-shape { border-color: #b5c49880; background: #75855d25; }
.map-node.available { color: #e0dbb1; background: #3a5037; }
.map-node.available .node-shape { width: 40px; height: 40px; border-color: #d6d5a1aa; box-shadow: 0 0 0 4px #132d23, 0 0 0 5px #cbd5ab30; }
.map-node.chosen .node-shape { border-color: #e4e4b8; box-shadow: 0 0 0 5px #bfc48b22, 0 0 25px #bfc48b3d; background: #a5b27430; }
.map-node.available:hover { background: #657552; transform: translate(-50%, -50%) scale(1.08); }
.map-node.chosen:after { content: ''; width: 54px; height: 54px; border: 1px solid #d1d4a744; border-radius: 50%; position: absolute; inset: -7px; animation: pulse 3s infinite; pointer-events: none; }
.selection-caret { position: absolute; left: -18px; width: 5px; height: 5px; transform: rotate(45deg); border: 1px solid #d3d4a6; }
.map-start { position: absolute; bottom: -1px; left: 50%; transform: translateX(-50%); color: #99af93; font-size: calc(8px * var(--text-scale)); letter-spacing: 3px; background: #153629bb; padding: 3px 10px; white-space: nowrap; }
.map-start>span { margin-left: 8px; color: #d5d5aa; }
.boss-annotation { position: absolute; top: 34px; left: calc(50% + 48px); white-space: nowrap; color: #b2b99a; pointer-events: none; }
.boss-annotation span { display: block; color: #7f9980; font: calc(6px * var(--text-scale)) Georgia, serif; letter-spacing: 1.4px; }
.boss-annotation strong { font: calc(10px * var(--text-scale)) var(--serif); letter-spacing: 1px; }
.map-bottom { position: absolute; right: 9px; bottom: -12px; left: 0; display: flex; justify-content: flex-end; align-items: center; color: #769477; font-size: calc(8px * var(--text-scale)); letter-spacing: .5px; gap: 20px; }
.map-bottom svg { margin-right: 4px; }
.compass-mark { position: absolute; left: 18px; font: calc(8px * var(--text-scale)) Georgia, serif; text-align: center; color: #91a88b; bottom: 5px; }
.compass-mark i { display: block; font-size: calc(26px * var(--text-scale)); color: #a2b597; line-height: 1.3; }
.scene-caption { position: absolute; left: 36px; bottom: 12px; color: #86a081; font-size: calc(5px * var(--text-scale)); letter-spacing: 1.8px; display: flex; align-items: center; width: calc(100% - 72px); gap: 8px; pointer-events: none; }
.caption-line { width: 19px; height: 1px; background: #9eb18b55; }
.scene-coordinates { margin-left: auto; }
.map-legend { display: flex; gap: 24px; padding: 17px 2px; font-size: calc(9px * var(--text-scale)); color: #879b80; align-items: center; flex-wrap: wrap; }
.map-legend>span { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.map-legend .legend-elite { color: #b5a982; }
.map-legend .legend-note { margin-left: auto; font-size: calc(8px * var(--text-scale)); color: #5b765e; letter-spacing: 1px; }
.below-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; margin-top: 7px; }
.panel { border: 1px solid #9eb18b21; border-radius: 4px; background: linear-gradient(110deg, #1f2c211a, #1f2c210a); padding: 18px 21px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.section-title h2 { display: flex; align-items: center; gap: 9px; font: calc(13px * var(--text-scale)) var(--serif); letter-spacing: 1px; color: #c9ceaf; }
.section-title h2>span { color: #627e60; font: calc(9px * var(--text-scale)) var(--sans); letter-spacing: 0; margin-left: 2px; }
.section-title .text-button { font-size: calc(8px * var(--text-scale)); color: #879b7b; }
.deck-strip { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.deck-chip { background: #7c966212; border: 1px solid #8ca67920; border-radius: 3px; padding: 7px 9px; display: flex; align-items: center; gap: 7px; text-align: left; font-size: calc(9px * var(--text-scale)); color: #afbea1; }
.deck-chip:hover { border-color: #c7cf9955; }
.deck-chip .element-glyph { font-size: calc(15px * var(--text-scale)); }
.deck-chip small { margin-left: 2px; color: #7b946c; font: calc(9px * var(--text-scale)) Georgia, serif; }
.relic-strip { display: flex; gap: 10px; align-items: center; margin-top: 13px; }
.relic-token { display: grid; place-items: center; width: 43px; height: 43px; background: #91a7650b; border: 1px solid #9fb27c3b; border-radius: 4px; color: var(--element); }
.relic-token svg { height: 32px; width: 30px; }
.relic-token:hover { background: #91a76522; }
.relic-hint { margin-left: 5px; color: #5c785b; font-size: calc(8px * var(--text-scale)); line-height: 1.9; }
.chapter-track { display: flex; align-items: center; justify-content: space-between; margin: 33px 7px 24px; position: relative; isolation: isolate; }
.chapter-track:before { content: ''; position: absolute; top: 15px; left: 2%; right: 2%; height: 1px; background: #76916420; z-index: -1; }
.chapter-track>div { text-align: center; color: #5d775d; min-width: 50px; }
.chapter-track>div>span { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #73945c27; display: grid; place-items: center; margin: 0 auto 8px; background: #101b16; font-size: calc(17px * var(--text-scale)); }
.chapter-track p { font-size: calc(9px * var(--text-scale)); letter-spacing: 1px; }
.chapter-track small { font: calc(7px * var(--text-scale)) Georgia, serif; color: #486047; }
.chapter-track .current>span { border-color: #b1bb7b88; color: #c6cf9c; background: #3f54332e; box-shadow: 0 0 0 4px #8597560b; }
.chapter-track .current p { color: #c0ca9d; }
.chapter-track .past>span { color: #a6bc8b; border-color: #a6bc8b55; }
.footer { margin: 0 36px; border-top: 1px solid #9db08717; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #5b7558; font-size: calc(8px * var(--text-scale)); letter-spacing: .5px; }
.footer>span:nth-child(2) { font-size: calc(6px * var(--text-scale)); letter-spacing: 1px; color: #486343; }
.footer i { color: #3f5b3f; margin-inline: 5px; }
.footer .text-button { color: #728d69; font-size: calc(8px * var(--text-scale)); }
.element-glyph { color: var(--element); display: inline-grid; place-items: center; min-width: 17px; font-size: calc(19px * var(--text-scale)); line-height: 1.2; font-family: Georgia, var(--sans); vertical-align: middle; }
.game-card { display: flex; flex-direction: column; width: 166px; min-width: 166px; height: 245px; padding: 12px 12px 13px; border: 1px solid color-mix(in srgb, var(--element), transparent 62%); border-radius: 7px; background: radial-gradient(ellipse at 50% 20%, color-mix(in srgb, var(--element), transparent 91%), transparent 75%), #17261f; position: relative; text-align: left; box-shadow: 0 5px 13px #0003, inset 0 0 0 4px #101e1755; isolation: isolate; overflow: hidden; }
.game-card:before { content: ''; position: absolute; inset: 5px; border: 1px solid color-mix(in srgb, var(--element), transparent 90%); border-radius: 4px; pointer-events: none; z-index: -1; }
button.game-card:hover:not(:disabled), .game-card.selected { transform: translateY(-7px); border-color: var(--element); box-shadow: 0 8px 24px #0005, 0 0 15px color-mix(in srgb, var(--element), transparent 91%); }
.game-card.selected { background-color: #20372b; }
.game-card:disabled { opacity: .45; filter: saturate(.55); }
.card-top { display: flex; align-items: center; justify-content: space-between; font-size: calc(8px * var(--text-scale)); color: color-mix(in srgb, var(--element), transparent 20%); line-height: 1; }
.cost { width: 26px; height: 27px; border: 1px solid color-mix(in srgb, var(--element), transparent 60%); background: #172a20; border-radius: 50% 50% 50% 4px; display: grid; place-items: center; font: calc(17px * var(--text-scale)) Georgia, serif; color: #e5e8cc; }
.card-illustration { width: 100%; height: 109px; position: relative; color: var(--element); display: grid; place-items: center; }
.card-art { height: 100%; max-width: 100%; display: block; }
.card-illustration .card-art { height: 103px; width: 91px; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--element), transparent 80%)); }
.card-copy { margin-top: 3px; border-top: 1px solid color-mix(in srgb, var(--element), transparent 86%); padding-top: 8px; width: 100%; }
.card-rarity { font-size: calc(7px * var(--text-scale)); letter-spacing: 1px; color: color-mix(in srgb, var(--element), transparent 40%); }
.card-copy h3 { font: calc(12px * var(--text-scale))/1.6 var(--serif); letter-spacing: .3px; margin-top: 3px; color: #dedfc5; }
.card-copy em { color: #d5d995; font-style: normal; }
.card-copy p { color: #9eaf98; font-size: calc(8px * var(--text-scale)); line-height: 1.8; margin-top: 6px; }
.card-copy q { display: block; color: #70876c; font: italic calc(8px * var(--text-scale)) var(--serif); margin-top: 4px; overflow: hidden; max-height: 24px; }
/* 字号放大到 120% 以上时，卡面剩余空间不足以容纳风味引文，
   先隐藏这段装饰文字，保证卡名与效果行完整，避免被卡片下边缘裁断。
   详情弹窗里的放大卡面仍保留引文。 */
html[data-text-scale="lg"] .card-copy q { display: none; }
html[data-text-scale="lg"] .card-detail-pair .card-copy q { display: block; }
.card-corner { position: absolute; right: 5px; bottom: 5px; width: 9px; height: 9px; border: solid color-mix(in srgb, var(--element), transparent 60%); border-width: 0 1px 1px 0; }
.game-card.rarity-legendary { border-color: #cab37c77; }
.game-card.rarity-curse { background-color: #2d2425; border-color: #916a7155; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(166px, 1fr)); gap: 24px 19px; margin-top: 25px; align-items: start; }
.card-grid>.game-card { width: 100%; max-width: 210px; }
.collection-page { padding: 12px 0 25px; }
.collection-description { font-size: calc(11px * var(--text-scale)); margin-bottom: 28px; }
.collection-count { color: var(--gold); font: calc(23px * var(--text-scale)) Georgia, serif; }
.collection-count small { color: #8b9f7e; font: calc(10px * var(--text-scale)) var(--sans); display: block; margin-top: 6px; text-align: right; }
.collection-toolbar { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); margin-bottom: 18px; gap: 20px; }
.tabs { display: flex; gap: 27px; }
.tabs button { color: #7e9573; font-size: calc(12px * var(--text-scale)); padding: 12px 3px; border-bottom: 2px solid transparent; }
.tabs button.active { color: #d4d7af; border-color: #c2c78d; }
.element-filters { display: flex; align-items: center; gap: 8px; }
.element-filters button { font: calc(17px * var(--text-scale)) Georgia, serif; color: var(--element, #b9c5a7); width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 3px; opacity: .55; }
.element-filters button:first-child { font: calc(10px * var(--text-scale)) var(--sans); width: auto; min-width: 37px; padding: 0 6px; white-space: nowrap; }
.element-filters button.active { border-color: #a9bd8755; background: #a9bd8715; opacity: 1; }
.collection-entry .game-card { width: 100%; max-width: 210px; }
.collection-entry:not(.discovered) .game-card { filter: saturate(.3); opacity: .55; }
.discovery-label { display: block; text-align: center; color: #4c6b4d; font-size: calc(8px * var(--text-scale)); margin-top: 10px; }
.discovered .discovery-label { color: #9db187; }
.collection-grid { margin-bottom: 38px; }
.relic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; margin: 25px 0; }
.relic-entry { background: #9fbf8510; border: 1px solid #abc18f25; padding: 20px; text-align: center; border-radius: 4px; }
.relic-entry>div { height: 100px; color: var(--element); display: flex; justify-content: center; margin-bottom: 20px; }
.relic-entry h3 { font: calc(15px * var(--text-scale)) var(--serif); margin-bottom: 10px; }
.relic-entry p { font-size: calc(10px * var(--text-scale)); line-height: 1.9; color: #9eb093; min-height: 40px; }
.relic-entry small { color: #718e69; font-size: calc(8px * var(--text-scale)); display: block; margin-top: 15px; }
.archon-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 30px 0 40px; }
.archon-entry { display: flex; border: 1px solid #b2c59525; background: #a4c58c05; border-radius: 4px; overflow: hidden; min-height: 290px; }
.archon-art { width: 34%; flex-shrink: 0; background: radial-gradient(ellipse at center, color-mix(in srgb, var(--element), transparent 86%), transparent 80%); position: relative; display: flex; align-items: center; justify-content: center; padding: 13px; }
.archon-art>.card-art { width: 130px; height: 160px; color: var(--element); opacity: .65; }
.archon-art>span { position: absolute; top: 13px; left: 17px; color: #8ca77e77; font: calc(12px * var(--text-scale)) Georgia, serif; }
.archon-copy { padding: 23px 22px 20px 5px; }
.archon-status { color: #7c9671; letter-spacing: 1px; font-size: calc(8px * var(--text-scale)); }
.unlocked .archon-status { color: var(--element); }
.archon-copy h2 { font: calc(21px * var(--text-scale)) var(--serif); margin-top: 6px; color: #d2d9bd; }
.archon-copy>small { display: block; margin-top: 7px; font-size: calc(9px * var(--text-scale)); color: #718e6a; }
.archon-copy>div { margin-top: 18px; }
.archon-copy>div>b { color: #b1c2a0; font-size: calc(10px * var(--text-scale)); }
.archon-copy>div>b>span { margin-left: 6px; font-size: calc(8px * var(--text-scale)); color: #799270; }
.archon-copy p { color: #8ca082; font-size: calc(10px * var(--text-scale)); margin-top: 5px; line-height: 1.9; }
.talent-intro { border: 1px solid #a8c18b25; background: radial-gradient(ellipse at 20% 50%, #6f9b5522, transparent 50%); padding: 30px 45px; display: flex; align-items: center; gap: 55px; border-radius: 5px; margin-bottom: 30px; }
.talent-tree { width: 150px; height: 175px; color: #b1c989; }
.talent-intro h2 { font: calc(24px * var(--text-scale)) var(--serif); letter-spacing: 2px; margin-bottom: 15px; color: #d2d7b8; }
.talent-intro p { font-size: calc(11px * var(--text-scale)); line-height: 2; color: #95ab88; }
.talent-stats { display: flex; gap: 30px; margin-top: 20px; color: #7c9970; font-size: calc(9px * var(--text-scale)); }
.talent-stats b { color: #d1d7b1; font: calc(20px * var(--text-scale)) Georgia, serif; margin-right: 7px; }
.echoes-total { color: #b2c29b; font: calc(28px * var(--text-scale)) Georgia, serif; }
.echoes-total small { font: calc(10px * var(--text-scale)) var(--sans); margin-left: 5px; }
.echoes-total svg { margin-right: 10px; }
.talent-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 40px; }
.talent-card { border: 1px solid #b8c69c33; background: #91ad7c09; border-radius: 5px; padding: 25px 19px 20px; position: relative; }
.talent-icon { height: 105px; color: var(--element); display: flex; justify-content: center; margin-bottom: 22px; }
.talent-card h2 { font: calc(18px * var(--text-scale)) var(--serif); letter-spacing: 1px; color: #d4d6b9; }
.talent-card>p { font-size: calc(10px * var(--text-scale)); color: #8fa27f; margin-top: 12px; min-height: 35px; }
.talent-level { position: absolute; top: 13px; right: 13px; color: #b4c69a; font: calc(11px * var(--text-scale)) Georgia, serif; }
.talent-level small { color: #637b58; font-size: calc(9px * var(--text-scale)); }
.talent-pips { display: flex; gap: 6px; margin: 20px 0; }
.talent-pips i { width: 17px; height: 3px; background: #4c674533; }
.talent-pips i.lit { background: #bccb97; box-shadow: 0 0 9px #bccb9733; }
.talent-card .button { font-size: calc(10px * var(--text-scale)); padding: 8px 5px; gap: 4px; }
.compact-heading { margin-bottom: 18px; }
.compact-heading h1 { font-size: calc(23px * var(--text-scale)); }
.compact-heading h1 span { font: calc(11px * var(--text-scale)) var(--sans); color: #799070; letter-spacing: 1px; }
.battle-panel { position: relative; border: 1px solid #b0c49833; border-radius: 5px; overflow: hidden; isolation: isolate; }
.battle-backdrop { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,#071d189c,#142b2477,#0b2119cc),linear-gradient(0deg,#10251cf5,transparent 60%),url('./assets/world-tree.png') center 63% / cover; filter: saturate(.6); opacity: .8; }
.battle-top { display: flex; justify-content: space-between; align-items: center; padding: 17px 23px; gap: 15px; border-bottom: 1px solid #c8d8ac15; }
.turn-label { display: flex; align-items: center; gap: 9px; color: #a9ba97; font-size: calc(10px * var(--text-scale)); white-space: nowrap; }
.turn-label b { font: calc(17px * var(--text-scale)) Georgia, serif; color: #d6d9ba; }
.battle-effects { display: flex; gap: 7px; flex-wrap: wrap; }
.battle-effects>span { font-size: calc(9px * var(--text-scale)); padding: 3px 8px; background: #5f7c4c33; border: 1px solid #9eb68530; border-radius: 3px; color: #b7ca9e; }
.battle-top>.text-button { font-size: calc(9px * var(--text-scale)); }
.combatants { display: flex; min-height: 306px; align-items: center; justify-content: space-between; padding: 13px 42px 7px; gap: 25px; position: relative; }
.player-unit { width: 170px; flex-shrink: 0; position: relative; padding-top: 6px; align-self: end; }
.player-unit>img { height: 200px; margin: 0 auto; object-fit: contain; }
.player-status { display: flex; justify-content: center; gap: 10px; min-height: 23px; }
.player-status>span { display: flex; align-items: center; gap: 5px; font-size: calc(10px * var(--text-scale)); color: #b9d5b1; }
.unit-label { text-align: center; margin-top: 0; }
.unit-label strong { display: block; font: calc(13px * var(--text-scale))/1.7 var(--serif); color: #d8dabe; letter-spacing: 1px; }
.unit-label small { font: calc(6px * var(--text-scale))/1.5 Georgia, serif; letter-spacing: 1.8px; color: #71936e; display: block; margin-top: 2px; }
.health-bar { height: 13px; position: relative; background: #172519; border: 1px solid #9ab77b55; border-radius: 2px; margin-top: 9px; overflow: hidden; }
.health-bar>i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #6f9662, #adbc7e); height: 100%; transition: width .35s; }
.health-bar>span { position: absolute; inset: 0; text-align: center; font: calc(8px * var(--text-scale))/calc(11px * var(--text-scale)) var(--sans); color: #f0f0d6; text-shadow: 0 1px 3px #000; }
.health-bar>em { position: absolute; inset: 0 0 0 auto; background: repeating-linear-gradient(115deg,#b8516077 0 4px,#b85160cc 4px 6px); border-left: 1px solid #ea8d90; }
.battle-center-sigil { position: absolute; left: 38%; top: 40%; transform: translateX(-50%); color: #b7c29b66; text-align: center; pointer-events: none; }
.battle-center-sigil>span { font: calc(30px * var(--text-scale)) var(--serif); letter-spacing: 5px; }
.battle-center-sigil>small { display: block; font: calc(5px * var(--text-scale)) Georgia, serif; letter-spacing: 2px; color: #90ae734d; margin-top: 10px; }
.enemy-group { display: flex; gap: 18px; justify-content: center; width: 55%; min-width: 0; align-items: flex-end; margin-left: auto; }
.enemy-unit { position: relative; width: 165px; min-width: 0; padding: 0 0 5px; opacity: .77; border: 1px solid transparent; border-radius: 5px; flex-shrink: 1; }
.enemy-unit.targeted { opacity: 1; }
.enemy-unit:hover { background: #8ca4820d; }
.enemy-unit>img { height: 155px; width: 100%; object-fit: contain; filter: drop-shadow(0 0 12px color-mix(in srgb, var(--element), transparent 94%)); }
.enemy-unit.boss>img { height: 184px; }
.enemy-group.count-1 .enemy-unit { width: 200px; }
.enemy-intent { display: flex; gap: 6px; justify-content: center; align-items: center; color: #dcab92; font-size: calc(11px * var(--text-scale)); min-height: 29px; }
.enemy-intent b { font: calc(18px * var(--text-scale)) Georgia, serif; }
.enemy-intent small { font-size: calc(8px * var(--text-scale)); color: #b69c85; }
.enemy-intent.intent-defend { color: #b4c4b4; }
.enemy-intent.intent-execute { color: #f69f9f; }
.enemy-intent.intent-charge { color: #f5c783; }
.enemy-status { min-height: 20px; display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; }
.enemy-status .element-glyph { font-size: calc(20px * var(--text-scale)); }
.enemy-status>span:not(.element-glyph) { font-size: calc(8px * var(--text-scale)); color: #b7b9a9; }
.enemy-health { border-color: #c3918955; height: 12px; }
.enemy-health>i { background: linear-gradient(90deg, #825f60, #b08e7f); }
.target-indicator { font-size: calc(8px * var(--text-scale)); display: block; color: #839b7b; letter-spacing: 1px; margin-top: 6px; opacity: 0; }
.targeted .target-indicator { opacity: 1; color: #c6ce9c; }
.boss-mechanic { font-size: calc(9px * var(--text-scale)); color: #a4b590; margin: 6px 25px 12px; padding: 7px 10px; border: 1px solid #b8b78422; background: #0e201780; line-height: 1.8; }
.boss-mechanic svg { margin-right: 5px; }
.boss-dialogue, .chapter-ending { font: calc(13px * var(--text-scale))/1.9 var(--serif); color: #c1ceb0; padding: 12px 18px; margin: 5px 25px 12px; border-left: 1px solid #b5c38b66; white-space: pre-line; }
.chapter-ending { max-width: 650px; margin: 20px auto; text-align: left; }
.archon-biography { white-space: pre-line; border-top: 1px solid #abc49822; padding-top: 12px; margin-top: 15px !important; }
.support-bar { min-height: 51px; display: flex; gap: 9px; align-items: center; padding: 9px 22px; background: #0c1d16b3; border-top: 1px solid #b3c29526; flex-wrap: wrap; }
.support-label { display: flex; align-items: center; gap: 7px; font-size: calc(9px * var(--text-scale)); color: #9db28b; margin-right: 4px; }
.support-bar>.muted { font-size: calc(9px * var(--text-scale)); }
.support-button { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid #b0c89433; background: #94b2790a; border-radius: 3px; font-size: calc(8px * var(--text-scale)); }
.support-button small { font-size: calc(7px * var(--text-scale)); color: #8fa773; }
.support-button .element-glyph { font-size: calc(16px * var(--text-scale)); }
.hand-panel { border: 1px solid #a5ba892b; border-radius: 4px; background: linear-gradient(180deg,#1b2b2130, #15211a30); margin: 18px 0 25px; padding: 17px 21px 14px; }
.hand-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.energy-orb { width: 53px; height: 48px; border: 1px solid #a2ba7c88; border-radius: 50% 50% 50% 7px; display: flex; align-items: center; justify-content: center; color: #d8dfb1; position: relative; background: radial-gradient(#65763b44, transparent); box-shadow: 0 0 15px #b4ce6e0a; flex-shrink: 0; }
.energy-orb strong { font: calc(26px * var(--text-scale)) Georgia, serif; }
.energy-orb>span { font: calc(11px * var(--text-scale)) Georgia, serif; margin: 9px 0 0 2px; color: #839863; }
.energy-orb svg { position: absolute; right: -4px; top: -2px; color: #c5ce91; }
.hand-instruction strong { display: block; font: calc(13px * var(--text-scale)) var(--serif); color: #ced4b2; }
.hand-instruction span { display: block; color: #78936b; font-size: calc(8px * var(--text-scale)); margin-top: 5px; }
.pile-buttons { margin-left: auto; display: flex; gap: 12px; }
.pile-buttons button { display: flex; gap: 5px; align-items: center; color: #809773; font-size: calc(8px * var(--text-scale)); white-space: nowrap; }
.pile-buttons b { color: #c6d1ac; padding-left: 2px; font: calc(12px * var(--text-scale)) Georgia, serif; }
.hand-cards { display: flex; gap: 10px; justify-content: safe center; overflow-x: auto; padding: 15px 5px 8px; min-height: 248px; }
.hand-cards .game-card { width: 142px; min-width: 142px; height: 218px; padding: 10px; }
.hand-cards .card-illustration { height: 92px; }
.hand-cards .card-art { height: 88px; }
.hand-cards .card-copy h3 { font-size: calc(11px * var(--text-scale)); }
.hand-cards .card-copy p { font-size: calc(8px * var(--text-scale)); }
.hand-cards .cost { width: 23px; height: 24px; font-size: calc(15px * var(--text-scale)); }
.hand-card-wrap { position: relative; flex-shrink: 0; }
.card-key { position: absolute; top: -15px; left: calc(50% - 2px); font: calc(7px * var(--text-scale)) Georgia, serif; color: #607e59; }
.empty-hand { padding: 80px 10px; color: #819b72; font-size: calc(11px * var(--text-scale)); letter-spacing: 1px; }
.hand-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 14px; border-top: 1px solid #a2b88022; margin-top: 4px; }
.hand-footer>span { color: #728d65; font-size: calc(9px * var(--text-scale)); }
.hand-footer>div { display: flex; gap: 12px; }
.hand-footer .button { font-size: calc(11px * var(--text-scale)); min-height: 37px; padding: 7px 15px; }
.combat-log { position: absolute; right: 12px; top: 58px; z-index: 7; width: min(330px, 90%); max-height: 300px; overflow-y: auto; background: #15251bf5; border: 1px solid #a2b58355; padding: 15px; box-shadow: 0 9px 30px #0005; }
.combat-log>div { display: flex; align-items: center; justify-content: space-between; }
.combat-log b { font: calc(14px * var(--text-scale)) var(--serif); color: #cbd1ad; }
.combat-log p { font-size: calc(10px * var(--text-scale)); line-height: 1.8; color: #9bb18c; border-top: 1px solid #9bb18c15; padding-top: 5px; margin-top: 5px; }
.inspect-overlay { position: fixed; inset: 0; z-index: 60; background: #07130ddb; display: flex; align-items: center; justify-content: center; padding: 25px; backdrop-filter: blur(5px); }
.inspect-panel { border: 1px solid #acc59055; padding: 35px; background: #19281e; max-width: 1100px; max-height: 95vh; overflow-y: auto; }
.inspect-panel h2 { font: calc(24px * var(--text-scale)) var(--serif); }
.inspect-panel>p:not(.eyebrow) { color: #96ac87; font-size: calc(11px * var(--text-scale)); margin-top: 10px; }
.inspect-panel .card-grid { display: flex; flex-wrap: wrap; justify-content: center; }
.reward-screen { min-height: 720px; text-align: center; position: relative; padding: 37px 20px 45px; isolation: isolate; }
.reward-aura { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 30%, #9cae5422, transparent 60%); z-index: -1; }
.victory-emblem { color: #d2d3a4; width: 78px; height: 78px; margin: 25px auto; border: 1px solid #bacb8755; transform: rotate(45deg); display: grid; place-items: center; background: #95b5640d; box-shadow: 0 0 70px #a7b66711; }
.victory-emblem svg { transform: rotate(-45deg); }
.reward-screen h1 { font: calc(35px * var(--text-scale)) var(--serif); letter-spacing: 6px; margin: 30px 0 14px; color: #e2dfbf; }
.reward-subtitle { color: #a4b28c; font-size: calc(11px * var(--text-scale)); }
.reward-badges { display: flex; gap: 25px; justify-content: center; margin: 25px 0 10px; color: #bfc49b; font-size: calc(11px * var(--text-scale)); flex-wrap: wrap; }
.reward-badges span { display: flex; align-items: center; gap: 7px; }
.reward-screen>.muted { font-size: calc(10px * var(--text-scale)); }
.reward-cards { display: flex; gap: 28px; justify-content: center; margin: 40px 0 30px; padding-top: 5px; }
.reward-cards .game-card { width: 184px; height: 270px; }
.reward-cards .card-illustration { height: 127px; }
.reward-cards .card-art { height: 119px; }
.reward-cards .card-copy p { font-size: calc(9px * var(--text-scale)); }
.reward-actions { display: flex; justify-content: center; gap: 30px; align-items: center; margin-bottom: 25px; }
.reward-actions .button { font-size: calc(11px * var(--text-scale)); }
.encounter-screen { border: 1px solid #b4c79233; min-height: 720px; position: relative; isolation: isolate; border-radius: 5px; overflow: hidden; margin-bottom: 25px; }
.encounter-art { position: absolute; inset: 0; background: linear-gradient(0deg,#10241ff5,#10241f6b),url('./assets/world-tree.png') center / cover; z-index: -1; opacity: .6; }
.encounter-content { max-width: 610px; margin: auto; padding: 47px 40px 50px; text-align: center; }
.encounter-symbol { color: #ccd2ac; margin: 42px auto 26px; }
.encounter-content h1 { font: calc(33px * var(--text-scale)) var(--serif); letter-spacing: 5px; }
.narrative-space { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 37px; color: #8da17e; font-size: calc(10px * var(--text-scale)); }
.narrative-space i { width: 60px; height: 1px; background: linear-gradient(90deg,transparent,#9bab7555,transparent); }
.event-body { font: calc(14px * var(--text-scale))/2 var(--serif); color: #c2cfb4; margin: 30px 0; white-space: pre-line; }
.event-choices { display: grid; gap: 15px; text-align: left; }
.event-choices>button { display: flex; gap: 18px; align-items: center; padding: 20px 23px; border: 1px solid #bdc9984d; background: #182f24bf; border-radius: 3px; color: #c6d2ad; min-height: 83px; }
.event-choices>button:hover:not(:disabled) { background: #405638b3; border-color: #c5d39d99; }
.event-choices b { display: block; font: calc(17px * var(--text-scale)) var(--serif); margin-bottom: 7px; }
.event-choices small { display: block; font-size: calc(11px * var(--text-scale)); line-height: 1.8; color: #a2b791; }
.event-choices>button>svg:last-child { margin-left: auto; }
.choice-index { font: calc(21px * var(--text-scale)) Georgia, serif; color: #809b6b; }
.encounter-content>.muted { margin-top: 25px; font-size: calc(10px * var(--text-scale)); }
.shop-screen { margin-bottom: 40px; padding: 18px 10px 30px; }
.shop-screen h1 { font: calc(30px * var(--text-scale)) var(--serif); letter-spacing: 4px; }
.shop-screen .muted { font-size: calc(11px * var(--text-scale)); margin-top: 10px; }
.shop-gold { color: #d4c095; font: calc(25px * var(--text-scale)) Georgia, serif; display: flex; gap: 10px; align-items: center; }
.shop-grid { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)) 1.2fr; gap: 20px; padding: 30px 0 40px; align-items: start; }
.shop-item>.game-card { width: 100%; min-width: 0; height: 270px; }
.shop-item>.button { margin-top: 15px; }
.shop-item.sold .game-card { opacity: .4; }
.shop-services { display: grid; gap: 15px; }
.shop-relic, .remove-service { border: 1px solid #acbc8d33; background: #839d670c; padding: 20px 15px; text-align: center; border-radius: 4px; }
.large-relic { width: 80px; height: 85px; margin: 0 auto 12px; color: var(--element); }
.shop-relic h3, .remove-service>b { font: calc(15px * var(--text-scale)) var(--serif); color: #d2d1af; }
.shop-relic p, .remove-service p { color: #8ea37c; font-size: calc(10px * var(--text-scale)); line-height: 1.9; margin: 10px 0 15px; }
.remove-service>svg { display: block; margin: 0 auto 10px; color: #a5ba8b; }
.summary-screen { text-align: center; padding: 55px 0 35px; min-height: 780px; background: radial-gradient(ellipse at 50% 35%,#779b5420,transparent 60%); }
.summary-sigil { color: #c0d29f; height: 160px; margin: 20px auto 30px; display: flex; justify-content: center; }
.summary-screen h1 { font: calc(37px * var(--text-scale)) var(--serif); letter-spacing: 6px; color: #d7d7b8; }
.summary-screen>p:not(.eyebrow) { font-size: calc(12px * var(--text-scale)); color: #9eaf8d; margin-top: 15px; }
.summary-stats { display: flex; justify-content: center; gap: 60px; margin: 50px 20px; }
.summary-stats small { display: block; font-size: calc(10px * var(--text-scale)); color: #8ba17c; }
.summary-stats b { display: block; font: calc(34px * var(--text-scale)) Georgia, serif; margin-top: 10px; }
.summary-stats i { font-size: calc(13px * var(--text-scale)); color: #839773; }
.summary-actions { display: flex; justify-content: center; gap: 20px; margin: 30px 0 65px; }
.summary-screen .chapter-track { max-width: 800px; margin-inline: auto; }
.modal-backdrop { position: fixed; inset: 0; background: #07100de0; z-index: 80; backdrop-filter: blur(7px); display: flex; align-items: center; justify-content: center; padding: 30px; animation: fade-in .15s ease; }
.modal { width: 560px; max-width: 100%; max-height: 90vh; overflow-y: auto; padding: 30px; background: linear-gradient(145deg,#203026,#15231b); border: 1px solid #b7c69955; border-radius: 7px; box-shadow: 0 35px 120px #0008; outline: none; }
.modal.wide-modal { width: 1010px; }
.modal.help-modal { width: 740px; }
.modal-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.modal-heading h2 { font: calc(23px * var(--text-scale)) var(--serif); color: #d4d9b9; letter-spacing: 2px; }
.modal-heading h2 .muted { font: calc(14px * var(--text-scale)) var(--sans); letter-spacing: 0; margin-left: 8px; }
.modal-heading .eyebrow { font-size: calc(7px * var(--text-scale)); margin-bottom: 7px; }
.modal-description { font-size: calc(11px * var(--text-scale)); color: #a2b393; line-height: 1.9; margin-bottom: 22px; }
.modal-description:empty { display: none; }
.save-slots { display: grid; gap: 13px; margin: 25px 0; }
.save-slot { display: flex; align-items: center; gap: 16px; border: 1px solid #9aaf7c35; padding: 19px 16px; background: #aec48c04; border-radius: 4px; }
.save-slot.current { border-color: #c2ca9670; background: #a9be8212; }
.slot-number { font: calc(24px * var(--text-scale)) Georgia, serif; color: #7d9669; }
.save-slot b { color: #c1ccac; font-size: calc(12px * var(--text-scale)); }
.save-slot p { color: #96ac83; font-size: calc(10px * var(--text-scale)); margin: 5px 0 1px; }
.save-slot small { color: #637e58; font-size: calc(8px * var(--text-scale)); }
.save-slot .button, .slot-active { margin-left: auto; white-space: nowrap; }
.slot-active { font-size: calc(9px * var(--text-scale)); color: #c3ce9e; }
.save-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.save-actions .button { font-size: calc(11px * var(--text-scale)); flex: 1; white-space: nowrap; }
.fine-print { color: #708b63; font-size: calc(9px * var(--text-scale)); line-height: 1.9; margin-top: 24px; }
.setting-row { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 22px 0; border-bottom: 1px solid #9aaf7c25; }
.setting-row b { display: block; font: calc(15px * var(--text-scale)) var(--serif); color: #c9d2b1; }
.setting-row small { display: block; font-size: calc(9px * var(--text-scale)); color: #79946b; margin-top: 6px; }
.toggle { border: 1px solid #77936466; width: 39px; height: 22px; border-radius: 15px; background: #34492d44; padding: 3px; flex-shrink: 0; }
.toggle i { display: block; background: #789369; height: 14px; width: 14px; border-radius: 50%; transition: transform .2s; }
.toggle.on { background: #8baf6144; border-color: #b5c98b77; }
.toggle.on i { transform: translateX(16px); background: #d0d8ad; }
.scale-slider { display: flex; align-items: center; gap: 15px; padding: 4px 0 20px; border-bottom: 1px solid #9aaf7c25; }
.scale-slider input[type="range"] { flex: 1; min-width: 0; height: 24px; margin: 0; appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer; }
.scale-slider input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, #8caa6e, #5f7a52); }
.scale-slider input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 15px; height: 15px; margin-top: -5.5px; border-radius: 50%; background: #dae1b6; border: 1px solid #b5c98b; box-shadow: 0 0 8px #b5c98b55; }
.scale-slider input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: #5f7a52; }
.scale-slider input[type="range"]::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%; background: #dae1b6; border: 1px solid #b5c98b; }
.scale-slider input[type="range"]:disabled { cursor: not-allowed; opacity: .38; }
.scale-slider output { flex-shrink: 0; min-width: 52px; text-align: right; font: calc(14px * var(--text-scale)) Georgia, serif; color: #cdd6b2; font-variant-numeric: tabular-nums; }
.scale-caption { flex-shrink: 0; font-size: calc(11px * var(--text-scale)); color: #7f9670; letter-spacing: .5px; }
.field-label { display: block; font-size: calc(11px * var(--text-scale)); color: #b4c39f; margin: 19px 0 10px; }
.field-label span { display: block; font-size: calc(9px * var(--text-scale)); color: #718e63; margin-top: 5px; }
.input { display: block; width: 100%; background: #112117; border: 1px solid #96ae7455; border-radius: 3px; padding: 11px 13px; color: #c8d2b0; font-size: calc(12px * var(--text-scale)); }
.input:disabled { opacity: .4; }
.input::placeholder { color: #4e6c43; }
.modal-card-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 21px 15px; }
.modal-card-grid .game-card { min-width: 0; }
.card-detail-pair { display: flex; justify-content: center; gap: 25px; padding: 15px 0; }
.card-detail-pair>div>small { display: block; text-align: center; color: #9db68a; font-size: calc(10px * var(--text-scale)); margin-top: 12px; }
.relic-detail { text-align: center; color: var(--element); padding: 15px 0; }
.relic-detail>.card-art { height: 150px; margin: 0 auto 30px; }
.relic-detail p { color: #c2ceac; font-size: calc(12px * var(--text-scale)); }
.relic-detail q { color: #859b76; font: italic calc(12px * var(--text-scale)) var(--serif); display: block; margin-top: 20px; }
.help-steps { display: flex; gap: 25px; margin-bottom: 30px; padding-bottom: 25px; border-bottom: 1px solid #aac08a2a; }
.help-steps>div { flex: 1; }
.help-steps span { font: calc(22px * var(--text-scale)) Georgia, serif; color: #6f8e5e; display: block; margin-bottom: 8px; }
.help-steps b { display: block; font: calc(15px * var(--text-scale)) var(--serif); color: #c6cfac; }
.help-steps p { font-size: calc(10px * var(--text-scale)); line-height: 1.9; color: #8da17b; margin-top: 8px; }
.reaction-table>div { display: flex; align-items: center; gap: 20px; padding: 11px 5px; border-bottom: 1px solid #a1b4811a; }
.reaction-table>div>span { display: flex; align-items: center; gap: 8px; min-width: 77px; }
.reaction-table i { font-size: calc(10px * var(--text-scale)); color: #68805b; }
.reaction-table b { font: calc(14px * var(--text-scale)) var(--serif); color: #c9d2ae; min-width: 34px; }
.reaction-table p { color: #91a77e; font-size: calc(10px * var(--text-scale)); }
.aura-label { font-size: calc(9px * var(--text-scale)); color: #9caf89; }
.import-preview { border: 1px solid #a1b48133; padding: 18px; background: #a1b48108; color: #9eb48d; margin-bottom: 25px; font-size: calc(11px * var(--text-scale)); line-height: 2.4; }
#toast { position: fixed; bottom: 30px; left: calc(50% + 80px); transform: translate(-50%,20px); background: #243327f5; color: #d7dfbb; border: 1px solid #b7c48f66; box-shadow: 0 8px 30px #0005; padding: 13px 24px; font-size: calc(12px * var(--text-scale)); max-width: calc(100vw - 40px); z-index: 110; border-radius: 4px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; text-align: center; }
#toast.visible { opacity: 1; transform: translate(-50%,0); }
.modal-open { overflow: hidden; }
@keyframes pulse { 0%,100% { opacity: .55; transform: scale(1); } 50% { opacity: .2; transform: scale(1.12); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 1600px) {
  .journey-panel { min-height: 690px; grid-template-columns: 38% 62%; }
  .chapter-intro { padding-left: 44px; max-width: 390px; padding-block: 45px; }
  .chapter-intro h2 { margin-top: 65px; font-size: calc(65px * var(--text-scale)); }
  .chapter-progress, .next-node { max-width: 310px; }
  .scene-caption { left: 44px; }
  .route-area { margin-right: 35px; }
  .hand-cards .game-card { width: 156px; }
  .combatants { min-height: 340px; padding-inline: 75px; }
  .player-unit>img { height: 230px; }
  .enemy-unit>img { height: 180px; }
}
@media (max-width: 1250px) {
  .sidebar { width: 195px; padding-inline: 15px; }
  .brand { gap: 8px; }
  .brand b { font-size: calc(16px * var(--text-scale)); letter-spacing: 1px; }
  .brand small { font-size: calc(6px * var(--text-scale)); letter-spacing: 1px; }
  .brand img { width: 33px; }
  .main { margin-left: 195px; }
  .workspace { padding: 25px 25px 0; }
  .topbar { padding-inline: 25px; gap: 14px; }
  .resource-bar { gap: 18px; }
  .footer { margin-inline: 25px; }
  .journey-panel { min-height: 610px; grid-template-columns: 39% 61%; }
  .chapter-intro { padding-left: 27px; padding-right: 0; }
  .chapter-eyebrow { letter-spacing: 1.7px; }
  .chapter-intro h2 { font-size: calc(49px * var(--text-scale)); letter-spacing: 10px; }
  .chapter-english { letter-spacing: 4px; }
  .next-node-title h3 { font-size: calc(16px * var(--text-scale)); }
  .chapter-mechanics { font-size: calc(9px * var(--text-scale)); gap: 5px; }
  .chapter-footnote { font-size: calc(7px * var(--text-scale)); }
  .next-node, .chapter-progress { max-width: 245px; }
  .route-area { margin-right: 8px; margin-left: 10px; }
  .map-legend { gap: 18px; }
  .map-legend .legend-note { display: none; }
  .below-grid { grid-template-columns: 1.6fr 1fr; gap: 12px; }
  .panel { padding-inline: 16px; }
  .deck-chip { padding: 6px 7px; font-size: calc(8px * var(--text-scale)); gap: 5px; }
  .combatants { padding-inline: 25px; gap: 20px; }
  .enemy-group { width: 60%; }
  .hand-cards { justify-content: flex-start; }
  .talent-grid { gap: 12px; }
  .talent-card { padding: 22px 14px 15px; }
  .talent-card h2 { font-size: calc(16px * var(--text-scale)); }
  .archon-copy { padding-right: 15px; }
  .archon-copy h2 { font-size: calc(18px * var(--text-scale)); }
  .shop-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
  .shop-services { grid-column: 1/-1; grid-template-columns: 1fr 1fr; }
  .shop-relic { display: grid; grid-template-columns: 80px 1fr 120px; align-items: center; gap: 5px 15px; }
  .shop-relic .large-relic { grid-row: 1/3; margin: 0; }
  .shop-relic p { grid-column: 2; }
  .shop-relic .button { grid-row: 1/3; grid-column: 3; }
  .shop-services .remove-service { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; }
  .remove-service p { display: none; }
  .remove-service svg { margin: 0; }
  .remove-service .button { width: auto; margin-left: auto; }
  .shop-services .shop-relic { grid-template-columns: 60px 1fr; }
  .shop-services .large-relic { width: 50px; height: 65px; }
  .shop-services .shop-relic .button { grid-row: auto; grid-column: 1/-1; }
}
@media (max-width: 1050px) {
  .sidebar { width: 76px; padding-inline: 13px; padding-top: 25px; align-items: center; }
  .brand { padding-bottom: 25px; }
  .brand img { width: 38px; height: 43px; }
  .brand>span, .sidebar-rule, .sidebar-subtitle, .sidebar-run, .traveler-mini, .local-note, .build-label { display: none; }
  .sidebar nav { width: 100%; }
  .nav-item { justify-content: center; padding-inline: 10px; min-height: 45px; }
  .nav-item span, .nav-item small, .nav-item kbd, .nav-dot { display: none; }
  .nav-item.active:before { left: -14px; }
  .sidebar-bottom { width: 100%; }
  .main { margin-left: 76px; }
  .workspace { padding-inline: 28px; }
  .topbar { padding-inline: 28px; }
  .journey-panel { min-height: 620px; grid-template-columns: 38% 62%; }
  .next-node { max-width: 230px; }
  .next-node-title { gap: 8px; }
  .chapter-intro { padding-left: 27px; }
  .scene-caption { left: 27px; }
  .next-node-title h3 { font-size: calc(16px * var(--text-scale)); }
  .talent-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .talent-card { padding: 25px; }
  .talent-card .button { font-size: calc(12px * var(--text-scale)); }
  .talent-intro { padding: 25px; gap: 35px; }
  .talent-intro h2 { font-size: calc(21px * var(--text-scale)); }
}
@media (max-width: 820px) {
  .workspace { padding: 23px 20px 0; }
  .topbar { padding-inline: 20px; gap: 14px; min-height: 70px; }
  .resource-bar { gap: 16px; }
  .resource { gap: 6px; }
  .breadcrumb>span, .breadcrumb>strong { display: none; }
  .breadcrumb { display: none; }
  .resource-bar { margin-left: 0; margin-right: auto; }
  .help-trigger { margin-left: auto; }
  .page-heading h1 { font-size: calc(23px * var(--text-scale)); }
  .page-heading h1 span { font-size: calc(11px * var(--text-scale)); margin-left: 9px; }
  .heading-side { gap: 13px; }
  .heading-side>.text-button { display: none; }
  .journey-panel { grid-template-columns: 40% 60%; min-height: 580px; }
  .chapter-intro { padding: 27px 0 26px 22px; }
  .chapter-eyebrow { font-size: calc(7px * var(--text-scale)); letter-spacing: 1px; gap: 6px; }
  .chapter-eyebrow>span:last-child { font-size: calc(6px * var(--text-scale)); }
  .chapter-intro h2 { font-size: calc(43px * var(--text-scale)); letter-spacing: 8px; margin-top: 34px; }
  .chapter-english { font-size: calc(9px * var(--text-scale)); letter-spacing: 3px; margin-bottom: 16px; }
  .chapter-mechanics { font-size: calc(8px * var(--text-scale)); margin-bottom: 23px; gap: 4px; }
  .chapter-mechanics .separator { margin-inline: 4px; }
  .chapter-mechanics .element-glyph { font-size: calc(14px * var(--text-scale)); }
  .next-node { padding-top: 25px; }
  .next-node-label { font-size: calc(8px * var(--text-scale)); }
  .next-node-label i { font-size: calc(5px * var(--text-scale)); }
  .next-node-title { gap: 7px; margin-top: 13px; }
  .next-node-title h3 { font-size: calc(14px * var(--text-scale)); letter-spacing: 1px; }
  .node-icon { width: 31px; height: 31px; }
  .node-icon svg { width: 18px; }
  .node-tier { font-size: calc(17px * var(--text-scale)); }
  .next-node>p { font-size: calc(9px * var(--text-scale)); }
  .chapter-footnote>svg { display: none; }
  .chapter-footnote { gap: 0; font-size: calc(6px * var(--text-scale)); }
  .chapter-footnote i { margin-inline: 0; }
  .next-node .primary { padding-inline: 14px; font-size: calc(11px * var(--text-scale)); letter-spacing: 1px; }
  .map-title { right: 8px; }
  .map-title>span { font-size: calc(10px * var(--text-scale)); letter-spacing: 2px; }
  .map-title small { font-size: calc(6px * var(--text-scale)); }
  .route-area { margin-left: 10px; }
  .node-shape { width: 30px; height: 30px; }
  .node-shape svg { width: 16px; height: 16px; }
  .map-node.available .node-shape { width: 35px; height: 35px; }
  .map-node.chosen:after { width: 49px; height: 49px; inset: -4.5px; }
  .map-node .node-label { font-size: calc(7px * var(--text-scale)); }
  .boss-annotation { left: calc(50% + 31px); top: 34px; }
  .boss-annotation span { font-size: calc(4px * var(--text-scale)); letter-spacing: .7px; }
  .boss-annotation strong { font-size: calc(8px * var(--text-scale)); letter-spacing: .3px; }
  .map-node.type-boss .node-shape { width: 35px; height: 35px; }
  .map-bottom { font-size: calc(6px * var(--text-scale)); }
  .map-bottom .compass-mark { left: 13px; }
  .map-bottom>span:last-child { max-width: 160px; text-align: right; }
  .below-grid { grid-template-columns: 1fr; }
  .relic-panel { display: none; }
  .map-legend { gap: 14px; font-size: calc(8px * var(--text-scale)); justify-content: space-between; }
  .map-legend svg { width: 13px; height: 13px; }
  .map-legend>span { gap: 4px; }
  .chapter-track { margin-inline: 0; }
  .chapter-track p { font-size: calc(8px * var(--text-scale)); letter-spacing: .3px; }
  .chapter-track>div { min-width: 35px; }
  .chapter-track>div>span { height: 26px; width: 26px; font-size: calc(14px * var(--text-scale)); }
  .chapter-track:before { top: 13px; }
  .footer { margin-inline: 20px; }
  .footer>span:nth-child(2) { display: none; }
  .archon-grid { gap: 15px; }
  .archon-entry { flex-direction: column; }
  .archon-art { height: 130px; width: 100%; }
  .archon-art>.card-art { height: 112px; }
  .archon-copy { padding: 0 23px 25px; }
  .element-filters { gap: 3px; flex-wrap: wrap; justify-content: flex-end; }
  .element-filters button { width: 24px; height: 26px; font-size: calc(16px * var(--text-scale)); }
  .talent-intro { gap: 20px; }
  .talent-tree { width: 100px; height: 140px; flex-shrink: 0; }
  .talent-intro h2 { font-size: calc(18px * var(--text-scale)); }
  .talent-stats { gap: 15px; }
  .combatants { padding-inline: 18px; gap: 10px; min-height: 280px; }
  .player-unit { width: 120px; }
  .player-unit>img { height: 170px; }
  .enemy-group { width: 65%; gap: 10px; }
  .enemy-unit>img { height: 130px; }
  .enemy-unit.boss>img { height: 165px; }
  .enemy-unit .unit-label strong { font-size: calc(10px * var(--text-scale)); }
  .enemy-unit .unit-label small { font-size: calc(4px * var(--text-scale)); letter-spacing: .7px; }
  .battle-center-sigil { display: none; }
  .enemy-intent { flex-wrap: wrap; gap: 3px; }
  .enemy-intent b { font-size: calc(15px * var(--text-scale)); }
  .enemy-intent small { font-size: calc(7px * var(--text-scale)); }
  .enemy-status>span:not(.element-glyph) { font-size: calc(7px * var(--text-scale)); }
  .hand-panel { padding-inline: 13px; }
  .hand-instruction span { max-width: 190px; }
  .pile-buttons { gap: 5px; }
  .pile-buttons button { flex-direction: column; font-size: calc(6px * var(--text-scale)); padding: 2px 4px; }
  .pile-buttons svg { height: 16px; }
  .hand-footer>span { max-width: 200px; font-size: calc(8px * var(--text-scale)); }
  .hand-footer .button { padding-inline: 12px; min-width: 0; }
  .reward-cards { gap: 15px; }
  .reward-cards .game-card { width: 160px; min-width: 0; }
  .summary-stats { gap: 33px; }
}
@media (max-width: 600px) {
  .sidebar { position: fixed; width: 100%; height: 58px; inset: auto 0 0; border: 0; border-top: 1px solid #bbcb922e; padding: 0 7px; flex-direction: row; background: #15251cf5; backdrop-filter: blur(8px); }
  .sidebar .brand { display: none; }
  .sidebar nav { display: flex; justify-content: space-around; width: 80%; gap: 0; }
  .sidebar .nav-item { min-height: 49px; height: 49px; flex-direction: column; gap: 3px; padding: 5px 2px; border: 0; border-radius: 0; }
  .sidebar .nav-item span { display: block; font-size: calc(8px * var(--text-scale)); }
  .sidebar .nav-item svg { width: 18px; height: 18px; }
  .sidebar .nav-item.active:before { top: 0; left: calc(50% - 12px); height: 2px; width: 24px; }
  .sidebar-bottom { padding: 0; margin: 0; width: 20%; }
  .sidebar-bottom .nav-item:last-of-type { display: none; }
  .sidebar-bottom .nav-item { font-size: calc(8px * var(--text-scale)); }
  .sidebar-bottom .nav-item kbd { display: none; }
  .main { margin: 0 0 58px; }
  .topbar { padding: 11px 17px; min-height: 66px; gap: 10px; }
  .resource-bar { gap: 17px; width: calc(100% - 36px); justify-content: space-between; }
  .resource { gap: 5px; }
  .resource>svg { width: 14px; height: 14px; }
  .stat-text small { font-size: calc(7px * var(--text-scale)); letter-spacing: .5px; }
  .stat-text strong { font-size: calc(12px * var(--text-scale)); }
  .stat-text strong i { font-size: calc(8px * var(--text-scale)); }
  .resource.echoes { gap: 4px; }
  .help-trigger { width: 24px; height: 24px; }
  .help-trigger svg { width: 16px; height: 16px; }
  .workspace { padding: 22px 16px 0; }
  .eyebrow { font-size: calc(6px * var(--text-scale)); letter-spacing: 1.6px; }
  .page-heading { gap: 10px; margin-bottom: 20px; }
  .page-heading h1 { font-size: calc(22px * var(--text-scale)); letter-spacing: 2px; }
  .page-heading h1 span { font-size: calc(10px * var(--text-scale)); margin-left: 10px; }
  .save-indicator { font-size: calc(7px * var(--text-scale)); gap: 4px; letter-spacing: .3px; }
  .save-indicator svg { width: 11px; height: 11px; }
  .heading-side { margin-top: 8px; }
  .journey-panel { display: flex; flex-direction: column; min-height: 0; }
  .scene-image { background-position: 24% center; opacity: .65; }
  .scene-shade { background: linear-gradient(180deg,#0d23177d,#10281dd1 35%,#10291de3),linear-gradient(90deg,#0c211bcc,transparent 70%); }
  .chapter-intro { padding: 27px 24px 18px; display: grid; grid-template-columns: 1fr 1fr; max-width: 100%; gap: 0 25px; }
  .chapter-eyebrow { grid-column: 1/-1; font-size: calc(8px * var(--text-scale)); letter-spacing: 2px; }
  .chapter-eyebrow>span:last-child { font-size: calc(7px * var(--text-scale)); }
  .region-seal { width: 105px; right: 35px; top: 55px; }
  .region-seal .card-art { width: 105px; height: 130px; }
  .chapter-intro h2 { grid-column: 1; font-size: calc(46px * var(--text-scale)); letter-spacing: 12px; margin-top: 16px; }
  .chapter-english { grid-column: 1; font-size: calc(8px * var(--text-scale)); margin-bottom: 13px; letter-spacing: 3.5px; }
  .chapter-mechanics { grid-column: 1/-1; margin: 3px 0 20px; font-size: calc(9px * var(--text-scale)); }
  .chapter-progress { grid-column: 2; grid-row: 2/4; align-self: center; margin-top: 10px; }
  .chapter-progress>span { font-size: calc(8px * var(--text-scale)); }
  .chapter-progress>b { font-size: calc(11px * var(--text-scale)); }
  .next-node { grid-column: 1/-1; display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; max-width: 100%; padding: 17px 0 0; border-top: 1px solid #b1c09333; }
  .next-node-label { grid-column: 1/-1; font-size: calc(8px * var(--text-scale)); }
  .next-node-label i { display: none; }
  .next-node-title { grid-column: 1; margin-top: 13px; gap: 8px; }
  .next-node-title h3 { font-size: calc(16px * var(--text-scale)); letter-spacing: 1px; white-space: nowrap; }
  .node-tier { display: none; }
  .next-node>p { grid-column: 1/-1; font-size: calc(9px * var(--text-scale)); margin: 12px 0 0; min-height: 0; }
  .next-node .button { grid-column: 2; grid-row: 2; font-size: calc(11px * var(--text-scale)); height: 38px; min-height: 38px; align-self: end; margin-top: 9px; }
  .chapter-footnote { grid-column: 1/-1; font-size: calc(7px * var(--text-scale)); margin-top: 13px; }
  .chapter-footnote>svg { display: block; height: 12px; width: 12px; margin-right: 5px; }
  .story-title, .story-body { grid-column: 1/-1; }
  .route-area { height: 560px; margin: 5px 13px 38px; }
  .map-title { top: 7px; right: 10px; }
  .map-title>span { font-size: calc(11px * var(--text-scale)); }
  .map-title small { font-size: calc(7px * var(--text-scale)); }
  .route-map { inset: 22px 0 0; }
  .map-node .node-shape { width: 32px; height: 32px; }
  .map-node.available .node-shape { width: 37px; height: 37px; }
  .map-node.type-boss .node-shape { width: 38px; height: 38px; }
  .map-node .node-label { font-size: calc(8px * var(--text-scale)); }
  .boss-annotation { top: 38px; left: calc(50% + 37px); }
  .boss-annotation strong { font-size: calc(9px * var(--text-scale)); letter-spacing: 1px; }
  .boss-annotation span { font-size: calc(5px * var(--text-scale)); }
  .map-bottom { bottom: -21px; font-size: calc(7px * var(--text-scale)); }
  .map-bottom>span:last-child { max-width: none; }
  .scene-caption { left: 24px; width: calc(100% - 48px); bottom: 10px; font-size: calc(4px * var(--text-scale)); }
  .map-legend { justify-content: flex-start; gap: 10px 17px; padding: 16px 3px 12px; }
  .map-legend>span { font-size: calc(8px * var(--text-scale)); min-width: calc(33% - 12px); }
  .below-grid { margin-top: 10px; }
  .panel { padding: 16px; }
  .section-title h2 { font-size: calc(12px * var(--text-scale)); }
  .deck-strip { gap: 8px; margin-top: 15px; }
  .deck-chip { font-size: calc(9px * var(--text-scale)); padding: 7px 8px; }
  .chapter-track { margin: 27px 0 22px; overflow: hidden; }
  .chapter-track>div { min-width: 0; width: 12.5%; }
  .chapter-track p { font-size: calc(7px * var(--text-scale)); letter-spacing: 0; }
  .chapter-track small { font-size: calc(6px * var(--text-scale)); }
  .chapter-track>div>span { width: 23px; height: 23px; margin-bottom: 7px; font-size: calc(13px * var(--text-scale)); }
  .chapter-track:before { top: 11px; }
  .footer { min-height: 49px; margin-inline: 16px; font-size: calc(6px * var(--text-scale)); }
  .footer .text-button { font-size: calc(7px * var(--text-scale)); }
  .collection-count { font-size: calc(20px * var(--text-scale)); }
  .collection-count small { font-size: calc(8px * var(--text-scale)); }
  .collection-toolbar { display: block; padding-bottom: 11px; }
  .tabs { margin-bottom: 12px; }
  .tabs button { padding-top: 0; }
  .element-filters { justify-content: flex-start; gap: 7px; }
  .element-filters button { width: 25px; }
  .collection-description { font-size: calc(10px * var(--text-scale)); line-height: 1.8; margin-bottom: 20px; }
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px 13px; }
  .game-card { width: 100%; min-width: 0; }
  .collection-entry .game-card { height: 242px; }
  .card-copy h3 { font-size: calc(12px * var(--text-scale)); }
  .collection-grid { margin-top: 18px; }
  .relic-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
  .relic-entry { padding: 18px 12px; }
  .relic-entry h3 { font-size: calc(14px * var(--text-scale)); }
  .relic-entry p { font-size: calc(9px * var(--text-scale)); min-height: 49px; }
  .relic-entry>div { height: 85px; }
  .archon-grid { gap: 16px 12px; margin-top: 20px; }
  .archon-art { height: 115px; }
  .archon-art>.card-art { height: 96px; }
  .archon-copy { padding: 0 15px 21px; }
  .archon-copy h2 { font-size: calc(16px * var(--text-scale)); }
  .archon-copy p { font-size: calc(9px * var(--text-scale)); }
  .archon-copy>small { font-size: calc(8px * var(--text-scale)); }
  .archon-copy>div>b { font-size: calc(9px * var(--text-scale)); }
  .archon-copy>div>b>span { font-size: calc(7px * var(--text-scale)); margin-left: 2px; }
  .archon-status { font-size: calc(7px * var(--text-scale)); }
  .talent-intro { padding: 21px 15px; gap: 13px; }
  .talent-tree { height: 105px; width: 66px; }
  .talent-intro h2 { font-size: calc(16px * var(--text-scale)); letter-spacing: 1px; margin-bottom: 10px; }
  .talent-intro p { font-size: calc(9px * var(--text-scale)); }
  .talent-stats { gap: 13px; margin-top: 13px; }
  .talent-stats>span { font-size: calc(7px * var(--text-scale)); }
  .talent-stats b { font-size: calc(15px * var(--text-scale)); margin-right: 4px; }
  .echoes-total { font-size: calc(23px * var(--text-scale)); }
  .echoes-total svg { width: 19px; margin-right: 3px; }
  .echoes-total small { font-size: calc(8px * var(--text-scale)); margin-left: 3px; }
  .talent-card { padding: 23px 15px 16px; }
  .talent-icon { height: 89px; }
  .talent-card h2 { font-size: calc(17px * var(--text-scale)); }
  .talent-card>p { font-size: calc(9px * var(--text-scale)); min-height: 40px; }
  .talent-card .button { font-size: calc(9px * var(--text-scale)); }
  .compact-heading h1 { font-size: calc(20px * var(--text-scale)); }
  .compact-heading h1 span { display: block; font-size: calc(9px * var(--text-scale)); margin: 5px 0 0; }
  .compact-heading .heading-side { flex-direction: column; gap: 8px; }
  .compact-heading .button { font-size: calc(9px * var(--text-scale)); min-height: 28px; padding: 5px 8px; gap: 5px; }
  .compact-heading .button svg { width: 12px; height: 12px; }
  .battle-top { padding: 12px; gap: 9px; }
  .turn-label { font-size: calc(8px * var(--text-scale)); gap: 5px; }
  .turn-label b { font-size: calc(14px * var(--text-scale)); }
  .battle-effects { gap: 3px; }
  .battle-effects>span { font-size: calc(6px * var(--text-scale)); padding: 2px 4px; }
  .battle-top>.text-button { font-size: calc(7px * var(--text-scale)); gap: 4px; }
  .battle-top>.text-button svg { width: 12px; height: 12px; }
  .combatants { min-height: 260px; padding: 14px 13px 10px; gap: 18px; }
  .player-unit { width: 89px; }
  .player-unit>img { height: 147px; }
  .unit-label strong { font-size: calc(11px * var(--text-scale)); }
  .unit-label small { font-size: calc(5px * var(--text-scale)); letter-spacing: 1px; }
  .enemy-group { width: calc(100% - 105px); gap: 4px; }
  .enemy-group.count-1 .enemy-unit { width: 150px; }
  .enemy-unit { min-width: 0; }
  .enemy-unit>img { height: 120px; }
  .enemy-unit.boss>img { height: 145px; }
  .enemy-intent { gap: 3px; }
  .enemy-intent b { font-size: calc(14px * var(--text-scale)); }
  .enemy-intent svg { width: 13px; height: 13px; }
  .enemy-intent small { display: block; font-size: calc(6px * var(--text-scale)); }
  .enemy-unit .unit-label strong { font-size: calc(9px * var(--text-scale)); letter-spacing: 0; line-height: 1.5; }
  .enemy-unit .unit-label small { display: none; }
  .enemy-status { min-height: 20px; }
  .enemy-status .element-glyph { font-size: calc(17px * var(--text-scale)); }
  .enemy-status>span:not(.element-glyph) { font-size: calc(6px * var(--text-scale)); }
  .target-indicator { font-size: calc(6px * var(--text-scale)); margin-top: 6px; letter-spacing: 0; }
  .player-status>span { font-size: calc(8px * var(--text-scale)); }
  .health-bar { height: 12px; }
  .health-bar>span { font-size: calc(7px * var(--text-scale)); line-height: calc(10px * var(--text-scale)); }
  .boss-mechanic { margin: 3px 13px 12px; font-size: calc(8px * var(--text-scale)); padding: 7px; }
  .support-bar { padding: 10px 12px; gap: 7px; }
  .support-label { font-size: calc(8px * var(--text-scale)); }
  .support-bar>.muted { font-size: calc(7px * var(--text-scale)); }
  .support-button { font-size: calc(7px * var(--text-scale)); padding-inline: 6px; }
  .support-button small { font-size: calc(6px * var(--text-scale)); }
  .hand-panel { margin-top: 14px; padding: 13px 11px; }
  .hand-header { gap: 10px; }
  .energy-orb { width: 43px; height: 40px; }
  .energy-orb strong { font-size: calc(24px * var(--text-scale)); }
  .energy-orb>span { font-size: calc(9px * var(--text-scale)); }
  .hand-instruction strong { font-size: calc(11px * var(--text-scale)); }
  .hand-instruction span { font-size: calc(7px * var(--text-scale)); max-width: 120px; line-height: 1.8; }
  .pile-buttons { gap: 2px; }
  .pile-buttons button { gap: 2px; font-size: calc(6px * var(--text-scale)); padding-inline: 2px; }
  .pile-buttons b { font-size: calc(10px * var(--text-scale)); }
  .pile-buttons svg { height: 14px; width: 14px; }
  .hand-cards { gap: 11px; padding-top: 18px; min-height: 231px; }
  .hand-cards .game-card { width: 138px; min-width: 138px; height: 213px; }
  .hand-footer { padding-top: 12px; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
  .hand-footer>span { font-size: calc(7px * var(--text-scale)); max-width: none; width: 100%; }
  .hand-footer>div { margin-left: auto; }
  .hand-footer .button { min-height: 34px; font-size: calc(10px * var(--text-scale)); }
  .reward-screen { min-height: 660px; padding: 23px 0 30px; }
  .victory-emblem { width: 65px; height: 65px; margin-block: 23px; }
  .reward-screen h1 { font-size: calc(30px * var(--text-scale)); letter-spacing: 4px; margin-top: 26px; }
  .reward-subtitle { font-size: calc(10px * var(--text-scale)); }
  .reward-badges { gap: 10px 20px; font-size: calc(10px * var(--text-scale)); }
  .reward-cards { gap: 10px; margin: 26px -5px; align-items: center; overflow-x: auto; justify-content: flex-start; padding: 12px 10px; }
  .reward-cards .game-card { width: 148px; min-width: 148px; height: 236px; }
  .reward-cards .card-illustration { height: 101px; }
  .reward-cards .card-art { height: 96px; }
  .reward-cards .card-copy p { font-size: calc(8px * var(--text-scale)); }
  .reward-screen .save-indicator { font-size: calc(8px * var(--text-scale)); }
  .encounter-screen { min-height: 660px; }
  .encounter-content { padding: 37px 24px 35px; }
  .encounter-symbol { margin: 35px 0 27px; }
  .encounter-content h1 { font-size: calc(27px * var(--text-scale)); letter-spacing: 4px; }
  .event-choices>button { padding: 19px 16px; gap: 14px; }
  .event-choices b { font-size: calc(17px * var(--text-scale)); }
  .event-choices small { font-size: calc(10px * var(--text-scale)); }
  .encounter-content>.muted { font-size: calc(9px * var(--text-scale)); line-height: 1.8; }
  .event-body { font-size: calc(13px * var(--text-scale)); }
  .shop-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 25px 14px; }
  .shop-item>.game-card { height: 245px; }
  .shop-services { grid-template-columns: 1fr; grid-column: auto; gap: 15px; }
  .shop-relic { padding: 15px 12px; display: flex !important; flex-direction: column; gap: 0; }
  .shop-services .large-relic { height: 66px; width: 60px; margin: 0 auto 10px; }
  .shop-relic h3 { font-size: calc(13px * var(--text-scale)); }
  .shop-relic p { font-size: calc(9px * var(--text-scale)); margin-bottom: 10px; }
  .shop-relic .button { font-size: calc(11px * var(--text-scale)); }
  .remove-service { padding: 15px 10px; gap: 6px !important; }
  .remove-service>b { font-size: calc(13px * var(--text-scale)); }
  .remove-service>svg { width: 18px; }
  .remove-service>.button { font-size: calc(11px * var(--text-scale)); min-height: 30px; padding: 4px 10px; }
  .summary-screen { min-height: 650px; padding-top: 35px; }
  .summary-sigil { height: 135px; }
  .summary-screen h1 { font-size: calc(29px * var(--text-scale)); letter-spacing: 4px; }
  .summary-stats { gap: 22px; margin: 40px 0; }
  .summary-stats small { font-size: calc(8px * var(--text-scale)); }
  .summary-stats b { font-size: calc(27px * var(--text-scale)); }
  .summary-stats i { font-size: calc(9px * var(--text-scale)); }
  .summary-actions { gap: 13px; margin-bottom: 50px; }
  .summary-actions .button { font-size: calc(11px * var(--text-scale)); padding: 10px 13px; }
  .modal-backdrop { padding: 17px; }
  .modal { padding: 23px 20px; max-height: 90dvh; border-radius: 5px; }
  .modal-heading h2 { font-size: calc(21px * var(--text-scale)); letter-spacing: 1px; }
  .modal-heading { margin-bottom: 19px; gap: 15px; }
  .modal-description { font-size: calc(10px * var(--text-scale)); }
  .save-slot { padding: 15px 11px; gap: 12px; }
  .slot-number { font-size: calc(21px * var(--text-scale)); }
  .save-slot b { font-size: calc(11px * var(--text-scale)); }
  .save-slot p { font-size: calc(8px * var(--text-scale)); }
  .save-slot small { font-size: calc(7px * var(--text-scale)); }
  .slot-active { font-size: calc(8px * var(--text-scale)); }
  .save-slot .button { font-size: calc(10px * var(--text-scale)); padding: 5px 10px; min-height: 28px; }
  .save-actions .button { font-size: calc(10px * var(--text-scale)); gap: 6px; padding-inline: 10px; }
  .modal-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 10px; }
  .modal-card-grid .game-card { height: 235px; padding-inline: 10px; }
  .modal-card-grid .card-illustration { height: 103px; }
  .modal-card-grid .card-art { height: 98px; }
  .modal-card-grid .card-copy h3 { font-size: calc(11px * var(--text-scale)); }
  .card-detail-pair { gap: 14px; padding-block: 8px; }
  .card-detail-pair>div { width: calc(50% - 7px); }
  .card-detail-pair .game-card { height: 234px; padding-inline: 10px; }
  .card-detail-pair .card-copy h3 { font-size: calc(11px * var(--text-scale)); }
  .card-detail-pair .card-illustration { height: 100px; }
  .card-detail-pair .card-art { height: 97px; }
  .help-steps { display: block; padding-bottom: 22px; margin-bottom: 17px; }
  .help-steps>div { margin-top: 16px; padding-left: 39px; position: relative; }
  .help-steps span { position: absolute; left: 0; top: -3px; font-size: calc(19px * var(--text-scale)); }
  .help-steps b { font-size: calc(14px * var(--text-scale)); }
  .help-steps p { font-size: calc(9px * var(--text-scale)); margin-top: 5px; }
  .reaction-table>div { gap: 12px; padding-block: 10px; }
  .reaction-table>div>span { min-width: 67px; gap: 4px; }
  .reaction-table b { font-size: calc(13px * var(--text-scale)); white-space: nowrap; }
  .reaction-table p { font-size: calc(9px * var(--text-scale)); }
  .reaction-table .element-glyph { font-size: calc(18px * var(--text-scale)); }
  .fine-print { font-size: calc(8px * var(--text-scale)); margin-top: 20px; }
  #toast { left: 50%; bottom: 77px; width: max-content; font-size: calc(11px * var(--text-scale)); padding: 11px 18px; }
  .inspect-overlay { padding: 16px; }
  .inspect-panel { padding: 22px; }
  .inspect-panel h2 { font-size: calc(20px * var(--text-scale)); }
  .inspect-panel .card-grid { gap: 15px 10px; }
  .inspect-panel .game-card { width: calc(50% - 5px); height: 236px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
html[data-motion="off"] *, html[data-motion="off"] *:before, html[data-motion="off"] *:after { animation: none !important; transition: none !important; }

/* ===== 动效叠加层（fx.js）与入场动画 ===== */
#fx-root { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.fx-float { position: absolute; transform: translate(-50%, -50%); font-family: Georgia, var(--sans); font-weight: 700; letter-spacing: 1px; white-space: nowrap; text-shadow: 0 2px 10px #000c, 0 0 16px currentColor; animation: fx-float-up 1.05s cubic-bezier(.2,.6,.4,1) both; }
@keyframes fx-float-up {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.65); }
  14% { opacity: 1; transform: translate(-50%, -52%) scale(1.1); }
  28% { transform: translate(-50%, -58%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, calc(-58% - var(--rise, 48px))) scale(.92); }
}
.fx-particle { position: absolute; width: 5px; height: 5px; margin: -2px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: fx-particle .62s ease-out both; }
@keyframes fx-particle { from { opacity: 1; transform: translate(0, 0) scale(1); } to { opacity: 0; transform: translate(var(--dx, 30px), var(--dy, -30px)) scale(.35); } }
.fx-flash { position: absolute; border-radius: 50%; background: radial-gradient(circle, currentColor 8%, transparent 68%); animation: fx-flash-out .5s ease-out both; }
@keyframes fx-flash-out { from { opacity: .9; transform: translate(-50%, -50%) scale(.55); } to { opacity: 0; transform: translate(-50%, -50%) scale(1.35); } }
.fx-ring { position: absolute; border: 1.5px solid currentColor; border-radius: 50%; box-shadow: 0 0 22px currentColor, inset 0 0 14px currentColor; animation: fx-ring .85s ease-out both; }
@keyframes fx-ring { from { opacity: .85; transform: translate(-50%, -50%) scale(.5); } to { opacity: 0; transform: translate(-50%, -50%) scale(3.6); } }
.fx-banner { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%); text-align: center; animation: fx-banner 1.3s ease both; }
.fx-banner b { display: block; font: calc(42px * var(--text-scale)) var(--serif); letter-spacing: 14px; text-indent: 14px; color: currentColor; text-shadow: 0 0 34px currentColor, 0 3px 20px #000c; }
.fx-banner small { display: block; margin-top: 9px; font: calc(9px * var(--text-scale)) Georgia, serif; letter-spacing: 6px; text-indent: 6px; color: #e8ead2b3; }
.fx-banner i { display: block; width: 200px; height: 1px; margin: 12px auto 0; background: linear-gradient(90deg, transparent, currentColor, transparent); }
@keyframes fx-banner {
  0% { opacity: 0; transform: translate(-50%, -46%) scale(.72); }
  14% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
  24% { transform: translate(-50%, -50%) scale(1); }
  74% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -56%) scale(1.03); }
}
.fx-shake { animation: fx-shake .4s ease; }
.fx-shake-hard { animation: fx-shake-hard .52s ease; }
@keyframes fx-shake { 0%, 100% { transform: translate(0, 0); } 18% { transform: translate(-7px, 2px); } 38% { transform: translate(6px, -2px); } 58% { transform: translate(-4px, 1px); } 78% { transform: translate(3px, 0); } }
@keyframes fx-shake-hard { 0%, 100% { transform: translate(0, 0); } 15% { transform: translate(-11px, 3px) rotate(-.4deg); } 32% { transform: translate(10px, -3px) rotate(.4deg); } 52% { transform: translate(-7px, 2px); } 72% { transform: translate(5px, -1px); } 88% { transform: translate(-2px, 0); } }
.fx-fly-card { position: absolute; border-radius: 7px; border: 1.5px solid var(--element, #d4c49a); background: radial-gradient(ellipse at 50% 22%, color-mix(in srgb, var(--element, #d4c49a), transparent 86%), #17261ff2); box-shadow: 0 8px 26px #0009, 0 0 20px color-mix(in srgb, var(--element, #d4c49a), transparent 78%); display: grid; place-items: center; color: var(--element, #d4c49a); will-change: transform, opacity; }
.hand-card-wrap.fx-stagger .game-card { animation: fx-hand-in .32s cubic-bezier(.25,.7,.35,1) backwards; animation-delay: calc(var(--fx-i, 0) * 36ms); }
@keyframes fx-hand-in { from { opacity: 0; transform: translateY(30px) rotate(1.5deg) scale(.95); } to { opacity: 1; transform: none; } }
.energy-orb.fx-pop { animation: fx-pop .38s ease; }
@keyframes fx-pop { 40% { transform: scale(1.16); box-shadow: 0 0 24px #c8d48e59; } }
.workspace.fx-enter > * { animation: fx-rise .42s ease backwards; }
.workspace.fx-enter > *:nth-child(2) { animation-delay: .06s; }
.workspace.fx-enter > *:nth-child(3) { animation-delay: .1s; }
@keyframes fx-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reward-cards .game-card { animation: fx-hand-in .34s ease backwards; }
.reward-cards .game-card:nth-child(2) { animation-delay: .08s; }
.reward-cards .game-card:nth-child(3) { animation-delay: .16s; }
.victory-emblem { animation: fx-emblem 3s ease-in-out infinite; }
@keyframes fx-emblem { 0%, 100% { box-shadow: 0 0 70px #a7b66711; } 50% { box-shadow: 0 0 92px #c9d48830; } }

/* Chapter identity: local placeholder art and a chapter-specific base color. */
.main[data-chapter="mondstadt"] { --chapter-image: url('./assets/chapters/mondstadt.png'); --chapter-tone: #193d34; }
.main[data-chapter="liyue"] { --chapter-image: url('./assets/chapters/liyue.png'); --chapter-tone: #47361e; }
.main[data-chapter="inazuma"] { --chapter-image: url('./assets/chapters/inazuma.png'); --chapter-tone: #302340; }
.main[data-chapter="sumeru"] { --chapter-image: url('./assets/chapters/sumeru.png'); --chapter-tone: #293d22; }
.main[data-chapter="fontaine"] { --chapter-image: url('./assets/chapters/fontaine.png'); --chapter-tone: #1b3046; }
.main[data-chapter="natlan"] { --chapter-image: url('./assets/chapters/natlan.png'); --chapter-tone: #492720; }
.main[data-chapter="nodkrai"] { --chapter-image: url('./assets/chapters/nodkrai.png'); --chapter-tone: #173344; }
.main[data-chapter="snezhnaya"] { --chapter-image: url('./assets/chapters/snezhnaya.png'); --chapter-tone: #2b344b; }
.main { background: radial-gradient(ellipse at 80% 0%, var(--chapter-tone, #193d34), transparent 62%), var(--bg); }
.journey-panel, .battle-panel, .encounter-screen { background-color: var(--chapter-tone, #193d34); }
.scene-image { background-image: var(--chapter-image, url('./assets/world-tree.png')); opacity: .82; filter: saturate(.9); }
.battle-backdrop { background: linear-gradient(90deg, #07130de0, #0d17127a, #07130de0), linear-gradient(0deg, #0a1611e8, transparent 70%), var(--chapter-image, url('./assets/world-tree.png')) center / cover; opacity: 1; filter: saturate(.85); }
.encounter-art { background: linear-gradient(0deg, #0d1815ee, #0e1818a0), var(--chapter-image, url('./assets/world-tree.png')) center / cover; opacity: 1; }
.reward-aura { background: radial-gradient(ellipse at 50% 30%, var(--chapter-tone, #193d34), transparent 65%); }

/* One scalable SVG icon set, aligned to its text baseline and shared by all contexts. */
.element-glyph { display: inline-flex; align-items: center; justify-content: center; width: 1em; height: 1em; min-width: 0; flex: 0 0 auto; line-height: 1; vertical-align: -.13em; }
.element-icon { display: block; width: 100%; height: 100%; overflow: visible; }
.card-top > span:last-child { display: inline-flex; align-items: center; gap: 4px; }
.card-top .element-glyph { font-size: calc(15px * var(--text-scale)); }
.chapter-track .element-glyph { color: var(--element); }
.battle-effects .element-glyph, .player-status .element-glyph { font-size: calc(14px * var(--text-scale)); }
.fx-fly-card .element-glyph { font-size: inherit; }
.icon-button svg, .nav-item svg, .resource svg, .button svg { display: block; flex: 0 0 auto; }

/* Larger, content-fitting cards give names and effects their own space. */
.game-card { width: 180px; min-width: 180px; height: auto; min-height: 285px; padding: 13px 14px 15px; }
.card-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.card-copy { padding: 10px 2px 4px; overflow-wrap: anywhere; }
.card-copy p { font-size: calc(9px * var(--text-scale)); line-height: 1.7; }
.card-copy q { max-height: none; line-height: 1.5; }
.card-illustration { flex: 0 0 109px; }
.hand-cards { min-height: 0; padding: 29px 8px 15px; gap: 13px; align-items: stretch; }
.hand-cards .game-card { width: 176px; min-width: 176px; height: 100%; min-height: 278px; padding: 12px 14px 16px; touch-action: pan-x; }
.hand-cards .card-illustration { flex-basis: 100px; height: 100px; }
.hand-cards .card-copy p { font-size: calc(9px * var(--text-scale)); }
.hand-card-wrap { display: flex; }
.card-key { top: -26px; left: 50%; transform: translateX(-50%); color: #dce5c4; font: 700 calc(13px * var(--text-scale))/1.4 var(--sans); text-shadow: 0 1px 5px #000; }
.reward-cards .game-card, .shop-item > .game-card, .collection-entry .game-card, .modal-card-grid .game-card, .card-detail-pair .game-card, .inspect-panel .game-card { height: auto; min-height: 285px; }
.reward-cards .game-card { width: 190px; min-width: 190px; }
.player-unit { color: inherit; text-align: center; border: 1px solid transparent; border-radius: 5px; }
.player-unit.targeted, .player-unit.drag-over, .enemy-unit.drag-over { background: #d1dba51b; border-color: #e0dfb4a8; box-shadow: 0 0 22px #d0d8a533; }
.player-target-indicator { display: block; min-height: 18px; margin-top: 6px; color: #d3dfb6; font-size: calc(9px * var(--text-scale)); }
.drag-source { opacity: .3 !important; }
.game-card.drag-ghost { position: fixed; z-index: 100; margin: 0; pointer-events: none; opacity: .94; box-shadow: 0 16px 38px #000b, 0 0 22px var(--element); transition: none; }
.hand-footer kbd { border-color: #2c453b77; color: #294135; font-weight: 700; }
.fx-float { padding: 2px 8px; color: #fff0d1; -webkit-text-stroke: 1px #321a12; paint-order: stroke fill; text-shadow: 0 2px 0 #29120c, 0 4px 12px #000, 0 0 18px #ffb95d; animation-duration: 1.25s; }
@media (max-width: 620px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-card { width: 100%; min-width: 0; min-height: 270px; }
  .hand-cards { gap: 12px; padding-top: 29px; }
  .hand-cards .game-card { width: 166px; min-width: 166px; min-height: 270px; }
  .reward-cards .game-card { width: 164px; min-width: 164px; min-height: 270px; }
  .collection-entry .game-card, .modal-card-grid .game-card, .card-detail-pair .game-card, .inspect-panel .game-card, .shop-item > .game-card { min-height: 270px; }
  .card-copy h3 { overflow-wrap: anywhere; }
}
.scene-shade { background: linear-gradient(90deg, #0a1712d9 0%, #0c151184 40%, #07120c99 100%), linear-gradient(0deg, color-mix(in srgb, var(--chapter-tone, #193d34), #07130d 55%) 0%, transparent 65%); }
@media (max-width: 620px) {
  .chapter-intro h2 { font-size: calc(39px * var(--text-scale)); letter-spacing: 6px; white-space: nowrap; }
  .scene-image { background-size: auto 55%; background-position: center top; background-color: var(--chapter-tone, #193d34); }
}
