:root {
  --ink: #342f2a;
  --paper: #eee9df;
  --gold: #b59458;
  --muted: #80796c;
  --frame-width: min(100vw, 56.25dvh);
  color-scheme: light;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #151c20; color: var(--ink); }
body { background: radial-gradient(ellipse at 50% 40%, #3b4b50, #111719 75%); }
button, input, select { font: inherit; }
button { cursor: pointer; color: inherit; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .42; }
button:focus-visible, [tabindex]:focus-visible { outline: 2px solid #e4c471; outline-offset: 3px; }
button img { pointer-events: none; }
[hidden] { display: none !important; }
#game-frame { position: relative; width: var(--frame-width); height: 100dvh; margin: auto; overflow: hidden; isolation: isolate; box-shadow: 0 0 90px #0008; container-type: inline-size; background: #d9dfe0; }
#screen { position: absolute; inset: 0; overflow: hidden; }
.opening { display: grid; place-content: center; height: 100%; text-align: center; font-size: 36px; letter-spacing: 5px; background: #eae7df; }
.opening span { margin-top: 20px; font-size: 13px; letter-spacing: 2px; color: #8a877a; }
.source-scene { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.paper-scene { background: #e9e5dc var(--paper-image) center / 100% 100% no-repeat; }
.source-scene image { image-rendering: auto; }
.scene-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(#13202b33, transparent 24%, transparent 65%, #10202b44); }
.scene-screen { position: relative; width: 100%; height: 100%; }
#resource-bar { position: absolute; z-index: 25; left: 0; right: 0; top: 0; height: 7.25cqw; min-height: 29px; background: #282827e8; color: #e3dcc9; box-shadow: 0 1px #b9a67677; display: flex; align-items: center; gap: 3cqw; padding: 0 2cqw; font-size: 2.5cqw; }
.resource-path { display: flex; align-items: center; gap: 1cqw; flex: 1; min-width: 0; white-space: nowrap; }
.resource-path img { width: 4.4cqw; height: 4.4cqw; object-fit: contain; }
.resource-counter { display: flex; gap: .7cqw; align-items: center; white-space: nowrap; }
.resource-counter img { height: 3.8cqw; width: 3.8cqw; object-fit: contain; }
.resource-counter b { font-weight: 400; font-family: Georgia, serif; font-variant-numeric: tabular-nums; }
.icon-x, .settings-button { border: 0; background: none; color: #d7d1c1; padding: 0; height: 5cqw; width: 5cqw; display: grid; place-content: center; flex: none; }
.icon-x svg { width: 3cqw; height: 3cqw; }
.icon-x[aria-disabled=true] { opacity: .5; cursor: default; }
.settings-button { font-size: 3.2cqw; }
#main-nav { position: absolute; z-index: 24; bottom: 0; left: 0; right: 0; height: 22cqw; padding: 5cqw 1.3cqw 2cqw; display: grid; grid-template-columns: repeat(6, 1fr); gap: .1cqw; background: linear-gradient(transparent, #202326d9 32%, #15191af7); }
.nav-disc { position: relative; border: 0; padding: 0; width: 15.5cqw; height: 15.5cqw; background: none; opacity: .84; color: #38352f; }
.nav-disc>img { display: block; width: 100%; height: 100%; filter: brightness(.9); }
.nav-disc span { position: absolute; font-family: "STXingkai", "Xingkai SC", "STKaiti", serif; font-size: 5.3cqw; line-height: 1; text-shadow: 0 1px #fbf8e9; font-weight: 700; }
.nav-disc .first { left: 3.4cqw; top: 3.4cqw; transform: rotate(-8deg); }
.nav-disc .last { right: 3cqw; bottom: 2.8cqw; transform: rotate(-7deg); }
.nav-disc.active { opacity: 1; transform: translateY(-1.2cqw); }
.nav-disc.active>img { filter: brightness(1.13) drop-shadow(0 0 5px #ead6a2a8); }
.nav-disc:active { transform: scale(.85); }
.native-title { position: absolute; top: 10cqw; left: 12%; right: 12%; text-align: center; pointer-events: none; color: #f5edce; text-shadow: 0 2px 3px #293541, 1px 0 #44392c; }
.native-title h1 { margin: 0; font-size: 6.8cqw; font-weight: 400; letter-spacing: 1cqw; }
.native-title p { margin: 1.2cqw 0; font-size: 2.8cqw; letter-spacing: .35cqw; }
.house-title { top: 29%; color: #514c51; text-shadow: 0 1px #fff9; }
.house-title h1 { font-size: 4.9cqw; letter-spacing: .6cqw; }
.house-title p { font-size: 2.6cqw; }
.hotspot { position: absolute; z-index: 5; transform: translate(-50%, -50%); width: 16.25cqw; min-height: 16.25cqw; border: 0; padding: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff9d7; text-shadow: 1px 1px 2px #504339, -1px -1px #817461; }
.hotspot:active { filter: brightness(1.25); }
.hotspot-disc { width: 9cqw; height: 9cqw; display: grid; place-items: center; background: var(--hotspot-image) center / contain; box-shadow: 0 1px 5px #0002; border-radius: 50%; }
.hotspot-disc img { width: 5.4cqw; height: 5.4cqw; object-fit: contain; }
.hotspot-label { height: 6.2cqw; width: 16cqw; object-fit: contain; margin-top: .3cqw; }
.hotspot-text { font-size: 4cqw; margin-top: 1cqw; letter-spacing: .4cqw; white-space: nowrap; }
.hotspot small { white-space: nowrap; padding: 1cqw 2cqw; font-size: 2.5cqw; background: #33434c99; border-radius: 20px; margin-top: .5cqw; }
.hotspot.meditation-entry { width: 26cqw; height: 23cqw; }
.hotspot.meditation-entry .hotspot-text { font-size: 4.5cqw; }
.small-meditator { position: absolute; width: 13cqw; height: auto; top: 33%; left: 41%; pointer-events: none; }
.scene-side { position: absolute; top: 10.5cqw; left: 2.8cqw; display: flex; flex-direction: column; gap: 2cqw; z-index: 8; }
.scene-side.right { left: auto; right: 2.8cqw; }
.scene-side button { width: 11cqw; height: 11cqw; border: 0; background: var(--hotspot-image) center/contain no-repeat; color: #f4edce; font-size: 3.4cqw; text-shadow: 0 1px #1d1c1d; padding: 0; }
.scene-side small { font-size: 2.1cqw; display: block; opacity: .8; }
.task-ribbon { position: absolute; bottom: 23cqw; left: 4cqw; right: 4cqw; z-index: 9; padding: 2cqw 3cqw; color: #f5ecd1; text-shadow: 0 1px #1a2425; background: linear-gradient(90deg,#172e35dc,#1c343f9c,transparent); border-left: 2px solid #e0ca99; font-size: 3cqw; display: flex; align-items: center; justify-content: space-between; gap: 2cqw; }
.task-ribbon b { font-weight: 400; color: #e4c775; display: block; margin-bottom: .5cqw; }
.task-ribbon p { margin: 0; line-height: 1.6; font-size: 2.7cqw; }
.task-ribbon button { flex: none; }
.native-button { border: 0; padding: 1.5cqw 3cqw; min-height: 8cqw; min-width: 15cqw; background: var(--button-image) center / 100% 100% no-repeat; color: #51473a; font-size: 3.2cqw; }
.native-button.gold { background-image: var(--gold-image); color: #765628; }
.native-button.blue { background-image: var(--blue-image); color: #314e5a; }
.native-button.brush { background: linear-gradient(90deg,transparent,#12191bed 15%,#12191bed 85%,transparent); color: #f8efdc; min-height: 7cqw; padding: 1.5cqw 4cqw; }
.native-button:active { filter: brightness(.88); }
.return-button { position: absolute; left: 3.5cqw; top: 10cqw; z-index: 14; min-width: 0; width: 10cqw; height: 10cqw; padding: 0; border: 0; background: var(--button-image) center / 100% 100%; font-size: 2.9cqw; color: #3e4039; }
.meditation-scene { background: #04131c; overflow: hidden; }
.meditation-scene img { position: absolute; pointer-events: none; }
.meditation-stars { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.meditation-cave { width: 126%; left: -13%; top: 0; height: 76%; object-fit: fill; }
.meditation-land { width: 120%; left: -10%; top: 46%; }
.meditation-ridge { width: 116%; left: -8%; top: 56%; }
.meditation-platform { width: 74%; left: 13%; top: 59%; }
.meditation-front { width: 135%; left: -17.5%; bottom: 0; height: 48%; object-fit: fill; }
.meditation-actor { position: absolute; left: 11%; width: 78%; top: 32%; height: 34%; z-index: 4; }
.actor-canvas canvas { display: block; width: 100%; height: 100%; }
.source-effect { position: absolute; pointer-events: none; inset: 19% -8% 5%; z-index: 7; }
.source-effect canvas { width: 100%; height: 100%; display: block; }
.realm-caption { position: absolute; top: 62%; left: 15%; right: 15%; z-index: 8; text-align: center; color: #f1d5a0; text-shadow: 1px 2px #281f1b; }
.realm-caption h2 { font-size: 6cqw; font-weight: 400; letter-spacing: .6cqw; margin: 0 0 2cqw; }
.realm-caption p { font-size: 2.8cqw; margin: 1cqw; color: #d9dacd; }
.cultivation-meter { height: 2.1cqw; border: 1px solid #a88d65; background: #1a1819cc; overflow: hidden; }
.cultivation-meter i { display: block; height: 100%; background: linear-gradient(90deg,#79453b,#c67954,#efb57b); width: 0; transition: width .3s; }
.cultivation-commands { position: absolute; bottom: 23cqw; left: 5cqw; right: 5cqw; z-index: 9; display: flex; gap: 4cqw; justify-content: space-between; align-items: center; }
.cultivation-commands .native-button { font-size: 3.5cqw; min-width: 22cqw; }
.cultivation-commands .break-button { min-height: 13cqw; font-size: 4.3cqw; }
.cultivation-detail { position: absolute; bottom: 39cqw; left: 6%; right: 6%; color: #d3c9b7; text-align: center; font-size: 2.8cqw; line-height: 1.6; z-index: 10; }
.screen-scroll { position: absolute; top: 16cqw; bottom: 22cqw; left: 0; right: 0; overflow: auto; padding: 3cqw 4cqw 6cqw; scrollbar-width: thin; scrollbar-color: #b7a381 transparent; }
.page-heading { position: absolute; top: 8.5cqw; left: 16%; right: 16%; text-align: center; margin: 0; font-size: 5cqw; font-weight: 400; letter-spacing: .8cqw; color: #524835; }
.source-panel { padding: 4cqw; margin-bottom: 3cqw; background: #f3eee3d9; border: 1px solid #b9ab8f; box-shadow: inset 0 0 0 3px #eee8d880,inset 0 0 0 4px #bdaf9133; }
.source-panel h2 { margin: 0 0 2.5cqw; font-size: 4.5cqw; font-weight: 400; text-align: center; letter-spacing: .5cqw; }
.source-panel p { font-size: 3cqw; line-height: 1.7; margin: 1cqw 0; }
.source-panel .muted, .muted { color: #898070; }
.native-tabs { display: flex; gap: 1cqw; padding: 1cqw 3cqw 3cqw; }
.native-tabs button { flex: 1; min-width: 0; padding: 1.5cqw 1cqw; min-height: 7.25cqw; font-size: 3cqw; background: var(--button-image) center/100% 100%; border: 0; color: #777064; }
.native-tabs button.selected { background-image: var(--gold-image); color: #7d5927; }
.inventory-tabs { position: absolute; top: 17cqw; left: 0; right: 0; }
.inventory-scroll { top: 28cqw; }
.inventory-row { position: relative; min-height: 15.6cqw; display: flex; align-items: center; gap: 2.5cqw; padding: 2cqw 1.5cqw; border-bottom: 1px solid #b6ac9855; }
.item-icon { width: 11.5cqw; height: 11.5cqw; flex: none; padding: 1cqw; background: #343530 var(--item-image) center/100% 100%; object-fit: contain; border: 1px solid #9f967c; }
.item-main { min-width: 0; flex: 1; }
.item-main h3 { margin: 0 0 1cqw; font-size: 3.8cqw; font-weight: 400; }
.item-main p { margin: 0; color: #817867; font-size: 2.7cqw; line-height: 1.55; }
.item-count { font-family: Georgia,serif; font-size: 3.1cqw; color: #584e3c; white-space: nowrap; }
.item-actions { display: flex; flex-direction: column; gap: 1cqw; }
.item-actions .native-button { font-size: 2.8cqw; min-width: 14cqw; min-height: 6.5cqw; padding: 1cqw 2cqw; }
.empty-state { text-align: center; padding: 15cqw 6cqw; color: #8b8271; font-size: 3.5cqw; }
.empty-state img { width: 20cqw; height: 20cqw; display: block; margin: 0 auto 4cqw; opacity: .45; }
.empty-state p { font-size: 3cqw; line-height: 1.8; }
.character-actor { position: absolute; left: 12%; right: 12%; top: 18%; height: 51%; }
.character-name { position: absolute; top: 10cqw; left: 17%; right: 17%; text-align: center; font-size: 4.7cqw; color: #514837; letter-spacing: .5cqw; }
.equipment-slots { position: absolute; top: 27%; left: 4%; right: 4%; display: flex; justify-content: space-between; pointer-events: none; }
.equipment-column { display: flex; flex-direction: column; gap: 3cqw; }
.equipment-slot { width: 13.5cqw; min-height: 16cqw; border: 0; background: none; pointer-events: auto; padding: 0; font-size: 2.6cqw; color: #6c5d45; }
.equipment-slot img { width: 12cqw; height: 12cqw; object-fit: contain; padding: 1cqw; background: var(--item-image) center/100% 100%; }
.equipment-slot span { display: block; margin-top: .6cqw; }
.character-stats { position: absolute; bottom: 39cqw; left: 7%; right: 7%; padding: 3cqw 0; border-top: 1px solid #a3947755; border-bottom: 1px solid #a3947755; display: grid; grid-template-columns: 1fr 1fr; gap: 1.8cqw 7cqw; font-size: 3cqw; }
.character-stats div { display: flex; justify-content: space-between; }
.character-actions { position: absolute; bottom: 25cqw; left: 4%; right: 4%; display: flex; gap: 1cqw; }
.character-actions .native-button { flex: 1; min-width: 0; font-size: 2.9cqw; padding: 2cqw 1cqw; }
.world-map { position: absolute; inset: 0; overflow: auto; touch-action: pan-x pan-y; scrollbar-width: none; }
.world-map-inner { position: relative; min-width: 100%; min-height: 100%; }
.scene-overlay { position: absolute; inset: 0; pointer-events: none; }
.scene-overlay button { pointer-events: auto; }
.map-list { position: absolute; left: 6%; right: 6%; top: 21%; bottom: 25cqw; overflow: auto; padding: 2cqw; }
.map-entry { position: relative; display: block; width: 100%; border: 1px solid #a1926a; background: #f0ebdfe8; color: #514936; padding: 3cqw; margin-bottom: 3cqw; text-align: left; box-shadow: inset 0 0 0 3px #f3eee580; }
.map-entry h2 { font-weight: 400; font-size: 4.5cqw; margin: 0 0 1.5cqw; letter-spacing: .3cqw; }
.map-entry p { font-size: 3cqw; line-height: 1.7; margin: 0; }
.map-entry .panel-actions { justify-content: flex-start; }
.map-entry .map-reward { color: #826e3d; }
.battle-ground { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(.75); }
.battle-location { top: 10cqw; }
.battle-headline { position: absolute; top: 21cqw; left: 8%; right: 8%; z-index: 9; text-align: center; color: #fff2d8; text-shadow: 0 1px 3px #000; font-size: 2.8cqw; }
.battle-unit { position: absolute; width: 24cqw; height: 28cqw; z-index: 6; transition: left .65s ease,top .65s ease; }
.battle-unit.player { width: 27cqw; height: 34cqw; left: 35%; top: 39%; }
.battle-unit .unit-name { position: absolute; bottom: 100%; left: -15%; right: -15%; text-align: center; font-size: 2.5cqw; color: #faf1d2; text-shadow: 0 1px 2px #000; white-space: nowrap; }
.unit-hp { position: absolute; bottom: 99%; width: 75%; height: 1cqw; left: 12.5%; background: #27242299; border: 1px solid #c4b07a88; }
.unit-hp i { display: block; height: 100%; background: #ae5d4e; transition: width .2s; }
.battle-unit.player .unit-hp i { background: #6eae73; }
.battle-unit.dead { opacity: .25; }
.battle-skill-bar { position: absolute; bottom: 25cqw; left: 4%; right: 4%; display: flex; justify-content: center; gap: 2cqw; z-index: 10; }
.battle-skill { position: relative; width: 16cqw; min-height: 19cqw; border: 0; background: none; padding: 0; color: #f4ecd1; font-size: 2.8cqw; text-shadow: 0 1px 2px #000; }
.battle-skill img { display: block; width: 14cqw; height: 14cqw; object-fit: contain; margin: auto; padding: 1.3cqw; background: #293533b9; border: 1px solid #bca877; border-radius: 50%; box-shadow: inset 0 0 0 3px #3e4647; }
.battle-skill small { display: block; font-size: 2.4cqw; margin-top: .5cqw; }
.battle-skill-bar .native-button { min-width: 10cqw; width: 12cqw; align-self: center; padding: 2cqw 1cqw; }
.battle-skill-bar:has(.battle-skill:nth-of-type(4)) .battle-skill { width: 13.5cqw; }
.battle-skill-bar:has(.battle-skill:nth-of-type(4)) .battle-skill img { width: 12.5cqw; height: 12.5cqw; }
.battle-skill .cooldown { position: absolute; inset: 1cqw 1cqw 6cqw; display: grid; place-items: center; background: #15222baa; border-radius: 50%; font: 4.5cqw Georgia,serif; }
.battle-footer { position: absolute; bottom: 46cqw; left: 6%; right: 6%; font-size: 2.8cqw; color: #f3ecd8; text-shadow: 0 1px 2px #000; z-index: 9; }
.battle-footer p { margin: 0; padding: 1cqw 2cqw; background: #263a41a8; }
.battle-float { position: absolute; z-index: 12; font: bold 5cqw Georgia,serif; color: #ffe6aa; text-shadow: 0 2px 2px #673124; pointer-events: none; animation: damage-rise 1s ease-out forwards; }
@keyframes damage-rise { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-10cqw); } }
.panel-actions { display: flex; gap: 2cqw; justify-content: center; flex-wrap: wrap; margin-top: 3cqw; }
.source-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 3cqw; }
.attribute-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2cqw; font-size: 3cqw; }
.path-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 3cqw; }
.path-option { position: relative; padding: 3cqw 2cqw; text-align: center; background: #e7e1d4; border: 1px solid #b3a583; }
.path-option.selected { border-color: #a16a35; background: #e5d7bd; }
.path-option h3 { font-weight: 400; font-size: 4.5cqw; margin: 1cqw 0; }
.path-option p { font-size: 2.7cqw; line-height: 1.7; }
.path-option img { width: 12cqw; height: 12cqw; object-fit: contain; }
.section-subtitle { font-size: 3.5cqw; font-weight: 400; padding: 2.5cqw; border-bottom: 1px solid #bcae91; text-align: center; margin: 2cqw 0; color: #756343; }
#modal-layer { position: absolute; inset: 0; z-index: 60; pointer-events: none; }
.modal-mask { position: absolute; inset: 0; display: grid; place-items: center; background: #08121999; backdrop-filter: blur(2px); padding: 10cqw 4cqw 18cqw; pointer-events: auto; }
.native-modal { position: relative; width: 100%; max-height: 100%; background: #f0ede5; border: 1px solid #d6c8a6; box-shadow: 0 8px 40px #0006, inset 0 0 0 4px #e5ddcb, inset 0 0 0 5px #b9ad9466; display: flex; flex-direction: column; }
.native-modal h2.modal-title { flex: none; margin: 0; padding: 5cqw 9cqw 3.5cqw; text-align: center; letter-spacing: .6cqw; font-size: 5cqw; font-weight: 400; color: #49402e; border-bottom: 1px solid #b6a88a55; }
.modal-close { position: absolute; z-index: 3; top: 1.5cqw; right: 1.5cqw; width: 9cqw; height: 9cqw; background: none; border: 0; color: #766952; font-size: 3cqw; }
.modal-content { padding: 3cqw; overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.modal-content .source-panel { border: 0; box-shadow: none; background: none; }
.modal-content .inventory-row { padding: 2cqw 1cqw; }
.modal-note { font-size: 3cqw; line-height: 1.8; color: #776c5c; text-align: center; margin: 1cqw 2cqw 3cqw; }
#toast-layer { position: absolute; top: 16%; left: 8%; right: 8%; z-index: 90; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 1.5cqw; }
.toast { background: #20292de8; border: 1px solid #baa98288; color: #f1e8ce; box-shadow: 0 4px 18px #0003; padding: 2.5cqw 4cqw; font-size: 3cqw; line-height: 1.6; text-align: center; max-width: 100%; }
#ai-status { position: absolute; z-index: 35; top: 8.5cqw; left: 15%; right: 15%; padding: 1.8cqw 3cqw; background: #183440ed; border: 1px solid #adbead77; color: #f0eed1; font-size: 2.6cqw; text-align: center; box-shadow: 0 3px 10px #0002; }
#ai-status button { border: 0; color: #eacb86; background: none; margin-left: 2cqw; padding: .5cqw; font-size: inherit; }
.settings-list { display: flex; flex-direction: column; gap: 3cqw; padding: 3cqw; }
.settings-list button { width: 100%; }
.settings-list label { display: flex; align-items: center; justify-content: space-between; font-size: 3.3cqw; }
.settings-list input { font-size: 3.3cqw; max-width: 45%; padding: 2cqw; background: #faf7ed; border: 1px solid #b5a78d; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media(max-width: 600px) {
  :root { --frame-width: 100vw; }
  #game-frame { height: 100dvh; }
}
@media(prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.battle-monster { width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 4px 3px #18202277); }
.monster-mark { display:grid;place-items:center;width:100%;height:100%;color:#e7e0cd;font-size:3.5cqw;background:#46524966;border-radius:50%; }
.tower-victory { position:absolute;z-index:16;left:10%;right:10%;top:40%;padding:5cqw;background:#eee6d9ee;border:1px solid #bca578;text-align:center;box-shadow:0 6px 30px #0005; }
.tower-victory h2 {font-size:5cqw;font-weight:400;margin:0 0 2cqw}.tower-victory p{font-size:3cqw}
.gang-scene {background:#acc5c0}
#ai-status {top:auto;bottom:23cqw;left:5%;right:5%;padding:2.5cqw 3cqw;}

/* The character frame follows the serialized CharNewWnd anchors. */
.source-character-screen { background: #e8e5dc var(--paper-image) center / 100% 100%; }
.source-character-screen .character-actor { left: 13%; width: 63%; right: auto; top: 17%; height: 49%; }
.source-character-screen .character-name { top: 11cqw; left: 18%; right: 18%; }
.character-name small { display: block; font-size: 2.8cqw; margin-top: 1.2cqw; letter-spacing: .2cqw; color: #867654; }
.character-power { position: absolute; top: 20cqw; left: 25%; right: 25%; text-align: center; color: #856b42; font-size: 5cqw; font-family: Georgia,serif; }
.character-power span { font: 2.5cqw "Kaiti SC",serif; margin-right: 2cqw; }
.source-equipment-slot { position: absolute; border: 0; padding: 0; background: none; z-index: 8; }
.source-equipment-slot::before { content: ''; position: absolute; inset: -1.4cqw; }
.source-equipment-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--item-image) center / 100% 100%; padding: .6cqw; }
.source-equipment-slot span { position: absolute; top: 101%; left: -13%; right: -13%; font-size: 1.8cqw; color: #7e6e50; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
.source-character-entry { position: absolute; border: 0; padding: 0; background: none; z-index: 9; }
.source-character-entry img { width: 100%; height: 100%; object-fit: contain; }
.source-character-entry span { font-size: 3cqw; }
.source-character-entry::before { content:'';position:absolute;inset:-1.2cqw; }
.character-outfit-actions { position: absolute; top: 61%; left: 71%; right: 2%; display: flex; flex-wrap: wrap; gap: .8cqw; justify-content: flex-end; }
.character-outfit-actions .native-button { min-width: 7cqw; width: 8cqw; padding: .8cqw .2cqw; font-size: 2.5cqw; min-height: 6cqw; }
.character-vitals { position: absolute; top: 70%; left: 15%; right: 15%; display: grid; gap: 3cqw; }
.character-vitals>div { position: relative; height: 4cqw; font-size: 2.6cqw; }
.character-vitals span { position: absolute; left: 0; top: .3cqw; z-index: 2; padding-left: 2cqw; color: #faf3d9; text-shadow: 0 1px #2c3334; }
.character-vitals i { position: absolute; inset: 0; background: #b4b0a591; border: 1px solid #a99b7f; border-radius: 50% / 15%; overflow: hidden; }
.character-vitals i b { display: block; height: 100%; background: linear-gradient(90deg,#785147,#a9715a); }
.character-vitals>div+div i b { background: linear-gradient(90deg,#4b6977,#8fa5a7); }
.character-vitals strong { position: absolute; right: 2cqw; top: .3cqw; font-weight: 400; color: #f7f2e6; text-shadow: 0 1px #222; }
.source-character-screen .character-stats { top: 80%; bottom: auto; gap: 1.6cqw 4cqw; padding: 1.5cqw 0; font-size: 2.8cqw; }
.source-character-screen .character-actions { bottom: 22cqw; left: 22%; right: 22%; }
.source-character-screen .character-actions .native-button { min-height: 6cqw; padding: .7cqw; }

/* Full native-style system windows replace the shared small list dialog. */
.full-window-mask { display: block; padding: 7.3cqw 0 0; background: none; backdrop-filter: none; }
.native-modal.full-window { width: 100%; height: 100%; max-height: none; border: 0; background: #e9e4d8 var(--paper-image) center / 100% 100%; box-shadow: none; }
.window-header { height: 16cqw; display: flex; align-items: center; justify-content: center; flex: none; position: relative; margin: 0 2cqw; border-bottom: 1px solid #aa987866; }
.window-header h1 { font-family: "Xingkai SC","STKaiti",serif; font-weight: 400; font-size: 7cqw; letter-spacing: 1.2cqw; margin: 0; color: #574729; text-shadow: 0 1px #fff9; }
.window-header>span { position: absolute; right: 4cqw; top: 6.5cqw; color: #8b7855; font-size: 2.5cqw; }
.window-back { position: absolute; left: 2cqw; top: 4.5cqw; min-width: 13cqw; min-height: 8cqw; border: 0; background: var(--button-image) center / 100% 100%; font-size: 3.2cqw; color: #625239; }
.full-window-content { flex: 1; position: relative; overflow: hidden; min-height: 0; padding: 0; display: flex; flex-direction: column; }
.window-tabs { display: flex; flex: none; gap: 1.2cqw; padding: 3cqw 5cqw 1.5cqw; min-height: 11cqw; }
.window-tabs button { flex: 1; border: 0; padding: 1cqw; background: var(--button-image) center / 100% 100%; color: #8f8067; font-size: 3.4cqw; }
.window-tabs button.selected { color: #6e4a1b; filter: sepia(.3) drop-shadow(0 1px 1px #82704e66); }
.window-summary { text-align: center; font-size: 3cqw; line-height: 1.6; padding: 2cqw 5cqw; color: #9a8254; flex: none; }
.catalog-scroll { min-height: 0; flex: 1; overflow-y: auto; padding: 3cqw 5cqw 5cqw; scrollbar-width: thin; scrollbar-color: #b6a887 transparent; }
.item-catalog { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4cqw 3cqw; align-content: start; }
.catalog-cell { position: relative; min-width: 0; border: 0; padding: 1cqw .5cqw; background: none; color: #594f3b; display: flex; flex-direction: column; align-items: center; min-height: 25cqw; }
.catalog-cell .catalog-icon { width: 16cqw; height: 16cqw; object-fit: contain; background: #d4cbbd var(--item-image) center / 100% 100%; padding: 1.3cqw; box-shadow: 0 1px 2px #54462b22; }
.catalog-cell.selected .catalog-icon { outline: 1px solid #b49151; filter: drop-shadow(0 0 3px #ad813666); }
.catalog-cell.undiscovered .catalog-icon { opacity: .5; filter: saturate(.35); }
.catalog-cell.selected.undiscovered .catalog-icon { opacity: .8; }
.catalog-label { font-size: 3.2cqw; line-height: 1.4; margin-top: 1.2cqw; text-align: center; min-height: 4.4cqw; }
.catalog-cell small { font-size: 2.4cqw; color: #9a855e; }
.catalog-mark { position: absolute; right: -.4cqw; top: 1.4cqw; font-size: 2.1cqw; padding: .4cqw 1cqw; background: #504332da; color: #f3e2b6; }
.icon-glyph { display: inline-grid; place-items: center; font-size: 7cqw; color: #9d8657; background: #d2c7af; }
.detail-panel { flex: none; min-height: 34cqw; max-height: 44%; overflow-y: auto; padding: 4cqw 6cqw 5cqw; border-top: 1px solid #b8a583; background: linear-gradient(#f5f0e7e8,#e9dfccb0); box-shadow: 0 -2px 6px #6e563b13; }
.detail-heading { display: flex; align-items: center; gap: 3cqw; }
.detail-icon { height: 12cqw; width: 12cqw; padding: .8cqw; object-fit: contain; flex: none; background: var(--item-image) center / 100% 100%; }
.detail-heading h2 { font-size: 4.6cqw; font-weight: 400; margin: 0 0 1cqw; color: #59482a; }
.detail-heading p { font-size: 2.8cqw; color: #a48a5b; margin: 0; }
.detail-description { font-size: 3.2cqw; line-height: 1.7; color: #80745f; margin: 3cqw 0 2cqw; }
.detail-bonus { font-size: 3cqw; color: #69806d; line-height: 1.7; }
.detail-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 2cqw; margin-top: 3cqw; font-size: 3cqw; color: #9c8c70; }
.detail-actions .native-button { min-width: 24cqw; min-height: 8cqw; }
.material-costs { display: flex; flex-wrap: wrap; gap: 1cqw 4cqw; font-size: 2.8cqw; line-height: 1.7; }
.material-cost { color: #79876d; }
.material-cost.insufficient { color: #a66b51; }
.material-cost b { font-weight: 400; }
.window-empty { text-align: center; padding: 12cqw 7cqw; color: #9c8d71; font-size: 3.4cqw; line-height: 1.8; }
.equipped-sequence { padding: 3cqw 5cqw 2cqw; flex: none; background: #a5937020; }
.equipped-sequence>p { margin: 0 0 2cqw; text-align: center; font-size: 3.2cqw; color: #8b754e; }
.equipped-sequence>div { display: flex; gap: 2cqw; overflow-x: auto; min-height: 12cqw; justify-content: center; }
.equipped-sequence button { flex: none; width: 10.5cqw; height: 10.5cqw; border: 0; padding: 0; background: none; position: relative; }
.equipped-sequence .catalog-icon { width: 100%; height: 100%; object-fit: contain; padding: .8cqw; border: 1px solid #b6a579; border-radius: 50%; background: #dbd2bd; }
.equipped-sequence b { position: absolute; right: -.6cqw; bottom: -.2cqw; font: 2.5cqw Georgia,serif; color: #a27d3f; background: #f0e6d4; width: 3.4cqw; height: 3.4cqw; border-radius: 50%; }
.artifact-board { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); padding: 4cqw; gap: 2cqw; flex: none; border-bottom: 1px solid #af9b7133; }
.artifact-board button { border: 0; padding: 0; background: none; position: relative; }
.artifact-board .catalog-icon { width: 12cqw; height: 12cqw; object-fit: contain; background: var(--item-image) center / 100% 100%; padding: .7cqw; }
.artifact-board button.selected .catalog-icon { outline: 2px solid #bba16a; }
.artifact-board span { position: absolute; top: -.8cqw; left: -.4cqw; font: 2.5cqw Georgia,serif; color: #ad7d32; }
.artifact-board small { display: block; font-size: 2.2cqw; color: #958465; }
.appearance-display { flex: 1; min-height: 0; position: relative; background: radial-gradient(ellipse,#f5f2e8 0%,transparent 70%); }
.appearance-display .actor-canvas { position: absolute; inset: 0 15%; }
.appearance-options { flex: none; display: grid; grid-template-columns: repeat(3,1fr); gap: 2cqw; padding: 3cqw 7cqw; }
.appearance-options button { border: 1px solid #b5a27d66; background: #f0e9da77; padding: 2cqw; color: #8a7651; font-size: 3cqw; }
.appearance-options button.selected { border-color: #a68047; background: #e6d8b9; color: #67502d; }
.appearance-options small { display: block; font-size: 2.4cqw; opacity: .6; margin-top: 1cqw; }
.appearance-confirm { flex: none; text-align: center; padding: 2cqw 7cqw 6cqw; font-size: 3cqw; color: #a89164; }
.pet-overview { flex: 1; min-height: 0; position: relative; text-align: center; padding: 6cqw 4cqw 0; }
.pet-portrait { height: 65%; width: 65%; object-fit: contain; }
.pet-overview h2 { font-size: 5cqw; font-weight: 400; margin: 1.5cqw; }
.pet-overview p { font-size: 3cqw; color: #97815a; }
.pet-selector { flex: none; display: flex; justify-content: center; gap: 3cqw; padding: 3cqw; overflow-x: auto; }
.pet-selector button { flex: none; border: 1px solid transparent; background: none; padding: 1cqw; color: #756342; }
.pet-selector .selected { border-color: #a68c5d; }
.pet-selector .catalog-icon { width: 13cqw; height: 13cqw; object-fit: contain; background: var(--item-image) center / 100% 100%; }
.pet-selector span { display: block; font-size: 2.7cqw; }
.commission-scroll { min-height: 0; flex: 1; overflow-y: auto; padding: 2cqw 4cqw 5cqw; scrollbar-width: thin; }
.commission { display: grid; grid-template-columns: 10cqw 1fr auto; align-items: center; gap: 3cqw; border-bottom: 1px solid #b6a88855; padding: 5cqw 2cqw; }
.commission.claimed { opacity: .55; }
.commission-seal { font-family: "Xingkai SC",serif; font-size: 5cqw; width: 10cqw; height: 10cqw; display: grid; place-items: center; background: var(--hotspot-image) center / contain no-repeat; color: #ecddbc; text-shadow: 0 1px #33261b; }
.commission h3 { font-size: 4cqw; font-weight: 400; margin: 0 0 1.5cqw; }
.commission p { font-size: 3cqw; line-height: 1.7; color: #897c65; margin: 0 0 1cqw; }
.commission small { font-size: 2.8cqw; color: #8d784b; }
.commission-rewards { font-size: 2.8cqw; color: #a98c53; margin-top: 1cqw; }
.commission-actions { display: flex; flex-direction: column; gap: 1cqw; font-size: 3cqw; color: #9d8b68; }
.commission-actions .native-button { min-width: 17cqw; padding: 1cqw 2cqw; }
.window-foot { flex: none; text-align: center; padding: 3cqw 5cqw 5cqw; border-top: 1px solid #b4a38055; }
.furnace-altar { flex: 1; min-height: 35cqw; position: relative; text-align: center; padding: 5cqw 4cqw 2cqw; background: radial-gradient(ellipse at 50% 80%,#c4a26727,transparent 70%); }
.furnace-art { height: 55%; min-height: 20cqw; }
.furnace-art img { width: 100%; height: 100%; object-fit: contain; }
.furnace-altar h2 { font-size: 4.5cqw; font-weight: 400; color: #796144; margin: 1cqw; }
.furnace-altar p { font-size: 3cqw; color: #ab8e5c; margin: 1.5cqw 0; }
.recipe-selector { display: flex; flex: none; gap: 3cqw; padding: 3cqw 5cqw; border-top: 1px solid #b39d7866; overflow-x: auto; }
.recipe-selector button { flex: none; display: flex; flex-direction: column; align-items: center; width: 16cqw; padding: 0; border: 0; background: none; color: #837252; font-size: 2.7cqw; }
.recipe-selector .catalog-icon { height: 13cqw; width: 13cqw; object-fit: contain; padding: .8cqw; background: var(--item-image) center / 100% 100%; }
.recipe-selector button.selected .catalog-icon { outline: 1px solid #a17b3f; }
.recipe-selector span { margin-top: 1cqw; }
.shop-scroll { flex: 1; min-height: 0; display: grid; align-content: start; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4cqw; padding: 3cqw 5cqw 8cqw; overflow-y: auto; }
.shop-item { text-align: center; padding: 3cqw 2cqw; border: 1px solid #bcae904f; background: #f7f1e56b; }
.shop-item>.catalog-icon { width: 18cqw; height: 18cqw; object-fit: contain; padding: 1.2cqw; background: var(--item-image) center / 100% 100%; }
.shop-item h3 { font-size: 4cqw; font-weight: 400; margin: 2cqw 0; }
.shop-item p { font-size: 2.8cqw; line-height: 1.7; color: #96846a; margin: 0 0 2cqw; }
.shop-item>b { font-size: 3.2cqw; font-weight: 400; color: #a18650; }
.shop-item>div { margin-top: 3cqw; font-size: 2.7cqw; }
.map-scroll-native { flex: 1; overflow-y: auto; padding: 3cqw 5cqw 8cqw; }
.native-map-row { display: grid; grid-template-columns: 8cqw 1fr; gap: 1cqw 3cqw; position: relative; padding: 5cqw 2cqw; border-bottom: 1px solid #b6a38155; }
.native-map-row>span { color: #ae986f; font: 5cqw Georgia,serif; }
.native-map-row h2 { font-weight: 400; font-size: 4.5cqw; margin: 0 0 2cqw; }
.native-map-row p { font-size: 3cqw; color: #948469; line-height: 1.8; margin: 0 0 2cqw; }
.native-map-row small { font-size: 2.8cqw; color: #a8905f; }
.native-map-row .native-button { grid-column: 2; justify-self: end; margin-top: 2cqw; }
.native-map-row.active { background: #d9caa739; }

.full-window>.source-window-background { z-index: 0; }
.full-window>.window-header,.full-window>.full-window-content { z-index: 1; }
.source-character-screen .character-stats {top:78%;}
.alchemy-window .window-header h1,.forge-window .window-header h1,.alchemy-window .window-header>span,.forge-window .window-header>span {color:#e7d3aa;text-shadow:0 1px 2px #1c171d;}
.alchemy-window .furnace-altar h2,.forge-window .furnace-altar h2 {color:#ecd5a6;text-shadow:0 1px 2px #1c171d;}
.alchemy-window .furnace-altar p,.forge-window .furnace-altar p {color:#b8aa8b;}
.alchemy-window .recipe-selector,.forge-window .recipe-selector {background:#eee8dbdd;}
.window-search {display:flex;align-items:center;gap:2cqw;margin:1cqw 5cqw 2cqw;flex:none;font-size:3cqw;color:#8b7854}
.window-search input {width:100%;min-width:0;border:1px solid #b7a98e;border-radius:0;background:#f7f3e9b0;color:#65543b;padding:1.7cqw 2cqw;outline-offset:1px}
.catalog-paging {display:flex;align-items:center;justify-content:space-between;padding:1.6cqw 5cqw;flex:none;background:#eee8dbeb;font-size:2.8cqw;color:#87724e}
.catalog-paging button {border:0;background:var(--button-image) center/100% 100%;min-height:7cqw;min-width:16cqw;font-size:2.8cqw}
.alchemy-window .recipe-selector,.forge-window .recipe-selector {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow-y:auto;gap:2cqw;min-height:16cqw;flex:1;padding:2cqw 5cqw;align-content:start}
.recipe-selector button {width:auto;font-size:2.7cqw;min-height:21cqw}
.recipe-selector .window-empty {grid-column:1/-1;margin:0;padding:4cqw 2cqw}
.furnace-altar {min-height:24cqw;flex:none;height:25cqw;display:flex;align-items:center;justify-content:center;gap:3cqw;padding:1cqw 5cqw}
.furnace-art {height:22cqw;min-height:0;width:21cqw;flex:none}
.furnace-altar h2 {font-size:4cqw}.furnace-altar p{font-size:2.8cqw}
.alchemy-window .window-tabs,.forge-window .window-tabs,.alchemy-window .window-search,.forge-window .window-search {background:#eee8dbea;margin-top:0;margin-bottom:0}
.alchemy-window .window-search,.forge-window .window-search {margin-left:0;margin-right:0;padding:1.5cqw 5cqw}
.import-save {position:relative;display:grid;place-items:center;cursor:pointer}
.import-save input {position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}
.battle-player-art {position:absolute;inset:9cqw 0 0;filter:drop-shadow(0 5px 5px #0006)}
.battle-unit .source-combat-portrait.battle-monster {height:calc(100% - 8cqw)!important;margin-top:1cqw;filter:drop-shadow(0 3px 3px #0008)}
.ai-progress {font-size:3.4cqw;color:#927749}
.detail-requirements {color:#a46d4f;font-size:2.8cqw;line-height:1.7}
.skill-progression{padding:8px 0;border-top:1px solid #8c794d33;border-bottom:1px solid #8c794d33;line-height:1.7;font-size:clamp(12px,2.9cqw,15px)}
.skill-progression p{margin:5px 0}.skill-progression .condition-ready{color:#60754e}
.window-search>span {white-space:nowrap;flex:none}
.source-character-screen .character-stats {background:#ede8d7c9;padding:2cqw 3cqw;color:#5a4a32;left:7%;right:7%;border:0}
.character-power {top:22cqw}
.bag-native .inventory-tabs {gap:1cqw;padding:0 4cqw}
.bag-grid-scroll {position:absolute;top:33cqw;bottom:77cqw;left:0;right:0;overflow-y:auto;padding:3cqw 5cqw 6cqw;scrollbar-width:thin}
.bag-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4cqw 3cqw;align-content:start}
.bag-cell {position:relative;border:0;background:none;min-width:0;padding:0;color:#6b593b;font-size:2.8cqw}
.bag-cell>img {width:16cqw;height:16cqw;object-fit:contain;padding:1cqw;background:var(--item-image) center/100% 100%}
.bag-cell>span {display:block;line-height:1.5;margin-top:1cqw}
.bag-cell>b {position:absolute;top:12cqw;right:1cqw;font:2.5cqw Georgia,serif;color:#fff7d7;text-shadow:0 1px 2px #22190f,1px 0 #22190f}
.bag-cell.selected>img {outline:1px solid #aa8546;filter:drop-shadow(0 0 3px #a1875266)}
.bag-detail {position:absolute;left:0;right:0;bottom:21cqw;max-height:53cqw;min-height:45cqw;overflow-y:auto;padding:4cqw 6cqw;background:#eee6d7e0;border-top:1px solid #aa9574}
.bag-detail>div:first-child {display:flex;align-items:center;gap:3cqw}
.bag-detail h2 {font-size:4.2cqw;font-weight:400;flex:1;margin:0}
.bag-detail>div>span,.bag-detail>p {font-size:3cqw;line-height:1.8;color:#8f7e5e}
.bag-detail .detail-actions {margin-top:1cqw}
.skill-tree-scroll {min-height:0;flex:1;overflow-y:auto;padding:2cqw 0 5cqw;scrollbar-width:thin;background:radial-gradient(ellipse,#ebe7da66,transparent)}
.skill-tree {width:100%;position:relative}
.skill-tree-lines {position:absolute;inset:0;width:100%;height:100%;pointer-events:none;fill:none;stroke:#a29c8b;stroke-width:2}
.skill-tree-lines .learned {stroke:#a17c42;stroke-width:3}
.skill-tree-node {position:absolute;transform:translate(-50%,-50%);border:0;padding:0;background:var(--item-image) center/100% 100%;color:#7b6b4e}
.skill-tree-node .tree-node-icon {width:100%;height:100%;padding:.7cqw;object-fit:contain;filter:saturate(.1);opacity:.5}
.skill-tree-node.learned .tree-node-icon {opacity:1;filter:none}
.skill-tree-node.selected {outline:1px solid #a98443;filter:drop-shadow(0 0 3px #b08a4077)}
.skill-tree-node>span {position:absolute;left:-40%;right:-40%;top:100%;font-size:2.9cqw;line-height:1.6;white-space:nowrap;text-align:center}
.skill-tree-node>b {position:absolute;bottom:0;left:0;right:0;background:#352e2277;color:#fff5d7;font:2.1cqw "Kaiti SC",serif;line-height:1.5}
.pets-window .window-header h1,.pets-window .window-header>span {color:#e7d3aa;text-shadow:0 1px 2px #17161c}
.pet-overview h2 {color:#e9d7b6;text-shadow:0 1px 2px #17161c}.pet-overview p {color:#cbb78b}
.pets-window .pet-selector button {color:#d8c29a}

/* Source status names accompany their actual timed combat state. */
.unit-statuses{position:absolute;left:50%;top:23px;transform:translateX(-50%);display:flex;flex-wrap:wrap;justify-content:center;gap:3px;width:130px;z-index:4;pointer-events:none}.unit-statuses span{font-size:10px;line-height:1.4;padding:2px 4px;border:1px solid #b8c6b0;background:#1d3834e8;color:#f0efd2;white-space:nowrap}.unit-statuses .harmful{background:#4b2635ed;border-color:#d29696}.unit-statuses small{font-size:9px;margin-left:3px;opacity:.8}
.technique-stage-track{display:flex;gap:8px;overflow:auto;padding:12px 0}.technique-stage{min-width:98px;padding:9px;border:1px solid #8c794d55;background:#ede7d4}.technique-stage.active{border-color:#95763c;background:#e6d4a9}.technique-stage b,.technique-stage small{display:block}.technique-node-dots{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;margin-top:8px}.technique-node-dots i{display:block;width:10px;height:10px;border:1px solid #9a916b;border-radius:50%}.technique-node-dots i.learned{background:#876b36}.source-benefits{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:8px 0}.source-benefits span{font-size:12px}.source-benefits b{font-weight:500;color:#80602d}.pet-selector{max-height:170px;overflow:auto;flex-wrap:wrap}.pet-subsections{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}.pet-subsections button{flex:1;min-width:80px}
.battle-unit.companion{left:68%;top:43%;width:17%;z-index:6}.battle-unit.companion .battle-pet{display:block;width:100%;height:auto;max-height:20cqw;object-fit:contain}.battle-unit.companion .unit-name{font-size:2.7cqw}
.battle-unit.summoned{left:13%;top:43%;width:19cqw;height:24cqw;z-index:6}.battle-unit.summoned .unit-hp i{background:#7d9cae}.battle-unit.summoned canvas{pointer-events:none}
.pets-window .pet-selector{justify-content:flex-start;flex-wrap:nowrap;max-height:24cqw;padding:2cqw 4cqw;gap:1.5cqw}.pets-window .pet-selector button{width:18cqw}.pet-development article{padding:10px 0;border-bottom:1px solid #9d8b6240}.pet-development details{border-bottom:1px solid #9d8b6240;padding:8px 0}.pet-development summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;gap:8px;font-size:3.3cqw}.pet-development summary small{color:#807151}.pet-development .native-button{margin-top:7px}.pet-skill-row{display:flex;gap:10px}.pet-skill-row>.catalog-icon{width:12cqw;height:12cqw;flex:none}.pet-skill-row>div{flex:1;min-width:0}.pet-skill-row p{margin:5px 0}.equipment-requirements h3{font-size:3.2cqw;font-weight:500;margin:10px 0 4px}.artifact-board .locked{opacity:.55}.pets-window .window-tabs{background:#e9e0c9;border-color:#b8a583}.pets-window .detail-panel{max-height:49%;min-height:30cqw}.pet-development{font-size:3.2cqw}

.battle-camera-layer{position:absolute;inset:0;z-index:2;transform-origin:50% 50%;pointer-events:none}
[data-screen="battle"]>.native-title{z-index:8}
.map-world-actions{position:absolute;top:28cqw;left:6%;right:6%;display:flex;justify-content:center;gap:2cqw}
[data-screen="temple"] .map-list{top:42cqw}
.world-journey{padding:4cqw;overflow:auto;flex:1;min-height:0}
.world-journey .source-panel{padding:5cqw;margin-bottom:3cqw;border:1px solid #b7a382;background:#efe7d4}
.world-journey .selected{border-color:#806a40;background:#e7d8b6}
.rule-balance{flex:none;min-height:0;max-height:30%;overflow-y:auto;padding:4cqw 6cqw;color:#6b583b;border-bottom:1px solid #b9a784}
.rule-balance span,.rule-balance strong,.rule-balance small{display:block;overflow-wrap:anywhere}
.rule-balance strong{font-size:5cqw;font-weight:400;padding:1.5cqw 0}
.rule-balance small{font-size:2.8cqw;line-height:1.6;white-space:normal;overflow-wrap:anywhere}
.rule-selector{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2cqw;padding:4cqw;overflow:auto;flex:1;min-height:16cqw}
.rule-selector button{min-height:15cqw;border:1px solid #b8a480;background:#e8dec9;color:#726045;padding:2cqw}
.rule-selector button.selected{border-color:#7d6435;background:#ddcba7}
.rule-selector span,.rule-selector b{display:block;font-weight:400}
.rule-selector span{font-size:3.8cqw;line-height:1.6}
.rule-selector b{font-size:2.7cqw}
.rule-progress{height:1.5cqw;background:#d9ccb2;overflow:hidden;margin-top:3cqw}
.rule-progress i{display:block;height:100%;background:#857348}
.relic-refinement{padding:3cqw 0;border-top:1px solid #bbaa8455}
.relic-refinement h3,.detail-panel>.source-panel h3{font-size:3.4cqw;font-weight:400}
.rules-window .detail-panel{min-height:35cqw;max-height:48%}
.relics-window .window-tabs{overflow-x:auto;flex-shrink:0;justify-content:flex-start}
.relics-window .window-tabs button{white-space:nowrap;flex:none}

.ti-stance{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;padding:8px 12px;position:relative;z-index:4}.ti-stance button{border:1px solid #b4a17c;background:rgba(250,247,236,.9);color:#665335;padding:5px 18px;font:inherit}.ti-stance button.selected{color:#382b14;background:#e4d6b4;border-color:#806235;opacity:1}.ti-stance p{flex:0 0 100%;text-align:center;margin:0;font-size:12px;color:#6b6251}.ti-stance-battle{position:absolute;right:4%;top:30cqw;bottom:auto;z-index:11;padding:0}.ti-stance-battle button{padding:5px 10px}

.world-journey .world-realm{position:relative;min-height:45cqw;overflow:hidden;background:#dcd7c6;padding:0;border-color:#9b8961}.world-realm-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 48%;opacity:.9}.world-realm-content{position:relative;padding:4cqw 5cqw;background:linear-gradient(90deg,#eee9d7f2,#eee9d7ad 45%,#eee9d700 80%);min-height:45cqw}.world-realm h2{text-align:left;margin:0 0 2cqw;font-size:6cqw;letter-spacing:1cqw}.world-realm p{margin:2cqw 0;color:#514b35}.world-realm.selected{box-shadow:inset 0 0 0 2px #9a7641}.rules-window.full-window{background:transparent}.rule-wheel-scroll{position:relative;overflow:auto;flex:1;min-height:32cqw;padding:3cqw 4cqw}.rule-wheel{position:relative;width:100%;margin:2cqw auto 0}.rule-wheel-art{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}.rule-wheel-node{position:absolute;transform:translate(-50%,-50%);padding:0;border:0;background:none;color:#e8dbad;text-shadow:0 1px 3px #1e2b2b;aspect-ratio:1;overflow:visible;isolation:isolate}.rule-wheel-node img{display:block;width:100%;height:100%;object-fit:contain}.rule-wheel-node.unowned img{filter:grayscale(.8);opacity:.75}.rule-wheel-node.selected img{filter:drop-shadow(0 0 6px #d4ba75)}.rule-wheel-node span{display:block;font-size:3.2cqw;position:absolute;left:-15%;right:-15%;bottom:-.5cqw;white-space:nowrap;background:#35484cc7;padding:1cqw 0}.rule-wheel-node small{position:absolute;left:-10%;right:-10%;bottom:-5cqw;font-size:2.6cqw;white-space:nowrap;color:#f2e3bd;text-shadow:0 1px 2px #241f16}.rules-window .rule-balance{background:#eee9d6b0}.rules-window .window-header{background:#eee9d6c4}

.battle-unit.dead.native-death-playing { opacity: 1; }

/* Explicit purchase quantities and total costs. */
.market-window .shop-item>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.4cqw}.market-window .shop-item .native-button{min-width:0;width:100%;padding:1.6cqw .5cqw;min-height:9cqw;font-size:2.8cqw;line-height:1.45}.market-window .shop-item .native-button small{display:block;font-size:2.2cqw;white-space:normal;overflow-wrap:anywhere}
/* Currency details follow the existing game panels and remain usable on mobile. */
.economy-counter{font:inherit;color:inherit;border:0;cursor:pointer;background:transparent;padding:0;gap:.3rem}
.economy-counter small{font-size:.65rem;white-space:nowrap;color:#d6c49f}
.token-currency-icon{color:#b5863f;font-size:1.15rem;line-height:1}
.economy-panel{padding:.5rem .25rem;color:#493f31;line-height:1.65}
.economy-balance{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;padding:1rem 0;border-bottom:1px solid #b49b6b66}
.economy-balance strong{font-size:2rem;font-variant-numeric:tabular-nums}
.economy-binding{padding:1rem;background:#d9c49933;border:1px solid #b49b6b66;margin:1rem 0}
.economy-binding p{margin:.5rem 0 0}
@media(max-width:440px){.economy-counter small{font-size:.6rem}.economy-counter{gap:.15rem}}

.wallet-address{overflow-wrap:anywhere;font-size:.8rem;opacity:.78}.wallet-forms{display:grid;gap:12px;margin-top:22px}.wallet-forms h3{margin:16px 0 0;color:var(--gold,#d9bd81)}.wallet-forms label,.ai-budget{display:grid;gap:7px}.wallet-forms input,.wallet-forms select,.ai-budget input{max-width:100%;width:100%;box-sizing:border-box;color:inherit;border:1px solid #947a4e80;background:#fff7e9;color:#30291e;border-radius:4px;padding:10px;font:inherit}.wallet-forms p,.ai-budget span{font-size:12px;line-height:1.7;opacity:.75}.wallet-order{display:grid;grid-template-columns:1fr auto;gap:8px;padding:14px 0;border-bottom:1px solid #947a4e40}.wallet-order small{opacity:.72}.wallet-order button{grid-column:1/-1;justify-self:start}.wallet-error{color:#f2bca6}.wallet-pair{padding:16px;border:1px solid #b49a6380;display:grid;gap:12px}.wallet-pair a{color:#ddc392}.wallet-forms select{appearance:auto}.ai-budget{margin:16px 0}
/* Three independent currencies and the shared game market. */
.three-currencies{display:flex;gap:5px;margin-left:auto}.three-currencies .resource-counter{min-width:62px;display:flex;flex-direction:column;gap:0;padding:4px 10px;background:rgba(29,38,31,.7);border:1px solid #bcaa7a66;border-radius:5px}.three-currencies small{font-size:10px;color:#ddd5b5}.three-currencies b{font-size:12px;color:#f4e2b8;font-variant-numeric:tabular-nums}.three-currencies .jade-counter b{color:#b3dcc9}.commerce-entry{position:absolute;right:5%;bottom:16%;z-index:6;padding:12px 18px;background:#e6d4aeea;border:1px solid #7b663d;box-shadow:0 3px 16px #182c3233;color:#493e28;font-family:var(--serif);font-size:21px}.commerce-entry small{display:block;font:11px/1.8 var(--sans);letter-spacing:1px}.commerce-modal{width:100%!important;max-width:100%!important;height:calc(100dvh - 28cqw);max-height:calc(100dvh - 28cqw);min-height:0;overflow:hidden}.commerce-modal .modal-content{flex:1;min-width:0}.commerce-modal .modal-close{white-space:nowrap}.player-seal{font-size:2.3cqw;margin-left:1cqw;color:#8c5e42}.commerce-shell{font-size:14px;color:#3e4438}.commerce-tabs{display:flex;flex-wrap:wrap;gap:5px;padding-bottom:13px;border-bottom:1px solid #a8946944}.commerce-tabs button{flex:1 0 100px;border:1px solid #9e8c6455;background:#f5eddb;padding:9px 8px;color:#514933;cursor:pointer}.commerce-tabs button[aria-selected=true]{background:#536153;color:#faf3e1;border-color:#536153}.commerce-toolbar{display:flex;align-items:center;gap:14px;margin:10px 0}.commerce-toolbar .native-button{font-size:12px;min-height:30px;padding:3px 15px}.commerce-card{background:#f5efdfc9;border:1px solid #b8a47755;padding:16px;margin:12px 0;min-width:0}.commerce-card h3{margin:0 0 10px;font-family:var(--serif);font-size:20px;font-weight:500;color:#494c3d}.commerce-card p{line-height:1.7;margin:8px 0;overflow-wrap:anywhere}.commerce-currencies,.commerce-curve-grid,.commerce-rankings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.commerce-currencies strong{font-size:26px;font-family:var(--serif);overflow-wrap:anywhere}.commerce-curve-grid,.commerce-rankings{grid-template-columns:repeat(2,minmax(0,1fr))}.commerce-note,.commerce-empty{line-height:1.8;color:#696552;padding:8px 0}.commerce-empty{text-align:center;padding:25px 5px}.commerce-field{display:flex;flex-direction:column;gap:7px;min-width:0;flex:1 1 130px}.commerce-field span{font-size:12px;color:#6b6654}.commerce-field input,.commerce-field select{font:14px var(--sans);min-width:0;width:100%;padding:10px;border:1px solid #b8a47788;background:#fffaf0;border-radius:3px;color:#3b453b;box-sizing:border-box}.commerce-shell form{display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin:14px 0}.commerce-shell form .native-button{flex:0 0 auto;min-height:40px}.commerce-shell .native-button{margin-right:6px}.commerce-shell details{border-top:1px solid #b7ab8b66;margin-top:16px;padding-top:12px}.commerce-shell summary{cursor:pointer;color:#476556}.commerce-seal{display:inline-grid;place-items:center;min-width:64px;min-height:64px;border:2px solid #8e5945;color:#8e5945;font:34px var(--serif);margin:6px 0;outline:1px solid #8e5945;outline-offset:4px}.commerce-actions{display:flex;gap:7px;flex-wrap:wrap;margin:16px 0}.commerce-status{display:flex;flex-direction:column;gap:10px;border-left:3px solid #677d67;background:#e9eddd;padding:16px;margin:14px 0}.commerce-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;color:#68644f}.commerce-stats b{display:block;color:#3a4e42;margin-top:5px;overflow-wrap:anywhere}.commerce-review{padding:20px;border:1px solid #99865b;background:#f6edda}.commerce-review>p:not(.commerce-note){display:flex;justify-content:space-between;gap:15px;border-bottom:1px solid #baa77744;padding-bottom:12px}.commerce-review strong{overflow-wrap:anywhere;text-align:right}.commerce-error{background:#f3dfd4;border-left:3px solid #9a5b46;padding:12px}.commerce-receipt{background:#e4ecd9;border-left:3px solid #718662;padding:12px;line-height:1.6}.commerce-item-icon{width:48px;height:48px;object-fit:contain;float:right}.commerce-rank{display:flex;gap:10px;align-items:center;border-bottom:1px solid #b7ab8b44;padding:12px 0}.commerce-rank span{flex:1;overflow-wrap:anywhere}.commerce-rank strong{font-size:12px}.commerce-shell small{overflow-wrap:anywhere}.commerce-shell button:disabled{opacity:.5;cursor:default}
@media(max-width:600px){.three-currencies{gap:3px}.three-currencies .resource-counter{min-width:47px;max-width:90px;padding:4px 5px}.three-currencies b{font-size:11px;max-width:80px;overflow:hidden;text-overflow:ellipsis}.resource-path{max-width:85px}.resource-path span{font-size:10px}.commerce-currencies,.commerce-curve-grid,.commerce-rankings{grid-template-columns:1fr}.commerce-currencies{gap:0}.commerce-currencies .commerce-card{margin:5px 0}.commerce-tabs button{flex-basis:23%;font-size:11px;padding:9px 1px}.commerce-entry{bottom:17%;right:4%;font-size:18px;padding:9px 12px}.commerce-card{padding:12px}.commerce-review{padding:12px}.commerce-shell form .native-button{width:100%}.commerce-modal .modal-content{padding:12px}.commerce-modal{width:100%!important}.commerce-stats{font-size:12px}}

.recharge-catalog{margin:18px 0}.recharge-catalog>h3{font:24px var(--serif);color:#3a4e42}.recharge-catalog>p{font-size:13px;line-height:1.8}.recharge-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.recharge-pack{min-width:0;padding:18px 14px;background:#f5ecd7;border:1px solid #b9a27588}.recharge-pack h4{font:28px var(--serif);color:#3a4e42;margin:0 0 14px}.recharge-pack h4 small{display:block;font:12px var(--sans);margin-top:6px}.recharge-pack p{font-size:12px;line-height:1.7;min-height:40px;color:#8c543a}.recharge-price{display:block;font-weight:500;font-size:14px;color:#555a4b;border-top:1px solid #b9a27566;padding-top:12px}.recharge-pending{display:block;font-size:11px;opacity:.65;margin-top:6px}@media(max-width:420px){.recharge-grid{gap:9px}.recharge-pack{padding:13px 10px}.recharge-pack h4{font-size:24px}}

/* Task details share the existing scroll region on narrow screens. */
.daily-source-tasks{margin:12px 0;padding:12px 14px;border:1px solid #b5a78d;background:#eee6d4;color:#4b4232;font-size:14px;line-height:1.6}
.daily-source-tasks summary{cursor:pointer;color:#796343}.daily-source-tasks p{margin:8px 0}.town-challenge{margin:14px 0}.tasks-window .window-summary{padding:12px 14px;line-height:1.5;flex-shrink:0}.tasks-window .commission-scroll{overscroll-behavior:contain}.tasks-window .window-foot{flex-shrink:0}
